cloudcommerce 2.0.4 → 2.0.5
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-apps.yml +2 -2
- package/CHANGELOG.md +9 -0
- package/action.yml +3 -3
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +2 -2
- package/packages/api/lib/api.d.ts +8 -2
- package/packages/api/lib/api.js +8 -6
- package/packages/api/lib/api.js.map +1 -1
- package/packages/api/package.json +3 -2
- package/packages/api/src/api.ts +12 -6
- package/packages/api/tests/index.test.ts +9 -0
- package/packages/api/types.d.ts +35 -26
- package/packages/apps/affiliate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/pagarme-v5/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/functions-checkout/handle-order-transaction.js.map +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/modules/src/firebase/functions-checkout/handle-order-transaction.ts +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +8 -4
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +8 -4
- package/packages/storefront/dist/client/_astro/AccountPage.oxrx8xO0.js +1 -0
- package/packages/storefront/dist/client/_astro/CartSidebar.ShqcM66P.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.OYdereCn.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.RVEArMQA.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.Bsod-tLh.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductDetails.TQM36pzk.js +7 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.HX1P9sTW.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf._0iHMZBO.js +1 -0
- package/packages/storefront/dist/client/_astro/QuantitySelector.SEAsIOhe.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.JVuqMQFe.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchShowcase.zwEq0xsL.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.BoPmUmjI.js +7 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.40kDRyEO.js +1 -0
- package/packages/storefront/dist/client/_astro/{_slug_.cfRx-rdA.css → _slug_.PTG68eA8.css} +1 -1
- package/packages/storefront/dist/client/_astro/client.nPN_zw-c.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session.yn5lG3w3.js +7 -0
- package/packages/storefront/dist/client/_astro/format-money.ykh8O7d2.js +1 -0
- package/packages/storefront/dist/client/_astro/grid-title.z5ui_5pL.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.FcmEawNA.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.daSrX1-i.js +1 -0
- package/packages/storefront/dist/client/_astro/hoisted.hpPOAcMM.js +1 -0
- package/packages/storefront/dist/client/_astro/i18n.MycOopxQ.js +1 -0
- package/packages/storefront/dist/client/_astro/img.c2KI4eO6.js +1 -0
- package/packages/storefront/dist/client/_astro/index.8acAQSHW.js +1 -0
- package/packages/storefront/dist/client/_astro/index.NRzvVgQf.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.dHD0h8Nc.js +1 -0
- package/packages/storefront/dist/client/_astro/name.itYHl42A.js +1 -0
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.Pr2hdd7G.js +1 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.MgpVRgys.js +1 -0
- package/packages/storefront/dist/client/_astro/use-analytics.D9xd-k7D.js +1 -0
- package/packages/storefront/dist/client/_astro/use-product-card.gKh9czSW.js +1 -0
- package/packages/storefront/dist/client/_astro/use-text-value.ZIz7zsXT.js +4 -0
- package/packages/storefront/dist/server/chunks/{CartSidebar_gCUGFy65.mjs → CartSidebar_8VAKl-jR.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{SearchModal_2uYZ9tHy.mjs → SearchModal_7debttOi.mjs} +5 -5
- package/packages/storefront/dist/server/chunks/{_.._FnNLvTNv.mjs → _.._D6rq0cLa.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{account_iZ2QmK5E.mjs → _page__WXDIwV7g.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{~fallback_wxuqpDXG.mjs → account_DOT2RzND.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/astro/{assets-service_TpUb271h.mjs → assets-service_gJYJeEDH.mjs} +9 -5
- package/packages/storefront/dist/server/chunks/{astro_PpArQAsY.mjs → astro_H-6uiAAG.mjs} +36 -30
- package/packages/storefront/dist/server/chunks/index_eXlHIU83.mjs +6 -0
- package/packages/storefront/dist/server/chunks/{node_wOa5hJmt.mjs → node_-eQO2yOn.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{__cEcxuEWe.mjs → __fI3NeWvy.mjs} +1750 -730
- package/packages/storefront/dist/server/chunks/pages/_page__Piz8geXW.mjs +165 -0
- package/packages/storefront/dist/server/chunks/pages/{account_WliDuQOB.mjs → account_6pD7OYw-.mjs} +6 -3
- package/packages/storefront/dist/server/chunks/pages/index_2F5yi6YO.mjs +128 -0
- package/packages/storefront/dist/server/chunks/pages/{node_ZaY4t9qW.mjs → node_-Buhxl8v.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{~fallback_TL5hPXF_.mjs → ~fallback_okEL1qQ3.mjs} +25 -8
- package/packages/storefront/dist/server/chunks/~fallback_M-xiy2GE.mjs +6 -0
- package/packages/storefront/dist/server/entry.mjs +34 -29
- package/packages/storefront/dist/server/manifest_oV2meNKS.mjs +196 -0
- package/packages/storefront/dist/server/renderers.mjs +5 -612
- package/packages/storefront/package.json +1 -1
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/AccountPage.Osc6ffV0.js +0 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.LrfpXG2B.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.Zf6kCaqD.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.N4d9fV8H.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.eQ9Vd255.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.Ln_jf57U.js +0 -7
- package/packages/storefront/dist/client/_astro/ProductShelf.X389bv9S.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.vj6lVDCr.js +0 -1
- package/packages/storefront/dist/client/_astro/QuantitySelector.qSJQlvTe.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.BrVoDBvg.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchShowcase.KAz3nwco.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.mFKGzhIu.js +0 -7
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper._suIQ7WC.js +0 -1
- package/packages/storefront/dist/client/_astro/client.PdegUP6S.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.KkTHFOXl.js +0 -7
- package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-utils.Ld2zf-Ve.js +0 -1
- package/packages/storefront/dist/client/_astro/format-money.Axn0YFLJ.js +0 -1
- package/packages/storefront/dist/client/_astro/grid-title.GntHOijE.js +0 -1
- package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
- package/packages/storefront/dist/client/_astro/hoisted.3ec9NcvP.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.UnTlypMd.js +0 -1
- package/packages/storefront/dist/client/_astro/i18n.3-NUtxYq.js +0 -1
- package/packages/storefront/dist/client/_astro/img.pozlYdd3.js +0 -1
- package/packages/storefront/dist/client/_astro/index.TkCbiY_p.js +0 -1
- package/packages/storefront/dist/client/_astro/index.m6fK0JXC.js +0 -1
- package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
- package/packages/storefront/dist/client/_astro/modules-info.mmwB1qIJ.js +0 -1
- package/packages/storefront/dist/client/_astro/name.49dZlpDx.js +0 -1
- package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.Ean2uW2R.js +0 -1
- package/packages/storefront/dist/client/_astro/use-analytics.Y7amTmnr.js +0 -1
- package/packages/storefront/dist/client/_astro/use-product-card.zB4z32bC.js +0 -1
- package/packages/storefront/dist/client/_astro/use-text-value.f9pDzruv.js +0 -4
- package/packages/storefront/dist/client/app/account/index.html +0 -56
- package/packages/storefront/dist/client/app/index.html +0 -96
- package/packages/storefront/dist/client/headset-gamer-corsair-hs40-raptor-ca-9011122-naap-vinho/index.html +0 -107
- package/packages/storefront/dist/client/index.html +0 -120
- package/packages/storefront/dist/client/macbook-apple-pro-15.4-intel-core-i7-2.6ghz-ram-16gb-ssd-512gb-mr972ll/a-prata/index.html +0 -107
- package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -107
- package/packages/storefront/dist/client/teclado-gamer-fortrek-mecanico-k5-rgb-outemu-blue-preto/index.html +0 -107
- package/packages/storefront/dist/client/~fallback/index.html +0 -74
- package/packages/storefront/dist/server/chunks/index_1q5IpD39.mjs +0 -6
- package/packages/storefront/dist/server/chunks/index_JEU6B2DI.mjs +0 -6
- package/packages/storefront/dist/server/chunks/pages/index_2bQLkQf-.mjs +0 -317
- package/packages/storefront/dist/server/manifest_YgAgEwvF.mjs +0 -196
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { e as createAstro, f as createComponent, r as renderTemplate, h as addAttribute, i as renderComponent, F as Fragment, m as maybeRenderHead, u as unescapeHTML } from '../astro_H-6uiAAG.mjs';
|
|
2
|
+
import 'kleur/colors';
|
|
3
|
+
import { P as Pagination, _ as _export_sfc, g as getConfig, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$PageFooter, c as $$Base } from './__fI3NeWvy.mjs';
|
|
4
|
+
import { useSSRContext, defineComponent, computed, resolveComponent, mergeProps } from 'vue';
|
|
5
|
+
import { ssrRenderAttrs, ssrRenderAttr, ssrRenderComponent, ssrInterpolate, ssrRenderList } from 'vue/server-renderer';
|
|
6
|
+
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "BlogPosts",
|
|
9
|
+
props: {
|
|
10
|
+
page: {},
|
|
11
|
+
totalPages: {},
|
|
12
|
+
posts: {}
|
|
13
|
+
},
|
|
14
|
+
setup(__props, { expose: __expose }) {
|
|
15
|
+
__expose();
|
|
16
|
+
const props = __props;
|
|
17
|
+
const featured = computed(() => props.posts[0]);
|
|
18
|
+
const gridPosts = computed(() => props.posts.slice(1));
|
|
19
|
+
const __returned__ = { props, featured, gridPosts, Pagination };
|
|
20
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
21
|
+
return __returned__;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
25
|
+
const _component_AImg = resolveComponent("AImg");
|
|
26
|
+
_push(`<article${ssrRenderAttrs(mergeProps({ class: "mb-9 mt-6 md:mb-12 md:mt-8" }, _attrs))}><section class="ui-section">`);
|
|
27
|
+
if ($setup.featured) {
|
|
28
|
+
_push(`<article class="mb-9 flex flex-wrap gap-x-8 lg:flex-nowrap"><a${ssrRenderAttr("href", `/posts/${$setup.featured.slug}`)} class="w-full max-w-[600px]">`);
|
|
29
|
+
if ($setup.featured.thumbnail) {
|
|
30
|
+
_push(ssrRenderComponent(_component_AImg, {
|
|
31
|
+
picture: { url: $setup.featured.thumbnail, size: "750x500" },
|
|
32
|
+
class: "aspect-[3/2] w-full max-w-[600px] rounded object-cover"
|
|
33
|
+
}, null, _parent));
|
|
34
|
+
} else {
|
|
35
|
+
_push(`<!---->`);
|
|
36
|
+
}
|
|
37
|
+
_push(`</a><div class="prose grow pt-5"><small class="text-base-500 font-semibold uppercase">Blog</small><a${ssrRenderAttr("href", `/posts/${$setup.featured.slug}`)} class="not-prose"><h1 class="ui-title mb-4 mt-2">${ssrInterpolate($setup.featured.title)}</h1></a><p class="text-xl">${ssrInterpolate($setup.featured.description)}</p>`);
|
|
38
|
+
if ($setup.featured.date) {
|
|
39
|
+
_push(`<span class="text-base-600 mr-4">${ssrInterpolate($setup.featured.date)}</span>`);
|
|
40
|
+
} else {
|
|
41
|
+
_push(`<!---->`);
|
|
42
|
+
}
|
|
43
|
+
if ($setup.featured.author) {
|
|
44
|
+
_push(`<em class="text-base-600"> --- ${ssrInterpolate($setup.featured.author)}</em>`);
|
|
45
|
+
} else {
|
|
46
|
+
_push(`<!---->`);
|
|
47
|
+
}
|
|
48
|
+
_push(`<div class="not-prose mt-5"><a${ssrRenderAttr("href", `/posts/${$setup.featured.slug}`)} class="ui-btn-lg ui-btn-primary"><i class="i-chevron-right mr-1"></i> ${ssrInterpolate("Ver mais")}</a></div></div></article>`);
|
|
49
|
+
} else {
|
|
50
|
+
_push(`<!---->`);
|
|
51
|
+
}
|
|
52
|
+
_push(`<ul class="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3"><!--[-->`);
|
|
53
|
+
ssrRenderList($setup.gridPosts, (post, i) => {
|
|
54
|
+
_push(`<li><article><a${ssrRenderAttr("href", `/posts/${post.slug}`)}>`);
|
|
55
|
+
if (post.thumbnail) {
|
|
56
|
+
_push(ssrRenderComponent(_component_AImg, {
|
|
57
|
+
picture: { url: post.thumbnail, size: "750x500" },
|
|
58
|
+
class: "aspect-[3/2] w-full rounded object-cover"
|
|
59
|
+
}, null, _parent));
|
|
60
|
+
} else {
|
|
61
|
+
_push(`<!---->`);
|
|
62
|
+
}
|
|
63
|
+
_push(`<div class="text-base-700 px-3 pt-4"><h3 class="text-base-800 mb-1 text-xl font-medium">${ssrInterpolate(post.title)}</h3><p>${ssrInterpolate(post.description)}</p>`);
|
|
64
|
+
if (post.date) {
|
|
65
|
+
_push(`<small class="text-base-500 mt-1 block">${ssrInterpolate(post.date)}</small>`);
|
|
66
|
+
} else {
|
|
67
|
+
_push(`<!---->`);
|
|
68
|
+
}
|
|
69
|
+
_push(`</div></a></article></li>`);
|
|
70
|
+
});
|
|
71
|
+
_push(`<!--]--></ul></section>`);
|
|
72
|
+
if ($props.totalPages > 1) {
|
|
73
|
+
_push(`<section class="ui-section">`);
|
|
74
|
+
_push(ssrRenderComponent($setup["Pagination"], {
|
|
75
|
+
page: $props.page,
|
|
76
|
+
"total-pages": $props.totalPages,
|
|
77
|
+
"is-url-path": ""
|
|
78
|
+
}, null, _parent));
|
|
79
|
+
_push(`</section>`);
|
|
80
|
+
} else {
|
|
81
|
+
_push(`<!---->`);
|
|
82
|
+
}
|
|
83
|
+
_push(`</article>`);
|
|
84
|
+
}
|
|
85
|
+
const _sfc_setup = _sfc_main.setup;
|
|
86
|
+
_sfc_main.setup = (props, ctx) => {
|
|
87
|
+
const ssrContext = useSSRContext();
|
|
88
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/BlogPosts.vue");
|
|
89
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
90
|
+
};
|
|
91
|
+
const BlogPosts = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
92
|
+
|
|
93
|
+
const POSTS_PER_PAGE = 13;
|
|
94
|
+
const countBlogPages = async () => {
|
|
95
|
+
const postSlugs = await getConfig().getContent("blog/");
|
|
96
|
+
const totalPages = Math.ceil(postSlugs.length / POSTS_PER_PAGE) || 1;
|
|
97
|
+
return { postSlugs, totalPages };
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const $$Astro = createAstro("https://demo.ecomplus.app");
|
|
101
|
+
async function getStaticPaths() {
|
|
102
|
+
if ({"BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": true, "SITE": "https://demo.ecomplus.app", "ASSETS_PREFIX": undefined}.BUILD_MINIMAL)
|
|
103
|
+
return [];
|
|
104
|
+
return [{
|
|
105
|
+
params: { page: 1 }
|
|
106
|
+
}];
|
|
107
|
+
}
|
|
108
|
+
const $$page = createComponent(async ($$result, $$props, $$slots) => {
|
|
109
|
+
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
110
|
+
Astro2.self = $$page;
|
|
111
|
+
let routeContext;
|
|
112
|
+
let loadError;
|
|
113
|
+
try {
|
|
114
|
+
routeContext = await loadRouteContext(Astro2);
|
|
115
|
+
} catch (err) {
|
|
116
|
+
if (err.astroResponse) {
|
|
117
|
+
return err.astroResponse;
|
|
118
|
+
}
|
|
119
|
+
loadError = err;
|
|
120
|
+
}
|
|
121
|
+
if (!routeContext) {
|
|
122
|
+
return Astro2.redirect(`/~fallback?url=${Astro2.url.pathname}`);
|
|
123
|
+
}
|
|
124
|
+
const { getContent, settings } = routeContext;
|
|
125
|
+
const { postSlugs, totalPages } = await countBlogPages();
|
|
126
|
+
const page = Number(Astro2.params.page);
|
|
127
|
+
if (!page || page > totalPages) {
|
|
128
|
+
return Astro2.redirect("/blog/1");
|
|
129
|
+
}
|
|
130
|
+
const posts = [];
|
|
131
|
+
const pageOffset = (page - 1) * POSTS_PER_PAGE;
|
|
132
|
+
await Promise.all(
|
|
133
|
+
postSlugs.slice(pageOffset, pageOffset + POSTS_PER_PAGE).map((slug) => {
|
|
134
|
+
return new Promise((resolve) => {
|
|
135
|
+
getContent(`blog/${slug}`).then((content) => {
|
|
136
|
+
if (content) {
|
|
137
|
+
const { markdown, ...post } = content;
|
|
138
|
+
posts.push({ ...post, slug });
|
|
139
|
+
}
|
|
140
|
+
resolve(null);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
const metaTitle = `Blog | ${settings.name}`;
|
|
146
|
+
return renderTemplate`<html${addAttribute(routeContext.lang.replace("_", "-"), "lang")}>
|
|
147
|
+
${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, { "metaTitle": metaTitle }, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
148
|
+
${renderComponent($$result3, "BaseHead", $$BaseHead, {})}
|
|
149
|
+
<title>${`Blog | ${settings.name}`}</title>
|
|
150
|
+
<meta name="description"${addAttribute(settings.description, "content")}>
|
|
151
|
+
` })}`, "default": ($$result2) => renderTemplate`
|
|
152
|
+
|
|
153
|
+
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
154
|
+
${maybeRenderHead()}<main>
|
|
155
|
+
${renderComponent($$result2, "BlogPosts", BlogPosts, { "page": page, "totalPages": totalPages, "posts": posts })}
|
|
156
|
+
</main>
|
|
157
|
+
${renderComponent($$result2, "PageFooter", $$PageFooter, {})}
|
|
158
|
+
` })}`}
|
|
159
|
+
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
160
|
+
</html>`;
|
|
161
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/blog/[page].astro", void 0);
|
|
162
|
+
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/blog/[page].astro";
|
|
163
|
+
const $$url = "/blog/[page]";
|
|
164
|
+
|
|
165
|
+
export { $$page as default, $$file as file, getStaticPaths, $$url as url };
|
package/packages/storefront/dist/server/chunks/pages/{account_WliDuQOB.mjs → account_6pD7OYw-.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as createAstro, f as createComponent, r as renderTemplate, h as addAttribute, i as renderComponent, m as maybeRenderHead } from '../
|
|
1
|
+
import { e as createAstro, f as createComponent, r as renderTemplate, h as addAttribute, i as renderComponent, F as Fragment, m as maybeRenderHead } from '../astro_H-6uiAAG.mjs';
|
|
2
2
|
import 'kleur/colors';
|
|
3
|
-
import { l as loadRouteContext, $ as $$BaseHead,
|
|
3
|
+
import { l as loadRouteContext, $ as $$BaseHead, i as i19myAccount, d as $$Picture, c as $$Base } from './__fI3NeWvy.mjs';
|
|
4
4
|
|
|
5
5
|
const $$Astro = createAstro("https://demo.ecomplus.app");
|
|
6
6
|
const $$Account = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -14,7 +14,10 @@ const $$Account = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
14
14
|
}
|
|
15
15
|
const { settings } = routeContext;
|
|
16
16
|
return renderTemplate`<html${addAttribute(routeContext.lang.replace("_", "-"), "lang")}>
|
|
17
|
-
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "
|
|
17
|
+
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
18
|
+
${renderComponent($$result3, "BaseHead", $$BaseHead, {})}
|
|
19
|
+
<title>${`${i19myAccount} | ${settings.name}`}</title>
|
|
20
|
+
` })}`, "default": ($$result2) => renderTemplate`
|
|
18
21
|
|
|
19
22
|
${maybeRenderHead()}<main>
|
|
20
23
|
${renderComponent($$result2, "AccountPage", null, { "client:only": true, "client:component-hydration": "only", "client:component-path": "~/components/AccountPage.vue", "client:component-export": "default" }, { "logo": ($$result3) => renderTemplate`${renderComponent($$result3, "Picture", $$Picture, { "slot": "logo", "src": settings.logo, "alt": settings.name, "widths": [300], "loading": "lazy", "class": "max-w-[150px]" })}` })}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { e as createAstro, f as createComponent, r as renderTemplate, h as addAttribute, i as renderComponent, F as Fragment } from '../astro_H-6uiAAG.mjs';
|
|
2
|
+
import 'kleur/colors';
|
|
3
|
+
import { F as FooterStamps, _ as _export_sfc, l as loadRouteContext, $ as $$BaseHead, e as i19shoppingCart, d as $$Picture, c as $$Base } from './__fI3NeWvy.mjs';
|
|
4
|
+
import { useSSRContext, defineComponent, resolveComponent, mergeProps, withCtx, createTextVNode, toDisplayString, createVNode } from 'vue';
|
|
5
|
+
import { ssrRenderAttrs, ssrRenderSlot, ssrInterpolate, ssrRenderList, ssrRenderComponent } from 'vue/server-renderer';
|
|
6
|
+
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "CheckoutPage",
|
|
9
|
+
props: {
|
|
10
|
+
footerStamps: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props, { expose: __expose }) {
|
|
13
|
+
__expose();
|
|
14
|
+
const __returned__ = { FooterStamps };
|
|
15
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
16
|
+
return __returned__;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
20
|
+
const _component_ALink = resolveComponent("ALink");
|
|
21
|
+
_push(`<article${ssrRenderAttrs(mergeProps({ class: "flex min-h-screen flex-col justify-end" }, _attrs))}><section class="bg-base-50"><div class="ui-section flex flex-wrap items-center justify-center gap-6 lg:gap-12"><a href="/">`);
|
|
22
|
+
ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
|
|
23
|
+
_push(`</a><div class="flex items-center gap-2"><i class="i-shield-check-solid bg-success-400 m-0 text-3xl"></i><span class="text-base-600 text-base">${ssrInterpolate("Compra segura")}</span></div></div></section><section class="grow"><article id="storefront-app"></article></section><section class="bg-base-50 mt-4 lg:mt-8"><nav class="ui-section-slim"><ul class="mt-6 flex flex-wrap justify-center gap-6 lg:gap-8"><!--[-->`);
|
|
24
|
+
ssrRenderList(_ctx.$settings.serviceLinks, ({ title, href }, i) => {
|
|
25
|
+
_push(`<li>`);
|
|
26
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
27
|
+
href,
|
|
28
|
+
target: "blank",
|
|
29
|
+
class: "ui-link text-base-700"
|
|
30
|
+
}, {
|
|
31
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
32
|
+
if (_push2) {
|
|
33
|
+
_push2(`${ssrInterpolate(title)} <i class="bg-base-300 i-arrow-top-right-on-square ml-0.5"${_scopeId}></i>`);
|
|
34
|
+
} else {
|
|
35
|
+
return [
|
|
36
|
+
createTextVNode(toDisplayString(title) + " ", 1),
|
|
37
|
+
createVNode("i", { class: "bg-base-300 i-arrow-top-right-on-square ml-0.5" })
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
_: 2
|
|
42
|
+
}, _parent));
|
|
43
|
+
_push(`</li>`);
|
|
44
|
+
});
|
|
45
|
+
_push(`<!--]--></ul></nav>`);
|
|
46
|
+
_push(ssrRenderComponent($setup["FooterStamps"], { stamps: $props.footerStamps }, null, _parent));
|
|
47
|
+
_push(`</section></article>`);
|
|
48
|
+
}
|
|
49
|
+
const _sfc_setup = _sfc_main.setup;
|
|
50
|
+
_sfc_main.setup = (props, ctx) => {
|
|
51
|
+
const ssrContext = useSSRContext();
|
|
52
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/CheckoutPage.vue");
|
|
53
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
54
|
+
};
|
|
55
|
+
const CheckoutPage = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
56
|
+
|
|
57
|
+
const $$Astro = createAstro("https://demo.ecomplus.app");
|
|
58
|
+
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
|
|
59
|
+
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
60
|
+
Astro2.self = $$Index;
|
|
61
|
+
let routeContext;
|
|
62
|
+
try {
|
|
63
|
+
routeContext = await loadRouteContext(Astro2);
|
|
64
|
+
} catch (err) {
|
|
65
|
+
return err.astroResponse;
|
|
66
|
+
}
|
|
67
|
+
const { settings, getContent } = routeContext;
|
|
68
|
+
const layoutContent = await getContent("layout");
|
|
69
|
+
const { footer: { stamps } } = layoutContent;
|
|
70
|
+
return renderTemplate`<html${addAttribute(routeContext.lang.replace("_", "-"), "lang")}>
|
|
71
|
+
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
72
|
+
${renderComponent($$result3, "BaseHead", $$BaseHead, {})}
|
|
73
|
+
<title>${`${i19shoppingCart} | ${settings.name}`}</title>
|
|
74
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ecomplus/storefront-twbs@7/dist/cdn/storefront-twbs.min.css">
|
|
75
|
+
<style>
|
|
76
|
+
body {
|
|
77
|
+
--primary: var(--c-primary);
|
|
78
|
+
--primary-yiq: var(--c-on-primary);
|
|
79
|
+
--primary-rgb: var(--rgb-primary);
|
|
80
|
+
--primary-darken: var(--c-primary);
|
|
81
|
+
--primary-darken-yiq: var(--c-on-primary);
|
|
82
|
+
--primary-darken-rgb: var(--rgb-primary);
|
|
83
|
+
--primary-dark: var(--c-primary-bold);
|
|
84
|
+
--primary-dark-yiq: var(--c-on-primary-bold);
|
|
85
|
+
--primary-dark-rgb: var(--rgb-primary-bold);
|
|
86
|
+
--primary-darker: var(--c-primary-bold);
|
|
87
|
+
--primary-darker-yiq: var(--c-on-primary-bold);
|
|
88
|
+
--primary-darker-rgb: var(--rgb-primary-bold);
|
|
89
|
+
--primary-darkest: rgb(var(--rgb-primary-900));
|
|
90
|
+
--primary-darkest-yiq: var(--c-on-dark);
|
|
91
|
+
--primary-darkest-rgb: var(--rgb-primary-900);
|
|
92
|
+
--primary-black: rgb(var(--rgb-primary-950));
|
|
93
|
+
--primary-lighten: var(--c-primary);
|
|
94
|
+
--primary-lighten-yiq: var(--c-on-primary);
|
|
95
|
+
--primary-lighten-rgb: var(--rgb-primary);
|
|
96
|
+
--primary-light: var(--c-primary-subtle);
|
|
97
|
+
--primary-light-yiq: var(--c-on-primary-subtle);
|
|
98
|
+
--primary-light-rgb: var(--rgb-primary-subtle);
|
|
99
|
+
--primary-lighter: var(--c-primary-subtle);
|
|
100
|
+
--primary-lighter-yiq: var(--c-on-primary-subtle);
|
|
101
|
+
--primary-lighter-rgb: var(--rgb-primary-subtle);
|
|
102
|
+
--primary-lightest: rgb(var(--rgb-primary-200));
|
|
103
|
+
--primary-lightest-yiq: var(--c-on-light);
|
|
104
|
+
--primary-lightest-rgb: var(--rgb-primary-200);
|
|
105
|
+
}
|
|
106
|
+
#storefront-app .lead {
|
|
107
|
+
margin-bottom: 1.25rem;
|
|
108
|
+
}
|
|
109
|
+
#storefront-app hr {
|
|
110
|
+
margin-top: 1rem;
|
|
111
|
+
margin-bottom: 1rem;
|
|
112
|
+
}
|
|
113
|
+
#storefront-app p {
|
|
114
|
+
margin-bottom: 1rem;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
117
|
+
` })}`, "default": ($$result2) => renderTemplate`
|
|
118
|
+
|
|
119
|
+
${renderComponent($$result2, "CheckoutPage", CheckoutPage, { "footerStamps": stamps }, { "logo": ($$result3) => renderTemplate`${renderComponent($$result3, "Picture", $$Picture, { "slot": "logo", "src": settings.logo, "alt": settings.name, "widths": [300], "loading": "lazy", "class": "max-w-[150px]" })}` })}
|
|
120
|
+
|
|
121
|
+
` })}
|
|
122
|
+
</html>`;
|
|
123
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro", void 0);
|
|
124
|
+
|
|
125
|
+
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro";
|
|
126
|
+
const $$url = "/app";
|
|
127
|
+
|
|
128
|
+
export { $$Index as default, $$file as file, $$url as url };
|
package/packages/storefront/dist/server/chunks/pages/{node_ZaY4t9qW.mjs → node_-Buhxl8v.mjs}
RENAMED
|
@@ -2,14 +2,14 @@ import { isRemotePath } from '@astrojs/internal-helpers/path';
|
|
|
2
2
|
import { readFile } from 'fs/promises';
|
|
3
3
|
import mime from 'mime/lite.js';
|
|
4
4
|
import 'os';
|
|
5
|
-
import { A as AstroError, I as InvalidImageService, c as isRemoteAllowed } from '../astro/assets-
|
|
6
|
-
import {
|
|
5
|
+
import { A as AstroError, I as InvalidImageService, c as isRemoteAllowed } from '../astro/assets-service_gJYJeEDH.mjs';
|
|
6
|
+
import { f as imageConfig, h as assetsDir } from './__fI3NeWvy.mjs';
|
|
7
7
|
|
|
8
8
|
async function getConfiguredImageService() {
|
|
9
9
|
if (!globalThis?.astroAsset?.imageService) {
|
|
10
10
|
const { default: service } = await import(
|
|
11
11
|
// @ts-expect-error
|
|
12
|
-
'../astro/assets-
|
|
12
|
+
'../astro/assets-service_gJYJeEDH.mjs'
|
|
13
13
|
).then(n => n.s).catch((e) => {
|
|
14
14
|
const error = new AstroError(InvalidImageService);
|
|
15
15
|
error.cause = e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as createAstro, f as createComponent, r as renderTemplate, m as maybeRenderHead, h as addAttribute, i as renderComponent } from '../
|
|
1
|
+
import { e as createAstro, f as createComponent, r as renderTemplate, m as maybeRenderHead, h as addAttribute, i as renderComponent, F as Fragment } from '../astro_H-6uiAAG.mjs';
|
|
2
2
|
import 'kleur/colors';
|
|
3
|
-
import { l as loadRouteContext, $ as $$BaseHead,
|
|
3
|
+
import { j as i19error, k as i19errorMsg, m as i19notFound, n as i19home, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$PageFooter, c as $$Base } from './__fI3NeWvy.mjs';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
|
|
6
6
|
const $$Astro$1 = createAstro("https://demo.ecomplus.app");
|
|
@@ -8,11 +8,23 @@ const $$Fallback = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
8
8
|
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
9
9
|
Astro2.self = $$Fallback;
|
|
10
10
|
return renderTemplate`${maybeRenderHead()}<main>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
<article class="prose mx-auto px-8 pt-20 pb-32">
|
|
12
|
+
<h1>${i19error} :/</h1>
|
|
13
|
+
<p class="hidden text-xl" id="errorMsg">
|
|
14
|
+
${i19errorMsg}
|
|
15
|
+
</p>
|
|
16
|
+
<p class="hidden text-xl" id="404Msg">
|
|
17
|
+
${i19notFound} (404)
|
|
18
|
+
</p>
|
|
19
|
+
<p class="text-xl" id="loadingMsg">
|
|
20
|
+
... ... ...
|
|
21
|
+
</p>
|
|
22
|
+
<a href="/" class="text-2xl">
|
|
23
|
+
<i class="i-arrow-right rotate-180 mr-1"></i>
|
|
24
|
+
${i19home}
|
|
25
|
+
</a>
|
|
26
|
+
</article>
|
|
27
|
+
|
|
16
28
|
</main>`;
|
|
17
29
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Fallback.astro", void 0);
|
|
18
30
|
|
|
@@ -26,11 +38,16 @@ const $$fallback = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
26
38
|
} catch (err) {
|
|
27
39
|
return err.astroResponse;
|
|
28
40
|
}
|
|
41
|
+
const { settings } = routeContext;
|
|
29
42
|
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
30
|
-
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "
|
|
43
|
+
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
44
|
+
${renderComponent($$result3, "BaseHead", $$BaseHead, {})}
|
|
45
|
+
<title>${`${i19error} | ${settings.name}`}</title>
|
|
46
|
+
` })}`, "default": ($$result2) => renderTemplate`
|
|
31
47
|
|
|
32
48
|
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
33
49
|
${renderComponent($$result2, "FallbackMain", $$Fallback, {})}
|
|
50
|
+
${renderComponent($$result2, "PageFooter", $$PageFooter, {})}
|
|
34
51
|
` })}
|
|
35
52
|
</html>`;
|
|
36
53
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/~fallback.astro", void 0);
|
|
@@ -3,9 +3,9 @@ import http from 'node:http';
|
|
|
3
3
|
import { TLSSocket } from 'node:tls';
|
|
4
4
|
import { appendForwardSlash as appendForwardSlash$1, joinPaths, trimSlashes, slash, prependForwardSlash, removeTrailingForwardSlash, collapseDuplicateSlashes } from '@astrojs/internal-helpers/path';
|
|
5
5
|
import { serialize, parse } from 'cookie';
|
|
6
|
-
import { l as levels, g as getEventPrefix, L as Logger, A as AstroIntegrationLogger, manifest } from './
|
|
6
|
+
import { l as levels, g as getEventPrefix, L as Logger, A as AstroIntegrationLogger, manifest } from './manifest_oV2meNKS.mjs';
|
|
7
7
|
import 'kleur/colors';
|
|
8
|
-
import { A as AstroError, R as ResponseSentError, o as MiddlewareNoDataOrNextCalled, p as MiddlewareNotAResponse, G as GetStaticPathsRequired, q as InvalidGetStaticPathsReturn, t as InvalidGetStaticPathsEntry, v as GetStaticPathsExpectedParams, w as GetStaticPathsInvalidRouteParam, P as PageNumberParamNotFound, N as NoMatchingStaticPathFound, x as PrerenderDynamicEndpointPathCollide, y as LocalsNotAnObject, z as ASTRO_VERSION, C as ClientAddressNotAvailable, S as StaticClientAddressNotAvailable, B as renderEndpoint, D as ReservedSlotName, k as renderSlotToString, H as renderJSX, J as chunkToString, K as CantRenderPage, O as renderPage$1 } from './chunks/
|
|
8
|
+
import { A as AstroError, R as ResponseSentError, o as MiddlewareNoDataOrNextCalled, p as MiddlewareNotAResponse, G as GetStaticPathsRequired, q as InvalidGetStaticPathsReturn, t as InvalidGetStaticPathsEntry, v as GetStaticPathsExpectedParams, w as GetStaticPathsInvalidRouteParam, P as PageNumberParamNotFound, N as NoMatchingStaticPathFound, x as PrerenderDynamicEndpointPathCollide, y as LocalsNotAnObject, z as ASTRO_VERSION, C as ClientAddressNotAvailable, S as StaticClientAddressNotAvailable, B as renderEndpoint, D as ReservedSlotName, k as renderSlotToString, H as renderJSX, J as chunkToString, K as CantRenderPage, O as renderPage$1 } from './chunks/astro_H-6uiAAG.mjs';
|
|
9
9
|
import 'clsx';
|
|
10
10
|
import buffer from 'node:buffer';
|
|
11
11
|
import crypto from 'node:crypto';
|
|
@@ -202,7 +202,7 @@ class AstroCookies {
|
|
|
202
202
|
* @param key The cookie to get.
|
|
203
203
|
* @returns An object containing the cookie value as well as convenience methods for converting its value.
|
|
204
204
|
*/
|
|
205
|
-
get(key) {
|
|
205
|
+
get(key, options = void 0) {
|
|
206
206
|
if (this.#outgoing?.has(key)) {
|
|
207
207
|
let [serializedValue, , isSetValue] = this.#outgoing.get(key);
|
|
208
208
|
if (isSetValue) {
|
|
@@ -211,7 +211,7 @@ class AstroCookies {
|
|
|
211
211
|
return void 0;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
const values = this.#ensureParsed();
|
|
214
|
+
const values = this.#ensureParsed(options);
|
|
215
215
|
if (key in values) {
|
|
216
216
|
const value = values[key];
|
|
217
217
|
return new AstroCookie(value);
|
|
@@ -223,12 +223,12 @@ class AstroCookies {
|
|
|
223
223
|
* @param key The cookie to check for.
|
|
224
224
|
* @returns
|
|
225
225
|
*/
|
|
226
|
-
has(key) {
|
|
226
|
+
has(key, options = void 0) {
|
|
227
227
|
if (this.#outgoing?.has(key)) {
|
|
228
228
|
let [, , isSetValue] = this.#outgoing.get(key);
|
|
229
229
|
return isSetValue;
|
|
230
230
|
}
|
|
231
|
-
const values = this.#ensureParsed();
|
|
231
|
+
const values = this.#ensureParsed(options);
|
|
232
232
|
return !!values[key];
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
@@ -280,9 +280,9 @@ class AstroCookies {
|
|
|
280
280
|
yield value[1];
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
#ensureParsed() {
|
|
283
|
+
#ensureParsed(options = void 0) {
|
|
284
284
|
if (!this.#requestValues) {
|
|
285
|
-
this.#parse();
|
|
285
|
+
this.#parse(options);
|
|
286
286
|
}
|
|
287
287
|
if (!this.#requestValues) {
|
|
288
288
|
this.#requestValues = {};
|
|
@@ -295,12 +295,12 @@ class AstroCookies {
|
|
|
295
295
|
}
|
|
296
296
|
return this.#outgoing;
|
|
297
297
|
}
|
|
298
|
-
#parse() {
|
|
298
|
+
#parse(options = void 0) {
|
|
299
299
|
const raw = this.#request.headers.get("cookie");
|
|
300
300
|
if (!raw) {
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
|
-
this.#requestValues = parse(raw);
|
|
303
|
+
this.#requestValues = parse(raw, options);
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
|
|
@@ -505,9 +505,9 @@ function getParams(array) {
|
|
|
505
505
|
const params = {};
|
|
506
506
|
array.forEach((key, i) => {
|
|
507
507
|
if (key.startsWith("...")) {
|
|
508
|
-
params[key.slice(3)] = match[i + 1] ?
|
|
508
|
+
params[key.slice(3)] = match[i + 1] ? match[i + 1] : void 0;
|
|
509
509
|
} else {
|
|
510
|
-
params[key] =
|
|
510
|
+
params[key] = match[i + 1];
|
|
511
511
|
}
|
|
512
512
|
});
|
|
513
513
|
return params;
|
|
@@ -1279,6 +1279,7 @@ function createResult(args) {
|
|
|
1279
1279
|
response,
|
|
1280
1280
|
_metadata: {
|
|
1281
1281
|
hasHydrationScript: false,
|
|
1282
|
+
rendererSpecificHydrationScripts: /* @__PURE__ */ new Set(),
|
|
1282
1283
|
hasRenderedHead: false,
|
|
1283
1284
|
hasDirectives: /* @__PURE__ */ new Set(),
|
|
1284
1285
|
headInTree: false,
|
|
@@ -1990,12 +1991,13 @@ function nodeMiddleware_default(app, mode) {
|
|
|
1990
1991
|
}
|
|
1991
1992
|
}
|
|
1992
1993
|
}
|
|
1994
|
+
const logger = app.getAdapterLogger();
|
|
1993
1995
|
try {
|
|
1994
1996
|
const routeData = app.match(req);
|
|
1995
1997
|
if (routeData) {
|
|
1996
1998
|
try {
|
|
1997
1999
|
const response = await app.render(req, { routeData, locals });
|
|
1998
|
-
await writeWebResponse(app, res, response);
|
|
2000
|
+
await writeWebResponse(app, res, response, logger);
|
|
1999
2001
|
} catch (err) {
|
|
2000
2002
|
if (next) {
|
|
2001
2003
|
next(err);
|
|
@@ -2007,10 +2009,9 @@ function nodeMiddleware_default(app, mode) {
|
|
|
2007
2009
|
return next();
|
|
2008
2010
|
} else {
|
|
2009
2011
|
const response = await app.render(req);
|
|
2010
|
-
await writeWebResponse(app, res, response);
|
|
2012
|
+
await writeWebResponse(app, res, response, logger);
|
|
2011
2013
|
}
|
|
2012
2014
|
} catch (err) {
|
|
2013
|
-
const logger = app.getAdapterLogger();
|
|
2014
2015
|
logger.error(`Could not render ${req.url}`);
|
|
2015
2016
|
console.error(err);
|
|
2016
2017
|
if (!res.headersSent) {
|
|
@@ -2020,31 +2021,35 @@ function nodeMiddleware_default(app, mode) {
|
|
|
2020
2021
|
}
|
|
2021
2022
|
};
|
|
2022
2023
|
}
|
|
2023
|
-
async function writeWebResponse(app, res, webResponse) {
|
|
2024
|
-
const { status, headers } = webResponse;
|
|
2024
|
+
async function writeWebResponse(app, res, webResponse, logger) {
|
|
2025
|
+
const { status, headers, body } = webResponse;
|
|
2025
2026
|
if (app.setCookieHeaders) {
|
|
2026
2027
|
const setCookieHeaders = Array.from(app.setCookieHeaders(webResponse));
|
|
2027
2028
|
if (setCookieHeaders.length) {
|
|
2028
2029
|
for (const setCookieHeader of setCookieHeaders) {
|
|
2029
|
-
|
|
2030
|
+
headers.append("set-cookie", setCookieHeader);
|
|
2030
2031
|
}
|
|
2031
2032
|
}
|
|
2032
2033
|
}
|
|
2033
2034
|
const nodeHeaders = createOutgoingHttpHeaders(headers);
|
|
2034
2035
|
res.writeHead(status, nodeHeaders);
|
|
2035
|
-
if (
|
|
2036
|
+
if (body) {
|
|
2036
2037
|
try {
|
|
2037
|
-
const reader =
|
|
2038
|
+
const reader = body.getReader();
|
|
2038
2039
|
res.on("close", () => {
|
|
2039
|
-
reader.cancel()
|
|
2040
|
+
reader.cancel().catch((err) => {
|
|
2041
|
+
logger.error(
|
|
2042
|
+
`There was an uncaught error in the middle of the stream while rendering ${res.req.url}.`
|
|
2043
|
+
);
|
|
2044
|
+
console.error(err);
|
|
2045
|
+
});
|
|
2040
2046
|
});
|
|
2041
2047
|
let result = await reader.read();
|
|
2042
2048
|
while (!result.done) {
|
|
2043
2049
|
res.write(result.value);
|
|
2044
2050
|
result = await reader.read();
|
|
2045
2051
|
}
|
|
2046
|
-
} catch
|
|
2047
|
-
console.error(err?.stack || err?.message || String(err));
|
|
2052
|
+
} catch {
|
|
2048
2053
|
res.write("Internal server error");
|
|
2049
2054
|
}
|
|
2050
2055
|
}
|
|
@@ -2254,12 +2259,12 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2254
2259
|
start
|
|
2255
2260
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2256
2261
|
|
|
2257
|
-
const _page0 = () => import('./chunks/
|
|
2258
|
-
const _page1 = () => import('./chunks
|
|
2259
|
-
const _page2 = () => import('./chunks
|
|
2260
|
-
const _page3 = () => import('./chunks/
|
|
2261
|
-
const _page4 = () => import('./chunks/
|
|
2262
|
-
const _page5 = () => import('./chunks/_..
|
|
2262
|
+
const _page0 = () => import('./chunks/node_-eQO2yOn.mjs');
|
|
2263
|
+
const _page1 = () => import('./chunks/~fallback_M-xiy2GE.mjs');
|
|
2264
|
+
const _page2 = () => import('./chunks/_page__WXDIwV7g.mjs');
|
|
2265
|
+
const _page3 = () => import('./chunks/index_eXlHIU83.mjs');
|
|
2266
|
+
const _page4 = () => import('./chunks/account_DOT2RzND.mjs');
|
|
2267
|
+
const _page5 = () => import('./chunks/_.._D6rq0cLa.mjs');const pageMap = new Map([["../../node_modules/.pnpm/astro@4.1.1_@types+node@18.19.5_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node.js", _page0],["src/pages/~fallback.astro", _page1],["src/pages/blog/[page].astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
|
|
2263
2268
|
const _manifest = Object.assign(manifest, {
|
|
2264
2269
|
pageMap,
|
|
2265
2270
|
renderers,
|