@powerhousedao/builder-tools 6.2.3-dev.3 → 6.2.3-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.
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
4
  import { PHConnectRuntimeConfig } from "@powerhousedao/shared/clis";
4
-
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,11 @@ 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. Connect's counterpart to the reactor-side `workflows.enabled` / PH_WORKFLOWS_ENABLED; independent of studioMode. False by default.";
364
+ readonly default: false;
365
+ };
318
366
  };
319
367
  };
320
368
  readonly ai: {
@@ -406,7 +454,7 @@ declare const runtimeConfigSchema: {
406
454
  readonly preserveStrategy: {
407
455
  readonly type: "string";
408
456
  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.";
457
+ 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
458
  };
411
459
  readonly sections: {
412
460
  readonly type: "object";
@@ -607,12 +655,18 @@ declare const runtimeConfigSchema: {
607
655
  };
608
656
  };
609
657
  };
658
+ readonly createSignaturePolicy: {
659
+ readonly type: "string";
660
+ readonly enum: readonly ["legacy", "v2-required"];
661
+ 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.";
662
+ readonly default: "v2-required";
663
+ };
610
664
  };
611
665
  };
612
666
  readonly pwa: {
613
667
  readonly type: "object";
614
668
  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.";
669
+ 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
670
  readonly properties: {
617
671
  readonly manifest: {
618
672
  readonly type: "object";
@@ -677,7 +731,7 @@ declare const runtimeConfigSchema: {
677
731
  readonly properties: {
678
732
  readonly accept: {
679
733
  readonly type: "object";
680
- readonly description: "MIME type \u2192 file extensions. Each extension must start with '.'; browsers ignore entries without it.";
734
+ readonly description: "MIME type → file extensions. Each extension must start with '.'; browsers ignore entries without it.";
681
735
  readonly additionalProperties: {
682
736
  readonly type: "array";
683
737
  readonly items: {
@@ -862,7 +916,7 @@ declare const runtimeConfigSchema: {
862
916
  };
863
917
  //#endregion
864
918
  //#region connect-utils/vite-config.d.ts
865
- declare function getConnectHtmlTags(options?: {
919
+ export declare function getConnectHtmlTags(options?: {
866
920
  registryUrl?: string | null;
867
921
  injectTo?: HtmlTagDescriptor["injectTo"];
868
922
  }): [{
@@ -871,84 +925,74 @@ declare function getConnectHtmlTags(options?: {
871
925
  readonly "http-equiv": "Content-Security-Policy";
872
926
  readonly content: `script-src 'self' 'unsafe-inline' 'unsafe-eval'${string}; worker-src 'self' blob:; object-src 'none'; base-uri 'self';`;
873
927
  };
874
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
928
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
875
929
  }, {
876
930
  readonly tag: "meta";
877
931
  readonly attrs: {
878
932
  readonly property: "og:title";
879
933
  readonly content: "Connect";
880
934
  };
881
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
935
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
882
936
  }, {
883
937
  readonly tag: "meta";
884
938
  readonly attrs: {
885
939
  readonly property: "og:type";
886
940
  readonly content: "website";
887
941
  };
888
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
942
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
889
943
  }, {
890
944
  readonly tag: "meta";
891
945
  readonly attrs: {
892
946
  readonly property: "og:url";
893
947
  readonly content: "https://apps.powerhouse.io/powerhouse/connect/";
894
948
  };
895
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
949
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
896
950
  }, {
897
951
  readonly tag: "meta";
898
952
  readonly attrs: {
899
953
  readonly property: "og:description";
900
954
  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
955
  };
902
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
956
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
903
957
  }, {
904
958
  readonly tag: "meta";
905
959
  readonly attrs: {
906
960
  readonly property: "og:image";
907
961
  readonly content: "https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e";
908
962
  };
909
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
963
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
910
964
  }, {
911
965
  readonly tag: "meta";
912
966
  readonly attrs: {
913
967
  readonly name: "twitter:card";
914
968
  readonly content: "summary_large_image";
915
969
  };
916
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
970
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
917
971
  }, {
918
972
  readonly tag: "meta";
919
973
  readonly attrs: {
920
974
  readonly name: "twitter:image";
921
975
  readonly content: "https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e";
922
976
  };
923
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
977
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
924
978
  }, {
925
979
  readonly tag: "meta";
926
980
  readonly attrs: {
927
981
  readonly name: "twitter:title";
928
982
  readonly content: "Connect";
929
983
  };
930
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
984
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
931
985
  }, {
932
986
  readonly tag: "meta";
933
987
  readonly attrs: {
934
988
  readonly name: "twitter:description";
935
989
  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
990
  };
937
- readonly injectTo: "head" | "body" | "head-prepend" | "body-prepend";
991
+ readonly injectTo: "body" | "body-prepend" | "head" | "head-prepend";
938
992
  }];
939
- declare function getConnectBaseViteConfig(options: IConnectOptions): InlineConfig;
993
+ export declare function getConnectBaseViteConfig(options: IConnectOptions): InlineConfig;
940
994
  //#endregion
941
995
  //#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
996
  /**
953
997
  * Rewrites the placeholder base in emitted JS chunks to a runtime expression so
954
998
  * one built `dist/connect` serves under any subpath. Rolldown-native: per-match
@@ -977,14 +1021,14 @@ declare const DYNAMIC_BASE_PLACEHOLDER = "/__PH_DYNAMIC_BASE__/";
977
1021
  * they need no rewrite once the stylesheet itself is loaded from the right
978
1022
  * prefix (which the HTML substitution handles).
979
1023
  */
980
- declare function connectDynamicBasePlugin(options?: {
1024
+ export declare function connectDynamicBasePlugin(options?: {
981
1025
  forWorker?: boolean;
982
1026
  workerStripPrefix?: string;
983
1027
  }): Plugin;
984
- declare function escapeForRegExp(s: string): string;
1028
+ export declare function escapeForRegExp(s: string): string;
985
1029
  //#endregion
986
1030
  //#region connect-utils/vite-plugins/ph-config.d.ts
987
- type PhConfigPluginOptions = {
1031
+ export type PhConfigPluginOptions = {
988
1032
  packages: PowerhousePackage[];
989
1033
  projectRoot?: string;
990
1034
  connect?: PHConnectRuntimeConfig;
@@ -1002,7 +1046,7 @@ type PhConfigPluginOptions = {
1002
1046
  */
1003
1047
  cliConnectOverride?: PHConnectRuntimeConfig;
1004
1048
  };
1005
- declare function phConfigPlugin(options: PhConfigPluginOptions): Plugin;
1049
+ export declare function phConfigPlugin(options: PhConfigPluginOptions): Plugin;
1006
1050
  //#endregion
1007
1051
  //#region connect-utils/vite-plugins/theme-boot.d.ts
1008
1052
  /**
@@ -1010,13 +1054,21 @@ declare function phConfigPlugin(options: PhConfigPluginOptions): Plugin;
1010
1054
  * ph-clint connect proxy) and this plugin both check it, so the script is
1011
1055
  * applied exactly once no matter which layer runs first.
1012
1056
  */
1013
- declare const THEME_BOOT_MARKER = "data-ph-theme-boot";
1057
+ export declare const THEME_BOOT_MARKER = "data-ph-theme-boot";
1014
1058
  /**
1015
1059
  * Injects the theme boot script at the top of `<head>` of every emitted
1016
1060
  * index.html, so built Connect apps render the stored theme from first paint
1017
1061
  * without depending on a serve-time injector.
1018
1062
  */
1019
- declare function connectThemeBootPlugin(): Plugin;
1063
+ export declare function connectThemeBootPlugin(): Plugin;
1064
+ //#endregion
1065
+ //#region connect-utils/vite-plugins/vendor-import-map.d.ts
1066
+ export type VendorImportMapOptions = {
1067
+ /** bare specifier -> URL (already base-prefixed by the caller). */
1068
+ imports: Record<string, string>;
1069
+ };
1070
+ export declare function vendorImportMapPlugin(options: VendorImportMapOptions): Plugin;
1020
1071
  //#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 };
1072
+ export { DYNAMIC_BASE_PLACEHOLDER };
1073
+ export {};
1022
1074
  //# 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;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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;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