@salesforce/platform-sdk 11.45.5 → 11.45.6

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.
@@ -1,6 +1,6 @@
1
1
  import { g as c, S as n, a as d } from "../surface-Dd2tqrPi.js";
2
2
  import { w as p } from "../sdk-promise-D0sy7OW1.js";
3
- import { requireSharedSession as h } from "../ui-embedding/index.js";
3
+ import { requireSharedSession as h } from "../ui-embedding/session.js";
4
4
  class a {
5
5
  // @ts-expect-error TS6138: `session` is unread until the first method body lands
6
6
  constructor(t) {
@@ -245,7 +245,7 @@ const w = "Accept-Language", me = (r) => {
245
245
  return u(r);
246
246
  const [t, n] = r;
247
247
  return (t instanceof Request && !n?.headers ? t.headers.has(w) : new Headers(n?.headers).has(w)) ? u(r) : u(b(w, e, r));
248
- }, ye = "X-SFDC-Client-Name", be = "X-SFDC-Client-Version", ve = "@salesforce/platform-sdk", Se = "11.45.5", ge = (r) => {
248
+ }, ye = "X-SFDC-Client-Name", be = "X-SFDC-Client-Version", ve = "@salesforce/platform-sdk", Se = "11.45.6", ge = (r) => {
249
249
  let e = b(ye, ve, r);
250
250
  return e = b(be, Se, e), u(e);
251
251
  }, we = "X-CSRF-Token";
@@ -1,6 +1,6 @@
1
1
  import { g as a, S as r } from "../surface-Dd2tqrPi.js";
2
2
  import { w as n } from "../sdk-promise-D0sy7OW1.js";
3
- import { requireSharedSession as c } from "../ui-embedding/index.js";
3
+ import { requireSharedSession as c } from "../ui-embedding/session.js";
4
4
  class t {
5
5
  // @ts-expect-error TS6138: `session` is unread until the first method body lands
6
6
  constructor(e) {
@@ -1,8 +1,7 @@
1
- import { SessionHandle } from '@salesforce/sf-embedding-bridge';
2
- /** Thrown when a host-mediated SDK is requested but no session is available. */
3
- export declare class SfEmbeddingNotAvailableError extends Error {
4
- constructor(factoryName: string, cause?: Error);
5
- }
6
- /** Resolves to the shared session for host-mediated SDKs; rejects if no session is available. */
7
- export declare function requireSharedSession(factoryName: string): Promise<SessionHandle>;
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ export { SfEmbeddingNotAvailableError } from './session';
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui-embedding/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAC;AA+BvF,gFAAgF;AAChF,qBAAa,4BAA6B,SAAQ,KAAK;gBAC1C,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAc9C;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAoBhF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui-embedding/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC"}
@@ -1,48 +1,4 @@
1
- import { bootstrapSession as t } from "@salesforce/sf-embedding-bridge";
2
- import { b as i } from "../surface-Dd2tqrPi.js";
3
- let r;
4
- if (i()) {
5
- const n = t();
6
- r = { type: "bootstrapping", promise: n }, n.then(
7
- (e) => {
8
- r = { type: "ready", session: e };
9
- },
10
- (e) => {
11
- r = {
12
- type: "error",
13
- error: e instanceof Error ? e : new Error(String(e))
14
- };
15
- }
16
- );
17
- } else
18
- r = { type: "non-mfe-env" };
19
- class s extends Error {
20
- constructor(e, o) {
21
- super(
22
- `${e}: MicroFrontend surface requires an active ui-embedding session. Import "@salesforce/platform-sdk/ui-embedding" at app entry and run inside an ui-embedding iframe.` + (o ? ` Bootstrap failed with: ${o.message}` : "")
23
- ), this.name = "SfEmbeddingNotAvailableError", o && (this.cause = o);
24
- }
25
- }
26
- function m(n) {
27
- switch (r.type) {
28
- case "non-mfe-env":
29
- return Promise.reject(new s(n));
30
- case "error":
31
- return Promise.reject(
32
- new s(n, r.error)
33
- );
34
- case "bootstrapping":
35
- return r.promise.catch((e) => {
36
- throw new s(
37
- n,
38
- e instanceof Error ? e : new Error(String(e))
39
- );
40
- });
41
- case "ready":
42
- return Promise.resolve(r.session);
43
- }
44
- }
1
+ import { SfEmbeddingNotAvailableError as e } from "./session.js";
45
2
  export {
46
- s as SfEmbeddingNotAvailableError,
47
- m as requireSharedSession
3
+ e as SfEmbeddingNotAvailableError
48
4
  };
@@ -0,0 +1,8 @@
1
+ import { SessionHandle } from '@salesforce/sf-embedding-bridge';
2
+ /** Thrown when a host-mediated SDK is requested but no session is available. */
3
+ export declare class SfEmbeddingNotAvailableError extends Error {
4
+ constructor(factoryName: string, cause?: Error);
5
+ }
6
+ /** Resolves to the shared session for host-mediated SDKs; rejects if no session is available. */
7
+ export declare function requireSharedSession(factoryName: string): Promise<SessionHandle>;
8
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/ui-embedding/session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAC;AA+BvF,gFAAgF;AAChF,qBAAa,4BAA6B,SAAQ,KAAK;gBAC1C,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAc9C;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAoBhF"}
@@ -0,0 +1,48 @@
1
+ import { bootstrapSession as t } from "@salesforce/sf-embedding-bridge";
2
+ import { b as i } from "../surface-Dd2tqrPi.js";
3
+ let r;
4
+ if (i()) {
5
+ const n = t();
6
+ r = { type: "bootstrapping", promise: n }, n.then(
7
+ (e) => {
8
+ r = { type: "ready", session: e };
9
+ },
10
+ (e) => {
11
+ r = {
12
+ type: "error",
13
+ error: e instanceof Error ? e : new Error(String(e))
14
+ };
15
+ }
16
+ );
17
+ } else
18
+ r = { type: "non-mfe-env" };
19
+ class s extends Error {
20
+ constructor(e, o) {
21
+ super(
22
+ `${e}: MicroFrontend surface requires an active ui-embedding session. Import "@salesforce/platform-sdk/ui-embedding" at app entry and run inside an ui-embedding iframe.` + (o ? ` Bootstrap failed with: ${o.message}` : "")
23
+ ), this.name = "SfEmbeddingNotAvailableError", o && (this.cause = o);
24
+ }
25
+ }
26
+ function m(n) {
27
+ switch (r.type) {
28
+ case "non-mfe-env":
29
+ return Promise.reject(new s(n));
30
+ case "error":
31
+ return Promise.reject(
32
+ new s(n, r.error)
33
+ );
34
+ case "bootstrapping":
35
+ return r.promise.catch((e) => {
36
+ throw new s(
37
+ n,
38
+ e instanceof Error ? e : new Error(String(e))
39
+ );
40
+ });
41
+ case "ready":
42
+ return Promise.resolve(r.session);
43
+ }
44
+ }
45
+ export {
46
+ s as SfEmbeddingNotAvailableError,
47
+ m as requireSharedSession
48
+ };
@@ -1,6 +1,6 @@
1
1
  import { g as h, S as n, a as w } from "../surface-Dd2tqrPi.js";
2
2
  import { w as p } from "../sdk-promise-D0sy7OW1.js";
3
- import { requireSharedSession as m } from "../ui-embedding/index.js";
3
+ import { requireSharedSession as m } from "../ui-embedding/session.js";
4
4
  function f(i) {
5
5
  switch (i) {
6
6
  case "info":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/platform-sdk",
3
- "version": "11.45.5",
3
+ "version": "11.45.6",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -8,7 +8,9 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "sideEffects": [
10
10
  "./dist/ui-embedding/index.js",
11
- "./src/ui-embedding/index.ts"
11
+ "./dist/ui-embedding/session.js",
12
+ "./src/ui-embedding/index.ts",
13
+ "./src/ui-embedding/session.ts"
12
14
  ],
13
15
  "typesVersions": {
14
16
  "*": {
@@ -123,7 +125,7 @@
123
125
  "@conduit-client/service-pubsub": "3.19.6",
124
126
  "@conduit-client/service-retry": "3.19.6",
125
127
  "@conduit-client/utils": "3.19.6",
126
- "@salesforce/jsonrpc": "^11.45.5",
128
+ "@salesforce/jsonrpc": "^11.45.6",
127
129
  "@salesforce/sf-embedding-bridge": "2.2.5-rc.2"
128
130
  },
129
131
  "peerDependencies": {