Add certify

This commit is contained in:
Sander Declerck 2025-11-28 14:44:47 +01:00
parent 161f256066
commit c59b8263ca
No known key found for this signature in database

View file

@ -15,6 +15,7 @@ if (!target) {
await clearOutputFolder(); await clearOutputFolder();
await bundleSafeChain(); await bundleSafeChain();
await copyShellScripts(); await copyShellScripts();
await copyCertifi();
await copyAndModifyPackageJson(); await copyAndModifyPackageJson();
await buildSafeChainBinary(target); await buildSafeChainBinary(target);
})(); })();
@ -31,6 +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"],
}); });
} }
@ -48,6 +50,15 @@ async function copyShellScripts() {
{ recursive: true } { recursive: true }
); );
} }
async function copyCertifi() {
await mkdir("./build/node_modules/certifi", { recursive: true });
await cp(
"./node_modules/certifi/",
"./build/node_modules/certifi",
{ recursive: true }
);
}
async function copyAndModifyPackageJson() { async function copyAndModifyPackageJson() {
const packageJsonContent = await readFile( const packageJsonContent = await readFile(
"./packages/safe-chain/package.json", "./packages/safe-chain/package.json",