omegon 0.9.0 → 0.9.1
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omegon",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Omegon — an opinionated distribution of pi (by Mario Zechner) with extensions for lifecycle management, memory, orchestration, and visualization",
|
|
5
5
|
"bin": {
|
|
6
6
|
"omegon": "bin/omegon.mjs",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* check-vendor-dist.mjs — Verify that vendor/pi-mono dist/ directories
|
|
3
|
+
* exist and were built from the current source.
|
|
4
|
+
*
|
|
5
|
+
* Guards against publishing omegon with stale or missing vendor dist.
|
|
6
|
+
* Run after `npm run build` in vendor/pi-mono and before `npm publish`.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
10
|
+
import { resolve, dirname } from "node:path";
|
|
11
|
+
import { fileURLToPath } from "node:url";
|
|
12
|
+
import { execSync } from "node:child_process";
|
|
13
|
+
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const root = resolve(__dirname, "..");
|
|
16
|
+
const vendorRoot = resolve(root, "vendor/pi-mono");
|
|
17
|
+
|
|
18
|
+
const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8"));
|
|
19
|
+
const bundled = pkg.bundleDependencies || [];
|
|
20
|
+
|
|
21
|
+
let failed = false;
|
|
22
|
+
|
|
23
|
+
for (const name of bundled) {
|
|
24
|
+
const ref = pkg.dependencies[name];
|
|
25
|
+
if (!ref?.startsWith("file:")) continue;
|
|
26
|
+
|
|
27
|
+
const srcDir = resolve(root, ref.slice(5));
|
|
28
|
+
const distDir = resolve(srcDir, "dist");
|
|
29
|
+
|
|
30
|
+
if (!existsSync(distDir)) {
|
|
31
|
+
console.error(`✗ ${name}: dist/ directory missing at ${distDir}`);
|
|
32
|
+
failed = true;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Spot-check: the dist should have .js files
|
|
37
|
+
const hasJs = execSync(`find "${distDir}" -name "*.js" -type f | head -1`, {
|
|
38
|
+
encoding: "utf8",
|
|
39
|
+
}).trim();
|
|
40
|
+
if (!hasJs) {
|
|
41
|
+
console.error(`✗ ${name}: dist/ exists but contains no .js files`);
|
|
42
|
+
failed = true;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
console.log(`✓ ${name}: dist/ present`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (failed) {
|
|
50
|
+
console.error(
|
|
51
|
+
"\nFATAL: Vendor dist directories are missing or empty. Run `cd vendor/pi-mono && npm run build` first.",
|
|
52
|
+
);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.log("\nAll vendor dist directories verified.");
|