@powerhousedao/ph-cli 6.4.0-next.2 → 6.4.0-next.5
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/README.md +6 -5
- package/dist/auth-5bqHASGL.mjs +4 -0
- package/dist/auth-DYknkWfW.mjs +23 -0
- package/dist/auth-DYknkWfW.mjs.map +1 -0
- package/dist/{build-C7RBpPwa.mjs → build-CBKlv5E3.mjs} +6 -6
- package/dist/{build-C7RBpPwa.mjs.map → build-CBKlv5E3.mjs.map} +1 -1
- package/dist/build-Dr1lnv4h.mjs +4 -0
- package/dist/{check-1Hfe0lVO.mjs → check-CW81vbe9.mjs} +4 -4
- package/dist/{check-1Hfe0lVO.mjs.map → check-CW81vbe9.mjs.map} +1 -1
- package/dist/{check-MBdw9Lbm.mjs → check-Cx_AeBQe.mjs} +7 -7
- package/dist/check-Cx_AeBQe.mjs.map +1 -0
- package/dist/{check-ClxYRer4.mjs → check-DhFd9tO8.mjs} +3 -3
- package/dist/{cli-connect-override-DsuuectH.mjs → cli-connect-override-DKxY3lCi.mjs} +4 -4
- package/dist/{cli-connect-override-DsuuectH.mjs.map → cli-connect-override-DKxY3lCi.mjs.map} +1 -1
- package/dist/cli.mjs +9 -8
- package/dist/cli.mjs.map +1 -1
- package/dist/{compound-Q9sZSEZF-zZWzQ7VC.mjs → compound-g6x_KkWp-Bs7olmlI.mjs} +464 -360
- package/dist/compound-g6x_KkWp-Bs7olmlI.mjs.map +1 -0
- package/dist/{connect-build-DAnGPSF5.mjs → connect-build-DpGUrtct.mjs} +5 -5
- package/dist/{connect-build-DAnGPSF5.mjs.map → connect-build-DpGUrtct.mjs.map} +1 -1
- package/dist/{connect-config-C0QZ7zTf.mjs → connect-config-BpzwJln3.mjs} +4 -4
- package/dist/{connect-config-C0QZ7zTf.mjs.map → connect-config-BpzwJln3.mjs.map} +1 -1
- package/dist/{connect-preview-BvxXGo_W.mjs → connect-preview-B_E4SIV6.mjs} +21 -4
- package/dist/connect-preview-B_E4SIV6.mjs.map +1 -0
- package/dist/connect-studio-BPZOcwUM.mjs +214 -0
- package/dist/connect-studio-BPZOcwUM.mjs.map +1 -0
- package/dist/credentials-CmtYywgk.mjs +132 -0
- package/dist/credentials-CmtYywgk.mjs.map +1 -0
- package/dist/definitions-worker.mjs +4 -4
- package/dist/definitions-worker.mjs.map +1 -1
- package/dist/dev-host-CM-Jg2kY.mjs +19 -0
- package/dist/dev-host-CM-Jg2kY.mjs.map +1 -0
- package/dist/{dist-CRR5Anp2.mjs → dist-DPj_FB8H.mjs} +5 -5
- package/dist/dist-DPj_FB8H.mjs.map +1 -0
- package/dist/{explain-BfOC7Ngv.mjs → explain-DQ5ymlco.mjs} +5 -5
- package/dist/{explain-BfOC7Ngv.mjs.map → explain-DQ5ymlco.mjs.map} +1 -1
- package/dist/{export-CdTqYviH.mjs → export-CzeF8pob.mjs} +4 -4
- package/dist/{export-CdTqYviH.mjs.map → export-CzeF8pob.mjs.map} +1 -1
- package/dist/{generate-all-HujZHqCG.mjs → generate-all-B9MwWXlq.mjs} +6 -21
- package/dist/generate-all-B9MwWXlq.mjs.map +1 -0
- package/dist/{generate-app-hm6CJ_4O.mjs → generate-app-C7n0j8Ak.mjs} +5 -18
- package/dist/generate-app-C7n0j8Ak.mjs.map +1 -0
- package/dist/{generate-document-model-BiD6ovXc.mjs → generate-document-model-D3LKY1D7.mjs} +11 -35
- package/dist/generate-document-model-D3LKY1D7.mjs.map +1 -0
- package/dist/{generate-editor-DBj_Pxwa.mjs → generate-editor-DKuRUeIt.mjs} +5 -18
- package/dist/generate-editor-DKuRUeIt.mjs.map +1 -0
- package/dist/{generate-processor-BVjOsfjJ.mjs → generate-processor-CwJvJDpd.mjs} +5 -18
- package/dist/generate-processor-CwJvJDpd.mjs.map +1 -0
- package/dist/{generate-subgraph-DJZCr0Tk.mjs → generate-subgraph-Q1VLh3SC.mjs} +13 -39
- package/dist/generate-subgraph-Q1VLh3SC.mjs.map +1 -0
- package/dist/{get-version-DAYhm6MX.mjs → get-version-CTP__ORu.mjs} +4 -4
- package/dist/{get-version-DAYhm6MX.mjs.map → get-version-CTP__ORu.mjs.map} +1 -1
- package/dist/identity-DXZFeQfC.mjs +137 -0
- package/dist/identity-DXZFeQfC.mjs.map +1 -0
- package/dist/{index-Bs1PfL3W.d.mts → index-aosqo7aM.d.mts} +5 -4
- package/dist/index-aosqo7aM.d.mts.map +1 -0
- package/dist/{inspect-CulIpVsF.mjs → inspect-BgKI8Fhd.mjs} +6 -6
- package/dist/{inspect-CulIpVsF.mjs.map → inspect-BgKI8Fhd.mjs.map} +1 -1
- package/dist/{keyframes-bFo9iDhT.mjs → keyframes-BkeORfEu.mjs} +4 -4
- package/dist/{keyframes-bFo9iDhT.mjs.map → keyframes-BkeORfEu.mjs.map} +1 -1
- package/dist/{mcp-rtMGg307.mjs → mcp-gcG7SW9L.mjs} +152 -10
- package/dist/mcp-gcG7SW9L.mjs.map +1 -0
- package/dist/{migrate-CWCJP19Q.mjs → migrate-BaWZhorc.mjs} +4 -4
- package/dist/{migrate-CWCJP19Q.mjs.map → migrate-BaWZhorc.mjs.map} +1 -1
- package/dist/{migrate-document-models-DTxM7D7p.mjs → migrate-document-models-DYmkJzq3.mjs} +5 -6
- package/dist/migrate-document-models-DYmkJzq3.mjs.map +1 -0
- package/dist/{migrate-subgraphs-_yRnF7xt.mjs → migrate-subgraphs-BUgTeHcm.mjs} +6 -7
- package/dist/migrate-subgraphs-BUgTeHcm.mjs.map +1 -0
- package/dist/migrate-subgraphs-ChhXynqd.mjs +4 -0
- package/dist/{ph-cli-commands-FLZClR4x.mjs → ph-cli-commands-B5VkGW99.mjs} +179 -190
- package/dist/ph-cli-commands-B5VkGW99.mjs.map +1 -0
- package/dist/ph-cli-commands-CGXSo1wx.mjs +4 -0
- package/dist/{registry-auth-Bm5AR-fB.mjs → registry-auth-C8D5cno2.mjs} +4 -4
- package/dist/{registry-auth-Bm5AR-fB.mjs.map → registry-auth-C8D5cno2.mjs.map} +1 -1
- package/dist/render-BQE20Cnd.mjs +4 -0
- package/dist/{render-SVfj3m8A.mjs → render-CQdi685k.mjs} +6 -6
- package/dist/render-CQdi685k.mjs.map +1 -0
- package/dist/{run-LRGy7zGo.mjs → run-C6Vha5VN.mjs} +3 -3
- package/dist/{run--de_-WAz.mjs → run-sVzTTEUx.mjs} +5 -36
- package/dist/run-sVzTTEUx.mjs.map +1 -0
- package/dist/{run-sugar-DUiDFl_T.mjs → run-sugar-BuxOaRzE.mjs} +16 -8
- package/dist/run-sugar-BuxOaRzE.mjs.map +1 -0
- package/dist/{run-sugar-YDxw0iV9.mjs → run-sugar-Dz-rpeMO.mjs} +3 -3
- package/dist/runners/connect.d.mts +20 -3
- package/dist/runners/connect.d.mts.map +1 -1
- package/dist/runners/connect.mjs +37 -15
- package/dist/runners/connect.mjs.map +1 -1
- package/dist/runners/switchboard.d.mts +1 -1
- package/dist/runners/switchboard.mjs +3 -3
- package/dist/scripts/generate-commands-docs.ts +12 -0
- package/dist/{subgraphs-7OYWwP-C.mjs → subgraphs-Bm9NHTCn.mjs} +5 -38
- package/dist/subgraphs-Bm9NHTCn.mjs.map +1 -0
- package/dist/{sugar-checks-BFu3sfFJ.mjs → sugar-checks-DL-J3l2y.mjs} +16 -15
- package/dist/sugar-checks-DL-J3l2y.mjs.map +1 -0
- package/dist/{verify-Dkb6K1fc.mjs → verify-BLn76w09.mjs} +4 -4
- package/dist/{verify-Dkb6K1fc.mjs.map → verify-BLn76w09.mjs.map} +1 -1
- package/dist/{vetra-gateway-BMzq0mqX.mjs → vetra-gateway-D30pZgha.mjs} +5 -5
- package/dist/{vetra-gateway-BMzq0mqX.mjs.map → vetra-gateway-D30pZgha.mjs.map} +1 -1
- package/dist/vetra-gateway-DE5Hc0Fp.mjs +4 -0
- package/dist/vetra-host-0rSW35_r.mjs +230 -0
- package/dist/vetra-host-0rSW35_r.mjs.map +1 -0
- package/dist/{vetra-launcher-Dq0tWyNW.mjs → vetra-launcher-6NKfi6Au.mjs} +56 -13
- package/dist/vetra-launcher-6NKfi6Au.mjs.map +1 -0
- package/dist/vetra-launcher-XMk_Hv0c.mjs +4 -0
- package/dist/{vetra-instance-CLUzbtbh.mjs → vetra-runtime-Bk6CW-BE.mjs} +6 -24
- package/dist/vetra-runtime-Bk6CW-BE.mjs.map +1 -0
- package/dist/warn-subgraph-type-conflicts-BZ4NwLx5.mjs +131 -0
- package/dist/warn-subgraph-type-conflicts-BZ4NwLx5.mjs.map +1 -0
- package/package.json +17 -16
- package/dist/auth-BFUq7CvE.mjs +0 -18
- package/dist/auth-BFUq7CvE.mjs.map +0 -1
- package/dist/auth-CNhbN5UM.mjs +0 -4
- package/dist/build-BUpe1j4m.mjs +0 -4
- package/dist/check-MBdw9Lbm.mjs.map +0 -1
- package/dist/compound-Q9sZSEZF-zZWzQ7VC.mjs.map +0 -1
- package/dist/connect-preview-BvxXGo_W.mjs.map +0 -1
- package/dist/connect-studio-BUth3UYP.mjs +0 -106
- package/dist/connect-studio-BUth3UYP.mjs.map +0 -1
- package/dist/dist-CRR5Anp2.mjs.map +0 -1
- package/dist/generate-all-HujZHqCG.mjs.map +0 -1
- package/dist/generate-app-hm6CJ_4O.mjs.map +0 -1
- package/dist/generate-document-model-BiD6ovXc.mjs.map +0 -1
- package/dist/generate-editor-DBj_Pxwa.mjs.map +0 -1
- package/dist/generate-processor-BVjOsfjJ.mjs.map +0 -1
- package/dist/generate-subgraph-DJZCr0Tk.mjs.map +0 -1
- package/dist/index-Bs1PfL3W.d.mts.map +0 -1
- package/dist/mcp-rtMGg307.mjs.map +0 -1
- package/dist/migrate-document-models-DTxM7D7p.mjs.map +0 -1
- package/dist/migrate-subgraphs-DcJjLMFd.mjs +0 -4
- package/dist/migrate-subgraphs-_yRnF7xt.mjs.map +0 -1
- package/dist/ph-cli-commands-CRwA1aVX.mjs +0 -4
- package/dist/ph-cli-commands-FLZClR4x.mjs.map +0 -1
- package/dist/render-3M3DwFzO.mjs +0 -4
- package/dist/render-SVfj3m8A.mjs.map +0 -1
- package/dist/run--de_-WAz.mjs.map +0 -1
- package/dist/run-sugar-DUiDFl_T.mjs.map +0 -1
- package/dist/subgraphs-7OYWwP-C.mjs.map +0 -1
- package/dist/sugar-checks-BFu3sfFJ.mjs.map +0 -1
- package/dist/vetra-gateway-BP6Catg4.mjs +0 -4
- package/dist/vetra-host-C37IGwBM.mjs +0 -94
- package/dist/vetra-host-C37IGwBM.mjs.map +0 -1
- package/dist/vetra-instance-CLUzbtbh.mjs.map +0 -1
- package/dist/vetra-launcher-CJ01qmS1.mjs +0 -4
- package/dist/vetra-launcher-Dq0tWyNW.mjs.map +0 -1
- package/dist/warn-subgraph-type-conflicts-BOHBmThq.mjs +0 -19
- package/dist/warn-subgraph-type-conflicts-BOHBmThq.mjs.map +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
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]="
|
|
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]="09efd022-467a-5dd0-83db-56865e09bef3")}catch(e){}}();
|
|
3
3
|
import { n as skipInstallArgs } from "./install-added-dependencies-DnZFR3aE.mjs";
|
|
4
|
-
import { n as
|
|
4
|
+
import { n as isDevHost } from "./dev-host-CM-Jg2kY.mjs";
|
|
5
|
+
import { n as VETRA_STUDIO_HOST, r as VETRA_STUDIO_PACKAGE } from "./vetra-gateway-D30pZgha.mjs";
|
|
5
6
|
import { boolean, command, extendType, flag, multioption, number, oneOf, option, optional, positional, restPositionals, string, subcommands } from "cmd-ts";
|
|
6
|
-
import { AGENTS, accessTokenArgs, buildArgs, connectConfigArgs, debugArgs, hostCheckArgs, hostExportArgs, initArgs, inspectArgs, installArgs, keyframesArgs, listArgs, loginArgs, mcpArgs, migrateArgs, modelCheckArgs, modelInspectArgs, publishArgs, registryLoginArgs, uninstallArgs, unpublishArgs } from "@powerhousedao/shared/clis/args";
|
|
7
|
+
import { AGENTS, accessTokenArgs, buildArgs, connectConfigArgs, credentialsListArgs, credentialsWithdrawArgs, debugArgs, hostCheckArgs, hostExportArgs, identityPasswordArgs, initArgs, inspectArgs, installArgs, keyframesArgs, listArgs, loginArgs, logoutArgs, mcpArgs, migrateArgs, modelCheckArgs, modelInspectArgs, publishArgs, registryLoginArgs, uninstallArgs, unpublishArgs, whoamiArgs } from "@powerhousedao/shared/clis/args";
|
|
7
8
|
import { DEFAULT_EXPIRY_SECONDS } from "@powerhousedao/shared/clis/constants";
|
|
8
9
|
import fs from "node:fs";
|
|
9
10
|
import path from "node:path";
|
|
@@ -25,8 +26,8 @@ This command:
|
|
|
25
26
|
|
|
26
27
|
Prerequisites:
|
|
27
28
|
You must have a cryptographic identity. Run 'ph login' first to:
|
|
28
|
-
- Generate a keypair (stored in
|
|
29
|
-
- Optionally link your Ethereum address (stored in
|
|
29
|
+
- Generate a keypair (stored in ~/.ph/identities/renown/.keypair.json)
|
|
30
|
+
- Optionally link your Ethereum address (stored in ~/.ph/identities/renown/.renown.json)
|
|
30
31
|
|
|
31
32
|
Token Details:
|
|
32
33
|
The generated token is a JWT (JSON Web Token) containing:
|
|
@@ -65,7 +66,7 @@ Notes:
|
|
|
65
66
|
handler: async (args) => {
|
|
66
67
|
if (args.debug) console.log(args);
|
|
67
68
|
const { generateAccessToken, parseExpiry, formatExpiry } = await import("@renown/sdk/node");
|
|
68
|
-
const { getRenown } = await import("./auth-
|
|
69
|
+
const { getRenown } = await import("./auth-5bqHASGL.mjs");
|
|
69
70
|
const renown = await getRenown();
|
|
70
71
|
let expiresIn = DEFAULT_EXPIRY_SECONDS;
|
|
71
72
|
if (args.expiry) expiresIn = parseExpiry(args.expiry);
|
|
@@ -104,7 +105,7 @@ can load and still fail at runtime, so don't publish it.`,
|
|
|
104
105
|
handler: async (args) => {
|
|
105
106
|
if (args.debug) console.log(args);
|
|
106
107
|
try {
|
|
107
|
-
const { runBuild } = await import("./build-
|
|
108
|
+
const { runBuild } = await import("./build-Dr1lnv4h.mjs");
|
|
108
109
|
await runBuild(args, {
|
|
109
110
|
checkDefinitions: true,
|
|
110
111
|
ownsProcess: true
|
|
@@ -137,7 +138,7 @@ Writes go to:
|
|
|
137
138
|
`,
|
|
138
139
|
args: connectConfigArgs,
|
|
139
140
|
handler: async (args) => {
|
|
140
|
-
const { runConnectConfig } = await import("./connect-config-
|
|
141
|
+
const { runConnectConfig } = await import("./connect-config-BpzwJln3.mjs");
|
|
141
142
|
await runConnectConfig(args);
|
|
142
143
|
}
|
|
143
144
|
});
|
|
@@ -147,18 +148,50 @@ const connect = subcommands({
|
|
|
147
148
|
cmds: { config }
|
|
148
149
|
});
|
|
149
150
|
//#endregion
|
|
151
|
+
//#region src/commands/credentials.ts
|
|
152
|
+
const credentialsList = command({
|
|
153
|
+
name: "list",
|
|
154
|
+
description: `
|
|
155
|
+
List the credentials this store's host accepts by its own record (\`.ph/credentials\` in the
|
|
156
|
+
data folder): who, the session's label, who wrote it, its expiry and whether it verifies.
|
|
157
|
+
`,
|
|
158
|
+
args: credentialsListArgs,
|
|
159
|
+
handler: async (args) => {
|
|
160
|
+
if (args.debug) console.log(args);
|
|
161
|
+
const { runCredentialsList } = await import("./credentials-CmtYywgk.mjs");
|
|
162
|
+
process.exitCode = await runCredentialsList(args);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const credentialsWithdraw = command({
|
|
166
|
+
name: "withdraw",
|
|
167
|
+
description: `
|
|
168
|
+
Withdraw credential records by id prefix, address or label. A running host refuses a withdrawn
|
|
169
|
+
credential from its next request, and the withdrawal holds after a restart.
|
|
170
|
+
`,
|
|
171
|
+
args: credentialsWithdrawArgs,
|
|
172
|
+
handler: async (args) => {
|
|
173
|
+
if (args.debug) console.log(args);
|
|
174
|
+
const { runCredentialsWithdraw } = await import("./credentials-CmtYywgk.mjs");
|
|
175
|
+
process.exitCode = runCredentialsWithdraw(args);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
const credentials = subcommands({
|
|
179
|
+
name: "credentials",
|
|
180
|
+
description: "The credentials this store's host accepts: `list`, `withdraw`.",
|
|
181
|
+
cmds: {
|
|
182
|
+
list: credentialsList,
|
|
183
|
+
withdraw: credentialsWithdraw
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
//#endregion
|
|
150
187
|
//#region src/commands/generate-all.ts
|
|
151
188
|
const generateAllCmd = command({
|
|
152
189
|
name: "all",
|
|
153
190
|
description: "Re-generate all modules in the current project",
|
|
154
|
-
args: {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}) },
|
|
159
|
-
handler: async (args) => {
|
|
160
|
-
const { startGenerateAll } = await import("./generate-all-HujZHqCG.mjs");
|
|
161
|
-
await startGenerateAll(args, process.cwd());
|
|
191
|
+
args: {},
|
|
192
|
+
handler: async () => {
|
|
193
|
+
const { startGenerateAll } = await import("./generate-all-B9MwWXlq.mjs");
|
|
194
|
+
await startGenerateAll(process.cwd());
|
|
162
195
|
process.exit(0);
|
|
163
196
|
}
|
|
164
197
|
});
|
|
@@ -180,15 +213,6 @@ extendType(ExistingPath, {
|
|
|
180
213
|
return Promise.resolve(fs.statSync(resolved).isDirectory() ? resolved : path.dirname(resolved));
|
|
181
214
|
}
|
|
182
215
|
});
|
|
183
|
-
/** An existing file. */
|
|
184
|
-
const File = extendType(ExistingPath, {
|
|
185
|
-
displayName: "file",
|
|
186
|
-
description: "A file in the file system",
|
|
187
|
-
from(resolved) {
|
|
188
|
-
if (!fs.statSync(resolved).isFile()) return Promise.reject(/* @__PURE__ */ new Error("Provided path is not a file"));
|
|
189
|
-
return Promise.resolve(resolved);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
216
|
/** A module's directory name or path, resolved by the command against the project. */
|
|
193
217
|
const ModuleDir = extendType(string, {
|
|
194
218
|
displayName: "dir",
|
|
@@ -222,12 +246,6 @@ const generateAppCmd = command({
|
|
|
222
246
|
short: "t",
|
|
223
247
|
description: "The document types allowed by the new app (repeatable or comma-separated)"
|
|
224
248
|
}),
|
|
225
|
-
document: option({
|
|
226
|
-
type: optional(File),
|
|
227
|
-
long: "document",
|
|
228
|
-
short: "d",
|
|
229
|
-
description: "Path to a powerhouse/app spec file (.phd or .json) to drive codegen"
|
|
230
|
-
}),
|
|
231
249
|
dir: option({
|
|
232
250
|
type: optional(ModuleDir),
|
|
233
251
|
long: "dir",
|
|
@@ -245,15 +263,10 @@ const generateAppCmd = command({
|
|
|
245
263
|
short: "a",
|
|
246
264
|
description: "Re-generate all existing apps in the current project"
|
|
247
265
|
}),
|
|
248
|
-
extract: flag({
|
|
249
|
-
long: "extract",
|
|
250
|
-
short: "x",
|
|
251
|
-
description: "Write a powerhouse/app spec for each existing drive app into specs/apps/"
|
|
252
|
-
}),
|
|
253
266
|
...debugArgs
|
|
254
267
|
},
|
|
255
268
|
handler: async (args) => {
|
|
256
|
-
const { startGenerateApp } = await import("./generate-app-
|
|
269
|
+
const { startGenerateApp } = await import("./generate-app-C7n0j8Ak.mjs");
|
|
257
270
|
await startGenerateApp(args, process.cwd());
|
|
258
271
|
process.exit(0);
|
|
259
272
|
}
|
|
@@ -309,12 +322,6 @@ const generateDocumentModelCmd = command({
|
|
|
309
322
|
aliases: ["doc"],
|
|
310
323
|
description: "Generate a document model",
|
|
311
324
|
args: {
|
|
312
|
-
document: option({
|
|
313
|
-
type: optional(File),
|
|
314
|
-
long: "document",
|
|
315
|
-
short: "d",
|
|
316
|
-
description: "Path to a document model spec (.phd or .json) to generate from"
|
|
317
|
-
}),
|
|
318
325
|
dir: option({
|
|
319
326
|
type: optional(ModuleDir),
|
|
320
327
|
long: "dir",
|
|
@@ -325,27 +332,16 @@ const generateDocumentModelCmd = command({
|
|
|
325
332
|
short: "a",
|
|
326
333
|
description: "Re-generate all existing document models in the current project"
|
|
327
334
|
}),
|
|
328
|
-
extract: flag({
|
|
329
|
-
long: "extract",
|
|
330
|
-
short: "x",
|
|
331
|
-
description: "Write a powerhouse/document-model spec for each existing document model into specs/document-models/"
|
|
332
|
-
}),
|
|
333
|
-
/** @experimental Code-first scaffolding is being tested in production. */
|
|
334
335
|
name: option({
|
|
335
336
|
type: optional(string),
|
|
336
337
|
long: "name",
|
|
337
338
|
short: "n",
|
|
338
|
-
description: "
|
|
339
|
-
}),
|
|
340
|
-
/** @experimental Chooses code-first authoring for the model --name creates. */
|
|
341
|
-
codeFirst: flag({
|
|
342
|
-
long: "code-first",
|
|
343
|
-
description: "Experimental. With --name, create the model code-first. Existing models of both styles are discovered without it; ph migrate --document-model converts a schema-first one"
|
|
339
|
+
description: "Create a document model with this name, with its editor"
|
|
344
340
|
}),
|
|
345
341
|
...debugArgs
|
|
346
342
|
},
|
|
347
343
|
handler: async (args) => {
|
|
348
|
-
const { startGenerateDocumentModel } = await import("./generate-document-model-
|
|
344
|
+
const { startGenerateDocumentModel } = await import("./generate-document-model-D3LKY1D7.mjs");
|
|
349
345
|
await startGenerateDocumentModel(args, process.cwd());
|
|
350
346
|
process.exit(0);
|
|
351
347
|
}
|
|
@@ -368,12 +364,6 @@ const generateEditorCmd = command({
|
|
|
368
364
|
short: "t",
|
|
369
365
|
description: "The document type for the new editor"
|
|
370
366
|
}),
|
|
371
|
-
document: option({
|
|
372
|
-
type: optional(File),
|
|
373
|
-
long: "document",
|
|
374
|
-
short: "d",
|
|
375
|
-
description: "Path to a powerhouse/document-editor spec file (.phd or .json) to drive codegen"
|
|
376
|
-
}),
|
|
377
367
|
dir: option({
|
|
378
368
|
type: optional(ModuleDir),
|
|
379
369
|
long: "dir",
|
|
@@ -384,15 +374,10 @@ const generateEditorCmd = command({
|
|
|
384
374
|
short: "a",
|
|
385
375
|
description: "Re-generate all existing editors in the current project"
|
|
386
376
|
}),
|
|
387
|
-
extract: flag({
|
|
388
|
-
long: "extract",
|
|
389
|
-
short: "x",
|
|
390
|
-
description: "Write a powerhouse/document-editor spec for each existing editor into specs/editors/"
|
|
391
|
-
}),
|
|
392
377
|
...debugArgs
|
|
393
378
|
},
|
|
394
379
|
handler: async (args) => {
|
|
395
|
-
const { startGenerateEditor } = await import("./generate-editor-
|
|
380
|
+
const { startGenerateEditor } = await import("./generate-editor-DKuRUeIt.mjs");
|
|
396
381
|
await startGenerateEditor(args, process.cwd());
|
|
397
382
|
process.exit(0);
|
|
398
383
|
}
|
|
@@ -630,12 +615,6 @@ const generateCmds = {
|
|
|
630
615
|
defaultValue: () => ["switchboard", "connect"],
|
|
631
616
|
defaultValueIsSerializable: true
|
|
632
617
|
}),
|
|
633
|
-
document: option({
|
|
634
|
-
type: optional(File),
|
|
635
|
-
long: "document",
|
|
636
|
-
short: "d",
|
|
637
|
-
description: "Path to a powerhouse/processor spec file (.phd or .json) to drive codegen"
|
|
638
|
-
}),
|
|
639
618
|
dir: option({
|
|
640
619
|
type: optional(ModuleDir),
|
|
641
620
|
long: "dir",
|
|
@@ -646,16 +625,11 @@ const generateCmds = {
|
|
|
646
625
|
short: "a",
|
|
647
626
|
description: "Re-generate all existing processors in the current project"
|
|
648
627
|
}),
|
|
649
|
-
extract: flag({
|
|
650
|
-
long: "extract",
|
|
651
|
-
short: "x",
|
|
652
|
-
description: "Write a powerhouse/processor spec for each existing processor into specs/processors/"
|
|
653
|
-
}),
|
|
654
628
|
...skipInstallArgs,
|
|
655
629
|
...debugArgs
|
|
656
630
|
},
|
|
657
631
|
handler: async (args) => {
|
|
658
|
-
const { startGenerateProcessor } = await import("./generate-processor-
|
|
632
|
+
const { startGenerateProcessor } = await import("./generate-processor-CwJvJDpd.mjs");
|
|
659
633
|
await startGenerateProcessor(args, process.cwd());
|
|
660
634
|
process.exit(0);
|
|
661
635
|
}
|
|
@@ -668,13 +642,7 @@ const generateCmds = {
|
|
|
668
642
|
type: optional(string),
|
|
669
643
|
long: "name",
|
|
670
644
|
short: "n",
|
|
671
|
-
description: "
|
|
672
|
-
}),
|
|
673
|
-
document: option({
|
|
674
|
-
type: optional(File),
|
|
675
|
-
long: "document",
|
|
676
|
-
short: "d",
|
|
677
|
-
description: "Path to a powerhouse/subgraph spec file (.phd or .json) to drive codegen"
|
|
645
|
+
description: "Create a subgraph with this name. A subgraph directory that already exists keeps its form"
|
|
678
646
|
}),
|
|
679
647
|
dir: option({
|
|
680
648
|
type: optional(ModuleDir),
|
|
@@ -686,21 +654,11 @@ const generateCmds = {
|
|
|
686
654
|
short: "a",
|
|
687
655
|
description: "Re-generate all existing subgraphs in the current project"
|
|
688
656
|
}),
|
|
689
|
-
extract: flag({
|
|
690
|
-
long: "extract",
|
|
691
|
-
short: "x",
|
|
692
|
-
description: "Write a powerhouse/subgraph spec for each existing subgraph into specs/subgraphs/"
|
|
693
|
-
}),
|
|
694
|
-
/** @experimental */
|
|
695
|
-
codeFirst: flag({
|
|
696
|
-
long: "code-first",
|
|
697
|
-
description: "Experimental. With --name or --document, create a new subgraph code-first. Existing subgraphs keep their own style; ph migrate --subgraph converts one"
|
|
698
|
-
}),
|
|
699
657
|
...skipInstallArgs,
|
|
700
658
|
...debugArgs
|
|
701
659
|
},
|
|
702
660
|
handler: async (args) => {
|
|
703
|
-
const { startGenerateSubgraph } = await import("./generate-subgraph-
|
|
661
|
+
const { startGenerateSubgraph } = await import("./generate-subgraph-Q1VLh3SC.mjs");
|
|
704
662
|
await startGenerateSubgraph(args, process.cwd());
|
|
705
663
|
process.exit(0);
|
|
706
664
|
}
|
|
@@ -725,7 +683,7 @@ const check = command({
|
|
|
725
683
|
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.",
|
|
726
684
|
args: hostCheckArgs,
|
|
727
685
|
handler: async (args) => {
|
|
728
|
-
const { runHostCheck } = await import("./check-
|
|
686
|
+
const { runHostCheck } = await import("./check-CW81vbe9.mjs");
|
|
729
687
|
const { output, exitCode } = await runHostCheck(args);
|
|
730
688
|
console.log(output);
|
|
731
689
|
process.exitCode = exitCode;
|
|
@@ -736,7 +694,7 @@ const exportCmd = command({
|
|
|
736
694
|
description: "Print a host as declared, with every member a compound names, as JSON (tokens unresolved). `--out` writes it to a file instead.",
|
|
737
695
|
args: hostExportArgs,
|
|
738
696
|
handler: async (args) => {
|
|
739
|
-
const { runHostExport } = await import("./export-
|
|
697
|
+
const { runHostExport } = await import("./export-CzeF8pob.mjs");
|
|
740
698
|
const { stdout, stderr, exitCode } = await runHostExport(args);
|
|
741
699
|
if (stdout !== void 0) process.stdout.write(stdout);
|
|
742
700
|
if (stderr !== void 0) process.stderr.write(stderr);
|
|
@@ -752,6 +710,22 @@ const host = subcommands({
|
|
|
752
710
|
}
|
|
753
711
|
});
|
|
754
712
|
//#endregion
|
|
713
|
+
//#region src/commands/identity.ts
|
|
714
|
+
const identityPassword = command({
|
|
715
|
+
name: "password",
|
|
716
|
+
description: "Set, change or remove the password of your pseudonym, in the home folder and in every store it was copied into. Makes the pseudonym when there is none.",
|
|
717
|
+
args: identityPasswordArgs,
|
|
718
|
+
handler: async (args) => {
|
|
719
|
+
const { runIdentityPassword } = await import("./identity-DXZFeQfC.mjs");
|
|
720
|
+
process.exitCode = await runIdentityPassword(args);
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
const identity = subcommands({
|
|
724
|
+
name: "identity",
|
|
725
|
+
description: "Manage your pseudonym: `password`.",
|
|
726
|
+
cmds: { password: identityPassword }
|
|
727
|
+
});
|
|
728
|
+
//#endregion
|
|
755
729
|
//#region src/commands/init.ts
|
|
756
730
|
const init = command({
|
|
757
731
|
name: "init",
|
|
@@ -924,7 +898,7 @@ run by hand.
|
|
|
924
898
|
args: keyframesArgs,
|
|
925
899
|
handler: async (args) => {
|
|
926
900
|
if (args.debug) console.log(args);
|
|
927
|
-
const { runKeyframesCommand } = await import("./keyframes-
|
|
901
|
+
const { runKeyframesCommand } = await import("./keyframes-BkeORfEu.mjs");
|
|
928
902
|
const exitCode = await runKeyframesCommand(args);
|
|
929
903
|
process.exit(exitCode);
|
|
930
904
|
}
|
|
@@ -978,38 +952,31 @@ This command:
|
|
|
978
952
|
1. Generates or loads a cryptographic identity (DID) for the CLI
|
|
979
953
|
2. Opens your browser to the Renown authentication page
|
|
980
954
|
3. You authorize the CLI's DID to act on behalf of your Ethereum address
|
|
981
|
-
4. Stores the
|
|
955
|
+
4. Stores the login in your home folder (~/.ph/identities/renown), for every project
|
|
982
956
|
`,
|
|
983
957
|
args: loginArgs,
|
|
984
958
|
handler: async (args) => {
|
|
985
959
|
if (args.debug) console.log(args);
|
|
986
|
-
const { getRenown } = await import("./auth-CNhbN5UM.mjs");
|
|
987
|
-
const renown = await getRenown(args.renownUrl);
|
|
988
|
-
if (args.showDid) {
|
|
989
|
-
console.log(renown.did);
|
|
990
|
-
process.exit(0);
|
|
991
|
-
}
|
|
992
960
|
if (args.status) {
|
|
993
|
-
const {
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
console.log("Not authenticated with an Ethereum address.");
|
|
997
|
-
console.log("Run \"ph login\" to authenticate.");
|
|
998
|
-
} else {
|
|
999
|
-
console.log("Authenticated");
|
|
1000
|
-
console.log(` ETH Address: ${status.address}`);
|
|
1001
|
-
console.log(` User DID: ${status.userDid}`);
|
|
1002
|
-
console.log(` Chain ID: ${status.chainId}`);
|
|
1003
|
-
console.log(` CLI DID: ${status.cliDid}`);
|
|
1004
|
-
console.log(` Authenticated at: ${status.authenticatedAt?.toLocaleString()}`);
|
|
1005
|
-
console.log(` Renown URL: ${status.baseUrl}`);
|
|
1006
|
-
}
|
|
1007
|
-
process.exit(0);
|
|
961
|
+
const { runWhoami } = await import("./identity-DXZFeQfC.mjs");
|
|
962
|
+
process.exitCode = await runWhoami(args);
|
|
963
|
+
return;
|
|
1008
964
|
}
|
|
1009
965
|
if (args.logout) {
|
|
1010
|
-
await
|
|
966
|
+
const { runLogout } = await import("./identity-DXZFeQfC.mjs");
|
|
967
|
+
process.exitCode = await runLogout(args);
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
const { getRenown } = await import("./auth-5bqHASGL.mjs");
|
|
971
|
+
const renown = await getRenown(args.renownUrl);
|
|
972
|
+
if (args.showDid) {
|
|
973
|
+
console.log(renown.did);
|
|
1011
974
|
process.exit(0);
|
|
1012
975
|
}
|
|
976
|
+
const { identityDataDir } = await import("@powerhousedao/shared/clis/identity");
|
|
977
|
+
const { projectLoginNotice } = await import("./identity-DXZFeQfC.mjs");
|
|
978
|
+
const notice = projectLoginNotice(identityDataDir());
|
|
979
|
+
if (notice) console.warn(notice);
|
|
1013
980
|
const { browserLogin } = await import("@renown/sdk/node");
|
|
1014
981
|
console.debug("Initializing cryptographic identity...");
|
|
1015
982
|
console.log(`CLI DID: ${renown.did}`);
|
|
@@ -1051,31 +1018,18 @@ This command:
|
|
|
1051
1018
|
process.exit(0);
|
|
1052
1019
|
}
|
|
1053
1020
|
});
|
|
1054
|
-
async function handleLogout() {
|
|
1055
|
-
const { getRenown } = await import("./auth-CNhbN5UM.mjs");
|
|
1056
|
-
const renown = await getRenown();
|
|
1057
|
-
if (!renown.user) {
|
|
1058
|
-
console.log("Not currently authenticated.");
|
|
1059
|
-
return;
|
|
1060
|
-
}
|
|
1061
|
-
try {
|
|
1062
|
-
await renown.logout();
|
|
1063
|
-
console.log("Successfully logged out.");
|
|
1064
|
-
} catch (error) {
|
|
1065
|
-
console.error("Failed to clear credentials.");
|
|
1066
|
-
console.debug(error);
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
1021
|
//#endregion
|
|
1070
1022
|
//#region src/commands/logout.ts
|
|
1071
1023
|
const logout = command({
|
|
1072
1024
|
name: "logout",
|
|
1073
1025
|
description: `
|
|
1074
|
-
The logout command
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1026
|
+
The logout command withdraws your Renown login at Renown and deletes it from this computer,
|
|
1027
|
+
its key included. Your pseudonym acts again.`,
|
|
1028
|
+
args: logoutArgs,
|
|
1029
|
+
handler: async (args) => {
|
|
1030
|
+
if (args.debug) console.log(args);
|
|
1031
|
+
const { runLogout } = await import("./identity-DXZFeQfC.mjs");
|
|
1032
|
+
process.exitCode = await runLogout(args);
|
|
1079
1033
|
}
|
|
1080
1034
|
});
|
|
1081
1035
|
//#endregion
|
|
@@ -1087,22 +1041,24 @@ const mcp = command({
|
|
|
1087
1041
|
Serve the project's reactor-mcp tools to a coding agent over stdio.
|
|
1088
1042
|
|
|
1089
1043
|
Use it as the MCP server command in .mcp.json, .cursor/mcp.json and
|
|
1090
|
-
.gemini/settings.json. Tools are listed at once, without waiting for
|
|
1091
|
-
The first tool call connects to the
|
|
1092
|
-
.ph/vetra-runtime.json), or starts one in the background and waits
|
|
1093
|
-
be ready: \`ph run
|
|
1044
|
+
.gemini/settings.json. Tools are listed at once, without waiting for the
|
|
1045
|
+
project's dev stack. The first tool call connects to the running one (found
|
|
1046
|
+
through .ph/vetra-runtime.json), or starts one in the background and waits
|
|
1047
|
+
for it to be ready: \`ph run dev --strictPort\`, the project's hosts/dev host
|
|
1048
|
+
(hosts/vetra in a project that has it and no hosts/dev). How
|
|
1094
1049
|
the start goes is reported as MCP progress notifications when the client sent a progressToken, else on
|
|
1095
1050
|
stderr.
|
|
1096
|
-
Startup failures come back as tool errors carrying
|
|
1097
|
-
also written to .ph/vetra.log.
|
|
1051
|
+
Startup failures come back as tool errors carrying the stack's output, which
|
|
1052
|
+
is also written to .ph/vetra.log.
|
|
1098
1053
|
|
|
1099
1054
|
Beside reactor-mcp's tools it serves restartVetra, which stops the project's
|
|
1100
|
-
|
|
1101
|
-
way (stopped and started again), the next tool call connects to the new
|
|
1055
|
+
dev stack, starts it again and returns its URLs. When the stack restarts some
|
|
1056
|
+
other way (stopped and started again), the next tool call connects to the new
|
|
1057
|
+
one.
|
|
1102
1058
|
`,
|
|
1103
1059
|
handler: async (args) => {
|
|
1104
1060
|
if (args.debug) console.error(args);
|
|
1105
|
-
const { startMcpLauncher } = await import("./mcp-
|
|
1061
|
+
const { startMcpLauncher } = await import("./mcp-gcG7SW9L.mjs");
|
|
1106
1062
|
await startMcpLauncher({
|
|
1107
1063
|
projectDir: args.projectDir,
|
|
1108
1064
|
startTimeoutSeconds: args.startTimeout
|
|
@@ -1134,7 +1090,7 @@ const migrate = command({
|
|
|
1134
1090
|
}
|
|
1135
1091
|
let code = 0;
|
|
1136
1092
|
if (models) {
|
|
1137
|
-
const { migrateDocumentModels } = await import("./migrate-document-models-
|
|
1093
|
+
const { migrateDocumentModels } = await import("./migrate-document-models-DYmkJzq3.mjs");
|
|
1138
1094
|
code |= await migrateDocumentModels({
|
|
1139
1095
|
projectDir: process.cwd(),
|
|
1140
1096
|
dirs: args.documentModel,
|
|
@@ -1143,7 +1099,7 @@ const migrate = command({
|
|
|
1143
1099
|
});
|
|
1144
1100
|
}
|
|
1145
1101
|
if (subgraphs) {
|
|
1146
|
-
const { migrateSubgraphs } = await import("./migrate-subgraphs-
|
|
1102
|
+
const { migrateSubgraphs } = await import("./migrate-subgraphs-ChhXynqd.mjs");
|
|
1147
1103
|
code |= await migrateSubgraphs({
|
|
1148
1104
|
projectDir: process.cwd(),
|
|
1149
1105
|
dirs: args.subgraph,
|
|
@@ -1153,7 +1109,7 @@ const migrate = command({
|
|
|
1153
1109
|
}
|
|
1154
1110
|
process.exit(code);
|
|
1155
1111
|
}
|
|
1156
|
-
const { startMigrate } = await import("./migrate-
|
|
1112
|
+
const { startMigrate } = await import("./migrate-BaWZhorc.mjs");
|
|
1157
1113
|
await startMigrate(args);
|
|
1158
1114
|
process.exit(0);
|
|
1159
1115
|
}
|
|
@@ -1176,11 +1132,11 @@ stderr and exits 2.`;
|
|
|
1176
1132
|
const modelCheck = command({
|
|
1177
1133
|
name: "check",
|
|
1178
1134
|
description: `Check this package's document models through one set of checks:
|
|
1179
|
-
every model directory in documentModelsDir, whether it stores
|
|
1180
|
-
|
|
1135
|
+
every model directory in documentModelsDir, whether it stores the <name>.json of
|
|
1136
|
+
a legacy document model or exports a model from its index.ts. Writes nothing.
|
|
1181
1137
|
|
|
1182
|
-
\`tsc\` cannot run these checks: a
|
|
1183
|
-
evaluated.
|
|
1138
|
+
\`tsc\` cannot run these checks: a document model with a definition compiles when
|
|
1139
|
+
its module is evaluated.
|
|
1184
1140
|
|
|
1185
1141
|
--release (experimental) runs the checks \`ph build --release\` runs: these,
|
|
1186
1142
|
the release checks, and host validation, which validates every model and the
|
|
@@ -1203,7 +1159,7 @@ ${EXPERIMENTAL}`,
|
|
|
1203
1159
|
args: modelCheckArgs,
|
|
1204
1160
|
handler: async (args) => {
|
|
1205
1161
|
if (args.debug) console.error(args);
|
|
1206
|
-
const [{ runModelCheck }, { exitWithModelCommand }] = await Promise.all([import("./check-
|
|
1162
|
+
const [{ runModelCheck }, { exitWithModelCommand }] = await Promise.all([import("./check-DhFd9tO8.mjs"), import("./run-C6Vha5VN.mjs")]);
|
|
1207
1163
|
await exitWithModelCommand(args.json, (streams) => runModelCheck(args, { streams }));
|
|
1208
1164
|
}
|
|
1209
1165
|
});
|
|
@@ -1222,7 +1178,7 @@ ${EXPERIMENTAL}`,
|
|
|
1222
1178
|
args: modelInspectArgs,
|
|
1223
1179
|
handler: async (args) => {
|
|
1224
1180
|
if (args.debug) console.error(args);
|
|
1225
|
-
const [{ runModelInspect }, { exitWithModelCommand }] = await Promise.all([import("./inspect-
|
|
1181
|
+
const [{ runModelInspect }, { exitWithModelCommand }] = await Promise.all([import("./inspect-BgKI8Fhd.mjs"), import("./run-C6Vha5VN.mjs")]);
|
|
1226
1182
|
await exitWithModelCommand(args.json, (streams) => runModelInspect(args, { streams }));
|
|
1227
1183
|
}
|
|
1228
1184
|
});
|
|
@@ -1283,7 +1239,7 @@ This command:
|
|
|
1283
1239
|
const { getPowerhouseProjectInfo } = await import("@powerhousedao/shared/clis");
|
|
1284
1240
|
const { projectPath } = await getPowerhouseProjectInfo();
|
|
1285
1241
|
if (!projectPath) throw new Error("Could not find project path.");
|
|
1286
|
-
const { checkApprovalBeforePublish } = await import("./verify-
|
|
1242
|
+
const { checkApprovalBeforePublish } = await import("./verify-BLn76w09.mjs");
|
|
1287
1243
|
if (args.requireApproval) {
|
|
1288
1244
|
const { ALLOWED_NPM_ARGUMENTS, refusedNpmArguments, targetSelectingNpmEnvironment } = await import("./npm-args-g1Tgel4s.mjs");
|
|
1289
1245
|
const refused = refusedNpmArguments(args.forwardedArgs);
|
|
@@ -1303,7 +1259,7 @@ This command:
|
|
|
1303
1259
|
if (packed) process.once("exit", packed.dispose);
|
|
1304
1260
|
try {
|
|
1305
1261
|
const { checkNpmAuth, npmPublish, resolveRegistryUrl } = await import("@powerhousedao/shared/registry");
|
|
1306
|
-
const { mintRegistryAuthToken } = await import("./registry-auth-
|
|
1262
|
+
const { mintRegistryAuthToken } = await import("./registry-auth-C8D5cno2.mjs");
|
|
1307
1263
|
const registryUrl = resolveRegistryUrl({
|
|
1308
1264
|
registry: args.registry,
|
|
1309
1265
|
projectPath
|
|
@@ -1404,7 +1360,7 @@ Usage:
|
|
|
1404
1360
|
const projectPath = (await getPowerhouseProjectInfo().catch(() => null))?.projectPath ?? process.cwd();
|
|
1405
1361
|
const [{ resolveRegistryUrl, writeRegistryAuthToken }, { mintRegistryAuthToken }, { parseExpiry, formatExpiry }] = await Promise.all([
|
|
1406
1362
|
import("@powerhousedao/shared/registry"),
|
|
1407
|
-
import("./registry-auth-
|
|
1363
|
+
import("./registry-auth-C8D5cno2.mjs"),
|
|
1408
1364
|
import("@renown/sdk/node")
|
|
1409
1365
|
]);
|
|
1410
1366
|
const registryUrl = resolveRegistryUrl({
|
|
@@ -1428,7 +1384,7 @@ const runHost = command({
|
|
|
1428
1384
|
host: positional({
|
|
1429
1385
|
type: string,
|
|
1430
1386
|
displayName: "host",
|
|
1431
|
-
description: "Folder name under hosts/ (e.g.
|
|
1387
|
+
description: "Folder name under hosts/ (e.g. dev, connect), or `<package>/<host>` for one in an installed package's hosts/ (e.g. `@acme/tools/studio`)."
|
|
1432
1388
|
}),
|
|
1433
1389
|
verb: positional({
|
|
1434
1390
|
type: optional(string),
|
|
@@ -1457,8 +1413,17 @@ const runHost = command({
|
|
|
1457
1413
|
})
|
|
1458
1414
|
},
|
|
1459
1415
|
handler: async (args) => {
|
|
1416
|
+
if (args.host === "supervisor") {
|
|
1417
|
+
const { runSupervisorCommand } = await import("@powerhousedao/ph-run/supervisor");
|
|
1418
|
+
process.exitCode = await runSupervisorCommand({
|
|
1419
|
+
verb: args.verb,
|
|
1420
|
+
argv: args.argv,
|
|
1421
|
+
stop: args.stop === true
|
|
1422
|
+
});
|
|
1423
|
+
return;
|
|
1424
|
+
}
|
|
1460
1425
|
if (args.explain !== void 0) {
|
|
1461
|
-
const { explainHost } = await import("./explain-
|
|
1426
|
+
const { explainHost } = await import("./explain-DQ5ymlco.mjs");
|
|
1462
1427
|
await explainHost({
|
|
1463
1428
|
host: args.host,
|
|
1464
1429
|
topic: args.explain
|
|
@@ -1476,8 +1441,8 @@ const runHost = command({
|
|
|
1476
1441
|
debug: args.debug,
|
|
1477
1442
|
argv: args.argv
|
|
1478
1443
|
};
|
|
1479
|
-
if (args.host
|
|
1480
|
-
const { runVetraHost } = await import("./vetra-host-
|
|
1444
|
+
if (isDevHost(args.host)) {
|
|
1445
|
+
const { runVetraHost } = await import("./vetra-host-0rSW35_r.mjs");
|
|
1481
1446
|
await runVetraHost(run);
|
|
1482
1447
|
return;
|
|
1483
1448
|
}
|
|
@@ -1640,6 +1605,32 @@ async function confirm(prompt) {
|
|
|
1640
1605
|
}
|
|
1641
1606
|
}
|
|
1642
1607
|
//#endregion
|
|
1608
|
+
//#region src/commands/vetra.ts
|
|
1609
|
+
/**
|
|
1610
|
+
* `ph vetra`, the gateway to Vetra Studio. cli.ts hands every `ph vetra` but
|
|
1611
|
+
* its help to the gateway (services/vetra-gateway.ts), which makes it the
|
|
1612
|
+
* `ph run` of the studio host: this command gives the help and the docs.
|
|
1613
|
+
*/
|
|
1614
|
+
const vetra = command({
|
|
1615
|
+
name: "vetra",
|
|
1616
|
+
description: `Open Vetra Studio: \`ph vetra [verb]\` is \`ph run ${VETRA_STUDIO_HOST} [verb]\`, the studio host of the ${VETRA_STUDIO_PACKAGE} package. A project without the package gets it first: \`ph vetra\` installs it as a devDependency, at this ph-cli's version, with the project's package manager. The runner arguments, --stop and --explain work as for \`ph run\`. The dev mode that \`ph vetra\` started before 6.4 (the project's hosts/vetra) is \`ph dev\`.`,
|
|
1617
|
+
args: {
|
|
1618
|
+
verb: positional({
|
|
1619
|
+
type: optional(string),
|
|
1620
|
+
displayName: "verb",
|
|
1621
|
+
description: "Verb of the studio host (default: the host's own)."
|
|
1622
|
+
}),
|
|
1623
|
+
argv: restPositionals({
|
|
1624
|
+
type: string,
|
|
1625
|
+
displayName: "runner arguments",
|
|
1626
|
+
description: "Arguments for the studio host's runner, as `ph run` takes them."
|
|
1627
|
+
})
|
|
1628
|
+
},
|
|
1629
|
+
handler: () => {
|
|
1630
|
+
throw new Error(`\`ph vetra\` is \`ph run ${VETRA_STUDIO_HOST}\`, through the gateway in cli.ts.`);
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
//#endregion
|
|
1643
1634
|
//#region src/commands/ph-cli-commands.ts
|
|
1644
1635
|
const phCliCommands = {
|
|
1645
1636
|
init,
|
|
@@ -1658,32 +1649,30 @@ const phCliCommands = {
|
|
|
1658
1649
|
model,
|
|
1659
1650
|
login,
|
|
1660
1651
|
logout,
|
|
1652
|
+
whoami: command({
|
|
1653
|
+
name: "whoami",
|
|
1654
|
+
description: `
|
|
1655
|
+
Show who acts here: your Renown login when you are logged in (\`ph login\`), else your
|
|
1656
|
+
pseudonym, an Ethereum key made without a login and shown as "Anonymous" and a short
|
|
1657
|
+
address. Reads files only; \`--check\` also asks Renown whether the login is still valid.
|
|
1658
|
+
`,
|
|
1659
|
+
args: whoamiArgs,
|
|
1660
|
+
handler: async (args) => {
|
|
1661
|
+
if (args.debug) console.log(args);
|
|
1662
|
+
const { runWhoami } = await import("./identity-DXZFeQfC.mjs");
|
|
1663
|
+
process.exitCode = await runWhoami(args);
|
|
1664
|
+
}
|
|
1665
|
+
}),
|
|
1666
|
+
identity,
|
|
1667
|
+
credentials,
|
|
1661
1668
|
install,
|
|
1662
1669
|
uninstall,
|
|
1663
1670
|
run: runHost,
|
|
1664
1671
|
host,
|
|
1665
|
-
vetra
|
|
1666
|
-
name: "vetra",
|
|
1667
|
-
description: `Open Vetra Studio: \`ph vetra [verb]\` is \`ph run ${VETRA_STUDIO_HOST} [verb]\`, the studio host of the ${VETRA_STUDIO_PACKAGE} package. A project without the package gets it first: \`ph vetra\` installs it as a devDependency, at this ph-cli's version, with the project's package manager. The runner arguments, --stop and --explain work as for \`ph run\`. The dev mode that \`ph vetra\` started before 6.4 (the project's hosts/vetra) is \`ph dev\`.`,
|
|
1668
|
-
args: {
|
|
1669
|
-
verb: positional({
|
|
1670
|
-
type: optional(string),
|
|
1671
|
-
displayName: "verb",
|
|
1672
|
-
description: "Verb of the studio host (default: the host's own)."
|
|
1673
|
-
}),
|
|
1674
|
-
argv: restPositionals({
|
|
1675
|
-
type: string,
|
|
1676
|
-
displayName: "runner arguments",
|
|
1677
|
-
description: "Arguments for the studio host's runner, as `ph run` takes them."
|
|
1678
|
-
})
|
|
1679
|
-
},
|
|
1680
|
-
handler: () => {
|
|
1681
|
-
throw new Error(`\`ph vetra\` is \`ph run ${VETRA_STUDIO_HOST}\`, through the gateway in cli.ts.`);
|
|
1682
|
-
}
|
|
1683
|
-
})
|
|
1672
|
+
vetra
|
|
1684
1673
|
};
|
|
1685
1674
|
//#endregion
|
|
1686
1675
|
export { phCliCommands as t };
|
|
1687
1676
|
|
|
1688
|
-
//# sourceMappingURL=ph-cli-commands-
|
|
1689
|
-
//# debugId=
|
|
1677
|
+
//# sourceMappingURL=ph-cli-commands-B5VkGW99.mjs.map
|
|
1678
|
+
//# debugId=09efd022-467a-5dd0-83db-56865e09bef3
|