@powerhousedao/shared 6.1.0-dev.15 → 6.1.0-dev.17

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 (95) hide show
  1. package/dist/analytics/index.d.ts +1 -1
  2. package/dist/clis/args/access-token.mjs +1 -1
  3. package/dist/clis/args/{common-BQ2pvhCr.d.mts → common-DxMY8vx1.d.mts} +3 -3
  4. package/dist/clis/args/{common-BQ2pvhCr.d.mts.map → common-DxMY8vx1.d.mts.map} +1 -1
  5. package/dist/clis/args/{common-DPYlcz-d.mjs → common-fPNESurz.mjs} +4 -9
  6. package/dist/clis/args/{common-DPYlcz-d.mjs.map → common-fPNESurz.mjs.map} +1 -1
  7. package/dist/clis/args/common.d.mts +1 -1
  8. package/dist/clis/args/common.mjs +1 -1
  9. package/dist/clis/args/connect.d.mts +222 -16
  10. package/dist/clis/args/connect.d.mts.map +1 -1
  11. package/dist/clis/args/connect.mjs +138 -4
  12. package/dist/clis/args/connect.mjs.map +1 -1
  13. package/dist/clis/args/{generate-BJPBa0mK.mjs → generate-CTTdiwMD.mjs} +2 -2
  14. package/dist/clis/args/{generate-BJPBa0mK.mjs.map → generate-CTTdiwMD.mjs.map} +1 -1
  15. package/dist/clis/args/generate.mjs +1 -1
  16. package/dist/clis/args/{help-rztSuf9S.mjs → help-CfBzQJpL.mjs} +3 -3
  17. package/dist/clis/args/{help-rztSuf9S.mjs.map → help-CfBzQJpL.mjs.map} +1 -1
  18. package/dist/clis/args/help.mjs +1 -1
  19. package/dist/clis/args/index.d.mts +4 -4
  20. package/dist/clis/args/index.mjs +5 -5
  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-C2ZiQIg6.d.mts → service-DbbCQSks.d.mts} +2 -2
  30. package/dist/clis/args/service-DbbCQSks.d.mts.map +1 -0
  31. package/dist/clis/args/service.d.mts +1 -1
  32. package/dist/clis/args/service.mjs +1 -1
  33. package/dist/clis/args/switchboard.mjs +1 -1
  34. package/dist/clis/args/uninstall.mjs +1 -1
  35. package/dist/clis/args/unpublish.mjs +1 -1
  36. package/dist/clis/args/vetra.d.mts +1 -1
  37. package/dist/clis/args/vetra.mjs +1 -1
  38. package/dist/clis/constants.d.mts +53 -1
  39. package/dist/clis/constants.d.mts.map +1 -1
  40. package/dist/clis/index.d.mts +680 -20
  41. package/dist/clis/index.d.mts.map +1 -1
  42. package/dist/clis/index.mjs +527 -10
  43. package/dist/clis/index.mjs.map +1 -1
  44. package/dist/config-loader-BPXmnFbm.js +141 -0
  45. package/dist/config-loader-BPXmnFbm.js.map +1 -0
  46. package/dist/connect/config-loader.d.ts +78 -0
  47. package/dist/connect/config-loader.d.ts.map +1 -0
  48. package/dist/connect/config-loader.js +2 -0
  49. package/dist/connect/index.d.ts +282 -257
  50. package/dist/connect/index.d.ts.map +1 -1
  51. package/dist/connect/index.js +251 -106
  52. package/dist/connect/index.js.map +1 -1
  53. package/dist/connect/json-adapter.d.ts +24 -0
  54. package/dist/connect/json-adapter.d.ts.map +1 -0
  55. package/dist/connect/json-adapter.js +28 -0
  56. package/dist/connect/json-adapter.js.map +1 -0
  57. package/dist/{constants-xNwF0jSl.d.ts → constants-C_EQX4DY.d.ts} +1 -1
  58. package/dist/constants-C_EQX4DY.d.ts.map +1 -0
  59. package/dist/constants.d.ts +1 -1
  60. package/dist/document-drive/index.d.ts +2 -2
  61. package/dist/document-drive/index.d.ts.map +1 -1
  62. package/dist/document-model/index.d.ts +4 -4
  63. package/dist/document-model/index.js +1 -1
  64. package/dist/document-model/mock.d.ts +1 -1
  65. package/dist/document-model/utils.d.ts +2 -2
  66. package/dist/document-model/utils.js +1 -1
  67. package/dist/{index-C_iVZe7f.d.ts → index-CQDIrK1k.d.ts} +1 -1
  68. package/dist/index-CQDIrK1k.d.ts.map +1 -0
  69. package/dist/{index-C2dRwmuW.d.ts → index-DalC_-i7.d.ts} +2 -2
  70. package/dist/{index-C2dRwmuW.d.ts.map → index-DalC_-i7.d.ts.map} +1 -1
  71. package/dist/index.d.ts +7 -6
  72. package/dist/{mock-Cgn-VBF_.d.ts → mock-CbrXTFOF.d.ts} +1 -1
  73. package/dist/{mock-Cgn-VBF_.d.ts.map → mock-CbrXTFOF.d.ts.map} +1 -1
  74. package/dist/processors/index.d.ts +1 -1
  75. package/dist/registry/index.d.ts +2 -1
  76. package/dist/registry/index.d.ts.map +1 -1
  77. package/dist/{types-BFDlQkXZ.d.ts → types-C1in4fl3.d.ts} +1 -1
  78. package/dist/{types-BFDlQkXZ.d.ts.map → types-C1in4fl3.d.ts.map} +1 -1
  79. package/dist/{actions-BqyQ1_K7.d.ts → types-CC6ib3_2.d.ts} +1327 -1327
  80. package/dist/types-CC6ib3_2.d.ts.map +1 -0
  81. package/dist/{types-DA_0pilk.d.ts → types-CVqmv94G.d.ts} +3 -109
  82. package/dist/types-CVqmv94G.d.ts.map +1 -0
  83. package/dist/types-DgDE_nr0.d.ts +159 -0
  84. package/dist/types-DgDE_nr0.d.ts.map +1 -0
  85. package/dist/{utils-CJF4w5Bp.d.ts → utils-BEByNOHo.d.ts} +1 -1
  86. package/dist/utils-BEByNOHo.d.ts.map +1 -0
  87. package/dist/{utils-bCWnsmtD.js → utils-DKOFCM0Q.js} +1 -1
  88. package/dist/{utils-bCWnsmtD.js.map → utils-DKOFCM0Q.js.map} +1 -1
  89. package/package.json +5 -3
  90. package/dist/actions-BqyQ1_K7.d.ts.map +0 -1
  91. package/dist/clis/args/service-C2ZiQIg6.d.mts.map +0 -1
  92. package/dist/constants-xNwF0jSl.d.ts.map +0 -1
  93. package/dist/index-C_iVZe7f.d.ts.map +0 -1
  94. package/dist/types-DA_0pilk.d.ts.map +0 -1
  95. package/dist/utils-CJF4w5Bp.d.ts.map +0 -1
@@ -313,8 +313,7 @@ const disableLocalPackages = flag({
313
313
  type: boolean,
314
314
  long: "ignore-local",
315
315
  description: "Do not load local packages from this project",
316
- defaultValue: () => false,
317
- env: "PH_DISABLE_LOCAL_PACKAGE"
316
+ defaultValue: () => false
318
317
  });
319
318
  const httpsKeyFile = option({
320
319
  type: optional(string),
@@ -369,7 +368,6 @@ const defaultDrivesUrl = option({
369
368
  type: optional(string),
370
369
  long: "default-drives-url",
371
370
  description: "The default drives url to use in connect",
372
- env: "PH_CONNECT_DEFAULT_DRIVES_URL",
373
371
  defaultValue: () => ""
374
372
  });
375
373
  const logLevel = option({
@@ -384,7 +382,6 @@ const connectBasePath = option({
384
382
  long: "base",
385
383
  type: string,
386
384
  description: "Base path for the app",
387
- env: "PH_CONNECT_BASE_PATH",
388
385
  defaultValue: () => "/"
389
386
  });
390
387
  const drivesPreserveStrategy = option({
@@ -392,8 +389,7 @@ const drivesPreserveStrategy = option({
392
389
  long: "drive-preserve-strategy",
393
390
  description: "The preservation strategy to use on default drives",
394
391
  defaultValue: () => "preserve-by-url-and-detach",
395
- defaultValueIsSerializable: true,
396
- env: "PH_CONNECT_DRIVES_PRESERVE_STRATEGY"
392
+ defaultValueIsSerializable: true
397
393
  });
398
394
  const force = flag({
399
395
  type: optional(boolean),
@@ -451,8 +447,7 @@ const commonServerArgs = {
451
447
  long: "watch-timeout",
452
448
  description: "Amount of time to wait before a file is considered changed",
453
449
  defaultValue: () => 300,
454
- defaultValueIsSerializable: true,
455
- env: "PH_WATCH_TIMEOUT"
450
+ defaultValueIsSerializable: true
456
451
  })
457
452
  };
458
453
  //#endregion
@@ -474,6 +469,15 @@ const accessTokenArgs = {
474
469
  };
475
470
  //#endregion
476
471
  //#region clis/args/connect.ts
472
+ const cliBoolean = {
473
+ from: (input) => {
474
+ const v = input.toLowerCase();
475
+ if (v === "true") return Promise.resolve(true);
476
+ if (v === "false") return Promise.resolve(false);
477
+ return Promise.reject(/* @__PURE__ */ new Error(`Expected 'true' or 'false' (case-insensitive), got '${input}'.`));
478
+ },
479
+ description: "true | false"
480
+ };
477
481
  const connectStudioArgs = {
478
482
  port: option({
479
483
  type: number,
@@ -485,6 +489,110 @@ const connectStudioArgs = {
485
489
  ...commonArgs,
486
490
  ...commonServerArgs
487
491
  };
492
+ const connectRuntimeOverrideArgs = {
493
+ json: option({
494
+ type: optional(string),
495
+ long: "json",
496
+ description: "Inline JSON override for the runtime connect.* block, e.g. '{\"renown\":{\"url\":\"...\"}}'. Validated against the runtime schema; deep-merged on top of env seeds and source powerhouse.config.json. Individual --flag values beat --json on collision."
497
+ }),
498
+ renownUrl: option({
499
+ type: optional(string),
500
+ long: "renown-url",
501
+ description: "Override connect.renown.url."
502
+ }),
503
+ renownNetworkId: option({
504
+ type: optional(string),
505
+ long: "renown-network-id",
506
+ description: "Override connect.renown.networkId."
507
+ }),
508
+ renownChainId: option({
509
+ type: optional(number),
510
+ long: "renown-chain-id",
511
+ description: "Override connect.renown.chainId."
512
+ }),
513
+ allowAddDrive: option({
514
+ type: optional(cliBoolean),
515
+ long: "allow-add-drive",
516
+ description: "Override connect.drives.allowAddDrive (top-level add-drive toggle)."
517
+ }),
518
+ externalPackages: option({
519
+ type: optional(cliBoolean),
520
+ long: "external-packages",
521
+ description: "Override connect.packages.externalEnabled."
522
+ }),
523
+ remoteDrivesEnabled: option({
524
+ type: optional(cliBoolean),
525
+ long: "remote-drives-enabled",
526
+ description: "Override connect.drives.sections.remote.enabled (the unified cloud+public section)."
527
+ }),
528
+ remoteDrivesAllowAdd: option({
529
+ type: optional(cliBoolean),
530
+ long: "remote-drives-allow-add",
531
+ description: "Override connect.drives.sections.remote.allowAdd."
532
+ }),
533
+ remoteDrivesAllowDelete: option({
534
+ type: optional(cliBoolean),
535
+ long: "remote-drives-allow-delete",
536
+ description: "Override connect.drives.sections.remote.allowDelete."
537
+ }),
538
+ localDrivesEnabled: option({
539
+ type: optional(cliBoolean),
540
+ long: "local-drives-enabled",
541
+ description: "Override connect.drives.sections.local.enabled."
542
+ }),
543
+ localDrivesAllowAdd: option({
544
+ type: optional(cliBoolean),
545
+ long: "local-drives-allow-add",
546
+ description: "Override connect.drives.sections.local.allowAdd."
547
+ }),
548
+ localDrivesAllowDelete: option({
549
+ type: optional(cliBoolean),
550
+ long: "local-drives-allow-delete",
551
+ description: "Override connect.drives.sections.local.allowDelete."
552
+ }),
553
+ packagesRegistry: option({
554
+ type: optional(string),
555
+ long: "packages-registry",
556
+ description: "Override the top-level packageRegistryUrl."
557
+ }),
558
+ appName: option({
559
+ type: optional(string),
560
+ long: "app-name",
561
+ description: "Override connect.branding.appName."
562
+ }),
563
+ homeBackground: option({
564
+ type: optional(string),
565
+ long: "home-background",
566
+ description: "Override connect.branding.homeBackground. URL or path to an image; pass an empty string (\"\") to reset to the bundled default."
567
+ }),
568
+ sentryDsn: option({
569
+ type: optional(string),
570
+ long: "sentry-dsn",
571
+ description: "Override connect.sentry.dsn (Sentry DSN URL). Pass an empty string (\"\") to set null and disable Sentry."
572
+ }),
573
+ sentryEnv: option({
574
+ type: optional(string),
575
+ long: "sentry-env",
576
+ description: "Override connect.sentry.env (Sentry environment label)."
577
+ }),
578
+ sentryTracingEnabled: option({
579
+ type: optional(cliBoolean),
580
+ long: "sentry-tracing-enabled",
581
+ description: "Override connect.sentry.tracing (Sentry performance tracing)."
582
+ })
583
+ };
584
+ const connectPositionalArgs = {
585
+ keyPositional: positional({
586
+ type: optional(string),
587
+ displayName: "key",
588
+ description: "Dotted path inside the runtime config (e.g. connect.renown.url). Pair with <value> to set; pass alone to `ph connect config` to read."
589
+ }),
590
+ valuePositional: positional({
591
+ type: optional(string),
592
+ displayName: "value",
593
+ description: "Value to set at <key>. Coerced against the runtime schema (string, bool, number, enum). Arrays and objects require --json instead."
594
+ })
595
+ };
488
596
  const connectBuildArgs = {
489
597
  outDir: option({
490
598
  type: string,
@@ -493,6 +601,8 @@ const connectBuildArgs = {
493
601
  defaultValue: () => DEFAULT_CONNECT_OUTDIR,
494
602
  defaultValueIsSerializable: true
495
603
  }),
604
+ ...connectRuntimeOverrideArgs,
605
+ ...connectPositionalArgs,
496
606
  ...commonArgs
497
607
  };
498
608
  const connectPreviewArgs = {
@@ -513,10 +623,29 @@ const connectPreviewArgs = {
513
623
  ...commonArgs,
514
624
  ...commonServerArgs
515
625
  };
626
+ const connectConfigArgs = {
627
+ get: option({
628
+ type: optional(string),
629
+ long: "get",
630
+ description: "Dotted path inside connect.* (e.g. \"connect.renown.url\") to read the effective value. Mutually exclusive with the set modes. Equivalent to `ph connect config <key>` (positional)."
631
+ }),
632
+ distDir: option({
633
+ type: optional(string),
634
+ long: "dist-dir",
635
+ description: "Path to the directory containing the dist powerhouse.config.json. Defaults to the PH_CONNECT_OUTDIR env or `.ph/connect-build/dist/`."
636
+ }),
637
+ ...connectRuntimeOverrideArgs,
638
+ ...connectPositionalArgs,
639
+ connectBasePath,
640
+ logLevel,
641
+ defaultDrivesUrl,
642
+ drivesPreserveStrategy
643
+ };
516
644
  const connectArgs = {
517
645
  ...connectStudioArgs,
518
646
  ...connectBuildArgs,
519
- ...connectPreviewArgs
647
+ ...connectPreviewArgs,
648
+ ...connectConfigArgs
520
649
  };
521
650
  //#endregion
522
651
  //#region processors/constants.ts
@@ -7438,6 +7567,394 @@ function buildPnpmLink(packageName, monorepoPath) {
7438
7567
  return `link:${path.join(monorepoPath, packageDir, packageNameWithoutNamespace).replace("analytics-engine-", "analytics-engine/")}`;
7439
7568
  }
7440
7569
  //#endregion
7570
+ //#region connect/schema-fragments.ts
7571
+ const powerhousePackageSchema = {
7572
+ type: "object",
7573
+ additionalProperties: false,
7574
+ required: ["packageName"],
7575
+ properties: {
7576
+ packageName: {
7577
+ type: "string",
7578
+ description: "Fully qualified npm package name (e.g. @scope/name)."
7579
+ },
7580
+ version: {
7581
+ type: "string",
7582
+ description: "Exact version (registry providers) or omit to take latest."
7583
+ },
7584
+ provider: {
7585
+ type: "string",
7586
+ enum: [
7587
+ "npm",
7588
+ "github",
7589
+ "local",
7590
+ "registry"
7591
+ ],
7592
+ description: "Where Connect should resolve the package from at runtime."
7593
+ },
7594
+ url: {
7595
+ type: "string",
7596
+ description: "Override URL for non-registry providers (e.g. github tarball)."
7597
+ }
7598
+ }
7599
+ };
7600
+ const driveSectionSchema = {
7601
+ type: "object",
7602
+ additionalProperties: false,
7603
+ description: "Visibility and add/delete affordances for a drive section in the sidebar.",
7604
+ properties: {
7605
+ enabled: {
7606
+ type: "boolean",
7607
+ description: "When false, the section is hidden in the sidebar.",
7608
+ default: true
7609
+ },
7610
+ allowAdd: {
7611
+ type: "boolean",
7612
+ description: "When false, the section's 'add drive' affordance is hidden.",
7613
+ default: true
7614
+ },
7615
+ allowDelete: {
7616
+ type: "boolean",
7617
+ description: "When false, drives in this section cannot be deleted from the UI.",
7618
+ default: true
7619
+ }
7620
+ }
7621
+ };
7622
+ const phConnectRuntimeConfigSchema = {
7623
+ type: "object",
7624
+ additionalProperties: false,
7625
+ description: "Connect-specific UI customisations. All fields optional; omit the section entirely for default behaviour.",
7626
+ properties: {
7627
+ branding: {
7628
+ type: "object",
7629
+ additionalProperties: false,
7630
+ description: "App identity and visual branding.",
7631
+ properties: {
7632
+ appName: {
7633
+ type: "string",
7634
+ description: "Browser tab title and any in-app brand text. Defaults to 'Powerhouse Connect'."
7635
+ },
7636
+ homeBackground: {
7637
+ type: ["string", "null"],
7638
+ description: "Hero image on the empty home screen. URL or path to override; null or omitted uses the bundled default image."
7639
+ }
7640
+ }
7641
+ },
7642
+ app: {
7643
+ type: "object",
7644
+ additionalProperties: false,
7645
+ description: "Top-level Connect application behaviour.",
7646
+ properties: {
7647
+ logLevel: {
7648
+ type: "string",
7649
+ enum: [
7650
+ "debug",
7651
+ "info",
7652
+ "warn",
7653
+ "error"
7654
+ ],
7655
+ description: "Log level applied by Connect's logger at boot. Affects browser-side output only.",
7656
+ default: "info"
7657
+ },
7658
+ basePath: {
7659
+ type: "string",
7660
+ description: "Base path Connect is mounted under (e.g. '/connect' for subpath deploys). Normalised at runtime to start and end with '/'. Defaults to the build-time BASE_URL.",
7661
+ default: "/"
7662
+ }
7663
+ }
7664
+ },
7665
+ packages: {
7666
+ type: "object",
7667
+ additionalProperties: false,
7668
+ description: "Runtime behaviour for the Connect package manager (separate from top-level `packages[]`, which lists which packages to load).",
7669
+ properties: { externalEnabled: {
7670
+ type: "boolean",
7671
+ description: "When false, Connect refuses to load any package that wasn't bundled at build time. Affirmative replacement for the legacy PH_CONNECT_EXTERNAL_PACKAGES_DISABLED env var.",
7672
+ default: true
7673
+ } }
7674
+ },
7675
+ drives: {
7676
+ type: "object",
7677
+ additionalProperties: false,
7678
+ description: "Default-drive and add-drive UI behaviour.",
7679
+ properties: {
7680
+ allowAddDrive: {
7681
+ type: "boolean",
7682
+ description: "When false, the SPA hides the 'add drive' affordance entirely (top-level). Per-section overrides live in `sections.{remote,local}.allowAdd`.",
7683
+ default: true
7684
+ },
7685
+ defaultDrives: {
7686
+ type: "array",
7687
+ description: "Drives the SPA auto-connects to on first load. Each must specify a URL; name and icon are optional overrides.",
7688
+ default: [],
7689
+ items: {
7690
+ type: "object",
7691
+ additionalProperties: false,
7692
+ required: ["url"],
7693
+ properties: {
7694
+ url: { type: "string" },
7695
+ name: { type: ["string", "null"] },
7696
+ icon: { type: ["string", "null"] }
7697
+ }
7698
+ }
7699
+ },
7700
+ preserveStrategy: {
7701
+ type: "string",
7702
+ enum: ["preserve-all", "preserve-by-url-and-detach"],
7703
+ description: "Strategy applied when defaultDrives change between deploys. 'preserve-all' keeps user-added drives untouched; 'preserve-by-url-and-detach' detaches removed default drives. No schema default — opt-in only."
7704
+ },
7705
+ sections: {
7706
+ type: "object",
7707
+ additionalProperties: false,
7708
+ description: "Per-section visibility and affordance toggles. `remote` covers what was historically split into 'public' + 'cloud'; `local` is browser-local drives.",
7709
+ properties: {
7710
+ remote: driveSectionSchema,
7711
+ local: driveSectionSchema
7712
+ }
7713
+ }
7714
+ }
7715
+ },
7716
+ renown: {
7717
+ type: "object",
7718
+ additionalProperties: false,
7719
+ description: "Renown identity / authentication coordinates.",
7720
+ properties: {
7721
+ url: {
7722
+ type: "string",
7723
+ description: "Renown auth service URL.",
7724
+ default: "https://www.renown.id"
7725
+ },
7726
+ networkId: {
7727
+ type: "string",
7728
+ description: "CAIP-2 network namespace (e.g. 'eip155').",
7729
+ default: "eip155"
7730
+ },
7731
+ chainId: {
7732
+ type: "number",
7733
+ description: "CAIP-2 chain reference within the network namespace.",
7734
+ default: 1
7735
+ }
7736
+ }
7737
+ },
7738
+ sentry: {
7739
+ type: "object",
7740
+ additionalProperties: false,
7741
+ description: "Sentry error-tracking coordinates. Set `dsn` to enable Sentry; leave `dsn` null to disable. The Sentry release tag stays build-time (stamped via Vite's `define` from WORKSPACE_VERSION) so it always matches the sourcemaps uploaded by CI.",
7742
+ properties: {
7743
+ dsn: {
7744
+ type: ["string", "null"],
7745
+ description: "Sentry DSN URL. `null` disables Sentry entirely; the SPA never loads the Sentry SDK chunk.",
7746
+ default: null
7747
+ },
7748
+ env: {
7749
+ type: "string",
7750
+ description: "Sentry environment label, surfaced as the `environment` tag on every event.",
7751
+ default: "dev"
7752
+ },
7753
+ tracing: {
7754
+ type: "boolean",
7755
+ description: "Enable Sentry performance tracing.",
7756
+ default: false
7757
+ }
7758
+ }
7759
+ }
7760
+ }
7761
+ };
7762
+ //#endregion
7763
+ //#region clis/source-config-schema.ts
7764
+ const SOURCE_CONFIG_SCHEMA_ID = "https://powerhouse.inc/schemas/powerhouse.source.json";
7765
+ const sourceConfigSchema = {
7766
+ $schema: "http://json-schema.org/draft-07/schema#",
7767
+ $id: SOURCE_CONFIG_SCHEMA_ID,
7768
+ title: "Powerhouse source configuration",
7769
+ description: "Project-root powerhouse.config.json: the developer-edited build manifest read by the `ph` CLI and Vite plugins.",
7770
+ type: "object",
7771
+ additionalProperties: false,
7772
+ properties: {
7773
+ $schema: {
7774
+ type: "string",
7775
+ description: "Optional JSON Schema reference for editor autocomplete. Set to the GitHub-hosted schema URL."
7776
+ },
7777
+ logLevel: {
7778
+ type: "string",
7779
+ enum: [...LOG_LEVELS],
7780
+ description: "Log level for CLI commands and the reactor."
7781
+ },
7782
+ documentModelsDir: {
7783
+ type: "string",
7784
+ description: "Path to the project's document model definitions."
7785
+ },
7786
+ editorsDir: {
7787
+ type: "string",
7788
+ description: "Path to the project's editors."
7789
+ },
7790
+ processorsDir: {
7791
+ type: "string",
7792
+ description: "Path to the project's processors."
7793
+ },
7794
+ subgraphsDir: {
7795
+ type: "string",
7796
+ description: "Path to the project's subgraphs."
7797
+ },
7798
+ importScriptsDir: {
7799
+ type: "string",
7800
+ description: "Path to the project's import scripts."
7801
+ },
7802
+ skipFormat: {
7803
+ type: "boolean",
7804
+ description: "When true, codegen skips Prettier formatting on generated files."
7805
+ },
7806
+ interactive: {
7807
+ type: "boolean",
7808
+ description: "Run CLI commands in interactive mode where applicable."
7809
+ },
7810
+ watch: {
7811
+ type: "boolean",
7812
+ description: "Watch source files and rerun on changes."
7813
+ },
7814
+ reactor: {
7815
+ type: "object",
7816
+ additionalProperties: false,
7817
+ description: "Reactor server configuration.",
7818
+ properties: {
7819
+ port: {
7820
+ type: "number",
7821
+ description: "Port the reactor HTTP server listens on."
7822
+ },
7823
+ https: {
7824
+ oneOf: [{ type: "boolean" }, {
7825
+ type: "object",
7826
+ additionalProperties: false,
7827
+ required: ["keyPath", "certPath"],
7828
+ properties: {
7829
+ keyPath: {
7830
+ type: "string",
7831
+ description: "Path to TLS private key."
7832
+ },
7833
+ certPath: {
7834
+ type: "string",
7835
+ description: "Path to TLS certificate."
7836
+ }
7837
+ }
7838
+ }],
7839
+ description: "Enable HTTPS. `true` for self-signed; object with key/cert paths for custom TLS."
7840
+ },
7841
+ storage: {
7842
+ type: "object",
7843
+ additionalProperties: false,
7844
+ required: ["type"],
7845
+ description: "Reactor persistent storage backend.",
7846
+ properties: {
7847
+ type: {
7848
+ type: "string",
7849
+ enum: [
7850
+ "filesystem",
7851
+ "memory",
7852
+ "postgres",
7853
+ "browser"
7854
+ ]
7855
+ },
7856
+ filesystemPath: {
7857
+ type: "string",
7858
+ description: "Required when `type: filesystem`."
7859
+ },
7860
+ postgresUrl: {
7861
+ type: "string",
7862
+ description: "Required when `type: postgres`."
7863
+ }
7864
+ }
7865
+ }
7866
+ }
7867
+ },
7868
+ auth: {
7869
+ type: "object",
7870
+ additionalProperties: false,
7871
+ required: ["admins"],
7872
+ description: "Authentication and authorisation settings.",
7873
+ properties: {
7874
+ enabled: {
7875
+ type: "boolean",
7876
+ description: "Master toggle for the auth subsystem."
7877
+ },
7878
+ admins: {
7879
+ type: "array",
7880
+ items: { type: "string" },
7881
+ description: "DIDs granted admin role."
7882
+ },
7883
+ defaultProtection: {
7884
+ type: "boolean",
7885
+ description: "When true, newly-created drives default to authenticated-only access."
7886
+ }
7887
+ }
7888
+ },
7889
+ switchboard: {
7890
+ type: "object",
7891
+ additionalProperties: false,
7892
+ description: "Switchboard server configuration.",
7893
+ properties: {
7894
+ database: {
7895
+ type: "object",
7896
+ additionalProperties: false,
7897
+ properties: { url: {
7898
+ type: "string",
7899
+ description: "Database connection URL."
7900
+ } }
7901
+ },
7902
+ port: {
7903
+ type: "number",
7904
+ description: "Port the switchboard HTTP server listens on."
7905
+ }
7906
+ }
7907
+ },
7908
+ studio: {
7909
+ type: "object",
7910
+ additionalProperties: false,
7911
+ required: ["https"],
7912
+ description: "Connect Studio dev-server configuration.",
7913
+ properties: {
7914
+ port: {
7915
+ type: "number",
7916
+ description: "Port the studio dev server listens on."
7917
+ },
7918
+ host: {
7919
+ type: "string",
7920
+ description: "Host interface to bind."
7921
+ },
7922
+ https: {
7923
+ type: "boolean",
7924
+ description: "Serve studio over HTTPS."
7925
+ },
7926
+ openBrowser: {
7927
+ type: "boolean",
7928
+ description: "Open a browser tab on studio start."
7929
+ }
7930
+ }
7931
+ },
7932
+ packages: {
7933
+ type: "array",
7934
+ description: "Powerhouse packages this project depends on. Shape is shared with the runtime config.",
7935
+ items: powerhousePackageSchema
7936
+ },
7937
+ vetra: {
7938
+ type: "object",
7939
+ additionalProperties: false,
7940
+ required: ["driveId", "driveUrl"],
7941
+ description: "Vetra integration coordinates.",
7942
+ properties: {
7943
+ driveId: { type: "string" },
7944
+ driveUrl: { type: "string" }
7945
+ }
7946
+ },
7947
+ packageRegistryUrl: {
7948
+ type: "string",
7949
+ description: "Project-wide package registry endpoint. Used by `ph install` / `ph publish` / `ph registry-login` and Switchboard, and copied verbatim into the runtime config so the Connect SPA's Package Manager UI reads the same registry."
7950
+ },
7951
+ connect: {
7952
+ ...phConnectRuntimeConfigSchema,
7953
+ description: "Connect-specific UI customisations. Copied verbatim into the runtime config at build time."
7954
+ }
7955
+ }
7956
+ };
7957
+ //#endregion
7441
7958
  //#region clis/utils.ts
7442
7959
  var import_lt = /* @__PURE__ */ __toESM(require_lt(), 1);
7443
7960
  /**
@@ -7469,6 +7986,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
7469
7986
  if ((0, import_lt.default)(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
7470
7987
  }
7471
7988
  //#endregion
7472
- export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_PNPM_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, REACTOR_API_PACKAGE, SECONDS_IN_DAY, SERVICE_ACTIONS, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
7989
+ export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_PNPM_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, REACTOR_API_PACKAGE, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
7473
7990
 
7474
7991
  //# sourceMappingURL=index.mjs.map