@wix/astro 2.20.0 → 2.22.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/dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.d.ts +1 -0
- package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.js +26 -0
- package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.d.ts +10 -0
- package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.js +37 -0
- package/build/dependencies/astro-trusted-backoffice-extensions/types/index.d.ts +24 -0
- package/build/integration/builders-experimental.d.ts +1 -1
- package/build/integration/builders-experimental.js +2 -2
- package/build/integration/builders-trusted.d.ts +41 -0
- package/build/integration/builders-trusted.js +48 -0
- package/build/integration/builders-trusted.js.map +1 -0
- package/build/integration/builders.d.ts +12 -205
- package/build/integration/builders.js +5 -3
- package/build/integration/{chunk-WK4OVFTZ.js → chunk-2K4KOKVV.js} +10 -1
- package/build/integration/chunk-2K4KOKVV.js.map +1 -0
- package/build/integration/chunk-2K65FTYR.js +362 -0
- package/build/integration/chunk-2K65FTYR.js.map +1 -0
- package/build/integration/{chunk-ZOHC6VQD.js → chunk-C2WQBOJF.js} +5010 -11990
- package/build/integration/chunk-C2WQBOJF.js.map +1 -0
- package/build/integration/{chunk-QHGDEGZS.js → chunk-KH7M6QFM.js} +2 -2
- package/build/integration/chunk-LKZKWQSB.js +7032 -0
- package/build/integration/chunk-LKZKWQSB.js.map +1 -0
- package/build/integration/{index.d-DMz9m26S.d.ts → index.d-D4c48TR0.d.ts} +1 -1
- package/build/integration/index.d-DVHQaDA6.d.ts +197 -0
- package/build/integration/index.d.ts +2 -1
- package/build/integration/index.js +28 -23
- package/build/integration/index.js.map +1 -1
- package/package.json +9 -7
- package/build/integration/chunk-WK4OVFTZ.js.map +0 -1
- package/build/integration/chunk-ZOHC6VQD.js.map +0 -1
- /package/build/integration/{chunk-QHGDEGZS.js.map → chunk-KH7M6QFM.js.map} +0 -0
|
@@ -55,4 +55,4 @@ interface GenericExtension {
|
|
|
55
55
|
}
|
|
56
56
|
declare function genericExtension(options: BaseDevCenterComponent): GenericExtension;
|
|
57
57
|
|
|
58
|
-
export { type BaseExtension as B, type DevCenterCustomElementBehaviors as D,
|
|
58
|
+
export { type BaseExtension as B, type DevCenterCustomElementBehaviors as D, app as a, type DevCenterCustomElementSize as b, type DevCenterCustomElementPresets as c, type DevCenterSitePluginMarketData as d, type DevCenterSitePluginPlacements as e, genericExtension as g };
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { D as DevCenterCustomElementBehaviors, b as DevCenterCustomElementSize, c as DevCenterCustomElementPresets, d as DevCenterSitePluginMarketData, e as DevCenterSitePluginPlacements, B as BaseExtension } from './index.d-D4c48TR0.js';
|
|
2
|
+
|
|
3
|
+
interface EcomAdditionalFees {
|
|
4
|
+
type: 'EcomAdditionalFees';
|
|
5
|
+
options: Options$6;
|
|
6
|
+
}
|
|
7
|
+
interface Options$6 {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
source: string;
|
|
11
|
+
}
|
|
12
|
+
declare function ecomAdditionalFees(options: Options$6): EcomAdditionalFees;
|
|
13
|
+
|
|
14
|
+
interface EcomDiscountsTrigger {
|
|
15
|
+
type: 'EcomDiscountsTrigger';
|
|
16
|
+
options: Options$5;
|
|
17
|
+
}
|
|
18
|
+
interface Options$5 {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
source: string;
|
|
22
|
+
}
|
|
23
|
+
declare function ecomDiscountTriggers(options: Options$5): EcomDiscountsTrigger;
|
|
24
|
+
|
|
25
|
+
interface EcomGiftCardsProvider {
|
|
26
|
+
type: 'EcomGiftCardsProvider';
|
|
27
|
+
options: Options$4;
|
|
28
|
+
}
|
|
29
|
+
interface Options$4 {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
source: string;
|
|
33
|
+
}
|
|
34
|
+
declare function ecomGiftCards(options: Options$4): EcomGiftCardsProvider;
|
|
35
|
+
|
|
36
|
+
interface EcomPaymentSettings {
|
|
37
|
+
type: 'EcomPaymentSettings';
|
|
38
|
+
options: Options$3;
|
|
39
|
+
}
|
|
40
|
+
interface Options$3 {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
fallbackValueForRequires3dSecure?: boolean;
|
|
44
|
+
source: string;
|
|
45
|
+
}
|
|
46
|
+
declare function ecomPaymentSettings(options: Options$3): EcomPaymentSettings;
|
|
47
|
+
|
|
48
|
+
interface EcomShippingRates {
|
|
49
|
+
type: 'EcomShippingRates';
|
|
50
|
+
options: Options$2$1;
|
|
51
|
+
}
|
|
52
|
+
interface Options$2$1 {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
dashboardUrl?: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
fallbackDefinitionMandatory?: boolean;
|
|
58
|
+
learnMoreUrl?: string;
|
|
59
|
+
source: string;
|
|
60
|
+
thumbnailUrl?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function ecomShippingRates(options: Options$2$1): EcomShippingRates;
|
|
63
|
+
|
|
64
|
+
interface EcomValidations {
|
|
65
|
+
type: 'EcomValidations';
|
|
66
|
+
options: Options$1$2;
|
|
67
|
+
}
|
|
68
|
+
interface Options$1$2 {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
source: string;
|
|
72
|
+
validateInCart?: boolean;
|
|
73
|
+
}
|
|
74
|
+
declare function ecomValidations(options: Options$1$2): EcomValidations;
|
|
75
|
+
|
|
76
|
+
interface Webhook {
|
|
77
|
+
type: 'Webhook';
|
|
78
|
+
options: Options$7;
|
|
79
|
+
}
|
|
80
|
+
interface Options$7 {
|
|
81
|
+
id: string;
|
|
82
|
+
source: string;
|
|
83
|
+
}
|
|
84
|
+
declare function webhook(options: Options$7): Webhook;
|
|
85
|
+
|
|
86
|
+
interface CustomElement {
|
|
87
|
+
type: 'CustomElement';
|
|
88
|
+
options: Options$1$1;
|
|
89
|
+
}
|
|
90
|
+
interface Options$1$1 {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
behaviors?: DevCenterCustomElementBehaviors;
|
|
94
|
+
element: string;
|
|
95
|
+
height: DevCenterCustomElementSize['height'];
|
|
96
|
+
installation: {
|
|
97
|
+
autoAdd: boolean;
|
|
98
|
+
essential?: boolean;
|
|
99
|
+
};
|
|
100
|
+
presets?: DevCenterCustomElementPresets;
|
|
101
|
+
settings?: string;
|
|
102
|
+
tagName: string;
|
|
103
|
+
width: DevCenterCustomElementSize['width'];
|
|
104
|
+
}
|
|
105
|
+
declare function customElement(options: Options$1$1): CustomElement;
|
|
106
|
+
|
|
107
|
+
interface SitePlugin extends BaseExtension {
|
|
108
|
+
type: 'SitePlugin';
|
|
109
|
+
options: Options$2;
|
|
110
|
+
}
|
|
111
|
+
interface Options$2 {
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
element: string;
|
|
115
|
+
installation: {
|
|
116
|
+
autoAdd: boolean;
|
|
117
|
+
};
|
|
118
|
+
marketData?: DevCenterSitePluginMarketData;
|
|
119
|
+
placements: DevCenterSitePluginPlacements[];
|
|
120
|
+
settings: string;
|
|
121
|
+
tagName: string;
|
|
122
|
+
}
|
|
123
|
+
declare function sitePlugin(options: Options$2): SitePlugin;
|
|
124
|
+
|
|
125
|
+
interface EmbeddedScript extends BaseExtension {
|
|
126
|
+
type: 'EmbeddedScript';
|
|
127
|
+
options: Options$1;
|
|
128
|
+
}
|
|
129
|
+
interface Options$1 {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
placement: 'BODY_END' | 'BODY_START' | 'HEAD';
|
|
133
|
+
scriptType: 'ADVERTISING' | 'ANALYTICS' | 'ESSENTIAL' | 'FUNCTIONAL';
|
|
134
|
+
source: string;
|
|
135
|
+
}
|
|
136
|
+
declare function embeddedScript(options: Options$1): EmbeddedScript;
|
|
137
|
+
|
|
138
|
+
interface SiteComponentPanel extends BaseExtension {
|
|
139
|
+
type: 'SiteComponentPanel';
|
|
140
|
+
options: PanelOptions;
|
|
141
|
+
}
|
|
142
|
+
interface PanelOptions {
|
|
143
|
+
id: string;
|
|
144
|
+
component: string;
|
|
145
|
+
displayName: string;
|
|
146
|
+
referenceId?: string;
|
|
147
|
+
size: {
|
|
148
|
+
height: number;
|
|
149
|
+
width: string;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
declare function siteComponentPanel(options: PanelOptions): SiteComponentPanel;
|
|
153
|
+
|
|
154
|
+
interface PresetOptions {
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
displayName: string;
|
|
157
|
+
presetCssUrl: string;
|
|
158
|
+
thumbnailUrl?: string;
|
|
159
|
+
}
|
|
160
|
+
interface SiteComponent extends BaseExtension {
|
|
161
|
+
type: 'SiteComponent';
|
|
162
|
+
options: Options;
|
|
163
|
+
}
|
|
164
|
+
interface Options {
|
|
165
|
+
id: string;
|
|
166
|
+
type: string;
|
|
167
|
+
description: string;
|
|
168
|
+
editorElement: {
|
|
169
|
+
[key: string]: unknown;
|
|
170
|
+
displayName: string;
|
|
171
|
+
presets?: Record<string, PresetOptions>;
|
|
172
|
+
selector: string;
|
|
173
|
+
};
|
|
174
|
+
resources: {
|
|
175
|
+
[key: string]: unknown;
|
|
176
|
+
client: {
|
|
177
|
+
[key: string]: unknown;
|
|
178
|
+
componentUrl: string;
|
|
179
|
+
};
|
|
180
|
+
dependencies?: {
|
|
181
|
+
[key: string]: unknown;
|
|
182
|
+
componentDependencies?: string[];
|
|
183
|
+
contextDependencies?: string[];
|
|
184
|
+
};
|
|
185
|
+
editor?: {
|
|
186
|
+
[key: string]: unknown;
|
|
187
|
+
componentUrl: string;
|
|
188
|
+
};
|
|
189
|
+
sdk?: {
|
|
190
|
+
[key: string]: unknown;
|
|
191
|
+
url: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
declare function siteComponent(options: Options): SiteComponent;
|
|
196
|
+
|
|
197
|
+
export { ecomDiscountTriggers as a, ecomGiftCards as b, customElement as c, ecomPaymentSettings as d, ecomAdditionalFees as e, ecomShippingRates as f, ecomValidations as g, embeddedScript as h, siteComponentPanel as i, sitePlugin as j, siteComponent as s, webhook as w };
|
|
@@ -3,22 +3,27 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
createIntegration,
|
|
5
5
|
createIntegration2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KH7M6QFM.js";
|
|
7
|
+
import {
|
|
8
|
+
createIntegration as createIntegration9
|
|
9
|
+
} from "./chunk-2K65FTYR.js";
|
|
10
|
+
import {
|
|
11
|
+
createIntegration as createIntegration10,
|
|
12
|
+
extensions
|
|
13
|
+
} from "./chunk-LKZKWQSB.js";
|
|
7
14
|
import {
|
|
8
15
|
createIntegration as createIntegration3,
|
|
9
16
|
createIntegration2 as createIntegration4,
|
|
10
17
|
createIntegration3 as createIntegration5,
|
|
11
18
|
createIntegration4 as createIntegration6,
|
|
12
19
|
createIntegration5 as createIntegration7,
|
|
13
|
-
createIntegration6 as createIntegration8
|
|
14
|
-
|
|
15
|
-
extensions
|
|
16
|
-
} from "./chunk-ZOHC6VQD.js";
|
|
20
|
+
createIntegration6 as createIntegration8
|
|
21
|
+
} from "./chunk-C2WQBOJF.js";
|
|
17
22
|
import {
|
|
18
23
|
defaultOutdent,
|
|
19
24
|
init_esm_shims,
|
|
20
25
|
normalizePath
|
|
21
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2K4KOKVV.js";
|
|
22
27
|
|
|
23
28
|
// src/index.ts
|
|
24
29
|
init_esm_shims();
|
|
@@ -90,7 +95,7 @@ var setupContextUrl = new URL(
|
|
|
90
95
|
"../dependencies/astro-auth/browser-runtime/setup.js",
|
|
91
96
|
import.meta.url
|
|
92
97
|
);
|
|
93
|
-
var
|
|
98
|
+
var createIntegration11 = ({
|
|
94
99
|
enableAuthRoutes,
|
|
95
100
|
enableWixEssentials
|
|
96
101
|
}) => {
|
|
@@ -175,11 +180,11 @@ var createIntegration10 = ({
|
|
|
175
180
|
}
|
|
176
181
|
};
|
|
177
182
|
};
|
|
178
|
-
var src_default =
|
|
183
|
+
var src_default = createIntegration11;
|
|
179
184
|
|
|
180
185
|
// ../astro-html-embeds/src/index.ts
|
|
181
186
|
init_esm_shims();
|
|
182
|
-
var
|
|
187
|
+
var createIntegration12 = () => {
|
|
183
188
|
return {
|
|
184
189
|
name: "@wix/astro/html-embeds",
|
|
185
190
|
hooks: {
|
|
@@ -195,11 +200,11 @@ var createIntegration11 = () => {
|
|
|
195
200
|
}
|
|
196
201
|
};
|
|
197
202
|
};
|
|
198
|
-
var src_default2 =
|
|
203
|
+
var src_default2 = createIntegration12;
|
|
199
204
|
|
|
200
205
|
// ../astro-payment-links/src/index.ts
|
|
201
206
|
init_esm_shims();
|
|
202
|
-
var
|
|
207
|
+
var createIntegration13 = () => {
|
|
203
208
|
return {
|
|
204
209
|
name: "@wix/astro/payment-links",
|
|
205
210
|
hooks: {
|
|
@@ -240,11 +245,11 @@ var createIntegration12 = () => {
|
|
|
240
245
|
}
|
|
241
246
|
};
|
|
242
247
|
};
|
|
243
|
-
var src_default3 =
|
|
248
|
+
var src_default3 = createIntegration13;
|
|
244
249
|
|
|
245
250
|
// ../astro-robots/src/index.ts
|
|
246
251
|
init_esm_shims();
|
|
247
|
-
var
|
|
252
|
+
var createIntegration14 = () => {
|
|
248
253
|
return {
|
|
249
254
|
name: "@wix/astro/robots",
|
|
250
255
|
hooks: {
|
|
@@ -261,14 +266,14 @@ var createIntegration13 = () => {
|
|
|
261
266
|
}
|
|
262
267
|
};
|
|
263
268
|
};
|
|
264
|
-
var src_default4 =
|
|
269
|
+
var src_default4 = createIntegration14;
|
|
265
270
|
|
|
266
271
|
// ../astro-viewer-api/src/index.ts
|
|
267
272
|
init_esm_shims();
|
|
268
273
|
|
|
269
274
|
// ../astro-viewer-api/src/integration.ts
|
|
270
275
|
init_esm_shims();
|
|
271
|
-
var
|
|
276
|
+
var createIntegration15 = () => {
|
|
272
277
|
return {
|
|
273
278
|
name: "@wix/astro/viewer-api",
|
|
274
279
|
hooks: {
|
|
@@ -293,7 +298,7 @@ function isEnabled(value, defaultValue = true) {
|
|
|
293
298
|
}
|
|
294
299
|
return value?.enable ?? defaultValue;
|
|
295
300
|
}
|
|
296
|
-
var
|
|
301
|
+
var createIntegration16 = (config) => {
|
|
297
302
|
const enableAuthRoutes = isEnabled(config?.auth);
|
|
298
303
|
const enableHtmlEmbeds = isEnabled(config?.htmlEmbeds);
|
|
299
304
|
const enableRobots = isEnabled(config?.robots);
|
|
@@ -304,20 +309,20 @@ var createIntegration15 = (config) => {
|
|
|
304
309
|
const integrations = [
|
|
305
310
|
src_default({ enableAuthRoutes, enableWixEssentials }),
|
|
306
311
|
...enableBackendExtensions ? [createIntegration3()] : [],
|
|
307
|
-
...enableBackofficeExtensions ? [
|
|
308
|
-
|
|
312
|
+
...enableBackofficeExtensions ? [createIntegration10(), createIntegration9()] : [],
|
|
313
|
+
createIntegration5(),
|
|
309
314
|
...enableHtmlEmbeds ? [src_default2()] : [],
|
|
310
|
-
...enableWixSitePages ? [src_default3(),
|
|
311
|
-
|
|
312
|
-
createIntegration9(),
|
|
315
|
+
...enableWixSitePages ? [src_default3(), createIntegration15()] : [],
|
|
316
|
+
createIntegration6(),
|
|
313
317
|
createIntegration8(),
|
|
318
|
+
createIntegration7(),
|
|
314
319
|
createIntegration2(),
|
|
315
320
|
createIntegration(),
|
|
316
321
|
...enableRobots ? [src_default4()] : []
|
|
317
322
|
];
|
|
318
|
-
return [
|
|
323
|
+
return [createIntegration4({ integrations }), ...integrations];
|
|
319
324
|
};
|
|
320
|
-
var index_default =
|
|
325
|
+
var index_default = createIntegration16;
|
|
321
326
|
export {
|
|
322
327
|
index_default as default,
|
|
323
328
|
extensions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../../astro-auth/src/index.ts","../../../astro-auth/src/plugins/patchAstroInlineScripts.ts","../../../astro-auth/src/plugins/setupContentCollectionContext.ts","../../../astro-html-embeds/src/index.ts","../../../astro-payment-links/src/index.ts","../../../astro-robots/src/index.ts","../../../astro-viewer-api/src/index.ts","../../../astro-viewer-api/src/integration.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 contextProviders from '@wix/astro-context-providers-extensions';\nimport core from '@wix/astro-core';\nimport customElements from '@wix/astro-custom-elements-extensions';\nimport embeddedScripts from '@wix/astro-embedded-scripts-extensions';\nimport functionLibraries from '@wix/astro-function-libraries-extensions';\nimport htmlEmbeds from '@wix/astro-html-embeds';\nimport paymentLinks from '@wix/astro-payment-links';\nimport robots from '@wix/astro-robots';\nimport siteComponentPanels from '@wix/astro-site-component-panels-extensions';\nimport siteComponents from '@wix/astro-site-components-extensions';\nimport viewerApi from '@wix/astro-viewer-api';\n\nexport { extensions } from './builders.js';\n\ninterface WixAstroConfig {\n auth?: boolean | { enable?: boolean };\n backendExtensions?: boolean | { enable?: boolean };\n backofficeExtensions?: boolean | { enable?: boolean };\n essentials?: boolean | { enable?: boolean };\n htmlEmbeds?: boolean | { enable?: boolean };\n robots?: boolean | { enable?: boolean };\n wixSitePages?: boolean | { enable?: boolean };\n}\n\nfunction isEnabled(\n value?: boolean | { enable?: boolean },\n defaultValue = true\n): boolean {\n if (typeof value === 'boolean') {\n return value;\n }\n return value?.enable ?? defaultValue;\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 const enableBackendExtensions = isEnabled(config?.backendExtensions);\n const enableBackofficeExtensions = isEnabled(config?.backofficeExtensions);\n const enableWixSitePages = isEnabled(config?.wixSitePages);\n const enableWixEssentials = isEnabled(config?.essentials, false);\n\n const integrations = [\n auth({ enableAuthRoutes, enableWixEssentials }),\n ...(enableBackendExtensions ? [backend()] : []),\n ...(enableBackofficeExtensions ? [backoffice()] : []),\n customElements(),\n ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),\n ...(enableWixSitePages ? [paymentLinks(), viewerApi()] : []),\n embeddedScripts(),\n siteComponents(),\n siteComponentPanels(),\n functionLibraries(),\n contextProviders(),\n ...(enableRobots ? [robots()] : []),\n ];\n\n return [core({ integrations }), ...integrations];\n};\n\nexport default createIntegration;\n","import { fileURLToPath } from 'node:url';\nimport type { WixIntegration } from '@wix/astro-core';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\nimport { patchAstroInlineScripts } from './plugins/patchAstroInlineScripts.js';\nimport { setupContentCollectionContext } from './plugins/setupContentCollectionContext.js';\n\nconst setupContextUrl = new URL(\n '../dependencies/astro-auth/browser-runtime/setup.js',\n import.meta.url\n);\n\nconst createIntegration = ({\n enableAuthRoutes,\n enableWixEssentials,\n}: {\n enableAuthRoutes: boolean;\n enableWixEssentials: boolean;\n}): WixIntegration => {\n return {\n name: '@wix/astro/auth',\n hooks: {\n 'astro:config:setup'({\n addMiddleware,\n config,\n injectRoute,\n injectScript,\n updateConfig,\n }) {\n const srcDir = fileURLToPath(config.srcDir);\n\n updateConfig({\n vite: {\n plugins: [\n setupContentCollectionContext(srcDir),\n patchAstroInlineScripts(),\n ],\n },\n });\n\n const setupContextCode = outdent`\n import { WIX_CLIENT_ID } from 'astro:env/client';\n import { setup } from '${normalizePath(setupContextUrl)}';\n\n setup({ clientId: WIX_CLIENT_ID });\n `;\n\n // support client-side context calls\n injectScript('before-hydration', setupContextCode);\n injectScript('page', setupContextCode);\n\n // support server side context calls\n addMiddleware({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/middleware/auth.js',\n import.meta.url\n ),\n order: 'pre',\n });\n\n // support localization\n if (enableWixEssentials) {\n addMiddleware({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/middleware/localization.js',\n import.meta.url\n ),\n order: 'pre',\n });\n }\n\n // support built-in auth routes\n if (enableAuthRoutes) {\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/login.js',\n import.meta.url\n ),\n pattern: '/api/auth/login',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/logout.js',\n import.meta.url\n ),\n pattern: '/api/auth/logout',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/callback.js',\n import.meta.url\n ),\n pattern: '/api/auth/callback',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/logout-callback.js',\n import.meta.url\n ),\n pattern: '/api/auth/logout-callback',\n prerender: false,\n });\n }\n },\n },\n };\n};\n\nexport default createIntegration;\n","import type { PluginOption } from 'vite';\nimport { outdent } from 'outdent';\n\nexport function patchAstroInlineScripts(): PluginOption {\n return {\n name: 'patch-astro-inline-scripts',\n transform(code, id) {\n const [_filename, rawQuery] = id.split(`?`, 2);\n const query = Object.fromEntries(new URLSearchParams(rawQuery).entries());\n\n if (\n query.astro == null ||\n query.type !== 'script' ||\n query['lang.ts'] == null ||\n code === ''\n ) {\n return null;\n }\n\n return outdent`\n import 'astro:scripts/page.js';\n\n ${code}\n `;\n },\n };\n}\n","import { relative } from 'node:path';\nimport type { PluginOption } from 'vite';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\n\n// https://github.com/withastro/astro/blob/e0c4460c5b6cc0c19b705d81820809aef0544100/packages/astro/src/content/utils.ts#L748-L763\nconst contentCollectionFilePaths = [\n 'content.config.mjs',\n 'content.config.js',\n 'content.config.mts',\n 'content.config.ts',\n 'content/config.mjs',\n 'content/config.js',\n 'content/config.mts',\n 'content/config.ts',\n];\n\nconst setupContextualClientUrl = new URL(\n '../dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.js',\n import.meta.url\n);\n\nexport function setupContentCollectionContext(srcDir: string): PluginOption {\n return {\n name: 'setup-content-collection-context',\n applyToEnvironment(environment) {\n return environment.name === 'ssr';\n },\n transform(code, id) {\n const relativeId = relative(srcDir, id);\n\n const isContentCollectionFile =\n contentCollectionFilePaths.includes(relativeId);\n\n if (isContentCollectionFile) {\n return outdent`\n import '${normalizePath(setupContextualClientUrl)}';\n\n ${code}\n `;\n }\n\n return null;\n },\n };\n}\n","import type { WixIntegration } from '@wix/astro-core';\n\nconst createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/html-embeds',\n hooks: {\n 'astro:config:setup'({ addMiddleware }) {\n addMiddleware({\n entrypoint: new URL(\n '../dependencies/astro-html-embeds/backend-runtime/html-embeds.js',\n import.meta.url\n ),\n order: 'post',\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n","import type { WixIntegration } from '@wix/astro-core';\n\nconst createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/payment-links',\n hooks: {\n 'astro:config:setup'({ injectRoute }) {\n /*\n 1. A user generates a paylink -> https://mysite.com/_paylink/[id]\n 2. When accessing the paylink, our route redirects them to the Wix Payments link\n 3. Wix Payments then redirects the user to Wix Checkout,\n which may resolve to either https://mysite.com/checkout/... or https://mysite.com/__ecom/checkout/...,\n depending on the flow within Wix.\n */\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/payment-link.js',\n import.meta.url\n ),\n pattern: '/_paylink/[id]',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/payment-checkout.js',\n import.meta.url\n ),\n pattern: '/checkout',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/payment-checkout.js',\n import.meta.url\n ),\n pattern: '/__ecom/checkout',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/proposal.js',\n import.meta.url\n ),\n pattern: '/_proposal',\n prerender: false,\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n","import type { WixIntegration } from '@wix/astro-core';\n\nconst createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/robots',\n hooks: {\n 'astro:config:setup'({ injectRoute }) {\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-robots/backend-runtime/robots.js',\n import.meta.url\n ),\n pattern: '/robots.txt',\n prerender: false,\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n","export { createIntegration as default } from './integration.js';\n","import type { WixIntegration } from '@wix/astro-core';\n\nexport const createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/viewer-api',\n hooks: {\n 'astro:config:setup'({ injectRoute }) {\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-viewer-api/backend-runtime/api.js',\n import.meta.url\n ),\n pattern: '/_api/[...path]',\n prerender: false,\n });\n },\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;ACAA;AAAA,SAAS,qBAAqB;;;ACA9B;AAGO,SAAS,0BAAwC;AACtD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU,MAAM,IAAI;AAClB,YAAM,CAAC,WAAW,QAAQ,IAAI,GAAG,MAAM,KAAK,CAAC;AAC7C,YAAM,QAAQ,OAAO,YAAY,IAAI,gBAAgB,QAAQ,EAAE,QAAQ,CAAC;AAExE,UACE,MAAM,SAAS,QACf,MAAM,SAAS,YACf,MAAM,SAAS,KAAK,QACpB,SAAS,IACT;AACA,eAAO;AAAA,MACT;AAEA,aAAO;AAAA;AAAA;AAAA,UAGH,IAAI;AAAA;AAAA,IAEV;AAAA,EACF;AACF;;;AC1BA;AAAA,SAAS,gBAAgB;AAMzB,IAAM,6BAA6B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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Ae,UAAU,QAAQ,MAAM;AAC7C,QAAM,0BAA0B,UAAU,QAAQ,iBAAiB;AACnE,QAAM,6BAA6B,UAAU,QAAQ,oBAAoB;AACzE,QAAM,qBAAqB,UAAU,QAAQ,YAAY;AACzD,QAAM,sBAAsB,UAAU,QAAQ,YAAY,KAAK;AAE/D,QAAM,eAAe;AAAA,IACnB,YAAK,EAAE,kBAAkB,oBAAoB,CAAC;AAAA,IAC9C,GAAI,0BAA0B,CAACA,mBAAQ,CAAC,IAAI,CAAC;AAAA,IAC7C,GAAI,6BAA6B,CAACA,mBAAW,CAAC,IAAI,CAAC;AAAA,IACnDA,mBAAe;AAAA,IACf,GAAI,mBAAmB,CAACC,aAAW,CAAC,IAAI,CAAC;AAAA,IACzC,GAAI,qBAAqB,CAACA,aAAa,GAAGD,oBAAU,CAAC,IAAI,CAAC;AAAA,IAC1DA,mBAAgB;AAAA,IAChBA,mBAAe;AAAA,IACfA,mBAAoB;AAAA,IACpBA,mBAAkB;AAAA,IAClB,kBAAiB;AAAA,IACjB,GAAI,eAAe,CAACC,aAAO,CAAC,IAAI,CAAC;AAAA,EACnC;AAEA,SAAO,CAACD,mBAAK,EAAE,aAAa,CAAC,GAAG,GAAG,YAAY;AACjD;AAEA,IAAO,gBAAQA;","names":["createIntegration","createIntegration","src_default","createIntegration","src_default","createIntegration","src_default","createIntegration","createIntegration","src_default"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../../astro-auth/src/index.ts","../../../astro-auth/src/plugins/patchAstroInlineScripts.ts","../../../astro-auth/src/plugins/setupContentCollectionContext.ts","../../../astro-html-embeds/src/index.ts","../../../astro-payment-links/src/index.ts","../../../astro-robots/src/index.ts","../../../astro-viewer-api/src/index.ts","../../../astro-viewer-api/src/integration.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 contextProviders from '@wix/astro-context-providers-extensions';\nimport core from '@wix/astro-core';\nimport customElements from '@wix/astro-custom-elements-extensions';\nimport embeddedScripts from '@wix/astro-embedded-scripts-extensions';\nimport functionLibraries from '@wix/astro-function-libraries-extensions';\nimport htmlEmbeds from '@wix/astro-html-embeds';\nimport paymentLinks from '@wix/astro-payment-links';\nimport robots from '@wix/astro-robots';\nimport siteComponentPanels from '@wix/astro-site-component-panels-extensions';\nimport siteComponents from '@wix/astro-site-components-extensions';\nimport internalBackoffice from '@wix/astro-trusted-backoffice-extensions';\nimport viewerApi from '@wix/astro-viewer-api';\n\nexport { extensions } from './builders.js';\n\ninterface WixAstroConfig {\n auth?: boolean | { enable?: boolean };\n backendExtensions?: boolean | { enable?: boolean };\n backofficeExtensions?: boolean | { enable?: boolean };\n essentials?: boolean | { enable?: boolean };\n htmlEmbeds?: boolean | { enable?: boolean };\n robots?: boolean | { enable?: boolean };\n wixSitePages?: boolean | { enable?: boolean };\n}\n\nfunction isEnabled(\n value?: boolean | { enable?: boolean },\n defaultValue = true\n): boolean {\n if (typeof value === 'boolean') {\n return value;\n }\n return value?.enable ?? defaultValue;\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 const enableBackendExtensions = isEnabled(config?.backendExtensions);\n const enableBackofficeExtensions = isEnabled(config?.backofficeExtensions);\n const enableWixSitePages = isEnabled(config?.wixSitePages);\n const enableWixEssentials = isEnabled(config?.essentials, false);\n\n const integrations = [\n auth({ enableAuthRoutes, enableWixEssentials }),\n ...(enableBackendExtensions ? [backend()] : []),\n ...(enableBackofficeExtensions ? [backoffice(), internalBackoffice()] : []),\n customElements(),\n ...(enableHtmlEmbeds ? [htmlEmbeds()] : []),\n ...(enableWixSitePages ? [paymentLinks(), viewerApi()] : []),\n embeddedScripts(),\n siteComponents(),\n siteComponentPanels(),\n functionLibraries(),\n contextProviders(),\n ...(enableRobots ? [robots()] : []),\n ];\n\n return [core({ integrations }), ...integrations];\n};\n\nexport default createIntegration;\n","import { fileURLToPath } from 'node:url';\nimport type { WixIntegration } from '@wix/astro-core';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\nimport { patchAstroInlineScripts } from './plugins/patchAstroInlineScripts.js';\nimport { setupContentCollectionContext } from './plugins/setupContentCollectionContext.js';\n\nconst setupContextUrl = new URL(\n '../dependencies/astro-auth/browser-runtime/setup.js',\n import.meta.url\n);\n\nconst createIntegration = ({\n enableAuthRoutes,\n enableWixEssentials,\n}: {\n enableAuthRoutes: boolean;\n enableWixEssentials: boolean;\n}): WixIntegration => {\n return {\n name: '@wix/astro/auth',\n hooks: {\n 'astro:config:setup'({\n addMiddleware,\n config,\n injectRoute,\n injectScript,\n updateConfig,\n }) {\n const srcDir = fileURLToPath(config.srcDir);\n\n updateConfig({\n vite: {\n plugins: [\n setupContentCollectionContext(srcDir),\n patchAstroInlineScripts(),\n ],\n },\n });\n\n const setupContextCode = outdent`\n import { WIX_CLIENT_ID } from 'astro:env/client';\n import { setup } from '${normalizePath(setupContextUrl)}';\n\n setup({ clientId: WIX_CLIENT_ID });\n `;\n\n // support client-side context calls\n injectScript('before-hydration', setupContextCode);\n injectScript('page', setupContextCode);\n\n // support server side context calls\n addMiddleware({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/middleware/auth.js',\n import.meta.url\n ),\n order: 'pre',\n });\n\n // support localization\n if (enableWixEssentials) {\n addMiddleware({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/middleware/localization.js',\n import.meta.url\n ),\n order: 'pre',\n });\n }\n\n // support built-in auth routes\n if (enableAuthRoutes) {\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/login.js',\n import.meta.url\n ),\n pattern: '/api/auth/login',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/logout.js',\n import.meta.url\n ),\n pattern: '/api/auth/logout',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/callback.js',\n import.meta.url\n ),\n pattern: '/api/auth/callback',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-auth/backend-runtime/routes/logout-callback.js',\n import.meta.url\n ),\n pattern: '/api/auth/logout-callback',\n prerender: false,\n });\n }\n },\n },\n };\n};\n\nexport default createIntegration;\n","import type { PluginOption } from 'vite';\nimport { outdent } from 'outdent';\n\nexport function patchAstroInlineScripts(): PluginOption {\n return {\n name: 'patch-astro-inline-scripts',\n transform(code, id) {\n const [_filename, rawQuery] = id.split(`?`, 2);\n const query = Object.fromEntries(new URLSearchParams(rawQuery).entries());\n\n if (\n query.astro == null ||\n query.type !== 'script' ||\n query['lang.ts'] == null ||\n code === ''\n ) {\n return null;\n }\n\n return outdent`\n import 'astro:scripts/page.js';\n\n ${code}\n `;\n },\n };\n}\n","import { relative } from 'node:path';\nimport type { PluginOption } from 'vite';\nimport { normalizePath } from '@wix/vite-utils';\nimport { outdent } from 'outdent';\n\n// https://github.com/withastro/astro/blob/e0c4460c5b6cc0c19b705d81820809aef0544100/packages/astro/src/content/utils.ts#L748-L763\nconst contentCollectionFilePaths = [\n 'content.config.mjs',\n 'content.config.js',\n 'content.config.mts',\n 'content.config.ts',\n 'content/config.mjs',\n 'content/config.js',\n 'content/config.mts',\n 'content/config.ts',\n];\n\nconst setupContextualClientUrl = new URL(\n '../dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.js',\n import.meta.url\n);\n\nexport function setupContentCollectionContext(srcDir: string): PluginOption {\n return {\n name: 'setup-content-collection-context',\n applyToEnvironment(environment) {\n return environment.name === 'ssr';\n },\n transform(code, id) {\n const relativeId = relative(srcDir, id);\n\n const isContentCollectionFile =\n contentCollectionFilePaths.includes(relativeId);\n\n if (isContentCollectionFile) {\n return outdent`\n import '${normalizePath(setupContextualClientUrl)}';\n\n ${code}\n `;\n }\n\n return null;\n },\n };\n}\n","import type { WixIntegration } from '@wix/astro-core';\n\nconst createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/html-embeds',\n hooks: {\n 'astro:config:setup'({ addMiddleware }) {\n addMiddleware({\n entrypoint: new URL(\n '../dependencies/astro-html-embeds/backend-runtime/html-embeds.js',\n import.meta.url\n ),\n order: 'post',\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n","import type { WixIntegration } from '@wix/astro-core';\n\nconst createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/payment-links',\n hooks: {\n 'astro:config:setup'({ injectRoute }) {\n /*\n 1. A user generates a paylink -> https://mysite.com/_paylink/[id]\n 2. When accessing the paylink, our route redirects them to the Wix Payments link\n 3. Wix Payments then redirects the user to Wix Checkout,\n which may resolve to either https://mysite.com/checkout/... or https://mysite.com/__ecom/checkout/...,\n depending on the flow within Wix.\n */\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/payment-link.js',\n import.meta.url\n ),\n pattern: '/_paylink/[id]',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/payment-checkout.js',\n import.meta.url\n ),\n pattern: '/checkout',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/payment-checkout.js',\n import.meta.url\n ),\n pattern: '/__ecom/checkout',\n prerender: false,\n });\n\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-payment-links/backend-runtime/proposal.js',\n import.meta.url\n ),\n pattern: '/_proposal',\n prerender: false,\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n","import type { WixIntegration } from '@wix/astro-core';\n\nconst createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/robots',\n hooks: {\n 'astro:config:setup'({ injectRoute }) {\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-robots/backend-runtime/robots.js',\n import.meta.url\n ),\n pattern: '/robots.txt',\n prerender: false,\n });\n },\n },\n };\n};\n\nexport default createIntegration;\n","export { createIntegration as default } from './integration.js';\n","import type { WixIntegration } from '@wix/astro-core';\n\nexport const createIntegration = (): WixIntegration => {\n return {\n name: '@wix/astro/viewer-api',\n hooks: {\n 'astro:config:setup'({ injectRoute }) {\n injectRoute({\n entrypoint: new URL(\n '../dependencies/astro-viewer-api/backend-runtime/api.js',\n import.meta.url\n ),\n pattern: '/_api/[...path]',\n prerender: false,\n });\n },\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;ACAA;AAAA,SAAS,qBAAqB;;;ACA9B;AAGO,SAAS,0BAAwC;AACtD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU,MAAM,IAAI;AAClB,YAAM,CAAC,WAAW,QAAQ,IAAI,GAAG,MAAM,KAAK,CAAC;AAC7C,YAAM,QAAQ,OAAO,YAAY,IAAI,gBAAgB,QAAQ,EAAE,QAAQ,CAAC;AAExE,UACE,MAAM,SAAS,QACf,MAAM,SAAS,YACf,MAAM,SAAS,KAAK,QACpB,SAAS,IACT;AACA,eAAO;AAAA,MACT;AAEA,aAAO;AAAA;AAAA;AAAA,UAGH,IAAI;AAAA;AAAA,IAEV;AAAA,EACF;AACF;;;AC1BA;AAAA,SAAS,gBAAgB;AAMzB,IAAM,6BAA6B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,2BAA2B,IAAI;AAAA,EACnC;AAAA,EACA,YAAY;AACd;AAEO,SAAS,8BAA8B,QAA8B;AAC1E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,mBAAmB,aAAa;AAC9B,aAAO,YAAY,SAAS;AAAA,IAC9B;AAAA,IACA,UAAU,MAAM,IAAI;AAClB,YAAM,aAAa,SAAS,QAAQ,EAAE;AAEtC,YAAM,0BACJ,2BAA2B,SA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AAA,IAC7C,GAAI,6BAA6B,CAACA,oBAAW,GAAGA,mBAAmB,CAAC,IAAI,CAAC;AAAA,IACzEA,mBAAe;AAAA,IACf,GAAI,mBAAmB,CAACC,aAAW,CAAC,IAAI,CAAC;AAAA,IACzC,GAAI,qBAAqB,CAACA,aAAa,GAAGD,oBAAU,CAAC,IAAI,CAAC;AAAA,IAC1DA,mBAAgB;AAAA,IAChBA,mBAAe;AAAA,IACfA,mBAAoB;AAAA,IACpBA,mBAAkB;AAAA,IAClB,kBAAiB;AAAA,IACjB,GAAI,eAAe,CAACC,aAAO,CAAC,IAAI,CAAC;AAAA,EACnC;AAEA,SAAO,CAACD,mBAAK,EAAE,aAAa,CAAC,GAAG,GAAG,YAAY;AACjD;AAEA,IAAO,gBAAQA;","names":["createIntegration","createIntegration","src_default","createIntegration","src_default","createIntegration","src_default","createIntegration","createIntegration","src_default"]}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/astro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@wix/auth-management": "^1.0.71",
|
|
6
6
|
"@wix/dashboard": "^1.3.40",
|
|
7
7
|
"@wix/editor": "^1.403.0",
|
|
8
8
|
"@wix/headless-localization-utils": "^1.0.10",
|
|
9
|
-
"@wix/headless-node": "^1.
|
|
10
|
-
"@wix/headless-site": "^1.
|
|
9
|
+
"@wix/headless-node": "^1.28.0",
|
|
10
|
+
"@wix/headless-site": "^1.28.0",
|
|
11
11
|
"@wix/headless-site-assets": "^1.0.9",
|
|
12
12
|
"@wix/sdk": "^1.20.0",
|
|
13
13
|
"@wix/sdk-runtime": "^1.0.0",
|
|
14
|
-
"@wix/sdk-types": "^1.
|
|
15
|
-
"@wix/site": "^1.
|
|
14
|
+
"@wix/sdk-types": "^1.17.0",
|
|
15
|
+
"@wix/site": "^1.37.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@wix/astro-auth": "0.0.0",
|
|
@@ -28,8 +28,9 @@
|
|
|
28
28
|
"@wix/astro-robots": "0.0.0",
|
|
29
29
|
"@wix/astro-site-component-panels-extensions": "0.0.0",
|
|
30
30
|
"@wix/astro-site-components-extensions": "0.0.0",
|
|
31
|
+
"@wix/astro-trusted-backoffice-extensions": "0.0.0",
|
|
31
32
|
"@wix/astro-viewer-api": "0.0.0",
|
|
32
|
-
"astro": "^5.
|
|
33
|
+
"astro": "^5.16.6",
|
|
33
34
|
"is-ci": "^4.1.0",
|
|
34
35
|
"outdent": "^0.8.0",
|
|
35
36
|
"tsup": "^8.5.0"
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
".": "./build/integration/index.js",
|
|
39
40
|
"./builders": "./build/integration/builders.js",
|
|
40
41
|
"./builders/experimental": "./build/integration/builders-experimental.js",
|
|
42
|
+
"./builders/trusted": "./build/integration/builders-trusted.js",
|
|
41
43
|
"./package.json": "./package.json"
|
|
42
44
|
},
|
|
43
45
|
"files": [
|
|
@@ -70,5 +72,5 @@
|
|
|
70
72
|
]
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
|
-
"falconPackageHash": "
|
|
75
|
+
"falconPackageHash": "b3edababb18b3ee139ee50bc046d92810bf0a5e065efbf7927c36758"
|
|
74
76
|
}
|