@powerhousedao/ph-cli 6.2.0-rc.2 → 6.2.0-rc.3
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.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { createInterface } from "node:readline/promises";
|
|
|
15
15
|
import { bold, yellow } from "colorette";
|
|
16
16
|
//#region src/get-version.ts
|
|
17
17
|
function getVersion() {
|
|
18
|
-
return "6.2.0-rc.
|
|
18
|
+
return "6.2.0-rc.3";
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/utils/constants.ts
|
|
@@ -152,7 +152,7 @@ Build has no read mode; passing only <key> without <value> errors out (use \`ph
|
|
|
152
152
|
args: connectBuildArgs,
|
|
153
153
|
handler: async (args) => {
|
|
154
154
|
if (args.debug) console.log(args);
|
|
155
|
-
const { runConnectBuild } = await import("./connect-build-
|
|
155
|
+
const { runConnectBuild } = await import("./connect-build-rLVALrQ6.mjs");
|
|
156
156
|
await runConnectBuild(args);
|
|
157
157
|
process.exit(0);
|
|
158
158
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
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]="3bfe59f7-fbe8-57ff-a251-4e6bd7263cc3")}catch(e){}}();
|
|
3
3
|
import { t as runBuild } from "./build-B5LEeRPm.mjs";
|
|
4
4
|
import { t as buildCliConnectOverride } from "./cli-connect-override-BUnpQep4.mjs";
|
|
5
5
|
import { join } from "node:path";
|
|
@@ -9,7 +9,7 @@ import { existsSync } from "node:fs";
|
|
|
9
9
|
import { build, mergeConfig } from "vite";
|
|
10
10
|
//#region src/services/connect-build.ts
|
|
11
11
|
async function runConnectBuild(args) {
|
|
12
|
-
const { outDir, debug, dynamicBase } = args;
|
|
12
|
+
const { outDir, debug, dynamicBase, favicon } = args;
|
|
13
13
|
const mode = "production";
|
|
14
14
|
const dirname = process.cwd();
|
|
15
15
|
if (args.keyPositional !== void 0 && args.valuePositional === void 0) throw new Error("ph connect build: positional override requires both <key> and <value> (e.g. `ph connect build connect.renown.url https://renown.staging`). To read a value, use `ph connect config <key>`.");
|
|
@@ -24,7 +24,8 @@ async function runConnectBuild(args) {
|
|
|
24
24
|
dirname,
|
|
25
25
|
cliConnectOverride: connectOverride,
|
|
26
26
|
cliPackageRegistryUrl: packageRegistryUrl,
|
|
27
|
-
dynamicBase
|
|
27
|
+
dynamicBase,
|
|
28
|
+
favicon
|
|
28
29
|
}), { build: { outDir } }));
|
|
29
30
|
}
|
|
30
31
|
function assertLocalPackagesInstalled(projectPath) {
|
|
@@ -38,5 +39,5 @@ function assertLocalPackagesInstalled(projectPath) {
|
|
|
38
39
|
//#endregion
|
|
39
40
|
export { runConnectBuild };
|
|
40
41
|
|
|
41
|
-
//# sourceMappingURL=connect-build-
|
|
42
|
-
//# debugId=
|
|
42
|
+
//# sourceMappingURL=connect-build-rLVALrQ6.mjs.map
|
|
43
|
+
//# debugId=3bfe59f7-fbe8-57ff-a251-4e6bd7263cc3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-build-rLVALrQ6.mjs","sources":["../src/services/connect-build.ts"],"sourcesContent":["import { getConnectBaseViteConfig } from \"@powerhousedao/builder-tools\";\nimport { getConfig } from \"@powerhousedao/shared/clis\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { InlineConfig } from \"vite\";\nimport { build, mergeConfig } from \"vite\";\nimport type { ConnectBuildArgs } from \"../types.js\";\nimport { buildCliConnectOverride } from \"../utils/cli-connect-override.js\";\nimport { runBuild } from \"./build.js\";\n\nexport async function runConnectBuild(args: ConnectBuildArgs) {\n const { outDir, debug, dynamicBase, favicon } = args;\n\n const mode = \"production\";\n const dirname = process.cwd();\n\n // Build has no read mode; a bare positional `<key>` is a user error. The\n // 2-positional `<key> <value>` form is handled inside buildCliConnectOverride\n // so it layers on top of --json + flags like any other override input.\n if (args.keyPositional !== undefined && args.valuePositional === undefined) {\n throw new Error(\n \"ph connect build: positional override requires both <key> and <value> (e.g. `ph connect build connect.renown.url https://renown.staging`). To read a value, use `ph connect config <key>`.\",\n );\n }\n\n // Fail fast if any package marked as provider: \"local\" is missing from\n // node_modules — the Vite plugin that bundles them needs them on disk.\n assertLocalPackagesInstalled(dirname);\n\n // Build the CLI override layers (--json + individual flags + positional)\n // once here so a bad payload fails before we waste a build.\n // `--packages-registry` lands at the top-level `packageRegistryUrl`\n // (mirrors source-config shape); every other flag feeds the connect-block\n // precedence ladder.\n const { connectOverride, packageRegistryUrl } = buildCliConnectOverride(args);\n\n await runBuild({\n outDir: \"dist\",\n debug,\n });\n\n const baseConfig = getConnectBaseViteConfig({\n mode,\n dirname,\n cliConnectOverride: connectOverride,\n cliPackageRegistryUrl: packageRegistryUrl,\n dynamicBase,\n favicon,\n });\n\n const buildConfig: InlineConfig = {\n build: {\n outDir,\n },\n };\n\n const config = mergeConfig(baseConfig, buildConfig);\n\n await build(config);\n}\n\nfunction assertLocalPackagesInstalled(projectPath: string) {\n const config = getConfig(join(projectPath, \"powerhouse.config.json\"));\n const localPackages = (config.packages ?? []).filter(\n (p) => p.provider === \"local\",\n );\n if (localPackages.length === 0) return;\n\n const missing = localPackages.filter(\n (p) =>\n !existsSync(\n join(projectPath, \"node_modules\", p.packageName, \"package.json\"),\n ),\n );\n if (missing.length === 0) return;\n\n const names = missing.map((p) => p.packageName);\n throw new Error(\n `ph connect build requires these packages to be installed in node_modules (they are declared with provider: \"local\" in powerhouse.config.json):\\n` +\n names.map((n) => ` - ${n}`).join(\"\\n\") +\n `\\n\\nInstall them with:\\n ph install --local ${names.join(\" \")}`,\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;AAUA,eAAsB,gBAAgB,MAAwB;CAC5D,MAAM,EAAE,QAAQ,OAAO,aAAa,YAAY;CAEhD,MAAM,OAAO;CACb,MAAM,UAAU,QAAQ,KAAK;AAK7B,KAAI,KAAK,kBAAkB,KAAA,KAAa,KAAK,oBAAoB,KAAA,EAC/D,OAAM,IAAI,MACR,6LACD;AAKH,8BAA6B,QAAQ;CAOrC,MAAM,EAAE,iBAAiB,uBAAuB,wBAAwB,KAAK;AAE7E,OAAM,SAAS;EACb,QAAQ;EACR;EACD,CAAC;AAmBF,OAAM,MAFS,YAfI,yBAAyB;EAC1C;EACA;EACA,oBAAoB;EACpB,uBAAuB;EACvB;EACA;EACD,CAAC,EAEgC,EAChC,OAAO,EACL,QACD,EACF,CAEkD,CAEhC;;AAGrB,SAAS,6BAA6B,aAAqB;CAEzD,MAAM,iBADS,UAAU,KAAK,aAAa,yBAAyB,CAAC,CACvC,YAAY,EAAE,EAAE,QAC3C,MAAM,EAAE,aAAa,QACvB;AACD,KAAI,cAAc,WAAW,EAAG;CAEhC,MAAM,UAAU,cAAc,QAC3B,MACC,CAAC,WACC,KAAK,aAAa,gBAAgB,EAAE,aAAa,eAAe,CACjE,CACJ;AACD,KAAI,QAAQ,WAAW,EAAG;CAE1B,MAAM,QAAQ,QAAQ,KAAK,MAAM,EAAE,YAAY;AAC/C,OAAM,IAAI,MACR,qJACE,MAAM,KAAK,MAAM,OAAO,IAAI,CAAC,KAAK,KAAK,GACvC,gDAAgD,MAAM,KAAK,IAAI,GAClE","debug_id":"3bfe59f7-fbe8-57ff-a251-4e6bd7263cc3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/ph-cli",
|
|
3
|
-
"version": "6.2.0-rc.
|
|
3
|
+
"version": "6.2.0-rc.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"semver": "7.7.4",
|
|
41
41
|
"tsdown": "0.21.1",
|
|
42
42
|
"vite": "8.0.10",
|
|
43
|
-
"@powerhousedao/builder-tools": "6.2.0-rc.
|
|
44
|
-
"@powerhousedao/codegen": "6.2.0-rc.
|
|
45
|
-
"@powerhousedao/
|
|
46
|
-
"@powerhousedao/
|
|
47
|
-
"@powerhousedao/
|
|
48
|
-
"@powerhousedao/shared": "6.2.0-rc.
|
|
49
|
-
"@powerhousedao/switchboard": "6.2.0-rc.
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
52
|
-
"
|
|
43
|
+
"@powerhousedao/builder-tools": "6.2.0-rc.3",
|
|
44
|
+
"@powerhousedao/codegen": "6.2.0-rc.3",
|
|
45
|
+
"@powerhousedao/config": "6.2.0-rc.3",
|
|
46
|
+
"@powerhousedao/reactor": "6.2.0-rc.3",
|
|
47
|
+
"@powerhousedao/common": "6.2.0-rc.3",
|
|
48
|
+
"@powerhousedao/shared": "6.2.0-rc.3",
|
|
49
|
+
"@powerhousedao/switchboard": "6.2.0-rc.3",
|
|
50
|
+
"@powerhousedao/vetra": "6.2.0-rc.3",
|
|
51
|
+
"@renown/sdk": "6.2.0-rc.3",
|
|
52
|
+
"document-model": "6.2.0-rc.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "25.2.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-build-B-0iCro8.mjs","sources":["../src/services/connect-build.ts"],"sourcesContent":["import { getConnectBaseViteConfig } from \"@powerhousedao/builder-tools\";\nimport { getConfig } from \"@powerhousedao/shared/clis\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { InlineConfig } from \"vite\";\nimport { build, mergeConfig } from \"vite\";\nimport type { ConnectBuildArgs } from \"../types.js\";\nimport { buildCliConnectOverride } from \"../utils/cli-connect-override.js\";\nimport { runBuild } from \"./build.js\";\n\nexport async function runConnectBuild(args: ConnectBuildArgs) {\n const { outDir, debug, dynamicBase } = args;\n\n const mode = \"production\";\n const dirname = process.cwd();\n\n // Build has no read mode; a bare positional `<key>` is a user error. The\n // 2-positional `<key> <value>` form is handled inside buildCliConnectOverride\n // so it layers on top of --json + flags like any other override input.\n if (args.keyPositional !== undefined && args.valuePositional === undefined) {\n throw new Error(\n \"ph connect build: positional override requires both <key> and <value> (e.g. `ph connect build connect.renown.url https://renown.staging`). To read a value, use `ph connect config <key>`.\",\n );\n }\n\n // Fail fast if any package marked as provider: \"local\" is missing from\n // node_modules — the Vite plugin that bundles them needs them on disk.\n assertLocalPackagesInstalled(dirname);\n\n // Build the CLI override layers (--json + individual flags + positional)\n // once here so a bad payload fails before we waste a build.\n // `--packages-registry` lands at the top-level `packageRegistryUrl`\n // (mirrors source-config shape); every other flag feeds the connect-block\n // precedence ladder.\n const { connectOverride, packageRegistryUrl } = buildCliConnectOverride(args);\n\n await runBuild({\n outDir: \"dist\",\n debug,\n });\n\n const baseConfig = getConnectBaseViteConfig({\n mode,\n dirname,\n cliConnectOverride: connectOverride,\n cliPackageRegistryUrl: packageRegistryUrl,\n dynamicBase,\n });\n\n const buildConfig: InlineConfig = {\n build: {\n outDir,\n },\n };\n\n const config = mergeConfig(baseConfig, buildConfig);\n\n await build(config);\n}\n\nfunction assertLocalPackagesInstalled(projectPath: string) {\n const config = getConfig(join(projectPath, \"powerhouse.config.json\"));\n const localPackages = (config.packages ?? []).filter(\n (p) => p.provider === \"local\",\n );\n if (localPackages.length === 0) return;\n\n const missing = localPackages.filter(\n (p) =>\n !existsSync(\n join(projectPath, \"node_modules\", p.packageName, \"package.json\"),\n ),\n );\n if (missing.length === 0) return;\n\n const names = missing.map((p) => p.packageName);\n throw new Error(\n `ph connect build requires these packages to be installed in node_modules (they are declared with provider: \"local\" in powerhouse.config.json):\\n` +\n names.map((n) => ` - ${n}`).join(\"\\n\") +\n `\\n\\nInstall them with:\\n ph install --local ${names.join(\" \")}`,\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;AAUA,eAAsB,gBAAgB,MAAwB;CAC5D,MAAM,EAAE,QAAQ,OAAO,gBAAgB;CAEvC,MAAM,OAAO;CACb,MAAM,UAAU,QAAQ,KAAK;AAK7B,KAAI,KAAK,kBAAkB,KAAA,KAAa,KAAK,oBAAoB,KAAA,EAC/D,OAAM,IAAI,MACR,6LACD;AAKH,8BAA6B,QAAQ;CAOrC,MAAM,EAAE,iBAAiB,uBAAuB,wBAAwB,KAAK;AAE7E,OAAM,SAAS;EACb,QAAQ;EACR;EACD,CAAC;AAkBF,OAAM,MAFS,YAdI,yBAAyB;EAC1C;EACA;EACA,oBAAoB;EACpB,uBAAuB;EACvB;EACD,CAAC,EAEgC,EAChC,OAAO,EACL,QACD,EACF,CAEkD,CAEhC;;AAGrB,SAAS,6BAA6B,aAAqB;CAEzD,MAAM,iBADS,UAAU,KAAK,aAAa,yBAAyB,CAAC,CACvC,YAAY,EAAE,EAAE,QAC3C,MAAM,EAAE,aAAa,QACvB;AACD,KAAI,cAAc,WAAW,EAAG;CAEhC,MAAM,UAAU,cAAc,QAC3B,MACC,CAAC,WACC,KAAK,aAAa,gBAAgB,EAAE,aAAa,eAAe,CACjE,CACJ;AACD,KAAI,QAAQ,WAAW,EAAG;CAE1B,MAAM,QAAQ,QAAQ,KAAK,MAAM,EAAE,YAAY;AAC/C,OAAM,IAAI,MACR,qJACE,MAAM,KAAK,MAAM,OAAO,IAAI,CAAC,KAAK,KAAK,GACvC,gDAAgD,MAAM,KAAK,IAAI,GAClE","debug_id":"32a821ed-f27d-5035-b060-8c2fd77d17f0"}
|