@salesforce/platform-sdk 12.1.1 → 12.2.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/app/index.d.ts +7 -5
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +8 -2
- package/dist/data/index.js +1 -1
- package/package.json +2 -2
package/dist/app/index.d.ts
CHANGED
|
@@ -9,11 +9,13 @@ export interface CurrentAppOptions extends SDKOptions {
|
|
|
9
9
|
*
|
|
10
10
|
* There is exactly one running app, so this queries the ambient one rather than
|
|
11
11
|
* constructing a client. Its identity is backed by `SFDC_ENV`, which the runtime
|
|
12
|
-
* injects
|
|
13
|
-
*
|
|
14
|
-
* the
|
|
15
|
-
*
|
|
16
|
-
* host
|
|
12
|
+
* injects on the {@link Surface.WebApp} surface and — via the same core-server
|
|
13
|
+
* page-serving pipeline — on an internally-hosted {@link Surface.MicroFrontend}
|
|
14
|
+
* too, since the MFE host's iframe is ultimately redirected to the UIBundle's own
|
|
15
|
+
* served page. On every other surface — and when the surface is unusable, or
|
|
16
|
+
* `SFDC_ENV` is present without an `appName` (the host hasn't wired injection for
|
|
17
|
+
* this embed) — the returned {@link CurrentApp} has `identity` `undefined`,
|
|
18
|
+
* mirroring how the Data/Chat SDKs degrade rather than failing the host.
|
|
17
19
|
*
|
|
18
20
|
* @param options - Optional configuration including surface override
|
|
19
21
|
* @returns Promise resolving to the current app
|
package/dist/app/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGtD;;GAEG;AAEH,MAAM,WAAW,iBAAkB,SAAQ,UAAU;CAAG;AAExD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGtD;;GAEG;AAEH,MAAM,WAAW,iBAAkB,SAAQ,UAAU;CAAG;AAExD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAqB9E;AAED,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/app/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as
|
|
1
|
+
import { g as c, S as n } from "../surface-Dd2tqrPi.js";
|
|
2
2
|
import { w as s } from "../sdk-promise-D0sy7OW1.js";
|
|
3
3
|
const p = "c";
|
|
4
4
|
class u {
|
|
@@ -22,7 +22,13 @@ function f(t) {
|
|
|
22
22
|
return s(
|
|
23
23
|
(async () => {
|
|
24
24
|
try {
|
|
25
|
-
|
|
25
|
+
switch (await c(t?.surface)) {
|
|
26
|
+
case n.WebApp:
|
|
27
|
+
case n.MicroFrontend:
|
|
28
|
+
return new u();
|
|
29
|
+
default:
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
26
32
|
} catch {
|
|
27
33
|
return {};
|
|
28
34
|
}
|
package/dist/data/index.js
CHANGED
|
@@ -305,7 +305,7 @@ const S = "Accept-Language", ge = (t) => {
|
|
|
305
305
|
return l(t);
|
|
306
306
|
const [r, n] = t;
|
|
307
307
|
return (r instanceof Request && !n?.headers ? r.headers.has(S) : new Headers(n?.headers).has(S)) ? l(t) : l(b(S, e, t));
|
|
308
|
-
}, Ee = "X-SFDC-Client-Name", Se = "X-SFDC-Client-Version", Ce = "@salesforce/platform-sdk", xe = "12.
|
|
308
|
+
}, Ee = "X-SFDC-Client-Name", Se = "X-SFDC-Client-Version", Ce = "@salesforce/platform-sdk", xe = "12.2.0", De = (t) => {
|
|
309
309
|
let e = b(Ee, Ce, t);
|
|
310
310
|
return e = b(Se, xe, e), l(e);
|
|
311
311
|
}, Oe = "X-CSRF-Token";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/platform-sdk",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@conduit-client/service-pubsub": "3.19.6",
|
|
140
140
|
"@conduit-client/service-retry": "3.19.6",
|
|
141
141
|
"@conduit-client/utils": "3.19.6",
|
|
142
|
-
"@salesforce/jsonrpc": "^12.
|
|
142
|
+
"@salesforce/jsonrpc": "^12.2.0",
|
|
143
143
|
"@salesforce/sf-embedding-bridge": "2.2.5-rc.2"
|
|
144
144
|
},
|
|
145
145
|
"peerDependencies": {
|