@microsoft/managed-apps 0.5.10 → 0.5.12

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 +1 @@
1
- {"version":3,"file":"sdkChannel.d.ts","sourceRoot":"","sources":["../../src/internal/sdkChannel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,8CAA8C,CAAC;AAItD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAKhD"}
1
+ {"version":3,"file":"sdkChannel.d.ts","sourceRoot":"","sources":["../../src/internal/sdkChannel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,8CAA8C,CAAC;AAMtD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAKhD"}
@@ -2,6 +2,7 @@
2
2
  * Copyright (C) Microsoft Corporation. All rights reserved.
3
3
  */
4
4
  import { createChannelReceiver, MessagePortChannel, PortTransferType, transferPort, } from '@microsoft/managed-apps-common/communication';
5
+ import { APP_SDK_VERSION } from '../version';
5
6
  let sdkChannelPromise = null;
6
7
  /**
7
8
  * Get or create the App SDK's dedicated channel to the host.
@@ -25,8 +26,10 @@ async function initSdkChannel() {
25
26
  // Create a receiver for host → SDK actions (subscriptions, push updates)
26
27
  const sdkReceiver = createChannelReceiver();
27
28
  if (window.__platformBridge) {
28
- // Runtime: bridge script is injected, use it
29
- return window.__platformBridge.connect(sdkReceiver);
29
+ // Runtime: bridge script is injected, use it. Hand it our own package
30
+ // version so the handshake reports the SDK the app bundled rather than the
31
+ // bridge's managed-host deploy version (older bridges ignore the argument).
32
+ return window.__platformBridge.connect(sdkReceiver, { componentVersion: APP_SDK_VERSION });
30
33
  }
31
34
  // Authoring fallback: no bridge script, self-initialize via window.parent
32
35
  const { port1, port2 } = new MessageChannel();
@@ -34,7 +37,7 @@ async function initSdkChannel() {
34
37
  const channel = new MessagePortChannel(port1, {
35
38
  receiver: sdkReceiver,
36
39
  component: 'app-sdk',
37
- componentVersion: '0.1.0',
40
+ componentVersion: APP_SDK_VERSION,
38
41
  });
39
42
  await channel.connect();
40
43
  return channel;
@@ -1 +1 @@
1
- {"version":3,"file":"sdkChannel.js","sourceRoot":"","sources":["../../src/internal/sdkChannel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,GACb,MAAM,8CAA8C,CAAC;AAEtD,IAAI,iBAAiB,GAA4B,IAAI,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,iBAAiB,GAAG,cAAc,EAAE,CAAC;IACvC,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,KAAK,UAAU,cAAc;IAC3B,yEAAyE;IACzE,MAAM,WAAW,GAAG,qBAAqB,EAAE,CAAC;IAC5C,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC5B,6CAA6C;QAC7C,OAAO,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtD,CAAC;IAED,0EAA0E;IAC1E,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,cAAc,EAAE,CAAC;IAE9C,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAElE,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,KAAK,EAAE;QAC5C,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,OAAO;KAC1B,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IACxB,OAAO,OAAO,CA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ft Corporation. All rights reserved.
3
+ */
4
+ /**
5
+ * Version of the App SDK package (`@microsoft/managed-apps`), injected from
6
+ * `package.json` at build time. This is the version the *customer app* bundled,
7
+ * which is what makes it worth reporting: it is independent of the
8
+ * managed-host deploy version that stamps the gateway-served loader, SW, and
9
+ * bridge assets.
10
+ *
11
+ * Sent as the SDK channel's `componentVersion` on the handshake (see
12
+ * `internal/sdkChannel.ts`), so the host can surface it for diagnostics.
13
+ */
14
+ export declare const APP_SDK_VERSION: string;
15
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,MAA4B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ */
4
+ import packageJson from '../package.json' with { type: 'json' };
5
+ /**
6
+ * Version of the App SDK package (`@microsoft/managed-apps`), injected from
7
+ * `package.json` at build time. This is the version the *customer app* bundled,
8
+ * which is what makes it worth reporting: it is independent of the
9
+ * managed-host deploy version that stamps the gateway-served loader, SW, and
10
+ * bridge assets.
11
+ *
12
+ * Sent as the SDK channel's `componentVersion` on the handshake (see
13
+ * `internal/sdkChannel.ts`), so the host can surface it for diagnostics.
14
+ */
15
+ export const APP_SDK_VERSION = packageJson.version;
16
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAW,WAAW,CAAC,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/managed-apps",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "type": "module",
5
5
  "description": "Client SDK for Microsoft Managed Apps",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "clean": "bun ../../scripts/clean.ts dist .turbo tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo"
37
37
  },
38
38
  "dependencies": {
39
- "@microsoft/managed-apps-common": "0.18.1"
39
+ "@microsoft/managed-apps-common": "0.20.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@repo/repo-config": "0.0.0",