fix: modernize nullresolve runtime
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
|
||||
import * as nullresolve from '../ts/index.js';
|
||||
|
||||
@@ -11,4 +11,4 @@ tap.test('should create, start and stop an instance of nullresolve', async () =>
|
||||
await nullresolveInstance.stop();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
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