@wix/astro 2.0.0 → 2.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.
@@ -1,13 +1,16 @@
1
- CLI Building entry: src/index.ts
1
+ CLI Building entry: src/builders.ts, src/index.ts
2
2
  CLI Using tsconfig: tsconfig.json
3
3
  CLI tsup v8.5.0
4
4
  CLI Using tsup config: /home/runner/work/headless-integrations/headless-integrations/packages/astro/tsup.config.mjs
5
5
  CLI Target: node20.9
6
6
  CLI Cleaning output folder
7
7
  ESM Build start
8
- ESM build/index.js 2.28 KB
9
- ESM build/index.js.map 3.91 KB
10
- ESM ⚡️ Build success in 19ms
8
+ ESM build/builders.js 850.00 B
9
+ ESM build/index.js 1.06 KB
10
+ ESM build/builders.js.map 677.00 B
11
+ ESM build/index.js.map 1.66 KB
12
+ ESM ⚡️ Build success in 23ms
11
13
  DTS Build start
12
- DTS ⚡️ Build success in 2463ms
13
- DTS build/index.d.ts 251.00 B
14
+ DTS ⚡️ Build success in 4154ms
15
+ DTS build/builders.d.ts 378.00 B
16
+ DTS build/index.d.ts 251.00 B
package/CHANGELOG.md CHANGED
@@ -1,5 +1,72 @@
1
1
  # @wix/astro
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#121](https://github.com/wix-incubator/headless-integrations/pull/121) [`903244c`](https://github.com/wix-incubator/headless-integrations/commit/903244ce7aae605eedd187ceecedc2c65796817e) Thanks [@ronami](https://github.com/ronami)! - Release minor version of packages after recently failed releases
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`903244c`](https://github.com/wix-incubator/headless-integrations/commit/903244ce7aae605eedd187ceecedc2c65796817e), [`d5f3624`](https://github.com/wix-incubator/headless-integrations/commit/d5f36244bc5b424702825631df8e1a91b6cf3359)]:
12
+ - @wix/astro-auth@2.1.0
13
+ - @wix/astro-backend-extensions@2.1.0
14
+ - @wix/astro-backoffice-extensions@2.1.0
15
+ - @wix/astro-core@2.1.0
16
+ - @wix/astro-html-embeds@2.1.0
17
+ - @wix/astro-payment-links@2.1.0
18
+
19
+ ## 2.1.0
20
+
21
+ ### Minor Changes
22
+
23
+ - [#25](https://github.com/wix-incubator/headless-integrations/pull/25) [`4e0b6c2`](https://github.com/wix-incubator/headless-integrations/commit/4e0b6c23054bd2fb7230f437d59d45bb54b3bed0) Thanks [@ronami](https://github.com/ronami)! - Adjusts the way to define the Wix app manifest. Instead of the current convention of using a filesystem convention (e.g. `src/extensions/*/extension.json`), a single file is expected: `src/extensions.ts` (and it's optional).
24
+
25
+ The file let's developers define their app manifest programmatically:
26
+
27
+ ```ts
28
+ import { app, backofficePage, extension } from '@wix/astro/builders';
29
+
30
+ export default app()
31
+ .use(
32
+ backofficePage({
33
+ component: './extensions/my-page/page.tsx',
34
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
35
+ routePath: 'hello',
36
+ title: 'Trusted Index Page',
37
+ })
38
+ )
39
+ .use(
40
+ extension({
41
+ compData: {
42
+ webhook: {
43
+ callbackUrl: 'https://www.wix.com',
44
+ },
45
+ },
46
+ compId: 'f988e3bc-acaa-4aca-9cf8-2cd81cc39ee8',
47
+ compType: 'WEBHOOK',
48
+ })
49
+ );
50
+ ```
51
+
52
+ Some of the data is used to build each component correctly (and has a specific helper method to create it), along with a generic `extension()` method for purely-configuration extensions (or ones the developer built separately).
53
+
54
+ Note that this is a breaking change.
55
+
56
+ ### Patch Changes
57
+
58
+ - [#113](https://github.com/wix-incubator/headless-integrations/pull/113) [`920410e`](https://github.com/wix-incubator/headless-integrations/commit/920410eec124488a35601b8e7e99895c385e3e94) Thanks [@ronami](https://github.com/ronami)! - Stop bundling SDK related packages to avoid multiple copies of these dependencies.
59
+
60
+ - [#92](https://github.com/wix-incubator/headless-integrations/pull/92) [`2652759`](https://github.com/wix-incubator/headless-integrations/commit/2652759d29f0911d02b0f5b8be9a7d97a0208c65) Thanks [@ronami](https://github.com/ronami)! - Patch version bump to try and fix the release workflow
61
+
62
+ - [#26](https://github.com/wix-incubator/headless-integrations/pull/26) [`948a404`](https://github.com/wix-incubator/headless-integrations/commit/948a4041161ae35876e507d70efb03ae40f9a6cd) Thanks [@kfirstri](https://github.com/kfirstri)! - Added wix paylink support
63
+
64
+ - Updated dependencies [[`920410e`](https://github.com/wix-incubator/headless-integrations/commit/920410eec124488a35601b8e7e99895c385e3e94), [`2652759`](https://github.com/wix-incubator/headless-integrations/commit/2652759d29f0911d02b0f5b8be9a7d97a0208c65), [`4e0b6c2`](https://github.com/wix-incubator/headless-integrations/commit/4e0b6c23054bd2fb7230f437d59d45bb54b3bed0), [`83e191d`](https://github.com/wix-incubator/headless-integrations/commit/83e191d1d5e09dcf08ad82c2f8d973d2461add53)]:
65
+ - @wix/astro-payment-links@2.0.1
66
+ - @wix/astro-html-embeds@2.0.1
67
+ - @wix/astro-extensions@2.1.0
68
+ - @wix/astro-auth@2.0.1
69
+
3
70
  ## 2.0.0
4
71
 
5
72
  ### Major Changes
@@ -0,0 +1,3 @@
1
+ export { ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook } from '@wix/astro-backend-extensions';
2
+ export { backofficeExtensionMenuPlugin, backofficeExtensionWidget, backofficeModal, backofficePage } from '@wix/astro-backoffice-extensions';
3
+ export { app, genericExtension } from '@wix/astro-core';
@@ -0,0 +1,36 @@
1
+ import { createRequire as _createRequire } from 'node:module';
2
+ const require = _createRequire(import.meta.url);
3
+
4
+ // src/builders.ts
5
+ import {
6
+ ecomAdditionalFees,
7
+ ecomDiscountsTrigger,
8
+ ecomGiftCardsProvider,
9
+ ecomPaymentSettings,
10
+ ecomShippingRates,
11
+ ecomValidations,
12
+ webhook
13
+ } from "@wix/astro-backend-extensions";
14
+ import {
15
+ backofficeExtensionMenuPlugin,
16
+ backofficeExtensionWidget,
17
+ backofficeModal,
18
+ backofficePage
19
+ } from "@wix/astro-backoffice-extensions";
20
+ import { app, genericExtension } from "@wix/astro-core";
21
+ export {
22
+ app,
23
+ backofficeExtensionMenuPlugin,
24
+ backofficeExtensionWidget,
25
+ backofficeModal,
26
+ backofficePage,
27
+ ecomAdditionalFees,
28
+ ecomDiscountsTrigger,
29
+ ecomGiftCardsProvider,
30
+ ecomPaymentSettings,
31
+ ecomShippingRates,
32
+ ecomValidations,
33
+ genericExtension,
34
+ webhook
35
+ };
36
+ //# sourceMappingURL=builders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/builders.ts"],"sourcesContent":["export {\n ecomAdditionalFees,\n ecomDiscountsTrigger,\n ecomGiftCardsProvider,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n webhook,\n} from '@wix/astro-backend-extensions';\nexport {\n backofficeExtensionMenuPlugin,\n backofficeExtensionWidget,\n backofficeModal,\n backofficePage,\n} from '@wix/astro-backoffice-extensions';\nexport { app, genericExtension } from '@wix/astro-core';\n"],"mappings":";;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,KAAK,wBAAwB;","names":[]}
package/build/index.js CHANGED
@@ -2,79 +2,31 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
 
4
4
  // src/index.ts
5
- import manifest from "@wix/astro-app-manifest";
6
5
  import auth from "@wix/astro-auth";
7
- import extensions from "@wix/astro-extensions";
6
+ import backend from "@wix/astro-backend-extensions";
7
+ import backoffice from "@wix/astro-backoffice-extensions";
8
+ import core from "@wix/astro-core";
8
9
  import htmlEmbeds from "@wix/astro-html-embeds";
9
- import { envField, passthroughImageService } from "astro/config";
10
-
11
- // src/plugins/patchGlobal.ts
12
- var define = { global: "window" };
13
- function patchGlobal() {
14
- return [
15
- {
16
- apply: "serve",
17
- config: () => ({ optimizeDeps: { esbuildOptions: { define } } }),
18
- name: "fix-draft-js"
19
- },
20
- {
21
- apply: "build",
22
- config: () => ({ esbuild: { define } }),
23
- name: "fix-draft-js"
24
- }
25
- ];
26
- }
27
-
28
- // src/index.ts
10
+ import paymentLinks from "@wix/astro-payment-links";
29
11
  var createIntegration = ({
30
12
  enableAuthRoutes = true,
31
13
  enableHtmlEmbeds = true
32
14
  } = {}) => {
33
15
  return {
34
16
  hooks: {
35
- "astro:config:setup"({ updateConfig }) {
17
+ async "astro:config:setup"({ updateConfig }) {
36
18
  updateConfig({
37
- env: {
38
- schema: {
39
- WIX_CLIENT_ID: envField.string({
40
- access: "public",
41
- context: "client"
42
- }),
43
- WIX_CLIENT_INSTANCE_ID: envField.string({
44
- access: "secret",
45
- context: "server"
46
- }),
47
- WIX_CLIENT_PUBLIC_KEY: envField.string({
48
- access: "secret",
49
- context: "server"
50
- }),
51
- WIX_CLIENT_SECRET: envField.string({
52
- access: "secret",
53
- context: "server"
54
- })
55
- }
56
- },
57
- image: {
58
- domains: ["static.wixstatic.com"],
59
- service: passthroughImageService()
60
- },
61
19
  integrations: [
62
- auth({ enableAuthRoutes }),
63
- extensions(),
64
- manifest(),
65
- ...enableHtmlEmbeds ? [htmlEmbeds()] : []
66
- ],
67
- vite: {
68
- optimizeDeps: {
69
- include: [
70
- "@wix/dashboard/internal",
71
- "@wix/sdk-context",
72
- "@wix/sdk",
73
- "@wix/sdk/auth/site-session"
20
+ core({
21
+ integrations: [
22
+ auth({ enableAuthRoutes }),
23
+ backend(),
24
+ backoffice(),
25
+ ...enableHtmlEmbeds ? [htmlEmbeds()] : [],
26
+ paymentLinks()
74
27
  ]
75
- },
76
- plugins: [patchGlobal()]
77
- }
28
+ })
29
+ ]
78
30
  });
79
31
  }
80
32
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/plugins/patchGlobal.ts"],"sourcesContent":["import type { AstroIntegration } from 'astro';\nimport manifest from '@wix/astro-app-manifest';\nimport auth from '@wix/astro-auth';\nimport extensions from '@wix/astro-extensions';\nimport htmlEmbeds from '@wix/astro-html-embeds';\nimport { envField, passthroughImageService } from 'astro/config';\nimport { patchGlobal } from './plugins/patchGlobal.js';\n\nconst createIntegration = ({\n enableAuthRoutes = true,\n enableHtmlEmbeds = true,\n}: {\n enableAuthRoutes?: boolean;\n enableHtmlEmbeds?: boolean;\n} = {}): AstroIntegration => {\n return {\n hooks: {\n 'astro:config:setup'({ updateConfig }) {\n updateConfig({\n env: {\n schema: {\n WIX_CLIENT_ID: envField.string({\n access: 'public',\n context: 'client',\n }),\n WIX_CLIENT_INSTANCE_ID: envField.string({\n access: 'secret',\n context: 'server',\n }),\n WIX_CLIENT_PUBLIC_KEY: envField.string({\n access: 'secret',\n context: 'server',\n }),\n WIX_CLIENT_SECRET: envField.string({\n access: 'secret',\n context: 'server',\n }),\n },\n },\n image: {\n domains: ['static.wixstatic.com'],\n service: passthroughImageService(),\n },\n integrations: [\n auth({ enableAuthRoutes }),\n extensions(),\n manifest(),\n ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),\n ],\n vite: {\n optimizeDeps: {\n include: [\n '@wix/dashboard/internal',\n '@wix/sdk-context',\n '@wix/sdk',\n '@wix/sdk/auth/site-session',\n ],\n },\n plugins: [patchGlobal()],\n },\n });\n },\n },\n name: '@wix/astro',\n };\n};\n\nexport default createIntegration;\n","import type { PluginOption } from 'vite';\n\n// - https://github.com/facebookarchive/draft-js/issues/2127\n// - https://github.com/facebook/fbjs/issues/290\nconst define = { global: 'window' } as const;\n\nexport function patchGlobal(): PluginOption {\n return [\n {\n apply: 'serve',\n config: () => ({ optimizeDeps: { esbuildOptions: { define } } }),\n name: 'fix-draft-js',\n },\n {\n apply: 'build',\n config: () => ({ esbuild: { define } }),\n name: 'fix-draft-js',\n },\n ];\n}\n"],"mappings":";;;;AACA,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,UAAU,+BAA+B;;;ACDlD,IAAM,SAAS,EAAE,QAAQ,SAAS;AAE3B,SAAS,cAA4B;AAC1C,SAAO;AAAA,IACL;AAAA,MACE,OAAO;AAAA,MACP,QAAQ,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAAE;AAAA,MAC9D,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,QAAQ,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE;AAAA,MACrC,MAAM;AAAA,IACR;AAAA,EACF;AACF;;;ADXA,IAAM,oBAAoB,CAAC;AAAA,EACzB,mBAAmB;AAAA,EACnB,mBAAmB;AACrB,IAGI,CAAC,MAAwB;AAC3B,SAAO;AAAA,IACL,OAAO;AAAA,MACL,qBAAqB,EAAE,aAAa,GAAG;AACrC,qBAAa;AAAA,UACX,KAAK;AAAA,YACH,QAAQ;AAAA,cACN,eAAe,SAAS,OAAO;AAAA,gBAC7B,QAAQ;AAAA,gBACR,SAAS;AAAA,cACX,CAAC;AAAA,cACD,wBAAwB,SAAS,OAAO;AAAA,gBACtC,QAAQ;AAAA,gBACR,SAAS;AAAA,cACX,CAAC;AAAA,cACD,uBAAuB,SAAS,OAAO;AAAA,gBACrC,QAAQ;AAAA,gBACR,SAAS;AAAA,cACX,CAAC;AAAA,cACD,mBAAmB,SAAS,OAAO;AAAA,gBACjC,QAAQ;AAAA,gBACR,SAAS;AAAA,cACX,CAAC;AAAA,YACH;AAAA,UACF;AAAA,UACA,OAAO;AAAA,YACL,SAAS,CAAC,sBAAsB;AAAA,YAChC,SAAS,wBAAwB;AAAA,UACnC;AAAA,UACA,cAAc;AAAA,YACZ,KAAK,EAAE,iBAAiB,CAAC;AAAA,YACzB,WAAW;AAAA,YACX,SAAS;AAAA,YACT,GAAI,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC;AAAA,UAC3C;AAAA,UACA,MAAM;AAAA,YACJ,cAAc;AAAA,cACZ,SAAS;AAAA,gBACP;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cACF;AAAA,YACF;AAAA,YACA,SAAS,CAAC,YAAY,CAAC;AAAA,UACzB;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,MAAM;AAAA,EACR;AACF;AAEA,IAAO,gBAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { AstroIntegration } from 'astro';\nimport auth from '@wix/astro-auth';\nimport backend from '@wix/astro-backend-extensions';\nimport backoffice from '@wix/astro-backoffice-extensions';\nimport core from '@wix/astro-core';\nimport htmlEmbeds from '@wix/astro-html-embeds';\nimport paymentLinks from '@wix/astro-payment-links';\n\nconst createIntegration = ({\n enableAuthRoutes = true,\n enableHtmlEmbeds = true,\n}: {\n enableAuthRoutes?: boolean;\n enableHtmlEmbeds?: boolean;\n} = {}): AstroIntegration => {\n return {\n hooks: {\n async 'astro:config:setup'({ updateConfig }) {\n updateConfig({\n integrations: [\n core({\n integrations: [\n auth({ enableAuthRoutes }),\n backend(),\n backoffice(),\n ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),\n paymentLinks(),\n ],\n }),\n ],\n });\n },\n },\n name: '@wix/astro',\n };\n};\n\nexport default createIntegration;\n"],"mappings":";;;;AACA,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AAEzB,IAAM,oBAAoB,CAAC;AAAA,EACzB,mBAAmB;AAAA,EACnB,mBAAmB;AACrB,IAGI,CAAC,MAAwB;AAC3B,SAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM,qBAAqB,EAAE,aAAa,GAAG;AAC3C,qBAAa;AAAA,UACX,cAAc;AAAA,YACZ,KAAK;AAAA,cACH,cAAc;AAAA,gBACZ,KAAK,EAAE,iBAAiB,CAAC;AAAA,gBACzB,QAAQ;AAAA,gBACR,WAAW;AAAA,gBACX,GAAI,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC;AAAA,gBACzC,aAAa;AAAA,cACf;AAAA,YACF,CAAC;AAAA,UACH;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,MAAM;AAAA,EACR;AACF;AAEA,IAAO,gBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "@wix/astro",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "dependencies": {
5
- "@wix/astro-app-manifest": "workspace:*",
6
- "@wix/astro-auth": "workspace:*",
7
- "@wix/astro-extensions": "workspace:*",
8
- "@wix/astro-html-embeds": "workspace:*"
5
+ "@wix/astro-auth": "^2.1.0",
6
+ "@wix/astro-backend-extensions": "^2.1.0",
7
+ "@wix/astro-backoffice-extensions": "^2.1.0",
8
+ "@wix/astro-core": "^2.1.0",
9
+ "@wix/astro-html-embeds": "^2.1.0",
10
+ "@wix/astro-payment-links": "^2.1.0"
9
11
  },
10
12
  "devDependencies": {
11
- "@wix/sdk": "^1.15.23",
12
13
  "astro": "^5.10.1",
13
14
  "is-ci": "^4.1.0",
14
15
  "outdent": "^0.8.0",
15
- "tsup": "^8.5.0",
16
- "vite": "^6.0.0"
16
+ "tsup": "^8.5.0"
17
17
  },
18
18
  "exports": {
19
- ".": "./build/index.js"
19
+ ".": "./build/index.js",
20
+ "./builders": "./build/builders.js",
21
+ "./package.json": "./package.json"
20
22
  },
21
23
  "peerDependencies": {
22
- "@wix/sdk": "^1.15.23",
23
24
  "astro": "^5.0.0"
24
25
  },
25
26
  "publishConfig": {
@@ -29,8 +30,7 @@
29
30
  },
30
31
  "scripts": {
31
32
  "build": "tsup",
32
- "test": ":",
33
- "typecheck": "run -T tsc --noEmit"
33
+ "typecheck": "tsc --noEmit"
34
34
  },
35
35
  "sideEffects": false,
36
36
  "type": "module"
@@ -0,0 +1,16 @@
1
+ export {
2
+ ecomAdditionalFees,
3
+ ecomDiscountsTrigger,
4
+ ecomGiftCardsProvider,
5
+ ecomPaymentSettings,
6
+ ecomShippingRates,
7
+ ecomValidations,
8
+ webhook,
9
+ } from '@wix/astro-backend-extensions';
10
+ export {
11
+ backofficeExtensionMenuPlugin,
12
+ backofficeExtensionWidget,
13
+ backofficeModal,
14
+ backofficePage,
15
+ } from '@wix/astro-backoffice-extensions';
16
+ export { app, genericExtension } from '@wix/astro-core';
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { AstroIntegration } from 'astro';
2
- import manifest from '@wix/astro-app-manifest';
3
2
  import auth from '@wix/astro-auth';
4
- import extensions from '@wix/astro-extensions';
3
+ import backend from '@wix/astro-backend-extensions';
4
+ import backoffice from '@wix/astro-backoffice-extensions';
5
+ import core from '@wix/astro-core';
5
6
  import htmlEmbeds from '@wix/astro-html-embeds';
6
- import { envField, passthroughImageService } from 'astro/config';
7
- import { patchGlobal } from './plugins/patchGlobal.js';
7
+ import paymentLinks from '@wix/astro-payment-links';
8
8
 
9
9
  const createIntegration = ({
10
10
  enableAuthRoutes = true,
@@ -15,49 +15,19 @@ const createIntegration = ({
15
15
  } = {}): AstroIntegration => {
16
16
  return {
17
17
  hooks: {
18
- 'astro:config:setup'({ updateConfig }) {
18
+ async 'astro:config:setup'({ updateConfig }) {
19
19
  updateConfig({
20
- env: {
21
- schema: {
22
- WIX_CLIENT_ID: envField.string({
23
- access: 'public',
24
- context: 'client',
25
- }),
26
- WIX_CLIENT_INSTANCE_ID: envField.string({
27
- access: 'secret',
28
- context: 'server',
29
- }),
30
- WIX_CLIENT_PUBLIC_KEY: envField.string({
31
- access: 'secret',
32
- context: 'server',
33
- }),
34
- WIX_CLIENT_SECRET: envField.string({
35
- access: 'secret',
36
- context: 'server',
37
- }),
38
- },
39
- },
40
- image: {
41
- domains: ['static.wixstatic.com'],
42
- service: passthroughImageService(),
43
- },
44
20
  integrations: [
45
- auth({ enableAuthRoutes }),
46
- extensions(),
47
- manifest(),
48
- ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),
49
- ],
50
- vite: {
51
- optimizeDeps: {
52
- include: [
53
- '@wix/dashboard/internal',
54
- '@wix/sdk-context',
55
- '@wix/sdk',
56
- '@wix/sdk/auth/site-session',
21
+ core({
22
+ integrations: [
23
+ auth({ enableAuthRoutes }),
24
+ backend(),
25
+ backoffice(),
26
+ ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),
27
+ paymentLinks(),
57
28
  ],
58
- },
59
- plugins: [patchGlobal()],
60
- },
29
+ }),
30
+ ],
61
31
  });
62
32
  },
63
33
  },
package/tsconfig.json CHANGED
@@ -2,8 +2,6 @@
2
2
  "extends": "../../tsconfig.base.json",
3
3
  "include": ["src"],
4
4
  "compilerOptions": {
5
- "outDir": "build",
6
- "declaration": true,
7
- "lib": ["dom", "ES2021"]
5
+ "outDir": "build"
8
6
  }
9
7
  }
package/tsup.config.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-check
1
2
  import isCI from 'is-ci';
2
3
  import { outdent } from 'outdent';
3
4
  import { defineConfig } from 'tsup';
@@ -12,7 +13,7 @@ export default defineConfig([
12
13
  dts: {
13
14
  resolve: [...astroExternals, ...viteExternals],
14
15
  },
15
- entry: ['src/index.ts'],
16
+ entry: ['src/index.ts', 'src/builders.ts'],
16
17
  external: [...astroExternals, ...viteExternals],
17
18
  format: ['esm'],
18
19
  outDir: 'build',
@@ -1,20 +0,0 @@
1
- import type { PluginOption } from 'vite';
2
-
3
- // - https://github.com/facebookarchive/draft-js/issues/2127
4
- // - https://github.com/facebook/fbjs/issues/290
5
- const define = { global: 'window' } as const;
6
-
7
- export function patchGlobal(): PluginOption {
8
- return [
9
- {
10
- apply: 'serve',
11
- config: () => ({ optimizeDeps: { esbuildOptions: { define } } }),
12
- name: 'fix-draft-js',
13
- },
14
- {
15
- apply: 'build',
16
- config: () => ({ esbuild: { define } }),
17
- name: 'fix-draft-js',
18
- },
19
- ];
20
- }