@wix/astro 2.12.0 → 2.13.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @wix/astro
2
2
 
3
+ ## 2.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#447](https://github.com/wix-incubator/headless-integrations/pull/447) [`8d06bb6`](https://github.com/wix-incubator/headless-integrations/commit/8d06bb6a5cfce7bde87eb90bfa89afc5f3db2cae) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Automatically include all frontend modules in custom elements and embedded scripts.
8
+
9
+ ## 2.13.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#439](https://github.com/wix-incubator/headless-integrations/pull/439) [`4daf766`](https://github.com/wix-incubator/headless-integrations/commit/4daf766b905c006ba67236b63f9bea30d8553bc8) Thanks [@mastertheblaster](https://github.com/mastertheblaster)! - Rename dashboardWidget builder to dashboardPlugin.
14
+
15
+ ### Patch Changes
16
+
17
+ - [#411](https://github.com/wix-incubator/headless-integrations/pull/411) [`5ef5acf`](https://github.com/wix-incubator/headless-integrations/commit/5ef5acfa01f42888d00db586cbb2ad3d92255869) Thanks [@fantua](https://github.com/fantua)! - Added server bundles support for Site Components extensions
18
+
3
19
  ## 2.12.0
4
20
 
5
21
  ### Minor Changes
@@ -82,8 +82,8 @@ var elevatedContextualClient = createClient2({
82
82
  });
83
83
 
84
84
  // src/runtime/backend/setupContextualClient.ts
85
- contextualClient.enableContext("global");
86
- elevatedContextualClient.enableContext("global", { elevated: true });
85
+ contextualClient.enableContext("module");
86
+ elevatedContextualClient.enableContext("module", { elevated: true });
87
87
 
88
88
  export {
89
89
  authAsyncLocalStorage
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-HPW4ZAEJ.js";
4
4
  import {
5
5
  authAsyncLocalStorage
6
- } from "../chunk-RTCWF7UX.js";
6
+ } from "../chunk-IUZYED2S.js";
7
7
  import "../chunk-MLKGABMK.js";
8
8
 
9
9
  // src/middleware/auth.ts
@@ -1,2 +1,2 @@
1
- import "../../chunk-RTCWF7UX.js";
1
+ import "../../chunk-IUZYED2S.js";
2
2
  import "../../chunk-MLKGABMK.js";
@@ -1,5 +1,6 @@
1
1
  // src/runtime/utils.ts
2
2
  import { AppStrategy, createClient } from "@wix/sdk";
3
+ import { wixContext } from "@wix/sdk-context";
3
4
  import { WIX_CLIENT_ID } from "astro:env/client";
4
5
  import { WIX_CLIENT_PUBLIC_KEY, WIX_CLIENT_SECRET } from "astro:env/server";
5
6
  async function setupClient(fn) {
@@ -10,11 +11,11 @@ async function setupClient(fn) {
10
11
  publicKey: WIX_CLIENT_PUBLIC_KEY
11
12
  })
12
13
  });
13
- const olderClient = globalThis.__wix_context__?.client;
14
- client.enableContext("global");
14
+ const olderClient = wixContext.client;
15
+ client.enableContext("module");
15
16
  await fn();
16
17
  if (olderClient) {
17
- olderClient.enableContext("global");
18
+ olderClient.enableContext("module");
18
19
  }
19
20
  return client;
20
21
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  setupClient
3
- } from "../chunk-RHCMPH4V.js";
3
+ } from "../chunk-F7JXR3EK.js";
4
4
 
5
5
  // src/runtime/setupServicePlugin.ts
6
6
  async function setupServicePlugin(fn) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  setupClient
3
- } from "../chunk-RHCMPH4V.js";
3
+ } from "../chunk-F7JXR3EK.js";
4
4
 
5
5
  // src/runtime/setupWebhook.ts
6
6
  async function setupWebhook(fn) {
@@ -81,7 +81,6 @@ interface Webhook {
81
81
  }
82
82
  interface Options {
83
83
  id: string;
84
- slug: string;
85
84
  source: string;
86
85
  }
87
86
  declare function webhook(options: Options): Webhook;
@@ -134,7 +134,6 @@ interface Webhook {
134
134
  }
135
135
  interface Options$7 {
136
136
  id: string;
137
- slug: string;
138
137
  source: string;
139
138
  }
140
139
  declare function webhook(options: Options$7): Webhook;
@@ -304,7 +303,7 @@ declare const extensions: {
304
303
  dashboardMenuPlugin: typeof backofficeExtensionMenuPlugin;
305
304
  dashboardModal: typeof backofficeModal;
306
305
  dashboardPage: typeof backofficePage;
307
- dashboardWidget: typeof backofficeExtensionWidget;
306
+ dashboardPlugin: typeof backofficeExtensionWidget;
308
307
  ecomAdditionalFees: typeof ecomAdditionalFees;
309
308
  ecomDiscountTriggers: typeof ecomDiscountTriggers;
310
309
  ecomGiftCards: typeof ecomGiftCards;
@@ -20,7 +20,7 @@ import {
20
20
  siteComponentPanel,
21
21
  sitePlugin,
22
22
  webhook
23
- } from "./chunk-UBCQK5ZU.js";
23
+ } from "./chunk-XH4FRXRS.js";
24
24
 
25
25
  // src/builders.ts
26
26
  init_esm_shims();
@@ -29,7 +29,7 @@ var extensions = {
29
29
  dashboardMenuPlugin: backofficeExtensionMenuPlugin,
30
30
  dashboardModal: backofficeModal,
31
31
  dashboardPage: backofficePage,
32
- dashboardWidget: backofficeExtensionWidget,
32
+ dashboardPlugin: backofficeExtensionWidget,
33
33
  ecomAdditionalFees,
34
34
  ecomDiscountTriggers,
35
35
  ecomGiftCards,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/builders.ts"],"sourcesContent":["import {\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n webhook as event,\n} from '@wix/astro-backend-extensions';\nimport {\n backofficeExtensionMenuPlugin as dashboardMenuPlugin,\n backofficeModal as dashboardModal,\n backofficePage as dashboardPage,\n backofficeExtensionWidget as dashboardWidget,\n} from '@wix/astro-backoffice-extensions';\nimport { genericExtension } from '@wix/astro-core';\nimport { customElement } from '@wix/astro-custom-elements-extensions';\nimport { embeddedScript } from '@wix/astro-embedded-scripts-extensions';\nimport { siteComponentPanel } from '@wix/astro-site-component-panels-extensions';\nimport { siteComponent } from '@wix/astro-site-components-extensions';\nimport { sitePlugin } from '@wix/astro-site-plugins-extensions';\n\nexport { app } from '@wix/astro-core';\nexport const extensions = {\n customElement,\n dashboardMenuPlugin,\n dashboardModal,\n dashboardPage,\n dashboardWidget,\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n embeddedScript,\n event,\n genericExtension,\n siteComponent,\n siteComponentPanel,\n sitePlugin,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAuBO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/builders.ts"],"sourcesContent":["import {\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n webhook as event,\n} from '@wix/astro-backend-extensions';\nimport {\n backofficeExtensionMenuPlugin as dashboardMenuPlugin,\n backofficeModal as dashboardModal,\n backofficePage as dashboardPage,\n backofficeExtensionWidget as dashboardPlugin,\n} from '@wix/astro-backoffice-extensions';\nimport { genericExtension } from '@wix/astro-core';\nimport { customElement } from '@wix/astro-custom-elements-extensions';\nimport { embeddedScript } from '@wix/astro-embedded-scripts-extensions';\nimport { siteComponentPanel } from '@wix/astro-site-component-panels-extensions';\nimport { siteComponent } from '@wix/astro-site-components-extensions';\nimport { sitePlugin } from '@wix/astro-site-plugins-extensions';\n\nexport { app } from '@wix/astro-core';\nexport const extensions = {\n customElement,\n dashboardMenuPlugin,\n dashboardModal,\n dashboardPage,\n dashboardPlugin,\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n embeddedScript,\n event,\n genericExtension,\n siteComponent,\n siteComponentPanel,\n sitePlugin,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAuBO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}