@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.
@@ -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 only on the {@link Surface.WebApp} surface today (an internally-hosted
13
- * MicroFrontend is the natural next surface). On every other surface — and when
14
- * the surface is unusable the returned {@link CurrentApp} has `identity`
15
- * `undefined`, mirroring how the Data/Chat SDKs degrade rather than failing the
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
@@ -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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoB9E;AAED,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
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 n, S as c } from "../surface-Dd2tqrPi.js";
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
- return await n(t?.surface) === c.WebApp ? new u() : {};
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
  }
@@ -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.1.1", De = (t) => {
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.1.1",
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.1.1",
142
+ "@salesforce/jsonrpc": "^12.2.0",
143
143
  "@salesforce/sf-embedding-bridge": "2.2.5-rc.2"
144
144
  },
145
145
  "peerDependencies": {