@powerhousedao/ph-cli 6.2.3-dev.77 → 6.2.3-dev.79
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/{build-Dj8qfSSe.mjs → build-DUzhIPb7.mjs} +8 -55
- package/dist/build-DUzhIPb7.mjs.map +1 -0
- package/dist/build-FoZl36TM.mjs +4 -0
- package/dist/{check-9KDSF1Wj.mjs → check-DDy1o6Vr.mjs} +10 -7
- package/dist/check-DDy1o6Vr.mjs.map +1 -0
- package/dist/{cli-connect-override-BrS-X8Rs.mjs → cli-connect-override-By7u9IVR.mjs} +4 -4
- package/dist/{cli-connect-override-BrS-X8Rs.mjs.map → cli-connect-override-By7u9IVR.mjs.map} +1 -1
- package/dist/cli.mjs +6 -10
- package/dist/cli.mjs.map +1 -1
- package/dist/{compound-Gjt5rBfF-BmSW1XPB.mjs → compound-Cfqa5Jal-B5rkCmIj.mjs} +24 -39
- package/dist/compound-Cfqa5Jal-B5rkCmIj.mjs.map +1 -0
- package/dist/{connect-build-B5nYqlLc.mjs → connect-build-BBAZuqpo.mjs} +5 -5
- package/dist/{connect-build-B5nYqlLc.mjs.map → connect-build-BBAZuqpo.mjs.map} +1 -1
- package/dist/{connect-config-Bi95JhNG.mjs → connect-config-ghJlOd-x.mjs} +4 -4
- package/dist/{connect-config-Bi95JhNG.mjs.map → connect-config-ghJlOd-x.mjs.map} +1 -1
- package/dist/{connect-plugin-configs-BwYEbQSY.mjs → connect-plugin-configs-BoPbxD9u.mjs} +4 -4
- package/dist/{connect-plugin-configs-BwYEbQSY.mjs.map → connect-plugin-configs-BoPbxD9u.mjs.map} +1 -1
- package/dist/connect-studio-BaVeuul3.mjs +78 -0
- package/dist/connect-studio-BaVeuul3.mjs.map +1 -0
- package/dist/{connect-studio-Co_UNyEC.mjs → connect-studio-CfggUldW.mjs} +3 -3
- package/dist/{dist-BVqNlv1z.mjs → dist-Bd6sSt7Y.mjs} +120 -21
- package/dist/dist-Bd6sSt7Y.mjs.map +1 -0
- package/dist/{explain-CPD1tzoV.mjs → explain-C9zER5xn.mjs} +6 -17
- package/dist/explain-C9zER5xn.mjs.map +1 -0
- package/dist/export-CrIz2spe.mjs +42 -0
- package/dist/export-CrIz2spe.mjs.map +1 -0
- package/dist/{generate-all-CaAHbviS.mjs → generate-all-DgEFOXwU.mjs} +4 -4
- package/dist/{generate-all-CaAHbviS.mjs.map → generate-all-DgEFOXwU.mjs.map} +1 -1
- package/dist/{generate-desktop-shell-BdXDiS5o.mjs → generate-desktop-shell-BXcGvbms.mjs} +4 -4
- package/dist/{generate-desktop-shell-BdXDiS5o.mjs.map → generate-desktop-shell-BXcGvbms.mjs.map} +1 -1
- package/dist/generate-migration-file-yK8uA70U.mjs +20 -0
- package/dist/generate-migration-file-yK8uA70U.mjs.map +1 -0
- package/dist/{generate-piece-U3tP-Sex.mjs → generate-piece-C6ymlErL.mjs} +6 -6
- package/dist/{generate-piece-U3tP-Sex.mjs.map → generate-piece-C6ymlErL.mjs.map} +1 -1
- package/dist/{generate-piece-action-DbxrzfKY.mjs → generate-piece-action-uYRdKtQA.mjs} +5 -5
- package/dist/{generate-piece-action-DbxrzfKY.mjs.map → generate-piece-action-uYRdKtQA.mjs.map} +1 -1
- package/dist/{generate-piece-trigger-CqVOcL9g.mjs → generate-piece-trigger-CZaDD-cc.mjs} +5 -5
- package/dist/{generate-piece-trigger-CqVOcL9g.mjs.map → generate-piece-trigger-CZaDD-cc.mjs.map} +1 -1
- package/dist/{generate-processor-B9Umgjy9.mjs → generate-processor-BVjOsfjJ.mjs} +5 -5
- package/dist/{generate-processor-B9Umgjy9.mjs.map → generate-processor-BVjOsfjJ.mjs.map} +1 -1
- package/dist/{generate-subgraph-DRrInOOv.mjs → generate-subgraph-CrHbYK91.mjs} +5 -5
- package/dist/{generate-subgraph-DRrInOOv.mjs.map → generate-subgraph-CrHbYK91.mjs.map} +1 -1
- package/dist/get-version-_coBX13A.mjs +11 -0
- package/dist/get-version-_coBX13A.mjs.map +1 -0
- package/dist/{index-7hbcAZpm.d.mts → index-DdpGYzN0.d.mts} +4 -20
- package/dist/{index-7hbcAZpm.d.mts.map → index-DdpGYzN0.d.mts.map} +1 -1
- package/dist/{init-ScuT3z7P.mjs → init-Ch1rCksS.mjs} +12 -10
- package/dist/{init-ScuT3z7P.mjs.map → init-Ch1rCksS.mjs.map} +1 -1
- package/dist/install-added-dependencies-DnZFR3aE.mjs +18 -0
- package/dist/install-added-dependencies-DnZFR3aE.mjs.map +1 -0
- package/dist/mcp-CZ02pj76.mjs +262 -0
- package/dist/mcp-CZ02pj76.mjs.map +1 -0
- package/dist/member-config-8Vwys-4O.mjs +154 -0
- package/dist/member-config-8Vwys-4O.mjs.map +1 -0
- package/dist/{migrate-b38W7NH_.mjs → migrate-CIJaE3iZ.mjs} +4 -4
- package/dist/{migrate-b38W7NH_.mjs.map → migrate-CIJaE3iZ.mjs.map} +1 -1
- package/dist/offered-routes-imports-CQInWI6y.mjs +4 -0
- package/dist/offered-routes-imports-CalXK9dh.mjs +96 -0
- package/dist/offered-routes-imports-CalXK9dh.mjs.map +1 -0
- package/dist/{ph-cli-commands-kRpc2dhi.mjs → ph-cli-commands-B37zr8uN.mjs} +121 -39
- package/dist/ph-cli-commands-B37zr8uN.mjs.map +1 -0
- package/dist/ph-cli-commands-S3ArIR8q.mjs +4 -0
- package/dist/{run-sugar-BJxPKwlM.mjs → run-sugar-BzGnofrW.mjs} +4 -4
- package/dist/{run-sugar-BJxPKwlM.mjs.map → run-sugar-BzGnofrW.mjs.map} +1 -1
- package/dist/runners/connect.d.mts +5 -33
- package/dist/runners/connect.d.mts.map +1 -1
- package/dist/runners/connect.mjs +6 -6
- package/dist/runners/switchboard.d.mts +1161 -37
- package/dist/runners/switchboard.d.mts.map +1 -1
- package/dist/runners/switchboard.mjs +52 -69
- package/dist/runners/switchboard.mjs.map +1 -1
- package/dist/{schemas-D5N5U_Mf.mjs → schemas-Cnv5AnQT.mjs} +18 -4
- package/dist/{schemas-D5N5U_Mf.mjs.map → schemas-Cnv5AnQT.mjs.map} +1 -1
- package/dist/scripts/generate-commands-docs.ts +4 -0
- package/dist/{start-run-CDZ3YAr9.mjs → start-run-BAQDM5Bu.mjs} +4 -4
- package/dist/{start-run-CDZ3YAr9.mjs.map → start-run-BAQDM5Bu.mjs.map} +1 -1
- package/dist/{switchboard-h4-XgP1h.mjs → switchboard-BI35F5H7.mjs} +40 -8
- package/dist/switchboard-BI35F5H7.mjs.map +1 -0
- package/dist/switchboard-DohZ1tbp.mjs +4 -0
- package/dist/sync-connect-routes-BtAsFPXN.mjs +4 -0
- package/dist/sync-connect-routes-t0Slg-P6.mjs +25 -0
- package/dist/sync-connect-routes-t0Slg-P6.mjs.map +1 -0
- package/dist/{vetra-DO5eUgAo.mjs → vetra-C9fsChId.mjs} +75 -127
- package/dist/vetra-C9fsChId.mjs.map +1 -0
- package/dist/vetra-launch-DQDZxGTV.mjs +343 -0
- package/dist/vetra-launch-DQDZxGTV.mjs.map +1 -0
- package/package.json +15 -13
- package/dist/build-C78yPntL.mjs +0 -4
- package/dist/build-Dj8qfSSe.mjs.map +0 -1
- package/dist/check-9KDSF1Wj.mjs.map +0 -1
- package/dist/compound-Gjt5rBfF-BmSW1XPB.mjs.map +0 -1
- package/dist/connect-studio-DGWUidCV.mjs +0 -39
- package/dist/connect-studio-DGWUidCV.mjs.map +0 -1
- package/dist/dist-BVqNlv1z.mjs.map +0 -1
- package/dist/explain-CPD1tzoV.mjs.map +0 -1
- package/dist/install-added-dependencies-DVSbzler.mjs +0 -33
- package/dist/install-added-dependencies-DVSbzler.mjs.map +0 -1
- package/dist/ph-cli-commands-BQU6lpyM.mjs +0 -4
- package/dist/ph-cli-commands-kRpc2dhi.mjs.map +0 -1
- package/dist/switchboard-C5zgkRl2.mjs +0 -4
- package/dist/switchboard-h4-XgP1h.mjs.map +0 -1
- package/dist/vetra-DO5eUgAo.mjs.map +0 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a3aeccc2-72fd-5986-9fd9-071f527658da")}catch(e){}}();
|
|
3
|
+
import { n as OFFERED_ROUTES_MODULE, t as HOST_ROUTES_DIR } from "./sync-connect-routes-t0Slg-P6.mjs";
|
|
4
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
//#region src/utils/offered-routes-imports.ts
|
|
7
|
+
const CONNECT_IMPORT = /^@powerhousedao\/connect(\/|$)/;
|
|
8
|
+
const GUARD = "ph-offered-routes-imports";
|
|
9
|
+
const CONNECT_IMPORT_HINT = "Routes a package offers other Connects import @powerhousedao/connect-core instead (ContentOutlet, ModalDialog, useConnectChrome, useDriveRouteData, useNavRoutes and useSidebarMode from @powerhousedao/connect-core/router, SidebarItem from @powerhousedao/design-system/connect); only its own host's _app.tsx and overrides may use @powerhousedao/connect.";
|
|
10
|
+
function reachableFrom(graph, entry) {
|
|
11
|
+
const reached = /* @__PURE__ */ new Set();
|
|
12
|
+
const pending = [entry];
|
|
13
|
+
for (let id = pending.pop(); id !== void 0; id = pending.pop()) {
|
|
14
|
+
if (reached.has(id)) continue;
|
|
15
|
+
reached.add(id);
|
|
16
|
+
const info = graph.getModuleInfo(id);
|
|
17
|
+
if (info) pending.push(...info.importedIds, ...info.dynamicallyImportedIds);
|
|
18
|
+
}
|
|
19
|
+
return reached;
|
|
20
|
+
}
|
|
21
|
+
/** Fails the build on an import of Connect that the offered routes reach, as
|
|
22
|
+
* other Connects don't share Connect with the package; warns on one from the
|
|
23
|
+
* rest of the package, which bundles a copy of the Connect modules it uses. */
|
|
24
|
+
function noConnectImports(routesEntry, routesDir) {
|
|
25
|
+
const imports = /* @__PURE__ */ new Map();
|
|
26
|
+
const slash = (path) => path.replaceAll("\\", "/");
|
|
27
|
+
const isRoute = (id) => slash(id) === slash(routesEntry) || slash(id).startsWith(`${slash(routesDir)}/`);
|
|
28
|
+
return {
|
|
29
|
+
name: GUARD,
|
|
30
|
+
resolveId(source, importer) {
|
|
31
|
+
if (!importer || !CONNECT_IMPORT.test(source)) return null;
|
|
32
|
+
if (isRoute(importer)) throw new Error(`${importer} imports "${source}". ${CONNECT_IMPORT_HINT}`);
|
|
33
|
+
const sources = imports.get(importer) ?? /* @__PURE__ */ new Set();
|
|
34
|
+
imports.set(importer, sources.add(source));
|
|
35
|
+
return null;
|
|
36
|
+
},
|
|
37
|
+
buildEnd(error) {
|
|
38
|
+
if (error || !imports.size) return;
|
|
39
|
+
const entry = this.getModuleInfo(routesEntry) ? routesEntry : slash(routesEntry);
|
|
40
|
+
const reached = reachableFrom(this, entry);
|
|
41
|
+
const described = ([importer, sources]) => `${importer} imports ${[...sources].map((s) => `"${s}"`).join(", ")}`;
|
|
42
|
+
const offered = [...imports].filter(([id]) => reached.has(id));
|
|
43
|
+
if (offered.length) this.error(`${offered.map(described).join("\n")}\n${CONNECT_IMPORT_HINT}`);
|
|
44
|
+
console.warn(`⚠ ${[...imports].map(described).join("\n")}\nConnect isn't shared with the packages it loads, so the build bundles a copy of these modules, apart from the app's state. Import @powerhousedao/connect-core instead; a later version fails the build.`);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const IN_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
49
|
+
const SCRIPT = /\.[cm]?[jt]sx?$/;
|
|
50
|
+
const projectModulesOnly = {
|
|
51
|
+
name: "ph-offered-routes-project-modules",
|
|
52
|
+
async resolveId(source, importer, options) {
|
|
53
|
+
if (!importer) return null;
|
|
54
|
+
const resolved = await this.resolve(source, importer, {
|
|
55
|
+
...options,
|
|
56
|
+
skipSelf: true
|
|
57
|
+
});
|
|
58
|
+
if (!resolved || resolved.external) return {
|
|
59
|
+
id: source,
|
|
60
|
+
external: true
|
|
61
|
+
};
|
|
62
|
+
if (IN_NODE_MODULES.test(resolved.id) || !SCRIPT.test(resolved.id)) return {
|
|
63
|
+
id: resolved.id,
|
|
64
|
+
external: true
|
|
65
|
+
};
|
|
66
|
+
return resolved;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
/** Fails as `ph build` does when the routes the package offers reach an
|
|
70
|
+
* import of Connect; bundles the project's modules in memory, writing nothing. */
|
|
71
|
+
async function checkOfferedRoutesImports(projectDir) {
|
|
72
|
+
const projectRoot = realpathSync(projectDir);
|
|
73
|
+
const entry = join(projectRoot, OFFERED_ROUTES_MODULE);
|
|
74
|
+
if (!existsSync(entry)) return;
|
|
75
|
+
const { rolldown } = await import("rolldown");
|
|
76
|
+
const bundle = await rolldown({
|
|
77
|
+
input: entry,
|
|
78
|
+
cwd: projectRoot,
|
|
79
|
+
tsconfig: true,
|
|
80
|
+
logLevel: "silent",
|
|
81
|
+
plugins: [noConnectImports(entry, join(projectRoot, HOST_ROUTES_DIR)), projectModulesOnly]
|
|
82
|
+
});
|
|
83
|
+
try {
|
|
84
|
+
await bundle.generate({});
|
|
85
|
+
} catch (error) {
|
|
86
|
+
const found = (error.errors ?? []).filter((e) => e.plugin === GUARD);
|
|
87
|
+
if (found.length) throw new Error(found.map((e) => e.message).join("\n"), { cause: error });
|
|
88
|
+
} finally {
|
|
89
|
+
await bundle.close();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { checkOfferedRoutesImports as n, noConnectImports as r, CONNECT_IMPORT_HINT as t };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=offered-routes-imports-CalXK9dh.mjs.map
|
|
96
|
+
//# debugId=a3aeccc2-72fd-5986-9fd9-071f527658da
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offered-routes-imports-CalXK9dh.mjs","sources":["../src/utils/offered-routes-imports.ts"],"sourcesContent":["import { existsSync, realpathSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { Plugin } from \"rolldown\";\nimport {\n HOST_ROUTES_DIR,\n OFFERED_ROUTES_MODULE,\n} from \"./sync-connect-routes.js\";\n\nconst CONNECT_IMPORT = /^@powerhousedao\\/connect(\\/|$)/;\n\nconst GUARD = \"ph-offered-routes-imports\";\n\nexport const CONNECT_IMPORT_HINT =\n \"Routes a package offers other Connects import @powerhousedao/connect-core instead (ContentOutlet, ModalDialog, useConnectChrome, useDriveRouteData, useNavRoutes and useSidebarMode from @powerhousedao/connect-core/router, SidebarItem from @powerhousedao/design-system/connect); only its own host's _app.tsx and overrides may use @powerhousedao/connect.\";\n\ntype ModuleGraph = {\n getModuleInfo(id: string): {\n importedIds: readonly string[];\n dynamicallyImportedIds: readonly string[];\n } | null;\n error(message: string): never;\n};\n\nfunction reachableFrom(graph: ModuleGraph, entry: string) {\n const reached = new Set<string>();\n const pending = [entry];\n for (let id = pending.pop(); id !== undefined; id = pending.pop()) {\n if (reached.has(id)) continue;\n reached.add(id);\n const info = graph.getModuleInfo(id);\n if (info) pending.push(...info.importedIds, ...info.dynamicallyImportedIds);\n }\n return reached;\n}\n\n/** Fails the build on an import of Connect that the offered routes reach, as\n * other Connects don't share Connect with the package; warns on one from the\n * rest of the package, which bundles a copy of the Connect modules it uses. */\nexport function noConnectImports(routesEntry: string, routesDir: string) {\n const imports = new Map<string, Set<string>>();\n // Module ids may spell a Windows path with either separator.\n const slash = (path: string) => path.replaceAll(\"\\\\\", \"/\");\n const isRoute = (id: string) =>\n slash(id) === slash(routesEntry) ||\n slash(id).startsWith(`${slash(routesDir)}/`);\n return {\n name: GUARD,\n resolveId(source: string, importer: string | undefined) {\n if (!importer || !CONNECT_IMPORT.test(source)) return null;\n // Before resolving it: a route file's import fails even unresolved.\n if (isRoute(importer)) {\n throw new Error(\n `${importer} imports \"${source}\". ${CONNECT_IMPORT_HINT}`,\n );\n }\n const sources = imports.get(importer) ?? new Set<string>();\n imports.set(importer, sources.add(source));\n return null;\n },\n buildEnd(this: ModuleGraph, error?: Error) {\n if (error || !imports.size) return;\n const entry = this.getModuleInfo(routesEntry)\n ? routesEntry\n : slash(routesEntry);\n const reached = reachableFrom(this, entry);\n const described = ([importer, sources]: [string, Set<string>]) =>\n `${importer} imports ${[...sources].map((s) => `\"${s}\"`).join(\", \")}`;\n const offered = [...imports].filter(([id]) => reached.has(id));\n if (offered.length) {\n this.error(\n `${offered.map(described).join(\"\\n\")}\\n${CONNECT_IMPORT_HINT}`,\n );\n }\n console.warn(\n `⚠ ${[...imports].map(described).join(\"\\n\")}\\nConnect isn't shared with the packages it loads, so the build bundles a copy of these modules, apart from the app's state. Import @powerhousedao/connect-core instead; a later version fails the build.`,\n );\n },\n };\n}\n\ntype PluginError = Error & { plugin?: string };\n\nconst IN_NODE_MODULES = /[\\\\/]node_modules[\\\\/]/;\nconst SCRIPT = /\\.[cm]?[jt]sx?$/;\n\n// The project's own modules only: dependencies, styles and assets stay out.\nconst projectModulesOnly: Plugin = {\n name: \"ph-offered-routes-project-modules\",\n async resolveId(source, importer, options) {\n if (!importer) return null;\n const resolved = await this.resolve(source, importer, {\n ...options,\n skipSelf: true,\n });\n if (!resolved || resolved.external) return { id: source, external: true };\n if (IN_NODE_MODULES.test(resolved.id) || !SCRIPT.test(resolved.id)) {\n return { id: resolved.id, external: true };\n }\n return resolved;\n },\n};\n\n/** Fails as `ph build` does when the routes the package offers reach an\n * import of Connect; bundles the project's modules in memory, writing nothing. */\nexport async function checkOfferedRoutesImports(projectDir: string) {\n // Module ids are real paths; the routes are matched against them.\n const projectRoot = realpathSync(projectDir);\n const entry = join(projectRoot, OFFERED_ROUTES_MODULE);\n if (!existsSync(entry)) return;\n const { rolldown } = await import(\"rolldown\");\n const bundle = await rolldown({\n input: entry,\n cwd: projectRoot,\n tsconfig: true,\n logLevel: \"silent\",\n plugins: [\n noConnectImports(entry, join(projectRoot, HOST_ROUTES_DIR)),\n projectModulesOnly,\n ],\n });\n try {\n // Rolldown resolves the graph on generate.\n await bundle.generate({});\n } catch (error) {\n // Only the import rule fails here; tsc and lint report a file that won't parse.\n const found = ((error as { errors?: PluginError[] }).errors ?? []).filter(\n (e) => e.plugin === GUARD,\n );\n if (found.length) {\n throw new Error(found.map((e) => e.message).join(\"\\n\"), {\n cause: error,\n });\n }\n } finally {\n await bundle.close();\n }\n}\n"],"names":[],"mappings":"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","debug_id":"a3aeccc2-72fd-5986-9fd9-071f527658da"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { n as skipInstallArgs } from "./install-added-dependencies-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a5a3097b-63a9-5f4d-be07-85243bf8e18b")}catch(e){}}();
|
|
3
|
+
import { n as skipInstallArgs } from "./install-added-dependencies-DnZFR3aE.mjs";
|
|
4
4
|
import { t as isUniformRunnersEnabled } from "./feature-flags-xwqcHEWC.mjs";
|
|
5
5
|
import { boolean, command, extendType, flag, multioption, oneOf, option, optional, positional, string, subcommands } from "cmd-ts";
|
|
6
|
-
import { AGENTS, accessTokenArgs, buildArgs, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, hostCheckArgs, initArgs, inspectArgs, installArgs, listArgs, loginArgs, migrateArgs, publishArgs, registryLoginArgs, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs } from "@powerhousedao/shared/clis/args";
|
|
6
|
+
import { AGENTS, accessTokenArgs, buildArgs, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, hostCheckArgs, hostExportArgs, initArgs, inspectArgs, installArgs, listArgs, loginArgs, mcpArgs, migrateArgs, publishArgs, registryLoginArgs, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs } from "@powerhousedao/shared/clis/args";
|
|
7
7
|
import { DEFAULT_EXPIRY_SECONDS } from "@powerhousedao/shared/clis/constants";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
|
-
import path$1 from "path";
|
|
11
|
-
import { execSync } from "node:child_process";
|
|
12
10
|
import { PROCESSOR_APPS } from "@powerhousedao/shared/processors";
|
|
13
|
-
import { execSync
|
|
11
|
+
import { execSync } from "child_process";
|
|
12
|
+
import { execSync as execSync$1 } from "node:child_process";
|
|
14
13
|
import { createInterface } from "node:readline/promises";
|
|
15
14
|
//#region src/commands/access-token.ts
|
|
16
15
|
const accessToken = command({
|
|
@@ -104,7 +103,7 @@ can load and still fail at runtime, so don't publish it.`,
|
|
|
104
103
|
handler: async (args) => {
|
|
105
104
|
if (args.debug) console.log(args);
|
|
106
105
|
try {
|
|
107
|
-
const { runBuild } = await import("./build-
|
|
106
|
+
const { runBuild } = await import("./build-FoZl36TM.mjs");
|
|
108
107
|
await runBuild(args);
|
|
109
108
|
} catch (error) {
|
|
110
109
|
console.error(args.debug || !(error instanceof Error) ? error : error.message);
|
|
@@ -129,8 +128,8 @@ This command:
|
|
|
129
128
|
args: connectStudioArgs,
|
|
130
129
|
handler: async (args) => {
|
|
131
130
|
if (args.debug) console.log(args);
|
|
132
|
-
const { runConnectStudio } = await import("./connect-studio-
|
|
133
|
-
await runConnectStudio(args);
|
|
131
|
+
const { runConnectStudio } = await import("./connect-studio-CfggUldW.mjs");
|
|
132
|
+
await runConnectStudio(args, void 0, void 0, { reloadOnConfigChange: true });
|
|
134
133
|
}
|
|
135
134
|
});
|
|
136
135
|
const build = command({
|
|
@@ -151,7 +150,7 @@ Build has no read mode; passing only <key> without <value> errors out (use \`ph
|
|
|
151
150
|
args: connectBuildArgs,
|
|
152
151
|
handler: async (args) => {
|
|
153
152
|
if (args.debug) console.log(args);
|
|
154
|
-
const { runConnectBuild } = await import("./connect-build-
|
|
153
|
+
const { runConnectBuild } = await import("./connect-build-BBAZuqpo.mjs");
|
|
155
154
|
await runConnectBuild(args);
|
|
156
155
|
process.exit(0);
|
|
157
156
|
}
|
|
@@ -188,7 +187,7 @@ Writes go to:
|
|
|
188
187
|
`,
|
|
189
188
|
args: connectConfigArgs,
|
|
190
189
|
handler: async (args) => {
|
|
191
|
-
const { runConnectConfig } = await import("./connect-config-
|
|
190
|
+
const { runConnectConfig } = await import("./connect-config-ghJlOd-x.mjs");
|
|
192
191
|
await runConnectConfig(args);
|
|
193
192
|
}
|
|
194
193
|
});
|
|
@@ -213,7 +212,7 @@ const generateAllCmd = command({
|
|
|
213
212
|
description: "Instead of generating code, write a spec for every module into specs/ (one-shot migration to documents-as-source-of-truth)"
|
|
214
213
|
}) },
|
|
215
214
|
handler: async (args) => {
|
|
216
|
-
const { startGenerateAll } = await import("./generate-all-
|
|
215
|
+
const { startGenerateAll } = await import("./generate-all-DgEFOXwU.mjs");
|
|
217
216
|
await startGenerateAll(args, process.cwd());
|
|
218
217
|
process.exit(0);
|
|
219
218
|
}
|
|
@@ -315,6 +314,19 @@ const generateAppCmd = command({
|
|
|
315
314
|
}
|
|
316
315
|
});
|
|
317
316
|
//#endregion
|
|
317
|
+
//#region src/commands/generate-connect-routes.ts
|
|
318
|
+
const generateConnectRoutesCmd = command({
|
|
319
|
+
name: "connect-routes",
|
|
320
|
+
description: "Generate .ph/connect-routes.gen.ts, the route tree hosts/connect/routes/ type-checks against, and fail if a route the package offers imports @powerhousedao/connect",
|
|
321
|
+
args: { ...debugArgs },
|
|
322
|
+
handler: async () => {
|
|
323
|
+
const { syncProjectConnectRoutes } = await import("./sync-connect-routes-BtAsFPXN.mjs");
|
|
324
|
+
const { checkOfferedRoutesImports } = await import("./offered-routes-imports-CQInWI6y.mjs");
|
|
325
|
+
await syncProjectConnectRoutes(process.cwd());
|
|
326
|
+
await checkOfferedRoutesImports(process.cwd());
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
//#endregion
|
|
318
330
|
//#region src/commands/generate-desktop-shell.ts
|
|
319
331
|
const generateDesktopShellCmd = command({
|
|
320
332
|
name: "desktop-shell",
|
|
@@ -340,7 +352,7 @@ const generateDesktopShellCmd = command({
|
|
|
340
352
|
...debugArgs
|
|
341
353
|
},
|
|
342
354
|
handler: async (args) => {
|
|
343
|
-
const { startGenerateDesktopShell } = await import("./generate-desktop-shell-
|
|
355
|
+
const { startGenerateDesktopShell } = await import("./generate-desktop-shell-BXcGvbms.mjs");
|
|
344
356
|
startGenerateDesktopShell(args, process.cwd());
|
|
345
357
|
process.exit(0);
|
|
346
358
|
}
|
|
@@ -457,14 +469,12 @@ const generateMigrationFileCmd = command({
|
|
|
457
469
|
long: "schema-file",
|
|
458
470
|
description: "Path to the output file. Defaults to './schema.ts'"
|
|
459
471
|
}),
|
|
472
|
+
...skipInstallArgs,
|
|
460
473
|
...debugArgs
|
|
461
474
|
},
|
|
462
|
-
handler: async (
|
|
463
|
-
const {
|
|
464
|
-
await
|
|
465
|
-
migrationFile: path$1.join(process.cwd(), migrationFile),
|
|
466
|
-
schemaFile: schemaFile ? path$1.join(process.cwd(), schemaFile) : void 0
|
|
467
|
-
});
|
|
475
|
+
handler: async (args) => {
|
|
476
|
+
const { startGenerateMigrationFile } = await import("./generate-migration-file-yK8uA70U.mjs");
|
|
477
|
+
await startGenerateMigrationFile(args, process.cwd());
|
|
468
478
|
process.exit(0);
|
|
469
479
|
}
|
|
470
480
|
});
|
|
@@ -500,7 +510,7 @@ const generatePieceActionCmd = command({
|
|
|
500
510
|
...debugArgs
|
|
501
511
|
},
|
|
502
512
|
handler: async (args) => {
|
|
503
|
-
const { startGeneratePieceAction } = await import("./generate-piece-action-
|
|
513
|
+
const { startGeneratePieceAction } = await import("./generate-piece-action-uYRdKtQA.mjs");
|
|
504
514
|
await startGeneratePieceAction(args, process.cwd());
|
|
505
515
|
process.exit(0);
|
|
506
516
|
}
|
|
@@ -544,7 +554,7 @@ const generatePieceTriggerCmd = command({
|
|
|
544
554
|
...debugArgs
|
|
545
555
|
},
|
|
546
556
|
handler: async (args) => {
|
|
547
|
-
const { startGeneratePieceTrigger } = await import("./generate-piece-trigger-
|
|
557
|
+
const { startGeneratePieceTrigger } = await import("./generate-piece-trigger-CZaDD-cc.mjs");
|
|
548
558
|
await startGeneratePieceTrigger(args, process.cwd());
|
|
549
559
|
process.exit(0);
|
|
550
560
|
}
|
|
@@ -601,7 +611,7 @@ const generatePieceCmd = command({
|
|
|
601
611
|
...debugArgs
|
|
602
612
|
},
|
|
603
613
|
handler: async (args) => {
|
|
604
|
-
const { startGeneratePiece } = await import("./generate-piece-
|
|
614
|
+
const { startGeneratePiece } = await import("./generate-piece-C6ymlErL.mjs");
|
|
605
615
|
await startGeneratePiece(args, process.cwd());
|
|
606
616
|
process.exit(0);
|
|
607
617
|
}
|
|
@@ -677,7 +687,7 @@ const baseGenerateCmds = {
|
|
|
677
687
|
...debugArgs
|
|
678
688
|
},
|
|
679
689
|
handler: async (args) => {
|
|
680
|
-
const { startGenerateProcessor } = await import("./generate-processor-
|
|
690
|
+
const { startGenerateProcessor } = await import("./generate-processor-BVjOsfjJ.mjs");
|
|
681
691
|
await startGenerateProcessor(args, process.cwd());
|
|
682
692
|
process.exit(0);
|
|
683
693
|
}
|
|
@@ -717,7 +727,7 @@ const baseGenerateCmds = {
|
|
|
717
727
|
...debugArgs
|
|
718
728
|
},
|
|
719
729
|
handler: async (args) => {
|
|
720
|
-
const { startGenerateSubgraph } = await import("./generate-subgraph-
|
|
730
|
+
const { startGenerateSubgraph } = await import("./generate-subgraph-CrHbYK91.mjs");
|
|
721
731
|
await startGenerateSubgraph(args, process.cwd());
|
|
722
732
|
process.exit(0);
|
|
723
733
|
}
|
|
@@ -726,6 +736,7 @@ const baseGenerateCmds = {
|
|
|
726
736
|
"piece-action": generatePieceActionCmd,
|
|
727
737
|
"piece-trigger": generatePieceTriggerCmd,
|
|
728
738
|
"migration-file": generateMigrationFileCmd,
|
|
739
|
+
"connect-routes": generateConnectRoutesCmd,
|
|
729
740
|
"desktop-shell": generateDesktopShellCmd
|
|
730
741
|
};
|
|
731
742
|
/** Exported for tests; `hosts` exists only with uniform runners enabled, so
|
|
@@ -748,16 +759,31 @@ const check = command({
|
|
|
748
759
|
description: "Check a host the way `ph run` would, without starting it: every load, validation, resolution and boot issue, grouped by host file. Exits 1 on any issue. `--env <file>` checks against that file alone.",
|
|
749
760
|
args: hostCheckArgs,
|
|
750
761
|
handler: async (args) => {
|
|
751
|
-
const { runHostCheck } = await import("./check-
|
|
762
|
+
const { runHostCheck } = await import("./check-DDy1o6Vr.mjs");
|
|
752
763
|
const { output, exitCode } = await runHostCheck(args);
|
|
753
764
|
console.log(output);
|
|
754
765
|
process.exitCode = exitCode;
|
|
755
766
|
}
|
|
756
767
|
});
|
|
768
|
+
const exportCmd = command({
|
|
769
|
+
name: "export",
|
|
770
|
+
description: "Print a host as declared, with every member a compound names, as JSON (tokens unresolved). `--out` writes it to a file instead.",
|
|
771
|
+
args: hostExportArgs,
|
|
772
|
+
handler: async (args) => {
|
|
773
|
+
const { runHostExport } = await import("./export-CrIz2spe.mjs");
|
|
774
|
+
const { stdout, stderr, exitCode } = await runHostExport(args);
|
|
775
|
+
if (stdout !== void 0) process.stdout.write(stdout);
|
|
776
|
+
if (stderr !== void 0) process.stderr.write(stderr);
|
|
777
|
+
process.exitCode = exitCode;
|
|
778
|
+
}
|
|
779
|
+
});
|
|
757
780
|
const host = subcommands({
|
|
758
781
|
name: "host",
|
|
759
|
-
description: "Inspect the project's hosts/ (FEATURE_UNIFORM_RUNNERS_ENABLED): `check`.",
|
|
760
|
-
cmds: {
|
|
782
|
+
description: "Inspect the project's hosts/ (FEATURE_UNIFORM_RUNNERS_ENABLED): `check`, `export`.",
|
|
783
|
+
cmds: {
|
|
784
|
+
check,
|
|
785
|
+
export: exportCmd
|
|
786
|
+
}
|
|
761
787
|
});
|
|
762
788
|
//#endregion
|
|
763
789
|
//#region src/commands/init.ts
|
|
@@ -767,7 +793,7 @@ const init = command({
|
|
|
767
793
|
args: initArgs,
|
|
768
794
|
handler: async (args) => {
|
|
769
795
|
if (args.debug) console.log({ args });
|
|
770
|
-
const { startInit } = await import("./init-
|
|
796
|
+
const { startInit } = await import("./init-Ch1rCksS.mjs");
|
|
771
797
|
await startInit(args);
|
|
772
798
|
process.exit(0);
|
|
773
799
|
}
|
|
@@ -880,7 +906,7 @@ Resolution order for the registry URL:
|
|
|
880
906
|
if (scopeRegistryArgs.length > 0) console.log(`Installing dependencies 📦 (routing ${Array.from(scopes).join(", ")} → ${registryUrl})...`);
|
|
881
907
|
else console.log("Installing dependencies 📦...");
|
|
882
908
|
console.log(`> ${installCommand}`);
|
|
883
|
-
execSync
|
|
909
|
+
execSync(installCommand, {
|
|
884
910
|
stdio: "inherit",
|
|
885
911
|
cwd: projectPath
|
|
886
912
|
});
|
|
@@ -899,6 +925,10 @@ Resolution order for the registry URL:
|
|
|
899
925
|
console.error("❌ Failed to update config file");
|
|
900
926
|
throw error;
|
|
901
927
|
}
|
|
928
|
+
if (args.local) {
|
|
929
|
+
const { syncPackageSkills } = await import("@powerhousedao/codegen/file-builders");
|
|
930
|
+
for (const { path, action } of await syncPackageSkills(projectPath)) console.log(` ${path}: ${action}`);
|
|
931
|
+
}
|
|
902
932
|
if (!args.local) await warnAboutExternalDependencies(registryUrl, dependenciesWithVersions);
|
|
903
933
|
process.exit(0);
|
|
904
934
|
}
|
|
@@ -1053,6 +1083,36 @@ The logout command removes an existing session created with 'ph login'`,
|
|
|
1053
1083
|
}
|
|
1054
1084
|
});
|
|
1055
1085
|
//#endregion
|
|
1086
|
+
//#region src/commands/mcp.ts
|
|
1087
|
+
const mcp = command({
|
|
1088
|
+
name: "mcp",
|
|
1089
|
+
args: mcpArgs,
|
|
1090
|
+
description: `
|
|
1091
|
+
Serve the project's reactor-mcp tools to a coding agent over stdio.
|
|
1092
|
+
|
|
1093
|
+
Use it as the MCP server command in .mcp.json, .cursor/mcp.json and
|
|
1094
|
+
.gemini/settings.json. Tools are listed at once, without waiting for Vetra.
|
|
1095
|
+
The first tool call connects to the project's running Vetra (found through
|
|
1096
|
+
.ph/vetra-runtime.json), or starts \`ph vetra --strictPort --watch\` in the
|
|
1097
|
+
background and waits for it to be ready, reporting how the start goes as MCP
|
|
1098
|
+
progress notifications when the client sent a progressToken, else on stderr.
|
|
1099
|
+
Startup failures come back as tool errors carrying Vetra's output, which is
|
|
1100
|
+
also written to .ph/vetra.log.
|
|
1101
|
+
|
|
1102
|
+
Beside reactor-mcp's tools it serves restartVetra, which stops the project's
|
|
1103
|
+
Vetra, starts it again and returns its URLs. When Vetra restarts some other
|
|
1104
|
+
way (\`ph vetra --restart\`), the next tool call connects to the new one.
|
|
1105
|
+
`,
|
|
1106
|
+
handler: async (args) => {
|
|
1107
|
+
if (args.debug) console.error(args);
|
|
1108
|
+
const { startMcpLauncher } = await import("./mcp-CZ02pj76.mjs");
|
|
1109
|
+
await startMcpLauncher({
|
|
1110
|
+
projectDir: args.projectDir,
|
|
1111
|
+
startTimeoutSeconds: args.startTimeout
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
//#endregion
|
|
1056
1116
|
//#region src/commands/migrate.ts
|
|
1057
1117
|
const migrate = command({
|
|
1058
1118
|
name: "migrate",
|
|
@@ -1060,7 +1120,7 @@ const migrate = command({
|
|
|
1060
1120
|
description: "Run migrations",
|
|
1061
1121
|
handler: async (args) => {
|
|
1062
1122
|
if (args.debug) console.log(args);
|
|
1063
|
-
const { startMigrate } = await import("./migrate-
|
|
1123
|
+
const { startMigrate } = await import("./migrate-CIJaE3iZ.mjs");
|
|
1064
1124
|
await startMigrate(args);
|
|
1065
1125
|
process.exit(0);
|
|
1066
1126
|
}
|
|
@@ -1242,14 +1302,14 @@ const runHost = command({
|
|
|
1242
1302
|
},
|
|
1243
1303
|
handler: async (args) => {
|
|
1244
1304
|
if (args.explain !== void 0) {
|
|
1245
|
-
const { explainHost } = await import("./explain-
|
|
1305
|
+
const { explainHost } = await import("./explain-C9zER5xn.mjs");
|
|
1246
1306
|
await explainHost({
|
|
1247
1307
|
host: args.host,
|
|
1248
1308
|
topic: args.explain
|
|
1249
1309
|
});
|
|
1250
1310
|
return;
|
|
1251
1311
|
}
|
|
1252
|
-
const { startRun } = await import("./start-run-
|
|
1312
|
+
const { startRun } = await import("./start-run-BAQDM5Bu.mjs");
|
|
1253
1313
|
await startRun({
|
|
1254
1314
|
host: args.host,
|
|
1255
1315
|
verb: args.verb,
|
|
@@ -1276,8 +1336,7 @@ This command:
|
|
|
1276
1336
|
args: switchboardArgs,
|
|
1277
1337
|
handler: async (args) => {
|
|
1278
1338
|
if (args.debug) console.log(args);
|
|
1279
|
-
const {
|
|
1280
|
-
if (basePath) process.env.BASE_PATH = basePath;
|
|
1339
|
+
const { dbPath, migrate, migrateStatus, reset, yes } = args;
|
|
1281
1340
|
if (reset) {
|
|
1282
1341
|
const { resetSwitchboardDatabase } = await import("./switchboard-reset-MtTB_GAI.mjs");
|
|
1283
1342
|
await resetSwitchboardDatabase({
|
|
@@ -1294,7 +1353,7 @@ This command:
|
|
|
1294
1353
|
});
|
|
1295
1354
|
process.exit(0);
|
|
1296
1355
|
}
|
|
1297
|
-
const { startSwitchboard } = await import("./switchboard-
|
|
1356
|
+
const { startSwitchboard } = await import("./switchboard-DohZ1tbp.mjs");
|
|
1298
1357
|
const { defaultDriveUrl, renown } = await startSwitchboard(args);
|
|
1299
1358
|
console.log(" ➜ Switchboard:", defaultDriveUrl);
|
|
1300
1359
|
if (renown) console.log(" ➜ Identity:", renown.did);
|
|
@@ -1332,7 +1391,7 @@ This command:
|
|
|
1332
1391
|
try {
|
|
1333
1392
|
console.log("Uninstalling dependencies 📦 ...");
|
|
1334
1393
|
const uninstallCommand = await getPowerhouseProjectUninstallCommand(packageManager, args.dependencies);
|
|
1335
|
-
execSync(uninstallCommand, {
|
|
1394
|
+
execSync$1(uninstallCommand, {
|
|
1336
1395
|
stdio: "inherit",
|
|
1337
1396
|
cwd: projectPath
|
|
1338
1397
|
});
|
|
@@ -1350,6 +1409,8 @@ This command:
|
|
|
1350
1409
|
console.error("❌ Failed to update config file");
|
|
1351
1410
|
throw error;
|
|
1352
1411
|
}
|
|
1412
|
+
const { syncPackageSkills } = await import("@powerhousedao/codegen/file-builders");
|
|
1413
|
+
for (const { path, action } of await syncPackageSkills(projectPath)) console.log(` ${path}: ${action}`);
|
|
1353
1414
|
try {
|
|
1354
1415
|
console.log("⚙️ Updating styles.css file...");
|
|
1355
1416
|
removeStylesImports(dependenciesWithVersions, projectPath);
|
|
@@ -1477,11 +1538,31 @@ connect.drives.defaultDrives in powerhouse.config.json - de-duplicated by
|
|
|
1477
1538
|
URL, so configuring project drives does not cost you the Vetra drive.
|
|
1478
1539
|
An explicit --default-drives-url is appended to that list (de-duplicated);
|
|
1479
1540
|
it never replaces the Vetra drive.
|
|
1541
|
+
|
|
1542
|
+
Every drive on the local Switchboard:
|
|
1543
|
+
Studio has no reactor of its own: it reads and writes on the local
|
|
1544
|
+
Switchboard (connect.instance.reactorClient "remote"), so it lists every
|
|
1545
|
+
drive there, such as one an agent adds through MCP, and a drive created in
|
|
1546
|
+
Studio lands there too. Not with --remote-drive, or when the project sets
|
|
1547
|
+
connect.instance.multiReactor or reactorClient itself.
|
|
1548
|
+
|
|
1549
|
+
Preview drive app:
|
|
1550
|
+
Set vetra.previewDrive.app in powerhouse.config.json to the id of a drive
|
|
1551
|
+
app, and ph vetra --watch opens the Vetra Preview drive in that app: it sets
|
|
1552
|
+
the drive's app when it creates the drive and each time it starts. Without
|
|
1553
|
+
the field the drive keeps the app it has.
|
|
1554
|
+
|
|
1555
|
+
One Vetra per project:
|
|
1556
|
+
A running Vetra is recorded in .ph/vetra-runtime.json (its pid and the
|
|
1557
|
+
Connect, Switchboard and MCP URLs); a second \`ph vetra\` prints those and
|
|
1558
|
+
exits. --restart stops the recorded Vetra first, then starts this one; the
|
|
1559
|
+
\`ph mcp\` launcher reconnects to it on its next tool call. Studio restarts
|
|
1560
|
+
by itself when powerhouse.config.json changes.
|
|
1480
1561
|
`,
|
|
1481
1562
|
args: vetraArgs,
|
|
1482
1563
|
handler: async (args) => {
|
|
1483
1564
|
if (args.debug) console.log(args);
|
|
1484
|
-
const { startVetra } = await import("./vetra-
|
|
1565
|
+
const { startVetra } = await import("./vetra-C9fsChId.mjs");
|
|
1485
1566
|
await startVetra(args);
|
|
1486
1567
|
}
|
|
1487
1568
|
}),
|
|
@@ -1493,6 +1574,7 @@ it never replaces the Vetra drive.
|
|
|
1493
1574
|
"registry-login": registryLogin,
|
|
1494
1575
|
inspect,
|
|
1495
1576
|
list,
|
|
1577
|
+
mcp,
|
|
1496
1578
|
migrate,
|
|
1497
1579
|
switchboard,
|
|
1498
1580
|
login,
|
|
@@ -1513,5 +1595,5 @@ const phCliCommands = buildPhCliCommands(isUniformRunnersEnabled());
|
|
|
1513
1595
|
//#endregion
|
|
1514
1596
|
export { phCliCommands as n, buildPhCliCommands as t };
|
|
1515
1597
|
|
|
1516
|
-
//# sourceMappingURL=ph-cli-commands-
|
|
1517
|
-
//# debugId=
|
|
1598
|
+
//# sourceMappingURL=ph-cli-commands-B37zr8uN.mjs.map
|
|
1599
|
+
//# debugId=a5a3097b-63a9-5f4d-be07-85243bf8e18b
|