@wix/astro 2.2.0 → 2.3.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.
- package/build/builders.d.ts +2 -0
- package/build/builders.js +4 -0
- package/build/builders.js.map +1 -1
- package/build/index.d.ts +12 -4
- package/build/index.js +19 -7
- package/build/index.js.map +1 -1
- package/package.json +10 -4
- package/.turbo/turbo-build.log +0 -16
- package/CHANGELOG.md +0 -82
- package/src/builders.ts +0 -16
- package/src/index.ts +0 -38
- package/tsconfig.json +0 -7
- package/tsup.config.mjs +0 -36
package/build/builders.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook } from '@wix/astro-backend-extensions';
|
|
2
2
|
export { backofficeExtensionMenuPlugin, backofficeExtensionWidget, backofficeModal, backofficePage } from '@wix/astro-backoffice-extensions';
|
|
3
3
|
export { app, genericExtension } from '@wix/astro-core';
|
|
4
|
+
export { customElement } from '@wix/astro-custom-elements-extensions';
|
|
5
|
+
export { embeddedScript } from '@wix/astro-embedded-scripts-extensions';
|
package/build/builders.js
CHANGED
|
@@ -18,18 +18,22 @@ import {
|
|
|
18
18
|
backofficePage
|
|
19
19
|
} from "@wix/astro-backoffice-extensions";
|
|
20
20
|
import { app, genericExtension } from "@wix/astro-core";
|
|
21
|
+
import { customElement } from "@wix/astro-custom-elements-extensions";
|
|
22
|
+
import { embeddedScript } from "@wix/astro-embedded-scripts-extensions";
|
|
21
23
|
export {
|
|
22
24
|
app,
|
|
23
25
|
backofficeExtensionMenuPlugin,
|
|
24
26
|
backofficeExtensionWidget,
|
|
25
27
|
backofficeModal,
|
|
26
28
|
backofficePage,
|
|
29
|
+
customElement,
|
|
27
30
|
ecomAdditionalFees,
|
|
28
31
|
ecomDiscountsTrigger,
|
|
29
32
|
ecomGiftCardsProvider,
|
|
30
33
|
ecomPaymentSettings,
|
|
31
34
|
ecomShippingRates,
|
|
32
35
|
ecomValidations,
|
|
36
|
+
embeddedScript,
|
|
33
37
|
genericExtension,
|
|
34
38
|
webhook
|
|
35
39
|
};
|
package/build/builders.js.map
CHANGED
|
@@ -1 +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":[]}
|
|
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';\nexport { customElement } from '@wix/astro-custom-elements-extensions';\nexport { embeddedScript } from '@wix/astro-embedded-scripts-extensions';\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;AACtC,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;","names":[]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { AstroIntegration } from 'astro';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
interface WixAstroConfig {
|
|
4
|
+
auth?: boolean | {
|
|
5
|
+
enable?: boolean;
|
|
6
|
+
};
|
|
7
|
+
htmlEmbeds?: boolean | {
|
|
8
|
+
enable?: boolean;
|
|
9
|
+
};
|
|
10
|
+
robots?: boolean | {
|
|
11
|
+
enable?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const createIntegration: (config?: WixAstroConfig) => AstroIntegration;
|
|
7
15
|
|
|
8
16
|
export { createIntegration as default };
|
package/build/index.js
CHANGED
|
@@ -6,13 +6,23 @@ import auth from "@wix/astro-auth";
|
|
|
6
6
|
import backend from "@wix/astro-backend-extensions";
|
|
7
7
|
import backoffice from "@wix/astro-backoffice-extensions";
|
|
8
8
|
import core from "@wix/astro-core";
|
|
9
|
+
import customElements from "@wix/astro-custom-elements-extensions";
|
|
10
|
+
import embeddedScripts from "@wix/astro-embedded-scripts-extensions";
|
|
9
11
|
import htmlEmbeds from "@wix/astro-html-embeds";
|
|
10
12
|
import paymentLinks from "@wix/astro-payment-links";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import robots from "@wix/astro-robots";
|
|
14
|
+
function isEnabled(value) {
|
|
15
|
+
if (typeof value === "boolean") {
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
return value?.enable ?? true;
|
|
19
|
+
}
|
|
20
|
+
var createIntegration = (config) => {
|
|
21
|
+
const enableAuthRoutes = isEnabled(config?.auth);
|
|
22
|
+
const enableHtmlEmbeds = isEnabled(config?.htmlEmbeds);
|
|
23
|
+
const enableRobots = isEnabled(config?.robots);
|
|
15
24
|
return {
|
|
25
|
+
name: "@wix/astro",
|
|
16
26
|
hooks: {
|
|
17
27
|
async "astro:config:setup"({ updateConfig }) {
|
|
18
28
|
updateConfig({
|
|
@@ -22,15 +32,17 @@ var createIntegration = ({
|
|
|
22
32
|
auth({ enableAuthRoutes }),
|
|
23
33
|
backend(),
|
|
24
34
|
backoffice(),
|
|
35
|
+
customElements(),
|
|
25
36
|
...enableHtmlEmbeds ? [htmlEmbeds()] : [],
|
|
26
|
-
paymentLinks()
|
|
37
|
+
paymentLinks(),
|
|
38
|
+
embeddedScripts(),
|
|
39
|
+
...enableRobots ? [robots()] : []
|
|
27
40
|
]
|
|
28
41
|
})
|
|
29
42
|
]
|
|
30
43
|
});
|
|
31
44
|
}
|
|
32
|
-
}
|
|
33
|
-
name: "@wix/astro"
|
|
45
|
+
}
|
|
34
46
|
};
|
|
35
47
|
};
|
|
36
48
|
var index_default = createIntegration;
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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\
|
|
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 customElements from '@wix/astro-custom-elements-extensions';\nimport embeddedScripts from '@wix/astro-embedded-scripts-extensions';\nimport htmlEmbeds from '@wix/astro-html-embeds';\nimport paymentLinks from '@wix/astro-payment-links';\nimport robots from '@wix/astro-robots';\n\ninterface WixAstroConfig {\n auth?: boolean | { enable?: boolean };\n htmlEmbeds?: boolean | { enable?: boolean };\n robots?: boolean | { enable?: boolean };\n}\n\nfunction isEnabled(value?: boolean | { enable?: boolean }): boolean {\n if (typeof value === 'boolean') {\n return value;\n }\n return value?.enable ?? true;\n}\n\nconst createIntegration = (config?: WixAstroConfig): AstroIntegration => {\n const enableAuthRoutes = isEnabled(config?.auth);\n const enableHtmlEmbeds = isEnabled(config?.htmlEmbeds);\n const enableRobots = isEnabled(config?.robots);\n\n return {\n name: '@wix/astro',\n hooks: {\n async 'astro:config:setup'({ updateConfig }) {\n updateConfig({\n integrations: [\n core({\n integrations: [\n auth({ enableAuthRoutes }),\n backend(),\n backoffice(),\n customElements(),\n ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),\n paymentLinks(),\n embeddedScripts(),\n ...(enableRobots ? [robots()] : []),\n ],\n }),\n ],\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n"],"mappings":";;;;AACA,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AACjB,OAAO,oBAAoB;AAC3B,OAAO,qBAAqB;AAC5B,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AACzB,OAAO,YAAY;AAQnB,SAAS,UAAU,OAAiD;AAClE,MAAI,OAAO,UAAU,WAAW;AAC9B,WAAO;AAAA,EACT;AACA,SAAO,OAAO,UAAU;AAC1B;AAEA,IAAM,oBAAoB,CAAC,WAA8C;AACvE,QAAM,mBAAmB,UAAU,QAAQ,IAAI;AAC/C,QAAM,mBAAmB,UAAU,QAAQ,UAAU;AACrD,QAAM,eAAe,UAAU,QAAQ,MAAM;AAE7C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,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,eAAe;AAAA,gBACf,GAAI,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC;AAAA,gBACzC,aAAa;AAAA,gBACb,gBAAgB;AAAA,gBAChB,GAAI,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;AAAA,cACnC;AAAA,YACF,CAAC;AAAA,UACH;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/astro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@wix/astro-auth": "^2.
|
|
5
|
+
"@wix/astro-auth": "^2.2.0",
|
|
6
6
|
"@wix/astro-backend-extensions": "^2.1.0",
|
|
7
7
|
"@wix/astro-backoffice-extensions": "^2.1.0",
|
|
8
|
-
"@wix/astro-core": "^2.
|
|
8
|
+
"@wix/astro-core": "^2.2.0",
|
|
9
|
+
"@wix/astro-custom-elements-extensions": "^2.1.0",
|
|
10
|
+
"@wix/astro-embedded-scripts-extensions": "^2.1.0",
|
|
9
11
|
"@wix/astro-html-embeds": "^2.1.0",
|
|
10
|
-
"@wix/astro-payment-links": "^2.
|
|
12
|
+
"@wix/astro-payment-links": "^2.2.0",
|
|
13
|
+
"@wix/astro-robots": "^2.1.0"
|
|
11
14
|
},
|
|
12
15
|
"devDependencies": {
|
|
13
16
|
"astro": "^5.10.1",
|
|
@@ -20,6 +23,9 @@
|
|
|
20
23
|
"./builders": "./build/builders.js",
|
|
21
24
|
"./package.json": "./package.json"
|
|
22
25
|
},
|
|
26
|
+
"files": [
|
|
27
|
+
"build"
|
|
28
|
+
],
|
|
23
29
|
"peerDependencies": {
|
|
24
30
|
"astro": "^5.0.0"
|
|
25
31
|
},
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[34mCLI[39m Building entry: src/builders.ts, src/index.ts
|
|
2
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
3
|
-
[34mCLI[39m tsup v8.5.0
|
|
4
|
-
[34mCLI[39m Using tsup config: /home/runner/work/headless-integrations/headless-integrations/packages/astro/tsup.config.mjs
|
|
5
|
-
[34mCLI[39m Target: node20.9
|
|
6
|
-
[34mCLI[39m Cleaning output folder
|
|
7
|
-
[34mESM[39m Build start
|
|
8
|
-
[32mESM[39m [1mbuild/builders.js [22m[32m850.00 B[39m
|
|
9
|
-
[32mESM[39m [1mbuild/index.js [22m[32m1.06 KB[39m
|
|
10
|
-
[32mESM[39m [1mbuild/builders.js.map [22m[32m677.00 B[39m
|
|
11
|
-
[32mESM[39m [1mbuild/index.js.map [22m[32m1.66 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in 23ms
|
|
13
|
-
[34mDTS[39m Build start
|
|
14
|
-
[32mDTS[39m ⚡️ Build success in 4154ms
|
|
15
|
-
[32mDTS[39m [1mbuild/builders.d.ts [22m[32m378.00 B[39m
|
|
16
|
-
[32mDTS[39m [1mbuild/index.d.ts [22m[32m251.00 B[39m
|
package/CHANGELOG.md
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# @wix/astro
|
|
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
|
-
|
|
70
|
-
## 2.0.0
|
|
71
|
-
|
|
72
|
-
### Major Changes
|
|
73
|
-
|
|
74
|
-
- [#23](https://github.com/wix-incubator/headless-integrations/pull/23) [`1a3450f`](https://github.com/wix-incubator/headless-integrations/commit/1a3450fe28cccf67de37e476710d1df90ed62fed) Thanks [@ronami](https://github.com/ronami)! - add initial support for releasing via `changesets`
|
|
75
|
-
|
|
76
|
-
### Patch Changes
|
|
77
|
-
|
|
78
|
-
- Updated dependencies [[`1a3450f`](https://github.com/wix-incubator/headless-integrations/commit/1a3450fe28cccf67de37e476710d1df90ed62fed), [`4a957b4`](https://github.com/wix-incubator/headless-integrations/commit/4a957b452e595727aae622af478528581dda8a5c)]:
|
|
79
|
-
- @wix/astro-app-manifest@2.0.0
|
|
80
|
-
- @wix/astro-auth@2.0.0
|
|
81
|
-
- @wix/astro-extensions@2.0.0
|
|
82
|
-
- @wix/astro-html-embeds@2.0.0
|
package/src/builders.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { AstroIntegration } from 'astro';
|
|
2
|
-
import auth from '@wix/astro-auth';
|
|
3
|
-
import backend from '@wix/astro-backend-extensions';
|
|
4
|
-
import backoffice from '@wix/astro-backoffice-extensions';
|
|
5
|
-
import core from '@wix/astro-core';
|
|
6
|
-
import htmlEmbeds from '@wix/astro-html-embeds';
|
|
7
|
-
import paymentLinks from '@wix/astro-payment-links';
|
|
8
|
-
|
|
9
|
-
const createIntegration = ({
|
|
10
|
-
enableAuthRoutes = true,
|
|
11
|
-
enableHtmlEmbeds = true,
|
|
12
|
-
}: {
|
|
13
|
-
enableAuthRoutes?: boolean;
|
|
14
|
-
enableHtmlEmbeds?: boolean;
|
|
15
|
-
} = {}): AstroIntegration => {
|
|
16
|
-
return {
|
|
17
|
-
hooks: {
|
|
18
|
-
async 'astro:config:setup'({ updateConfig }) {
|
|
19
|
-
updateConfig({
|
|
20
|
-
integrations: [
|
|
21
|
-
core({
|
|
22
|
-
integrations: [
|
|
23
|
-
auth({ enableAuthRoutes }),
|
|
24
|
-
backend(),
|
|
25
|
-
backoffice(),
|
|
26
|
-
...(enableHtmlEmbeds ? [htmlEmbeds()] : []),
|
|
27
|
-
paymentLinks(),
|
|
28
|
-
],
|
|
29
|
-
}),
|
|
30
|
-
],
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
name: '@wix/astro',
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default createIntegration;
|
package/tsconfig.json
DELETED
package/tsup.config.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
import isCI from 'is-ci';
|
|
3
|
-
import { outdent } from 'outdent';
|
|
4
|
-
import { defineConfig } from 'tsup';
|
|
5
|
-
|
|
6
|
-
const viteExternals = ['vite'];
|
|
7
|
-
const astroExternals = ['astro', /^astro:/];
|
|
8
|
-
|
|
9
|
-
export default defineConfig([
|
|
10
|
-
// astro integration
|
|
11
|
-
{
|
|
12
|
-
clean: true,
|
|
13
|
-
dts: {
|
|
14
|
-
resolve: [...astroExternals, ...viteExternals],
|
|
15
|
-
},
|
|
16
|
-
entry: ['src/index.ts', 'src/builders.ts'],
|
|
17
|
-
external: [...astroExternals, ...viteExternals],
|
|
18
|
-
format: ['esm'],
|
|
19
|
-
outDir: 'build',
|
|
20
|
-
sourcemap: true,
|
|
21
|
-
target: 'node20.9',
|
|
22
|
-
// We specifically do not minify the code in packages **for node** in order to keep it readable for debugging purposes.
|
|
23
|
-
env: {
|
|
24
|
-
NODE_ENV: isCI ? 'production' : 'development',
|
|
25
|
-
},
|
|
26
|
-
minify: false,
|
|
27
|
-
shims: true,
|
|
28
|
-
// https://github.com/evanw/esbuild/issues/1921
|
|
29
|
-
banner: {
|
|
30
|
-
js: outdent`
|
|
31
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
32
|
-
const require = _createRequire(import.meta.url);
|
|
33
|
-
`,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
]);
|