fix: modernize nullresolve runtime
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
node --input-type=module <<'NODE'
|
||||
import fs from 'node:fs';
|
||||
|
||||
const readJson = (path) => JSON.parse(fs.readFileSync(path, 'utf8'));
|
||||
|
||||
const checks = {
|
||||
packageVersion: readJson('/app/package.json').version,
|
||||
typedserverVersion: readJson('/app/node_modules/@api.global/typedserver/package.json').version,
|
||||
hasCli: fs.existsSync('/app/cli.js'),
|
||||
};
|
||||
|
||||
await import('/app/dist_ts/index.js');
|
||||
|
||||
if (checks.packageVersion !== '1.0.31') {
|
||||
throw new Error(`Unexpected nullresolve package version ${checks.packageVersion}`);
|
||||
}
|
||||
if (checks.typedserverVersion !== '8.4.6') {
|
||||
throw new Error(`Unexpected typedserver version ${checks.typedserverVersion}`);
|
||||
}
|
||||
if (!checks.hasCli) {
|
||||
throw new Error('Missing cli.js');
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(checks));
|
||||
NODE
|
||||
Reference in New Issue
Block a user