@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.
- package/.turbo/turbo-build.log +16 -0
- package/CHANGELOG.md +66 -0
- package/build/builders.d.ts +2 -0
- package/build/builders.js +34 -0
- package/build/builders.js.map +1 -0
- package/build/index.d.ts +2 -3
- package/build/index.js +20 -17116
- package/build/index.js.map +1 -1
- package/package.json +14 -33
- package/src/builders.ts +14 -0
- package/src/index.ts +23 -252
- package/tsconfig.json +1 -3
- package/tsup.config.mjs +1 -46
- package/build-browser-runtime/setup.d.ts +0 -5
- package/build-browser-runtime/setup.js +0 -129
- package/build-runtime/chunk-B6RICTPP.js +0 -94
- package/build-runtime/chunk-FR26HCAT.js +0 -471
- package/build-runtime/chunk-HPW4ZAEJ.js +0 -23
- package/build-runtime/chunk-MLKGABMK.js +0 -9
- package/build-runtime/chunk-NVTQFGTR.js +0 -7
- package/build-runtime/chunk-RKE6XT5Z.js +0 -3104
- package/build-runtime/chunk-UZPSWWI5.js +0 -13
- package/build-runtime/chunk-W73LN534.js +0 -24
- package/build-runtime/context/elevated.d.ts +0 -2
- package/build-runtime/context/elevated.js +0 -24
- package/build-runtime/context/nonElevated.d.ts +0 -2
- package/build-runtime/context/nonElevated.js +0 -37
- package/build-runtime/context/setupServicePlugin.d.ts +0 -5
- package/build-runtime/context/setupServicePlugin.js +0 -16
- package/build-runtime/context/setupWebhook.d.ts +0 -5
- package/build-runtime/context/setupWebhook.js +0 -16
- package/build-runtime/middleware/auth.d.ts +0 -5
- package/build-runtime/middleware/auth.js +0 -74
- package/build-runtime/middleware/html-embeds.d.ts +0 -5
- package/build-runtime/middleware/html-embeds.js +0 -165
- package/build-runtime/routes/auth/callback.d.ts +0 -5
- package/build-runtime/routes/auth/callback.js +0 -52
- package/build-runtime/routes/auth/login.d.ts +0 -5
- package/build-runtime/routes/auth/login.js +0 -45
- package/build-runtime/routes/auth/logout-callback.d.ts +0 -5
- package/build-runtime/routes/auth/logout-callback.js +0 -23
- package/build-runtime/routes/auth/logout.d.ts +0 -5
- package/build-runtime/routes/auth/logout.js +0 -32
- package/build-runtime/routes/paylink/paylink.d.ts +0 -5
- package/build-runtime/routes/paylink/paylink.js +0 -1101
- package/build-runtime/routes/servicePluginsDevRoute.d.ts +0 -5
- package/build-runtime/routes/servicePluginsDevRoute.js +0 -13
- package/build-runtime/routes/webhooksDevRoute.d.ts +0 -5
- package/build-runtime/routes/webhooksDevRoute.js +0 -13
- package/runtime/entry.astro +0 -26
- package/src/client-context/setup.ts +0 -14
- package/src/client-context/utils.ts +0 -59
- package/src/components.ts +0 -98
- package/src/constants.ts +0 -2
- package/src/context/elevated.ts +0 -20
- package/src/context/hostProxy.ts +0 -38
- package/src/context/nonElevated.ts +0 -42
- package/src/context/setupServicePlugin.ts +0 -13
- package/src/context/setupWebhook.ts +0 -13
- package/src/context/utils.ts +0 -32
- package/src/directories.ts +0 -5
- package/src/env.d.ts +0 -11
- package/src/middleware/auth.ts +0 -38
- package/src/middleware/html-embeds.ts +0 -59
- package/src/plugins/patchAstroInlineScripts.ts +0 -27
- package/src/plugins/patchGlobal.ts +0 -20
- package/src/plugins/setupSsrContext.ts +0 -68
- package/src/routes/auth/callback.ts +0 -51
- package/src/routes/auth/login.ts +0 -42
- package/src/routes/auth/logout-callback.ts +0 -18
- package/src/routes/auth/logout.ts +0 -28
- package/src/routes/paylink/paylink.ts +0 -33
- package/src/routes/servicePluginsDevRoute.ts +0 -10
- package/src/routes/webhooksDevRoute.ts +0 -10
- package/src/schemas.ts +0 -227
- package/src/types.ts +0 -9
- package/src/utils/authAsyncLocalStorage.ts +0 -7
- package/src/utils/buildBackofficeComponent.ts +0 -64
- package/src/utils/buildComponents.ts +0 -182
- package/src/utils/buildServicePluginComponent.ts +0 -52
- package/src/utils/buildWebhookComponent.ts +0 -39
- package/src/utils/contextualAuth.ts +0 -4
- package/src/utils/createProjectModel.ts +0 -190
- package/src/utils/fs-utils.ts +0 -48
- package/src/utils/generateAppManifest.ts +0 -177
- package/src/utils/generateVisitorTokens.ts +0 -11
- package/src/utils/getSessionTokensFromCookie.ts +0 -38
- package/src/utils/loadEnvVars.ts +0 -47
- package/src/utils/removeUnusedCodegenFiles.ts +0 -34
- package/src/utils/resolveBuildMetadata.ts +0 -37
- package/src/utils/saveSessionTokensToCookie.ts +0 -27
- package/src/utils/transformStreamUtils.ts +0 -39
|
@@ -0,0 +1,16 @@
|
|
|
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[32m791.00 B[39m
|
|
9
|
+
[32mESM[39m [1mbuild/index.js [22m[32m995.00 B[39m
|
|
10
|
+
[32mESM[39m [1mbuild/builders.js.map [22m[32m601.00 B[39m
|
|
11
|
+
[32mESM[39m [1mbuild/index.js.map [22m[32m1.54 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 22ms
|
|
13
|
+
[34mDTS[39m Build start
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 4435ms
|
|
15
|
+
[32mDTS[39m [1mbuild/builders.d.ts [22m[32m319.00 B[39m
|
|
16
|
+
[32mDTS[39m [1mbuild/index.d.ts [22m[32m251.00 B[39m
|
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
|
-
|
|
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 };
|