mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Include node-forge in binary again
This commit is contained in:
parent
1d00084202
commit
ec9a266164
2 changed files with 4 additions and 6 deletions
7
build.js
7
build.js
|
|
@ -32,7 +32,7 @@ async function bundleSafeChain() {
|
||||||
platform: "node",
|
platform: "node",
|
||||||
target: "node24",
|
target: "node24",
|
||||||
outfile: "./build/bin/safe-chain.cjs",
|
outfile: "./build/bin/safe-chain.cjs",
|
||||||
external: ["certifi", "node-forge"],
|
external: ["certifi"],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,14 +52,10 @@ async function copyShellScripts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyCertifi() {
|
async function copyCertifi() {
|
||||||
await mkdir("./build/node_modules/certifi", { recursive: true });
|
|
||||||
await mkdir("./build/node_modules/certifi", { recursive: true });
|
await mkdir("./build/node_modules/certifi", { recursive: true });
|
||||||
await cp("./node_modules/certifi/", "./build/node_modules/certifi", {
|
await cp("./node_modules/certifi/", "./build/node_modules/certifi", {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
});
|
});
|
||||||
await cp("./node_modules/node-forge/", "./build/node_modules/node-forge", {
|
|
||||||
recursive: true,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
async function copyAndModifyPackageJson() {
|
async function copyAndModifyPackageJson() {
|
||||||
const packageJsonContent = await readFile(
|
const packageJsonContent = await readFile(
|
||||||
|
|
@ -82,7 +78,6 @@ async function copyAndModifyPackageJson() {
|
||||||
outputPath: "dist",
|
outputPath: "dist",
|
||||||
assets: [
|
assets: [
|
||||||
"node_modules/certifi/**/*",
|
"node_modules/certifi/**/*",
|
||||||
"node_modules/node-forge/**/*",
|
|
||||||
"bin/startup-scripts/**/*",
|
"bin/startup-scripts/**/*",
|
||||||
"bin/path-wrappers/**/*",
|
"bin/path-wrappers/**/*",
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@ import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
forge.options.usePureJavaScript = true;
|
||||||
|
|
||||||
const certFolder = path.join(os.homedir(), ".safe-chain", "certs");
|
const certFolder = path.join(os.homedir(), ".safe-chain", "certs");
|
||||||
const ca = loadCa();
|
const ca = loadCa();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue