cloudcommerce 0.24.1 → 0.26.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/.github/workflows/test-e2e.yml +2 -2
- package/CHANGELOG.md +43 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/.idx/dev.nix +24 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +30 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +7 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +149 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +68 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +2 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/iluminim/.idx/dev.nix +24 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +30 -0
- package/ecomplus-stores/iluminim/functions/ssr/package.json +7 -7
- package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +149 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +68 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +2 -0
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +2 -2
- package/ecomplus-stores/monocard/.idx/dev.nix +24 -0
- package/ecomplus-stores/monocard/functions/ssr/package.json +1 -1
- package/ecomplus-stores/tia-sonia/.idx/dev.nix +24 -0
- package/package.json +6 -6
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +5 -3
- package/packages/apps/correios/tests/calculate-shipping.test.mjs +45 -0
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +4 -2
- package/packages/apps/custom-shipping/tests/calculate-shipping.test.mjs +37 -0
- package/packages/apps/datafrete/package.json +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +2 -2
- package/packages/apps/flash-courier/package.json +2 -2
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +4 -2
- package/packages/apps/loyalty-points/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/loyalty-points/tests/2-create-transaction.test.mjs +41 -0
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +5 -3
- package/packages/apps/mercadopago/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/mercadopago/tests/2-create-transaction.test.mjs +42 -0
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/lib/cli.js +5 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +5 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/package.json +5 -5
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/lib/en_us/i19allProducts.txt +1 -0
- package/packages/i18n/lib/en_us/i19institutional.txt +1 -0
- package/packages/i18n/lib/en_us.d.ts +2 -0
- package/packages/i18n/lib/en_us.js +2 -0
- package/packages/i18n/lib/en_us.js.map +1 -1
- package/packages/i18n/lib/pt_br/i19allProducts.txt +1 -0
- package/packages/i18n/lib/pt_br/i19institutional.txt +1 -0
- package/packages/i18n/lib/pt_br.d.ts +2 -0
- package/packages/i18n/lib/pt_br.js +2 -0
- package/packages/i18n/lib/pt_br.js.map +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/i18n/src/en_us.ts +2 -0
- package/packages/i18n/src/pt_br.ts +2 -0
- package/packages/modules/package.json +4 -3
- package/packages/modules/tests/modules.test.mjs +7 -8
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +44 -33
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +6 -6
- package/packages/ssr/src/firebase/serve-storefront.ts +45 -34
- package/packages/storefront/config/storefront.cms.js +3 -1
- package/packages/storefront/config/storefront.config.mjs +8 -2
- package/packages/storefront/dist/client/_astro/{Carousel.63d511ab.js → Carousel.926668f2.js} +1 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.1f0524aa.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.7407eeaf.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.562a32ab.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.763cd2ca.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.126900a6.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +1 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.ee681fa8.js +1 -0
- package/packages/storefront/dist/client/_astro/api.a2eda23e.js +1 -0
- package/packages/storefront/dist/client/_astro/client.e6d9439a.js +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.1df8af9a.js → firebase-app.93857bfb.js} +121 -91
- package/packages/storefront/dist/client/_astro/format-money.923559cc.js +1 -0
- package/packages/storefront/dist/client/_astro/img.ec6ba316.js +1 -0
- package/packages/storefront/dist/client/_astro/index.709ac149.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.48980668.js +1 -0
- package/packages/storefront/dist/client/manifest.webmanifest +1 -1
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/CartSidebar.2b555408.mjs +393 -0
- package/packages/storefront/dist/server/chunks/SearchModal.f418e188.mjs +44 -0
- package/packages/storefront/dist/server/chunks/_...d32bcc0c.mjs +35 -0
- package/packages/storefront/dist/server/chunks/{account@_@astro.a02ffb0b.mjs → account@_@astro.0106855f.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{astro.a7611b51.mjs → astro.bb5b7191.mjs} +141 -91
- package/packages/storefront/dist/server/chunks/{_...5323ec5a.mjs → endpoint@_@js.35807882.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.d898498a.mjs → index@_@astro.477f5af1.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.42c693b9.mjs → index@_@astro.e5a61d6e.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.0f33557e.mjs → _...slug_.astro.fd8a229f.mjs} +673 -937
- package/packages/storefront/dist/server/chunks/pages/{account.astro.9325adb2.mjs → account.astro.3b21bff8.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.247079ba.mjs +119 -0
- package/packages/storefront/dist/server/chunks/pages/{index.astro.0f31fa39.mjs → index.astro.dab642f5.mjs} +605 -58
- package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.bd93f01e.mjs → ~fallback.astro.7630c0d6.mjs} +25 -7
- package/packages/storefront/dist/server/chunks/{~fallback@_@astro.d17419ae.mjs → ~fallback@_@astro.65227dd7.mjs} +12 -4
- package/packages/storefront/dist/server/entry.mjs +28 -11
- package/packages/storefront/dist/server/manifest.webmanifest +1 -1
- package/packages/storefront/dist/server/renderers.mjs +80 -25
- package/packages/storefront/package.json +9 -8
- package/packages/storefront/src/helpers/server-data.ts +14 -17
- package/packages/storefront/src/images/use-ssr-picture.ts +18 -3
- package/packages/storefront/src/lib/components/BannerPictures.astro +4 -4
- package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +2 -2
- package/packages/storefront/src/lib/components/SharedData.astro +1 -1
- package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -3
- package/packages/storefront/src/lib/content.d.ts +36 -2
- package/packages/storefront/src/lib/layouts/Base.astro +3 -2
- package/packages/storefront/src/lib/layouts/use-page-main.ts +2 -2
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/test-base/CHANGELOG.md +1 -0
- package/packages/test-base/README.md +7 -0
- package/packages/test-base/lib/endpoints.js +23 -0
- package/packages/test-base/lib/endpoints.js.map +1 -0
- package/packages/test-base/lib/index.js +4 -0
- package/packages/test-base/lib/index.js.map +1 -0
- package/packages/test-base/lib/playloads.js +14 -0
- package/packages/test-base/lib/playloads.js.map +1 -0
- package/packages/test-base/package.json +28 -0
- package/packages/test-base/payloads/calculate-shipping.json +37 -0
- package/packages/test-base/payloads/create-transaction.json +116 -0
- package/packages/test-base/payloads/list-payments.json +125 -0
- package/packages/test-base/src/endpoints.ts +37 -0
- package/packages/test-base/src/index.ts +3 -0
- package/packages/test-base/src/playloads.ts +24 -0
- package/packages/test-base/tsconfig.json +3 -0
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.8d2ea532.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.c2a2ad79.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.8572765c.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.4a105932.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.2400b065.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.a786e016.css +0 -1
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.48e557ba.js +0 -1
- package/packages/storefront/dist/client/_astro/client.9dbf6b61.js +0 -1
- package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
- package/packages/storefront/dist/client/_astro/headphone_22qtrt.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_247ud8.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1hoMcQ.webp +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1j5MXv.webp +0 -0
- package/packages/storefront/dist/client/_astro/img.7def76a1.js +0 -1
- package/packages/storefront/dist/client/_astro/index.c0c35ead.js +0 -1
- package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_29BEzB.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_2sykkb.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_HYj6i.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z18ANwS.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_ZK2FPz.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_pVNbE.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1EUYOa.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1Sqf3x.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1VeSii.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_2wFECM.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_7mg8W.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Kv492.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1DNkkN.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1IS4wy.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Zt4vbx.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1Bqr36.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1pj5UP.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2dVuzq.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_HaXay.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z100iy0.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2i1RBz.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZMRWqJ.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_mPQHw.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_xyq7d.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1DkX0O.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_2uIqYp.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1rGPGT.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_ZAjmIj.avif +0 -0
- package/packages/storefront/dist/client/~fallback.html +0 -98
- package/packages/storefront/dist/client/~index.html +0 -134
- package/packages/storefront/dist/server/images.dist.csv +0 -38
- package/packages/storefront/dist/server/images.src.csv +0 -11
- package/packages/storefront/dist/server/stylesheets.csv +0 -1
|
@@ -96,7 +96,7 @@ const GetStaticPathsRequired = {
|
|
|
96
96
|
message: "`getStaticPaths()` function is required for dynamic routes. Make sure that you `export` a `getStaticPaths` function from your dynamic route.",
|
|
97
97
|
hint: `See https://docs.astro.build/en/core-concepts/routing/#dynamic-routes for more information on dynamic routes.
|
|
98
98
|
|
|
99
|
-
Alternatively, set \`output: "server"\` in your Astro config file to switch to a non-static server build. This error can also occur if using \`export const prerender = true;\`.
|
|
99
|
+
Alternatively, set \`output: "server"\` or \`output: "hybrid"\` in your Astro config file to switch to a non-static server build. This error can also occur if using \`export const prerender = true;\`.
|
|
100
100
|
See https://docs.astro.build/en/guides/server-side-rendering/ for more information on non-static rendering.`
|
|
101
101
|
};
|
|
102
102
|
const ReservedSlotName = {
|
|
@@ -261,7 +261,7 @@ function createComponent(arg1, moduleId, propagation) {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
const ASTRO_VERSION = "2.10.
|
|
264
|
+
const ASTRO_VERSION = "2.10.14";
|
|
265
265
|
|
|
266
266
|
function createAstroGlobFn() {
|
|
267
267
|
const globHandler = (importMetaGlobResult) => {
|
|
@@ -458,6 +458,16 @@ function unescapeHTML(str) {
|
|
|
458
458
|
return markHTMLString(str);
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
const RenderInstructionSymbol = Symbol.for("astro:render");
|
|
462
|
+
function createRenderInstruction(instruction) {
|
|
463
|
+
return Object.defineProperty(instruction, RenderInstructionSymbol, {
|
|
464
|
+
value: true
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
function isRenderInstruction(chunk) {
|
|
468
|
+
return chunk && typeof chunk === "object" && chunk[RenderInstructionSymbol];
|
|
469
|
+
}
|
|
470
|
+
|
|
461
471
|
const PROP_TYPE = {
|
|
462
472
|
Value: 0,
|
|
463
473
|
JSON: 1,
|
|
@@ -879,6 +889,22 @@ function renderElement$1(name, { props: _props, children = "" }, shouldEscape =
|
|
|
879
889
|
}
|
|
880
890
|
return `<${name}${internalSpreadAttributes(props, shouldEscape)}>${children}</${name}>`;
|
|
881
891
|
}
|
|
892
|
+
function renderToBufferDestination(bufferRenderFunction) {
|
|
893
|
+
const bufferChunks = [];
|
|
894
|
+
const bufferDestination = {
|
|
895
|
+
write: (chunk) => bufferChunks.push(chunk)
|
|
896
|
+
};
|
|
897
|
+
const renderPromise = bufferRenderFunction(bufferDestination);
|
|
898
|
+
return {
|
|
899
|
+
async renderToFinalDestination(destination) {
|
|
900
|
+
for (const chunk of bufferChunks) {
|
|
901
|
+
destination.write(chunk);
|
|
902
|
+
}
|
|
903
|
+
bufferDestination.write = (chunk) => destination.write(chunk);
|
|
904
|
+
await renderPromise;
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
}
|
|
882
908
|
|
|
883
909
|
const uniqueElements = (item, index, all) => {
|
|
884
910
|
const props = JSON.stringify(item.props);
|
|
@@ -903,11 +929,8 @@ function renderAllHeadContent(result) {
|
|
|
903
929
|
}
|
|
904
930
|
return markHTMLString(content);
|
|
905
931
|
}
|
|
906
|
-
function* renderHead() {
|
|
907
|
-
yield { type: "head" };
|
|
908
|
-
}
|
|
909
932
|
function* maybeRenderHead() {
|
|
910
|
-
yield { type: "maybe-head" };
|
|
933
|
+
yield createRenderInstruction({ type: "maybe-head" });
|
|
911
934
|
}
|
|
912
935
|
|
|
913
936
|
const slotString = Symbol.for("astro:slot-string");
|
|
@@ -978,7 +1001,7 @@ const Renderer = Symbol.for("astro:renderer");
|
|
|
978
1001
|
const encoder = new TextEncoder();
|
|
979
1002
|
const decoder = new TextDecoder();
|
|
980
1003
|
function stringifyChunk(result, chunk) {
|
|
981
|
-
if (
|
|
1004
|
+
if (isRenderInstruction(chunk)) {
|
|
982
1005
|
const instruction = chunk;
|
|
983
1006
|
switch (instruction.type) {
|
|
984
1007
|
case "directive": {
|
|
@@ -1006,26 +1029,23 @@ function stringifyChunk(result, chunk) {
|
|
|
1006
1029
|
return renderAllHeadContent(result);
|
|
1007
1030
|
}
|
|
1008
1031
|
default: {
|
|
1009
|
-
if (chunk instanceof Response) {
|
|
1010
|
-
return "";
|
|
1011
|
-
}
|
|
1012
1032
|
throw new Error(`Unknown chunk type: ${chunk.type}`);
|
|
1013
1033
|
}
|
|
1014
1034
|
}
|
|
1015
|
-
} else {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1035
|
+
} else if (chunk instanceof Response) {
|
|
1036
|
+
return "";
|
|
1037
|
+
} else if (isSlotString(chunk)) {
|
|
1038
|
+
let out = "";
|
|
1039
|
+
const c = chunk;
|
|
1040
|
+
if (c.instructions) {
|
|
1041
|
+
for (const instr of c.instructions) {
|
|
1042
|
+
out += stringifyChunk(result, instr);
|
|
1023
1043
|
}
|
|
1024
|
-
out += chunk.toString();
|
|
1025
|
-
return out;
|
|
1026
1044
|
}
|
|
1027
|
-
|
|
1045
|
+
out += chunk.toString();
|
|
1046
|
+
return out;
|
|
1028
1047
|
}
|
|
1048
|
+
return chunk.toString();
|
|
1029
1049
|
}
|
|
1030
1050
|
function chunkToString(result, chunk) {
|
|
1031
1051
|
if (ArrayBuffer.isView(chunk)) {
|
|
@@ -1053,8 +1073,13 @@ async function renderChild(destination, child) {
|
|
|
1053
1073
|
} else if (isHTMLString(child)) {
|
|
1054
1074
|
destination.write(child);
|
|
1055
1075
|
} else if (Array.isArray(child)) {
|
|
1056
|
-
|
|
1057
|
-
|
|
1076
|
+
const childRenders = child.map((c) => {
|
|
1077
|
+
return renderToBufferDestination((bufferDestination) => {
|
|
1078
|
+
return renderChild(bufferDestination, c);
|
|
1079
|
+
});
|
|
1080
|
+
});
|
|
1081
|
+
for (const childRender of childRenders) {
|
|
1082
|
+
await childRender.renderToFinalDestination(destination);
|
|
1058
1083
|
}
|
|
1059
1084
|
} else if (typeof child === "function") {
|
|
1060
1085
|
await renderChild(destination, child());
|
|
@@ -1156,12 +1181,19 @@ class RenderTemplateResult {
|
|
|
1156
1181
|
});
|
|
1157
1182
|
}
|
|
1158
1183
|
async render(destination) {
|
|
1184
|
+
const expRenders = this.expressions.map((exp) => {
|
|
1185
|
+
return renderToBufferDestination((bufferDestination) => {
|
|
1186
|
+
if (exp || exp === 0) {
|
|
1187
|
+
return renderChild(bufferDestination, exp);
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
});
|
|
1159
1191
|
for (let i = 0; i < this.htmlParts.length; i++) {
|
|
1160
1192
|
const html = this.htmlParts[i];
|
|
1161
|
-
const
|
|
1193
|
+
const expRender = expRenders[i];
|
|
1162
1194
|
destination.write(markHTMLString(html));
|
|
1163
|
-
if (
|
|
1164
|
-
await
|
|
1195
|
+
if (expRender) {
|
|
1196
|
+
await expRender.renderToFinalDestination(destination);
|
|
1165
1197
|
}
|
|
1166
1198
|
}
|
|
1167
1199
|
}
|
|
@@ -1573,7 +1605,7 @@ ${serializeProps(
|
|
|
1573
1605
|
destination.write(instruction);
|
|
1574
1606
|
}
|
|
1575
1607
|
}
|
|
1576
|
-
destination.write({ type: "directive", hydration });
|
|
1608
|
+
destination.write(createRenderInstruction({ type: "directive", hydration }));
|
|
1577
1609
|
destination.write(markHTMLString(renderElement$1("astro-island", island, false)));
|
|
1578
1610
|
}
|
|
1579
1611
|
};
|
|
@@ -1606,19 +1638,9 @@ async function renderHTMLComponent(result, Component, _props, slots = {}) {
|
|
|
1606
1638
|
}
|
|
1607
1639
|
function renderAstroComponent(result, displayName, Component, props, slots = {}) {
|
|
1608
1640
|
const instance = createAstroComponentInstance(result, displayName, Component, props, slots);
|
|
1609
|
-
const bufferChunks = [];
|
|
1610
|
-
const bufferDestination = {
|
|
1611
|
-
write: (chunk) => bufferChunks.push(chunk)
|
|
1612
|
-
};
|
|
1613
|
-
const renderPromise = instance.render(bufferDestination);
|
|
1614
1641
|
return {
|
|
1615
1642
|
async render(destination) {
|
|
1616
|
-
|
|
1617
|
-
destination.write(chunk);
|
|
1618
|
-
}
|
|
1619
|
-
bufferChunks.length = 0;
|
|
1620
|
-
bufferDestination.write = (chunk) => destination.write(chunk);
|
|
1621
|
-
await renderPromise;
|
|
1643
|
+
await instance.render(destination);
|
|
1622
1644
|
}
|
|
1623
1645
|
};
|
|
1624
1646
|
}
|
|
@@ -3528,10 +3550,15 @@ class App {
|
|
|
3528
3550
|
const errorRouteData = matchRoute("/" + status, this.#manifestData);
|
|
3529
3551
|
const url = new URL(request.url);
|
|
3530
3552
|
if (errorRouteData) {
|
|
3531
|
-
if (errorRouteData.prerender
|
|
3532
|
-
const
|
|
3553
|
+
if (errorRouteData.prerender) {
|
|
3554
|
+
const maybeDotHtml = errorRouteData.route.endsWith(`/${status}`) ? ".html" : "";
|
|
3555
|
+
const statusURL = new URL(
|
|
3556
|
+
`${this.#baseWithoutTrailingSlash}/${status}${maybeDotHtml}`,
|
|
3557
|
+
url
|
|
3558
|
+
);
|
|
3533
3559
|
const response2 = await fetch(statusURL.toString());
|
|
3534
|
-
|
|
3560
|
+
const override = { status };
|
|
3561
|
+
return this.#mergeResponses(response2, originalResponse, override);
|
|
3535
3562
|
}
|
|
3536
3563
|
const mod = await this.#getModuleForRoute(errorRouteData);
|
|
3537
3564
|
try {
|
|
@@ -3558,14 +3585,21 @@ class App {
|
|
|
3558
3585
|
Reflect.set(response, responseSentSymbol, true);
|
|
3559
3586
|
return response;
|
|
3560
3587
|
}
|
|
3561
|
-
#mergeResponses(newResponse, oldResponse) {
|
|
3562
|
-
if (!oldResponse)
|
|
3588
|
+
#mergeResponses(newResponse, oldResponse, override) {
|
|
3589
|
+
if (!oldResponse) {
|
|
3590
|
+
if (override !== void 0) {
|
|
3591
|
+
return new Response(newResponse.body, {
|
|
3592
|
+
status: override.status,
|
|
3593
|
+
statusText: newResponse.statusText,
|
|
3594
|
+
headers: newResponse.headers
|
|
3595
|
+
});
|
|
3596
|
+
}
|
|
3563
3597
|
return newResponse;
|
|
3564
|
-
|
|
3598
|
+
}
|
|
3599
|
+
const { statusText, headers } = oldResponse;
|
|
3600
|
+
const status = (override == null ? void 0 : override.status) ? override.status : oldResponse.status === 200 ? newResponse.status : oldResponse.status;
|
|
3565
3601
|
return new Response(newResponse.body, {
|
|
3566
|
-
|
|
3567
|
-
// Otherwise, the user set a specific status while rendering and we should respect that one
|
|
3568
|
-
status: status === 200 ? newResponse.status : status,
|
|
3602
|
+
status,
|
|
3569
3603
|
statusText: status === 200 ? newResponse.statusText : statusText,
|
|
3570
3604
|
headers: new Headers(Array.from(headers))
|
|
3571
3605
|
});
|
|
@@ -3604,70 +3638,86 @@ class App {
|
|
|
3604
3638
|
}
|
|
3605
3639
|
|
|
3606
3640
|
const clientAddressSymbol = Symbol.for("astro.clientAddress");
|
|
3607
|
-
function createRequestFromNodeRequest(req,
|
|
3641
|
+
function createRequestFromNodeRequest(req, options) {
|
|
3608
3642
|
var _a;
|
|
3609
3643
|
const protocol = req.socket instanceof TLSSocket || req.headers["x-forwarded-proto"] === "https" ? "https" : "http";
|
|
3610
3644
|
const hostname = req.headers.host || req.headers[":authority"];
|
|
3611
3645
|
const url = `${protocol}://${hostname}${req.url}`;
|
|
3612
|
-
const
|
|
3613
|
-
const entries = Object.entries(rawHeaders);
|
|
3646
|
+
const headers = makeRequestHeaders(req);
|
|
3614
3647
|
const method = req.method || "GET";
|
|
3648
|
+
let bodyProps = {};
|
|
3649
|
+
const bodyAllowed = method !== "HEAD" && method !== "GET" && !(options == null ? void 0 : options.emptyBody);
|
|
3650
|
+
if (bodyAllowed) {
|
|
3651
|
+
bodyProps = makeRequestBody(req);
|
|
3652
|
+
}
|
|
3615
3653
|
const request = new Request(url, {
|
|
3616
3654
|
method,
|
|
3617
|
-
headers
|
|
3618
|
-
|
|
3655
|
+
headers,
|
|
3656
|
+
...bodyProps
|
|
3619
3657
|
});
|
|
3620
3658
|
if ((_a = req.socket) == null ? void 0 : _a.remoteAddress) {
|
|
3621
3659
|
Reflect.set(request, clientAddressSymbol, req.socket.remoteAddress);
|
|
3622
3660
|
}
|
|
3623
3661
|
return request;
|
|
3624
3662
|
}
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3663
|
+
function makeRequestHeaders(req) {
|
|
3664
|
+
const headers = new Headers();
|
|
3665
|
+
for (const [name, value] of Object.entries(req.headers)) {
|
|
3666
|
+
if (value === void 0) {
|
|
3667
|
+
continue;
|
|
3668
|
+
}
|
|
3669
|
+
if (Array.isArray(value)) {
|
|
3670
|
+
for (const item of value) {
|
|
3671
|
+
headers.append(name, item);
|
|
3672
|
+
}
|
|
3673
|
+
} else {
|
|
3674
|
+
headers.append(name, value);
|
|
3675
|
+
}
|
|
3628
3676
|
}
|
|
3629
|
-
|
|
3677
|
+
return headers;
|
|
3678
|
+
}
|
|
3679
|
+
function makeRequestBody(req) {
|
|
3680
|
+
if (req.body !== void 0) {
|
|
3630
3681
|
if (typeof req.body === "string" && req.body.length > 0) {
|
|
3631
|
-
return
|
|
3632
|
-
req instanceof Request ? req : createRequestFromNodeRequest(req, Buffer.from(req.body)),
|
|
3633
|
-
routeData,
|
|
3634
|
-
locals
|
|
3635
|
-
);
|
|
3682
|
+
return { body: Buffer.from(req.body) };
|
|
3636
3683
|
}
|
|
3637
3684
|
if (typeof req.body === "object" && req.body !== null && Object.keys(req.body).length > 0) {
|
|
3638
|
-
return
|
|
3639
|
-
req instanceof Request ? req : createRequestFromNodeRequest(req, Buffer.from(JSON.stringify(req.body))),
|
|
3640
|
-
routeData,
|
|
3641
|
-
locals
|
|
3642
|
-
);
|
|
3685
|
+
return { body: Buffer.from(JSON.stringify(req.body)) };
|
|
3643
3686
|
}
|
|
3644
|
-
if ("
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3687
|
+
if (typeof req.body === "object" && req.body !== null && typeof req.body[Symbol.asyncIterator] !== "undefined") {
|
|
3688
|
+
return asyncIterableToBodyProps(req.body);
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
return asyncIterableToBodyProps(req);
|
|
3692
|
+
}
|
|
3693
|
+
function asyncIterableToBodyProps(iterable) {
|
|
3694
|
+
return {
|
|
3695
|
+
// Node uses undici for the Request implementation. Undici accepts
|
|
3696
|
+
// a non-standard async iterable for the body.
|
|
3697
|
+
// @ts-expect-error
|
|
3698
|
+
body: iterable,
|
|
3699
|
+
// The duplex property is required when using a ReadableStream or async
|
|
3700
|
+
// iterable for the body. The type definitions do not include the duplex
|
|
3701
|
+
// property because they are not up-to-date.
|
|
3702
|
+
// @ts-expect-error
|
|
3703
|
+
duplex: "half"
|
|
3704
|
+
};
|
|
3705
|
+
}
|
|
3706
|
+
class NodeApp extends App {
|
|
3707
|
+
match(req, opts = {}) {
|
|
3708
|
+
if (!(req instanceof Request)) {
|
|
3709
|
+
req = createRequestFromNodeRequest(req, {
|
|
3710
|
+
emptyBody: true
|
|
3663
3711
|
});
|
|
3664
3712
|
}
|
|
3665
|
-
return super.
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3713
|
+
return super.match(req, opts);
|
|
3714
|
+
}
|
|
3715
|
+
render(req, routeData, locals) {
|
|
3716
|
+
if (!(req instanceof Request)) {
|
|
3717
|
+
req = createRequestFromNodeRequest(req);
|
|
3718
|
+
}
|
|
3719
|
+
return super.render(req, routeData, locals);
|
|
3670
3720
|
}
|
|
3671
3721
|
}
|
|
3672
3722
|
|
|
3673
|
-
export { Fragment as F, NodeApp as N, createComponent as a, renderComponent as b, createAstro as c, addAttribute as d,
|
|
3723
|
+
export { Fragment as F, NodeApp as N, createComponent as a, renderComponent as b, createAstro as c, addAttribute as d, renderSlotToString as e, renderAllHeadContent as f, renderSlot as g, deserializeManifest as h, server_default as i, maybeRenderHead as m, renderTemplate as r, spreadAttributes as s, unescapeHTML as u };
|
package/packages/storefront/dist/server/chunks/{_...5323ec5a.mjs → endpoint@_@js.35807882.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.bb5b7191.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,14 +14,22 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.fd8a229f.mjs';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:url';
|
|
21
|
+
import 'http-cache-semantics';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'image-size';
|
|
24
|
+
import 'magic-string';
|
|
25
|
+
import 'node:stream';
|
|
18
26
|
import '@cloudcommerce/api';
|
|
19
27
|
import 'node:events';
|
|
20
|
-
import 'node:path';
|
|
21
28
|
import '@cloudcommerce/config';
|
|
29
|
+
import 'ultrahtml';
|
|
22
30
|
/* empty css */import '@vueuse/core';
|
|
23
31
|
import '@headlessui/vue';
|
|
24
32
|
|
|
25
|
-
const page = () => import('./pages/
|
|
33
|
+
const page = () => import('./pages/endpoint.js.247079ba.mjs').then(n => n.e);
|
|
26
34
|
|
|
27
35
|
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.bb5b7191.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,14 +14,22 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.fd8a229f.mjs';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:url';
|
|
21
|
+
import 'http-cache-semantics';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'image-size';
|
|
24
|
+
import 'magic-string';
|
|
25
|
+
import 'node:stream';
|
|
18
26
|
import '@cloudcommerce/api';
|
|
19
27
|
import 'node:events';
|
|
20
|
-
import 'node:path';
|
|
21
28
|
import '@cloudcommerce/config';
|
|
29
|
+
import 'ultrahtml';
|
|
22
30
|
/* empty css */import '@vueuse/core';
|
|
23
31
|
import '@headlessui/vue';
|
|
24
32
|
|
|
25
|
-
const page = () => import('./pages/index.astro.
|
|
33
|
+
const page = () => import('./pages/index.astro.dab642f5.mjs').then(n => n.a);
|
|
26
34
|
|
|
27
35
|
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.bb5b7191.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,14 +14,22 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.fd8a229f.mjs';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:url';
|
|
21
|
+
import 'http-cache-semantics';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'image-size';
|
|
24
|
+
import 'magic-string';
|
|
25
|
+
import 'node:stream';
|
|
18
26
|
import '@cloudcommerce/api';
|
|
19
27
|
import 'node:events';
|
|
20
|
-
import 'node:path';
|
|
21
28
|
import '@cloudcommerce/config';
|
|
29
|
+
import 'ultrahtml';
|
|
22
30
|
/* empty css */import '@vueuse/core';
|
|
23
31
|
import '@headlessui/vue';
|
|
24
32
|
|
|
25
|
-
const page = () => import('./pages/index.astro.
|
|
33
|
+
const page = () => import('./pages/index.astro.dab642f5.mjs').then(n => n.i);
|
|
26
34
|
|
|
27
35
|
export { page };
|