@wix/astro 1.0.30 → 2.1.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.
Files changed (92) hide show
  1. package/.turbo/turbo-build.log +16 -0
  2. package/CHANGELOG.md +66 -0
  3. package/build/builders.d.ts +2 -0
  4. package/build/builders.js +34 -0
  5. package/build/builders.js.map +1 -0
  6. package/build/index.d.ts +2 -3
  7. package/build/index.js +20 -17116
  8. package/build/index.js.map +1 -1
  9. package/package.json +14 -33
  10. package/src/builders.ts +14 -0
  11. package/src/index.ts +23 -252
  12. package/tsconfig.json +1 -3
  13. package/tsup.config.mjs +1 -46
  14. package/build-browser-runtime/setup.d.ts +0 -5
  15. package/build-browser-runtime/setup.js +0 -129
  16. package/build-runtime/chunk-B6RICTPP.js +0 -94
  17. package/build-runtime/chunk-FR26HCAT.js +0 -471
  18. package/build-runtime/chunk-HPW4ZAEJ.js +0 -23
  19. package/build-runtime/chunk-MLKGABMK.js +0 -9
  20. package/build-runtime/chunk-NVTQFGTR.js +0 -7
  21. package/build-runtime/chunk-RKE6XT5Z.js +0 -3104
  22. package/build-runtime/chunk-UZPSWWI5.js +0 -13
  23. package/build-runtime/chunk-W73LN534.js +0 -24
  24. package/build-runtime/context/elevated.d.ts +0 -2
  25. package/build-runtime/context/elevated.js +0 -24
  26. package/build-runtime/context/nonElevated.d.ts +0 -2
  27. package/build-runtime/context/nonElevated.js +0 -37
  28. package/build-runtime/context/setupServicePlugin.d.ts +0 -5
  29. package/build-runtime/context/setupServicePlugin.js +0 -16
  30. package/build-runtime/context/setupWebhook.d.ts +0 -5
  31. package/build-runtime/context/setupWebhook.js +0 -16
  32. package/build-runtime/middleware/auth.d.ts +0 -5
  33. package/build-runtime/middleware/auth.js +0 -74
  34. package/build-runtime/middleware/html-embeds.d.ts +0 -5
  35. package/build-runtime/middleware/html-embeds.js +0 -165
  36. package/build-runtime/routes/auth/callback.d.ts +0 -5
  37. package/build-runtime/routes/auth/callback.js +0 -52
  38. package/build-runtime/routes/auth/login.d.ts +0 -5
  39. package/build-runtime/routes/auth/login.js +0 -45
  40. package/build-runtime/routes/auth/logout-callback.d.ts +0 -5
  41. package/build-runtime/routes/auth/logout-callback.js +0 -23
  42. package/build-runtime/routes/auth/logout.d.ts +0 -5
  43. package/build-runtime/routes/auth/logout.js +0 -32
  44. package/build-runtime/routes/paylink/paylink.d.ts +0 -5
  45. package/build-runtime/routes/paylink/paylink.js +0 -1101
  46. package/build-runtime/routes/servicePluginsDevRoute.d.ts +0 -5
  47. package/build-runtime/routes/servicePluginsDevRoute.js +0 -13
  48. package/build-runtime/routes/webhooksDevRoute.d.ts +0 -5
  49. package/build-runtime/routes/webhooksDevRoute.js +0 -13
  50. package/runtime/entry.astro +0 -26
  51. package/src/client-context/setup.ts +0 -14
  52. package/src/client-context/utils.ts +0 -59
  53. package/src/components.ts +0 -98
  54. package/src/constants.ts +0 -2
  55. package/src/context/elevated.ts +0 -20
  56. package/src/context/hostProxy.ts +0 -38
  57. package/src/context/nonElevated.ts +0 -42
  58. package/src/context/setupServicePlugin.ts +0 -13
  59. package/src/context/setupWebhook.ts +0 -13
  60. package/src/context/utils.ts +0 -32
  61. package/src/directories.ts +0 -5
  62. package/src/env.d.ts +0 -11
  63. package/src/middleware/auth.ts +0 -38
  64. package/src/middleware/html-embeds.ts +0 -59
  65. package/src/plugins/patchAstroInlineScripts.ts +0 -27
  66. package/src/plugins/patchGlobal.ts +0 -20
  67. package/src/plugins/setupSsrContext.ts +0 -68
  68. package/src/routes/auth/callback.ts +0 -51
  69. package/src/routes/auth/login.ts +0 -42
  70. package/src/routes/auth/logout-callback.ts +0 -18
  71. package/src/routes/auth/logout.ts +0 -28
  72. package/src/routes/paylink/paylink.ts +0 -33
  73. package/src/routes/servicePluginsDevRoute.ts +0 -10
  74. package/src/routes/webhooksDevRoute.ts +0 -10
  75. package/src/schemas.ts +0 -227
  76. package/src/types.ts +0 -9
  77. package/src/utils/authAsyncLocalStorage.ts +0 -7
  78. package/src/utils/buildBackofficeComponent.ts +0 -64
  79. package/src/utils/buildComponents.ts +0 -182
  80. package/src/utils/buildServicePluginComponent.ts +0 -52
  81. package/src/utils/buildWebhookComponent.ts +0 -39
  82. package/src/utils/contextualAuth.ts +0 -4
  83. package/src/utils/createProjectModel.ts +0 -190
  84. package/src/utils/fs-utils.ts +0 -48
  85. package/src/utils/generateAppManifest.ts +0 -177
  86. package/src/utils/generateVisitorTokens.ts +0 -11
  87. package/src/utils/getSessionTokensFromCookie.ts +0 -38
  88. package/src/utils/loadEnvVars.ts +0 -47
  89. package/src/utils/removeUnusedCodegenFiles.ts +0 -34
  90. package/src/utils/resolveBuildMetadata.ts +0 -37
  91. package/src/utils/saveSessionTokensToCookie.ts +0 -27
  92. package/src/utils/transformStreamUtils.ts +0 -39
@@ -0,0 +1,16 @@
1
+ CLI Building entry: src/builders.ts, src/index.ts
2
+ CLI Using tsconfig: tsconfig.json
3
+ CLI tsup v8.5.0
4
+ CLI Using tsup config: /home/runner/work/headless-integrations/headless-integrations/packages/astro/tsup.config.mjs
5
+ CLI Target: node20.9
6
+ CLI Cleaning output folder
7
+ ESM Build start
8
+ ESM build/builders.js 791.00 B
9
+ ESM build/index.js 995.00 B
10
+ ESM build/builders.js.map 601.00 B
11
+ ESM build/index.js.map 1.54 KB
12
+ ESM ⚡️ Build success in 22ms
13
+ DTS Build start
14
+ DTS ⚡️ Build success in 4435ms
15
+ DTS build/builders.d.ts 319.00 B
16
+ DTS build/index.d.ts 251.00 B
package/CHANGELOG.md ADDED
@@ -0,0 +1,66 @@
1
+ # @wix/astro
2
+
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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).
8
+
9
+ The file let's developers define their app manifest programmatically:
10
+
11
+ ```ts
12
+ import { app, backofficePage, extension } from '@wix/astro/builders';
13
+
14
+ export default app()
15
+ .use(
16
+ backofficePage({
17
+ component: './extensions/my-page/page.tsx',
18
+ id: '57512654-b94e-460b-91e4-88624b5afea3',
19
+ routePath: 'hello',
20
+ title: 'Trusted Index Page',
21
+ })
22
+ )
23
+ .use(
24
+ extension({
25
+ compData: {
26
+ webhook: {
27
+ callbackUrl: 'https://www.wix.com',
28
+ },
29
+ },
30
+ compId: 'f988e3bc-acaa-4aca-9cf8-2cd81cc39ee8',
31
+ compType: 'WEBHOOK',
32
+ })
33
+ );
34
+ ```
35
+
36
+ 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).
37
+
38
+ Note that this is a breaking change.
39
+
40
+ ### Patch Changes
41
+
42
+ - [#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.
43
+
44
+ - [#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
45
+
46
+ - [#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
47
+
48
+ - 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)]:
49
+ - @wix/astro-payment-links@2.0.1
50
+ - @wix/astro-html-embeds@2.0.1
51
+ - @wix/astro-extensions@2.1.0
52
+ - @wix/astro-auth@2.0.1
53
+
54
+ ## 2.0.0
55
+
56
+ ### Major Changes
57
+
58
+ - [#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`
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [[`1a3450f`](https://github.com/wix-incubator/headless-integrations/commit/1a3450fe28cccf67de37e476710d1df90ed62fed), [`4a957b4`](https://github.com/wix-incubator/headless-integrations/commit/4a957b452e595727aae622af478528581dda8a5c)]:
63
+ - @wix/astro-app-manifest@2.0.0
64
+ - @wix/astro-auth@2.0.0
65
+ - @wix/astro-extensions@2.0.0
66
+ - @wix/astro-html-embeds@2.0.0
@@ -0,0 +1,2 @@
1
+ export { app, genericExtension } from '@wix/astro-core';
2
+ export { backofficeExtensionMenuPlugin, backofficeExtensionWidget, backofficeModal, backofficePage, ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook } from '@wix/astro-extensions';
@@ -0,0 +1,34 @@
1
+ import { createRequire as _createRequire } from 'node:module';
2
+ const require = _createRequire(import.meta.url);
3
+
4
+ // src/builders.ts
5
+ import { app, genericExtension } from "@wix/astro-core";
6
+ import {
7
+ backofficeExtensionMenuPlugin,
8
+ backofficeExtensionWidget,
9
+ backofficeModal,
10
+ backofficePage,
11
+ ecomAdditionalFees,
12
+ ecomDiscountsTrigger,
13
+ ecomGiftCardsProvider,
14
+ ecomPaymentSettings,
15
+ ecomShippingRates,
16
+ ecomValidations,
17
+ webhook
18
+ } from "@wix/astro-extensions";
19
+ export {
20
+ app,
21
+ backofficeExtensionMenuPlugin,
22
+ backofficeExtensionWidget,
23
+ backofficeModal,
24
+ backofficePage,
25
+ ecomAdditionalFees,
26
+ ecomDiscountsTrigger,
27
+ ecomGiftCardsProvider,
28
+ ecomPaymentSettings,
29
+ ecomShippingRates,
30
+ ecomValidations,
31
+ genericExtension,
32
+ webhook
33
+ };
34
+ //# sourceMappingURL=builders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/builders.ts"],"sourcesContent":["export { app, genericExtension } from '@wix/astro-core';\nexport {\n backofficeExtensionMenuPlugin,\n backofficeExtensionWidget,\n backofficeModal,\n backofficePage,\n ecomAdditionalFees,\n ecomDiscountsTrigger,\n ecomGiftCardsProvider,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n webhook,\n} from '@wix/astro-extensions';\n"],"mappings":";;;;AAAA,SAAS,KAAK,wBAAwB;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
package/build/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { AstroIntegration } from 'astro';
2
2
 
3
- interface WixIntegrationOptions {
3
+ declare const createIntegration: ({ enableAuthRoutes, enableHtmlEmbeds, }?: {
4
4
  enableAuthRoutes?: boolean;
5
5
  enableHtmlEmbeds?: boolean;
6
- }
7
- declare const createIntegration: (options?: WixIntegrationOptions) => AstroIntegration;
6
+ }) => AstroIntegration;
8
7
 
9
8
  export { createIntegration as default };