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