Skip to content

Commit bd8971d

Browse files
committed
feat: add health check script and build process for health index
1 parent 4748281 commit bd8971d

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

local-tests/build.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,28 @@ export const build = async () => {
3030
inject: [`./${TEST_DIR}/shim.mjs`],
3131
mainFields: ['module', 'main'],
3232
});
33+
34+
await esbuild.build({
35+
entryPoints: [`${TEST_DIR}/health/index.ts`],
36+
outfile: `./${TEST_DIR}/build/health/index.mjs`,
37+
bundle: true,
38+
plugins: [
39+
nodeExternalsPlugin({
40+
allowList: [
41+
'ethers',
42+
'@lit-protocol/accs-schemas',
43+
'@lit-protocol/contracts',
44+
'crypto',
45+
'secp256k1',
46+
],
47+
}),
48+
],
49+
platform: 'node',
50+
target: 'esnext',
51+
format: 'esm',
52+
inject: [`./${TEST_DIR}/shim.mjs`],
53+
mainFields: ['module', 'main'],
54+
});
3355
};
3456

3557
/**

local-tests/health/index.ts

Whitespace-only changes.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"test:unit": "nx run-many --target=test",
2121
"test:unit:watch": "nx run-many --target=test --watch",
2222
"test:unit:bun": "bun ./tools/scripts/unit-test-with-bun.mjs",
23+
"test:health": "node ./local-tests/build.mjs && dotenvx run --env-file=.env -- node ./local-tests/build/health/index.mjs",
2324
"publish:packages": "yarn node ./tools/scripts/pub.mjs --prod",
2425
"publish:beta": "yarn node ./tools/scripts/pub.mjs --tag beta",
2526
"publish:staging": "yarn node ./tools/scripts/pub.mjs --tag staging",
@@ -42,6 +43,7 @@
4243
"@dotenvx/dotenvx": "^1.6.4",
4344
"@lit-protocol/accs-schemas": "^0.0.31",
4445
"@lit-protocol/contracts": "^0.0.74",
46+
"@lit-protocol/lit-status-sdk": "^0.1.0",
4547
"@metamask/eth-sig-util": "5.0.2",
4648
"@mysten/sui.js": "^0.37.1",
4749
"@openagenda/verror": "^3.1.4",

0 commit comments

Comments
 (0)