@compivia/engine-host 0.0.0-stage → 0.0.1128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ // SPDX-License-Identifier: FSL-1.1-ALv2
3
+
4
+ // Публичный bin компонента `@compivia/engine-host` (#404 §4.1): тонкий вход.
5
+ // Импортирует собственный бандл dist/bin.mjs; без сборки — подсказка, exit 1.
6
+ import { existsSync } from "node:fs";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const bundleUrl = new URL("../dist/bin.mjs", import.meta.url);
10
+ if (!existsSync(fileURLToPath(bundleUrl))) {
11
+ process.stderr.write("compivia-engine-host: dist/bin.mjs not found — run pnpm build\n");
12
+ process.exit(1);
13
+ }
14
+ try {
15
+ await import(bundleUrl.href);
16
+ } catch (error) {
17
+ process.stderr.write(`compivia-engine-host: failed to load dist/bin.mjs: ${String(error)}\n`);
18
+ if (error instanceof Error && error.stack !== undefined) process.stderr.write(`${error.stack}\n`);
19
+ process.exit(1);
20
+ }