@salesforce/ui-bundle 12.8.0-canary.1019.37.1.g1f7b157f → 12.9.0
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/api/utils/accounts.d.ts +3 -3
- package/dist/api/utils/user.d.ts +14 -8
- package/dist/api/utils/user.d.ts.map +1 -1
- package/dist/app/manifest.d.ts +31 -24
- package/dist/app/manifest.d.ts.map +1 -1
- package/dist/app/meta-xml.d.ts +11 -9
- package/dist/app/meta-xml.d.ts.map +1 -1
- package/dist/app/org.d.ts +5 -5
- package/dist/package.json.js +1 -1
- package/dist/proxy/handler.d.ts +28 -28
- package/dist/proxy/handler.d.ts.map +1 -1
- package/dist/proxy/handler.js +6 -5
- package/dist/proxy/livePreviewScript.d.ts +12 -10
- package/dist/proxy/livePreviewScript.d.ts.map +1 -1
- package/dist/proxy/routing.d.ts +18 -15
- package/dist/proxy/routing.d.ts.map +1 -1
- package/dist/proxy/utils/cometD.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -24,10 +24,10 @@ export interface Account {
|
|
|
24
24
|
} | null;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Fetches the accounts whose annual revenue is greater than a given amount.
|
|
28
28
|
*
|
|
29
|
-
* @param variables -
|
|
30
|
-
* @returns
|
|
29
|
+
* @param variables - The query variables, including the `minRevenue` threshold.
|
|
30
|
+
* @returns An array of the accounts that match the threshold.
|
|
31
31
|
*/
|
|
32
32
|
export declare function getHighRevenueAccounts(variables: GetHighRevenueAccountsVariables): Promise<(Account | null | undefined)[]>;
|
|
33
33
|
//# sourceMappingURL=accounts.d.ts.map
|
package/dist/api/utils/user.d.ts
CHANGED
|
@@ -8,14 +8,20 @@ interface User {
|
|
|
8
8
|
name: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
11
|
+
* Fetches the current user from Salesforce with a UI API GraphQL query.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* A guest (unauthenticated) session also resolves to a running user record on the
|
|
15
|
+
* platform. This function therefore filters out guests directly, and does not rely on a
|
|
16
|
+
* failed fetch to show that no user is logged in.
|
|
17
|
+
*
|
|
18
|
+
* The query does not mark `UserType` as `@optional` on purpose. If the response has a
|
|
19
|
+
* missing, null, or empty `UserType`, this function throws an error rather than treat the
|
|
20
|
+
* user as a non-guest, because that response shape is unexpected and the function cannot
|
|
21
|
+
* safely authenticate against it.
|
|
22
|
+
*
|
|
23
|
+
* @returns The user's information, or `null` when there is no active session or the
|
|
24
|
+
* session is a guest session.
|
|
19
25
|
*/
|
|
20
26
|
export declare function getCurrentUser(): Promise<User | null>;
|
|
21
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/api/utils/user.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,UAAU,IAAI;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACb;AA4BD
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/api/utils/user.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,UAAU,IAAI;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACb;AA4BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAuC3D"}
|
package/dist/app/manifest.d.ts
CHANGED
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* The deployment target for a full UI Bundle web app. Declares where the bundle
|
|
8
|
+
* appears in Salesforce, and drives the `<target>` element of the generated
|
|
9
9
|
* `*.uibundle-meta.xml` (and any companion metadata).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* option) and emitted into the `*.uibundle-meta.xml`, which is the metadata
|
|
17
|
-
* artifact the platform actually reads for targets.
|
|
11
|
+
* @remarks
|
|
12
|
+
* This is a build-time concept, not a field of the deployed `ui-bundle.json`
|
|
13
|
+
* manifest. The platform's manifest schema accepts only `outputDir`, `routing`,
|
|
14
|
+
* and `headers`. If you declare `target` in the manifest, the bundle fails to
|
|
15
|
+
* deploy with `InvalidUiBundleConfigError`.
|
|
18
16
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* -
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
17
|
+
* You therefore supply the target to the build (see the Vite plugin's
|
|
18
|
+
* `generateMetaXml` option). The build emits the target into the
|
|
19
|
+
* `*.uibundle-meta.xml`, which is the metadata artifact that the platform reads
|
|
20
|
+
* for targets.
|
|
21
|
+
*
|
|
22
|
+
* The target values are:
|
|
23
|
+
* - `Experience` — the bundle appears through an Experience Site (site-container metadata).
|
|
24
|
+
* - `CustomApplication` — the bundle appears as a Lightning Custom Application.
|
|
25
|
+
* - `AppLauncher` — the bundle is reachable from the Lightning App Launcher. This
|
|
26
|
+
* value is a convenience alias. A Custom Application provides App Launcher
|
|
27
|
+
* visibility, so `AppLauncher` maps to the same `CustomApplication` bundle
|
|
28
|
+
* target, plus the companion app and permission-set metadata.
|
|
25
29
|
*/
|
|
26
30
|
export type UIBundleTarget = "Experience" | "CustomApplication" | "AppLauncher";
|
|
27
31
|
export interface UIBundleManifest {
|
|
@@ -31,12 +35,15 @@ export interface UIBundleManifest {
|
|
|
31
35
|
}
|
|
32
36
|
export declare const UI_BUNDLE_TARGETS: readonly UIBundleTarget[];
|
|
33
37
|
/**
|
|
34
|
-
*
|
|
35
|
-
* `<target>` element
|
|
36
|
-
*
|
|
38
|
+
* Resolves a build-time target to the value that the build emits in the
|
|
39
|
+
* `<target>` element of the `*.uibundle-meta.xml`.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* `AppLauncher` is an alias for `CustomApplication`, because a Custom Application
|
|
43
|
+
* provides App Launcher visibility.
|
|
37
44
|
*
|
|
38
|
-
* @param target - The build-time target
|
|
39
|
-
* @returns The `<target>` value for the UIBundle metadata, or undefined
|
|
45
|
+
* @param target - The build-time target.
|
|
46
|
+
* @returns The `<target>` value for the UIBundle metadata, or `undefined` when there is none.
|
|
40
47
|
*/
|
|
41
48
|
export declare function resolveMetaTarget(target?: UIBundleTarget): "Experience" | "CustomApplication" | undefined;
|
|
42
49
|
export interface RoutingConfig {
|
|
@@ -55,11 +62,11 @@ export interface RedirectRule {
|
|
|
55
62
|
statusCode: 301 | 302 | 307 | 308;
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
|
-
*
|
|
65
|
+
* Loads and parses a UI Bundle manifest (ui-bundle.json).
|
|
59
66
|
*
|
|
60
|
-
* @param manifestPath -
|
|
61
|
-
* @returns
|
|
62
|
-
* @throws Error
|
|
67
|
+
* @param manifestPath - The path to the ui-bundle.json file.
|
|
68
|
+
* @returns The parsed manifest.
|
|
69
|
+
* @throws {Error} When the manifest file is not found, or validation fails.
|
|
63
70
|
*/
|
|
64
71
|
export declare function loadManifest(manifestPath: string): Promise<UIBundleManifest>;
|
|
65
72
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/app/manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/app/manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,mBAAmB,GAAG,aAAa,CAAC;AAIhF,MAAM,WAAW,gBAAgB;IAEhC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,aAAa,CAAC;CACxB;AAGD,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAItD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,CAAC,EAAE,cAAc,GACrB,YAAY,GAAG,mBAAmB,GAAG,SAAS,CAQhD;AAGD,MAAM,WAAW,aAAa;IAE7B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IAEzB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3B,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAE5C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,WAAW;IAE3B,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,YAAY;IAE5B,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAClC;AAsBD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAclF"}
|
package/dist/app/meta-xml.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UIBundleManifest, UIBundleTarget } from './manifest';
|
|
2
|
-
/**
|
|
2
|
+
/** The options for generating a UIBundle meta XML file. */
|
|
3
3
|
export interface MetaXmlOptions {
|
|
4
4
|
target?: UIBundleTarget;
|
|
5
5
|
masterLabel?: string;
|
|
@@ -8,15 +8,17 @@ export interface MetaXmlOptions {
|
|
|
8
8
|
version?: number;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* drives the `<target>` element (see {@link resolveMetaTarget}); `AppLauncher`
|
|
13
|
-
* resolves to `CustomApplication`. The manifest supplies the default master
|
|
14
|
-
* label (via `manifest.name`).
|
|
11
|
+
* Generates the contents of a `*.uibundle-meta.xml` file.
|
|
15
12
|
*
|
|
16
|
-
* @
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* The `target` option drives the `<target>` element (see {@link resolveMetaTarget}).
|
|
15
|
+
* `AppLauncher` resolves to `CustomApplication`. The manifest supplies the default
|
|
16
|
+
* master label through `manifest.name`.
|
|
17
|
+
*
|
|
18
|
+
* @param manifest - The parsed ui-bundle.json manifest. Supplies the name fallback.
|
|
19
|
+
* @param bundleName - The bundle's developer name. Used as the default label.
|
|
20
|
+
* @param options - The target and optional overrides (label, description, isActive, version).
|
|
21
|
+
* @returns The XML document text for the `*.uibundle-meta.xml` file.
|
|
20
22
|
*/
|
|
21
23
|
export declare function generateUIBundleMetaXml(manifest: UIBundleManifest, bundleName: string, options?: MetaXmlOptions): string;
|
|
22
24
|
//# sourceMappingURL=meta-xml.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta-xml.d.ts","sourceRoot":"","sources":["../../src/app/meta-xml.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAqB,MAAM,YAAY,CAAC;AAc3F,
|
|
1
|
+
{"version":3,"file":"meta-xml.d.ts","sourceRoot":"","sources":["../../src/app/meta-xml.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAqB,MAAM,YAAY,CAAC;AAc3F,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAI9B,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACtC,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,cAAmB,GAC1B,MAAM,CA0BR"}
|
package/dist/app/org.d.ts
CHANGED
|
@@ -13,16 +13,16 @@ export interface OrgInfo {
|
|
|
13
13
|
orgAlias?: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Gets the Salesforce org information and authentication details.
|
|
17
17
|
*
|
|
18
|
-
* @param orgAlias -
|
|
19
|
-
* @returns
|
|
18
|
+
* @param orgAlias - The org alias or username. Uses the default org when you omit it.
|
|
19
|
+
* @returns The org information, or `undefined` when authentication fails.
|
|
20
20
|
*/
|
|
21
21
|
export declare function getOrgInfo(orgAlias?: string): Promise<OrgInfo | undefined>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Refreshes the authentication for a Salesforce org.
|
|
24
24
|
*
|
|
25
|
-
* @param orgAlias
|
|
25
|
+
* @param orgAlias - The org alias or username to refresh.
|
|
26
26
|
*/
|
|
27
27
|
export declare function refreshOrgAuth(orgAlias: string): Promise<OrgInfo | undefined>;
|
|
28
28
|
//# sourceMappingURL=org.d.ts.map
|
package/dist/package.json.js
CHANGED
package/dist/proxy/handler.d.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
2
|
import { OrgInfo, UIBundleManifest } from '../app/index';
|
|
3
|
-
/**
|
|
4
|
-
* URL parameter to trigger health check response
|
|
5
|
-
*/
|
|
3
|
+
/** The URL parameter that triggers the health-check response. */
|
|
6
4
|
export declare const UIBUNDLE_HEALTH_CHECK_PARAM = "sfProxyHealthCheck";
|
|
7
|
-
/**
|
|
8
|
-
* Response header indicating the proxy is active
|
|
9
|
-
*/
|
|
5
|
+
/** The response header that indicates the proxy is active. */
|
|
10
6
|
export declare const UIBUNDLE_PROXY_HEADER = "X-Salesforce-UIBundle-Proxy";
|
|
11
7
|
/**
|
|
12
|
-
*
|
|
8
|
+
* The configuration options for the UI Bundle proxy handler.
|
|
13
9
|
*/
|
|
14
10
|
export interface ProxyOptions {
|
|
15
11
|
debug?: boolean;
|
|
16
12
|
onTokenRefresh?: (updatedOrgInfo: OrgInfo) => void;
|
|
17
13
|
/**
|
|
18
|
-
* UI-only preview mode.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
14
|
+
* UI-only preview mode.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* When `true`, the handler carries no org credential. It returns an explicit
|
|
18
|
+
* `403` (`ORG_DATA_DISABLED`) for every org-data route that it owns:
|
|
19
|
+
* - the matched REST, GraphQL, and file-upload routes;
|
|
20
|
+
* - the Lightning Out frontdoor;
|
|
21
|
+
* - the whole `${basePath}/services/*` surface. This surface is fail-closed, so
|
|
22
|
+
* the handler still blocks an endpoint that `matchRoute` does not recognize,
|
|
23
|
+
* rather than let the endpoint fall through.
|
|
24
|
+
*
|
|
25
|
+
* The handler lets all other requests fall through: the shell, HMR, assets, and
|
|
26
|
+
* pure routing rewrites and redirects. This mode mirrors a dev server that starts
|
|
27
|
+
* without an authenticated SF CLI, but it is a deliberate kill-switch rather than
|
|
28
|
+
* a no-org error condition.
|
|
27
29
|
*/
|
|
28
30
|
uiOnly?: boolean;
|
|
29
31
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Proxy handler function type
|
|
32
|
-
*/
|
|
32
|
+
/** The proxy handler function type. */
|
|
33
33
|
export type ProxyHandler = (req: IncomingMessage, res: ServerResponse, next?: () => void) => Promise<void>;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Creates a proxy request handler.
|
|
36
36
|
*
|
|
37
|
-
* @param manifest - UI Bundle manifest configuration
|
|
38
|
-
* @param orgInfo - Salesforce org information
|
|
39
|
-
* @param target -
|
|
40
|
-
* @param basePath -
|
|
41
|
-
* @param options -
|
|
42
|
-
* @returns
|
|
37
|
+
* @param manifest - The UI Bundle manifest configuration.
|
|
38
|
+
* @param orgInfo - The Salesforce org information.
|
|
39
|
+
* @param target - The target URL for dev-server forwarding.
|
|
40
|
+
* @param basePath - The base path for routing.
|
|
41
|
+
* @param options - The proxy configuration options.
|
|
42
|
+
* @returns An async request handler function for a Node.js HTTP server.
|
|
43
43
|
*/
|
|
44
44
|
export declare function createProxyHandler(manifest: UIBundleManifest, orgInfo?: OrgInfo, target?: string, basePath?: string, options?: ProxyOptions): ProxyHandler;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* Injects the Live Preview script into HTML content. The Vite plugin's
|
|
47
|
+
* transformIndexHtml hook and the standalone proxy's sendResponse both use it.
|
|
48
48
|
*/
|
|
49
49
|
export declare function injectLivePreviewScript(html: string): string;
|
|
50
50
|
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/proxy/handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKjE,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG9D
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/proxy/handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKjE,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG9D,iEAAiE;AACjE,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAEhE,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,gCAAgC,CAAC;AAuBnE;;GAEG;AACH,MAAM,WAAW,YAAY;IAE5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,cAAc,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACnD;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,uCAAuC;AACvC,MAAM,MAAM,YAAY,GAAG,CAC1B,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,IAAI,CAAC,EAAE,MAAM,IAAI,KACb,OAAO,CAAC,IAAI,CAAC,CAAC;AA4yBnB;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,YAAY,GACpB,YAAY,CAGd;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|
package/dist/proxy/handler.js
CHANGED
|
@@ -270,7 +270,8 @@ class UIBundleProxyHandler {
|
|
|
270
270
|
...getFilteredHeaders(req.headers),
|
|
271
271
|
Cookie: `sid=${orgInfo.accessToken}`,
|
|
272
272
|
Accept: req.headers.accept ?? "application/json",
|
|
273
|
-
//
|
|
273
|
+
// Apex requests need this header, because SessionUtil.validateSessionUsage does not
|
|
274
|
+
// accept the OAuth token as the `sid` cookie.
|
|
274
275
|
Authorization: `Bearer ${orgInfo.accessToken}`
|
|
275
276
|
}
|
|
276
277
|
}));
|
|
@@ -414,8 +415,8 @@ class UIBundleProxyHandler {
|
|
|
414
415
|
return html + scriptTag;
|
|
415
416
|
}
|
|
416
417
|
/**
|
|
417
|
-
*
|
|
418
|
-
* Uses rawInstanceUrl for Chatter API. Preserves multipart/form-data from XHR.
|
|
418
|
+
* Proxies POST /chatter/handlers/file/body (XHR or file upload) to Salesforce.
|
|
419
|
+
* Uses rawInstanceUrl for the Chatter API. Preserves multipart/form-data from XHR.
|
|
419
420
|
*/
|
|
420
421
|
async handleFileUpload(req, res) {
|
|
421
422
|
try {
|
|
@@ -491,8 +492,8 @@ class UIBundleProxyHandler {
|
|
|
491
492
|
}
|
|
492
493
|
}
|
|
493
494
|
/**
|
|
494
|
-
*
|
|
495
|
-
* (/jslibrary/<hash>/streaming-v2/CometdWorkerJs.js) to Salesforce
|
|
495
|
+
* Proxies CometD long-poll requests (/cometd/<version>) and shared worker scripts
|
|
496
|
+
* (/jslibrary/<hash>/streaming-v2/CometdWorkerJs.js) to Salesforce with session cookies.
|
|
496
497
|
*/
|
|
497
498
|
async handleCometD(req, res, apiPath) {
|
|
498
499
|
try {
|
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* Returns the JavaScript source that
|
|
8
|
-
* Reads from templates/livePreviewScript.js at runtime (copied to dist/ by postbuild).
|
|
9
|
-
* Cached after first read.
|
|
7
|
+
* Returns the JavaScript source that the proxy injects into previewed UI Bundles.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* -
|
|
9
|
+
* @remarks
|
|
10
|
+
* Reads from templates/livePreviewScript.js at runtime (the postbuild step copies it
|
|
11
|
+
* to dist/). Caches the source after the first read.
|
|
12
|
+
*
|
|
13
|
+
* The script has these responsibilities:
|
|
14
|
+
* - A fetch interceptor for network-error detection (runs synchronously on load).
|
|
15
|
+
* - Runtime, compile, and HMR error listeners.
|
|
16
|
+
* - Error deduplication.
|
|
17
|
+
* - A postMessage bridge to the VS Code webview (when the script runs inside an iframe).
|
|
18
|
+
* - A copy, paste, and right-click bridge for the VS Code webview.
|
|
17
19
|
*/
|
|
18
20
|
export declare function getLivePreviewScriptContent(): string;
|
|
19
|
-
/**
|
|
21
|
+
/** The data attribute that detects and prevents double injection. */
|
|
20
22
|
export declare const LIVE_PREVIEW_SCRIPT_MARKER = "data-live-preview";
|
|
21
23
|
//# sourceMappingURL=livePreviewScript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"livePreviewScript.d.ts","sourceRoot":"","sources":["../../src/proxy/livePreviewScript.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH
|
|
1
|
+
{"version":3,"file":"livePreviewScript.d.ts","sourceRoot":"","sources":["../../src/proxy/livePreviewScript.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAKpD;AAED,qEAAqE;AACrE,eAAO,MAAM,0BAA0B,sBAAsB,CAAC"}
|
package/dist/proxy/routing.d.ts
CHANGED
|
@@ -23,30 +23,33 @@ interface ApiRouteMatch {
|
|
|
23
23
|
myDomain?: boolean;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Matches a URL path against the routing rules.
|
|
27
27
|
*
|
|
28
|
-
* @param pathname - The URL pathname to match
|
|
29
|
-
* @param basePath -
|
|
30
|
-
* @param rewrites -
|
|
31
|
-
* @param redirects -
|
|
32
|
-
* @returns
|
|
28
|
+
* @param pathname - The URL pathname to match.
|
|
29
|
+
* @param basePath - The base path of the Salesforce server.
|
|
30
|
+
* @param rewrites - The rewrite rules.
|
|
31
|
+
* @param redirects - The redirect rules.
|
|
32
|
+
* @returns The route match, which gives the type and target, or `null` when nothing matches.
|
|
33
33
|
*/
|
|
34
34
|
export declare function matchRoute(pathname: string, basePath?: string, rewrites?: RewriteRule[], redirects?: RedirectRule[]): RouteMatch | null;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Supports glob wildcards: * (matches anything except /), ** (matches anything including /), ? (single character)
|
|
36
|
+
* Checks whether a path matches any of the given glob patterns.
|
|
38
37
|
*
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Supports these glob wildcards: `*` matches anything except `/`, `**` matches
|
|
40
|
+
* anything including `/`, and `?` matches a single character.
|
|
41
|
+
*
|
|
42
|
+
* @param path - The path to test.
|
|
43
|
+
* @param patterns - The glob patterns to match against.
|
|
44
|
+
* @returns `true` when the path matches any pattern, otherwise `false`.
|
|
42
45
|
*/
|
|
43
46
|
export declare function matchesPattern(path: string, patterns: string[] | undefined): boolean;
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
48
|
+
* Applies the trailing-slash rules to a pathname.
|
|
46
49
|
*
|
|
47
|
-
* @param pathname - The URL pathname
|
|
48
|
-
* @param trailingSlash -
|
|
49
|
-
* @returns
|
|
50
|
+
* @param pathname - The URL pathname.
|
|
51
|
+
* @param trailingSlash - The trailing-slash handling strategy.
|
|
52
|
+
* @returns The pathname, with the trailing-slash rules applied.
|
|
50
53
|
*/
|
|
51
54
|
export declare function applyTrailingSlash(pathname: string, trailingSlash?: "always" | "never" | "auto"): string;
|
|
52
55
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/proxy/routing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,UAAU,GACrB,iBAAiB,GAAG,iBAAiB,GAAG,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEhG,UAAU,iBAAiB;IAC1B,IAAI,EAAE,KAAK,GAAG,aAAa,CAAC;CAC5B;AAKD,UAAU,iBAAiB;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb;AAED,UAAU,iBAAiB;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,kBAAkB;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAClC;AAED,UAAU,aAAa;IACtB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/proxy/routing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,UAAU,GACrB,iBAAiB,GAAG,iBAAiB,GAAG,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEhG,UAAU,iBAAiB;IAC1B,IAAI,EAAE,KAAK,GAAG,aAAa,CAAC;CAC5B;AAKD,UAAU,iBAAiB;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb;AAED,UAAU,iBAAiB;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,kBAAkB;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAClC;AAED,UAAU,aAAa;IACtB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IAKb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AASD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,SAAS,CAAC,EAAE,YAAY,EAAE,GACxB,UAAU,GAAG,IAAI,CA2GnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAMpF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GACzC,MAAM,CAiBR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cometD.d.ts","sourceRoot":"","sources":["../../../src/proxy/utils/cometD.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cometD.d.ts","sourceRoot":"","sources":["../../../src/proxy/utils/cometD.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMhD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC/F;AAaD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK/D"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle",
|
|
3
3
|
"description": "Core package for Salesforce UI Bundles",
|
|
4
|
-
"version": "12.
|
|
4
|
+
"version": "12.9.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@salesforce/core": "^8.23.4",
|
|
42
|
-
"@salesforce/platform-sdk": "12.
|
|
42
|
+
"@salesforce/platform-sdk": "^12.9.0",
|
|
43
43
|
"micromatch": "^4.0.8",
|
|
44
44
|
"path-to-regexp": "^8.4.2"
|
|
45
45
|
},
|