@wix/astro 2.31.0 → 2.33.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-viewer-api/backend-runtime/api.d.mts +2 -2
- package/build/dependencies/astro-viewer-api/backend-runtime/api.mjs +3 -3
- package/build/integration/{builders-DRquPmdR.d.mts → builders-Bh0je8Uz.d.mts} +2 -2
- package/build/integration/builders-experimental.d.mts +22 -8
- package/build/integration/builders-experimental.mjs +34 -3
- package/build/integration/builders-trusted.d.mts +2 -2
- package/build/integration/builders-trusted.mjs +1 -1
- package/build/integration/builders.d.mts +3 -3
- package/build/integration/context-provider-editor-BaSPz-u-.mjs +31 -0
- package/build/integration/{index-DmpTY60h.d.mts → index-BwfPMCMA.d.mts} +1 -1
- package/build/integration/index.d.mts +3 -3
- package/build/integration/index.mjs +296 -338
- package/package.json +2 -2
- /package/build/integration/{index-Bv6fcDr9.d.mts → index-DFtv5dHt.d.mts} +0 -0
- /package/build/integration/{trusted-backoffice-component-CkJ9DWRp.mjs → trusted-backoffice-component-CCg08AU1.mjs} +0 -0
|
@@ -10,7 +10,7 @@ function elevate(restModule) {
|
|
|
10
10
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/routes/api.ts
|
|
13
|
-
const
|
|
13
|
+
const ALL = async ({ url }) => {
|
|
14
14
|
const { redirectUrlWixPages } = await elevate(oAuthApps.getOAuthApp)(WIX_CLIENT_ID);
|
|
15
15
|
ok(redirectUrlWixPages != null);
|
|
16
16
|
const baseWixUrl = new URL(redirectUrlWixPages);
|
|
@@ -19,9 +19,9 @@ const GET = async ({ url }) => {
|
|
|
19
19
|
for (const [key, value] of [...baseWixUrl.searchParams.entries(), ...url.searchParams.entries()]) redirectUrl.searchParams.append(key, value);
|
|
20
20
|
return new Response(null, {
|
|
21
21
|
headers: { Location: redirectUrl.toString() },
|
|
22
|
-
status:
|
|
22
|
+
status: 307
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
|
-
export {
|
|
27
|
+
export { ALL };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as BaseExtension, n as genericExtension } from "./index-
|
|
2
|
-
import { a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, o as webhookBundler, p as ecomDiscountTriggers, r as embeddedScript, s as servicePluginBundler, t as siteComponent, u as ecomShippingRates } from "./index-
|
|
1
|
+
import { i as BaseExtension, n as genericExtension } from "./index-DFtv5dHt.mjs";
|
|
2
|
+
import { a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, o as webhookBundler, p as ecomDiscountTriggers, r as embeddedScript, s as servicePluginBundler, t as siteComponent, u as ecomShippingRates } from "./index-BwfPMCMA.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../astro-backoffice-extensions/src/builders/backofficeExtensionMenuPlugin.d.ts
|
|
5
5
|
interface BackofficeExtensionMenuPlugin {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { i as BaseExtension } from "./index-
|
|
1
|
+
import { i as BaseExtension, t as GenericExtension } from "./index-DFtv5dHt.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../astro-context-providers-extensions/src/builders.d.ts
|
|
4
|
-
interface
|
|
5
|
-
type: "ContextProvider";
|
|
6
|
-
options: Options$1;
|
|
7
|
-
}
|
|
8
|
-
interface Options$1 {
|
|
4
|
+
interface Options$3 {
|
|
9
5
|
id: string;
|
|
10
6
|
type: string;
|
|
11
7
|
context?: Record<string, unknown>;
|
|
@@ -26,7 +22,21 @@ interface Options$1 {
|
|
|
26
22
|
};
|
|
27
23
|
};
|
|
28
24
|
}
|
|
29
|
-
declare function contextProvider(options: Options$
|
|
25
|
+
declare function contextProvider(options: Options$3): GenericExtension;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../astro-context-providers-extensions/src/bundlers/context-provider-client.d.ts
|
|
28
|
+
interface Options$2 {
|
|
29
|
+
hook: string;
|
|
30
|
+
source: string;
|
|
31
|
+
}
|
|
32
|
+
declare function contextProviderClientBundler(options: Options$2): string;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../astro-context-providers-extensions/src/bundlers/context-provider-editor.d.ts
|
|
35
|
+
interface Options$1 {
|
|
36
|
+
hook: string;
|
|
37
|
+
source: string;
|
|
38
|
+
}
|
|
39
|
+
declare function contextProviderEditorBundler(options: Options$1): string;
|
|
30
40
|
//#endregion
|
|
31
41
|
//#region ../astro-function-libraries-extensions/src/builders.d.ts
|
|
32
42
|
interface FunctionLibrary extends BaseExtension {
|
|
@@ -52,5 +62,9 @@ declare const extensions: {
|
|
|
52
62
|
contextProvider: typeof contextProvider;
|
|
53
63
|
functionLibrary: typeof functionLibrary;
|
|
54
64
|
};
|
|
65
|
+
declare const bundlers: {
|
|
66
|
+
contextProviderClient: typeof contextProviderClientBundler;
|
|
67
|
+
contextProviderEditor: typeof contextProviderEditorBundler;
|
|
68
|
+
};
|
|
55
69
|
//#endregion
|
|
56
|
-
export { extensions };
|
|
70
|
+
export { bundlers, extensions };
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
+
import { i as contextProviderClientBundler, n as contextProviderEditorBundler } from "./context-provider-editor-BaSPz-u-.mjs";
|
|
2
|
+
|
|
1
3
|
//#region ../astro-context-providers-extensions/src/builders.ts
|
|
2
4
|
function contextProvider(options) {
|
|
5
|
+
const { id, resources, ...rest } = options;
|
|
3
6
|
return {
|
|
4
|
-
type: "
|
|
5
|
-
options
|
|
7
|
+
type: "GenericExtension",
|
|
8
|
+
options: {
|
|
9
|
+
compId: id,
|
|
10
|
+
compType: "EDITOR_CONTEXT_PROVIDER",
|
|
11
|
+
compData: { editorContextProvider: {
|
|
12
|
+
...rest,
|
|
13
|
+
id,
|
|
14
|
+
resources: {
|
|
15
|
+
...resources,
|
|
16
|
+
client: {
|
|
17
|
+
...resources.client,
|
|
18
|
+
url: contextProviderClientBundler({
|
|
19
|
+
hook: resources.contextSpecifier.hook,
|
|
20
|
+
source: resources.client.url
|
|
21
|
+
})
|
|
22
|
+
},
|
|
23
|
+
...resources.editor != null ? { editor: {
|
|
24
|
+
...resources.editor,
|
|
25
|
+
url: contextProviderEditorBundler({
|
|
26
|
+
hook: resources.contextSpecifier.hook,
|
|
27
|
+
source: resources.editor.url
|
|
28
|
+
})
|
|
29
|
+
} } : {}
|
|
30
|
+
}
|
|
31
|
+
} }
|
|
32
|
+
}
|
|
6
33
|
};
|
|
7
34
|
}
|
|
8
35
|
|
|
@@ -21,6 +48,10 @@ const extensions = {
|
|
|
21
48
|
contextProvider,
|
|
22
49
|
functionLibrary
|
|
23
50
|
};
|
|
51
|
+
const bundlers = {
|
|
52
|
+
contextProviderClient: contextProviderClientBundler,
|
|
53
|
+
contextProviderEditor: contextProviderEditorBundler
|
|
54
|
+
};
|
|
24
55
|
|
|
25
56
|
//#endregion
|
|
26
|
-
export { extensions };
|
|
57
|
+
export { bundlers, extensions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as genericExtension, r as app, t as GenericExtension } from "./index-
|
|
2
|
-
import { a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, o as webhookBundler, p as ecomDiscountTriggers, r as embeddedScript, s as servicePluginBundler, t as siteComponent, u as ecomShippingRates } from "./index-
|
|
1
|
+
import { n as genericExtension, r as app, t as GenericExtension } from "./index-DFtv5dHt.mjs";
|
|
2
|
+
import { a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, o as webhookBundler, p as ecomDiscountTriggers, r as embeddedScript, s as servicePluginBundler, t as siteComponent, u as ecomShippingRates } from "./index-BwfPMCMA.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../dev-center-schemas/src/components/backoffice.d.ts
|
|
5
5
|
interface DevCenterBackofficeScriptAsset {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as webhookBundler, a as customElement, c as webhook, d as ecomPaymentSettings, f as ecomGiftCards, h as bookingsStaffSortingProvider, i as sitePlugin, l as ecomValidations, m as ecomAdditionalFees, n as siteComponentPanel, o as app, p as ecomDiscountTriggers, r as embeddedScript, s as genericExtension, t as siteComponent, u as ecomShippingRates, y as servicePluginBundler } from "./builders-DVfxT6EC.mjs";
|
|
2
|
-
import { n as trustedBackofficeComponentBundler } from "./trusted-backoffice-component-
|
|
2
|
+
import { n as trustedBackofficeComponentBundler } from "./trusted-backoffice-component-CCg08AU1.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../astro-trusted-backoffice-extensions/src/builders/trustedBackofficePage.ts
|
|
5
5
|
function trustedBackofficePage(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as app } from "./index-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as extensions, t as bundlers } from "./builders-
|
|
1
|
+
import { r as app } from "./index-DFtv5dHt.mjs";
|
|
2
|
+
import "./index-BwfPMCMA.mjs";
|
|
3
|
+
import { n as extensions, t as bundlers } from "./builders-Bh0je8Uz.mjs";
|
|
4
4
|
export { app, bundlers, extensions };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
|
|
3
|
+
//#region ../astro-context-providers-extensions/src/bundlers/context-provider-client.ts
|
|
4
|
+
const ContextProviderClientBundlerType = Symbol.for("@wix/astro-context-providers-extensions:ContextProviderClientBundler");
|
|
5
|
+
function contextProviderClientBundler(options) {
|
|
6
|
+
return {
|
|
7
|
+
id: createHash("sha256").update(JSON.stringify({
|
|
8
|
+
type: "ContextProviderClientBundler",
|
|
9
|
+
options
|
|
10
|
+
})).digest("hex"),
|
|
11
|
+
type: ContextProviderClientBundlerType,
|
|
12
|
+
options
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../astro-context-providers-extensions/src/bundlers/context-provider-editor.ts
|
|
18
|
+
const ContextProviderEditorBundlerType = Symbol.for("@wix/astro-context-providers-extensions:ContextProviderEditorBundler");
|
|
19
|
+
function contextProviderEditorBundler(options) {
|
|
20
|
+
return {
|
|
21
|
+
id: createHash("sha256").update(JSON.stringify({
|
|
22
|
+
type: "ContextProviderEditorBundler",
|
|
23
|
+
options
|
|
24
|
+
})).digest("hex"),
|
|
25
|
+
type: ContextProviderEditorBundlerType,
|
|
26
|
+
options
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { contextProviderClientBundler as i, contextProviderEditorBundler as n, ContextProviderClientBundlerType as r, ContextProviderEditorBundlerType as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as BaseExtension, t as GenericExtension } from "./index-
|
|
1
|
+
import { i as BaseExtension, t as GenericExtension } from "./index-DFtv5dHt.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../dev-center-schemas/src/components/custom-element.d.ts
|
|
4
4
|
interface DevCenterCustomElementBehaviors {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { n as extensions } from "./builders-
|
|
1
|
+
import "./index-DFtv5dHt.mjs";
|
|
2
|
+
import "./index-BwfPMCMA.mjs";
|
|
3
|
+
import { n as extensions } from "./builders-Bh0je8Uz.mjs";
|
|
4
4
|
import { AstroIntegration } from "astro";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { g as WebhookBundlerType, v as ServicePluginBundlerType } from "./builders-DVfxT6EC.mjs";
|
|
2
2
|
import { n as extensions } from "./builders-B9yQdgSz.mjs";
|
|
3
|
-
import { t as
|
|
3
|
+
import { r as ContextProviderClientBundlerType, t as ContextProviderEditorBundlerType } from "./context-provider-editor-BaSPz-u-.mjs";
|
|
4
|
+
import { t as TrustedBackofficeComponentBundlerType } from "./trusted-backoffice-component-CCg08AU1.mjs";
|
|
4
5
|
import { createRequire } from "node:module";
|
|
5
6
|
import { fileURLToPath } from "node:url";
|
|
6
7
|
import { ok } from "node:assert";
|
|
@@ -840,13 +841,13 @@ async function loadModule({ id, devServer }) {
|
|
|
840
841
|
|
|
841
842
|
//#endregion
|
|
842
843
|
//#region ../astro-backend-extensions/src/utils/getSupportedBundlers.ts
|
|
843
|
-
function getSupportedBundlers$
|
|
844
|
-
return model.extensions.filter((extension) => extension.type === "GenericExtension").flatMap((extension) => getSupportedBundlersInExtension$
|
|
844
|
+
function getSupportedBundlers$2(model) {
|
|
845
|
+
return model.extensions.filter((extension) => extension.type === "GenericExtension").flatMap((extension) => getSupportedBundlersInExtension$2(extension).map((bundler) => ({
|
|
845
846
|
bundler,
|
|
846
847
|
extension
|
|
847
848
|
})));
|
|
848
849
|
}
|
|
849
|
-
function getSupportedBundlersInExtension$
|
|
850
|
+
function getSupportedBundlersInExtension$2(extension) {
|
|
850
851
|
return deepFind(extension.options, (value) => {
|
|
851
852
|
if ("type" in value && (value.type === WebhookBundlerType || value.type === ServicePluginBundlerType)) return value;
|
|
852
853
|
return false;
|
|
@@ -905,7 +906,7 @@ function viteVirtualRouterPlugin({ name, router }) {
|
|
|
905
906
|
//#endregion
|
|
906
907
|
//#region ../astro-backend-extensions/src/utils/getBackendBundler.ts
|
|
907
908
|
function getBackendBundler(model, id) {
|
|
908
|
-
return getSupportedBundlers$
|
|
909
|
+
return getSupportedBundlers$2(model).find(({ bundler }) => bundler.id === id);
|
|
909
910
|
}
|
|
910
911
|
|
|
911
912
|
//#endregion
|
|
@@ -959,7 +960,7 @@ function virtualModulesPlugin$5({ model }) {
|
|
|
959
960
|
//#endregion
|
|
960
961
|
//#region ../astro-backend-extensions/src/vite/getViteConfig.ts
|
|
961
962
|
function getViteConfig$4({ name, config: astroConfig, createExtensionViteConfig, model }) {
|
|
962
|
-
const entries = getSupportedBundlers$
|
|
963
|
+
const entries = getSupportedBundlers$2(model).map(({ bundler }) => getVirtualModuleIdForBackendExtension(bundler.id));
|
|
963
964
|
return createExtensionViteConfig({
|
|
964
965
|
name,
|
|
965
966
|
config: {
|
|
@@ -1071,7 +1072,7 @@ const createIntegration$17 = () => {
|
|
|
1071
1072
|
async "wix:build:setup"({ createExtensionViteConfig, target, updateConfig, vite }) {
|
|
1072
1073
|
if (target === "client") return;
|
|
1073
1074
|
ok(model);
|
|
1074
|
-
updateConfig({ plugins: [virtualEntriesPlugin(getSupportedBundlers$
|
|
1075
|
+
updateConfig({ plugins: [virtualEntriesPlugin(getSupportedBundlers$2(model).length > 0 ? await build$1(getViteConfig$4({
|
|
1075
1076
|
name: "backend-extensions",
|
|
1076
1077
|
config: vite,
|
|
1077
1078
|
createExtensionViteConfig,
|
|
@@ -1088,7 +1089,7 @@ const createIntegration$17 = () => {
|
|
|
1088
1089
|
optimizeDeps: { noDiscovery: false }
|
|
1089
1090
|
}
|
|
1090
1091
|
});
|
|
1091
|
-
const bundlerExtensions = getSupportedBundlers$
|
|
1092
|
+
const bundlerExtensions = getSupportedBundlers$2(model);
|
|
1092
1093
|
for (const { bundler, extension } of bundlerExtensions) await updateAppManifestComponent(extension.options.compId, async (current) => {
|
|
1093
1094
|
ok(temporaryViteServer);
|
|
1094
1095
|
return createBundlerManifest({
|
|
@@ -7623,226 +7624,6 @@ const createIntegration$16 = () => {
|
|
|
7623
7624
|
};
|
|
7624
7625
|
};
|
|
7625
7626
|
|
|
7626
|
-
//#endregion
|
|
7627
|
-
//#region ../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
7628
|
-
function isPrimitive(value) {
|
|
7629
|
-
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
7630
|
-
}
|
|
7631
|
-
|
|
7632
|
-
//#endregion
|
|
7633
|
-
//#region ../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
7634
|
-
function isTypedArray(x) {
|
|
7635
|
-
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
7636
|
-
}
|
|
7637
|
-
|
|
7638
|
-
//#endregion
|
|
7639
|
-
//#region ../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
7640
|
-
function getSymbols(object) {
|
|
7641
|
-
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
7642
|
-
}
|
|
7643
|
-
|
|
7644
|
-
//#endregion
|
|
7645
|
-
//#region ../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
7646
|
-
function getTag(value) {
|
|
7647
|
-
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
7648
|
-
return Object.prototype.toString.call(value);
|
|
7649
|
-
}
|
|
7650
|
-
|
|
7651
|
-
//#endregion
|
|
7652
|
-
//#region ../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
7653
|
-
const regexpTag = "[object RegExp]";
|
|
7654
|
-
const stringTag = "[object String]";
|
|
7655
|
-
const numberTag = "[object Number]";
|
|
7656
|
-
const booleanTag = "[object Boolean]";
|
|
7657
|
-
const argumentsTag = "[object Arguments]";
|
|
7658
|
-
const symbolTag = "[object Symbol]";
|
|
7659
|
-
const dateTag = "[object Date]";
|
|
7660
|
-
const mapTag = "[object Map]";
|
|
7661
|
-
const setTag = "[object Set]";
|
|
7662
|
-
const arrayTag = "[object Array]";
|
|
7663
|
-
const arrayBufferTag = "[object ArrayBuffer]";
|
|
7664
|
-
const objectTag = "[object Object]";
|
|
7665
|
-
const dataViewTag = "[object DataView]";
|
|
7666
|
-
const uint8ArrayTag = "[object Uint8Array]";
|
|
7667
|
-
const uint8ClampedArrayTag = "[object Uint8ClampedArray]";
|
|
7668
|
-
const uint16ArrayTag = "[object Uint16Array]";
|
|
7669
|
-
const uint32ArrayTag = "[object Uint32Array]";
|
|
7670
|
-
const int8ArrayTag = "[object Int8Array]";
|
|
7671
|
-
const int16ArrayTag = "[object Int16Array]";
|
|
7672
|
-
const int32ArrayTag = "[object Int32Array]";
|
|
7673
|
-
const float32ArrayTag = "[object Float32Array]";
|
|
7674
|
-
const float64ArrayTag = "[object Float64Array]";
|
|
7675
|
-
|
|
7676
|
-
//#endregion
|
|
7677
|
-
//#region ../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
7678
|
-
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
7679
|
-
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
7680
|
-
if (cloned !== void 0) return cloned;
|
|
7681
|
-
if (isPrimitive(valueToClone)) return valueToClone;
|
|
7682
|
-
if (stack.has(valueToClone)) return stack.get(valueToClone);
|
|
7683
|
-
if (Array.isArray(valueToClone)) {
|
|
7684
|
-
const result = new Array(valueToClone.length);
|
|
7685
|
-
stack.set(valueToClone, result);
|
|
7686
|
-
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
7687
|
-
if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
|
|
7688
|
-
if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
|
|
7689
|
-
return result;
|
|
7690
|
-
}
|
|
7691
|
-
if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
|
|
7692
|
-
if (valueToClone instanceof RegExp) {
|
|
7693
|
-
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
7694
|
-
result.lastIndex = valueToClone.lastIndex;
|
|
7695
|
-
return result;
|
|
7696
|
-
}
|
|
7697
|
-
if (valueToClone instanceof Map) {
|
|
7698
|
-
const result = /* @__PURE__ */ new Map();
|
|
7699
|
-
stack.set(valueToClone, result);
|
|
7700
|
-
for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
7701
|
-
return result;
|
|
7702
|
-
}
|
|
7703
|
-
if (valueToClone instanceof Set) {
|
|
7704
|
-
const result = /* @__PURE__ */ new Set();
|
|
7705
|
-
stack.set(valueToClone, result);
|
|
7706
|
-
for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
7707
|
-
return result;
|
|
7708
|
-
}
|
|
7709
|
-
if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
|
|
7710
|
-
if (isTypedArray(valueToClone)) {
|
|
7711
|
-
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
7712
|
-
stack.set(valueToClone, result);
|
|
7713
|
-
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
7714
|
-
return result;
|
|
7715
|
-
}
|
|
7716
|
-
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
|
|
7717
|
-
if (valueToClone instanceof DataView) {
|
|
7718
|
-
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
7719
|
-
stack.set(valueToClone, result);
|
|
7720
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7721
|
-
return result;
|
|
7722
|
-
}
|
|
7723
|
-
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
7724
|
-
const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
|
|
7725
|
-
stack.set(valueToClone, result);
|
|
7726
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7727
|
-
return result;
|
|
7728
|
-
}
|
|
7729
|
-
if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
|
|
7730
|
-
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
7731
|
-
stack.set(valueToClone, result);
|
|
7732
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7733
|
-
return result;
|
|
7734
|
-
}
|
|
7735
|
-
if (valueToClone instanceof Error) {
|
|
7736
|
-
const result = new valueToClone.constructor();
|
|
7737
|
-
stack.set(valueToClone, result);
|
|
7738
|
-
result.message = valueToClone.message;
|
|
7739
|
-
result.name = valueToClone.name;
|
|
7740
|
-
result.stack = valueToClone.stack;
|
|
7741
|
-
result.cause = valueToClone.cause;
|
|
7742
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7743
|
-
return result;
|
|
7744
|
-
}
|
|
7745
|
-
if (valueToClone instanceof Boolean) {
|
|
7746
|
-
const result = new Boolean(valueToClone.valueOf());
|
|
7747
|
-
stack.set(valueToClone, result);
|
|
7748
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7749
|
-
return result;
|
|
7750
|
-
}
|
|
7751
|
-
if (valueToClone instanceof Number) {
|
|
7752
|
-
const result = new Number(valueToClone.valueOf());
|
|
7753
|
-
stack.set(valueToClone, result);
|
|
7754
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7755
|
-
return result;
|
|
7756
|
-
}
|
|
7757
|
-
if (valueToClone instanceof String) {
|
|
7758
|
-
const result = new String(valueToClone.valueOf());
|
|
7759
|
-
stack.set(valueToClone, result);
|
|
7760
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7761
|
-
return result;
|
|
7762
|
-
}
|
|
7763
|
-
if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
|
|
7764
|
-
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
7765
|
-
stack.set(valueToClone, result);
|
|
7766
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
7767
|
-
return result;
|
|
7768
|
-
}
|
|
7769
|
-
return valueToClone;
|
|
7770
|
-
}
|
|
7771
|
-
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
7772
|
-
const keys = [...Object.keys(source), ...getSymbols(source)];
|
|
7773
|
-
for (let i = 0; i < keys.length; i++) {
|
|
7774
|
-
const key = keys[i];
|
|
7775
|
-
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
7776
|
-
if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
7777
|
-
}
|
|
7778
|
-
}
|
|
7779
|
-
function isCloneableObject(object) {
|
|
7780
|
-
switch (getTag(object)) {
|
|
7781
|
-
case argumentsTag:
|
|
7782
|
-
case arrayTag:
|
|
7783
|
-
case arrayBufferTag:
|
|
7784
|
-
case dataViewTag:
|
|
7785
|
-
case booleanTag:
|
|
7786
|
-
case dateTag:
|
|
7787
|
-
case float32ArrayTag:
|
|
7788
|
-
case float64ArrayTag:
|
|
7789
|
-
case int8ArrayTag:
|
|
7790
|
-
case int16ArrayTag:
|
|
7791
|
-
case int32ArrayTag:
|
|
7792
|
-
case mapTag:
|
|
7793
|
-
case numberTag:
|
|
7794
|
-
case objectTag:
|
|
7795
|
-
case regexpTag:
|
|
7796
|
-
case setTag:
|
|
7797
|
-
case stringTag:
|
|
7798
|
-
case symbolTag:
|
|
7799
|
-
case uint8ArrayTag:
|
|
7800
|
-
case uint8ClampedArrayTag:
|
|
7801
|
-
case uint16ArrayTag:
|
|
7802
|
-
case uint32ArrayTag: return true;
|
|
7803
|
-
default: return false;
|
|
7804
|
-
}
|
|
7805
|
-
}
|
|
7806
|
-
|
|
7807
|
-
//#endregion
|
|
7808
|
-
//#region ../../node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
7809
|
-
function cloneDeep(obj) {
|
|
7810
|
-
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
|
|
7811
|
-
}
|
|
7812
|
-
|
|
7813
|
-
//#endregion
|
|
7814
|
-
//#region ../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
7815
|
-
function isPlainObject(value) {
|
|
7816
|
-
if (!value || typeof value !== "object") return false;
|
|
7817
|
-
const proto = Object.getPrototypeOf(value);
|
|
7818
|
-
if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
|
|
7819
|
-
return Object.prototype.toString.call(value) === "[object Object]";
|
|
7820
|
-
}
|
|
7821
|
-
|
|
7822
|
-
//#endregion
|
|
7823
|
-
//#region ../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
7824
|
-
function isUnsafeProperty(key) {
|
|
7825
|
-
return key === "__proto__";
|
|
7826
|
-
}
|
|
7827
|
-
|
|
7828
|
-
//#endregion
|
|
7829
|
-
//#region ../../node_modules/es-toolkit/dist/object/merge.mjs
|
|
7830
|
-
function merge(target, source) {
|
|
7831
|
-
const sourceKeys = Object.keys(source);
|
|
7832
|
-
for (let i = 0; i < sourceKeys.length; i++) {
|
|
7833
|
-
const key = sourceKeys[i];
|
|
7834
|
-
if (isUnsafeProperty(key)) continue;
|
|
7835
|
-
const sourceValue = source[key];
|
|
7836
|
-
const targetValue = target[key];
|
|
7837
|
-
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
7838
|
-
else target[key] = merge([], sourceValue);
|
|
7839
|
-
else if (isPlainObject(sourceValue)) if (isPlainObject(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
7840
|
-
else target[key] = merge({}, sourceValue);
|
|
7841
|
-
else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
|
|
7842
|
-
}
|
|
7843
|
-
return target;
|
|
7844
|
-
}
|
|
7845
|
-
|
|
7846
7627
|
//#endregion
|
|
7847
7628
|
//#region ../astro-context-providers-extensions/src/vite/shared.ts
|
|
7848
7629
|
const extensionName$3 = "context-providers";
|
|
@@ -7860,24 +7641,24 @@ const sdkRuntimePath$4 = normalizePath$1(new URL("../dependencies/astro-context-
|
|
|
7860
7641
|
const hmrRuntimePath$3 = normalizePath$1(new URL("../dependencies/astro-context-providers-extensions/browser-runtime/hmr.js", import.meta.url));
|
|
7861
7642
|
|
|
7862
7643
|
//#endregion
|
|
7863
|
-
//#region ../astro-context-providers-extensions/src/utils/
|
|
7864
|
-
function
|
|
7865
|
-
return extensions.filter(
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
editorPreviewPath: extension.options.resources.editor?.url != null ? join(srcDir, extension.options.resources.editor.url) : null
|
|
7870
|
-
};
|
|
7871
|
-
});
|
|
7644
|
+
//#region ../astro-context-providers-extensions/src/utils/getSupportedBundlers.ts
|
|
7645
|
+
function getSupportedBundlers$1(model) {
|
|
7646
|
+
return model.extensions.filter((extension) => extension.type === "GenericExtension").flatMap((extension) => getSupportedBundlersInExtension$1(extension).map((bundler) => ({
|
|
7647
|
+
bundler,
|
|
7648
|
+
extension
|
|
7649
|
+
})));
|
|
7872
7650
|
}
|
|
7873
|
-
function
|
|
7874
|
-
return extension.
|
|
7651
|
+
function getSupportedBundlersInExtension$1(extension) {
|
|
7652
|
+
return deepFind(extension.options, (value) => {
|
|
7653
|
+
if ("type" in value && (value.type === ContextProviderClientBundlerType || value.type === ContextProviderEditorBundlerType)) return value;
|
|
7654
|
+
return false;
|
|
7655
|
+
});
|
|
7875
7656
|
}
|
|
7876
7657
|
|
|
7877
7658
|
//#endregion
|
|
7878
|
-
//#region ../astro-context-providers-extensions/src/utils/
|
|
7879
|
-
function
|
|
7880
|
-
return
|
|
7659
|
+
//#region ../astro-context-providers-extensions/src/utils/getContextProviderBundler.ts
|
|
7660
|
+
function getContextProviderBundler(model, id) {
|
|
7661
|
+
return getSupportedBundlers$1(model).find(({ bundler }) => bundler.id === id);
|
|
7881
7662
|
}
|
|
7882
7663
|
|
|
7883
7664
|
//#endregion
|
|
@@ -7931,11 +7712,11 @@ function getVirtualModuleIdForClientComponent$2(componentId) {
|
|
|
7931
7712
|
}
|
|
7932
7713
|
function registerClientVirtualRoute$3({ model, router }) {
|
|
7933
7714
|
router.route(getVirtualModuleIdForClientComponent$2(":id"), ({ id }, { command }) => {
|
|
7934
|
-
const
|
|
7935
|
-
if (
|
|
7936
|
-
const componentPath = normalizePath$1(
|
|
7715
|
+
const match = getContextProviderBundler(model, id);
|
|
7716
|
+
if (match) {
|
|
7717
|
+
const componentPath = normalizePath$1(join(model.srcDir, match.bundler.options.source));
|
|
7937
7718
|
if (command === "build") return getClientComponentBuildTemplate$2(componentPath);
|
|
7938
|
-
return getClientComponentServeTemplate$2(componentPath,
|
|
7719
|
+
return getClientComponentServeTemplate$2(componentPath, match.bundler.options.hook);
|
|
7939
7720
|
}
|
|
7940
7721
|
return null;
|
|
7941
7722
|
});
|
|
@@ -7948,11 +7729,11 @@ function getVirtualModuleIdForEditorComponent$1(componentId) {
|
|
|
7948
7729
|
}
|
|
7949
7730
|
function registerEditorVirtualRoute$2({ model, router }) {
|
|
7950
7731
|
router.route(getVirtualModuleIdForEditorComponent$1(":id"), ({ id }, { command }) => {
|
|
7951
|
-
const
|
|
7952
|
-
if (
|
|
7953
|
-
const componentPath = normalizePath$1(
|
|
7732
|
+
const match = getContextProviderBundler(model, id);
|
|
7733
|
+
if (match) {
|
|
7734
|
+
const componentPath = normalizePath$1(join(model.srcDir, match.bundler.options.source));
|
|
7954
7735
|
if (command === "build") return getClientComponentBuildTemplate$2(componentPath);
|
|
7955
|
-
return getClientComponentServeTemplate$2(componentPath,
|
|
7736
|
+
return getClientComponentServeTemplate$2(componentPath, match.bundler.options.hook);
|
|
7956
7737
|
}
|
|
7957
7738
|
return null;
|
|
7958
7739
|
});
|
|
@@ -7978,65 +7759,50 @@ function virtualModulesPlugin$4({ model }) {
|
|
|
7978
7759
|
|
|
7979
7760
|
//#endregion
|
|
7980
7761
|
//#region ../astro-context-providers-extensions/src/vite/client/build-config.ts
|
|
7981
|
-
const getClientBuildConfig$2 = ({
|
|
7762
|
+
const getClientBuildConfig$2 = ({ bundlerId, createExtensionViteConfig, model }) => {
|
|
7982
7763
|
return createExtensionViteConfig({
|
|
7983
7764
|
name: join(extensionName$3, "client"),
|
|
7984
7765
|
config: {
|
|
7985
7766
|
build: { rollupOptions: {
|
|
7986
7767
|
external: externalDeps$4,
|
|
7987
|
-
input: { [getEntryNameForClientComponent$2(
|
|
7768
|
+
input: { [getEntryNameForClientComponent$2(bundlerId)]: getVirtualModuleIdForClientComponent$2(bundlerId) },
|
|
7988
7769
|
preserveEntrySignatures: "strict"
|
|
7989
7770
|
} },
|
|
7990
7771
|
plugins: [virtualModulesPlugin$4({ model })]
|
|
7991
7772
|
}
|
|
7992
7773
|
});
|
|
7993
7774
|
};
|
|
7994
|
-
function getEntryNameForClientComponent$2(
|
|
7995
|
-
return `context-provider-${
|
|
7775
|
+
function getEntryNameForClientComponent$2(bundlerId) {
|
|
7776
|
+
return `context-provider-${bundlerId}`;
|
|
7996
7777
|
}
|
|
7997
7778
|
|
|
7998
7779
|
//#endregion
|
|
7999
7780
|
//#region ../astro-context-providers-extensions/src/utils/getClientResource.ts
|
|
8000
|
-
function getClientResource$2({ baseUrl, buildOutput,
|
|
8001
|
-
if (buildOutput) return
|
|
8002
|
-
baseUrl,
|
|
7781
|
+
function getClientResource$2({ baseUrl, buildOutput, bundlerId, devServer }) {
|
|
7782
|
+
if (buildOutput) return appendToDevServerUrl(baseUrl, getChunkForEntryName({
|
|
8003
7783
|
buildOutput,
|
|
8004
|
-
|
|
8005
|
-
});
|
|
8006
|
-
if (devServer) return
|
|
7784
|
+
entryName: getEntryNameForClientComponent$2(bundlerId)
|
|
7785
|
+
}).fileName);
|
|
7786
|
+
if (devServer) return getAssetUrlForModuleId({
|
|
8007
7787
|
baseUrl,
|
|
8008
7788
|
devServer,
|
|
8009
|
-
|
|
7789
|
+
moduleId: getVirtualModuleIdForClientComponent$2(bundlerId)
|
|
8010
7790
|
});
|
|
8011
7791
|
throw new Error("Unknown error: no build output or vite dev server");
|
|
8012
7792
|
}
|
|
8013
|
-
function getClientResourceBuild$2({ baseUrl, buildOutput, extension }) {
|
|
8014
|
-
const componentFileName = getChunkForEntryName({
|
|
8015
|
-
buildOutput,
|
|
8016
|
-
entryName: getEntryNameForClientComponent$2(extension.options.id)
|
|
8017
|
-
}).fileName;
|
|
8018
|
-
return { url: appendToDevServerUrl(baseUrl, componentFileName) };
|
|
8019
|
-
}
|
|
8020
|
-
function getClientResourceDev$2({ baseUrl, devServer, extension }) {
|
|
8021
|
-
return { url: getAssetUrlForModuleId({
|
|
8022
|
-
baseUrl,
|
|
8023
|
-
devServer,
|
|
8024
|
-
moduleId: getVirtualModuleIdForClientComponent$2(extension.options.id)
|
|
8025
|
-
}) };
|
|
8026
|
-
}
|
|
8027
7793
|
|
|
8028
7794
|
//#endregion
|
|
8029
7795
|
//#region ../astro-context-providers-extensions/src/vite/editor/build-config.ts
|
|
8030
|
-
function getEntryNameForEditorComponent$1(
|
|
8031
|
-
return `component-${
|
|
7796
|
+
function getEntryNameForEditorComponent$1(bundlerId) {
|
|
7797
|
+
return `component-${bundlerId}-editor`;
|
|
8032
7798
|
}
|
|
8033
|
-
const getEditorBuildConfig$2 = ({
|
|
7799
|
+
const getEditorBuildConfig$2 = ({ bundlerId, createExtensionViteConfig, model }) => {
|
|
8034
7800
|
return createExtensionViteConfig({
|
|
8035
7801
|
name: join(extensionName$3, "editor"),
|
|
8036
7802
|
config: {
|
|
8037
7803
|
build: { rollupOptions: {
|
|
8038
7804
|
external: externalDeps$4,
|
|
8039
|
-
input: { [getEntryNameForEditorComponent$1(
|
|
7805
|
+
input: { [getEntryNameForEditorComponent$1(bundlerId)]: getVirtualModuleIdForEditorComponent$1(bundlerId) },
|
|
8040
7806
|
preserveEntrySignatures: "strict"
|
|
8041
7807
|
} },
|
|
8042
7808
|
plugins: [virtualModulesPlugin$4({ model })]
|
|
@@ -8044,59 +7810,33 @@ const getEditorBuildConfig$2 = ({ createExtensionViteConfig, extension: { option
|
|
|
8044
7810
|
});
|
|
8045
7811
|
};
|
|
8046
7812
|
|
|
8047
|
-
//#endregion
|
|
8048
|
-
//#region ../astro-context-providers-extensions/src/utils/getEditorResource.ts
|
|
8049
|
-
function getEditorResource$1({ baseUrl, buildOutput,
|
|
8050
|
-
if (
|
|
8051
|
-
if (buildOutput) return getEditorResourceBuild$1({
|
|
8052
|
-
baseUrl,
|
|
8053
|
-
buildOutput,
|
|
8054
|
-
extension
|
|
8055
|
-
});
|
|
8056
|
-
if (devServer) return getEditorResourceDev$1({
|
|
8057
|
-
baseUrl,
|
|
8058
|
-
devServer,
|
|
8059
|
-
extension
|
|
8060
|
-
});
|
|
8061
|
-
throw new Error("Unknown error: no build output or vite dev server");
|
|
8062
|
-
}
|
|
8063
|
-
function getEditorResourceBuild$1({ baseUrl, buildOutput, extension }) {
|
|
8064
|
-
const componentFileName = getChunkForEntryName({
|
|
7813
|
+
//#endregion
|
|
7814
|
+
//#region ../astro-context-providers-extensions/src/utils/getEditorResource.ts
|
|
7815
|
+
function getEditorResource$1({ baseUrl, buildOutput, bundlerId, devServer }) {
|
|
7816
|
+
if (buildOutput) return appendToDevServerUrl(baseUrl, getChunkForEntryName({
|
|
8065
7817
|
buildOutput,
|
|
8066
|
-
entryName: getEntryNameForEditorComponent$1(
|
|
8067
|
-
}).fileName;
|
|
8068
|
-
|
|
8069
|
-
}
|
|
8070
|
-
function getEditorResourceDev$1({ baseUrl, devServer, extension }) {
|
|
8071
|
-
return { url: getAssetUrlForModuleId({
|
|
7818
|
+
entryName: getEntryNameForEditorComponent$1(bundlerId)
|
|
7819
|
+
}).fileName);
|
|
7820
|
+
if (devServer) return getAssetUrlForModuleId({
|
|
8072
7821
|
baseUrl,
|
|
8073
7822
|
devServer,
|
|
8074
|
-
moduleId: getVirtualModuleIdForEditorComponent$1(
|
|
8075
|
-
})
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
//#endregion
|
|
8079
|
-
//#region ../astro-context-providers-extensions/src/utils/getResources.ts
|
|
8080
|
-
function getResources$3(buildContext) {
|
|
8081
|
-
return {
|
|
8082
|
-
client: getClientResource$2(buildContext),
|
|
8083
|
-
editor: getEditorResource$1(buildContext)
|
|
8084
|
-
};
|
|
7823
|
+
moduleId: getVirtualModuleIdForEditorComponent$1(bundlerId)
|
|
7824
|
+
});
|
|
7825
|
+
throw new Error("Unknown error: no build output or vite dev server");
|
|
8085
7826
|
}
|
|
8086
7827
|
|
|
8087
7828
|
//#endregion
|
|
8088
7829
|
//#region ../astro-context-providers-extensions/src/vite/configs/build.ts
|
|
8089
7830
|
function getBuildViteConfigs$3({ createExtensionViteConfig, model }) {
|
|
8090
|
-
return
|
|
8091
|
-
|
|
8092
|
-
|
|
7831
|
+
return getSupportedBundlers$1(model).reduce((acc, { bundler }) => {
|
|
7832
|
+
if (bundler.type === ContextProviderClientBundlerType) acc.push(getClientBuildConfig$2({
|
|
7833
|
+
bundlerId: bundler.id,
|
|
8093
7834
|
createExtensionViteConfig,
|
|
8094
|
-
extension,
|
|
8095
7835
|
model
|
|
8096
7836
|
}));
|
|
8097
|
-
if (
|
|
7837
|
+
else if (bundler.type === ContextProviderEditorBundlerType) acc.push(getEditorBuildConfig$2({
|
|
7838
|
+
bundlerId: bundler.id,
|
|
8098
7839
|
createExtensionViteConfig,
|
|
8099
|
-
extension,
|
|
8100
7840
|
model
|
|
8101
7841
|
}));
|
|
8102
7842
|
return acc;
|
|
@@ -8153,7 +7893,7 @@ function getDevViteConfig$3({ createExtensionViteConfig, model }) {
|
|
|
8153
7893
|
name: extensionName$3,
|
|
8154
7894
|
config: {
|
|
8155
7895
|
optimizeDeps: { entries: [
|
|
8156
|
-
...
|
|
7896
|
+
...getSupportedBundlers$1(model).map(({ bundler }) => join(model.srcDir, bundler.options.source)),
|
|
8157
7897
|
sdkRuntimePath$4,
|
|
8158
7898
|
hmrRuntimePath$3
|
|
8159
7899
|
] },
|
|
@@ -8189,30 +7929,28 @@ const createIntegration$15 = () => {
|
|
|
8189
7929
|
},
|
|
8190
7930
|
async "wix:build:setup"({ createExtensionViteConfig }) {
|
|
8191
7931
|
ok(model);
|
|
8192
|
-
if (
|
|
7932
|
+
if (getSupportedBundlers$1(model).length === 0) return;
|
|
8193
7933
|
customBuildOutput = await buildAll(getBuildViteConfigs$3({
|
|
8194
7934
|
createExtensionViteConfig,
|
|
8195
7935
|
model
|
|
8196
7936
|
}));
|
|
8197
7937
|
},
|
|
8198
|
-
async "wix:app-manifest:setup"({ staticsUrlPlaceholder,
|
|
7938
|
+
async "wix:app-manifest:setup"({ staticsUrlPlaceholder, updateAppManifestComponent }) {
|
|
8199
7939
|
ok(model);
|
|
8200
|
-
const
|
|
8201
|
-
const
|
|
8202
|
-
|
|
8203
|
-
const buildContext = {
|
|
7940
|
+
const bundlerExtensions = getSupportedBundlers$1(model);
|
|
7941
|
+
for (const { bundler, extension } of bundlerExtensions) await updateAppManifestComponent(extension.options.compId, (current) => {
|
|
7942
|
+
return deepReplace(current, bundler, bundler.type === ContextProviderClientBundlerType ? getClientResource$2({
|
|
8204
7943
|
baseUrl: staticsUrlPlaceholder,
|
|
8205
7944
|
buildOutput: customBuildOutput,
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
}
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
});
|
|
8214
|
-
}
|
|
8215
|
-
updateAppManifest({ components });
|
|
7945
|
+
bundlerId: bundler.id,
|
|
7946
|
+
devServer: customDevServer
|
|
7947
|
+
}) : getEditorResource$1({
|
|
7948
|
+
baseUrl: staticsUrlPlaceholder,
|
|
7949
|
+
buildOutput: customBuildOutput,
|
|
7950
|
+
bundlerId: bundler.id,
|
|
7951
|
+
devServer: customDevServer
|
|
7952
|
+
}));
|
|
7953
|
+
});
|
|
8216
7954
|
}
|
|
8217
7955
|
}
|
|
8218
7956
|
};
|
|
@@ -27483,6 +27221,226 @@ const createIntegration$12 = () => {
|
|
|
27483
27221
|
};
|
|
27484
27222
|
};
|
|
27485
27223
|
|
|
27224
|
+
//#endregion
|
|
27225
|
+
//#region ../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
27226
|
+
function isPrimitive(value) {
|
|
27227
|
+
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
27228
|
+
}
|
|
27229
|
+
|
|
27230
|
+
//#endregion
|
|
27231
|
+
//#region ../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
27232
|
+
function isTypedArray(x) {
|
|
27233
|
+
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
27234
|
+
}
|
|
27235
|
+
|
|
27236
|
+
//#endregion
|
|
27237
|
+
//#region ../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
27238
|
+
function getSymbols(object) {
|
|
27239
|
+
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
27240
|
+
}
|
|
27241
|
+
|
|
27242
|
+
//#endregion
|
|
27243
|
+
//#region ../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
27244
|
+
function getTag(value) {
|
|
27245
|
+
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
27246
|
+
return Object.prototype.toString.call(value);
|
|
27247
|
+
}
|
|
27248
|
+
|
|
27249
|
+
//#endregion
|
|
27250
|
+
//#region ../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
27251
|
+
const regexpTag = "[object RegExp]";
|
|
27252
|
+
const stringTag = "[object String]";
|
|
27253
|
+
const numberTag = "[object Number]";
|
|
27254
|
+
const booleanTag = "[object Boolean]";
|
|
27255
|
+
const argumentsTag = "[object Arguments]";
|
|
27256
|
+
const symbolTag = "[object Symbol]";
|
|
27257
|
+
const dateTag = "[object Date]";
|
|
27258
|
+
const mapTag = "[object Map]";
|
|
27259
|
+
const setTag = "[object Set]";
|
|
27260
|
+
const arrayTag = "[object Array]";
|
|
27261
|
+
const arrayBufferTag = "[object ArrayBuffer]";
|
|
27262
|
+
const objectTag = "[object Object]";
|
|
27263
|
+
const dataViewTag = "[object DataView]";
|
|
27264
|
+
const uint8ArrayTag = "[object Uint8Array]";
|
|
27265
|
+
const uint8ClampedArrayTag = "[object Uint8ClampedArray]";
|
|
27266
|
+
const uint16ArrayTag = "[object Uint16Array]";
|
|
27267
|
+
const uint32ArrayTag = "[object Uint32Array]";
|
|
27268
|
+
const int8ArrayTag = "[object Int8Array]";
|
|
27269
|
+
const int16ArrayTag = "[object Int16Array]";
|
|
27270
|
+
const int32ArrayTag = "[object Int32Array]";
|
|
27271
|
+
const float32ArrayTag = "[object Float32Array]";
|
|
27272
|
+
const float64ArrayTag = "[object Float64Array]";
|
|
27273
|
+
|
|
27274
|
+
//#endregion
|
|
27275
|
+
//#region ../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
27276
|
+
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
27277
|
+
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
27278
|
+
if (cloned !== void 0) return cloned;
|
|
27279
|
+
if (isPrimitive(valueToClone)) return valueToClone;
|
|
27280
|
+
if (stack.has(valueToClone)) return stack.get(valueToClone);
|
|
27281
|
+
if (Array.isArray(valueToClone)) {
|
|
27282
|
+
const result = new Array(valueToClone.length);
|
|
27283
|
+
stack.set(valueToClone, result);
|
|
27284
|
+
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
27285
|
+
if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
|
|
27286
|
+
if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
|
|
27287
|
+
return result;
|
|
27288
|
+
}
|
|
27289
|
+
if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
|
|
27290
|
+
if (valueToClone instanceof RegExp) {
|
|
27291
|
+
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
27292
|
+
result.lastIndex = valueToClone.lastIndex;
|
|
27293
|
+
return result;
|
|
27294
|
+
}
|
|
27295
|
+
if (valueToClone instanceof Map) {
|
|
27296
|
+
const result = /* @__PURE__ */ new Map();
|
|
27297
|
+
stack.set(valueToClone, result);
|
|
27298
|
+
for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
27299
|
+
return result;
|
|
27300
|
+
}
|
|
27301
|
+
if (valueToClone instanceof Set) {
|
|
27302
|
+
const result = /* @__PURE__ */ new Set();
|
|
27303
|
+
stack.set(valueToClone, result);
|
|
27304
|
+
for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
27305
|
+
return result;
|
|
27306
|
+
}
|
|
27307
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
|
|
27308
|
+
if (isTypedArray(valueToClone)) {
|
|
27309
|
+
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
27310
|
+
stack.set(valueToClone, result);
|
|
27311
|
+
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
27312
|
+
return result;
|
|
27313
|
+
}
|
|
27314
|
+
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
|
|
27315
|
+
if (valueToClone instanceof DataView) {
|
|
27316
|
+
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
27317
|
+
stack.set(valueToClone, result);
|
|
27318
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27319
|
+
return result;
|
|
27320
|
+
}
|
|
27321
|
+
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
27322
|
+
const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
|
|
27323
|
+
stack.set(valueToClone, result);
|
|
27324
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27325
|
+
return result;
|
|
27326
|
+
}
|
|
27327
|
+
if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
|
|
27328
|
+
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
27329
|
+
stack.set(valueToClone, result);
|
|
27330
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27331
|
+
return result;
|
|
27332
|
+
}
|
|
27333
|
+
if (valueToClone instanceof Error) {
|
|
27334
|
+
const result = new valueToClone.constructor();
|
|
27335
|
+
stack.set(valueToClone, result);
|
|
27336
|
+
result.message = valueToClone.message;
|
|
27337
|
+
result.name = valueToClone.name;
|
|
27338
|
+
result.stack = valueToClone.stack;
|
|
27339
|
+
result.cause = valueToClone.cause;
|
|
27340
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27341
|
+
return result;
|
|
27342
|
+
}
|
|
27343
|
+
if (valueToClone instanceof Boolean) {
|
|
27344
|
+
const result = new Boolean(valueToClone.valueOf());
|
|
27345
|
+
stack.set(valueToClone, result);
|
|
27346
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27347
|
+
return result;
|
|
27348
|
+
}
|
|
27349
|
+
if (valueToClone instanceof Number) {
|
|
27350
|
+
const result = new Number(valueToClone.valueOf());
|
|
27351
|
+
stack.set(valueToClone, result);
|
|
27352
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27353
|
+
return result;
|
|
27354
|
+
}
|
|
27355
|
+
if (valueToClone instanceof String) {
|
|
27356
|
+
const result = new String(valueToClone.valueOf());
|
|
27357
|
+
stack.set(valueToClone, result);
|
|
27358
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27359
|
+
return result;
|
|
27360
|
+
}
|
|
27361
|
+
if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
|
|
27362
|
+
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
27363
|
+
stack.set(valueToClone, result);
|
|
27364
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
27365
|
+
return result;
|
|
27366
|
+
}
|
|
27367
|
+
return valueToClone;
|
|
27368
|
+
}
|
|
27369
|
+
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
27370
|
+
const keys = [...Object.keys(source), ...getSymbols(source)];
|
|
27371
|
+
for (let i = 0; i < keys.length; i++) {
|
|
27372
|
+
const key = keys[i];
|
|
27373
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
27374
|
+
if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
27375
|
+
}
|
|
27376
|
+
}
|
|
27377
|
+
function isCloneableObject(object) {
|
|
27378
|
+
switch (getTag(object)) {
|
|
27379
|
+
case argumentsTag:
|
|
27380
|
+
case arrayTag:
|
|
27381
|
+
case arrayBufferTag:
|
|
27382
|
+
case dataViewTag:
|
|
27383
|
+
case booleanTag:
|
|
27384
|
+
case dateTag:
|
|
27385
|
+
case float32ArrayTag:
|
|
27386
|
+
case float64ArrayTag:
|
|
27387
|
+
case int8ArrayTag:
|
|
27388
|
+
case int16ArrayTag:
|
|
27389
|
+
case int32ArrayTag:
|
|
27390
|
+
case mapTag:
|
|
27391
|
+
case numberTag:
|
|
27392
|
+
case objectTag:
|
|
27393
|
+
case regexpTag:
|
|
27394
|
+
case setTag:
|
|
27395
|
+
case stringTag:
|
|
27396
|
+
case symbolTag:
|
|
27397
|
+
case uint8ArrayTag:
|
|
27398
|
+
case uint8ClampedArrayTag:
|
|
27399
|
+
case uint16ArrayTag:
|
|
27400
|
+
case uint32ArrayTag: return true;
|
|
27401
|
+
default: return false;
|
|
27402
|
+
}
|
|
27403
|
+
}
|
|
27404
|
+
|
|
27405
|
+
//#endregion
|
|
27406
|
+
//#region ../../node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
27407
|
+
function cloneDeep(obj) {
|
|
27408
|
+
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
|
|
27409
|
+
}
|
|
27410
|
+
|
|
27411
|
+
//#endregion
|
|
27412
|
+
//#region ../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
27413
|
+
function isPlainObject(value) {
|
|
27414
|
+
if (!value || typeof value !== "object") return false;
|
|
27415
|
+
const proto = Object.getPrototypeOf(value);
|
|
27416
|
+
if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
|
|
27417
|
+
return Object.prototype.toString.call(value) === "[object Object]";
|
|
27418
|
+
}
|
|
27419
|
+
|
|
27420
|
+
//#endregion
|
|
27421
|
+
//#region ../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
27422
|
+
function isUnsafeProperty(key) {
|
|
27423
|
+
return key === "__proto__";
|
|
27424
|
+
}
|
|
27425
|
+
|
|
27426
|
+
//#endregion
|
|
27427
|
+
//#region ../../node_modules/es-toolkit/dist/object/merge.mjs
|
|
27428
|
+
function merge(target, source) {
|
|
27429
|
+
const sourceKeys = Object.keys(source);
|
|
27430
|
+
for (let i = 0; i < sourceKeys.length; i++) {
|
|
27431
|
+
const key = sourceKeys[i];
|
|
27432
|
+
if (isUnsafeProperty(key)) continue;
|
|
27433
|
+
const sourceValue = source[key];
|
|
27434
|
+
const targetValue = target[key];
|
|
27435
|
+
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
27436
|
+
else target[key] = merge([], sourceValue);
|
|
27437
|
+
else if (isPlainObject(sourceValue)) if (isPlainObject(targetValue)) target[key] = merge(targetValue, sourceValue);
|
|
27438
|
+
else target[key] = merge({}, sourceValue);
|
|
27439
|
+
else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
|
|
27440
|
+
}
|
|
27441
|
+
return target;
|
|
27442
|
+
}
|
|
27443
|
+
|
|
27486
27444
|
//#endregion
|
|
27487
27445
|
//#region ../astro-function-libraries-extensions/src/utils/getSupportedExtensions.ts
|
|
27488
27446
|
function getSupportedExtensions$3({ extensions, srcDir }) {
|
|
@@ -27765,7 +27723,7 @@ const createIntegration$8 = () => {
|
|
|
27765
27723
|
});
|
|
27766
27724
|
injectRoute({
|
|
27767
27725
|
entrypoint: new URL("../dependencies/astro-payment-links/backend-runtime/proposal.mjs", import.meta.url),
|
|
27768
|
-
pattern: "/_proposal",
|
|
27726
|
+
pattern: "/_proposal/[id]",
|
|
27769
27727
|
prerender: false
|
|
27770
27728
|
});
|
|
27771
27729
|
} }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/astro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.33.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@wix/auth-management": "^1.0.71",
|
|
6
6
|
"@wix/dashboard": "^1.3.43",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
"falconPackageHash": "
|
|
79
|
+
"falconPackageHash": "2df3b78570e9d95338a4ca82336672c5cc086c91999d1dc89d436ad9"
|
|
80
80
|
}
|
|
File without changes
|
|
File without changes
|