@powerhousedao/ph-cli 6.1.0-staging.0 → 6.2.0-dev.0

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.
Files changed (61) hide show
  1. package/dist/{build-vccTv_Jp.mjs → build-B5LEeRPm.mjs} +4 -4
  2. package/dist/build-B5LEeRPm.mjs.map +1 -0
  3. package/dist/build-CMgv-erS.mjs +4 -0
  4. package/dist/cli-connect-override-DHpuwyEn.mjs +274 -0
  5. package/dist/cli-connect-override-DHpuwyEn.mjs.map +1 -0
  6. package/dist/cli.mjs +63 -32
  7. package/dist/cli.mjs.map +1 -1
  8. package/dist/{connect-build-B7I7HJu0.mjs → connect-build-DDWHr6nw.mjs} +10 -7
  9. package/dist/connect-build-DDWHr6nw.mjs.map +1 -0
  10. package/dist/connect-config-DQcIDdtP.mjs +187 -0
  11. package/dist/connect-config-DQcIDdtP.mjs.map +1 -0
  12. package/dist/{connect-preview-CNJkhtxL.mjs → connect-preview-D7ypzFDc.mjs} +4 -6
  13. package/dist/connect-preview-D7ypzFDc.mjs.map +1 -0
  14. package/dist/{connect-studio-DTdSFftL.mjs → connect-studio-BbxxxUZ9.mjs} +7 -7
  15. package/dist/connect-studio-BbxxxUZ9.mjs.map +1 -0
  16. package/dist/connect-studio-YDVQ49D6.mjs +5 -0
  17. package/dist/{generate-all-WiQQo-Nz.mjs → generate-all-DrT4ZxHX.mjs} +3 -3
  18. package/dist/{generate-all-WiQQo-Nz.mjs.map → generate-all-DrT4ZxHX.mjs.map} +1 -1
  19. package/dist/{generate-app-DdmOt6ID.mjs → generate-app-DNNqA-H3.mjs} +3 -3
  20. package/dist/{generate-app-DdmOt6ID.mjs.map → generate-app-DNNqA-H3.mjs.map} +1 -1
  21. package/dist/{generate-document-model-DQ5PVeIH.mjs → generate-document-model-BJXyODfm.mjs} +3 -3
  22. package/dist/{generate-document-model-DQ5PVeIH.mjs.map → generate-document-model-BJXyODfm.mjs.map} +1 -1
  23. package/dist/{generate-editor-DtzVAs6x.mjs → generate-editor-BejvaVVT.mjs} +3 -3
  24. package/dist/{generate-editor-DtzVAs6x.mjs.map → generate-editor-BejvaVVT.mjs.map} +1 -1
  25. package/dist/{generate-processor-FGtN6BVY.mjs → generate-processor-_WOx-mMe.mjs} +3 -3
  26. package/dist/{generate-processor-FGtN6BVY.mjs.map → generate-processor-_WOx-mMe.mjs.map} +1 -1
  27. package/dist/{generate-subgraph-BrzmW_sj.mjs → generate-subgraph-BsHUstpl.mjs} +3 -3
  28. package/dist/{generate-subgraph-BrzmW_sj.mjs.map → generate-subgraph-BsHUstpl.mjs.map} +1 -1
  29. package/dist/{init-Cw_5H_Z1.mjs → init-D3toc_qO.mjs} +5 -4
  30. package/dist/init-D3toc_qO.mjs.map +1 -0
  31. package/dist/{inspect-BwuBW_zW.mjs → inspect-CKdafPbC.mjs} +4 -4
  32. package/dist/{inspect-BwuBW_zW.mjs.map → inspect-CKdafPbC.mjs.map} +1 -1
  33. package/dist/{migrate-CfgiCNQo.mjs → migrate-BJQvY88v.mjs} +3 -3
  34. package/dist/{migrate-CfgiCNQo.mjs.map → migrate-BJQvY88v.mjs.map} +1 -1
  35. package/dist/{registry-auth-CNH84uo4.mjs → registry-auth-DxEWCJu2.mjs} +3 -3
  36. package/dist/{registry-auth-CNH84uo4.mjs.map → registry-auth-DxEWCJu2.mjs.map} +1 -1
  37. package/dist/{switchboard-CERuSM8r.mjs → switchboard-CJMoMzWx.mjs} +3 -3
  38. package/dist/{switchboard-CERuSM8r.mjs.map → switchboard-CJMoMzWx.mjs.map} +1 -1
  39. package/dist/switchboard-iRFugh8I.mjs +4 -0
  40. package/dist/{switchboard-migrate-BumRp7rC.mjs → switchboard-migrate-NQ7LHWSi.mjs} +3 -3
  41. package/dist/{switchboard-migrate-BumRp7rC.mjs.map → switchboard-migrate-NQ7LHWSi.mjs.map} +1 -1
  42. package/dist/{switchboard-reset-1YcJEVqc.mjs → switchboard-reset-BcQXlcVf.mjs} +3 -3
  43. package/dist/{switchboard-reset-1YcJEVqc.mjs.map → switchboard-reset-BcQXlcVf.mjs.map} +1 -1
  44. package/dist/{utils-mth8NsDA.mjs → utils-BaTZlyL3.mjs} +5 -5
  45. package/dist/utils-BaTZlyL3.mjs.map +1 -0
  46. package/dist/{utils-C6581aex.mjs → utils-DPGwKNam.mjs} +3 -3
  47. package/dist/{vetra-yCsUKy_u.mjs → vetra-DjsGCr0t.mjs} +13 -11
  48. package/dist/vetra-DjsGCr0t.mjs.map +1 -0
  49. package/package.json +13 -11
  50. package/dist/assign-env-vars-W-lZmdMi.mjs +0 -18
  51. package/dist/assign-env-vars-W-lZmdMi.mjs.map +0 -1
  52. package/dist/build-CqtYNjiI.mjs +0 -4
  53. package/dist/build-vccTv_Jp.mjs.map +0 -1
  54. package/dist/connect-build-B7I7HJu0.mjs.map +0 -1
  55. package/dist/connect-preview-CNJkhtxL.mjs.map +0 -1
  56. package/dist/connect-studio-DTdSFftL.mjs.map +0 -1
  57. package/dist/connect-studio-DySbZFEc.mjs +0 -5
  58. package/dist/init-Cw_5H_Z1.mjs.map +0 -1
  59. package/dist/switchboard-ChH1PMaE.mjs +0 -4
  60. package/dist/utils-mth8NsDA.mjs.map +0 -1
  61. package/dist/vetra-yCsUKy_u.mjs.map +0 -1
@@ -0,0 +1,187 @@
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]="388bfdf9-8b0c-5eb7-a80f-e68612f686be")}catch(e){}}();
3
+ import { c as validateConnectKeyValue, i as wasFlagExplicitlyPassed, l as validateConnectPatch, n as buildConnectFlagPatch, o as normalizeKey, s as parseCliValue } from "./cli-connect-override-DHpuwyEn.mjs";
4
+ import { isAbsolute, join, resolve } from "node:path";
5
+ import { existsSync } from "node:fs";
6
+ import { ConfigLoader, DEFAULT_CONNECT_CONFIG, JsonConfigAdapter, deepMerge } from "@powerhousedao/shared/connect";
7
+ import { stringToPath } from "remeda";
8
+ //#region src/utils/get-at-path.ts
9
+ /**
10
+ * Walk a parsed path (e.g. from remeda's `stringToPath`) through a runtime-
11
+ * typed object, returning the value or `undefined` if any segment is
12
+ * missing.
13
+ *
14
+ * Remeda's `prop` is overload-typed for compile-time literal paths and
15
+ * doesn't accept a runtime path array via spread, so we walk inline for
16
+ * the dynamic-path case used by `ph connect config --get`.
17
+ */
18
+ function getAtPath(obj, parts) {
19
+ let cur = obj;
20
+ for (const key of parts) {
21
+ if (cur === null || typeof cur !== "object") return void 0;
22
+ cur = cur[String(key)];
23
+ }
24
+ return cur;
25
+ }
26
+ //#endregion
27
+ //#region src/services/connect-config.ts
28
+ const SOURCE_FILE = "powerhouse.config.json";
29
+ const DEFAULT_DIST_SUBPATH = ".ph/connect-build/dist";
30
+ function resolveSourcePath(cwd) {
31
+ return join(cwd, SOURCE_FILE);
32
+ }
33
+ function resolveDistPath(cwd, distDirArg) {
34
+ const fromArg = distDirArg;
35
+ const fromEnv = process.env.PH_CONNECT_OUTDIR;
36
+ const dir = fromArg ?? fromEnv ?? DEFAULT_DIST_SUBPATH;
37
+ return join(isAbsolute(dir) ? dir : resolve(cwd, dir), SOURCE_FILE);
38
+ }
39
+ /**
40
+ * Read the source file's raw bytes (no merge with defaults). Returns an empty
41
+ * object stub when the file doesn't exist — the operator can config their way
42
+ * to a complete file before ever running `ph connect build`.
43
+ */
44
+ async function readSourceRaw(path) {
45
+ if (!existsSync(path)) return {};
46
+ const raw = await new JsonConfigAdapter({ path }).read();
47
+ return raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
48
+ }
49
+ async function writeSourceRaw(path, next) {
50
+ const adapter = new JsonConfigAdapter({ path });
51
+ const shape = {
52
+ ...next,
53
+ connect: next.connect ?? {}
54
+ };
55
+ await adapter.write(shape);
56
+ }
57
+ /**
58
+ * Build the merged "effective" connect block for list/get mode: defaults <
59
+ * source.connect. Doesn't go through env or dist — list mode shows what the
60
+ * source declares + defaults, which is what the next build will produce as a
61
+ * baseline (before env seeds + CLI overrides).
62
+ */
63
+ function effectiveConnect(source) {
64
+ return deepMerge(DEFAULT_CONNECT_CONFIG, source.connect && typeof source.connect === "object" && !Array.isArray(source.connect) ? source.connect : {});
65
+ }
66
+ function printJson(value) {
67
+ process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
68
+ }
69
+ /**
70
+ * Translate the parsed `ph connect config` args into the structural
71
+ * `ConnectFlagInput` consumed by `buildConnectFlagPatch`. Common-args flags
72
+ * with cmd-ts defaults are gated through `wasFlagExplicitlyPassed` so the
73
+ * defaults don't leak into a write the user didn't request. `--base` is
74
+ * not translated here — it's rejected up front by `runConnectConfig`.
75
+ */
76
+ function argsToFlagInput(args) {
77
+ return {
78
+ renownUrl: args.renownUrl,
79
+ renownNetworkId: args.renownNetworkId,
80
+ renownChainId: args.renownChainId,
81
+ allowAddDrive: args.allowAddDrive,
82
+ externalPackages: args.externalPackages,
83
+ remoteDrivesEnabled: args.remoteDrivesEnabled,
84
+ remoteDrivesAllowAdd: args.remoteDrivesAllowAdd,
85
+ remoteDrivesAllowDelete: args.remoteDrivesAllowDelete,
86
+ localDrivesEnabled: args.localDrivesEnabled,
87
+ localDrivesAllowAdd: args.localDrivesAllowAdd,
88
+ localDrivesAllowDelete: args.localDrivesAllowDelete,
89
+ appName: args.appName,
90
+ homeBackground: args.homeBackground,
91
+ sentryDsn: args.sentryDsn,
92
+ sentryEnv: args.sentryEnv,
93
+ sentryTracingEnabled: args.sentryTracingEnabled,
94
+ logLevel: wasFlagExplicitlyPassed("log-level") ? args.logLevel : void 0,
95
+ defaultDrivesUrl: wasFlagExplicitlyPassed("default-drives-url") ? args.defaultDrivesUrl : void 0,
96
+ drivesPreserveStrategy: wasFlagExplicitlyPassed("drive-preserve-strategy") ? args.drivesPreserveStrategy : void 0
97
+ };
98
+ }
99
+ /**
100
+ * Whether any field flag (any of the 19) was passed. Distinguishes the
101
+ * single-field-set mode from list mode when neither `--get` nor `--json` is
102
+ * present.
103
+ */
104
+ function hasAnyFieldFlag(input) {
105
+ return Object.values(input).some((v) => v !== void 0);
106
+ }
107
+ async function runConnectConfig(args) {
108
+ if (wasFlagExplicitlyPassed("base")) throw new Error("ph connect config: --base is a build-time field; run `ph connect build --base <value>` and redeploy the container (or restart with PH_CONNECT_BASE_PATH=<value> set in the environment).");
109
+ const cwd = process.cwd();
110
+ const sourcePath = resolveSourcePath(cwd);
111
+ const distPath = resolveDistPath(cwd, args.distDir);
112
+ const flagInput = argsToFlagInput(args);
113
+ const hasGet = args.get !== void 0;
114
+ const hasJson = args.json !== void 0;
115
+ const hasFieldFlag = hasAnyFieldFlag(flagInput);
116
+ const explicitRegistry = args.packagesRegistry;
117
+ const hasExplicitRegistry = explicitRegistry !== void 0;
118
+ const hasPositionalKey = args.keyPositional !== void 0;
119
+ const hasPositionalValue = args.valuePositional !== void 0;
120
+ const hasPositional = hasPositionalKey;
121
+ const modeCount = [
122
+ hasPositional,
123
+ hasGet,
124
+ hasJson,
125
+ hasFieldFlag || hasExplicitRegistry
126
+ ].filter(Boolean).length;
127
+ if (modeCount > 1) throw new Error("ph connect config: positional <key>/<value>, --get, --json, and individual field flags are mutually exclusive. Use one mode per invocation.");
128
+ const source = await readSourceRaw(sourcePath);
129
+ if (modeCount === 0) {
130
+ printJson(effectiveConnect(source));
131
+ return;
132
+ }
133
+ if (hasGet || hasPositional && !hasPositionalValue) {
134
+ const rawKey = hasGet ? args.get : args.keyPositional;
135
+ const sourceLabel = hasGet ? "--get" : "<key>";
136
+ const normalized = normalizeKey(rawKey);
137
+ if (!normalized) throw new Error(`ph connect config ${sourceLabel}: key cannot be empty. Pass a dotted path inside connect.* (e.g. connect.renown.url).`);
138
+ if (normalized === "packageRegistryUrl") {
139
+ const value = source.packageRegistryUrl;
140
+ if (value === void 0) throw new Error(`ph connect config ${sourceLabel}: no value at key "${normalized}". Run \`ph connect config\` (no args) to see the available paths.`);
141
+ printJson(value);
142
+ return;
143
+ }
144
+ const value = getAtPath(effectiveConnect(source), stringToPath(normalized));
145
+ if (value === void 0) throw new Error(`ph connect config ${sourceLabel}: no value at key "${normalized}". Run \`ph connect config\` (no args) to see the available paths.`);
146
+ printJson(value);
147
+ return;
148
+ }
149
+ let topLevelRegistry = explicitRegistry;
150
+ let patch;
151
+ if (hasPositional && hasPositionalValue) {
152
+ const normalized = normalizeKey(args.keyPositional);
153
+ if (!normalized) throw new Error("ph connect config <key>: key cannot be empty. Pass a dotted path inside connect.* (e.g. connect.renown.url).");
154
+ if (normalized === "packageRegistryUrl") {
155
+ const parsed = parseCliValue(args.valuePositional);
156
+ if (typeof parsed !== "string") throw new Error(`ph connect config: packageRegistryUrl must be a string (got ${typeof parsed}).`);
157
+ topLevelRegistry = parsed;
158
+ patch = {};
159
+ } else patch = validateConnectKeyValue(normalized, args.valuePositional);
160
+ } else if (hasJson) {
161
+ const validated = validateConnectPatch(args.json);
162
+ if (typeof validated.packageRegistryUrl === "string") topLevelRegistry = topLevelRegistry ?? validated.packageRegistryUrl;
163
+ const connectOnly = { ...validated };
164
+ delete connectOnly.packageRegistryUrl;
165
+ patch = connectOnly;
166
+ } else patch = buildConnectFlagPatch(flagInput);
167
+ if (Object.keys(patch).length === 0 && topLevelRegistry === void 0) throw new Error("ph connect config: nothing to set. Pass at least one field flag (e.g. --renown-url <url>) or --json with a non-empty payload.");
168
+ const nextConnect = deepMerge(source.connect && typeof source.connect === "object" && !Array.isArray(source.connect) ? source.connect : {}, patch);
169
+ const nextSource = {
170
+ ...source,
171
+ connect: nextConnect
172
+ };
173
+ if (topLevelRegistry !== void 0) nextSource.packageRegistryUrl = topLevelRegistry;
174
+ await writeSourceRaw(sourcePath, nextSource);
175
+ if (existsSync(distPath)) {
176
+ const distLoader = new ConfigLoader(new JsonConfigAdapter({ path: distPath }));
177
+ const distPatch = { connect: patch };
178
+ if (topLevelRegistry !== void 0) distPatch.packageRegistryUrl = topLevelRegistry;
179
+ await distLoader.write(distPatch);
180
+ }
181
+ process.stdout.write(`ph connect config: wrote ${sourcePath}${existsSync(distPath) ? ` and ${distPath}` : ""}\n`);
182
+ }
183
+ //#endregion
184
+ export { runConnectConfig };
185
+
186
+ //# sourceMappingURL=connect-config-DQcIDdtP.mjs.map
187
+ //# debugId=388bfdf9-8b0c-5eb7-a80f-e68612f686be
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-config-DQcIDdtP.mjs","sources":["../src/utils/get-at-path.ts","../src/services/connect-config.ts"],"sourcesContent":["/**\n * Walk a parsed path (e.g. from remeda's `stringToPath`) through a runtime-\n * typed object, returning the value or `undefined` if any segment is\n * missing.\n *\n * Remeda's `prop` is overload-typed for compile-time literal paths and\n * doesn't accept a runtime path array via spread, so we walk inline for\n * the dynamic-path case used by `ph connect config --get`.\n */\nexport function getAtPath(\n obj: unknown,\n parts: ReadonlyArray<string | number>,\n): unknown {\n let cur: unknown = obj;\n for (const key of parts) {\n if (cur === null || typeof cur !== \"object\") return undefined;\n cur = (cur as Record<string, unknown>)[String(key)];\n }\n return cur;\n}\n","// `ph connect config` — read or update Connect's runtime configuration.\n//\n// Mode dispatch (exactly one mode per invocation; mutex enforced below):\n//\n// ph connect config → list mode (print effective merged config)\n// ph connect config <key> → get mode (positional)\n// ph connect config --get <dotted.path> → get mode (flag form, equivalent)\n// ph connect config <key> <value> → set mode (positional, dual-write source + dist)\n// ph connect config --<field> <value> → set mode (flag form)\n// ph connect config --json '{...}' → bulk-set mode (dual-write)\n//\n// Dual-write semantics for set / bulk-set:\n// - Source `powerhouse.config.json` (project root) gets the connect.* patch\n// deep-merged into `connect.*`. `--packages-registry` lands at the\n// top-level `packageRegistryUrl` field (project-wide setting, also read\n// by `ph install` / `ph publish` / Switchboard).\n// - Dist `powerhouse.config.json` (default `.ph/connect-build/dist/`) gets\n// the same connect.* patch deep-merged in, and the same top-level\n// `packageRegistryUrl` if set. The runtime schema mirrors the source\n// schema, so the field lives at the same path in both files.\n//\n// The dist write is skipped silently if the dist file doesn't exist — that's\n// the \"config-only-before-first-build\" workflow, not an error.\n//\n// Field flags + the 4 commonArgs flags (base, log-level, default-drives-url,\n// drive-preserve-strategy) come from the same source as `ph connect build`'s\n// flags, so the two commands share identical CLI surfaces. The 4 commonArgs\n// flags carry cmd-ts defaults; we gate them through `wasFlagExplicitlyPassed`\n// for the same reason `buildCliConnectOverride` does — to avoid leaking\n// default values into a write the user didn't request.\n\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport {\n ConfigLoader,\n DEFAULT_CONNECT_CONFIG,\n JsonConfigAdapter,\n deepMerge,\n} from \"@powerhousedao/shared/connect\";\nimport { existsSync } from \"node:fs\";\nimport { isAbsolute, join, resolve } from \"node:path\";\nimport { stringToPath } from \"remeda\";\nimport type { ConnectConfigArgs } from \"../types.js\";\nimport {\n buildConnectFlagPatch,\n wasFlagExplicitlyPassed,\n type ConnectFlagInput,\n} from \"../utils/cli-connect-override.js\";\nimport {\n normalizeKey,\n parseCliValue,\n validateConnectKeyValue,\n validateConnectPatch,\n} from \"../utils/connect-config-validation.js\";\nimport { getAtPath } from \"../utils/get-at-path.js\";\n\ntype ConnectPartial = Partial<PHConnectRuntimeConfig>;\n\nconst SOURCE_FILE = \"powerhouse.config.json\";\nconst DEFAULT_DIST_SUBPATH = \".ph/connect-build/dist\";\n\nfunction resolveSourcePath(cwd: string): string {\n return join(cwd, SOURCE_FILE);\n}\n\nfunction resolveDistPath(cwd: string, distDirArg: string | undefined): string {\n const fromArg = distDirArg;\n const fromEnv = process.env.PH_CONNECT_OUTDIR;\n const dir = fromArg ?? fromEnv ?? DEFAULT_DIST_SUBPATH;\n const abs = isAbsolute(dir) ? dir : resolve(cwd, dir);\n return join(abs, SOURCE_FILE);\n}\n\n/**\n * Read the source file's raw bytes (no merge with defaults). Returns an empty\n * object stub when the file doesn't exist — the operator can config their way\n * to a complete file before ever running `ph connect build`.\n */\nasync function readSourceRaw(path: string): Promise<Record<string, unknown>> {\n if (!existsSync(path)) return {};\n const adapter = new JsonConfigAdapter({ path });\n const raw = await adapter.read();\n return raw && typeof raw === \"object\" && !Array.isArray(raw)\n ? (raw as Record<string, unknown>)\n : {};\n}\n\nasync function writeSourceRaw(\n path: string,\n next: Record<string, unknown>,\n): Promise<void> {\n const adapter = new JsonConfigAdapter({ path });\n // ConfigShape requires a `connect` key; ensure it's present.\n const shape = {\n ...next,\n connect: (next.connect as PHConnectRuntimeConfig | undefined) ?? {},\n };\n await adapter.write(shape);\n}\n\n/**\n * Build the merged \"effective\" connect block for list/get mode: defaults <\n * source.connect. Doesn't go through env or dist — list mode shows what the\n * source declares + defaults, which is what the next build will produce as a\n * baseline (before env seeds + CLI overrides).\n */\nfunction effectiveConnect(\n source: Record<string, unknown>,\n): PHConnectRuntimeConfig {\n const sourceConnect =\n source.connect &&\n typeof source.connect === \"object\" &&\n !Array.isArray(source.connect)\n ? (source.connect as ConnectPartial)\n : {};\n return deepMerge(DEFAULT_CONNECT_CONFIG, sourceConnect);\n}\n\nfunction printJson(value: unknown): void {\n process.stdout.write(`${JSON.stringify(value, null, 2)}\\n`);\n}\n\n/**\n * Translate the parsed `ph connect config` args into the structural\n * `ConnectFlagInput` consumed by `buildConnectFlagPatch`. Common-args flags\n * with cmd-ts defaults are gated through `wasFlagExplicitlyPassed` so the\n * defaults don't leak into a write the user didn't request. `--base` is\n * not translated here — it's rejected up front by `runConnectConfig`.\n */\nfunction argsToFlagInput(args: ConnectConfigArgs): ConnectFlagInput {\n return {\n renownUrl: args.renownUrl,\n renownNetworkId: args.renownNetworkId,\n renownChainId: args.renownChainId,\n allowAddDrive: args.allowAddDrive,\n externalPackages: args.externalPackages,\n remoteDrivesEnabled: args.remoteDrivesEnabled,\n remoteDrivesAllowAdd: args.remoteDrivesAllowAdd,\n remoteDrivesAllowDelete: args.remoteDrivesAllowDelete,\n localDrivesEnabled: args.localDrivesEnabled,\n localDrivesAllowAdd: args.localDrivesAllowAdd,\n localDrivesAllowDelete: args.localDrivesAllowDelete,\n appName: args.appName,\n homeBackground: args.homeBackground,\n sentryDsn: args.sentryDsn,\n sentryEnv: args.sentryEnv,\n sentryTracingEnabled: args.sentryTracingEnabled,\n logLevel: wasFlagExplicitlyPassed(\"log-level\") ? args.logLevel : undefined,\n defaultDrivesUrl: wasFlagExplicitlyPassed(\"default-drives-url\")\n ? args.defaultDrivesUrl\n : undefined,\n drivesPreserveStrategy: wasFlagExplicitlyPassed(\"drive-preserve-strategy\")\n ? args.drivesPreserveStrategy\n : undefined,\n };\n}\n\n/**\n * Whether any field flag (any of the 19) was passed. Distinguishes the\n * single-field-set mode from list mode when neither `--get` nor `--json` is\n * present.\n */\nfunction hasAnyFieldFlag(input: ConnectFlagInput): boolean {\n // Object.values doesn't include json (which isn't in ConnectFlagInput here).\n // Cast to a generic record so the `!== undefined` predicate is type-aware:\n // ConnectFlagInput's optional properties narrow `v` in a way TS thinks\n // excludes `undefined`, even though at runtime any of them can be unset.\n return Object.values(input as Record<string, unknown>).some(\n (v) => v !== undefined,\n );\n}\n\nexport async function runConnectConfig(args: ConnectConfigArgs): Promise<void> {\n // `--base` is a build-time field (baked into the Vite bundle's asset URLs\n // and the nginx config template), so writing it post-build leaves the\n // layers disagreeing and the SPA's assets 404. The flag stays declared so\n // cmd-ts parses it; we reject explicit use here with an actionable error.\n if (wasFlagExplicitlyPassed(\"base\")) {\n throw new Error(\n \"ph connect config: --base is a build-time field; run `ph connect build --base <value>` and redeploy the container (or restart with PH_CONNECT_BASE_PATH=<value> set in the environment).\",\n );\n }\n\n const cwd = process.cwd();\n const sourcePath = resolveSourcePath(cwd);\n const distPath = resolveDistPath(cwd, args.distDir);\n\n const flagInput = argsToFlagInput(args);\n const hasGet = args.get !== undefined;\n const hasJson = args.json !== undefined;\n const hasFieldFlag = hasAnyFieldFlag(flagInput);\n // `--packages-registry` is a top-level field, not part of the connect-flag\n // patch. Track it separately so the set-mode write puts it in the right\n // place and the mutex counts it as a \"field flag\".\n const explicitRegistry = args.packagesRegistry;\n const hasExplicitRegistry = explicitRegistry !== undefined;\n // Positional pair: 1 positional = get, 2 = set. cmd-ts assigns the first\n // positional to `keyPositional` and the second to `valuePositional`, so a\n // standalone <value> isn't representable here.\n const hasPositionalKey = args.keyPositional !== undefined;\n const hasPositionalValue = args.valuePositional !== undefined;\n const hasPositional = hasPositionalKey;\n\n // Mutex: positional / --get / --json / (any field flag OR\n // --packages-registry) are mutually exclusive. Exactly one mode (or none →\n // list) per call. Counting positional as a single mode regardless of arity:\n // a `<key>` alone is a get, `<key> <value>` is a set, both occupy the same\n // \"positional mode\" slot vs. the other forms.\n const modeCount = [\n hasPositional,\n hasGet,\n hasJson,\n hasFieldFlag || hasExplicitRegistry,\n ].filter(Boolean).length;\n if (modeCount > 1) {\n throw new Error(\n \"ph connect config: positional <key>/<value>, --get, --json, and individual field flags are mutually exclusive. Use one mode per invocation.\",\n );\n }\n\n const source = await readSourceRaw(sourcePath);\n\n // List mode.\n if (modeCount === 0) {\n printJson(effectiveConnect(source));\n return;\n }\n\n // Get mode (either positional `<key>` alone or `--get <key>`).\n if (hasGet || (hasPositional && !hasPositionalValue)) {\n const rawKey = hasGet ? args.get! : args.keyPositional!;\n const sourceLabel = hasGet ? \"--get\" : \"<key>\";\n const normalized = normalizeKey(rawKey);\n if (!normalized) {\n throw new Error(\n `ph connect config ${sourceLabel}: key cannot be empty. Pass a dotted path inside connect.* (e.g. connect.renown.url).`,\n );\n }\n // `packageRegistryUrl` is a top-level field — look it up on the raw\n // source object, not inside `effectiveConnect`.\n if (normalized === \"packageRegistryUrl\") {\n const value = source.packageRegistryUrl;\n if (value === undefined) {\n throw new Error(\n `ph connect config ${sourceLabel}: no value at key \"${normalized}\". Run \\`ph connect config\\` (no args) to see the available paths.`,\n );\n }\n printJson(value);\n return;\n }\n const value = getAtPath(effectiveConnect(source), stringToPath(normalized));\n if (value === undefined) {\n throw new Error(\n `ph connect config ${sourceLabel}: no value at key \"${normalized}\". Run \\`ph connect config\\` (no args) to see the available paths.`,\n );\n }\n printJson(value);\n return;\n }\n\n // Set / bulk-set mode. Build the connect-side patch from positional\n // `<key> <value>` (Ajv-validated against the schema at that path), --json\n // (Ajv-validated as a partial connect.* blob), or individual field flags\n // (shape guaranteed by cmd-ts type coercion). `--packages-registry` is a\n // top-level field; if positional `<key>` is `packageRegistryUrl` or --json\n // carries it, route that to the top-level write.\n let topLevelRegistry: string | undefined = explicitRegistry;\n let patch: ConnectPartial;\n if (hasPositional && hasPositionalValue) {\n const normalized = normalizeKey(args.keyPositional!);\n if (!normalized) {\n throw new Error(\n \"ph connect config <key>: key cannot be empty. Pass a dotted path inside connect.* (e.g. connect.renown.url).\",\n );\n }\n // Top-level: positional `packageRegistryUrl <value>` writes the top-level\n // field instead of a connect.* path.\n if (normalized === \"packageRegistryUrl\") {\n const parsed = parseCliValue(args.valuePositional!);\n if (typeof parsed !== \"string\") {\n throw new Error(\n `ph connect config: packageRegistryUrl must be a string (got ${typeof parsed}).`,\n );\n }\n topLevelRegistry = parsed;\n patch = {};\n } else {\n patch = validateConnectKeyValue(\n normalized,\n args.valuePositional!,\n ) as ConnectPartial;\n }\n } else if (hasJson) {\n const validated = validateConnectPatch(args.json!) as Record<\n string,\n unknown\n >;\n if (typeof validated.packageRegistryUrl === \"string\") {\n topLevelRegistry = topLevelRegistry ?? validated.packageRegistryUrl;\n }\n const connectOnly = { ...validated };\n delete connectOnly.packageRegistryUrl;\n patch = connectOnly as ConnectPartial;\n } else {\n patch = buildConnectFlagPatch(flagInput) as ConnectPartial;\n }\n\n if (Object.keys(patch).length === 0 && topLevelRegistry === undefined) {\n throw new Error(\n \"ph connect config: nothing to set. Pass at least one field flag (e.g. --renown-url <url>) or --json with a non-empty payload.\",\n );\n }\n\n // Build the next source: top-level packageRegistryUrl (if set) +\n // connect.* deep-merge.\n const currentConnect =\n source.connect &&\n typeof source.connect === \"object\" &&\n !Array.isArray(source.connect)\n ? (source.connect as PHConnectRuntimeConfig)\n : ({} as PHConnectRuntimeConfig);\n const nextConnect = deepMerge(\n currentConnect,\n patch as PHConnectRuntimeConfig,\n );\n const nextSource: Record<string, unknown> = {\n ...source,\n connect: nextConnect,\n };\n if (topLevelRegistry !== undefined) {\n nextSource.packageRegistryUrl = topLevelRegistry;\n }\n\n await writeSourceRaw(sourcePath, nextSource);\n\n // Dual-write to dist if it exists. Same shape as source: connect.* block\n // is deep-merged; top-level `packageRegistryUrl` is set in place.\n if (existsSync(distPath)) {\n const distLoader = new ConfigLoader(\n new JsonConfigAdapter({ path: distPath }),\n );\n const distPatch: Record<string, unknown> = { connect: patch };\n if (topLevelRegistry !== undefined) {\n distPatch.packageRegistryUrl = topLevelRegistry;\n }\n await distLoader.write(distPatch);\n }\n\n process.stdout.write(\n `ph connect config: wrote ${sourcePath}${existsSync(distPath) ? ` and ${distPath}` : \"\"}\\n`,\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AASA,SAAgB,UACd,KACA,OACS;CACT,IAAI,MAAe;AACnB,MAAK,MAAM,OAAO,OAAO;AACvB,MAAI,QAAQ,QAAQ,OAAO,QAAQ,SAAU,QAAO,KAAA;AACpD,QAAO,IAAgC,OAAO,IAAI;;AAEpD,QAAO;;;;ACuCT,MAAM,cAAc;AACpB,MAAM,uBAAuB;AAE7B,SAAS,kBAAkB,KAAqB;AAC9C,QAAO,KAAK,KAAK,YAAY;;AAG/B,SAAS,gBAAgB,KAAa,YAAwC;CAC5E,MAAM,UAAU;CAChB,MAAM,UAAU,QAAQ,IAAI;CAC5B,MAAM,MAAM,WAAW,WAAW;AAElC,QAAO,KADK,WAAW,IAAI,GAAG,MAAM,QAAQ,KAAK,IAAI,EACpC,YAAY;;;;;;;AAQ/B,eAAe,cAAc,MAAgD;AAC3E,KAAI,CAAC,WAAW,KAAK,CAAE,QAAO,EAAE;CAEhC,MAAM,MAAM,MADI,IAAI,kBAAkB,EAAE,MAAM,CAAC,CACrB,MAAM;AAChC,QAAO,OAAO,OAAO,QAAQ,YAAY,CAAC,MAAM,QAAQ,IAAI,GACvD,MACD,EAAE;;AAGR,eAAe,eACb,MACA,MACe;CACf,MAAM,UAAU,IAAI,kBAAkB,EAAE,MAAM,CAAC;CAE/C,MAAM,QAAQ;EACZ,GAAG;EACH,SAAU,KAAK,WAAkD,EAAE;EACpE;AACD,OAAM,QAAQ,MAAM,MAAM;;;;;;;;AAS5B,SAAS,iBACP,QACwB;AAOxB,QAAO,UAAU,wBALf,OAAO,WACP,OAAO,OAAO,YAAY,YAC1B,CAAC,MAAM,QAAQ,OAAO,QAAQ,GACzB,OAAO,UACR,EAAE,CAC+C;;AAGzD,SAAS,UAAU,OAAsB;AACvC,SAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,OAAO,MAAM,EAAE,CAAC,IAAI;;;;;;;;;AAU7D,SAAS,gBAAgB,MAA2C;AAClE,QAAO;EACL,WAAW,KAAK;EAChB,iBAAiB,KAAK;EACtB,eAAe,KAAK;EACpB,eAAe,KAAK;EACpB,kBAAkB,KAAK;EACvB,qBAAqB,KAAK;EAC1B,sBAAsB,KAAK;EAC3B,yBAAyB,KAAK;EAC9B,oBAAoB,KAAK;EACzB,qBAAqB,KAAK;EAC1B,wBAAwB,KAAK;EAC7B,SAAS,KAAK;EACd,gBAAgB,KAAK;EACrB,WAAW,KAAK;EAChB,WAAW,KAAK;EAChB,sBAAsB,KAAK;EAC3B,UAAU,wBAAwB,YAAY,GAAG,KAAK,WAAW,KAAA;EACjE,kBAAkB,wBAAwB,qBAAqB,GAC3D,KAAK,mBACL,KAAA;EACJ,wBAAwB,wBAAwB,0BAA0B,GACtE,KAAK,yBACL,KAAA;EACL;;;;;;;AAQH,SAAS,gBAAgB,OAAkC;AAKzD,QAAO,OAAO,OAAO,MAAiC,CAAC,MACpD,MAAM,MAAM,KAAA,EACd;;AAGH,eAAsB,iBAAiB,MAAwC;AAK7E,KAAI,wBAAwB,OAAO,CACjC,OAAM,IAAI,MACR,2LACD;CAGH,MAAM,MAAM,QAAQ,KAAK;CACzB,MAAM,aAAa,kBAAkB,IAAI;CACzC,MAAM,WAAW,gBAAgB,KAAK,KAAK,QAAQ;CAEnD,MAAM,YAAY,gBAAgB,KAAK;CACvC,MAAM,SAAS,KAAK,QAAQ,KAAA;CAC5B,MAAM,UAAU,KAAK,SAAS,KAAA;CAC9B,MAAM,eAAe,gBAAgB,UAAU;CAI/C,MAAM,mBAAmB,KAAK;CAC9B,MAAM,sBAAsB,qBAAqB,KAAA;CAIjD,MAAM,mBAAmB,KAAK,kBAAkB,KAAA;CAChD,MAAM,qBAAqB,KAAK,oBAAoB,KAAA;CACpD,MAAM,gBAAgB;CAOtB,MAAM,YAAY;EAChB;EACA;EACA;EACA,gBAAgB;EACjB,CAAC,OAAO,QAAQ,CAAC;AAClB,KAAI,YAAY,EACd,OAAM,IAAI,MACR,8IACD;CAGH,MAAM,SAAS,MAAM,cAAc,WAAW;AAG9C,KAAI,cAAc,GAAG;AACnB,YAAU,iBAAiB,OAAO,CAAC;AACnC;;AAIF,KAAI,UAAW,iBAAiB,CAAC,oBAAqB;EACpD,MAAM,SAAS,SAAS,KAAK,MAAO,KAAK;EACzC,MAAM,cAAc,SAAS,UAAU;EACvC,MAAM,aAAa,aAAa,OAAO;AACvC,MAAI,CAAC,WACH,OAAM,IAAI,MACR,qBAAqB,YAAY,uFAClC;AAIH,MAAI,eAAe,sBAAsB;GACvC,MAAM,QAAQ,OAAO;AACrB,OAAI,UAAU,KAAA,EACZ,OAAM,IAAI,MACR,qBAAqB,YAAY,qBAAqB,WAAW,oEAClE;AAEH,aAAU,MAAM;AAChB;;EAEF,MAAM,QAAQ,UAAU,iBAAiB,OAAO,EAAE,aAAa,WAAW,CAAC;AAC3E,MAAI,UAAU,KAAA,EACZ,OAAM,IAAI,MACR,qBAAqB,YAAY,qBAAqB,WAAW,oEAClE;AAEH,YAAU,MAAM;AAChB;;CASF,IAAI,mBAAuC;CAC3C,IAAI;AACJ,KAAI,iBAAiB,oBAAoB;EACvC,MAAM,aAAa,aAAa,KAAK,cAAe;AACpD,MAAI,CAAC,WACH,OAAM,IAAI,MACR,+GACD;AAIH,MAAI,eAAe,sBAAsB;GACvC,MAAM,SAAS,cAAc,KAAK,gBAAiB;AACnD,OAAI,OAAO,WAAW,SACpB,OAAM,IAAI,MACR,+DAA+D,OAAO,OAAO,IAC9E;AAEH,sBAAmB;AACnB,WAAQ,EAAE;QAEV,SAAQ,wBACN,YACA,KAAK,gBACN;YAEM,SAAS;EAClB,MAAM,YAAY,qBAAqB,KAAK,KAAM;AAIlD,MAAI,OAAO,UAAU,uBAAuB,SAC1C,oBAAmB,oBAAoB,UAAU;EAEnD,MAAM,cAAc,EAAE,GAAG,WAAW;AACpC,SAAO,YAAY;AACnB,UAAQ;OAER,SAAQ,sBAAsB,UAAU;AAG1C,KAAI,OAAO,KAAK,MAAM,CAAC,WAAW,KAAK,qBAAqB,KAAA,EAC1D,OAAM,IAAI,MACR,gIACD;CAWH,MAAM,cAAc,UALlB,OAAO,WACP,OAAO,OAAO,YAAY,YAC1B,CAAC,MAAM,QAAQ,OAAO,QAAQ,GACzB,OAAO,UACP,EAAE,EAGP,MACD;CACD,MAAM,aAAsC;EAC1C,GAAG;EACH,SAAS;EACV;AACD,KAAI,qBAAqB,KAAA,EACvB,YAAW,qBAAqB;AAGlC,OAAM,eAAe,YAAY,WAAW;AAI5C,KAAI,WAAW,SAAS,EAAE;EACxB,MAAM,aAAa,IAAI,aACrB,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC,CAC1C;EACD,MAAM,YAAqC,EAAE,SAAS,OAAO;AAC7D,MAAI,qBAAqB,KAAA,EACvB,WAAU,qBAAqB;AAEjC,QAAM,WAAW,MAAM,UAAU;;AAGnC,SAAQ,OAAO,MACb,4BAA4B,aAAa,WAAW,SAAS,GAAG,QAAQ,aAAa,GAAG,IACzF","debug_id":"388bfdf9-8b0c-5eb7-a80f-e68612f686be"}
@@ -1,12 +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]="445cdee7-0b65-5aa9-b920-450f0c4535ed")}catch(e){}}();
3
- import { t as assignEnvVars } from "./assign-env-vars-W-lZmdMi.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]="5877d557-b1df-5b0d-89b6-15f3734283bf")}catch(e){}}();
4
3
  import { getConnectBaseViteConfig } from "@powerhousedao/builder-tools";
5
4
  import { mergeConfig, preview } from "vite";
6
5
  //#region src/services/connect-preview.ts
7
6
  async function runConnectPreview(args) {
8
- const { outDir, connectBasePath, port, host, open, cors, strictPort, printUrls, bindCLIShortcuts } = args;
9
- assignEnvVars(args);
7
+ const { outDir, port, host, open, cors, strictPort, printUrls, bindCLIShortcuts } = args;
10
8
  const server = await preview(mergeConfig(getConnectBaseViteConfig({
11
9
  mode: "production",
12
10
  dirname: process.cwd()
@@ -26,5 +24,5 @@ async function runConnectPreview(args) {
26
24
  //#endregion
27
25
  export { runConnectPreview };
28
26
 
29
- //# sourceMappingURL=connect-preview-CNJkhtxL.mjs.map
30
- //# debugId=445cdee7-0b65-5aa9-b920-450f0c4535ed
27
+ //# sourceMappingURL=connect-preview-D7ypzFDc.mjs.map
28
+ //# debugId=5877d557-b1df-5b0d-89b6-15f3734283bf
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-preview-D7ypzFDc.mjs","sources":["../src/services/connect-preview.ts"],"sourcesContent":["import { getConnectBaseViteConfig } from \"@powerhousedao/builder-tools\";\nimport type { InlineConfig } from \"vite\";\nimport { mergeConfig, preview } from \"vite\";\nimport type { ConnectPreviewArgs } from \"../types.js\";\n\nexport async function runConnectPreview(args: ConnectPreviewArgs) {\n const {\n outDir,\n port,\n host,\n open,\n cors,\n strictPort,\n printUrls,\n bindCLIShortcuts,\n } = args;\n\n const mode = \"production\";\n\n const dirname = process.cwd();\n\n const baseConfig = getConnectBaseViteConfig({\n mode,\n dirname,\n });\n\n const previewConfig: InlineConfig = {\n build: {\n outDir,\n },\n preview: {\n cors,\n port,\n strictPort,\n host,\n open,\n },\n };\n\n const config = mergeConfig(baseConfig, previewConfig);\n\n const server = await preview(config);\n\n if (printUrls) server.printUrls();\n if (bindCLIShortcuts) server.bindCLIShortcuts({ print: true });\n}\n"],"names":[],"mappings":";;;;;AAKA,eAAsB,kBAAkB,MAA0B;CAChE,MAAM,EACJ,QACA,MACA,MACA,MACA,MACA,YACA,WACA,qBACE;CA0BJ,MAAM,SAAS,MAAM,QAFN,YAlBI,yBAAyB;EAC1C,MALW;EAMX,SAJc,QAAQ,KAAK;EAK5B,CAAC,EAEkC;EAClC,OAAO,EACL,QACD;EACD,SAAS;GACP;GACA;GACA;GACA;GACA;GACD;EACF,CAEoD,CAEjB;AAEpC,KAAI,UAAW,QAAO,WAAW;AACjC,KAAI,iBAAkB,QAAO,iBAAiB,EAAE,OAAO,MAAM,CAAC","debug_id":"5877d557-b1df-5b0d-89b6-15f3734283bf"}
@@ -1,15 +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]="663fea9f-e95e-5ea2-86ee-4372f32e0325")}catch(e){}}();
3
- import { t as assignEnvVars } from "./assign-env-vars-W-lZmdMi.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]="f0e7b6f3-567e-55b6-be6b-65155652af0c")}catch(e){}}();
3
+ import { r as buildStudioConnectOverride } from "./cli-connect-override-DHpuwyEn.mjs";
4
4
  import { getConnectBaseViteConfig } from "@powerhousedao/builder-tools";
5
5
  import { createServer, mergeConfig } from "vite";
6
6
  //#region src/services/connect-studio.ts
7
- async function runConnectStudio(args, customLogger) {
7
+ async function runConnectStudio(args, customLogger, callerOverride) {
8
8
  const { port, host, open, cors, strictPort, printUrls, bindCLIShortcuts } = args;
9
- assignEnvVars(args);
10
9
  const server = await createServer(mergeConfig(getConnectBaseViteConfig({
11
10
  mode: "development",
12
- dirname: process.cwd()
11
+ dirname: process.cwd(),
12
+ cliConnectOverride: buildStudioConnectOverride(args, callerOverride)
13
13
  }), {
14
14
  server: {
15
15
  port,
@@ -27,5 +27,5 @@ async function runConnectStudio(args, customLogger) {
27
27
  //#endregion
28
28
  export { runConnectStudio as t };
29
29
 
30
- //# sourceMappingURL=connect-studio-DTdSFftL.mjs.map
31
- //# debugId=663fea9f-e95e-5ea2-86ee-4372f32e0325
30
+ //# sourceMappingURL=connect-studio-BbxxxUZ9.mjs.map
31
+ //# debugId=f0e7b6f3-567e-55b6-be6b-65155652af0c
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-studio-BbxxxUZ9.mjs","sources":["../src/services/connect-studio.ts"],"sourcesContent":["import { getConnectBaseViteConfig } from \"@powerhousedao/builder-tools\";\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type { InlineConfig, Logger } from \"vite\";\nimport { createServer, mergeConfig } from \"vite\";\nimport type { ConnectStudioArgs } from \"../types.js\";\nimport { buildStudioConnectOverride } from \"../utils/cli-connect-override.js\";\n\nexport async function runConnectStudio(\n args: ConnectStudioArgs,\n customLogger?: Logger,\n callerOverride?: PHConnectRuntimeConfig,\n) {\n const { port, host, open, cors, strictPort, printUrls, bindCLIShortcuts } =\n args;\n const mode = \"development\";\n\n const dirname = process.cwd();\n\n const cliConnectOverride = buildStudioConnectOverride(args, callerOverride);\n\n const baseConfig = getConnectBaseViteConfig({\n mode,\n dirname,\n cliConnectOverride,\n });\n\n const devServerConfig: InlineConfig = {\n server: { port, host, open, cors, strictPort },\n customLogger,\n };\n\n const config = mergeConfig(baseConfig, devServerConfig);\n\n const server = await createServer(config);\n\n await server.listen();\n\n if (printUrls) server.printUrls();\n if (bindCLIShortcuts) server.bindCLIShortcuts({ print: true });\n}\n"],"names":[],"mappings":";;;;;;AAOA,eAAsB,iBACpB,MACA,cACA,gBACA;CACA,MAAM,EAAE,MAAM,MAAM,MAAM,MAAM,YAAY,WAAW,qBACrD;CAoBF,MAAM,SAAS,MAAM,aAFN,YAXI,yBAAyB;EAC1C,MAPW;EAQX,SANc,QAAQ,KAAK;EAO3B,oBALyB,2BAA2B,MAAM,eAAe;EAM1E,CAAC,EAEoC;EACpC,QAAQ;GAAE;GAAM;GAAM;GAAM;GAAM;GAAY;EAC9C;EACD,CAEsD,CAEd;AAEzC,OAAM,OAAO,QAAQ;AAErB,KAAI,UAAW,QAAO,WAAW;AACjC,KAAI,iBAAkB,QAAO,iBAAiB,EAAE,OAAO,MAAM,CAAC","debug_id":"f0e7b6f3-567e-55b6-be6b-65155652af0c"}
@@ -0,0 +1,5 @@
1
+ import "./cli-connect-override-DHpuwyEn.mjs";
2
+ import { t as runConnectStudio } from "./connect-studio-BbxxxUZ9.mjs";
3
+ export { runConnectStudio };
4
+ !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]="d64bc1bd-e39d-5390-b172-d5b612d1d785")}catch(e){}}();
5
+ //# debugId=d64bc1bd-e39d-5390-b172-d5b612d1d785
@@ -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]="709ef284-6ac4-5626-b591-995758ee326f")}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]="2eb000ae-11e6-56a4-ab3f-b10dbab4f7dd")}catch(e){}}();
3
3
  import { generateAll } from "@powerhousedao/codegen";
4
4
  import { buildTsMorphProject } from "@powerhousedao/codegen/utils";
5
5
  import { extractAllDocuments, saveSpec } from "@powerhousedao/vetra/codegen";
@@ -26,5 +26,5 @@ async function startGenerateAll(args, projectDir) {
26
26
  //#endregion
27
27
  export { startGenerateAll };
28
28
 
29
- //# sourceMappingURL=generate-all-WiQQo-Nz.mjs.map
30
- //# debugId=709ef284-6ac4-5626-b591-995758ee326f
29
+ //# sourceMappingURL=generate-all-DrT4ZxHX.mjs.map
30
+ //# debugId=2eb000ae-11e6-56a4-ab3f-b10dbab4f7dd
@@ -1 +1 @@
1
- {"version":3,"file":"generate-all-WiQQo-Nz.mjs","sources":["../src/services/generate-all.ts"],"sourcesContent":["import { generateAll } from \"@powerhousedao/codegen\";\nimport { buildTsMorphProject } from \"@powerhousedao/codegen/utils\";\nimport { extractAllDocuments, saveSpec } from \"@powerhousedao/vetra/codegen\";\n\nexport async function startGenerateAll(\n args: { extract?: boolean },\n projectDir: string,\n) {\n const project = buildTsMorphProject(projectDir);\n if (args.extract) {\n const all = extractAllDocuments(project);\n for (const doc of [\n ...all.documentModels,\n ...all.editors,\n ...all.processors,\n ...all.subgraphs,\n ...all.apps,\n ]) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n await generateAll(project);\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;AAIA,eAAsB,iBACpB,MACA,YACA;CACA,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,KAAK,SAAS;EAChB,MAAM,MAAM,oBAAoB,QAAQ;AACxC,OAAK,MAAM,OAAO;GAChB,GAAG,IAAI;GACP,GAAG,IAAI;GACP,GAAG,IAAI;GACP,GAAG,IAAI;GACP,GAAG,IAAI;GACR,EAAE;GACD,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,OAAM,YAAY,QAAQ;AAC1B,OAAM,QAAQ,MAAM","debug_id":"709ef284-6ac4-5626-b591-995758ee326f"}
1
+ {"version":3,"file":"generate-all-DrT4ZxHX.mjs","sources":["../src/services/generate-all.ts"],"sourcesContent":["import { generateAll } from \"@powerhousedao/codegen\";\nimport { buildTsMorphProject } from \"@powerhousedao/codegen/utils\";\nimport { extractAllDocuments, saveSpec } from \"@powerhousedao/vetra/codegen\";\n\nexport async function startGenerateAll(\n args: { extract?: boolean },\n projectDir: string,\n) {\n const project = buildTsMorphProject(projectDir);\n if (args.extract) {\n const all = extractAllDocuments(project);\n for (const doc of [\n ...all.documentModels,\n ...all.editors,\n ...all.processors,\n ...all.subgraphs,\n ...all.apps,\n ]) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n await generateAll(project);\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;AAIA,eAAsB,iBACpB,MACA,YACA;CACA,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,KAAK,SAAS;EAChB,MAAM,MAAM,oBAAoB,QAAQ;AACxC,OAAK,MAAM,OAAO;GAChB,GAAG,IAAI;GACP,GAAG,IAAI;GACP,GAAG,IAAI;GACP,GAAG,IAAI;GACP,GAAG,IAAI;GACR,EAAE;GACD,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,OAAM,YAAY,QAAQ;AAC1B,OAAM,QAAQ,MAAM","debug_id":"2eb000ae-11e6-56a4-ab3f-b10dbab4f7dd"}
@@ -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]="4f6a5431-463c-5901-852e-2dcbe4c02454")}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]="8a26ffc1-1c2d-5f4a-91a0-d7a95edc34be")}catch(e){}}();
3
3
  import { dirname } from "node:path";
4
4
  import { generateAllApps, generateApp } from "@powerhousedao/codegen";
5
5
  import { buildTsMorphProject, getAppMetadata } from "@powerhousedao/codegen/utils";
@@ -44,5 +44,5 @@ async function startGenerateApp(args, projectDir) {
44
44
  //#endregion
45
45
  export { startGenerateApp };
46
46
 
47
- //# sourceMappingURL=generate-app-DdmOt6ID.mjs.map
48
- //# debugId=4f6a5431-463c-5901-852e-2dcbe4c02454
47
+ //# sourceMappingURL=generate-app-DNNqA-H3.mjs.map
48
+ //# debugId=8a26ffc1-1c2d-5f4a-91a0-d7a95edc34be
@@ -1 +1 @@
1
- {"version":3,"file":"generate-app-DdmOt6ID.mjs","sources":["../src/services/generate-app.ts"],"sourcesContent":["import { generateAllApps, generateApp } from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getAppMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractAppDocuments,\n generateAppFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { AppModuleDocument } from \"@powerhousedao/vetra/document-models/app-module\";\nimport { dirname } from \"node:path\";\nimport type { GenerateAppArgs } from \"../types.js\";\n\nexport async function startGenerateApp(\n args: GenerateAppArgs,\n projectDir: string,\n) {\n const {\n name,\n allowedDocumentTypes = [],\n disableDragAndDrop,\n document,\n dir,\n all,\n extract,\n debug,\n } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractAppDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllApps(project);\n } else if (document) {\n const doc = (await getDocument(document)) as AppModuleDocument;\n await generateAppFromDocument(doc, project);\n } else if (name) {\n await generateApp(\n {\n appName: name,\n allowedDocumentTypes,\n isDragAndDropEnabled: !disableDragAndDrop,\n },\n project,\n );\n } else if (dir) {\n const appMetadata = getAppMetadata(project, dirname(dir));\n if (!appMetadata) {\n throw new Error(`Failed to get data for app in dir \"${dir}\"`);\n }\n const {\n name: appName,\n id: appId,\n dirName: appDirName,\n allowedDocumentTypes,\n isDragAndDropEnabled,\n } = appMetadata;\n\n await generateApp(\n {\n appName,\n appId,\n appDirName,\n allowedDocumentTypes,\n isDragAndDropEnabled,\n },\n project,\n );\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;;AAeA,eAAsB,iBACpB,MACA,YACA;CACA,MAAM,EACJ,MACA,uBAAuB,EAAE,EACzB,oBACA,UACA,KACA,KACA,SACA,UACE;AACJ,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,oBAAoB,QAAQ;AACzC,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,gBAAgB,QAAQ;UACrB,SAET,OAAM,wBADO,MAAM,YAAY,SAAS,EACL,QAAQ;UAClC,KACT,OAAM,YACJ;EACE,SAAS;EACT;EACA,sBAAsB,CAAC;EACxB,EACD,QACD;UACQ,KAAK;EACd,MAAM,cAAc,eAAe,SAAS,QAAQ,IAAI,CAAC;AACzD,MAAI,CAAC,YACH,OAAM,IAAI,MAAM,sCAAsC,IAAI,GAAG;EAE/D,MAAM,EACJ,MAAM,SACN,IAAI,OACJ,SAAS,YACT,sBACA,yBACE;AAEJ,QAAM,YACJ;GACE;GACA;GACA;GACA;GACA;GACD,EACD,QACD;QACI;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM","debug_id":"4f6a5431-463c-5901-852e-2dcbe4c02454"}
1
+ {"version":3,"file":"generate-app-DNNqA-H3.mjs","sources":["../src/services/generate-app.ts"],"sourcesContent":["import { generateAllApps, generateApp } from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getAppMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractAppDocuments,\n generateAppFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { AppModuleDocument } from \"@powerhousedao/vetra/document-models/app-module\";\nimport { dirname } from \"node:path\";\nimport type { GenerateAppArgs } from \"../types.js\";\n\nexport async function startGenerateApp(\n args: GenerateAppArgs,\n projectDir: string,\n) {\n const {\n name,\n allowedDocumentTypes = [],\n disableDragAndDrop,\n document,\n dir,\n all,\n extract,\n debug,\n } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractAppDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllApps(project);\n } else if (document) {\n const doc = (await getDocument(document)) as AppModuleDocument;\n await generateAppFromDocument(doc, project);\n } else if (name) {\n await generateApp(\n {\n appName: name,\n allowedDocumentTypes,\n isDragAndDropEnabled: !disableDragAndDrop,\n },\n project,\n );\n } else if (dir) {\n const appMetadata = getAppMetadata(project, dirname(dir));\n if (!appMetadata) {\n throw new Error(`Failed to get data for app in dir \"${dir}\"`);\n }\n const {\n name: appName,\n id: appId,\n dirName: appDirName,\n allowedDocumentTypes,\n isDragAndDropEnabled,\n } = appMetadata;\n\n await generateApp(\n {\n appName,\n appId,\n appDirName,\n allowedDocumentTypes,\n isDragAndDropEnabled,\n },\n project,\n );\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;;AAeA,eAAsB,iBACpB,MACA,YACA;CACA,MAAM,EACJ,MACA,uBAAuB,EAAE,EACzB,oBACA,UACA,KACA,KACA,SACA,UACE;AACJ,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,oBAAoB,QAAQ;AACzC,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,gBAAgB,QAAQ;UACrB,SAET,OAAM,wBADO,MAAM,YAAY,SAAS,EACL,QAAQ;UAClC,KACT,OAAM,YACJ;EACE,SAAS;EACT;EACA,sBAAsB,CAAC;EACxB,EACD,QACD;UACQ,KAAK;EACd,MAAM,cAAc,eAAe,SAAS,QAAQ,IAAI,CAAC;AACzD,MAAI,CAAC,YACH,OAAM,IAAI,MAAM,sCAAsC,IAAI,GAAG;EAE/D,MAAM,EACJ,MAAM,SACN,IAAI,OACJ,SAAS,YACT,sBACA,yBACE;AAEJ,QAAM,YACJ;GACE;GACA;GACA;GACA;GACA;GACD,EACD,QACD;QACI;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM","debug_id":"8a26ffc1-1c2d-5f4a-91a0-d7a95edc34be"}
@@ -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]="cdd55957-3704-5299-95c0-a314c9a50621")}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]="67ab8ae8-39e6-5d78-a8ce-558a34be06a0")}catch(e){}}();
3
3
  import { dirname, join } from "node:path";
4
4
  import { generateAllDocumentModels, generateDocumentModel, loadDocumentModel } from "@powerhousedao/codegen";
5
5
  import { buildTsMorphProject } from "@powerhousedao/codegen/utils";
@@ -30,5 +30,5 @@ async function startGenerateDocumentModel(args, projectDir) {
30
30
  //#endregion
31
31
  export { startGenerateDocumentModel };
32
32
 
33
- //# sourceMappingURL=generate-document-model-DQ5PVeIH.mjs.map
34
- //# debugId=cdd55957-3704-5299-95c0-a314c9a50621
33
+ //# sourceMappingURL=generate-document-model-BJXyODfm.mjs.map
34
+ //# debugId=67ab8ae8-39e6-5d78-a8ce-558a34be06a0
@@ -1 +1 @@
1
- {"version":3,"file":"generate-document-model-DQ5PVeIH.mjs","sources":["../src/services/generate-document-model.ts"],"sourcesContent":["import {\n generateAllDocumentModels,\n generateDocumentModel,\n loadDocumentModel,\n} from \"@powerhousedao/codegen\";\nimport { buildTsMorphProject } from \"@powerhousedao/codegen/utils\";\nimport {\n extractDocumentModelDocuments,\n generateDocumentModelFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { DocumentModelDocument } from \"@powerhousedao/shared/document-model\";\nimport { dirname, join } from \"node:path\";\nimport type { GenerateDocumentModelArgs } from \"../types.js\";\n\nexport async function startGenerateDocumentModel(\n args: GenerateDocumentModelArgs,\n projectDir: string,\n) {\n const { document, dir, all, extract, debug } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractDocumentModelDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllDocumentModels(project);\n } else if (document) {\n if (document.endsWith(\".phd\")) {\n const doc = (await getDocument(document)) as DocumentModelDocument;\n await generateDocumentModelFromDocument(doc, project);\n } else {\n const state = await loadDocumentModel(document);\n await generateDocumentModel(state, project);\n }\n } else if (dir) {\n const documentModelDirName = dirname(dir);\n const documentModelFileName = `${documentModelDirName}.json`;\n const documentModelFilePath = join(dir, documentModelFileName);\n const state = await loadDocumentModel(documentModelFilePath);\n await generateDocumentModel(state, project);\n } else {\n console.log(\n \"Please specify one of `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;;AAgBA,eAAsB,2BACpB,MACA,YACA;CACA,MAAM,EAAE,UAAU,KAAK,KAAK,SAAS,UAAU;AAC/C,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,8BAA8B,QAAQ;AACnD,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,0BAA0B,QAAQ;UAC/B,SACT,KAAI,SAAS,SAAS,OAAO,CAE3B,OAAM,kCADO,MAAM,YAAY,SAAS,EACK,QAAQ;KAGrD,OAAM,sBADQ,MAAM,kBAAkB,SAAS,EACZ,QAAQ;UAEpC,IAKT,OAAM,sBADQ,MAAM,kBADU,KAAK,KADL,GADD,QAAQ,IAAI,CACa,OACQ,CACF,EACzB,QAAQ;MACtC;AACL,UAAQ,IACN,gEACD;AACD;;AAEF,OAAM,QAAQ,MAAM","debug_id":"cdd55957-3704-5299-95c0-a314c9a50621"}
1
+ {"version":3,"file":"generate-document-model-BJXyODfm.mjs","sources":["../src/services/generate-document-model.ts"],"sourcesContent":["import {\n generateAllDocumentModels,\n generateDocumentModel,\n loadDocumentModel,\n} from \"@powerhousedao/codegen\";\nimport { buildTsMorphProject } from \"@powerhousedao/codegen/utils\";\nimport {\n extractDocumentModelDocuments,\n generateDocumentModelFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { DocumentModelDocument } from \"@powerhousedao/shared/document-model\";\nimport { dirname, join } from \"node:path\";\nimport type { GenerateDocumentModelArgs } from \"../types.js\";\n\nexport async function startGenerateDocumentModel(\n args: GenerateDocumentModelArgs,\n projectDir: string,\n) {\n const { document, dir, all, extract, debug } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractDocumentModelDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllDocumentModels(project);\n } else if (document) {\n if (document.endsWith(\".phd\")) {\n const doc = (await getDocument(document)) as DocumentModelDocument;\n await generateDocumentModelFromDocument(doc, project);\n } else {\n const state = await loadDocumentModel(document);\n await generateDocumentModel(state, project);\n }\n } else if (dir) {\n const documentModelDirName = dirname(dir);\n const documentModelFileName = `${documentModelDirName}.json`;\n const documentModelFilePath = join(dir, documentModelFileName);\n const state = await loadDocumentModel(documentModelFilePath);\n await generateDocumentModel(state, project);\n } else {\n console.log(\n \"Please specify one of `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;;AAgBA,eAAsB,2BACpB,MACA,YACA;CACA,MAAM,EAAE,UAAU,KAAK,KAAK,SAAS,UAAU;AAC/C,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,8BAA8B,QAAQ;AACnD,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,0BAA0B,QAAQ;UAC/B,SACT,KAAI,SAAS,SAAS,OAAO,CAE3B,OAAM,kCADO,MAAM,YAAY,SAAS,EACK,QAAQ;KAGrD,OAAM,sBADQ,MAAM,kBAAkB,SAAS,EACZ,QAAQ;UAEpC,IAKT,OAAM,sBADQ,MAAM,kBADU,KAAK,KADL,GADD,QAAQ,IAAI,CACa,OACQ,CACF,EACzB,QAAQ;MACtC;AACL,UAAQ,IACN,gEACD;AACD;;AAEF,OAAM,QAAQ,MAAM","debug_id":"67ab8ae8-39e6-5d78-a8ce-558a34be06a0"}
@@ -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]="79754c67-40d2-5aef-b637-10f993c259c2")}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]="d18ae896-ef2b-5fb9-9288-c1e20f36251b")}catch(e){}}();
3
3
  import { dirname } from "node:path";
4
4
  import { generateAllEditors, generateEditor } from "@powerhousedao/codegen";
5
5
  import { buildTsMorphProject, getEditorMetadata } from "@powerhousedao/codegen/utils";
@@ -44,5 +44,5 @@ async function startGenerateEditor(args, projectDir) {
44
44
  //#endregion
45
45
  export { startGenerateEditor };
46
46
 
47
- //# sourceMappingURL=generate-editor-DtzVAs6x.mjs.map
48
- //# debugId=79754c67-40d2-5aef-b637-10f993c259c2
47
+ //# sourceMappingURL=generate-editor-BejvaVVT.mjs.map
48
+ //# debugId=d18ae896-ef2b-5fb9-9288-c1e20f36251b
@@ -1 +1 @@
1
- {"version":3,"file":"generate-editor-DtzVAs6x.mjs","sources":["../src/services/generate-editor.ts"],"sourcesContent":["import { generateAllEditors, generateEditor } from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getEditorMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractEditorDocuments,\n generateEditorFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { DocumentEditorDocument } from \"@powerhousedao/vetra/document-models/document-editor\";\nimport { dirname } from \"node:path\";\nimport type { GenerateEditorArgs } from \"../types.js\";\n\nexport async function startGenerateEditor(\n args: GenerateEditorArgs,\n projectDir: string,\n) {\n const { name, documentType, document, dir, all, extract, debug } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractEditorDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllEditors(project);\n } else if (document) {\n const doc = (await getDocument(document)) as DocumentEditorDocument;\n await generateEditorFromDocument(doc, project);\n } else if (name) {\n if (!documentType) {\n throw new Error(\n \"Please specify a document type for the new editor to generate.\",\n );\n }\n await generateEditor(\n { editorName: name, documentTypes: [documentType] },\n project,\n );\n } else if (dir) {\n const editorArgs = getEditorMetadata(project, dirname(dir));\n if (!editorArgs) {\n throw new Error(`Failed to get data for editor in dir \"${dir}\"`);\n }\n const {\n name: editorName,\n id: editorId,\n dirName: editorDirName,\n documentTypes,\n } = editorArgs;\n await generateEditor(\n {\n editorName,\n editorId,\n editorDirName,\n documentTypes,\n },\n project,\n );\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;;AAeA,eAAsB,oBACpB,MACA,YACA;CACA,MAAM,EAAE,MAAM,cAAc,UAAU,KAAK,KAAK,SAAS,UAAU;AACnE,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,uBAAuB,QAAQ;AAC5C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,mBAAmB,QAAQ;UACxB,SAET,OAAM,2BADO,MAAM,YAAY,SAAS,EACF,QAAQ;UACrC,MAAM;AACf,MAAI,CAAC,aACH,OAAM,IAAI,MACR,iEACD;AAEH,QAAM,eACJ;GAAE,YAAY;GAAM,eAAe,CAAC,aAAa;GAAE,EACnD,QACD;YACQ,KAAK;EACd,MAAM,aAAa,kBAAkB,SAAS,QAAQ,IAAI,CAAC;AAC3D,MAAI,CAAC,WACH,OAAM,IAAI,MAAM,yCAAyC,IAAI,GAAG;EAElE,MAAM,EACJ,MAAM,YACN,IAAI,UACJ,SAAS,eACT,kBACE;AACJ,QAAM,eACJ;GACE;GACA;GACA;GACA;GACD,EACD,QACD;QACI;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM","debug_id":"79754c67-40d2-5aef-b637-10f993c259c2"}
1
+ {"version":3,"file":"generate-editor-BejvaVVT.mjs","sources":["../src/services/generate-editor.ts"],"sourcesContent":["import { generateAllEditors, generateEditor } from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getEditorMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractEditorDocuments,\n generateEditorFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { DocumentEditorDocument } from \"@powerhousedao/vetra/document-models/document-editor\";\nimport { dirname } from \"node:path\";\nimport type { GenerateEditorArgs } from \"../types.js\";\n\nexport async function startGenerateEditor(\n args: GenerateEditorArgs,\n projectDir: string,\n) {\n const { name, documentType, document, dir, all, extract, debug } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractEditorDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllEditors(project);\n } else if (document) {\n const doc = (await getDocument(document)) as DocumentEditorDocument;\n await generateEditorFromDocument(doc, project);\n } else if (name) {\n if (!documentType) {\n throw new Error(\n \"Please specify a document type for the new editor to generate.\",\n );\n }\n await generateEditor(\n { editorName: name, documentTypes: [documentType] },\n project,\n );\n } else if (dir) {\n const editorArgs = getEditorMetadata(project, dirname(dir));\n if (!editorArgs) {\n throw new Error(`Failed to get data for editor in dir \"${dir}\"`);\n }\n const {\n name: editorName,\n id: editorId,\n dirName: editorDirName,\n documentTypes,\n } = editorArgs;\n await generateEditor(\n {\n editorName,\n editorId,\n editorDirName,\n documentTypes,\n },\n project,\n );\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n}\n"],"names":[],"mappings":";;;;;;;AAeA,eAAsB,oBACpB,MACA,YACA;CACA,MAAM,EAAE,MAAM,cAAc,UAAU,KAAK,KAAK,SAAS,UAAU;AACnE,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,uBAAuB,QAAQ;AAC5C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,mBAAmB,QAAQ;UACxB,SAET,OAAM,2BADO,MAAM,YAAY,SAAS,EACF,QAAQ;UACrC,MAAM;AACf,MAAI,CAAC,aACH,OAAM,IAAI,MACR,iEACD;AAEH,QAAM,eACJ;GAAE,YAAY;GAAM,eAAe,CAAC,aAAa;GAAE,EACnD,QACD;YACQ,KAAK;EACd,MAAM,aAAa,kBAAkB,SAAS,QAAQ,IAAI,CAAC;AAC3D,MAAI,CAAC,WACH,OAAM,IAAI,MAAM,yCAAyC,IAAI,GAAG;EAElE,MAAM,EACJ,MAAM,YACN,IAAI,UACJ,SAAS,eACT,kBACE;AACJ,QAAM,eACJ;GACE;GACA;GACA;GACA;GACD,EACD,QACD;QACI;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM","debug_id":"d18ae896-ef2b-5fb9-9288-c1e20f36251b"}
@@ -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]="b28d8f47-ef48-5bf9-bd2e-d0f13fa5e0e4")}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]="02532ae9-81d8-5990-bb3f-2da479790051")}catch(e){}}();
3
3
  import { dirname } from "node:path";
4
4
  import { detectFeatures, generateAllProcessors, generateProcessor, syncFeatureDependencies } from "@powerhousedao/codegen";
5
5
  import { buildTsMorphProject, getProcessorMetadata } from "@powerhousedao/codegen/utils";
@@ -36,5 +36,5 @@ async function startGenerateProcessor(args, projectDir) {
36
36
  //#endregion
37
37
  export { startGenerateProcessor };
38
38
 
39
- //# sourceMappingURL=generate-processor-FGtN6BVY.mjs.map
40
- //# debugId=b28d8f47-ef48-5bf9-bd2e-d0f13fa5e0e4
39
+ //# sourceMappingURL=generate-processor-_WOx-mMe.mjs.map
40
+ //# debugId=02532ae9-81d8-5990-bb3f-2da479790051
@@ -1 +1 @@
1
- {"version":3,"file":"generate-processor-FGtN6BVY.mjs","sources":["../src/services/generate-processor.ts"],"sourcesContent":["import {\n detectFeatures,\n generateAllProcessors,\n generateProcessor,\n syncFeatureDependencies,\n} from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getProcessorMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractProcessorDocuments,\n generateProcessorFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { ProcessorModuleDocument } from \"@powerhousedao/vetra/document-models/processor-module\";\nimport { dirname } from \"node:path\";\nimport type { GenerateProcessorArgs } from \"../types.js\";\n\nexport async function startGenerateProcessor(\n args: GenerateProcessorArgs,\n projectDir: string,\n) {\n const {\n name: processorName,\n type: processorType,\n apps: processorApps,\n documentTypes,\n document,\n dir,\n all,\n extract,\n debug,\n } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractProcessorDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllProcessors(project);\n } else if (document) {\n const doc = (await getDocument(document)) as ProcessorModuleDocument;\n await generateProcessorFromDocument(doc, project);\n } else if (processorName) {\n await generateProcessor(\n {\n processorName,\n processorApps,\n processorType,\n documentTypes,\n },\n project,\n );\n } else if (dir) {\n const processorDirName = dirname(dir);\n const processorArgs = getProcessorMetadata(project, processorDirName);\n await generateProcessor(processorArgs, project);\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n await syncFeatureDependencies(detectFeatures(projectDir), projectDir);\n}\n"],"names":[],"mappings":";;;;;;;AAoBA,eAAsB,uBACpB,MACA,YACA;CACA,MAAM,EACJ,MAAM,eACN,MAAM,eACN,MAAM,eACN,eACA,UACA,KACA,KACA,SACA,UACE;AACJ,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,0BAA0B,QAAQ;AAC/C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,sBAAsB,QAAQ;UAC3B,SAET,OAAM,8BADO,MAAM,YAAY,SAAS,EACC,QAAQ;UACxC,cACT,OAAM,kBACJ;EACE;EACA;EACA;EACA;EACD,EACD,QACD;UACQ,IAGT,OAAM,kBADgB,qBAAqB,SADlB,QAAQ,IAAI,CACgC,EAC9B,QAAQ;MAC1C;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM;AACpB,OAAM,wBAAwB,eAAe,WAAW,EAAE,WAAW","debug_id":"b28d8f47-ef48-5bf9-bd2e-d0f13fa5e0e4"}
1
+ {"version":3,"file":"generate-processor-_WOx-mMe.mjs","sources":["../src/services/generate-processor.ts"],"sourcesContent":["import {\n detectFeatures,\n generateAllProcessors,\n generateProcessor,\n syncFeatureDependencies,\n} from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getProcessorMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractProcessorDocuments,\n generateProcessorFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { ProcessorModuleDocument } from \"@powerhousedao/vetra/document-models/processor-module\";\nimport { dirname } from \"node:path\";\nimport type { GenerateProcessorArgs } from \"../types.js\";\n\nexport async function startGenerateProcessor(\n args: GenerateProcessorArgs,\n projectDir: string,\n) {\n const {\n name: processorName,\n type: processorType,\n apps: processorApps,\n documentTypes,\n document,\n dir,\n all,\n extract,\n debug,\n } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractProcessorDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllProcessors(project);\n } else if (document) {\n const doc = (await getDocument(document)) as ProcessorModuleDocument;\n await generateProcessorFromDocument(doc, project);\n } else if (processorName) {\n await generateProcessor(\n {\n processorName,\n processorApps,\n processorType,\n documentTypes,\n },\n project,\n );\n } else if (dir) {\n const processorDirName = dirname(dir);\n const processorArgs = getProcessorMetadata(project, processorDirName);\n await generateProcessor(processorArgs, project);\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n await syncFeatureDependencies(detectFeatures(projectDir), projectDir);\n}\n"],"names":[],"mappings":";;;;;;;AAoBA,eAAsB,uBACpB,MACA,YACA;CACA,MAAM,EACJ,MAAM,eACN,MAAM,eACN,MAAM,eACN,eACA,UACA,KACA,KACA,SACA,UACE;AACJ,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,0BAA0B,QAAQ;AAC/C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,sBAAsB,QAAQ;UAC3B,SAET,OAAM,8BADO,MAAM,YAAY,SAAS,EACC,QAAQ;UACxC,cACT,OAAM,kBACJ;EACE;EACA;EACA;EACA;EACD,EACD,QACD;UACQ,IAGT,OAAM,kBADgB,qBAAqB,SADlB,QAAQ,IAAI,CACgC,EAC9B,QAAQ;MAC1C;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM;AACpB,OAAM,wBAAwB,eAAe,WAAW,EAAE,WAAW","debug_id":"02532ae9-81d8-5990-bb3f-2da479790051"}
@@ -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]="5b43e7af-aa94-5748-a185-200bc7bd475a")}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]="77a9d3dd-1c2f-521e-a7a5-22f044790308")}catch(e){}}();
3
3
  import { dirname } from "node:path";
4
4
  import { detectFeatures, generateAllSubgraphs, generateSubgraph, syncFeatureDependencies } from "@powerhousedao/codegen";
5
5
  import { buildTsMorphProject, getSubgraphMetadata } from "@powerhousedao/codegen/utils";
@@ -34,5 +34,5 @@ async function startGenerateSubgraph(args, projectDir) {
34
34
  //#endregion
35
35
  export { startGenerateSubgraph };
36
36
 
37
- //# sourceMappingURL=generate-subgraph-BrzmW_sj.mjs.map
38
- //# debugId=5b43e7af-aa94-5748-a185-200bc7bd475a
37
+ //# sourceMappingURL=generate-subgraph-BsHUstpl.mjs.map
38
+ //# debugId=77a9d3dd-1c2f-521e-a7a5-22f044790308
@@ -1 +1 @@
1
- {"version":3,"file":"generate-subgraph-BrzmW_sj.mjs","sources":["../src/services/generate-subgraph.ts"],"sourcesContent":["import {\n detectFeatures,\n generateAllSubgraphs,\n generateSubgraph,\n syncFeatureDependencies,\n} from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getSubgraphMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractSubgraphDocuments,\n generateSubgraphFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { SubgraphModuleDocument } from \"@powerhousedao/vetra/document-models/subgraph-module\";\nimport { dirname } from \"node:path\";\nimport type { GenerateSubgraphArgs } from \"../types.js\";\n\nexport async function startGenerateSubgraph(\n args: GenerateSubgraphArgs,\n projectDir: string,\n) {\n const { name, document, dir, all, extract, debug } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractSubgraphDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllSubgraphs(project);\n } else if (document) {\n const doc = (await getDocument(document)) as SubgraphModuleDocument;\n await generateSubgraphFromDocument(doc, project);\n } else if (name) {\n await generateSubgraph(name, project);\n } else if (dir) {\n const { subgraphName } = getSubgraphMetadata(project, dirname(dir));\n if (!subgraphName) {\n throw new Error(`Failed to get data for subgraph in dir \"${dir}\"`);\n }\n await generateSubgraph(subgraphName, project);\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n await syncFeatureDependencies(detectFeatures(projectDir), projectDir);\n}\n"],"names":[],"mappings":";;;;;;;AAoBA,eAAsB,sBACpB,MACA,YACA;CACA,MAAM,EAAE,MAAM,UAAU,KAAK,KAAK,SAAS,UAAU;AACrD,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,yBAAyB,QAAQ;AAC9C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,qBAAqB,QAAQ;UAC1B,SAET,OAAM,6BADO,MAAM,YAAY,SAAS,EACA,QAAQ;UACvC,KACT,OAAM,iBAAiB,MAAM,QAAQ;UAC5B,KAAK;EACd,MAAM,EAAE,iBAAiB,oBAAoB,SAAS,QAAQ,IAAI,CAAC;AACnE,MAAI,CAAC,aACH,OAAM,IAAI,MAAM,2CAA2C,IAAI,GAAG;AAEpE,QAAM,iBAAiB,cAAc,QAAQ;QACxC;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM;AACpB,OAAM,wBAAwB,eAAe,WAAW,EAAE,WAAW","debug_id":"5b43e7af-aa94-5748-a185-200bc7bd475a"}
1
+ {"version":3,"file":"generate-subgraph-BsHUstpl.mjs","sources":["../src/services/generate-subgraph.ts"],"sourcesContent":["import {\n detectFeatures,\n generateAllSubgraphs,\n generateSubgraph,\n syncFeatureDependencies,\n} from \"@powerhousedao/codegen\";\nimport {\n buildTsMorphProject,\n getSubgraphMetadata,\n} from \"@powerhousedao/codegen/utils\";\nimport {\n extractSubgraphDocuments,\n generateSubgraphFromDocument,\n getDocument,\n saveSpec,\n} from \"@powerhousedao/vetra/codegen\";\nimport type { SubgraphModuleDocument } from \"@powerhousedao/vetra/document-models/subgraph-module\";\nimport { dirname } from \"node:path\";\nimport type { GenerateSubgraphArgs } from \"../types.js\";\n\nexport async function startGenerateSubgraph(\n args: GenerateSubgraphArgs,\n projectDir: string,\n) {\n const { name, document, dir, all, extract, debug } = args;\n if (debug) {\n console.log({ args });\n }\n const project = buildTsMorphProject(projectDir);\n if (extract) {\n const docs = extractSubgraphDocuments(project);\n for (const doc of docs) {\n const path = await saveSpec(doc, projectDir);\n console.log(`Wrote ${path}`);\n }\n return;\n }\n if (all) {\n await generateAllSubgraphs(project);\n } else if (document) {\n const doc = (await getDocument(document)) as SubgraphModuleDocument;\n await generateSubgraphFromDocument(doc, project);\n } else if (name) {\n await generateSubgraph(name, project);\n } else if (dir) {\n const { subgraphName } = getSubgraphMetadata(project, dirname(dir));\n if (!subgraphName) {\n throw new Error(`Failed to get data for subgraph in dir \"${dir}\"`);\n }\n await generateSubgraph(subgraphName, project);\n } else {\n console.log(\n \"Please specify one of `name`, `document`, `dir`, `all`, or `extract`.\",\n );\n return;\n }\n await project.save();\n await syncFeatureDependencies(detectFeatures(projectDir), projectDir);\n}\n"],"names":[],"mappings":";;;;;;;AAoBA,eAAsB,sBACpB,MACA,YACA;CACA,MAAM,EAAE,MAAM,UAAU,KAAK,KAAK,SAAS,UAAU;AACrD,KAAI,MACF,SAAQ,IAAI,EAAE,MAAM,CAAC;CAEvB,MAAM,UAAU,oBAAoB,WAAW;AAC/C,KAAI,SAAS;EACX,MAAM,OAAO,yBAAyB,QAAQ;AAC9C,OAAK,MAAM,OAAO,MAAM;GACtB,MAAM,OAAO,MAAM,SAAS,KAAK,WAAW;AAC5C,WAAQ,IAAI,SAAS,OAAO;;AAE9B;;AAEF,KAAI,IACF,OAAM,qBAAqB,QAAQ;UAC1B,SAET,OAAM,6BADO,MAAM,YAAY,SAAS,EACA,QAAQ;UACvC,KACT,OAAM,iBAAiB,MAAM,QAAQ;UAC5B,KAAK;EACd,MAAM,EAAE,iBAAiB,oBAAoB,SAAS,QAAQ,IAAI,CAAC;AACnE,MAAI,CAAC,aACH,OAAM,IAAI,MAAM,2CAA2C,IAAI,GAAG;AAEpE,QAAM,iBAAiB,cAAc,QAAQ;QACxC;AACL,UAAQ,IACN,wEACD;AACD;;AAEF,OAAM,QAAQ,MAAM;AACpB,OAAM,wBAAwB,eAAe,WAAW,EAAE,WAAW","debug_id":"77a9d3dd-1c2f-521e-a7a5-22f044790308"}
@@ -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]="1835da68-34a4-5f33-9a4c-08c3b7cb5d9c")}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]="20af4c97-5898-53e3-8b91-80c25366eae5")}catch(e){}}();
3
3
  import { handleMutuallyExclusiveOptions, parsePackageManager, parseTag } from "@powerhousedao/shared/clis";
4
4
  import { createProject } from "@powerhousedao/codegen";
5
5
  import chalk from "chalk";
@@ -53,7 +53,7 @@ async function setupRemoteDrive(remoteDriveUrl) {
53
53
  //#endregion
54
54
  //#region src/services/init.ts
55
55
  async function startInit(args) {
56
- const { namePositional, nameOption, packageManager, npm, pnpm, yarn, bun, tag, version, dev, staging, remoteDrive } = args;
56
+ const { namePositional, nameOption, packageManager, npm, pnpm, yarn, bun, tag, version, dev, staging, remoteDrive, clone } = args;
57
57
  let name = namePositional ?? nameOption;
58
58
  if (!name) {
59
59
  const { prompt } = enquirer;
@@ -92,6 +92,7 @@ async function startInit(args) {
92
92
  dev,
93
93
  staging
94
94
  });
95
+ if (clone && (tag || version || dev || staging)) console.log(chalk.yellow("⚠️ --clone is set; --version/--tag/--dev/--staging are ignored (the cloned project's dependency set is authoritative)."));
95
96
  try {
96
97
  if (remoteDrive) {
97
98
  console.log(chalk.blue("\n⏳ Setting up remote drive...\n"));
@@ -124,5 +125,5 @@ async function startInit(args) {
124
125
  //#endregion
125
126
  export { startInit };
126
127
 
127
- //# sourceMappingURL=init-Cw_5H_Z1.mjs.map
128
- //# debugId=1835da68-34a4-5f33-9a4c-08c3b7cb5d9c
128
+ //# sourceMappingURL=init-D3toc_qO.mjs.map
129
+ //# debugId=20af4c97-5898-53e3-8b91-80c25366eae5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-D3toc_qO.mjs","sources":["../src/utils/validate-remote-drive.ts","../src/services/init.ts"],"sourcesContent":["import {\n createVetraDocument,\n getVetraDocuments,\n} from \"@powerhousedao/common/utils\";\n\n/**\n * Sets up a remote drive for initialization by validating and creating\n * a Vetra document if needed.\n * Returns true if setup succeeds, false if it should stop execution.\n */\nexport async function setupRemoteDrive(\n remoteDriveUrl: string,\n): Promise<boolean> {\n try {\n // Parse driveId from URL\n const driveId = remoteDriveUrl.split(\"/\").pop();\n\n if (!remoteDriveUrl || remoteDriveUrl.trim() === \"\") {\n console.error(\"❌ Remote drive URL is required\");\n return false;\n }\n\n // Construct GraphQL endpoint from base URL, preserving any subpath\n // prefix (e.g. when the reactor is served behind a proxy at /api/reactor).\n const url = new URL(remoteDriveUrl);\n const basePath = url.pathname.replace(/\\/d\\/[^/]+\\/?$/, \"\");\n const graphqlEndpoint = `${url.protocol}//${url.host}${basePath}/graphql`;\n\n let documents = await getVetraDocuments(graphqlEndpoint, driveId!);\n\n if (documents.length === 0) {\n console.log(\n \"No vetra package document found in the provided drive, creating one...\",\n );\n try {\n await createVetraDocument(graphqlEndpoint, driveId!, \"vetra-package\");\n\n // Re-fetch documents after creation\n documents = await getVetraDocuments(graphqlEndpoint, driveId!);\n\n if (documents.length === 0) {\n console.error(\n \"❌ Failed to create vetra package document in the remote drive\",\n );\n return false;\n }\n\n console.log(\"✅ Vetra package document created successfully\");\n } catch (createError) {\n console.error(\n \"❌ Failed to create vetra package document:\",\n createError,\n );\n return false;\n }\n }\n\n if (documents.length > 1) {\n console.warn(\n \"⚠️ Multiple vetra package documents were found in the provided remote drive, this might be an error in your remote drive\",\n );\n }\n\n const hasGithubUrl = documents.some((doc) => doc.githubUrl);\n\n if (hasGithubUrl) {\n console.error(\n \"❌ The remote drive provided already has been configured with a github url, please use the checkout command instead: ph checkout --remote-drive <remote drive url>\",\n );\n return false;\n }\n\n return true;\n } catch (error) {\n console.error(\"❌ Unable to fetch remote drive info:\", error);\n return false;\n }\n}\n","import { createProject } from \"@powerhousedao/codegen\";\nimport {\n handleMutuallyExclusiveOptions,\n parsePackageManager,\n parseTag,\n} from \"@powerhousedao/shared/clis\";\nimport chalk from \"chalk\";\nimport { kebabCase } from \"change-case\";\nimport enquirer from \"enquirer\";\nimport { clean, valid } from \"semver\";\nimport type { InitArgs } from \"../types.js\";\nimport { setupRemoteDrive } from \"../utils/validate-remote-drive.js\";\n\nexport async function startInit(args: InitArgs) {\n const {\n namePositional,\n nameOption,\n packageManager,\n npm,\n pnpm,\n yarn,\n bun,\n tag,\n version,\n dev,\n staging,\n remoteDrive,\n clone,\n } = args;\n\n let name = namePositional ?? nameOption;\n if (!name) {\n const { prompt } = enquirer;\n\n const result = await prompt<{ name: string }>([\n {\n type: \"input\",\n name: \"name\",\n message: \"What is the project name?\",\n required: true,\n result: (value) => kebabCase(value),\n },\n ]);\n name = result.name;\n }\n if (!name) {\n throw new Error(\"You must provide a name for your project.\");\n }\n\n if (version !== undefined && !valid(clean(version))) {\n throw new Error(`Invalid version: ${version}`);\n }\n\n handleMutuallyExclusiveOptions(\n {\n tag,\n version,\n dev,\n staging,\n },\n \"versioning strategy\",\n );\n\n handleMutuallyExclusiveOptions(\n {\n npm,\n pnpm,\n yarn,\n bun,\n packageManager,\n },\n \"package manager\",\n );\n\n const parsedPackageManager =\n parsePackageManager({\n npm,\n pnpm,\n yarn,\n bun,\n packageManager,\n }) ?? \"npm\";\n\n const parsedTag = parseTag({\n tag,\n dev,\n staging,\n });\n\n if (clone && (tag || version || dev || staging)) {\n console.log(\n chalk.yellow(\n \"⚠️ --clone is set; --version/--tag/--dev/--staging are ignored (the cloned project's dependency set is authoritative).\",\n ),\n );\n }\n\n try {\n if (remoteDrive) {\n console.log(chalk.blue(\"\\n⏳ Setting up remote drive...\\n\"));\n await setupRemoteDrive(remoteDrive);\n console.log(chalk.green(\"\\n✅ Remote drive set up.\"));\n }\n\n console.log(chalk.bold(\"\\n🚀 Initializing a new project...\\n\"));\n await createProject({\n ...args,\n name,\n packageManager: parsedPackageManager,\n tag: parsedTag,\n });\n\n if (remoteDrive) {\n console.log();\n console.log(\"To link your project to GitHub:\");\n console.log();\n console.log(\" 1. Create a new repository on GitHub\");\n console.log(` 2. cd ${name}`);\n console.log(\" 3. git add . && git commit -m 'Initial commit'\");\n console.log(\" 4. git remote add origin <your-github-url>\");\n console.log(` 5. git push -u origin main`);\n console.log();\n }\n } catch (error) {\n console.error(\"\\n❌ Failed to initialize project: \\n\");\n throw error;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAUA,eAAsB,iBACpB,gBACkB;AAClB,KAAI;EAEF,MAAM,UAAU,eAAe,MAAM,IAAI,CAAC,KAAK;AAE/C,MAAI,CAAC,kBAAkB,eAAe,MAAM,KAAK,IAAI;AACnD,WAAQ,MAAM,iCAAiC;AAC/C,UAAO;;EAKT,MAAM,MAAM,IAAI,IAAI,eAAe;EACnC,MAAM,WAAW,IAAI,SAAS,QAAQ,kBAAkB,GAAG;EAC3D,MAAM,kBAAkB,GAAG,IAAI,SAAS,IAAI,IAAI,OAAO,SAAS;EAEhE,IAAI,YAAY,MAAM,kBAAkB,iBAAiB,QAAS;AAElE,MAAI,UAAU,WAAW,GAAG;AAC1B,WAAQ,IACN,yEACD;AACD,OAAI;AACF,UAAM,oBAAoB,iBAAiB,SAAU,gBAAgB;AAGrE,gBAAY,MAAM,kBAAkB,iBAAiB,QAAS;AAE9D,QAAI,UAAU,WAAW,GAAG;AAC1B,aAAQ,MACN,gEACD;AACD,YAAO;;AAGT,YAAQ,IAAI,gDAAgD;YACrD,aAAa;AACpB,YAAQ,MACN,8CACA,YACD;AACD,WAAO;;;AAIX,MAAI,UAAU,SAAS,EACrB,SAAQ,KACN,4HACD;AAKH,MAFqB,UAAU,MAAM,QAAQ,IAAI,UAAU,EAEzC;AAChB,WAAQ,MACN,oKACD;AACD,UAAO;;AAGT,SAAO;UACA,OAAO;AACd,UAAQ,MAAM,wCAAwC,MAAM;AAC5D,SAAO;;;;;AC9DX,eAAsB,UAAU,MAAgB;CAC9C,MAAM,EACJ,gBACA,YACA,gBACA,KACA,MACA,MACA,KACA,KACA,SACA,KACA,SACA,aACA,UACE;CAEJ,IAAI,OAAO,kBAAkB;AAC7B,KAAI,CAAC,MAAM;EACT,MAAM,EAAE,WAAW;AAWnB,UATe,MAAM,OAAyB,CAC5C;GACE,MAAM;GACN,MAAM;GACN,SAAS;GACT,UAAU;GACV,SAAS,UAAU,UAAU,MAAM;GACpC,CACF,CAAC,EACY;;AAEhB,KAAI,CAAC,KACH,OAAM,IAAI,MAAM,4CAA4C;AAG9D,KAAI,YAAY,KAAA,KAAa,CAAC,MAAM,MAAM,QAAQ,CAAC,CACjD,OAAM,IAAI,MAAM,oBAAoB,UAAU;AAGhD,gCACE;EACE;EACA;EACA;EACA;EACD,EACD,sBACD;AAED,gCACE;EACE;EACA;EACA;EACA;EACA;EACD,EACD,kBACD;CAED,MAAM,uBACJ,oBAAoB;EAClB;EACA;EACA;EACA;EACA;EACD,CAAC,IAAI;CAER,MAAM,YAAY,SAAS;EACzB;EACA;EACA;EACD,CAAC;AAEF,KAAI,UAAU,OAAO,WAAW,OAAO,SACrC,SAAQ,IACN,MAAM,OACJ,0HACD,CACF;AAGH,KAAI;AACF,MAAI,aAAa;AACf,WAAQ,IAAI,MAAM,KAAK,mCAAmC,CAAC;AAC3D,SAAM,iBAAiB,YAAY;AACnC,WAAQ,IAAI,MAAM,MAAM,2BAA2B,CAAC;;AAGtD,UAAQ,IAAI,MAAM,KAAK,uCAAuC,CAAC;AAC/D,QAAM,cAAc;GAClB,GAAG;GACH;GACA,gBAAgB;GAChB,KAAK;GACN,CAAC;AAEF,MAAI,aAAa;AACf,WAAQ,KAAK;AACb,WAAQ,IAAI,kCAAkC;AAC9C,WAAQ,KAAK;AACb,WAAQ,IAAI,yCAAyC;AACrD,WAAQ,IAAI,WAAW,OAAO;AAC9B,WAAQ,IAAI,mDAAmD;AAC/D,WAAQ,IAAI,+CAA+C;AAC3D,WAAQ,IAAI,+BAA+B;AAC3C,WAAQ,KAAK;;UAER,OAAO;AACd,UAAQ,MAAM,uCAAuC;AACrD,QAAM","debug_id":"20af4c97-5898-53e3-8b91-80c25366eae5"}
@@ -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]="f74536d7-164b-57b0-ac72-c4f52831d602")}catch(e){}}();
3
- import { s as getProjectInfo } from "./utils-mth8NsDA.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]="b2a9ca8c-b055-504d-90d5-d0bbacda0201")}catch(e){}}();
3
+ import { s as getProjectInfo } from "./utils-BaTZlyL3.mjs";
4
4
  import fs from "node:fs";
5
5
  //#region src/services/inspect.ts
6
6
  function startInspect(args) {
@@ -44,5 +44,5 @@ function startInspect(args) {
44
44
  //#endregion
45
45
  export { startInspect };
46
46
 
47
- //# sourceMappingURL=inspect-BwuBW_zW.mjs.map
48
- //# debugId=f74536d7-164b-57b0-ac72-c4f52831d602
47
+ //# sourceMappingURL=inspect-CKdafPbC.mjs.map
48
+ //# debugId=b2a9ca8c-b055-504d-90d5-d0bbacda0201
@@ -1 +1 @@
1
- {"version":3,"file":"inspect-BwuBW_zW.mjs","sources":["../src/services/inspect.ts"],"sourcesContent":["import type { Manifest } from \"@powerhousedao/shared/document-model\";\nimport fs from \"node:fs\";\nimport type { InspectArgs } from \"../types.js\";\nimport { getProjectInfo } from \"../utils.js\";\nexport function startInspect(args: InspectArgs) {\n if (args.debug) {\n console.log(\">>> command arguments\", args);\n }\n\n const projectInfo = getProjectInfo(args.debug);\n const { packageName } = args;\n\n if (args.debug) {\n console.log(\"\\n>>> projectInfo\", projectInfo);\n }\n\n try {\n const loadManifest = (path: string) =>\n JSON.parse(fs.readFileSync(path, \"utf-8\")) as Manifest;\n const manifest = loadManifest(\n `${process.cwd()}/node_modules/${packageName}/dist/powerhouse.manifest.json`,\n );\n\n console.log(manifest.name);\n if (manifest.documentModels) {\n console.log(\"\\nDocument Models:\");\n manifest.documentModels.forEach((model) => {\n console.log(`- ${model.name} (${model.id})`);\n });\n }\n\n if (manifest.editors) {\n console.log(\"\\nEditors:\");\n manifest.editors.forEach((editor) => {\n console.log(`- ${editor.name} (${editor.id})`);\n });\n }\n\n if (manifest.processors) {\n console.log(\"\\nProcessors:\");\n manifest.processors.forEach((processor) => {\n console.log(`- ${processor.name} (${processor.id})`);\n });\n }\n\n if (manifest.subgraphs) {\n console.log(\"\\nSubgraphs:\");\n manifest.subgraphs.forEach((subgraph) => {\n console.log(`- ${subgraph.name} (${subgraph.id})`);\n });\n }\n } catch (e) {\n if (args.debug) {\n console.error(e);\n } else {\n console.log(\"No manifest found in the package\");\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAIA,SAAgB,aAAa,MAAmB;AAC9C,KAAI,KAAK,MACP,SAAQ,IAAI,yBAAyB,KAAK;CAG5C,MAAM,cAAc,eAAe,KAAK,MAAM;CAC9C,MAAM,EAAE,gBAAgB;AAExB,KAAI,KAAK,MACP,SAAQ,IAAI,qBAAqB,YAAY;AAG/C,KAAI;EACF,MAAM,gBAAgB,SACpB,KAAK,MAAM,GAAG,aAAa,MAAM,QAAQ,CAAC;EAC5C,MAAM,WAAW,aACf,GAAG,QAAQ,KAAK,CAAC,gBAAgB,YAAY,gCAC9C;AAED,UAAQ,IAAI,SAAS,KAAK;AAC1B,MAAI,SAAS,gBAAgB;AAC3B,WAAQ,IAAI,qBAAqB;AACjC,YAAS,eAAe,SAAS,UAAU;AACzC,YAAQ,IAAI,KAAK,MAAM,KAAK,IAAI,MAAM,GAAG,GAAG;KAC5C;;AAGJ,MAAI,SAAS,SAAS;AACpB,WAAQ,IAAI,aAAa;AACzB,YAAS,QAAQ,SAAS,WAAW;AACnC,YAAQ,IAAI,KAAK,OAAO,KAAK,IAAI,OAAO,GAAG,GAAG;KAC9C;;AAGJ,MAAI,SAAS,YAAY;AACvB,WAAQ,IAAI,gBAAgB;AAC5B,YAAS,WAAW,SAAS,cAAc;AACzC,YAAQ,IAAI,KAAK,UAAU,KAAK,IAAI,UAAU,GAAG,GAAG;KACpD;;AAGJ,MAAI,SAAS,WAAW;AACtB,WAAQ,IAAI,eAAe;AAC3B,YAAS,UAAU,SAAS,aAAa;AACvC,YAAQ,IAAI,KAAK,SAAS,KAAK,IAAI,SAAS,GAAG,GAAG;KAClD;;UAEG,GAAG;AACV,MAAI,KAAK,MACP,SAAQ,MAAM,EAAE;MAEhB,SAAQ,IAAI,mCAAmC","debug_id":"f74536d7-164b-57b0-ac72-c4f52831d602"}
1
+ {"version":3,"file":"inspect-CKdafPbC.mjs","sources":["../src/services/inspect.ts"],"sourcesContent":["import type { Manifest } from \"@powerhousedao/shared/document-model\";\nimport fs from \"node:fs\";\nimport type { InspectArgs } from \"../types.js\";\nimport { getProjectInfo } from \"../utils.js\";\nexport function startInspect(args: InspectArgs) {\n if (args.debug) {\n console.log(\">>> command arguments\", args);\n }\n\n const projectInfo = getProjectInfo(args.debug);\n const { packageName } = args;\n\n if (args.debug) {\n console.log(\"\\n>>> projectInfo\", projectInfo);\n }\n\n try {\n const loadManifest = (path: string) =>\n JSON.parse(fs.readFileSync(path, \"utf-8\")) as Manifest;\n const manifest = loadManifest(\n `${process.cwd()}/node_modules/${packageName}/dist/powerhouse.manifest.json`,\n );\n\n console.log(manifest.name);\n if (manifest.documentModels) {\n console.log(\"\\nDocument Models:\");\n manifest.documentModels.forEach((model) => {\n console.log(`- ${model.name} (${model.id})`);\n });\n }\n\n if (manifest.editors) {\n console.log(\"\\nEditors:\");\n manifest.editors.forEach((editor) => {\n console.log(`- ${editor.name} (${editor.id})`);\n });\n }\n\n if (manifest.processors) {\n console.log(\"\\nProcessors:\");\n manifest.processors.forEach((processor) => {\n console.log(`- ${processor.name} (${processor.id})`);\n });\n }\n\n if (manifest.subgraphs) {\n console.log(\"\\nSubgraphs:\");\n manifest.subgraphs.forEach((subgraph) => {\n console.log(`- ${subgraph.name} (${subgraph.id})`);\n });\n }\n } catch (e) {\n if (args.debug) {\n console.error(e);\n } else {\n console.log(\"No manifest found in the package\");\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAIA,SAAgB,aAAa,MAAmB;AAC9C,KAAI,KAAK,MACP,SAAQ,IAAI,yBAAyB,KAAK;CAG5C,MAAM,cAAc,eAAe,KAAK,MAAM;CAC9C,MAAM,EAAE,gBAAgB;AAExB,KAAI,KAAK,MACP,SAAQ,IAAI,qBAAqB,YAAY;AAG/C,KAAI;EACF,MAAM,gBAAgB,SACpB,KAAK,MAAM,GAAG,aAAa,MAAM,QAAQ,CAAC;EAC5C,MAAM,WAAW,aACf,GAAG,QAAQ,KAAK,CAAC,gBAAgB,YAAY,gCAC9C;AAED,UAAQ,IAAI,SAAS,KAAK;AAC1B,MAAI,SAAS,gBAAgB;AAC3B,WAAQ,IAAI,qBAAqB;AACjC,YAAS,eAAe,SAAS,UAAU;AACzC,YAAQ,IAAI,KAAK,MAAM,KAAK,IAAI,MAAM,GAAG,GAAG;KAC5C;;AAGJ,MAAI,SAAS,SAAS;AACpB,WAAQ,IAAI,aAAa;AACzB,YAAS,QAAQ,SAAS,WAAW;AACnC,YAAQ,IAAI,KAAK,OAAO,KAAK,IAAI,OAAO,GAAG,GAAG;KAC9C;;AAGJ,MAAI,SAAS,YAAY;AACvB,WAAQ,IAAI,gBAAgB;AAC5B,YAAS,WAAW,SAAS,cAAc;AACzC,YAAQ,IAAI,KAAK,UAAU,KAAK,IAAI,UAAU,GAAG,GAAG;KACpD;;AAGJ,MAAI,SAAS,WAAW;AACtB,WAAQ,IAAI,eAAe;AAC3B,YAAS,UAAU,SAAS,aAAa;AACvC,YAAQ,IAAI,KAAK,SAAS,KAAK,IAAI,SAAS,GAAG,GAAG;KAClD;;UAEG,GAAG;AACV,MAAI,KAAK,MACP,SAAQ,MAAM,EAAE;MAEhB,SAAQ,IAAI,mCAAmC","debug_id":"b2a9ca8c-b055-504d-90d5-d0bbacda0201"}