fix: use relative runtime imports

This commit is contained in:
2026-04-29 08:25:58 +00:00
parent aab6e9044d
commit 7d380d04fc
3 changed files with 34 additions and 3 deletions
+32 -1
View File
@@ -1 +1,32 @@
echo 'hi' #!/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,
interfacesVersion: readJson('/app/node_modules/@serve.zone/interfaces/package.json').version,
apiVersion: readJson('/app/node_modules/@serve.zone/api/package.json').version,
hasDistServe: fs.existsSync('/app/dist_serve/index.html'),
};
await import('/app/dist_ts/index.js');
if (checks.packageVersion !== '5.3.0') {
throw new Error(`Unexpected Cloudly package version ${checks.packageVersion}`);
}
if (checks.interfacesVersion !== '5.4.6') {
throw new Error(`Unexpected interfaces version ${checks.interfacesVersion}`);
}
if (checks.apiVersion !== '5.3.4') {
throw new Error(`Unexpected api version ${checks.apiVersion}`);
}
if (!checks.hasDistServe) {
throw new Error('Missing dist_serve/index.html');
}
console.log(JSON.stringify(checks));
NODE
@@ -1,6 +1,6 @@
import * as plugins from '../plugins.js'; import * as plugins from '../plugins.js';
import * as paths from '../paths.js'; import * as paths from '../paths.js';
import type { Cloudly } from 'ts/classes.cloudly.js'; import type { Cloudly } from '../classes.cloudly.js';
import type { ExternalRegistryManager } from './classes.externalregistrymanager.js'; import type { ExternalRegistryManager } from './classes.externalregistrymanager.js';
@plugins.smartdata.managed() @plugins.smartdata.managed()
+1 -1
View File
@@ -1,4 +1,4 @@
import { SecretBundle } from 'ts/manager.secret/classes.secretbundle.js'; import { SecretBundle } from '../manager.secret/classes.secretbundle.js';
import * as plugins from '../plugins.js'; import * as plugins from '../plugins.js';
import { ServiceManager } from './classes.servicemanager.js'; import { ServiceManager } from './classes.servicemanager.js';