@vibgrate/cli 1.0.77 → 1.0.78
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/dist/cli.js +6 -2
- package/dist/hcs-worker.js +394205 -0
- package/package.json +6 -5
package/dist/cli.js
CHANGED
|
@@ -554,19 +554,23 @@ function validateFactLine(line) {
|
|
|
554
554
|
return { valid: true, fact: envelope };
|
|
555
555
|
}
|
|
556
556
|
function resolveHcsWorkerBin() {
|
|
557
|
+
const base = import.meta.dirname ?? path6.dirname(new URL(import.meta.url).pathname);
|
|
558
|
+
const bundledPath = path6.resolve(base, "..", "dist", "hcs-worker.js");
|
|
559
|
+
if (existsSync(bundledPath)) return bundledPath;
|
|
560
|
+
const siblingPath = path6.resolve(base, "hcs-worker.js");
|
|
561
|
+
if (existsSync(siblingPath)) return siblingPath;
|
|
557
562
|
try {
|
|
558
563
|
const resolved = import.meta.resolve("@vibgrate/hcs-node-worker");
|
|
559
564
|
const resolvedPath = resolved.startsWith("file://") ? new URL(resolved).pathname : resolved;
|
|
560
565
|
if (existsSync(resolvedPath)) return resolvedPath;
|
|
561
566
|
} catch {
|
|
562
567
|
}
|
|
563
|
-
const base = import.meta.dirname ?? path6.dirname(new URL(import.meta.url).pathname);
|
|
564
568
|
const monorepoPath = path6.resolve(base, "..", "..", "..", "vibgrate-hcs", "node", "dist", "main.js");
|
|
565
569
|
if (existsSync(monorepoPath)) return monorepoPath;
|
|
566
570
|
const devPath = path6.resolve(base, "..", "..", "..", "vibgrate-hcs", "node", "src", "main.ts");
|
|
567
571
|
if (existsSync(devPath)) return devPath;
|
|
568
572
|
throw new Error(
|
|
569
|
-
'Cannot locate
|
|
573
|
+
'Cannot locate HCS worker. Run "pnpm build" in the CLI package to bundle the worker into dist/.'
|
|
570
574
|
);
|
|
571
575
|
}
|
|
572
576
|
var NODE_WORKER_AST_LANGS = /* @__PURE__ */ new Set(["typescript", "javascript"]);
|