@powerhousedao/builder-tools 6.2.3-dev.4 → 6.2.3-dev.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,17 +1,17 @@
1
+ import { DYNAMIC_BASE_PLACEHOLDER } from "@powerhousedao/shared/connect";
1
2
  import { CommonServerOptions, HtmlTagDescriptor, InlineConfig, Plugin } from "vite";
2
3
  import { PowerhouseConfig, PowerhousePackage } from "@powerhousedao/config";
3
- import { PHConnectRuntimeConfig } from "@powerhousedao/shared/clis";
4
-
4
+ import { PHConnectRuntimeConfig, PowerhouseConfig as PowerhouseConfig$1 } from "@powerhousedao/shared/clis";
5
5
  //#region connect-utils/constants.d.ts
6
- declare const EXTERNAL_PACKAGES_IMPORT = "PH:EXTERNAL_PACKAGES";
7
- declare const IMPORT_SCRIPT_FILE = "external-packages.js";
8
- declare const LOCAL_PACKAGE_ID = "ph:local-package";
9
- declare const PH_DIR_NAME = ".ph";
6
+ export declare const EXTERNAL_PACKAGES_IMPORT = "PH:EXTERNAL_PACKAGES";
7
+ export declare const IMPORT_SCRIPT_FILE = "external-packages.js";
8
+ export declare const LOCAL_PACKAGE_ID = "ph:local-package";
9
+ export declare const PH_DIR_NAME = ".ph";
10
10
  //#endregion
11
11
  //#region connect-utils/vite-plugins/build-hash.d.ts
12
12
  /** Name of the build-identity file emitted into the build output. */
13
- declare const BUILD_HASH_FILE: "build-hash.json";
14
- interface BuildHashInput {
13
+ export declare const BUILD_HASH_FILE: "build-hash.json";
14
+ export interface BuildHashInput {
15
15
  /** Monorepo workspace git SHA (CI/dev builds); empty outside the monorepo. */
16
16
  workspaceGitSha: string;
17
17
  /** Monorepo workspace version (CI/dev builds); empty outside it. */
@@ -38,8 +38,8 @@ interface BuildHashInput {
38
38
  * (define `PH_CONNECT_BUILD_HASH`) to `build-hash.json`, which the build
39
39
  * emits alongside the app and the server must serve no-cache.
40
40
  */
41
- declare function computeBuildHash(input: BuildHashInput): string;
42
- declare function buildHashFromBuildOptions(options: {
41
+ export declare function computeBuildHash(input: BuildHashInput): string;
42
+ export declare function buildHashFromBuildOptions(options: {
43
43
  dirname: string;
44
44
  phConfig: unknown;
45
45
  packages: ReadonlyArray<{
@@ -57,13 +57,13 @@ declare function buildHashFromBuildOptions(options: {
57
57
  * Build-only: dev (studio) never runs generateBundle, and the SPA check
58
58
  * treats a missing file as "nothing to compare" and stays silent.
59
59
  */
60
- declare function connectBuildHashPlugin(buildHash: string): Plugin;
60
+ export declare function connectBuildHashPlugin(buildHash: string): Plugin;
61
61
  //#endregion
62
62
  //#region connect-utils/externalize-vendor.d.ts
63
- interface VendorPrebuildOptions {
64
- /** Project root (the reactor-project dir). */
63
+ export interface VendorPrebuildOptions {
64
+ /** Project root the vendor deps resolve from. */
65
65
  dirname: string;
66
- /** Bare specifiers to bundle into the vendor (defaults to the heavy libs). */
66
+ /** Specifiers to prebuild into the vendor (defaults to the dev set). */
67
67
  include?: string[];
68
68
  /** Specifiers left external to the build (defaults to the React family). */
69
69
  external?: string[];
@@ -73,35 +73,68 @@ interface VendorPrebuildOptions {
73
73
  errorRef?: {
74
74
  message?: string;
75
75
  };
76
+ /**
77
+ * The APP's base — the same string the app build uses (the dynamic-base
78
+ * placeholder, or a normalized deploy base like "/app/"). The vendor's own
79
+ * build base is this plus the vendor segment, so emitted asset URLs land
80
+ * under <app-base>__vendor__/. Default: the dynamic placeholder + segment
81
+ * (dev behavior). Import-map values stay base-relative; the production
82
+ * build strips the leading slash (values then resolve against the page URL
83
+ * under any deploy base), the dev flow prefixes its own base.
84
+ */
85
+ base?: string;
86
+ /** NODE_ENV define for the vendor build (default "development"). */
87
+ nodeEnv?: "development" | "production";
76
88
  }
77
89
  /**
78
90
  * The stable Connect libraries worth prebuilding. The React family is NOT here —
79
91
  * it's externalized from the build (see `VENDOR_EXTERNAL`) so the vendor shares
80
92
  * the dev server's single React instance via the import map.
81
93
  */
82
- declare const DEFAULT_VENDOR_INCLUDE: string[];
94
+ export declare const DEFAULT_VENDOR_INCLUDE: string[];
83
95
  /**
84
96
  * React-family specifiers kept external to the vendor build. The vendor's chunks
85
97
  * emit bare imports for these; `devReactImportmapPlugin`'s import map resolves
86
98
  * them to Vite's pre-bundled React, so there is exactly one React instance.
87
99
  */
88
- declare const VENDOR_EXTERNAL: string[];
89
- interface PrebuiltVendor {
100
+ export declare const VENDOR_EXTERNAL: string[];
101
+ export interface PrebuiltVendor {
90
102
  vendorDir: string;
91
- /** import map: bare specifier -> "/__vendor__/<entry>.js". */
103
+ /** import map: bare specifier -> "/__vendor__/<entry>.js" (base-relative). */
92
104
  imports: Record<string, string>;
105
+ /** Resolved versions of every included + external package. */
106
+ versions: Record<string, string>;
93
107
  }
94
108
  /** URL prefix the vendor bundle is served under by the dev middleware. */
95
- declare const VENDOR_URL_PREFIX = "/__vendor__/";
109
+ export declare const VENDOR_URL_PREFIX = "/__vendor__/";
96
110
  /**
97
111
  * Build the prebuilt vendor (once, in a throwaway subprocess) and return its dir
98
112
  * + import map. Idempotent: reuses a cached vendor built for the same dep set.
99
113
  * Returns null on any failure (caller falls back to a normal dev server).
100
114
  */
101
- declare function prebuildConnectVendor(options: VendorPrebuildOptions): Promise<PrebuiltVendor | null>;
115
+ export declare function prebuildConnectVendor(options: VendorPrebuildOptions): Promise<PrebuiltVendor | null>;
116
+ /**
117
+ * The published specifiers whose entry file the vendor build never emitted.
118
+ * URLs are base-less (`/__vendor__/x.js`) and resolve inside `vendorDir`.
119
+ */
120
+ export declare function missingVendorEntries(vendorDir: string, imports: Record<string, string>): {
121
+ spec: string;
122
+ url: string;
123
+ }[];
124
+ /**
125
+ * Rebase the vendor's base-less entry URLs (`/__vendor__/x.js`) onto the
126
+ * deploy base, so a consumer that resolves them against the page origin lands
127
+ * under that base rather than the server root. A dynamic-base build keeps its
128
+ * placeholder, which the runtime substitutes.
129
+ *
130
+ * `base` is the app base from `prebuildConnectVendor` callers, but the
131
+ * VENDOR_DYNAMIC_BASE default already carries the vendor segment — that
132
+ * trailing segment is dropped first so it is never doubled.
133
+ */
134
+ export declare function withVendorBase(imports: Record<string, string>, base: string): Record<string, string>;
102
135
  //#endregion
103
136
  //#region connect-utils/types.d.ts
104
- type IConnectOptions = {
137
+ export type IConnectOptions = {
105
138
  mode: string;
106
139
  dirname: string;
107
140
  envDir?: string;
@@ -127,8 +160,18 @@ type IConnectOptions = {
127
160
  cliPackageRegistryUrl?: string;
128
161
  dynamicBase?: boolean;
129
162
  favicon?: string;
163
+ /**
164
+ * Production vendor: the prebuilt shared-dependency bundle's import map and
165
+ * version table (from `prebuildConnectVendor`). When set on a production
166
+ * build, the shared specifiers are externalized from the app bundle and
167
+ * merged into the page import map. Build input only.
168
+ */
169
+ vendor?: {
170
+ imports: Record<string, string>;
171
+ versions: Record<string, string>;
172
+ };
130
173
  };
131
- type ConnectCommonOptions = {
174
+ export type ConnectCommonOptions = {
132
175
  base?: string;
133
176
  mode?: string;
134
177
  configFile?: string;
@@ -138,71 +181,71 @@ type ConnectCommonOptions = {
138
181
  defaultDrivesUrl?: string[];
139
182
  drivesPreserveStrategy?: "preserve-all" | "preserve-by-url-and-detach";
140
183
  };
141
- type ViteDevOptions = Pick<CommonServerOptions, "port" | "host" | "open" | "cors" | "strictPort"> & {
184
+ export type ViteDevOptions = Pick<CommonServerOptions, "port" | "host" | "open" | "cors" | "strictPort"> & {
142
185
  force?: boolean;
143
186
  };
144
- type ConnectStudioOptions = ConnectCommonOptions & {
187
+ export type ConnectStudioOptions = ConnectCommonOptions & {
145
188
  devServerOptions?: ViteDevOptions;
146
189
  printUrls?: boolean;
147
190
  bindCLIShortcuts?: boolean;
148
191
  };
149
- type ConnectBuildOptions = ConnectCommonOptions & {
192
+ export type ConnectBuildOptions = ConnectCommonOptions & {
150
193
  outDir?: string;
151
194
  };
152
- type ConnectPreviewOptions = ConnectCommonOptions & Omit<ViteDevOptions, "cors"> & {
195
+ export type ConnectPreviewOptions = ConnectCommonOptions & Omit<ViteDevOptions, "cors"> & {
153
196
  outDir?: string;
154
197
  printUrls?: boolean;
155
198
  bindCLIShortcuts?: boolean;
156
199
  };
157
200
  //#endregion
158
201
  //#region connect-utils/helpers.d.ts
159
- declare const DEFAULT_CONNECT_OUTDIR: ".ph/connect-build/dist/";
160
- declare function resolveViteConfigPath(options: Pick<ConnectCommonOptions, "projectRoot" | "viteConfigFile">): string;
161
- declare function resolvePackage(packageName: string, root?: string): string;
162
- declare function resolveConnectPackageJson(root?: string): JSON | null;
202
+ export declare const DEFAULT_CONNECT_OUTDIR: ".ph/connect-build/dist/";
203
+ export declare function resolveViteConfigPath(options: Pick<ConnectCommonOptions, "projectRoot" | "viteConfigFile">): string;
204
+ export declare function resolvePackage(packageName: string, root?: string): string;
205
+ export declare function resolveConnectPackageJson(root?: string): JSON | null;
163
206
  /**
164
207
  * Finds the dist dir of Connect on the local machine
165
208
  */
166
- declare function resolveConnectBundle(root?: string): string;
167
- declare function resolveConnectPublicDir(root?: string): string;
209
+ export declare function resolveConnectBundle(root?: string): string;
210
+ export declare function resolveConnectPublicDir(root?: string): string;
168
211
  /**
169
212
  * Copies the Connect dist dir to the target path
170
213
  */
171
- declare function copyConnect(sourcePath: string, targetPath: string): void;
214
+ export declare function copyConnect(sourcePath: string, targetPath: string): void;
172
215
  /**
173
216
  * Backs up the index.html file
174
217
  *
175
218
  * Needed when running the Connect Studio dev server on Windows
176
219
  */
177
- declare function backupIndexHtml(appPath: string, restore?: boolean): void;
178
- declare function removeBase64EnvValues(appPath: string): void;
179
- declare function readJsonFile(filePath: string): PowerhouseConfig | null;
220
+ export declare function backupIndexHtml(appPath: string, restore?: boolean): void;
221
+ export declare function removeBase64EnvValues(appPath: string): void;
222
+ export declare function readJsonFile(filePath: string): PowerhouseConfig | null;
180
223
  /**
181
224
  * Takes a list of Powerhouse project packages and optionally local Powerhouse packages and outputs a js file which exports those packages for use in Connect Studio.
182
225
  */
183
- declare function makeImportScriptFromPackages(args: {
226
+ export declare function makeImportScriptFromPackages(args: {
184
227
  packages: string[];
185
228
  importStyles?: boolean;
186
229
  localJsPath?: string;
187
230
  localCssPath?: string;
188
231
  }): string;
189
- declare function ensureNodeVersion(minVersion?: string): void;
190
- declare function runShellScriptPlugin(scriptName: string, connectPath: string): Plugin;
232
+ export declare function ensureNodeVersion(minVersion?: string): void;
233
+ export declare function runShellScriptPlugin(scriptName: string, connectPath: string): Plugin;
191
234
  /**
192
235
  * Appends the contents to the <head> tag of the index.html file
193
236
  */
194
- declare function appendToHtmlHead(pathToHtml: string, contents: string): Promise<void>;
237
+ export declare function appendToHtmlHead(pathToHtml: string, contents: string): Promise<void>;
195
238
  /**
196
239
  * Prepends the contents to the <head> tag of the index.html file
197
240
  */
198
- declare function prependToHtmlHead(pathToHtml: string, contents: string): Promise<void>;
199
- declare function runTsc(outDir: string): void;
200
- declare function stripVersionFromPackage(packageName: string): string;
241
+ export declare function prependToHtmlHead(pathToHtml: string, contents: string): Promise<void>;
242
+ export declare function runTsc(outDir: string): void;
243
+ export declare function stripVersionFromPackage(packageName: string): string;
201
244
  //#endregion
202
245
  //#region connect-utils/runtime-config-schema.d.ts
203
- declare const RUNTIME_CONFIG_SCHEMA_ID = "https://powerhouse.inc/schemas/powerhouse.config.json";
204
- declare const RUNTIME_CONFIG_SCHEMA_URL = "https://raw.githubusercontent.com/powerhouse-inc/powerhouse/main/packages/builder-tools/connect-utils/runtime-config.schema.json";
205
- declare const runtimeConfigSchema: {
246
+ export declare const RUNTIME_CONFIG_SCHEMA_ID = "https://powerhouse.inc/schemas/powerhouse.config.json";
247
+ export declare const RUNTIME_CONFIG_SCHEMA_URL = "https://raw.githubusercontent.com/powerhouse-inc/powerhouse/main/packages/builder-tools/connect-utils/runtime-config.schema.json";
248
+ export declare const runtimeConfigSchema: {
206
249
  readonly $schema: "http://json-schema.org/draft-07/schema#";
207
250
  readonly $id: "https://powerhouse.inc/schemas/powerhouse.config.json";
208
251
  readonly title: "Powerhouse Connect runtime configuration";
@@ -315,6 +358,10 @@ declare const runtimeConfigSchema: {
315
358
  readonly description: "Studio mode. Enables builder-only capabilities: Connect loads the vetra package and exposes DocumentModel (and vetra spec types) as creatable documents. Forced on by `ph vetra` / `ph connect studio`; false by default.";
316
359
  readonly default: false;
317
360
  };
361
+ readonly workflowsEnabled: {
362
+ readonly type: "boolean";
363
+ readonly description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set.";
364
+ };
318
365
  };
319
366
  };
320
367
  readonly ai: {
@@ -406,7 +453,7 @@ declare const runtimeConfigSchema: {
406
453
  readonly preserveStrategy: {
407
454
  readonly type: "string";
408
455
  readonly enum: readonly ["preserve-all", "preserve-by-url-and-detach"];
409
- readonly 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 \u2014 opt-in only.";
456
+ readonly 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.";
410
457
  };
411
458
  readonly sections: {
412
459
  readonly type: "object";
@@ -557,6 +604,32 @@ declare const runtimeConfigSchema: {
557
604
  };
558
605
  };
559
606
  };
607
+ readonly openPanel: {
608
+ readonly type: "object";
609
+ readonly additionalProperties: false;
610
+ readonly description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.";
611
+ readonly properties: {
612
+ readonly clientId: {
613
+ readonly type: "string";
614
+ readonly description: "OpenPanel client id. Empty string disables OpenPanel entirely.";
615
+ readonly default: "";
616
+ };
617
+ readonly apiUrl: {
618
+ readonly type: "string";
619
+ readonly description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API.";
620
+ };
621
+ readonly trackUiEvents: {
622
+ readonly type: "boolean";
623
+ readonly description: "Track UI events.";
624
+ readonly default: true;
625
+ };
626
+ readonly trackOperations: {
627
+ readonly type: "boolean";
628
+ readonly description: "Track document operations.";
629
+ readonly default: true;
630
+ };
631
+ };
632
+ };
560
633
  readonly instance: {
561
634
  readonly type: "object";
562
635
  readonly additionalProperties: false;
@@ -607,12 +680,24 @@ declare const runtimeConfigSchema: {
607
680
  };
608
681
  };
609
682
  };
683
+ readonly createSignaturePolicy: {
684
+ readonly type: "string";
685
+ readonly enum: readonly ["legacy", "v2-required"];
686
+ readonly description: "What new documents are created as. `v2-required` documents accept only v2 action signatures and take content-addressed ids; set `legacy` while any peer Connect syncs with predates them. Existing documents keep their policy.";
687
+ readonly default: "v2-required";
688
+ };
689
+ readonly unsupportedStoredDocuments: {
690
+ readonly type: "string";
691
+ readonly enum: readonly ["refuse", "read-only"];
692
+ readonly description: "What the reactor does when this browser's store holds documents at protocol versions this build does not run. `refuse` fails the boot and names the versions; `read-only` boots and keeps those documents read-only.";
693
+ readonly default: "refuse";
694
+ };
610
695
  };
611
696
  };
612
697
  readonly pwa: {
613
698
  readonly type: "object";
614
699
  readonly additionalProperties: false;
615
- readonly description: "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here \u2014 it is derived from the manifest's category field.) Only applied when connect.app.offline is true.";
700
+ readonly description: "Progressive-web-app / service-worker overrides, layered on Connect's built-in PWA defaults at build time. Scalar fields deep-merge (this layer wins); the array members (icons, file_handlers, globs, runtimeCaching and denylist patterns) are additive; maximumFileSizeToCacheInBytes takes the max across contributors. (categories is not set here — it is derived from the manifest's category field.) Only applied when connect.app.offline is true.";
616
701
  readonly properties: {
617
702
  readonly manifest: {
618
703
  readonly type: "object";
@@ -677,7 +762,7 @@ declare const runtimeConfigSchema: {
677
762
  readonly properties: {
678
763
  readonly accept: {
679
764
  readonly type: "object";
680
- readonly description: "MIME type \u2192 file extensions. Each extension must start with '.'; browsers ignore entries without it.";
765
+ readonly description: "MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it.";
681
766
  readonly additionalProperties: {
682
767
  readonly type: "array";
683
768
  readonly items: {
@@ -862,7 +947,7 @@ declare const runtimeConfigSchema: {
862
947
  };
863
948
  //#endregion
864
949
  //#region connect-utils/vite-config.d.ts
865
- declare function getConnectHtmlTags(options?: {
950
+ export declare function getConnectHtmlTags(options?: {
866
951
  registryUrl?: string | null;
867
952
  injectTo?: HtmlTagDescriptor["injectTo"];
868
953
  }): [{
@@ -871,84 +956,74 @@ declare function getConnectHtmlTags(options?: {
871
956
  readonly "http-equiv": "Content-Security-Policy";
872
957
  readonly content: `script-src 'self' 'unsafe-inline' 'unsafe-eval'${string}; worker-src 'self' blob:; object-src 'none'; base-uri 'self';`;
873
958
  };
874
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
959
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
875
960
  }, {
876
961
  readonly tag: "meta";
877
962
  readonly attrs: {
878
963
  readonly property: "og:title";
879
964
  readonly content: "Connect";
880
965
  };
881
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
966
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
882
967
  }, {
883
968
  readonly tag: "meta";
884
969
  readonly attrs: {
885
970
  readonly property: "og:type";
886
971
  readonly content: "website";
887
972
  };
888
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
973
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
889
974
  }, {
890
975
  readonly tag: "meta";
891
976
  readonly attrs: {
892
977
  readonly property: "og:url";
893
978
  readonly content: "https://apps.powerhouse.io/powerhouse/connect/";
894
979
  };
895
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
980
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
896
981
  }, {
897
982
  readonly tag: "meta";
898
983
  readonly attrs: {
899
984
  readonly property: "og:description";
900
985
  readonly content: "Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.";
901
986
  };
902
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
987
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
903
988
  }, {
904
989
  readonly tag: "meta";
905
990
  readonly attrs: {
906
991
  readonly property: "og:image";
907
992
  readonly content: "https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e";
908
993
  };
909
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
994
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
910
995
  }, {
911
996
  readonly tag: "meta";
912
997
  readonly attrs: {
913
998
  readonly name: "twitter:card";
914
999
  readonly content: "summary_large_image";
915
1000
  };
916
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
1001
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
917
1002
  }, {
918
1003
  readonly tag: "meta";
919
1004
  readonly attrs: {
920
1005
  readonly name: "twitter:image";
921
1006
  readonly content: "https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e";
922
1007
  };
923
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
1008
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
924
1009
  }, {
925
1010
  readonly tag: "meta";
926
1011
  readonly attrs: {
927
1012
  readonly name: "twitter:title";
928
1013
  readonly content: "Connect";
929
1014
  };
930
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
1015
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
931
1016
  }, {
932
1017
  readonly tag: "meta";
933
1018
  readonly attrs: {
934
1019
  readonly name: "twitter:description";
935
1020
  readonly content: "Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.";
936
1021
  };
937
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
1022
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
938
1023
  }];
939
- declare function getConnectBaseViteConfig(options: IConnectOptions): InlineConfig;
1024
+ export declare function getConnectBaseViteConfig(options: IConnectOptions): InlineConfig;
940
1025
  //#endregion
941
1026
  //#region connect-utils/vite-plugins/dynamic-base.d.ts
942
- /**
943
- * Placeholder base used when Connect is built in dynamic-base mode. The Vite
944
- * `base` option is set to this token; this plugin rewrites it in the emitted
945
- * output so the effective base is resolved at serve time from a global instead
946
- * of being baked at build time.
947
- *
948
- * Trailing slash matches `normalizeBasePath` output, so the token sits in the
949
- * same syntactic position as a concrete base would.
950
- */
951
- declare const DYNAMIC_BASE_PLACEHOLDER = "/__PH_DYNAMIC_BASE__/";
952
1027
  /**
953
1028
  * Rewrites the placeholder base in emitted JS chunks to a runtime expression so
954
1029
  * one built `dist/connect` serves under any subpath. Rolldown-native: per-match
@@ -977,17 +1052,19 @@ declare const DYNAMIC_BASE_PLACEHOLDER = "/__PH_DYNAMIC_BASE__/";
977
1052
  * they need no rewrite once the stylesheet itself is loaded from the right
978
1053
  * prefix (which the HTML substitution handles).
979
1054
  */
980
- declare function connectDynamicBasePlugin(options?: {
1055
+ export declare function connectDynamicBasePlugin(options?: {
981
1056
  forWorker?: boolean;
982
1057
  workerStripPrefix?: string;
983
1058
  }): Plugin;
984
- declare function escapeForRegExp(s: string): string;
1059
+ export declare function escapeForRegExp(s: string): string;
985
1060
  //#endregion
986
1061
  //#region connect-utils/vite-plugins/ph-config.d.ts
987
- type PhConfigPluginOptions = {
1062
+ export type PhConfigPluginOptions = {
988
1063
  packages: PowerhousePackage[];
989
1064
  projectRoot?: string;
990
1065
  connect?: PHConnectRuntimeConfig;
1066
+ /** The source's top-level `workflows` block; `connect.app.workflowsEnabled` falls back to it. */
1067
+ workflows?: PowerhouseConfig$1["workflows"];
991
1068
  /**
992
1069
  * Project-wide package registry URL — the effective value (CLI override
993
1070
  * `??` source) the caller has already resolved. Copied verbatim into the
@@ -1002,7 +1079,7 @@ type PhConfigPluginOptions = {
1002
1079
  */
1003
1080
  cliConnectOverride?: PHConnectRuntimeConfig;
1004
1081
  };
1005
- declare function phConfigPlugin(options: PhConfigPluginOptions): Plugin;
1082
+ export declare function phConfigPlugin(options: PhConfigPluginOptions): Plugin;
1006
1083
  //#endregion
1007
1084
  //#region connect-utils/vite-plugins/theme-boot.d.ts
1008
1085
  /**
@@ -1010,13 +1087,21 @@ declare function phConfigPlugin(options: PhConfigPluginOptions): Plugin;
1010
1087
  * ph-clint connect proxy) and this plugin both check it, so the script is
1011
1088
  * applied exactly once no matter which layer runs first.
1012
1089
  */
1013
- declare const THEME_BOOT_MARKER = "data-ph-theme-boot";
1090
+ export declare const THEME_BOOT_MARKER = "data-ph-theme-boot";
1014
1091
  /**
1015
1092
  * Injects the theme boot script at the top of `<head>` of every emitted
1016
1093
  * index.html, so built Connect apps render the stored theme from first paint
1017
1094
  * without depending on a serve-time injector.
1018
1095
  */
1019
- declare function connectThemeBootPlugin(): Plugin;
1096
+ export declare function connectThemeBootPlugin(): Plugin;
1097
+ //#endregion
1098
+ //#region connect-utils/vite-plugins/vendor-import-map.d.ts
1099
+ export type VendorImportMapOptions = {
1100
+ /** bare specifier -> URL (already base-prefixed by the caller). */
1101
+ imports: Record<string, string>;
1102
+ };
1103
+ export declare function vendorImportMapPlugin(options: VendorImportMapOptions): Plugin;
1020
1104
  //#endregion
1021
- export { BUILD_HASH_FILE, BuildHashInput, ConnectBuildOptions, ConnectCommonOptions, ConnectPreviewOptions, ConnectStudioOptions, DEFAULT_CONNECT_OUTDIR, DEFAULT_VENDOR_INCLUDE, DYNAMIC_BASE_PLACEHOLDER, EXTERNAL_PACKAGES_IMPORT, IConnectOptions, IMPORT_SCRIPT_FILE, LOCAL_PACKAGE_ID, PH_DIR_NAME, PhConfigPluginOptions, PrebuiltVendor, RUNTIME_CONFIG_SCHEMA_ID, RUNTIME_CONFIG_SCHEMA_URL, THEME_BOOT_MARKER, VENDOR_EXTERNAL, VENDOR_URL_PREFIX, VendorPrebuildOptions, ViteDevOptions, appendToHtmlHead, backupIndexHtml, buildHashFromBuildOptions, computeBuildHash, connectBuildHashPlugin, connectDynamicBasePlugin, connectThemeBootPlugin, copyConnect, ensureNodeVersion, escapeForRegExp, getConnectBaseViteConfig, getConnectHtmlTags, makeImportScriptFromPackages, phConfigPlugin, prebuildConnectVendor, prependToHtmlHead, readJsonFile, removeBase64EnvValues, resolveConnectBundle, resolveConnectPackageJson, resolveConnectPublicDir, resolvePackage, resolveViteConfigPath, runShellScriptPlugin, runTsc, runtimeConfigSchema, stripVersionFromPackage };
1105
+ export { DYNAMIC_BASE_PLACEHOLDER };
1106
+ export {};
1022
1107
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../connect-utils/constants.ts","../connect-utils/vite-plugins/build-hash.ts","../connect-utils/externalize-vendor.ts","../connect-utils/types.ts","../connect-utils/helpers.ts","../connect-utils/runtime-config-schema.ts","../connect-utils/vite-config.ts","../connect-utils/vite-plugins/dynamic-base.ts","../connect-utils/vite-plugins/ph-config.ts","../connect-utils/vite-plugins/theme-boot.ts"],"mappings":";;;;;cAAa,wBAAA;AAAA,cACA,kBAAA;AAAA,cACA,gBAAA;AAAA,cACA,WAAA;;;;cCGA,eAAA;AAAA,UAEI,cAAA;;EAEf,eAAA;EDVmC;ECYnC,gBAAA;EDZmC;;ECenC,qBAAA;EDd6B;ECgB7B,aAAA;EDhB6B;ECkB7B,QAAA;EDjBW;ECmBX,eAAA;;EAEA,cAAA;EDrB2B;ECuB3B,kBAAA;AAAA;;;;;;;AAnBF;;iBA8BgB,gBAAA,CAAiB,KAAA,EAAO,cAAA;AAAA,iBAyCxB,yBAAA,CAA0B,OAAA;EAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCqBG,kBAAA,CACd,OAAA;EACE,WAAA;EACA,QAAA,GAAW,iBAAA;AAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiJC,wBAAA,CAAyB,OAAA,EAAS,eAAA,GAAe,YAAA;;;;;;;ANjMjE;;;;;cOYa,wBAAA;;;;;APVb;;;;;AACA;;;;;;;;ACGA;;;;;AAEA;;;;;;iBMsEgB,wBAAA,CACd,OAAA;EAAW,SAAA;EAAqB,iBAAA;AAAA,IAC/B,MAAA;AAAA,iBAuDa,eAAA,CAAgB,CAAA;;;KC3HpB,qBAAA;EACV,QAAA,EAAU,iBAAA;EACV,WAAA;EACA,OAAA,GAAU,sBAAA;;;;ARdZ;;;EQqBE,kBAAA;ERrB6B;AAC/B;;;;EQ0BE,kBAAA,GAAqB,sBAAA;AAAA;AAAA,iBAsBP,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAwB,MAAA;;;;;;;ARlDhE;cSOa,iBAAA;;;;ATNb;;iBS6BgB,sBAAA,CAAA,GAA0B,MAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../connect-utils/constants.ts","../connect-utils/vite-plugins/build-hash.ts","../connect-utils/externalize-vendor.ts","../connect-utils/types.ts","../connect-utils/helpers.ts","../connect-utils/runtime-config-schema.ts","../connect-utils/vite-config.ts","../connect-utils/vite-plugins/dynamic-base.ts","../connect-utils/vite-plugins/ph-config.ts","../connect-utils/vite-plugins/theme-boot.ts","../connect-utils/vite-plugins/vendor-import-map.ts"],"mappings":";;;;;qBAAa;qBACA;qBACA;qBACA;;;;qBCGA;iBAEI;;EAEf;;EAEA;;;EAGA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;wBAWc,iBAAiB,OAAO;wBAyCxB,0BAA0B;EACxC;EACA;EACA,UAAU;IACR;IACA;IACA;;EAEF;EACA;EACA;;;;;;;;wBAsBc,uBAAuB,oBAAoB;;;iBC3D1C;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;IAAa;;;;;;;;;;;EAUb;;EAEA;;;;;;;qBAQW;;;;;;qBAcA;iBAYI;EACf;;EAEA,SAAS;;EAET,UAAU;;;qBAIC;;;;;;wBAWS,sBACpB,SAAS,wBACR,QAAQ;;;;;wBAsYK,qBACd,mBACA,SAAS;EACN;EAAc;;;;;;;;;;;;wBAoBH,eACd,SAAS,wBACT,eACC;;;YC5hBS;EACV;EACA;EACA;EACA,mBAAmB;EACnB;;;;;;;;;;;;EAYA,qBAAqB;;;;;;EAMrB;EAGA;EAIA;;;;;;;EAOA;IACE,SAAS;IACT,UAAU;;;YAIF;EAEV;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;EAEA;;YAGU,iBAAiB,KAC3B;EAEI;;YAEM,uBAAuB;EACjC,mBAAmB;EACnB;EACA;;YAGU,sBAAsB;EAEhC;;YAGU,wBAAwB,uBAClC,KAAK;EAEH;EACA;EACA;;;;qBC5ES;wBAEG,sBACd,SAAS,KAAK;wBAMA,eAAe,qBAAqB;wBAMpC,0BAA0B,gBAAoB;;;;wBAiB9C,qBAAqB;wBASrB,wBAAwB;;;;wBAWxB,YAAY,oBAAoB;;;;;;wBAiBhC,gBAAgB,iBAAiB;wBAWjC,sBAAsB;wBAmCtB,aAAa,mBAAmB;;;;wBAchC,6BAA6B;EAC3C;EACA;EACA;EACA;;wBAsDc,kBAAkB;wBAclB,qBACd,oBACA,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