@wix/astro 2.10.1 → 2.11.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 +6 -0
- package/build/builders.js +42 -0
- package/build/builders.js.map +1 -0
- package/build/dependencies/astro-auth/browser-runtime/setup.js +1 -1
- package/build/dependencies/astro-auth/index.d.ts +7 -0
- package/build/dependencies/astro-auth/index.js +301 -0
- package/build/dependencies/astro-auth/index.js.map +1 -0
- package/build/dependencies/astro-backend-extensions/index.d.ts +77 -0
- package/build/dependencies/astro-backend-extensions/index.js +7279 -0
- package/build/dependencies/astro-backend-extensions/index.js.map +1 -0
- package/build/dependencies/astro-backoffice-extensions/index.d.ts +47 -0
- package/build/dependencies/astro-backoffice-extensions/index.js +7159 -0
- package/build/dependencies/astro-backoffice-extensions/index.js.map +1 -0
- package/build/dependencies/astro-core/index.d.ts +95 -0
- package/build/dependencies/astro-core/index.js +1055 -0
- package/build/dependencies/astro-core/index.js.map +1 -0
- package/build/dependencies/astro-custom-elements-extensions/browser-runtime/index.js +14 -16
- package/build/dependencies/astro-custom-elements-extensions/index.d.ts +24 -0
- package/build/dependencies/astro-custom-elements-extensions/index.js +10082 -0
- package/build/dependencies/astro-custom-elements-extensions/index.js.map +1 -0
- package/build/dependencies/astro-embedded-scripts-extensions/browser-runtime/setupContext.js +6 -10
- package/build/dependencies/astro-embedded-scripts-extensions/index.d.ts +18 -0
- package/build/dependencies/astro-embedded-scripts-extensions/index.js +8453 -0
- package/build/dependencies/astro-embedded-scripts-extensions/index.js.map +1 -0
- package/build/dependencies/astro-html-embeds/index.d.ts +5 -0
- package/build/dependencies/astro-html-embeds/index.js +25 -0
- package/build/dependencies/astro-html-embeds/index.js.map +1 -0
- package/build/dependencies/astro-payment-links/index.d.ts +5 -0
- package/build/dependencies/astro-payment-links/index.js +42 -0
- package/build/dependencies/astro-payment-links/index.js.map +1 -0
- package/build/dependencies/astro-robots/index.d.ts +5 -0
- package/build/dependencies/astro-robots/index.js +23 -0
- package/build/dependencies/astro-robots/index.js.map +1 -0
- package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/hmr.js +26 -0
- package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/sdk.js +12 -0
- package/build/dependencies/astro-site-components-extensions/browser-runtime/sdk.js +21 -0
- package/build/dependencies/astro-site-plugins-extensions/index.d.ts +20 -0
- package/build/dependencies/astro-site-plugins-extensions/index.js +49 -0
- package/build/dependencies/astro-site-plugins-extensions/index.js.map +1 -0
- package/build/dependencies/astro-viewer-api/index.d.ts +5 -0
- package/build/dependencies/astro-viewer-api/index.js +22 -0
- package/build/dependencies/astro-viewer-api/index.js.map +1 -0
- package/build/index.d.ts +16 -0
- package/build/index.js +56 -0
- package/build/index.js.map +1 -0
- package/build/integration/builders.d.ts +3 -2
- package/build/integration/builders.js +11 -9
- package/build/integration/builders.js.map +1 -1
- package/build/integration/{chunk-JFJIM45R.js → chunk-OJIGUJIG.js} +522 -207
- package/build/integration/chunk-OJIGUJIG.js.map +1 -0
- package/build/integration/index.js +16 -14
- package/build/integration/index.js.map +1 -1
- package/package.json +5 -4
- package/build/integration/chunk-JFJIM45R.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook } from '@wix/astro-backend-extensions';
|
|
2
|
+
export { backofficeExtensionMenuPlugin, backofficeExtensionWidget, backofficeModal, backofficePage } from '@wix/astro-backoffice-extensions';
|
|
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';
|
|
6
|
+
export { sitePlugin } from '@wix/astro-site-plugins-extensions';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/builders.ts
|
|
5
|
+
import {
|
|
6
|
+
ecomAdditionalFees,
|
|
7
|
+
ecomDiscountsTrigger,
|
|
8
|
+
ecomGiftCardsProvider,
|
|
9
|
+
ecomPaymentSettings,
|
|
10
|
+
ecomShippingRates,
|
|
11
|
+
ecomValidations,
|
|
12
|
+
webhook
|
|
13
|
+
} from "@wix/astro-backend-extensions";
|
|
14
|
+
import {
|
|
15
|
+
backofficeExtensionMenuPlugin,
|
|
16
|
+
backofficeExtensionWidget,
|
|
17
|
+
backofficeModal,
|
|
18
|
+
backofficePage
|
|
19
|
+
} from "@wix/astro-backoffice-extensions";
|
|
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";
|
|
23
|
+
import { sitePlugin } from "@wix/astro-site-plugins-extensions";
|
|
24
|
+
export {
|
|
25
|
+
app,
|
|
26
|
+
backofficeExtensionMenuPlugin,
|
|
27
|
+
backofficeExtensionWidget,
|
|
28
|
+
backofficeModal,
|
|
29
|
+
backofficePage,
|
|
30
|
+
customElement,
|
|
31
|
+
ecomAdditionalFees,
|
|
32
|
+
ecomDiscountsTrigger,
|
|
33
|
+
ecomGiftCardsProvider,
|
|
34
|
+
ecomPaymentSettings,
|
|
35
|
+
ecomShippingRates,
|
|
36
|
+
ecomValidations,
|
|
37
|
+
embeddedScript,
|
|
38
|
+
genericExtension,
|
|
39
|
+
sitePlugin,
|
|
40
|
+
webhook
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=builders.js.map
|
|
@@ -0,0 +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';\nexport { customElement } from '@wix/astro-custom-elements-extensions';\nexport { embeddedScript } from '@wix/astro-embedded-scripts-extensions';\nexport { sitePlugin } from '@wix/astro-site-plugins-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;AAC/B,SAAS,kBAAkB;","names":[]}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/index.ts
|
|
5
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
6
|
+
|
|
7
|
+
// ../fs-utils/src/index.ts
|
|
8
|
+
import {
|
|
9
|
+
access,
|
|
10
|
+
readFile as fsReadFile,
|
|
11
|
+
mkdir,
|
|
12
|
+
rm,
|
|
13
|
+
writeFile
|
|
14
|
+
} from "fs/promises";
|
|
15
|
+
import { EOL } from "os";
|
|
16
|
+
import { dirname } from "path";
|
|
17
|
+
import process from "process";
|
|
18
|
+
import { fileURLToPath } from "url";
|
|
19
|
+
var isWindows = process.platform === "win32";
|
|
20
|
+
function normalizePath(id) {
|
|
21
|
+
const filePath = typeof id === "string" ? id : fileURLToPath(id);
|
|
22
|
+
return isWindows ? slash(filePath) : filePath;
|
|
23
|
+
}
|
|
24
|
+
function slash(path) {
|
|
25
|
+
return path.replaceAll("\\", "/");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ../../node_modules/outdent/lib-module/index.js
|
|
29
|
+
function noop() {
|
|
30
|
+
var args = [];
|
|
31
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
32
|
+
args[_i] = arguments[_i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function createWeakMap() {
|
|
36
|
+
if (typeof WeakMap !== "undefined") {
|
|
37
|
+
return /* @__PURE__ */ new WeakMap();
|
|
38
|
+
} else {
|
|
39
|
+
return fakeSetOrMap();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function fakeSetOrMap() {
|
|
43
|
+
return {
|
|
44
|
+
add: noop,
|
|
45
|
+
delete: noop,
|
|
46
|
+
get: noop,
|
|
47
|
+
set: noop,
|
|
48
|
+
has: function(k) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
var hop = Object.prototype.hasOwnProperty;
|
|
54
|
+
var has = function(obj, prop) {
|
|
55
|
+
return hop.call(obj, prop);
|
|
56
|
+
};
|
|
57
|
+
function extend(target, source) {
|
|
58
|
+
for (var prop in source) {
|
|
59
|
+
if (has(source, prop)) {
|
|
60
|
+
target[prop] = source[prop];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return target;
|
|
64
|
+
}
|
|
65
|
+
var reLeadingNewline = /^[ \t]*(?:\r\n|\r|\n)/;
|
|
66
|
+
var reTrailingNewline = /(?:\r\n|\r|\n)[ \t]*$/;
|
|
67
|
+
var reStartsWithNewlineOrIsEmpty = /^(?:[\r\n]|$)/;
|
|
68
|
+
var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
|
|
69
|
+
var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
|
|
70
|
+
function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
|
|
71
|
+
var indentationLevel = 0;
|
|
72
|
+
var match = strings[0].match(reDetectIndentation);
|
|
73
|
+
if (match) {
|
|
74
|
+
indentationLevel = match[1].length;
|
|
75
|
+
}
|
|
76
|
+
var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
|
|
77
|
+
var reMatchIndent = new RegExp(reSource, "g");
|
|
78
|
+
if (firstInterpolatedValueSetsIndentationLevel) {
|
|
79
|
+
strings = strings.slice(1);
|
|
80
|
+
}
|
|
81
|
+
var newline = options.newline, trimLeadingNewline = options.trimLeadingNewline, trimTrailingNewline = options.trimTrailingNewline;
|
|
82
|
+
var normalizeNewlines = typeof newline === "string";
|
|
83
|
+
var l = strings.length;
|
|
84
|
+
var outdentedStrings = strings.map(function(v, i) {
|
|
85
|
+
v = v.replace(reMatchIndent, "$1");
|
|
86
|
+
if (i === 0 && trimLeadingNewline) {
|
|
87
|
+
v = v.replace(reLeadingNewline, "");
|
|
88
|
+
}
|
|
89
|
+
if (i === l - 1 && trimTrailingNewline) {
|
|
90
|
+
v = v.replace(reTrailingNewline, "");
|
|
91
|
+
}
|
|
92
|
+
if (normalizeNewlines) {
|
|
93
|
+
v = v.replace(/\r\n|\n|\r/g, function(_) {
|
|
94
|
+
return newline;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return v;
|
|
98
|
+
});
|
|
99
|
+
return outdentedStrings;
|
|
100
|
+
}
|
|
101
|
+
function concatStringsAndValues(strings, values) {
|
|
102
|
+
var ret = "";
|
|
103
|
+
for (var i = 0, l = strings.length; i < l; i++) {
|
|
104
|
+
ret += strings[i];
|
|
105
|
+
if (i < l - 1) {
|
|
106
|
+
ret += values[i];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return ret;
|
|
110
|
+
}
|
|
111
|
+
function isTemplateStringsArray(v) {
|
|
112
|
+
return has(v, "raw") && has(v, "length");
|
|
113
|
+
}
|
|
114
|
+
function createInstance(options) {
|
|
115
|
+
var arrayAutoIndentCache = createWeakMap();
|
|
116
|
+
var arrayFirstInterpSetsIndentCache = createWeakMap();
|
|
117
|
+
function outdent(stringsOrOptions) {
|
|
118
|
+
var values = [];
|
|
119
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
120
|
+
values[_i - 1] = arguments[_i];
|
|
121
|
+
}
|
|
122
|
+
if (isTemplateStringsArray(stringsOrOptions)) {
|
|
123
|
+
var strings = stringsOrOptions;
|
|
124
|
+
var firstInterpolatedValueSetsIndentationLevel = (values[0] === outdent || values[0] === defaultOutdent) && reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) && reStartsWithNewlineOrIsEmpty.test(strings[1]);
|
|
125
|
+
var cache = firstInterpolatedValueSetsIndentationLevel ? arrayFirstInterpSetsIndentCache : arrayAutoIndentCache;
|
|
126
|
+
var renderedArray = cache.get(strings);
|
|
127
|
+
if (!renderedArray) {
|
|
128
|
+
renderedArray = _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options);
|
|
129
|
+
cache.set(strings, renderedArray);
|
|
130
|
+
}
|
|
131
|
+
if (values.length === 0) {
|
|
132
|
+
return renderedArray[0];
|
|
133
|
+
}
|
|
134
|
+
var rendered = concatStringsAndValues(renderedArray, firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values);
|
|
135
|
+
return rendered;
|
|
136
|
+
} else {
|
|
137
|
+
return createInstance(extend(extend({}, options), stringsOrOptions || {}));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var fullOutdent = extend(outdent, {
|
|
141
|
+
string: function(str) {
|
|
142
|
+
return _outdentArray([str], false, options)[0];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
return fullOutdent;
|
|
146
|
+
}
|
|
147
|
+
var defaultOutdent = createInstance({
|
|
148
|
+
trimLeadingNewline: true,
|
|
149
|
+
trimTrailingNewline: true
|
|
150
|
+
});
|
|
151
|
+
if (typeof module !== "undefined") {
|
|
152
|
+
try {
|
|
153
|
+
module.exports = defaultOutdent;
|
|
154
|
+
Object.defineProperty(defaultOutdent, "__esModule", { value: true });
|
|
155
|
+
defaultOutdent.default = defaultOutdent;
|
|
156
|
+
defaultOutdent.outdent = defaultOutdent;
|
|
157
|
+
} catch (e) {
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// src/plugins/patchAstroInlineScripts.ts
|
|
162
|
+
function patchAstroInlineScripts() {
|
|
163
|
+
return {
|
|
164
|
+
name: "patch-astro-inline-scripts",
|
|
165
|
+
transform(code, id) {
|
|
166
|
+
const [_filename, rawQuery] = id.split(`?`, 2);
|
|
167
|
+
const query = Object.fromEntries(new URLSearchParams(rawQuery).entries());
|
|
168
|
+
if (query.astro == null || query.type !== "script" || query["lang.ts"] == null || code === "") {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
return defaultOutdent`
|
|
172
|
+
import 'astro:scripts/page.js';
|
|
173
|
+
|
|
174
|
+
${code}
|
|
175
|
+
`;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// src/plugins/setupContentCollectionContext.ts
|
|
181
|
+
import { relative } from "path";
|
|
182
|
+
var contentCollectionFilePaths = [
|
|
183
|
+
"content.config.mjs",
|
|
184
|
+
"content.config.js",
|
|
185
|
+
"content.config.mts",
|
|
186
|
+
"content.config.ts",
|
|
187
|
+
"content/config.mjs",
|
|
188
|
+
"content/config.js",
|
|
189
|
+
"content/config.mts",
|
|
190
|
+
"content/config.ts"
|
|
191
|
+
];
|
|
192
|
+
var setupContextualClientUrl = new URL(
|
|
193
|
+
"../build-runtime/runtime/backend/setupContextualClient.js",
|
|
194
|
+
import.meta.url
|
|
195
|
+
);
|
|
196
|
+
function setupContentCollectionContext(srcDir) {
|
|
197
|
+
return {
|
|
198
|
+
name: "setup-content-collection-context",
|
|
199
|
+
applyToEnvironment(environment) {
|
|
200
|
+
return environment.name === "ssr";
|
|
201
|
+
},
|
|
202
|
+
transform(code, id) {
|
|
203
|
+
const relativeId = relative(srcDir, id);
|
|
204
|
+
const isContentCollectionFile = contentCollectionFilePaths.includes(relativeId);
|
|
205
|
+
if (isContentCollectionFile) {
|
|
206
|
+
return defaultOutdent`
|
|
207
|
+
import '${normalizePath(setupContextualClientUrl)}';
|
|
208
|
+
|
|
209
|
+
${code}
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// src/index.ts
|
|
218
|
+
var setupContextUrl = new URL(
|
|
219
|
+
"../build-browser-runtime/setup.js",
|
|
220
|
+
import.meta.url
|
|
221
|
+
);
|
|
222
|
+
var createIntegration = ({
|
|
223
|
+
enableAuthRoutes
|
|
224
|
+
}) => {
|
|
225
|
+
return {
|
|
226
|
+
name: "@wix/astro/auth",
|
|
227
|
+
hooks: {
|
|
228
|
+
"astro:config:setup"({
|
|
229
|
+
addMiddleware,
|
|
230
|
+
config,
|
|
231
|
+
injectRoute,
|
|
232
|
+
injectScript,
|
|
233
|
+
updateConfig
|
|
234
|
+
}) {
|
|
235
|
+
const srcDir = fileURLToPath2(config.srcDir);
|
|
236
|
+
updateConfig({
|
|
237
|
+
vite: {
|
|
238
|
+
plugins: [
|
|
239
|
+
setupContentCollectionContext(srcDir),
|
|
240
|
+
patchAstroInlineScripts()
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
const setupContextCode = defaultOutdent`
|
|
245
|
+
import { WIX_CLIENT_ID } from 'astro:env/client';
|
|
246
|
+
import { setup } from '${normalizePath(setupContextUrl)}';
|
|
247
|
+
|
|
248
|
+
setup({ clientId: WIX_CLIENT_ID });
|
|
249
|
+
`;
|
|
250
|
+
injectScript("before-hydration", setupContextCode);
|
|
251
|
+
injectScript("page", setupContextCode);
|
|
252
|
+
addMiddleware({
|
|
253
|
+
entrypoint: new URL(
|
|
254
|
+
"../build-runtime/middleware/auth.js",
|
|
255
|
+
import.meta.url
|
|
256
|
+
),
|
|
257
|
+
order: "pre"
|
|
258
|
+
});
|
|
259
|
+
if (enableAuthRoutes) {
|
|
260
|
+
injectRoute({
|
|
261
|
+
entrypoint: new URL(
|
|
262
|
+
"../build-runtime/routes/login.js",
|
|
263
|
+
import.meta.url
|
|
264
|
+
),
|
|
265
|
+
pattern: "/api/auth/login",
|
|
266
|
+
prerender: false
|
|
267
|
+
});
|
|
268
|
+
injectRoute({
|
|
269
|
+
entrypoint: new URL(
|
|
270
|
+
"../build-runtime/routes/logout.js",
|
|
271
|
+
import.meta.url
|
|
272
|
+
),
|
|
273
|
+
pattern: "/api/auth/logout",
|
|
274
|
+
prerender: false
|
|
275
|
+
});
|
|
276
|
+
injectRoute({
|
|
277
|
+
entrypoint: new URL(
|
|
278
|
+
"../build-runtime/routes/callback.js",
|
|
279
|
+
import.meta.url
|
|
280
|
+
),
|
|
281
|
+
pattern: "/api/auth/callback",
|
|
282
|
+
prerender: false
|
|
283
|
+
});
|
|
284
|
+
injectRoute({
|
|
285
|
+
entrypoint: new URL(
|
|
286
|
+
"../build-runtime/routes/logout-callback.js",
|
|
287
|
+
import.meta.url
|
|
288
|
+
),
|
|
289
|
+
pattern: "/api/auth/logout-callback",
|
|
290
|
+
prerender: false
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
var index_default = createIntegration;
|
|
298
|
+
export {
|
|
299
|
+
index_default as default
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../../fs-utils/src/index.ts","../../../node_modules/outdent/src/index.ts","../src/plugins/patchAstroInlineScripts.ts","../src/plugins/setupContentCollectionContext.ts"],"sourcesContent":["import { fileURLToPath } from 'node:url';\nimport type { WixIntegration } from '@wix/astro-core';\nimport { normalizePath } from '@wix/fs-utils';\nimport { outdent } from 'outdent';\nimport { patchAstroInlineScripts } from './plugins/patchAstroInlineScripts.js';\nimport { setupContentCollectionContext } from './plugins/setupContentCollectionContext.js';\n\nconst setupContextUrl = new URL(\n '../build-browser-runtime/setup.js',\n import.meta.url\n);\n\nconst createIntegration = ({\n enableAuthRoutes,\n}: {\n enableAuthRoutes: 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 '../build-runtime/middleware/auth.js',\n import.meta.url\n ),\n order: 'pre',\n });\n\n // support built-in auth routes\n if (enableAuthRoutes) {\n injectRoute({\n entrypoint: new URL(\n '../build-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 '../build-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 '../build-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 '../build-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 {\n access,\n readFile as fsReadFile,\n mkdir,\n rm,\n writeFile,\n} from 'node:fs/promises';\nimport { EOL } from 'node:os';\nimport { dirname } from 'node:path';\nimport process from 'node:process';\nimport { fileURLToPath } from 'node:url';\n\nconst isWindows = process.platform === 'win32';\n\nexport async function clearDir(dir: string): Promise<void> {\n await rm(dir, { recursive: true });\n await mkdir(dir);\n}\n\n/**\n * Normalizes a file path (either an absolute string or a file URL) to be\n * compatible with the current OS (windows and linux).\n */\nexport function normalizePath(id: string | URL): string {\n const filePath = typeof id === 'string' ? id : fileURLToPath(id);\n return isWindows ? slash(filePath) : filePath;\n}\n\nexport async function outputDir(dir: string): Promise<void> {\n await mkdir(dir, { recursive: true });\n}\n\nexport async function pathExists(path: string): Promise<boolean> {\n return access(path)\n .then(() => true)\n .catch(() => false);\n}\n\nexport async function readJson(file: string): Promise<unknown> {\n return JSON.parse(await fsReadFile(file, 'utf-8'));\n}\n\nexport async function writeJson(\n filePath: string,\n object: unknown,\n opts: { spaces: number } = { spaces: 2 }\n): Promise<void> {\n const str = toJsonString(object, opts);\n await outputDir(dirname(filePath));\n\n await writeFile(filePath, str, 'utf-8');\n}\n\nfunction slash(path: string) {\n return path.replaceAll('\\\\', '/');\n}\n\nfunction toJsonString(object: unknown, opts?: { spaces: number }) {\n return `${JSON.stringify(object, null, opts?.spaces)}${EOL}`;\n}\n","type TODO = any;\n\n// In the absence of a WeakSet or WeakMap implementation, don't break, but don't cache either.\nfunction noop(...args: Array<any>) {}\nfunction createWeakMap<K extends object, V>(): MyWeakMap<K, V> {\n if (typeof WeakMap !== \"undefined\") {\n return new WeakMap<K, V>();\n } else {\n return fakeSetOrMap<K, V>();\n }\n}\n\ntype MyWeakMap<K extends object, V> = Pick<\n WeakMap<K, V>,\n \"delete\" | \"get\" | \"set\" | \"has\"\n>;\ntype MyWeakSetMap<K extends object, V> =\n & Pick<WeakMap<K, V>, \"delete\" | \"get\" | \"set\" | \"has\">\n & Pick<WeakSet<K>, \"add\">;\n\n/**\n * Creates and returns a no-op implementation of a WeakMap / WeakSet that never stores anything.\n */\nfunction fakeSetOrMap<K extends object, V = any>(): MyWeakSetMap<K, V> {\n return {\n add: noop as WeakSet<K>[\"add\"],\n delete: noop as WeakMap<K, V>[\"delete\"],\n get: noop as WeakMap<K, V>[\"get\"],\n set: noop as WeakMap<K, V>[\"set\"],\n has(k: K) {\n return false;\n },\n };\n}\n\n// Safe hasOwnProperty\nconst hop = Object.prototype.hasOwnProperty;\nconst has = function (obj: object, prop: string): boolean {\n return hop.call(obj, prop);\n};\n\n// Copy all own enumerable properties from source to target\nfunction extend<T, S extends object>(target: T, source: S) {\n type Extended = T & S;\n for (const prop in source) {\n if (has(source, prop)) {\n (target as any)[prop] = source[prop];\n }\n }\n return target as Extended;\n}\n\nconst reLeadingNewline = /^[ \\t]*(?:\\r\\n|\\r|\\n)/;\nconst reTrailingNewline = /(?:\\r\\n|\\r|\\n)[ \\t]*$/;\nconst reStartsWithNewlineOrIsEmpty = /^(?:[\\r\\n]|$)/;\nconst reDetectIndentation = /(?:\\r\\n|\\r|\\n)([ \\t]*)(?:[^ \\t\\r\\n]|$)/;\nconst reOnlyWhitespaceWithAtLeastOneNewline = /^[ \\t]*[\\r\\n][ \\t\\r\\n]*$/;\n\nfunction _outdentArray(\n strings: ReadonlyArray<string>,\n firstInterpolatedValueSetsIndentationLevel: boolean,\n options: Options,\n) {\n // If first interpolated value is a reference to outdent,\n // determine indentation level from the indentation of the interpolated value.\n let indentationLevel = 0;\n\n const match = strings[0].match(reDetectIndentation);\n if (match) {\n indentationLevel = match[1].length;\n }\n\n const reSource = `(\\\\r\\\\n|\\\\r|\\\\n).{0,${indentationLevel}}`;\n const reMatchIndent = new RegExp(reSource, \"g\");\n\n if (firstInterpolatedValueSetsIndentationLevel) {\n strings = strings.slice(1);\n }\n\n const { newline, trimLeadingNewline, trimTrailingNewline } = options;\n const normalizeNewlines = typeof newline === \"string\";\n const l = strings.length;\n const outdentedStrings = strings.map((v, i) => {\n // Remove leading indentation from all lines\n v = v.replace(reMatchIndent, \"$1\");\n // Trim a leading newline from the first string\n if (i === 0 && trimLeadingNewline) {\n v = v.replace(reLeadingNewline, \"\");\n }\n // Trim a trailing newline from the last string\n if (i === l - 1 && trimTrailingNewline) {\n v = v.replace(reTrailingNewline, \"\");\n }\n // Normalize newlines\n if (normalizeNewlines) {\n v = v.replace(/\\r\\n|\\n|\\r/g, (_) => newline as string);\n }\n return v;\n });\n return outdentedStrings;\n}\n\nfunction concatStringsAndValues(\n strings: ReadonlyArray<string>,\n values: ReadonlyArray<any>,\n): string {\n let ret = \"\";\n for (let i = 0, l = strings.length; i < l; i++) {\n ret += strings[i];\n if (i < l - 1) {\n ret += values[i];\n }\n }\n return ret;\n}\n\nfunction isTemplateStringsArray(v: any): v is TemplateStringsArray {\n return has(v, \"raw\") && has(v, \"length\");\n}\n\n/**\n * It is assumed that opts will not change. If this is a problem, clone your options object and pass the clone to\n * makeInstance\n * @param options\n * @return {outdent}\n */\nfunction createInstance(options: Options): Outdent {\n /** Cache of pre-processed template literal arrays */\n const arrayAutoIndentCache = createWeakMap<\n TemplateStringsArray,\n Array<string>\n >();\n /**\n * Cache of pre-processed template literal arrays, where first interpolated value is a reference to outdent,\n * before interpolated values are injected.\n */\n const arrayFirstInterpSetsIndentCache = createWeakMap<\n TemplateStringsArray,\n Array<string>\n >();\n\n /* tslint:disable:no-shadowed-variable */\n function outdent(\n stringsOrOptions: TemplateStringsArray,\n ...values: Array<any>\n ): string;\n function outdent(stringsOrOptions: Options): Outdent;\n function outdent(\n stringsOrOptions: TemplateStringsArray | Options,\n ...values: Array<any>\n ): string | Outdent {\n /* tslint:enable:no-shadowed-variable */\n if (isTemplateStringsArray(stringsOrOptions)) {\n const strings = stringsOrOptions;\n\n // Is first interpolated value a reference to outdent, alone on its own line, without any preceding non-whitespace?\n const firstInterpolatedValueSetsIndentationLevel =\n (values[0] === outdent || values[0] === defaultOutdent) &&\n reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) &&\n reStartsWithNewlineOrIsEmpty.test(strings[1]);\n\n // Perform outdentation\n const cache = firstInterpolatedValueSetsIndentationLevel\n ? arrayFirstInterpSetsIndentCache\n : arrayAutoIndentCache;\n let renderedArray = cache.get(strings);\n if (!renderedArray) {\n renderedArray = _outdentArray(\n strings,\n firstInterpolatedValueSetsIndentationLevel,\n options,\n );\n cache.set(strings, renderedArray);\n }\n /** If no interpolated values, skip concatenation step */\n if (values.length === 0) {\n return renderedArray[0];\n }\n /** Concatenate string literals with interpolated values */\n const rendered = concatStringsAndValues(\n renderedArray,\n firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values,\n );\n\n return rendered;\n } else {\n // Create and return a new instance of outdent with the given options\n return createInstance(\n extend(extend({}, options), stringsOrOptions || {}),\n );\n }\n }\n\n const fullOutdent = extend(outdent, {\n string(str: string): string {\n return _outdentArray([str], false, options)[0];\n },\n });\n\n return fullOutdent;\n}\n\nconst defaultOutdent = createInstance({\n trimLeadingNewline: true,\n trimTrailingNewline: true,\n});\n\nexport interface Outdent {\n /**\n * Remove indentation from a template literal.\n */\n (strings: TemplateStringsArray, ...values: Array<any>): string;\n /**\n * Create and return a new Outdent instance with the given options.\n */\n (options: Options): Outdent;\n\n /**\n * Remove indentation from a string\n */\n string(str: string): string;\n\n // /**\n // * Remove indentation from a template literal, but return a tuple of the\n // * outdented TemplateStringsArray and\n // */\n // pass(strings: TemplateStringsArray, ...values: Array<any>): [TemplateStringsArray, ...Array<any>];\n}\nexport interface Options {\n trimLeadingNewline?: boolean;\n trimTrailingNewline?: boolean;\n /**\n * Normalize all newlines in the template literal to this value.\n * \n * If `null`, newlines are left untouched.\n * \n * Newlines that get normalized are '\\r\\n', '\\r', and '\\n'.\n * \n * Newlines within interpolated values are *never* normalized.\n * \n * Although intended for normalizing to '\\n' or '\\r\\n',\n * you can also set to any string; for example ' '.\n */\n newline?: string | null;\n}\n\n// Named exports. Simple and preferred.\n// import outdent from 'outdent';\nexport default defaultOutdent;\n// import {outdent} from 'outdent';\nexport { defaultOutdent as outdent };\n\n// In CommonJS environments, enable `var outdent = require('outdent');` by\n// replacing the exports object.\n// Make sure that our replacement includes the named exports from above.\ndeclare var module: any;\nif (typeof module !== \"undefined\") {\n // In webpack harmony-modules environments, module.exports is read-only,\n // so we fail gracefully.\n try {\n module.exports = defaultOutdent;\n Object.defineProperty(defaultOutdent, \"__esModule\", { value: true });\n (defaultOutdent as any).default = defaultOutdent;\n (defaultOutdent as any).outdent = defaultOutdent;\n } catch (e) {}\n}\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/fs-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 '../build-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"],"mappings":";;;;AAAA,SAAS,iBAAAA,sBAAqB;;;ACA9B;AAAA,EACE;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW;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AAA,QACT,CAAC;AAGD,YAAI,kBAAkB;AACpB,sBAAY;AAAA,YACV,YAAY,IAAI;AAAA,cACd;AAAA,cACA,YAAY;AAAA,YACd;AAAA,YACA,SAAS;AAAA,YACT,WAAW;AAAA,UACb,CAAC;AAED,sBAAY;AAAA,YACV,YAAY,IAAI;AAAA,cACd;AAAA,cACA,YAAY;AAAA,YACd;AAAA,YACA,SAAS;AAAA,YACT,WAAW;AAAA,UACb,CAAC;AAED,sBAAY;AAAA,YACV,YAAY,IAAI;AAAA,cACd;AAAA,cACA,YAAY;AAAA,YACd;AAAA,YACA,SAAS;AAAA,YACT,WAAW;AAAA,UACb,CAAC;AAED,sBAAY;AAAA,YACV,YAAY,IAAI;AAAA,cACd;AAAA,cACA,YAAY;AAAA,YACd;AAAA,YACA,SAAS;AAAA,YACT,WAAW;AAAA,UACb,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["fileURLToPath","fileURLToPath"]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { WixIntegration } from '@wix/astro-core';
|
|
2
|
+
|
|
3
|
+
declare const createIntegration: () => WixIntegration;
|
|
4
|
+
|
|
5
|
+
interface EcomAdditionalFees {
|
|
6
|
+
type: 'EcomAdditionalFees';
|
|
7
|
+
options: Options$6;
|
|
8
|
+
}
|
|
9
|
+
interface Options$6 {
|
|
10
|
+
id: string;
|
|
11
|
+
source: string;
|
|
12
|
+
}
|
|
13
|
+
declare function ecomAdditionalFees(options: Options$6): EcomAdditionalFees;
|
|
14
|
+
|
|
15
|
+
interface EcomDiscountsTrigger {
|
|
16
|
+
type: 'EcomDiscountsTrigger';
|
|
17
|
+
options: Options$5;
|
|
18
|
+
}
|
|
19
|
+
interface Options$5 {
|
|
20
|
+
id: string;
|
|
21
|
+
source: string;
|
|
22
|
+
}
|
|
23
|
+
declare function ecomDiscountsTrigger(options: Options$5): EcomDiscountsTrigger;
|
|
24
|
+
|
|
25
|
+
interface EcomGiftCardsProvider {
|
|
26
|
+
type: 'EcomGiftCardsProvider';
|
|
27
|
+
options: Options$4;
|
|
28
|
+
}
|
|
29
|
+
interface Options$4 {
|
|
30
|
+
id: string;
|
|
31
|
+
source: string;
|
|
32
|
+
}
|
|
33
|
+
declare function ecomGiftCardsProvider(options: Options$4): EcomGiftCardsProvider;
|
|
34
|
+
|
|
35
|
+
interface EcomPaymentSettings {
|
|
36
|
+
type: 'EcomPaymentSettings';
|
|
37
|
+
options: Options$3;
|
|
38
|
+
}
|
|
39
|
+
interface Options$3 {
|
|
40
|
+
id: string;
|
|
41
|
+
source: string;
|
|
42
|
+
}
|
|
43
|
+
declare function ecomPaymentSettings(options: Options$3): EcomPaymentSettings;
|
|
44
|
+
|
|
45
|
+
interface EcomShippingRates {
|
|
46
|
+
type: 'EcomShippingRates';
|
|
47
|
+
options: Options$2;
|
|
48
|
+
}
|
|
49
|
+
interface Options$2 {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
source: string;
|
|
53
|
+
}
|
|
54
|
+
declare function ecomShippingRates(options: Options$2): EcomShippingRates;
|
|
55
|
+
|
|
56
|
+
interface EcomValidations {
|
|
57
|
+
type: 'EcomValidations';
|
|
58
|
+
options: Options$1;
|
|
59
|
+
}
|
|
60
|
+
interface Options$1 {
|
|
61
|
+
id: string;
|
|
62
|
+
source: string;
|
|
63
|
+
}
|
|
64
|
+
declare function ecomValidations(options: Options$1): EcomValidations;
|
|
65
|
+
|
|
66
|
+
interface Webhook {
|
|
67
|
+
type: 'Webhook';
|
|
68
|
+
options: Options;
|
|
69
|
+
}
|
|
70
|
+
interface Options {
|
|
71
|
+
id: string;
|
|
72
|
+
slug: string;
|
|
73
|
+
source: string;
|
|
74
|
+
}
|
|
75
|
+
declare function webhook(options: Options): Webhook;
|
|
76
|
+
|
|
77
|
+
export { createIntegration as default, ecomAdditionalFees, ecomDiscountsTrigger, ecomGiftCardsProvider, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
|