@powerhousedao/shared 6.2.2-dev.3 → 6.2.2-dev.30

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 (101) hide show
  1. package/dist/clis/args/access-token.mjs +1 -1
  2. package/dist/clis/args/{common-C5n5ai5C.d.mts → common-B_LcTLHX.d.mts} +5 -2
  3. package/dist/clis/args/{common-C5n5ai5C.d.mts.map → common-B_LcTLHX.d.mts.map} +1 -1
  4. package/dist/clis/args/{common-dbsvksvf.mjs → common-CcYbXrBx.mjs} +7 -2
  5. package/dist/clis/args/common-CcYbXrBx.mjs.map +1 -0
  6. package/dist/clis/args/common.d.mts +2 -2
  7. package/dist/clis/args/common.mjs +2 -2
  8. package/dist/clis/args/connect.d.mts +9 -0
  9. package/dist/clis/args/connect.d.mts.map +1 -1
  10. package/dist/clis/args/connect.mjs +2 -1
  11. package/dist/clis/args/connect.mjs.map +1 -1
  12. package/dist/clis/args/{generate-Cs5okckF.mjs → generate-CQ78RxVS.mjs} +2 -2
  13. package/dist/clis/args/{generate-Cs5okckF.mjs.map → generate-CQ78RxVS.mjs.map} +1 -1
  14. package/dist/clis/args/generate.mjs +1 -1
  15. package/dist/clis/args/{help-BkF9Cxud.mjs → help-Dk-d57W1.mjs} +3 -3
  16. package/dist/clis/args/{help-BkF9Cxud.mjs.map → help-Dk-d57W1.mjs.map} +1 -1
  17. package/dist/clis/args/help.mjs +1 -1
  18. package/dist/clis/args/index.d.mts +2 -2
  19. package/dist/clis/args/index.mjs +4 -4
  20. package/dist/clis/args/init.d.mts +1 -1
  21. package/dist/clis/args/init.mjs +1 -1
  22. package/dist/clis/args/inspect.mjs +1 -1
  23. package/dist/clis/args/install.mjs +1 -1
  24. package/dist/clis/args/list.mjs +1 -1
  25. package/dist/clis/args/login.mjs +1 -1
  26. package/dist/clis/args/migrate.mjs +1 -1
  27. package/dist/clis/args/publish.mjs +1 -1
  28. package/dist/clis/args/registry.mjs +1 -1
  29. package/dist/clis/args/service.mjs +1 -1
  30. package/dist/clis/args/switchboard.mjs +1 -1
  31. package/dist/clis/args/uninstall.mjs +1 -1
  32. package/dist/clis/args/unpublish.mjs +1 -1
  33. package/dist/clis/args/vetra.mjs +1 -1
  34. package/dist/clis/build-config.d.mts +4 -4
  35. package/dist/clis/build-config.d.mts.map +1 -1
  36. package/dist/clis/constants.d.mts +156 -49
  37. package/dist/clis/constants.d.mts.map +1 -1
  38. package/dist/clis/constants.mjs +6 -2
  39. package/dist/clis/constants.mjs.map +1 -1
  40. package/dist/clis/index.d.mts +423 -5
  41. package/dist/clis/index.d.mts.map +1 -1
  42. package/dist/clis/index.mjs +258 -3
  43. package/dist/clis/index.mjs.map +1 -1
  44. package/dist/connect/config-loader.d.ts +2 -1
  45. package/dist/connect/config-loader.d.ts.map +1 -1
  46. package/dist/connect/index.d.ts +399 -2
  47. package/dist/connect/index.d.ts.map +1 -1
  48. package/dist/connect/index.js +465 -1
  49. package/dist/connect/index.js.map +1 -1
  50. package/dist/connect/json-adapter.d.ts.map +1 -1
  51. package/dist/{constants-C_EQX4DY.d.ts → constants-BP_gjn8g.d.ts} +1 -1
  52. package/dist/constants-BP_gjn8g.d.ts.map +1 -0
  53. package/dist/constants.d.ts +1 -1
  54. package/dist/document-drive/index.d.ts +2 -2
  55. package/dist/document-drive/index.d.ts.map +1 -1
  56. package/dist/document-model/index.d.ts +5 -5
  57. package/dist/document-model/index.js +737 -123
  58. package/dist/document-model/index.js.map +1 -1
  59. package/dist/document-model/mock.d.ts +1 -1
  60. package/dist/document-model/mock.js +32 -3
  61. package/dist/document-model/mock.js.map +1 -1
  62. package/dist/document-model/utils.d.ts +2 -2
  63. package/dist/document-model/utils.js +1 -1
  64. package/dist/{index-CQDIrK1k.d.ts → index-BJU79_T5.d.ts} +1 -1
  65. package/dist/index-BJU79_T5.d.ts.map +1 -0
  66. package/dist/{index-DLx4nU83.d.ts → index-OItp9eXf.d.ts} +205 -3
  67. package/dist/index-OItp9eXf.d.ts.map +1 -0
  68. package/dist/index.d.ts +5 -6
  69. package/dist/mock-BcFWPQyK.d.ts +22 -0
  70. package/dist/mock-BcFWPQyK.d.ts.map +1 -0
  71. package/dist/processors/index.d.ts +1 -1
  72. package/dist/registry/index.d.ts +5 -4
  73. package/dist/registry/index.d.ts.map +1 -1
  74. package/dist/registry/index.js +5 -4
  75. package/dist/registry/index.js.map +1 -1
  76. package/dist/registry/manifest-slim.d.ts +1 -1
  77. package/dist/registry/manifest-slim.d.ts.map +1 -1
  78. package/dist/registry/urls.d.ts +11 -0
  79. package/dist/registry/urls.d.ts.map +1 -0
  80. package/dist/registry/urls.js +15 -0
  81. package/dist/registry/urls.js.map +1 -0
  82. package/dist/{types-CgGSyOl6.d.ts → types-C7IdvgpK.d.ts} +32 -3
  83. package/dist/{types-CgGSyOl6.d.ts.map → types-C7IdvgpK.d.ts.map} +1 -1
  84. package/dist/{types-Bo4Rb8Yf.d.ts → types-aWKQyxzX.d.ts} +400 -12
  85. package/dist/types-aWKQyxzX.d.ts.map +1 -0
  86. package/dist/{utils-BEByNOHo.d.ts → utils-1EXU6Qr1.d.ts} +1 -1
  87. package/dist/utils-1EXU6Qr1.d.ts.map +1 -0
  88. package/dist/{utils-DKOFCM0Q.js → utils-CTt1XRn-.js} +36 -2
  89. package/dist/utils-CTt1XRn-.js.map +1 -0
  90. package/package.json +1 -1
  91. package/dist/clis/args/common-dbsvksvf.mjs.map +0 -1
  92. package/dist/constants-C_EQX4DY.d.ts.map +0 -1
  93. package/dist/index-CQDIrK1k.d.ts.map +0 -1
  94. package/dist/index-DLx4nU83.d.ts.map +0 -1
  95. package/dist/mock-CBcf78ra.d.ts +0 -7
  96. package/dist/mock-CBcf78ra.d.ts.map +0 -1
  97. package/dist/types-Bo4Rb8Yf.d.ts.map +0 -1
  98. package/dist/types-D0NNBVGA.d.ts +0 -167
  99. package/dist/types-D0NNBVGA.d.ts.map +0 -1
  100. package/dist/utils-BEByNOHo.d.ts.map +0 -1
  101. package/dist/utils-DKOFCM0Q.js.map +0 -1
@@ -1,51 +1,5 @@
1
1
  import { z } from "zod";
2
2
 
3
- //#region document-model/schemas.d.ts
4
- declare const ManifestSchema: z.ZodObject<{
5
- name: z.ZodString;
6
- description: z.ZodOptional<z.ZodString>;
7
- category: z.ZodOptional<z.ZodString>;
8
- publisher: z.ZodOptional<z.ZodObject<{
9
- name: z.ZodOptional<z.ZodString>;
10
- url: z.ZodOptional<z.ZodString>;
11
- }, z.core.$strip>>;
12
- documentModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
13
- id: z.ZodString;
14
- name: z.ZodString;
15
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
- }, z.core.$strip>>>;
17
- apps: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
- id: z.ZodString;
19
- name: z.ZodString;
20
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
- }, z.core.$strip>>>;
22
- editors: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
- id: z.ZodString;
24
- name: z.ZodString;
25
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
- }, z.core.$strip>>>;
27
- processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
- id: z.ZodString;
29
- name: z.ZodString;
30
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
- }, z.core.$strip>>>;
32
- subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
33
- id: z.ZodString;
34
- name: z.ZodString;
35
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
- }, z.core.$strip>>>;
37
- config: z.ZodOptional<z.ZodArray<z.ZodObject<{
38
- name: z.ZodString;
39
- type: z.ZodUnion<readonly [z.ZodLiteral<"var">, z.ZodLiteral<"secret">]>;
40
- description: z.ZodOptional<z.ZodString>;
41
- required: z.ZodOptional<z.ZodBoolean>;
42
- default: z.ZodOptional<z.ZodBoolean>;
43
- }, z.core.$strip>>>;
44
- }, z.core.$strip>;
45
- //#endregion
46
- //#region document-model/types.d.ts
47
- type Manifest = z.infer<typeof ManifestSchema>;
48
- //#endregion
49
3
  //#region clis/types.d.ts
50
4
  type DrivePreserveStrategies = typeof DRIVES_PRESERVE_STRATEGIES;
51
5
  type DrivePreserveStrategy = DrivePreserveStrategies[number];
@@ -92,11 +46,26 @@ type PHConnectPackages = {
92
46
  externalEnabled?: boolean; /** Subscribe to the static-mode `/__packages` SSE channel for live reload. */
93
47
  liveReload?: boolean;
94
48
  };
49
+ type PHRenownRainbowAdapterConfig = {
50
+ /** WalletConnect project id; required for the rainbow adapter to function. */walletConnectProjectId?: string; /** Optional Infura project id used to build RPC transports. */
51
+ infuraProjectId?: string;
52
+ };
53
+ type PHRenownPrivyAdapterConfig = {
54
+ /** Privy application id; required for the privy adapter to function. */appId?: string; /** Optional Privy client id. */
55
+ clientId?: string; /** Login methods this adapter offers; defaults per adapter when omitted. */
56
+ methods?: string[];
57
+ };
58
+ type PHConnectRenownAdapters = {
59
+ rainbow?: PHRenownRainbowAdapterConfig;
60
+ privy?: PHRenownPrivyAdapterConfig;
61
+ };
95
62
  type PHConnectRenown = {
96
63
  url?: string;
97
64
  networkId?: string;
98
65
  chainId?: number; /** Renown localStorage namespace; share it across Connects to share login. */
99
- namespace?: string;
66
+ namespace?: string; /** Switchboard GraphQL URL; when set, enables in-page (no-redirect) auth. */
67
+ switchboardUrl?: string; /** Per-adapter wallet config; presence of a key enables that adapter. */
68
+ adapters?: PHConnectRenownAdapters;
100
69
  };
101
70
  type PHConnectSentry = {
102
71
  /** Sentry DSN URL. `null` disables Sentry entirely. */dsn?: string | null; /** Sentry environment label. */
@@ -107,6 +76,95 @@ type PHConnectInstance = {
107
76
  namespace: string | null;
108
77
  reactorWorker: boolean;
109
78
  };
79
+ /**
80
+ * A URL-matching pattern for a service-worker runtime-caching rule, in
81
+ * JSON-serialisable form. A plain string is handed to Workbox verbatim (exact
82
+ * URL or same-origin path match). `{ source, flags }` is reconstructed into a
83
+ * `RegExp` at build time — use it for prefix/suffix/origin matches (e.g.
84
+ * `{ source: "^https://api\\.acme\\.io/" }`). Function-valued patterns aren't
85
+ * expressible here; regex covers the realistic package cases.
86
+ */
87
+ type PHConnectPwaUrlPattern = string | {
88
+ source: string;
89
+ flags?: string;
90
+ };
91
+ type PHConnectPwaCacheStrategy = "CacheFirst" | "CacheOnly" | "NetworkFirst" | "NetworkOnly" | "StaleWhileRevalidate";
92
+ /** Serialisable subset of a Workbox `RuntimeCaching` rule. */
93
+ type PHConnectPwaRuntimeCaching = {
94
+ urlPattern: PHConnectPwaUrlPattern;
95
+ handler: PHConnectPwaCacheStrategy;
96
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "PATCH";
97
+ options?: {
98
+ cacheName?: string;
99
+ /** Seconds a NetworkFirst rule waits for the network before falling back
100
+ * to the cache. */
101
+ networkTimeoutSeconds?: number;
102
+ expiration?: {
103
+ maxEntries?: number;
104
+ maxAgeSeconds?: number;
105
+ };
106
+ cacheableResponse?: {
107
+ statuses?: number[];
108
+ headers?: Record<string, string>;
109
+ };
110
+ };
111
+ };
112
+ type PHConnectPwaIcon = {
113
+ src: string;
114
+ sizes?: string;
115
+ type?: string;
116
+ purpose?: string;
117
+ };
118
+ /**
119
+ * A File Handling API entry a package or project contributes: the OS-level
120
+ * file types the installed Connect PWA offers to open. There is deliberately
121
+ * no `action` field — consuming launched files requires runtime code that
122
+ * lives in Connect itself, so every handler (built-in or contributed) opens
123
+ * at Connect's app root, injected at build time.
124
+ */
125
+ type PHConnectPwaFileHandler = {
126
+ /** MIME type → file extensions (each must start with "."). */accept: Record<string, string[]>; /** OS-level file-type icons. */
127
+ icons?: PHConnectPwaIcon[];
128
+ launch_type?: "single-client" | "multiple-clients";
129
+ };
130
+ /** Web-app-manifest fields a package or project may override. */
131
+ type PHConnectPwaManifest = {
132
+ name?: string;
133
+ short_name?: string;
134
+ description?: string;
135
+ theme_color?: string;
136
+ background_color?: string;
137
+ display?: "fullscreen" | "standalone" | "minimal-ui" | "browser";
138
+ start_url?: string;
139
+ scope?: string;
140
+ icons?: PHConnectPwaIcon[]; /** Extra file associations, appended after Connect's built-in `.phd`/`.phdm` handler. */
141
+ file_handlers?: PHConnectPwaFileHandler[]; /** How the OS launches the app for handled files/links. */
142
+ launch_handler?: {
143
+ client_mode: "auto" | "focus-existing" | "navigate-existing" | "navigate-new";
144
+ };
145
+ /** App-store-style categories. NOT authored under `connect.pwa` — derived at
146
+ * build/runtime from the `category` field of every contributing
147
+ * `powerhouse.manifest.json` (project + packages), unioned across them. */
148
+ categories?: string[];
149
+ };
150
+ /**
151
+ * PWA / service-worker overrides contributed by a package or the project.
152
+ * Layered on top of Connect's hardcoded PWA defaults at build time. Scalar
153
+ * fields deep-merge (later layer wins); every array member — the manifest
154
+ * arrays (`icons`, `file_handlers`, and the derived `categories`) plus the
155
+ * top-level `globPatterns`, `globIgnores`, `runtimeCaching` and
156
+ * `navigateFallbackDenylist` — is additive (concatenated/unioned);
157
+ * `maximumFileSizeToCacheInBytes` takes the max across contributors.
158
+ * Precedence: defaults < package fragments < project config.
159
+ */
160
+ type PHConnectPwa = {
161
+ manifest?: PHConnectPwaManifest; /** Extra Workbox precache globs, unioned with the built-in patterns. */
162
+ globPatterns?: string[]; /** Extra Workbox precache ignore globs, unioned with the built-in list. */
163
+ globIgnores?: string[]; /** Raise the precache file-size ceiling; the max across contributors wins. */
164
+ maximumFileSizeToCacheInBytes?: number; /** Additional runtime-caching rules, appended after the built-in rules. */
165
+ runtimeCaching?: PHConnectPwaRuntimeCaching[]; /** Extra SPA-fallback denylist patterns, unioned with the built-in list. */
166
+ navigateFallbackDenylist?: PHConnectPwaUrlPattern[];
167
+ };
110
168
  type PHConnectRuntimeConfig = {
111
169
  branding?: PHConnectBranding;
112
170
  app?: PHConnectApp;
@@ -115,6 +173,7 @@ type PHConnectRuntimeConfig = {
115
173
  renown?: PHConnectRenown;
116
174
  sentry?: PHConnectSentry;
117
175
  instance?: PHConnectInstance;
176
+ pwa?: PHConnectPwa;
118
177
  };
119
178
  type PowerhouseConfig = {
120
179
  logLevel: LogLevel;
@@ -163,6 +222,54 @@ type PowerhouseConfig = {
163
222
  connect?: PHConnectRuntimeConfig;
164
223
  };
165
224
  //#endregion
225
+ //#region document-model/schemas.d.ts
226
+ declare const ManifestSchema: z.ZodObject<{
227
+ name: z.ZodString;
228
+ description: z.ZodOptional<z.ZodString>;
229
+ category: z.ZodOptional<z.ZodString>;
230
+ image: z.ZodOptional<z.ZodString>;
231
+ publisher: z.ZodOptional<z.ZodObject<{
232
+ name: z.ZodOptional<z.ZodString>;
233
+ url: z.ZodOptional<z.ZodString>;
234
+ }, z.core.$strip>>;
235
+ documentModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
236
+ id: z.ZodString;
237
+ name: z.ZodString;
238
+ documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
239
+ }, z.core.$strip>>>;
240
+ apps: z.ZodOptional<z.ZodArray<z.ZodObject<{
241
+ id: z.ZodString;
242
+ name: z.ZodString;
243
+ documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
244
+ }, z.core.$strip>>>;
245
+ editors: z.ZodOptional<z.ZodArray<z.ZodObject<{
246
+ id: z.ZodString;
247
+ name: z.ZodString;
248
+ documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
249
+ }, z.core.$strip>>>;
250
+ processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
251
+ id: z.ZodString;
252
+ name: z.ZodString;
253
+ documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ }, z.core.$strip>>>;
255
+ subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
256
+ id: z.ZodString;
257
+ name: z.ZodString;
258
+ documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
259
+ }, z.core.$strip>>>;
260
+ config: z.ZodOptional<z.ZodArray<z.ZodObject<{
261
+ name: z.ZodString;
262
+ type: z.ZodUnion<readonly [z.ZodLiteral<"var">, z.ZodLiteral<"secret">]>;
263
+ description: z.ZodOptional<z.ZodString>;
264
+ required: z.ZodOptional<z.ZodBoolean>;
265
+ default: z.ZodOptional<z.ZodBoolean>;
266
+ }, z.core.$strip>>>;
267
+ pwa: z.ZodOptional<z.ZodType<PHConnectPwa, unknown, z.core.$ZodTypeInternals<PHConnectPwa, unknown>>>;
268
+ }, z.core.$strip>;
269
+ //#endregion
270
+ //#region document-model/types.d.ts
271
+ type Manifest = z.infer<typeof ManifestSchema>;
272
+ //#endregion
166
273
  //#region clis/constants.d.ts
167
274
  declare const SERVICE_ACTIONS: readonly ["start", "stop", "status", "setup", "restart"];
168
275
  declare const SECONDS_IN_DAY: number;
@@ -176,7 +283,7 @@ declare const DEFAULT_VETRA_CONNECT_PORT: 3001;
176
283
  declare const DEFAULT_CONNECT_PREVIEW_PORT: 4173;
177
284
  declare const DEFAULT_CONNECT_OUTDIR: ".ph/connect-build/dist/";
178
285
  declare const DEFAULT_RENOWN_URL: "https://www.renown.id";
179
- declare const DEFAULT_REGISTRY_URL: "https://registry.dev.vetra.io";
286
+ declare const DEFAULT_REGISTRY_URL: "https://registry.vetra.io";
180
287
  declare const DEFAULT_SWITCHBOARD_PORT: 4001;
181
288
  declare const DEFAULT_VETRA_DRIVE_ID: "vetra";
182
289
  declare const MINIMUM_NODE_VERSION: "24.0.0";
@@ -220,7 +327,7 @@ declare const FEATURE_DEPENDENCIES: {
220
327
  };
221
328
  };
222
329
  declare const VERSIONED_DEPENDENCIES: string[];
223
- declare const BOILERPLATE_ALLOWED_BUILDS: readonly ["@apollo/protobufjs", "@datadog/pprof", "@parcel/watcher", "esbuild", "protobufjs"];
330
+ declare const BOILERPLATE_ALLOWED_BUILDS: readonly ["@apollo/protobufjs", "@datadog/pprof", "@parcel/watcher", "@reown/appkit", "bufferutil", "esbuild", "keccak", "protobufjs", "utf-8-validate"];
224
331
  declare const BOILERPLATE_PNPM_OVERRIDES: {
225
332
  readonly "date-fns": "4.3.0";
226
333
  readonly vite: "8.0.14";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","names":[],"sources":["../../document-model/schemas.ts","../../document-model/types.ts","../../clis/types.ts","../../clis/constants.ts"],"mappings":";;;cAixBa,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCw6Bf,QAAA,GAAW,CAAA,CAAE,KAAA,QAAa,cAAA;;;KC/qD1B,uBAAA,UAAiC,0BAAA;AAAA,KACjC,qBAAA,GAAwB,uBAAA;AAAA,KACxB,SAAA,UAAmB,UAAA;AAAA,KACnB,QAAA,GAAW,SAAA;AAAA,KAOX,iBAAA;AAAA,KAGA,iBAAA;EACV,WAAA;EACA,OAAA;EACA,QAAA,GAAW,iBAAA;EACX,GAAA;AAAA;AAAA,KAGU,iBAAA;EACV,OAAA;EACA,cAAA;AAAA;AAAA,KAGU,qBAAA;EACV,GAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA;EACV,OAAA;EACA,QAAA;EACA,WAAA;AAAA;AAAA,KAGU,sBAAA;EACV,MAAA,GAAS,qBAAA;EACT,KAAA,GAAQ,qBAAA;AAAA;AAAA,KAGE,eAAA;EACV,aAAA;EACA,aAAA,GAAgB,qBAAA;EAChB,gBAAA,GAAmB,qBAAA;EACnB,QAAA,GAAW,sBAAA;AAAA;AAAA,KAGD,YAAA;EACV,QAAA;EACA,QAAA;EACA,OAAA;EAGA,UAAA;AAAA;AAAA,KAGU,iBAAA;EACV,eAAA;EAEA,UAAA;AAAA;AAAA,KAGU,eAAA;EACV,GAAA;EACA,SAAA;EACA,OAAA;EAEA,SAAA;AAAA;AAAA,KAGU,eAAA;yDAEV,GAAA;EAEA,GAAA;EAEA,OAAA;AAAA;AAAA,KAGU,iBAAA;EACV,SAAA;EACA,aAAA;AAAA;AAAA,KAGU,sBAAA;EACV,QAAA,GAAW,iBAAA;EACX,GAAA,GAAM,YAAA;EACN,QAAA,GAAW,iBAAA;EACX,MAAA,GA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A;;;;cAMA,0BAAA;AAAA,cAQA,kBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4CA,cAAA;EAAA;;;;;;;;;;;;;;;;cAoBA,oBAAA;AAAA,cAIA,+BAAA;AAAA,cAcA,wBAAA;AAAA,cAwBA,uBAAA;EAAA;;;;;;;;;;;;;;;;;;;cAqBA,eAAA,EAAiB,QAAA;AAAA,cAuBjB,cAAA,EAAgB,gBAAA"}
1
+ {"version":3,"file":"constants.d.mts","names":[],"sources":["../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts","../../clis/constants.ts"],"mappings":";;;KAUY,uBAAA,UAAiC,0BAAA;AAAA,KACjC,qBAAA,GAAwB,uBAAA;AAAA,KACxB,SAAA,UAAmB,UAAA;AAAA,KACnB,QAAA,GAAW,SAAA;AAAA,KAOX,iBAAA;AAAA,KAGA,iBAAA;EACV,WAAA;EACA,OAAA;EACA,QAAA,GAAW,iBAAA;EACX,GAAA;AAAA;AAAA,KAGU,iBAAA;EACV,OAAA;EACA,cAAA;AAAA;AAAA,KAGU,qBAAA;EACV,GAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA;EACV,OAAA;EACA,QAAA;EACA,WAAA;AAAA;AAAA,KAGU,sBAAA;EACV,MAAA,GAAS,qBAAA;EACT,KAAA,GAAQ,qBAAA;AAAA;AAAA,KAGE,eAAA;EACV,aAAA;EACA,aAAA,GAAgB,qBAAA;EAChB,gBAAA,GAAmB,qBAAA;EACnB,QAAA,GAAW,sBAAA;AAAA;AAAA,KAGD,YAAA;EACV,QAAA;EACA,QAAA;EACA,OAAA;EAGA,UAAA;AAAA;AAAA,KAGU,iBAAA;EACV,eAAA,YA/BI;EAiCJ,UAAA;AAAA;AAAA,KAGU,4BAAA;gFAEV,sBAAA,WAlCA;EAoCA,eAAA;AAAA;AAAA,KAGU,0BAAA;EArCC,wEAuCX,KAAA,WApCgC;EAsChC,QAAA,WApC6B;EAsC7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AAAA,cACA,sBAAA;AAAA,cACA,kBAAA;AAAA,cAEA,sBAAA;AAAA,cAEA,QAAA;AAAA,cAEA,qBAAA;AAAA,cAGA,2BAAA;AAAA,cAOA,mBAAA;AAAA,cACA,6BAAA;AAAA,cAEA,eAAA;AAAA,cACA,mBAAA;AAAA,cAQA,0BAAA;EAAA;;;;;;;;;;;;;;;;;;;;;cASA,oBAAA;EAAA;;;;;cAUA,sBAAA;AAAA,cAUA,0BAAA;AAAA,cAgBA,0BAAA;EAAA;;;;cAMA,0BAAA;AAAA,cAQA,kBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4CA,cAAA;EAAA;;;;;;;;;;;;;;;;cAoBA,oBAAA;AAAA,cAIA,+BAAA;AAAA,cAcA,wBAAA;AAAA,cAwBA,uBAAA;EAAA;;;;;;;;;;;;;;;;;;;cAqBA,eAAA,EAAiB,QAAA;AAAA,cAuBjB,cAAA,EAAgB,gBAAA"}
@@ -25,7 +25,7 @@ const DEFAULT_VETRA_CONNECT_PORT = 3001;
25
25
  const DEFAULT_CONNECT_PREVIEW_PORT = 4173;
26
26
  const DEFAULT_CONNECT_OUTDIR = ".ph/connect-build/dist/";
27
27
  const DEFAULT_RENOWN_URL = "https://www.renown.id";
28
- const DEFAULT_REGISTRY_URL = "https://registry.dev.vetra.io";
28
+ const DEFAULT_REGISTRY_URL = "https://registry.vetra.io";
29
29
  const DEFAULT_SWITCHBOARD_PORT = 4001;
30
30
  const DEFAULT_VETRA_DRIVE_ID = "vetra";
31
31
  const MINIMUM_NODE_VERSION = "24.0.0";
@@ -71,8 +71,12 @@ const BOILERPLATE_ALLOWED_BUILDS = [
71
71
  "@apollo/protobufjs",
72
72
  "@datadog/pprof",
73
73
  "@parcel/watcher",
74
+ "@reown/appkit",
75
+ "bufferutil",
74
76
  "esbuild",
75
- "protobufjs"
77
+ "keccak",
78
+ "protobufjs",
79
+ "utf-8-validate"
76
80
  ];
77
81
  const BOILERPLATE_PNPM_OVERRIDES = {
78
82
  "date-fns": "4.3.0",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","names":[],"sources":["../../clis/constants.ts"],"sourcesContent":["import { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { Manifest } from \"../document-model/types.js\";\nimport type { PowerhouseConfig } from \"./types.js\";\n\nexport const SERVICE_ACTIONS = [\n \"start\",\n \"stop\",\n \"status\",\n \"setup\",\n \"restart\",\n] as const;\n\nexport const SECONDS_IN_DAY = 24 * 60 * 60;\nexport const DEFAULT_EXPIRY_DAYS = 7;\nexport const DEFAULT_EXPIRY_SECONDS = DEFAULT_EXPIRY_DAYS * SECONDS_IN_DAY;\n\nexport const DRIVES_PRESERVE_STRATEGIES = [\n \"preserve-all\",\n \"preserve-by-url-and-detach\",\n] as const;\n\nexport const LOG_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"verbose\",\n] as const;\n\nexport const DEFAULT_TIMEOUT = 300 as const;\n\nexport const DEFAULT_CONNECT_STUDIO_PORT = 3000 as const;\n\nexport const DEFAULT_VETRA_CONNECT_PORT = 3001 as const;\n\nexport const DEFAULT_CONNECT_PREVIEW_PORT = 4173 as const;\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport const DEFAULT_RENOWN_URL = \"https://www.renown.id\" as const;\n\nexport const DEFAULT_REGISTRY_URL = \"https://registry.dev.vetra.io\" as const;\n\nexport const DEFAULT_SWITCHBOARD_PORT = 4001 as const;\n\nexport const DEFAULT_VETRA_DRIVE_ID = \"vetra\" as const;\n\nexport const MINIMUM_NODE_VERSION = \"24.0.0\" as const;\nexport const PH_BIN = \"ph-cli-legacy\" as const;\nexport const POWERHOUSE_CONFIG_FILE = \"powerhouse.config.json\" as const;\nexport const PH_GLOBAL_DIR_NAME = \".ph\" as const;\n// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility\nexport const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;\n\nexport const HOME_DIR = homedir();\n\nexport const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, PH_GLOBAL_DIR_NAME);\n\n// Workspace packages that go in peerDependencies of every generated project.\nexport const VERSIONED_PEER_DEPENDENCIES = [\n \"document-model\",\n \"@powerhousedao/reactor-browser\",\n];\n\ntype PeerSpec = { peer: string; dev: string };\n\nexport const REACTOR_API_PACKAGE = \"@powerhousedao/reactor-api\";\nexport const ANALYTICS_ENGINE_CORE_PACKAGE =\n \"@powerhousedao/analytics-engine-core\";\nexport const GRAPHQL_PACKAGE = \"graphql\";\nexport const GRAPHQL_TAG_PACKAGE = \"graphql-tag\";\n\n// External peerDependencies of every generated project.\n// `peer` is the consumer-facing range; `dev` is the exact build-tested pin.\n// graphql / graphql-tag are always-on because the workspace packages pulled\n// in by every `ph init` project (codegen, reactor-api, reactor-browser,\n// vetra-packages) declare them as peers — even projects without subgraphs\n// need them in scope so pnpm hoists a single graphql instance.\nexport const PEER_EXTERNAL_DEPENDENCIES = {\n [GRAPHQL_PACKAGE]: { peer: \"^16\", dev: \"16.12.0\" },\n [GRAPHQL_TAG_PACKAGE]: { peer: \"^2\", dev: \"2.12.6\" },\n react: { peer: \"^19\", dev: \"19.2.6\" },\n \"react-dom\": { peer: \"^19\", dev: \"19.2.6\" },\n zod: { peer: \"^4\", dev: \"4.3.6\" },\n} as const satisfies Record<string, PeerSpec>;\n\n// Per-feature deps added dynamically by codegen when required.\nexport const FEATURE_DEPENDENCIES = {\n analyticsProcessor: {\n peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],\n peerExternal: {},\n },\n} as const satisfies Record<\n string,\n { peerVersioned: readonly string[]; peerExternal: Record<string, PeerSpec> }\n>;\n\nexport const VERSIONED_DEPENDENCIES = [\n ...VERSIONED_PEER_DEPENDENCIES,\n ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,\n];\n\n// Transitive dependencies whose postinstall scripts the generated project\n// trusts. Mirrors the `allowBuilds` map in the boilerplate's\n// pnpm-workspace.yaml and is also passed as `--allow-build` flags to\n// `pnpm dlx @powerhousedao/ph-cli init` so pnpm 11's strict-dep-builds\n// default doesn't prompt during the outer dlx download.\nexport const BOILERPLATE_ALLOWED_BUILDS = [\n \"@apollo/protobufjs\",\n \"@datadog/pprof\",\n \"@parcel/watcher\",\n \"esbuild\",\n \"protobufjs\",\n] as const;\n\n// pnpm `overrides` written into the generated project's pnpm-workspace.yaml to\n// force a single chosen version of each, avoiding duplicates from coexisting\n// version ranges. Generated-project only — never change the monorepo catalog\n// for this (a re-resolution there pulls a tsc-crashing TS6 beta).\nexport const BOILERPLATE_PNPM_OVERRIDES = {\n \"date-fns\": \"4.3.0\",\n vite: \"8.0.14\",\n rolldown: \"1.0.2\",\n} as const satisfies Record<string, string>;\n\nexport const VERSIONED_DEV_DEPENDENCIES = [\n \"@powerhousedao/ph-cli\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/connect\",\n \"@powerhousedao/design-system\",\n];\n\nexport const packageJsonExports = {\n \".\": {\n types: \"./dist/types/index.d.ts\",\n browser: \"./dist/browser/index.js\",\n node: \"./dist/node/index.mjs\",\n },\n \"./reactor\": {\n types: \"./dist/types/reactor/index.d.ts\",\n browser: \"./dist/browser/reactor/index.js\",\n },\n \"./document-models\": {\n types: \"./dist/types/document-models/index.d.ts\",\n browser: \"./dist/browser/document-models/index.js\",\n node: \"./dist/node/document-models/index.mjs\",\n },\n \"./document-models/*\": {\n types: \"./dist/types/document-models/*/index.d.ts\",\n browser: \"./dist/browser/document-models/*/index.js\",\n node: \"./dist/node/document-models/*/index.mjs\",\n },\n \"./editors\": {\n types: \"./dist/types/editors/index.d.ts\",\n browser: \"./dist/browser/editors/index.js\",\n node: \"./dist/node/editors/index.mjs\",\n },\n \"./editors/*\": {\n types: \"./dist/types/editors/*/editor.d.ts\",\n browser: \"./dist/browser/editors/*/editor.js\",\n node: \"./dist/node/editors/*/editor.mjs\",\n },\n \"./subgraphs\": {\n types: \"./dist/types/subgraphs/index.d.ts\",\n browser: \"./dist/browser/subgraphs/index.js\",\n node: \"./dist/node/subgraphs/index.mjs\",\n },\n \"./processors\": {\n types: \"./dist/types/processors/index.d.ts\",\n browser: \"./dist/browser/processors/index.js\",\n node: \"./dist/node/processors/index.mjs\",\n },\n \"./manifest\": \"./dist/powerhouse.manifest.json\",\n \"./style.css\": \"./dist/style.css\",\n} as const;\n\nexport const packageScripts = {\n \"test:watch\": \"vitest\",\n lint: \"oxlint --type-aware --type-check\",\n \"lint:fix\": \"oxlint --type-aware --type-check --fix\",\n format: \"oxfmt\",\n \"format:check\": \"oxfmt --check\",\n tsc: \"tsc\",\n \"tsc:watch\": \"tsc --watch\",\n generate: \"ph-cli generate\",\n connect: \"ph-cli connect\",\n build: \"ph-cli build\",\n reactor: \"ph-cli reactor\",\n service: \"ph-cli service\",\n vetra: \"ph-cli vetra\",\n \"service-startup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh\",\n \"service-unstartup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh\",\n} as const;\n\nexport const externalDependencies = {} as const;\n\n// eslint/prettier devDependencies present in projects scaffolded before the oxc migration.\n// Stripped from package.json during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_DEPENDENCIES = [\n \"@eslint/js\",\n \"eslint\",\n \"eslint-config-prettier\",\n \"eslint-plugin-prettier\",\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n \"globals\",\n \"prettier\",\n \"typescript-eslint\",\n] as const;\n\n// Legacy lint/format config files written by eslint/prettier boilerplate.\n// Removed from the project root during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_FILES = [\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \".eslintrc\",\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.json\",\n \".eslintrc.yml\",\n \".eslintrc.yaml\",\n \".eslintignore\",\n \".prettierrc\",\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.json\",\n \".prettierrc.yml\",\n \".prettierrc.yaml\",\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n \"prettier.config.mjs\",\n \".prettierignore\",\n] as const;\n\nexport const externalDevDependencies = {\n \"@electric-sql/pglite\": \"0.3.15\",\n \"@electric-sql/pglite-tools\": \"0.2.20\",\n \"@powerhousedao/document-engineering\": \"1.40.5\",\n \"@tailwindcss/cli\": \"^4.1.18\",\n \"@tailwindcss/vite\": \"^4.1.18\",\n \"@types/node\": \"^24.9.2\",\n \"@types/react\": \"^19.2.3\",\n \"@types/react-dom\": \"^19.2.3\",\n \"@vitejs/plugin-react\": \"^6.0.1\",\n \"@vitest/coverage-v8\": \"4.1.1\",\n oxfmt: \"0.55.0\",\n oxlint: \"1.70.0\",\n \"oxlint-tsgolint\": \"0.23.0\",\n tailwindcss: \"^4.1.16\",\n typescript: \"^5.9.3\",\n vite: \"^8.0.10\",\n \"vite-tsconfig-paths\": \"6.1.1\",\n vitest: \"4.1.1\",\n} as const;\n\nexport const defaultManifest: Manifest = {\n name: \"\",\n description: \"\",\n category: \"\",\n publisher: {\n name: \"\",\n url: \"\",\n },\n documentModels: [],\n editors: [],\n apps: [],\n subgraphs: [],\n processors: [],\n};\n\nconst DEFAULT_DOCUMENT_MODELS_DIR = \"./document-models\";\nconst DEFAULT_EDITORS_DIR = \"./editors\";\nconst DEFAULT_PROCESSORS_DIR = \"./processors\";\nconst DEFAULT_SUBGRAPHS_DIR = \"./subgraphs\";\nconst DEFAULT_IMPORT_SCRIPTS_DIR = \"./scripts\";\nconst DEFAULT_SKIP_FORMAT = false;\nconst DEFAULT_LOG_LEVEL = \"info\";\n\nexport const DEFAULT_CONFIG: PowerhouseConfig = {\n documentModelsDir: DEFAULT_DOCUMENT_MODELS_DIR,\n editorsDir: DEFAULT_EDITORS_DIR,\n processorsDir: DEFAULT_PROCESSORS_DIR,\n subgraphsDir: DEFAULT_SUBGRAPHS_DIR,\n importScriptsDir: DEFAULT_IMPORT_SCRIPTS_DIR,\n skipFormat: DEFAULT_SKIP_FORMAT,\n logLevel: DEFAULT_LOG_LEVEL,\n auth: {\n enabled: false,\n admins: [],\n },\n};\n"],"mappings":";;;AAKA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,iBAAiB,OAAU;AACxC,MAAa,sBAAsB;AACnC,MAAa,yBAAA,IAA+C;AAE5D,MAAa,6BAA6B,CACxC,gBACA,6BACD;AAED,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,kBAAkB;AAE/B,MAAa,8BAA8B;AAE3C,MAAa,6BAA6B;AAE1C,MAAa,+BAA+B;AAE5C,MAAa,yBAAyB;AAEtC,MAAa,qBAAqB;AAElC,MAAa,uBAAuB;AAEpC,MAAa,2BAA2B;AAExC,MAAa,yBAAyB;AAEtC,MAAa,uBAAuB;AACpC,MAAa,SAAS;AACtB,MAAa,yBAAyB;AACtC,MAAa,qBAAqB;AAElC,MAAa,yBAAA;AAEb,MAAa,WAAW,SAAS;AAEjC,MAAa,wBAAwB,KAAK,UAAA,MAA6B;AAGvE,MAAa,8BAA8B,CACzC,kBACA,iCACD;AAID,MAAa,sBAAsB;AACnC,MAAa,gCACX;AACF,MAAa,kBAAkB;AAC/B,MAAa,sBAAsB;AAQnC,MAAa,6BAA6B;EACvC,kBAAkB;EAAE,MAAM;EAAO,KAAK;EAAW;EACjD,sBAAsB;EAAE,MAAM;EAAM,KAAK;EAAU;CACpD,OAAO;EAAE,MAAM;EAAO,KAAK;EAAU;CACrC,aAAa;EAAE,MAAM;EAAO,KAAK;EAAU;CAC3C,KAAK;EAAE,MAAM;EAAM,KAAK;EAAS;CAClC;AAGD,MAAa,uBAAuB,EAClC,oBAAoB;CAClB,eAAe,CAAC,8BAA8B;CAC9C,cAAc,EAAE;CACjB,EACF;AAKD,MAAa,yBAAyB,CACpC,GAAG,6BACH,GAAG,qBAAqB,mBAAmB,cAC5C;AAOD,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACD;AAMD,MAAa,6BAA6B;CACxC,YAAY;CACZ,MAAM;CACN,UAAU;CACX;AAED,MAAa,6BAA6B;CACxC;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,qBAAqB;CAChC,KAAK;EACH,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,aAAa;EACX,OAAO;EACP,SAAS;EACV;CACD,qBAAqB;EACnB,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,uBAAuB;EACrB,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,aAAa;EACX,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,eAAe;EACb,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,eAAe;EACb,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,gBAAgB;EACd,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD,cAAc;CACd,eAAe;CAChB;AAED,MAAa,iBAAiB;CAC5B,cAAc;CACd,MAAM;CACN,YAAY;CACZ,QAAQ;CACR,gBAAgB;CAChB,KAAK;CACL,aAAa;CACb,UAAU;CACV,SAAS;CACT,OAAO;CACP,SAAS;CACT,SAAS;CACT,OAAO;CACP,mBACE;CACF,qBACE;CACH;AAED,MAAa,uBAAuB,EAAE;AAItC,MAAa,kCAAkC;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAID,MAAa,2BAA2B;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,0BAA0B;CACrC,wBAAwB;CACxB,8BAA8B;CAC9B,uCAAuC;CACvC,oBAAoB;CACpB,qBAAqB;CACrB,eAAe;CACf,gBAAgB;CAChB,oBAAoB;CACpB,wBAAwB;CACxB,uBAAuB;CACvB,OAAO;CACP,QAAQ;CACR,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,MAAM;CACN,uBAAuB;CACvB,QAAQ;CACT;AAED,MAAa,kBAA4B;CACvC,MAAM;CACN,aAAa;CACb,UAAU;CACV,WAAW;EACT,MAAM;EACN,KAAK;EACN;CACD,gBAAgB,EAAE;CAClB,SAAS,EAAE;CACX,MAAM,EAAE;CACR,WAAW,EAAE;CACb,YAAY,EAAE;CACf;AAUD,MAAa,iBAAmC;CAC9C,mBATkC;CAUlC,YAT0B;CAU1B,eAT6B;CAU7B,cAT4B;CAU5B,kBATiC;CAUjC,YAT0B;CAU1B,UATwB;CAUxB,MAAM;EACJ,SAAS;EACT,QAAQ,EAAE;EACX;CACF"}
1
+ {"version":3,"file":"constants.mjs","names":[],"sources":["../../clis/constants.ts"],"sourcesContent":["import { homedir } from \"node:os\";\nimport { join } from \"node:path\";\nimport type { Manifest } from \"../document-model/types.js\";\nimport type { PowerhouseConfig } from \"./types.js\";\n\nexport const SERVICE_ACTIONS = [\n \"start\",\n \"stop\",\n \"status\",\n \"setup\",\n \"restart\",\n] as const;\n\nexport const SECONDS_IN_DAY = 24 * 60 * 60;\nexport const DEFAULT_EXPIRY_DAYS = 7;\nexport const DEFAULT_EXPIRY_SECONDS = DEFAULT_EXPIRY_DAYS * SECONDS_IN_DAY;\n\nexport const DRIVES_PRESERVE_STRATEGIES = [\n \"preserve-all\",\n \"preserve-by-url-and-detach\",\n] as const;\n\nexport const LOG_LEVELS = [\n \"debug\",\n \"info\",\n \"warn\",\n \"error\",\n \"verbose\",\n] as const;\n\nexport const DEFAULT_TIMEOUT = 300 as const;\n\nexport const DEFAULT_CONNECT_STUDIO_PORT = 3000 as const;\n\nexport const DEFAULT_VETRA_CONNECT_PORT = 3001 as const;\n\nexport const DEFAULT_CONNECT_PREVIEW_PORT = 4173 as const;\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport const DEFAULT_RENOWN_URL = \"https://www.renown.id\" as const;\n\nexport const DEFAULT_REGISTRY_URL = \"https://registry.vetra.io\" as const;\n\nexport const DEFAULT_SWITCHBOARD_PORT = 4001 as const;\n\nexport const DEFAULT_VETRA_DRIVE_ID = \"vetra\" as const;\n\nexport const MINIMUM_NODE_VERSION = \"24.0.0\" as const;\nexport const PH_BIN = \"ph-cli-legacy\" as const;\nexport const POWERHOUSE_CONFIG_FILE = \"powerhouse.config.json\" as const;\nexport const PH_GLOBAL_DIR_NAME = \".ph\" as const;\n// Keep PH_GLOBAL_PROJECT_NAME for backwards compatibility\nexport const PH_GLOBAL_PROJECT_NAME = PH_GLOBAL_DIR_NAME;\n\nexport const HOME_DIR = homedir();\n\nexport const POWERHOUSE_GLOBAL_DIR = join(HOME_DIR, PH_GLOBAL_DIR_NAME);\n\n// Workspace packages that go in peerDependencies of every generated project.\nexport const VERSIONED_PEER_DEPENDENCIES = [\n \"document-model\",\n \"@powerhousedao/reactor-browser\",\n];\n\ntype PeerSpec = { peer: string; dev: string };\n\nexport const REACTOR_API_PACKAGE = \"@powerhousedao/reactor-api\";\nexport const ANALYTICS_ENGINE_CORE_PACKAGE =\n \"@powerhousedao/analytics-engine-core\";\nexport const GRAPHQL_PACKAGE = \"graphql\";\nexport const GRAPHQL_TAG_PACKAGE = \"graphql-tag\";\n\n// External peerDependencies of every generated project.\n// `peer` is the consumer-facing range; `dev` is the exact build-tested pin.\n// graphql / graphql-tag are always-on because the workspace packages pulled\n// in by every `ph init` project (codegen, reactor-api, reactor-browser,\n// vetra-packages) declare them as peers — even projects without subgraphs\n// need them in scope so pnpm hoists a single graphql instance.\nexport const PEER_EXTERNAL_DEPENDENCIES = {\n [GRAPHQL_PACKAGE]: { peer: \"^16\", dev: \"16.12.0\" },\n [GRAPHQL_TAG_PACKAGE]: { peer: \"^2\", dev: \"2.12.6\" },\n react: { peer: \"^19\", dev: \"19.2.6\" },\n \"react-dom\": { peer: \"^19\", dev: \"19.2.6\" },\n zod: { peer: \"^4\", dev: \"4.3.6\" },\n} as const satisfies Record<string, PeerSpec>;\n\n// Per-feature deps added dynamically by codegen when required.\nexport const FEATURE_DEPENDENCIES = {\n analyticsProcessor: {\n peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],\n peerExternal: {},\n },\n} as const satisfies Record<\n string,\n { peerVersioned: readonly string[]; peerExternal: Record<string, PeerSpec> }\n>;\n\nexport const VERSIONED_DEPENDENCIES = [\n ...VERSIONED_PEER_DEPENDENCIES,\n ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned,\n];\n\n// Transitive dependencies whose postinstall scripts the generated project\n// trusts. Mirrors the `allowBuilds` map in the boilerplate's\n// pnpm-workspace.yaml and is also passed as `--allow-build` flags to\n// `pnpm dlx @powerhousedao/ph-cli init` so pnpm 11's strict-dep-builds\n// default doesn't prompt during the outer dlx download.\nexport const BOILERPLATE_ALLOWED_BUILDS = [\n \"@apollo/protobufjs\",\n \"@datadog/pprof\",\n \"@parcel/watcher\",\n \"@reown/appkit\",\n \"bufferutil\",\n \"esbuild\",\n \"keccak\",\n \"protobufjs\",\n \"utf-8-validate\",\n] as const;\n\n// pnpm `overrides` written into the generated project's pnpm-workspace.yaml to\n// force a single chosen version of each, avoiding duplicates from coexisting\n// version ranges. Generated-project only — never change the monorepo catalog\n// for this (a re-resolution there pulls a tsc-crashing TS6 beta).\nexport const BOILERPLATE_PNPM_OVERRIDES = {\n \"date-fns\": \"4.3.0\",\n vite: \"8.0.14\",\n rolldown: \"1.0.2\",\n} as const satisfies Record<string, string>;\n\nexport const VERSIONED_DEV_DEPENDENCIES = [\n \"@powerhousedao/ph-cli\",\n \"@powerhousedao/reactor\",\n \"@powerhousedao/shared\",\n \"@powerhousedao/connect\",\n \"@powerhousedao/design-system\",\n];\n\nexport const packageJsonExports = {\n \".\": {\n types: \"./dist/types/index.d.ts\",\n browser: \"./dist/browser/index.js\",\n node: \"./dist/node/index.mjs\",\n },\n \"./reactor\": {\n types: \"./dist/types/reactor/index.d.ts\",\n browser: \"./dist/browser/reactor/index.js\",\n },\n \"./document-models\": {\n types: \"./dist/types/document-models/index.d.ts\",\n browser: \"./dist/browser/document-models/index.js\",\n node: \"./dist/node/document-models/index.mjs\",\n },\n \"./document-models/*\": {\n types: \"./dist/types/document-models/*/index.d.ts\",\n browser: \"./dist/browser/document-models/*/index.js\",\n node: \"./dist/node/document-models/*/index.mjs\",\n },\n \"./editors\": {\n types: \"./dist/types/editors/index.d.ts\",\n browser: \"./dist/browser/editors/index.js\",\n node: \"./dist/node/editors/index.mjs\",\n },\n \"./editors/*\": {\n types: \"./dist/types/editors/*/editor.d.ts\",\n browser: \"./dist/browser/editors/*/editor.js\",\n node: \"./dist/node/editors/*/editor.mjs\",\n },\n \"./subgraphs\": {\n types: \"./dist/types/subgraphs/index.d.ts\",\n browser: \"./dist/browser/subgraphs/index.js\",\n node: \"./dist/node/subgraphs/index.mjs\",\n },\n \"./processors\": {\n types: \"./dist/types/processors/index.d.ts\",\n browser: \"./dist/browser/processors/index.js\",\n node: \"./dist/node/processors/index.mjs\",\n },\n \"./manifest\": \"./dist/powerhouse.manifest.json\",\n \"./style.css\": \"./dist/style.css\",\n} as const;\n\nexport const packageScripts = {\n \"test:watch\": \"vitest\",\n lint: \"oxlint --type-aware --type-check\",\n \"lint:fix\": \"oxlint --type-aware --type-check --fix\",\n format: \"oxfmt\",\n \"format:check\": \"oxfmt --check\",\n tsc: \"tsc\",\n \"tsc:watch\": \"tsc --watch\",\n generate: \"ph-cli generate\",\n connect: \"ph-cli connect\",\n build: \"ph-cli build\",\n reactor: \"ph-cli reactor\",\n service: \"ph-cli service\",\n vetra: \"ph-cli vetra\",\n \"service-startup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh\",\n \"service-unstartup\":\n \"bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh\",\n} as const;\n\nexport const externalDependencies = {} as const;\n\n// eslint/prettier devDependencies present in projects scaffolded before the oxc migration.\n// Stripped from package.json during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_DEPENDENCIES = [\n \"@eslint/js\",\n \"eslint\",\n \"eslint-config-prettier\",\n \"eslint-plugin-prettier\",\n \"eslint-plugin-react\",\n \"eslint-plugin-react-hooks\",\n \"globals\",\n \"prettier\",\n \"typescript-eslint\",\n] as const;\n\n// Legacy lint/format config files written by eslint/prettier boilerplate.\n// Removed from the project root during `ph migrate`.\nexport const LEGACY_LINT_FORMAT_FILES = [\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \".eslintrc\",\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.json\",\n \".eslintrc.yml\",\n \".eslintrc.yaml\",\n \".eslintignore\",\n \".prettierrc\",\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.json\",\n \".prettierrc.yml\",\n \".prettierrc.yaml\",\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n \"prettier.config.mjs\",\n \".prettierignore\",\n] as const;\n\nexport const externalDevDependencies = {\n \"@electric-sql/pglite\": \"0.3.15\",\n \"@electric-sql/pglite-tools\": \"0.2.20\",\n \"@powerhousedao/document-engineering\": \"1.40.5\",\n \"@tailwindcss/cli\": \"^4.1.18\",\n \"@tailwindcss/vite\": \"^4.1.18\",\n \"@types/node\": \"^24.9.2\",\n \"@types/react\": \"^19.2.3\",\n \"@types/react-dom\": \"^19.2.3\",\n \"@vitejs/plugin-react\": \"^6.0.1\",\n \"@vitest/coverage-v8\": \"4.1.1\",\n oxfmt: \"0.55.0\",\n oxlint: \"1.70.0\",\n \"oxlint-tsgolint\": \"0.23.0\",\n tailwindcss: \"^4.1.16\",\n typescript: \"^5.9.3\",\n vite: \"^8.0.10\",\n \"vite-tsconfig-paths\": \"6.1.1\",\n vitest: \"4.1.1\",\n} as const;\n\nexport const defaultManifest: Manifest = {\n name: \"\",\n description: \"\",\n category: \"\",\n publisher: {\n name: \"\",\n url: \"\",\n },\n documentModels: [],\n editors: [],\n apps: [],\n subgraphs: [],\n processors: [],\n};\n\nconst DEFAULT_DOCUMENT_MODELS_DIR = \"./document-models\";\nconst DEFAULT_EDITORS_DIR = \"./editors\";\nconst DEFAULT_PROCESSORS_DIR = \"./processors\";\nconst DEFAULT_SUBGRAPHS_DIR = \"./subgraphs\";\nconst DEFAULT_IMPORT_SCRIPTS_DIR = \"./scripts\";\nconst DEFAULT_SKIP_FORMAT = false;\nconst DEFAULT_LOG_LEVEL = \"info\";\n\nexport const DEFAULT_CONFIG: PowerhouseConfig = {\n documentModelsDir: DEFAULT_DOCUMENT_MODELS_DIR,\n editorsDir: DEFAULT_EDITORS_DIR,\n processorsDir: DEFAULT_PROCESSORS_DIR,\n subgraphsDir: DEFAULT_SUBGRAPHS_DIR,\n importScriptsDir: DEFAULT_IMPORT_SCRIPTS_DIR,\n skipFormat: DEFAULT_SKIP_FORMAT,\n logLevel: DEFAULT_LOG_LEVEL,\n auth: {\n enabled: false,\n admins: [],\n },\n};\n"],"mappings":";;;AAKA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,iBAAiB,OAAU;AACxC,MAAa,sBAAsB;AACnC,MAAa,yBAAA,IAA+C;AAE5D,MAAa,6BAA6B,CACxC,gBACA,6BACD;AAED,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,kBAAkB;AAE/B,MAAa,8BAA8B;AAE3C,MAAa,6BAA6B;AAE1C,MAAa,+BAA+B;AAE5C,MAAa,yBAAyB;AAEtC,MAAa,qBAAqB;AAElC,MAAa,uBAAuB;AAEpC,MAAa,2BAA2B;AAExC,MAAa,yBAAyB;AAEtC,MAAa,uBAAuB;AACpC,MAAa,SAAS;AACtB,MAAa,yBAAyB;AACtC,MAAa,qBAAqB;AAElC,MAAa,yBAAA;AAEb,MAAa,WAAW,SAAS;AAEjC,MAAa,wBAAwB,KAAK,UAAA,MAA6B;AAGvE,MAAa,8BAA8B,CACzC,kBACA,i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O;CACP,SAAS;CACT,SAAS;CACT,OAAO;CACP,mBACE;CACF,qBACE;CACH;AAED,MAAa,uBAAuB,EAAE;AAItC,MAAa,kCAAkC;CAC7C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAID,MAAa,2BAA2B;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,0BAA0B;CACrC,wBAAwB;CACxB,8BAA8B;CAC9B,uCAAuC;CACvC,oBAAoB;CACpB,qBAAqB;CACrB,eAAe;CACf,gBAAgB;CAChB,oBAAoB;CACpB,wBAAwB;CACxB,uBAAuB;CACvB,OAAO;CACP,QAAQ;CACR,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,MAAM;CACN,uBAAuB;CACvB,QAAQ;CACT;AAED,MAAa,kBAA4B;CACvC,MAAM;CACN,aAAa;CACb,UAAU;CACV,WAAW;EACT,MAAM;EACN,KAAK;EACN;CACD,gBAAgB,EAAE;CAClB,SAAS,EAAE;CACX,MAAM,EAAE;CACR,WAAW,EAAE;CACb,YAAY,EAAE;CACf;AAUD,MAAa,iBAAmC;CAC9C,mBATkC;CAUlC,YAT0B;CAU1B,eAT6B;CAU7B,cAT4B;CAU5B,kBATiC;CAUjC,YAT0B;CAU1B,UATwB;CAUxB,MAAM;EACJ,SAAS;EACT,QAAQ,EAAE;EACX;CACF"}