@wix/astro 0.0.0-experimental-react-component

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 ADDED
@@ -0,0 +1,82 @@
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/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@wix/astro",
3
+ "version": "0.0.0-experimental-react-component",
4
+ "dependencies": {
5
+ "@wix/astro-auth": "0.0.0-experimental-react-component",
6
+ "@wix/astro-backend-extensions": "0.0.0-experimental-react-component",
7
+ "@wix/astro-backoffice-extensions": "0.0.0-experimental-react-component",
8
+ "@wix/astro-core": "0.0.0-experimental-react-component",
9
+ "@wix/astro-embedded-scripts-extensions": "0.0.0-experimental-react-component",
10
+ "@wix/astro-html-embeds": "0.0.0-experimental-react-component",
11
+ "@wix/astro-payment-links": "0.0.0-experimental-react-component",
12
+ "@wix/astro-site-components-extensions": "0.0.0-experimental-react-component"
13
+ },
14
+ "devDependencies": {
15
+ "astro": "^5.10.1",
16
+ "is-ci": "^4.1.0",
17
+ "outdent": "^0.8.0",
18
+ "tsup": "^8.5.0"
19
+ },
20
+ "exports": {
21
+ ".": "./build/index.js",
22
+ "./builders": "./build/builders.js",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "peerDependencies": {
26
+ "astro": "^5.0.0"
27
+ },
28
+ "publishConfig": {
29
+ "registry": "https://registry.npmjs.org/",
30
+ "access": "public",
31
+ "logLevel": "verbose"
32
+ },
33
+ "scripts": {
34
+ "build": "tsup",
35
+ "typecheck": "tsc --noEmit"
36
+ },
37
+ "sideEffects": false,
38
+ "type": "module"
39
+ }
@@ -0,0 +1,18 @@
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';
17
+ export { embeddedScript } from '@wix/astro-embedded-scripts-extensions';
18
+ export { siteComponent } from '@wix/astro-site-components-extensions';
package/src/index.ts ADDED
@@ -0,0 +1,42 @@
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 embeddedScripts from '@wix/astro-embedded-scripts-extensions';
7
+ import htmlEmbeds from '@wix/astro-html-embeds';
8
+ import paymentLinks from '@wix/astro-payment-links';
9
+ import siteComponents from '@wix/astro-site-components-extensions';
10
+
11
+ const createIntegration = ({
12
+ enableAuthRoutes = true,
13
+ enableHtmlEmbeds = true,
14
+ }: {
15
+ enableAuthRoutes?: boolean;
16
+ enableHtmlEmbeds?: boolean;
17
+ } = {}): AstroIntegration => {
18
+ return {
19
+ hooks: {
20
+ async 'astro:config:setup'({ updateConfig }) {
21
+ updateConfig({
22
+ integrations: [
23
+ core({
24
+ integrations: [
25
+ auth({ enableAuthRoutes }),
26
+ backend(),
27
+ backoffice(),
28
+ ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),
29
+ paymentLinks(),
30
+ embeddedScripts(),
31
+ siteComponents(),
32
+ ],
33
+ }),
34
+ ],
35
+ });
36
+ },
37
+ },
38
+ name: '@wix/astro',
39
+ };
40
+ };
41
+
42
+ export default createIntegration;
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "include": ["src"],
4
+ "compilerOptions": {
5
+ "outDir": "build"
6
+ }
7
+ }
@@ -0,0 +1,36 @@
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
+ ]);