@powerhousedao/ph-cli 6.1.0-dev.13 → 6.1.0-dev.15

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.
@@ -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]="371420a3-9d9d-5dfe-9cd5-4781b4d100ee")}catch(e){}}();
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]="53802aa9-82a4-5f73-8876-9bf4310ea58e")}catch(e){}}();
3
3
  import { execSync } from "node:child_process";
4
4
  import { browserBuildConfig, nodeBuildConfig } from "@powerhousedao/shared/build-config";
5
5
  import { join } from "node:path";
@@ -17,7 +17,7 @@ async function runBuild(args) {
17
17
  outDir: join(outDir, "node")
18
18
  });
19
19
  const agent = (await detect())?.agent ?? "npm";
20
- const tscCommand = resolveCommand(agent, "execute-local", ["tsc"]);
20
+ const tscCommand = resolveCommand(agent, "execute-local", ["tsc", "--build"]);
21
21
  if (tscCommand === null) {
22
22
  console.error("You need to have typescript installed to use the `build` command.");
23
23
  process.exit(1);
@@ -45,5 +45,5 @@ async function runBuild(args) {
45
45
  //#endregion
46
46
  export { runBuild as t };
47
47
 
48
- //# sourceMappingURL=build-vccTv_Jp.mjs.map
49
- //# debugId=371420a3-9d9d-5dfe-9cd5-4781b4d100ee
48
+ //# sourceMappingURL=build-B5LEeRPm.mjs.map
49
+ //# debugId=53802aa9-82a4-5f73-8876-9bf4310ea58e
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-B5LEeRPm.mjs","sources":["../src/services/build.ts"],"sourcesContent":["import {\n browserBuildConfig,\n nodeBuildConfig,\n} from \"@powerhousedao/shared/build-config\";\nimport { execSync } from \"node:child_process\";\nimport { join } from \"node:path\";\nimport { detect, resolveCommand } from \"package-manager-detector\";\nimport { build as tsdownBuild } from \"tsdown\";\nimport type { BuildArgs } from \"../types.js\";\n\nexport async function runBuild(args: BuildArgs) {\n const { outDir } = args;\n\n await tsdownBuild({\n ...browserBuildConfig,\n outDir: join(outDir, \"browser\"),\n });\n\n await tsdownBuild({\n ...nodeBuildConfig,\n outDir: join(outDir, \"node\"),\n });\n\n const detectResult = await detect();\n const agent = detectResult?.agent ?? \"npm\";\n\n // Emit types with tsc\n const tscCommand = resolveCommand(agent, \"execute-local\", [\"tsc\", \"--build\"]);\n if (tscCommand === null) {\n console.error(\n \"You need to have typescript installed to use the `build` command.\",\n );\n process.exit(1);\n }\n console.log(\"\\n▶ Emitting types via tsc...\");\n try {\n execSync(`${tscCommand.command} ${tscCommand.args.join(\" \")}`, {\n stdio: \"inherit\",\n });\n console.log(\"✔ Types emitted to\", join(outDir, \"types\"));\n } catch {\n console.warn(\n \"✘ tsc reported errors above; declarations were still written. Fix the errors to keep types accurate.\",\n );\n }\n\n const executeLocalCommand = resolveCommand(agent, \"execute-local\", [\n \"tailwindcss\",\n \"-i\",\n \"./style.css\",\n \"-o\",\n \"./dist/style.css\",\n ]);\n if (executeLocalCommand === null) {\n console.error(\n \"You need to have tailwindcss installed to use the `build` command.\",\n );\n process.exit(1);\n }\n execSync(\n `${executeLocalCommand.command} ${executeLocalCommand.args.join(\" \")}`,\n );\n}\n"],"names":["tsdownBuild"],"mappings":";;;;;;;;AAUA,eAAsB,SAAS,MAAiB;CAC9C,MAAM,EAAE,WAAW;AAEnB,OAAMA,MAAY;EAChB,GAAG;EACH,QAAQ,KAAK,QAAQ,UAAU;EAChC,CAAC;AAEF,OAAMA,MAAY;EAChB,GAAG;EACH,QAAQ,KAAK,QAAQ,OAAO;EAC7B,CAAC;CAGF,MAAM,SADe,MAAM,QAAQ,GACP,SAAS;CAGrC,MAAM,aAAa,eAAe,OAAO,iBAAiB,CAAC,OAAO,UAAU,CAAC;AAC7E,KAAI,eAAe,MAAM;AACvB,UAAQ,MACN,oEACD;AACD,UAAQ,KAAK,EAAE;;AAEjB,SAAQ,IAAI,gCAAgC;AAC5C,KAAI;AACF,WAAS,GAAG,WAAW,QAAQ,GAAG,WAAW,KAAK,KAAK,IAAI,IAAI,EAC7D,OAAO,WACR,CAAC;AACF,UAAQ,IAAI,sBAAsB,KAAK,QAAQ,QAAQ,CAAC;SAClD;AACN,UAAQ,KACN,uGACD;;CAGH,MAAM,sBAAsB,eAAe,OAAO,iBAAiB;EACjE;EACA;EACA;EACA;EACA;EACD,CAAC;AACF,KAAI,wBAAwB,MAAM;AAChC,UAAQ,MACN,qEACD;AACD,UAAQ,KAAK,EAAE;;AAEjB,UACE,GAAG,oBAAoB,QAAQ,GAAG,oBAAoB,KAAK,KAAK,IAAI,GACrE","debug_id":"53802aa9-82a4-5f73-8876-9bf4310ea58e"}
@@ -0,0 +1,4 @@
1
+ import { t as runBuild } from "./build-B5LEeRPm.mjs";
2
+ export { runBuild };
3
+ !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]="03c7575f-6904-5af5-be74-46221d2b3a6f")}catch(e){}}();
4
+ //# debugId=03c7575f-6904-5af5-be74-46221d2b3a6f
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.1.0-dev.13";
18
+ return "6.1.0-dev.15";
19
19
  }
20
20
  //#endregion
21
21
  //#region src/utils/constants.ts
@@ -105,7 +105,7 @@ const build$1 = command({
105
105
  handler: async (args) => {
106
106
  if (args.debug) console.log(args);
107
107
  try {
108
- const { runBuild } = await import("./build-CqtYNjiI.mjs");
108
+ const { runBuild } = await import("./build-CMgv-erS.mjs");
109
109
  await runBuild(args);
110
110
  } catch (error) {
111
111
  console.error(error);
@@ -144,7 +144,7 @@ external packages included
144
144
  args: connectBuildArgs,
145
145
  handler: async (args) => {
146
146
  if (args.debug) console.log(args);
147
- const { runConnectBuild } = await import("./connect-build-B7I7HJu0.mjs");
147
+ const { runConnectBuild } = await import("./connect-build-DA5QOP5h.mjs");
148
148
  await runConnectBuild(args);
149
149
  process.exit(0);
150
150
  }
@@ -1,6 +1,6 @@
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]="0428fd03-7088-59d6-8458-281ac366746a")}catch(e){}}();
3
- import { t as runBuild } from "./build-vccTv_Jp.mjs";
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]="b932c8b6-b646-54f8-8bb1-445b95fc1b70")}catch(e){}}();
3
+ import { t as runBuild } from "./build-B5LEeRPm.mjs";
4
4
  import { t as assignEnvVars } from "./assign-env-vars-W-lZmdMi.mjs";
5
5
  import { join } from "node:path";
6
6
  import { getConnectBaseViteConfig } from "@powerhousedao/builder-tools";
@@ -34,5 +34,5 @@ function assertLocalPackagesInstalled(projectPath) {
34
34
  //#endregion
35
35
  export { runConnectBuild };
36
36
 
37
- //# sourceMappingURL=connect-build-B7I7HJu0.mjs.map
38
- //# debugId=0428fd03-7088-59d6-8458-281ac366746a
37
+ //# sourceMappingURL=connect-build-DA5QOP5h.mjs.map
38
+ //# debugId=b932c8b6-b646-54f8-8bb1-445b95fc1b70
@@ -1 +1 @@
1
- {"version":3,"file":"connect-build-B7I7HJu0.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 { assignEnvVars } from \"../utils/assign-env-vars.js\";\nimport { runBuild } from \"./build.js\";\n\nexport async function runConnectBuild(args: ConnectBuildArgs) {\n const { outDir, debug } = args;\n assignEnvVars(args);\n\n const mode = \"production\";\n const dirname = process.cwd();\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 await runBuild({\n outDir: \"dist\",\n debug,\n });\n\n const baseConfig = getConnectBaseViteConfig({\n mode,\n dirname,\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,UAAU;AAC1B,eAAc,KAAK;CAEnB,MAAM,OAAO;CACb,MAAM,UAAU,QAAQ,KAAK;AAI7B,8BAA6B,QAAQ;AAErC,OAAM,SAAS;EACb,QAAQ;EACR;EACD,CAAC;AAeF,OAAM,MAFS,YAXI,yBAAyB;EAC1C;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":"0428fd03-7088-59d6-8458-281ac366746a"}
1
+ {"version":3,"file":"connect-build-DA5QOP5h.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 { assignEnvVars } from \"../utils/assign-env-vars.js\";\nimport { runBuild } from \"./build.js\";\n\nexport async function runConnectBuild(args: ConnectBuildArgs) {\n const { outDir, debug } = args;\n assignEnvVars(args);\n\n const mode = \"production\";\n const dirname = process.cwd();\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 await runBuild({\n outDir: \"dist\",\n debug,\n });\n\n const baseConfig = getConnectBaseViteConfig({\n mode,\n dirname,\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,UAAU;AAC1B,eAAc,KAAK;CAEnB,MAAM,OAAO;CACb,MAAM,UAAU,QAAQ,KAAK;AAI7B,8BAA6B,QAAQ;AAErC,OAAM,SAAS;EACb,QAAQ;EACR;EACD,CAAC;AAeF,OAAM,MAFS,YAXI,yBAAyB;EAC1C;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":"b932c8b6-b646-54f8-8bb1-445b95fc1b70"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/ph-cli",
3
- "version": "6.1.0-dev.13",
3
+ "version": "6.1.0-dev.15",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -38,16 +38,16 @@
38
38
  "semver": "7.7.4",
39
39
  "tsdown": "0.21.1",
40
40
  "vite": "8.0.8",
41
- "@powerhousedao/builder-tools": "6.1.0-dev.13",
42
- "@powerhousedao/codegen": "6.1.0-dev.13",
43
- "@powerhousedao/reactor": "6.1.0-dev.13",
44
- "@powerhousedao/config": "6.1.0-dev.13",
45
- "@powerhousedao/common": "6.1.0-dev.13",
46
- "@powerhousedao/shared": "6.1.0-dev.13",
47
- "@renown/sdk": "6.1.0-dev.13",
48
- "document-model": "6.1.0-dev.13",
49
- "@powerhousedao/vetra": "6.1.0-dev.13",
50
- "@powerhousedao/switchboard": "6.1.0-dev.13"
41
+ "@powerhousedao/builder-tools": "6.1.0-dev.15",
42
+ "@powerhousedao/config": "6.1.0-dev.15",
43
+ "@powerhousedao/codegen": "6.1.0-dev.15",
44
+ "@powerhousedao/reactor": "6.1.0-dev.15",
45
+ "@powerhousedao/common": "6.1.0-dev.15",
46
+ "@powerhousedao/shared": "6.1.0-dev.15",
47
+ "@powerhousedao/vetra": "6.1.0-dev.15",
48
+ "@powerhousedao/switchboard": "6.1.0-dev.15",
49
+ "@renown/sdk": "6.1.0-dev.15",
50
+ "document-model": "6.1.0-dev.15"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "25.2.3",
@@ -1,4 +0,0 @@
1
- import { t as runBuild } from "./build-vccTv_Jp.mjs";
2
- export { runBuild };
3
- !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]="4960d4f7-96d4-5e0a-8c0e-5a1543051775")}catch(e){}}();
4
- //# debugId=4960d4f7-96d4-5e0a-8c0e-5a1543051775
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-vccTv_Jp.mjs","sources":["../src/services/build.ts"],"sourcesContent":["import {\n browserBuildConfig,\n nodeBuildConfig,\n} from \"@powerhousedao/shared/build-config\";\nimport { execSync } from \"node:child_process\";\nimport { join } from \"node:path\";\nimport { detect, resolveCommand } from \"package-manager-detector\";\nimport { build as tsdownBuild } from \"tsdown\";\nimport type { BuildArgs } from \"../types.js\";\n\nexport async function runBuild(args: BuildArgs) {\n const { outDir } = args;\n\n await tsdownBuild({\n ...browserBuildConfig,\n outDir: join(outDir, \"browser\"),\n });\n\n await tsdownBuild({\n ...nodeBuildConfig,\n outDir: join(outDir, \"node\"),\n });\n\n const detectResult = await detect();\n const agent = detectResult?.agent ?? \"npm\";\n\n // Emit types with tsc\n const tscCommand = resolveCommand(agent, \"execute-local\", [\"tsc\"]);\n if (tscCommand === null) {\n console.error(\n \"You need to have typescript installed to use the `build` command.\",\n );\n process.exit(1);\n }\n console.log(\"\\n▶ Emitting types via tsc...\");\n try {\n execSync(`${tscCommand.command} ${tscCommand.args.join(\" \")}`, {\n stdio: \"inherit\",\n });\n console.log(\"✔ Types emitted to\", join(outDir, \"types\"));\n } catch {\n console.warn(\n \"✘ tsc reported errors above; declarations were still written. Fix the errors to keep types accurate.\",\n );\n }\n\n const executeLocalCommand = resolveCommand(agent, \"execute-local\", [\n \"tailwindcss\",\n \"-i\",\n \"./style.css\",\n \"-o\",\n \"./dist/style.css\",\n ]);\n if (executeLocalCommand === null) {\n console.error(\n \"You need to have tailwindcss installed to use the `build` command.\",\n );\n process.exit(1);\n }\n execSync(\n `${executeLocalCommand.command} ${executeLocalCommand.args.join(\" \")}`,\n );\n}\n"],"names":["tsdownBuild"],"mappings":";;;;;;;;AAUA,eAAsB,SAAS,MAAiB;CAC9C,MAAM,EAAE,WAAW;AAEnB,OAAMA,MAAY;EAChB,GAAG;EACH,QAAQ,KAAK,QAAQ,UAAU;EAChC,CAAC;AAEF,OAAMA,MAAY;EAChB,GAAG;EACH,QAAQ,KAAK,QAAQ,OAAO;EAC7B,CAAC;CAGF,MAAM,SADe,MAAM,QAAQ,GACP,SAAS;CAGrC,MAAM,aAAa,eAAe,OAAO,iBAAiB,CAAC,MAAM,CAAC;AAClE,KAAI,eAAe,MAAM;AACvB,UAAQ,MACN,oEACD;AACD,UAAQ,KAAK,EAAE;;AAEjB,SAAQ,IAAI,gCAAgC;AAC5C,KAAI;AACF,WAAS,GAAG,WAAW,QAAQ,GAAG,WAAW,KAAK,KAAK,IAAI,IAAI,EAC7D,OAAO,WACR,CAAC;AACF,UAAQ,IAAI,sBAAsB,KAAK,QAAQ,QAAQ,CAAC;SAClD;AACN,UAAQ,KACN,uGACD;;CAGH,MAAM,sBAAsB,eAAe,OAAO,iBAAiB;EACjE;EACA;EACA;EACA;EACA;EACD,CAAC;AACF,KAAI,wBAAwB,MAAM;AAChC,UAAQ,MACN,qEACD;AACD,UAAQ,KAAK,EAAE;;AAEjB,UACE,GAAG,oBAAoB,QAAQ,GAAG,oBAAoB,KAAK,KAAK,IAAI,GACrE","debug_id":"371420a3-9d9d-5dfe-9cd5-4781b4d100ee"}