cloudcommerce 2.3.0 → 2.3.2

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.
Files changed (215) hide show
  1. package/.github/workflows/test-apps.yml +3 -3
  2. package/CHANGELOG.md +24 -0
  3. package/action.yml +6 -6
  4. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  5. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  6. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  7. package/ecomplus-stores/barra-doce/package.json +2 -2
  8. package/package.json +6 -6
  9. package/packages/api/package.json +1 -1
  10. package/packages/apps/affiliate-program/package.json +1 -1
  11. package/packages/apps/correios/package.json +2 -2
  12. package/packages/apps/custom-payment/package.json +1 -1
  13. package/packages/apps/custom-shipping/package.json +1 -1
  14. package/packages/apps/datafrete/package.json +1 -1
  15. package/packages/apps/discounts/package.json +1 -1
  16. package/packages/apps/emails/package.json +1 -1
  17. package/packages/apps/fb-conversions/package.json +2 -2
  18. package/packages/apps/flash-courier/package.json +1 -1
  19. package/packages/apps/frenet/package.json +1 -1
  20. package/packages/apps/galaxpay/package.json +1 -1
  21. package/packages/apps/google-analytics/package.json +1 -1
  22. package/packages/apps/jadlog/package.json +1 -1
  23. package/packages/apps/loyalty-points/package.json +1 -1
  24. package/packages/apps/mandae/package.json +1 -1
  25. package/packages/apps/melhor-envio/package.json +1 -1
  26. package/packages/apps/mercadopago/package.json +1 -1
  27. package/packages/apps/pagarme/package.json +1 -1
  28. package/packages/apps/pagarme-v5/package.json +1 -1
  29. package/packages/apps/paghiper/package.json +1 -1
  30. package/packages/apps/pix/package.json +1 -1
  31. package/packages/apps/tiny-erp/package.json +1 -1
  32. package/packages/apps/webhooks/package.json +1 -1
  33. package/packages/cli/ci/bunny-config-base.sh +4 -2
  34. package/packages/cli/config/firestore.rules +3 -0
  35. package/packages/cli/package.json +1 -1
  36. package/packages/config/package.json +1 -1
  37. package/packages/emails/package.json +1 -1
  38. package/packages/eslint/package.json +5 -5
  39. package/packages/events/package.json +1 -1
  40. package/packages/feeds/package.json +1 -1
  41. package/packages/firebase/package.json +2 -2
  42. package/packages/i18n/package.json +1 -1
  43. package/packages/modules/package.json +1 -1
  44. package/packages/passport/package.json +1 -1
  45. package/packages/ssr/lib/lib/analytics/send-to-ga4.js +2 -1
  46. package/packages/ssr/lib/lib/analytics/send-to-ga4.js.map +1 -1
  47. package/packages/ssr/lib/lib/analytics-events.js +11 -1
  48. package/packages/ssr/lib/lib/analytics-events.js.map +1 -1
  49. package/packages/ssr/lib/lib/cron-ssr-save-views.js +11 -5
  50. package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
  51. package/packages/ssr/lib/lib/serve-storefront.js +35 -21
  52. package/packages/ssr/lib/lib/serve-storefront.js.map +1 -1
  53. package/packages/ssr/package.json +4 -4
  54. package/packages/ssr/src/lib/analytics/send-to-ga4.ts +2 -0
  55. package/packages/ssr/src/lib/analytics-events.ts +11 -1
  56. package/packages/ssr/src/lib/cron-ssr-save-views.ts +11 -8
  57. package/packages/ssr/src/lib/serve-storefront.ts +36 -22
  58. package/packages/storefront/astro.config.mjs +4 -1
  59. package/packages/storefront/config/astro/vue-server.mjs +64 -0
  60. package/packages/storefront/dist/client/_astro/AccountPage.0M6_FdU6.js +1 -0
  61. package/packages/storefront/dist/client/_astro/CartSidebar.L0Vbhsdt.js +1 -0
  62. package/packages/storefront/dist/client/_astro/HeroSlider.ju9TsLrJ.js +1 -0
  63. package/packages/storefront/dist/client/_astro/PitchBar.yqD9ycx5.js +1 -0
  64. package/packages/storefront/dist/client/_astro/Prices.xI1rdM1e.js +1 -0
  65. package/packages/storefront/dist/client/_astro/ProductDetails.FQtM5kpd.js +7 -0
  66. package/packages/storefront/dist/client/_astro/ProductShelf.-4fsYkPB.js +1 -0
  67. package/packages/storefront/dist/client/_astro/ProductShelf.GAAhKdTN.js +1 -0
  68. package/packages/storefront/dist/client/_astro/QuantitySelector.v7L8EYOR.js +1 -0
  69. package/packages/storefront/dist/client/_astro/SearchModal.rasg5jV6.js +1 -0
  70. package/packages/storefront/dist/client/_astro/SearchShowcase.kA6jICYo.js +1 -0
  71. package/packages/storefront/dist/client/_astro/ShopHeader.v_L96Y90.js +7 -0
  72. package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.SO-0jCqa.js → _plugin-vue_export-helper.xATGHWd9.js} +2 -2
  73. package/packages/storefront/dist/client/_astro/afetch.OifQZgwR.js +1 -0
  74. package/packages/storefront/dist/client/_astro/client.YJ00ta5M.js +1 -0
  75. package/packages/storefront/dist/client/_astro/customer-session.ZD6tLDQJ.js +7 -0
  76. package/packages/storefront/dist/client/_astro/{firebase-app.VduCDgof.js → firebase-app.iLdzDVjL.js} +1 -1
  77. package/packages/storefront/dist/client/_astro/format-money.1_HtF5S2.js +1 -0
  78. package/packages/storefront/dist/client/_astro/grid-title.pK2Nn3i-.js +1 -0
  79. package/packages/storefront/dist/client/_astro/hoisted.GaT7bmE3.js +1 -0
  80. package/packages/storefront/dist/client/_astro/hoisted.ICXGWNEA.js +1 -0
  81. package/packages/storefront/dist/client/_astro/hoisted.XOXTrHqn.js +1 -0
  82. package/packages/storefront/dist/client/_astro/i18n.zhlBzJt8.js +1 -0
  83. package/packages/storefront/dist/client/_astro/img.AnjeGdy_.js +1 -0
  84. package/packages/storefront/dist/client/_astro/{index-dd468b12.fl8bpn8l.js → index-bea2a320.eWykogwr.js} +93 -93
  85. package/packages/storefront/dist/client/_astro/index.KfrHdfOH.js +1 -0
  86. package/packages/storefront/dist/client/_astro/index.ShNlAyu1.js +1 -0
  87. package/packages/storefront/dist/client/_astro/modules-info.HP6478mG.js +1 -0
  88. package/packages/storefront/dist/client/_astro/name.VA3MEpe0.js +1 -0
  89. package/packages/storefront/dist/client/_astro/server-data.4C60Esyt.js +1 -0
  90. package/packages/storefront/dist/client/_astro/sf-utils.c42cbZ9W.js +13 -0
  91. package/packages/storefront/dist/client/_astro/shopping-cart.nSNNOrp9.js +1 -0
  92. package/packages/storefront/dist/client/_astro/use-analytics.wTmoP8B1.js +1 -0
  93. package/packages/storefront/dist/client/_astro/use-product-card.UFr8SCuD.js +1 -0
  94. package/packages/storefront/dist/client/_astro/use-text-value.lKqoIagH.js +4 -0
  95. package/packages/storefront/dist/server/_noop-middleware.mjs +3 -0
  96. package/packages/storefront/dist/server/chunks/{CartSidebar_yYIzwp_R.mjs → CartSidebar_3_1aFp67.mjs} +1 -1
  97. package/packages/storefront/dist/server/chunks/{SearchModal_GvRUZ6ce.mjs → SearchModal_2azP1u7P.mjs} +1 -1
  98. package/packages/storefront/dist/server/chunks/_.._19fCuQdO.mjs +5 -0
  99. package/packages/storefront/dist/server/chunks/_page__qqIVxbal.mjs +5 -0
  100. package/packages/storefront/dist/server/chunks/account_vK6pmJlz.mjs +5 -0
  101. package/packages/storefront/dist/server/chunks/astro/{assets-service_yXRChsFH.mjs → assets-service_631fRtTy.mjs} +66 -11
  102. package/packages/storefront/dist/server/chunks/{astro_F4pl3toV.mjs → astro_u-oSb215.mjs} +24 -14
  103. package/packages/storefront/dist/server/chunks/index__05fnqFh.mjs +5 -0
  104. package/packages/storefront/dist/server/chunks/node_zqXXqc-u.mjs +5 -0
  105. package/packages/storefront/dist/server/chunks/pages/{__z8Igc_-f.mjs → __ZucPYaOo.mjs} +1313 -979
  106. package/packages/storefront/dist/server/chunks/pages/{_page__-V1Q-Ymk.mjs → _page__0sN9U0SD.mjs} +30 -12
  107. package/packages/storefront/dist/server/chunks/pages/account_OQr_6KN1.mjs +33 -0
  108. package/packages/storefront/dist/server/chunks/pages/{index_QqJiJpFy.mjs → index_3IjgOEIq.mjs} +16 -4
  109. package/packages/storefront/dist/server/chunks/pages/node_OmjWRf8D.mjs +112 -0
  110. package/packages/storefront/dist/server/chunks/pages/~fallback_133FK-CP.mjs +59 -0
  111. package/packages/storefront/dist/server/chunks/~fallback_Wahcp9Wk.mjs +5 -0
  112. package/packages/storefront/dist/server/entry.mjs +289 -166
  113. package/packages/storefront/dist/server/manifest_9FASPYUE.mjs +202 -0
  114. package/packages/storefront/dist/server/renderers.mjs +45 -34
  115. package/packages/storefront/package.json +5 -5
  116. package/packages/storefront/server.d.ts +0 -1
  117. package/packages/storefront/src/lib/$storefront.d.ts +23 -16
  118. package/packages/storefront/src/lib/composables/use-pagination.ts +1 -3
  119. package/packages/storefront/src/lib/layouts/BaseHead.astro +5 -0
  120. package/packages/storefront/src/lib/scripts/git-cms-auth.ts +3 -0
  121. package/packages/storefront/src/lib/scripts/push-analytics-events.ts +14 -7
  122. package/packages/storefront/src/lib/scripts/sso-ecom.ts +0 -0
  123. package/packages/storefront/src/lib/ssr-context.ts +49 -7
  124. package/packages/storefront/src/lib/state/use-analytics.ts +12 -11
  125. package/packages/storefront/src/lib/state/use-storage.ts +23 -9
  126. package/packages/test-base/package.json +1 -1
  127. package/packages/types/package.json +1 -1
  128. package/packages/storefront/dist/client/_astro/AccountPage.HcKW6HTE.js +0 -1
  129. package/packages/storefront/dist/client/_astro/CartSidebar.osvr0MUo.js +0 -1
  130. package/packages/storefront/dist/client/_astro/HeroSlider.I5mC8JdX.js +0 -1
  131. package/packages/storefront/dist/client/_astro/PitchBar.xC4J7MDy.js +0 -1
  132. package/packages/storefront/dist/client/_astro/Prices.Jt09rVKv.js +0 -1
  133. package/packages/storefront/dist/client/_astro/ProductDetails.oouZY3cL.js +0 -7
  134. package/packages/storefront/dist/client/_astro/ProductShelf.dYlXuNId.js +0 -1
  135. package/packages/storefront/dist/client/_astro/ProductShelf.vGE0E3Qf.js +0 -1
  136. package/packages/storefront/dist/client/_astro/QuantitySelector.OL4MN-C_.js +0 -1
  137. package/packages/storefront/dist/client/_astro/SearchModal.d8lbvLay.js +0 -1
  138. package/packages/storefront/dist/client/_astro/SearchShowcase.ynowXX4j.js +0 -1
  139. package/packages/storefront/dist/client/_astro/ShopHeader.l4KJGvUd.js +0 -7
  140. package/packages/storefront/dist/client/_astro/afetch.5c8VmT0-.js +0 -1
  141. package/packages/storefront/dist/client/_astro/client.ZhEmw4hZ.js +0 -1
  142. package/packages/storefront/dist/client/_astro/customer-session.TRPGDX3c.js +0 -7
  143. package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
  144. package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
  145. package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
  146. package/packages/storefront/dist/client/_astro/format-money.iK5LGydz.js +0 -1
  147. package/packages/storefront/dist/client/_astro/grid-title.vGKBy72g.js +0 -1
  148. package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
  149. package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
  150. package/packages/storefront/dist/client/_astro/hoisted.8pwSenCN.js +0 -1
  151. package/packages/storefront/dist/client/_astro/hoisted.SLwcAI01.js +0 -1
  152. package/packages/storefront/dist/client/_astro/hoisted.gqV7f6f3.js +0 -1
  153. package/packages/storefront/dist/client/_astro/i18n.Lxnz1oF-.js +0 -1
  154. package/packages/storefront/dist/client/_astro/img.WnsidxCx.js +0 -1
  155. package/packages/storefront/dist/client/_astro/index.R7A-Pg5V.js +0 -1
  156. package/packages/storefront/dist/client/_astro/index.q6KIyKlJ.js +0 -1
  157. package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
  158. package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
  159. package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
  160. package/packages/storefront/dist/client/_astro/modules-info.WWsUqEPZ.js +0 -1
  161. package/packages/storefront/dist/client/_astro/name.urFqJ5yn.js +0 -1
  162. package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
  163. package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
  164. package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
  165. package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
  166. package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
  167. package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
  168. package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
  169. package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
  170. package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
  171. package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
  172. package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
  173. package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
  174. package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
  175. package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
  176. package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
  177. package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
  178. package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
  179. package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
  180. package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
  181. package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
  182. package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
  183. package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
  184. package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.XTSAdOlw.js +0 -13
  185. package/packages/storefront/dist/client/_astro/sf-utils.luvTU5uS.js +0 -1
  186. package/packages/storefront/dist/client/_astro/shopping-cart.ATTXCPd0.js +0 -1
  187. package/packages/storefront/dist/client/_astro/use-analytics.WpkjGsWi.js +0 -1
  188. package/packages/storefront/dist/client/_astro/use-product-card.BhUXhJIp.js +0 -1
  189. package/packages/storefront/dist/client/_astro/use-text-value.XE_A2nDM.js +0 -4
  190. package/packages/storefront/dist/client/app/account/index.html +0 -58
  191. package/packages/storefront/dist/client/app/index.html +0 -98
  192. package/packages/storefront/dist/client/blog/1/index.html +0 -86
  193. package/packages/storefront/dist/client/index.html +0 -131
  194. 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 -93
  195. package/packages/storefront/dist/client/monitores-gamer/index.html +0 -95
  196. package/packages/storefront/dist/client/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na/index.html +0 -93
  197. package/packages/storefront/dist/client/p/contato/index.html +0 -90
  198. package/packages/storefront/dist/client/p/terms/index.html +0 -101
  199. package/packages/storefront/dist/client/posts/3/index.html +0 -101
  200. package/packages/storefront/dist/client/posts/4/index.html +0 -101
  201. package/packages/storefront/dist/client/~fallback/index.html +0 -99
  202. package/packages/storefront/dist/server/_empty-middleware.mjs +0 -3
  203. package/packages/storefront/dist/server/chunks/_.._Lq3r7hpv.mjs +0 -6
  204. package/packages/storefront/dist/server/chunks/_page__LqbeNfr1.mjs +0 -6
  205. package/packages/storefront/dist/server/chunks/account_4n4rpirV.mjs +0 -6
  206. package/packages/storefront/dist/server/chunks/index_SwXtE1IM.mjs +0 -6
  207. package/packages/storefront/dist/server/chunks/node_Nzz44v5l.mjs +0 -6
  208. package/packages/storefront/dist/server/chunks/pages/account_frSUn7gD.mjs +0 -22
  209. package/packages/storefront/dist/server/chunks/pages/node_FoDIj_f7.mjs +0 -257
  210. package/packages/storefront/dist/server/chunks/pages/~fallback_t0lNhRm9.mjs +0 -33
  211. package/packages/storefront/dist/server/chunks/~fallback_EWqi0UyU.mjs +0 -6
  212. package/packages/storefront/dist/server/images.dist.csv +0 -30
  213. package/packages/storefront/dist/server/images.src.csv +0 -11
  214. package/packages/storefront/dist/server/manifest_ZHJUD8_m.mjs +0 -196
  215. package/packages/storefront/dist/server/static-builds.csv +0 -71
@@ -1,10 +1,12 @@
1
+ import { renderers } from './renderers.mjs';
2
+ import { l as levels, g as getEventPrefix, L as Logger, A as AstroIntegrationLogger, manifest } from './manifest_9FASPYUE.mjs';
1
3
  import fs from 'node:fs';
2
- import { appendForwardSlash as appendForwardSlash$1, joinPaths, trimSlashes, slash, prependForwardSlash, removeTrailingForwardSlash, collapseDuplicateSlashes } from '@astrojs/internal-helpers/path';
4
+ import { appendForwardSlash as appendForwardSlash$1, joinPaths, trimSlashes, slash, prependForwardSlash as prependForwardSlash$1, removeTrailingForwardSlash, collapseDuplicateSlashes } from '@astrojs/internal-helpers/path';
5
+ import { R as ROUTE_DATA_SYMBOL, A as AstroError, o as ResponseSentError, p as MiddlewareNoDataOrNextCalled, q as MiddlewareNotAResponse, G as GetStaticPathsRequired, t as InvalidGetStaticPathsReturn, v as InvalidGetStaticPathsEntry, w as GetStaticPathsExpectedParams, x as GetStaticPathsInvalidRouteParam, P as PageNumberParamNotFound, N as NoMatchingStaticPathFound, y as PrerenderDynamicEndpointPathCollide, z as LocalsNotAnObject, B as ASTRO_VERSION, C as ClientAddressNotAvailable, S as StaticClientAddressNotAvailable, D as renderEndpoint, H as ReservedSlotName, k as renderSlotToString, J as renderJSX, K as chunkToString, O as CantRenderPage, Q as renderPage$1, T as REROUTE_DIRECTIVE_HEADER } from './chunks/astro_u-oSb215.mjs';
3
6
  import { serialize, parse } from 'cookie';
4
- import { A as AstroError, R as ResponseSentError, n as MiddlewareNoDataOrNextCalled, o as MiddlewareNotAResponse, G as GetStaticPathsRequired, p as InvalidGetStaticPathsReturn, q as InvalidGetStaticPathsEntry, t as GetStaticPathsExpectedParams, v as GetStaticPathsInvalidRouteParam, P as PageNumberParamNotFound, N as NoMatchingStaticPathFound, w as PrerenderDynamicEndpointPathCollide, x as LocalsNotAnObject, y as ASTRO_VERSION, C as ClientAddressNotAvailable, S as StaticClientAddressNotAvailable, z as renderEndpoint, B as ReservedSlotName, g as renderSlotToString, D as renderJSX, H as chunkToString, J as CantRenderPage, K as renderPage$1 } from './chunks/astro_F4pl3toV.mjs';
5
- import { l as levels, g as getEventPrefix, L as Logger, A as AstroIntegrationLogger, manifest } from './manifest_ZHJUD8_m.mjs';
6
7
  import 'kleur/colors';
7
8
  import 'clsx';
9
+ import 'cssesc';
8
10
  import buffer from 'node:buffer';
9
11
  import crypto from 'node:crypto';
10
12
  import http from 'node:http';
@@ -15,7 +17,25 @@ import url from 'node:url';
15
17
  import send from 'send';
16
18
  import os from 'node:os';
17
19
  import https from 'node:https';
18
- import { renderers } from './renderers.mjs';
20
+ import { onRequest } from './_noop-middleware.mjs';
21
+
22
+ function shouldAppendForwardSlash(trailingSlash, buildFormat) {
23
+ switch (trailingSlash) {
24
+ case "always":
25
+ return true;
26
+ case "never":
27
+ return false;
28
+ case "ignore": {
29
+ switch (buildFormat) {
30
+ case "directory":
31
+ return true;
32
+ case "preserve":
33
+ case "file":
34
+ return false;
35
+ }
36
+ }
37
+ }
38
+ }
19
39
 
20
40
  function getPathByLocale(locale, locales) {
21
41
  for (const loopLocale of locales) {
@@ -31,6 +51,7 @@ function getPathByLocale(locale, locales) {
31
51
  }
32
52
  }
33
53
  }
54
+ throw new Unreachable();
34
55
  }
35
56
  function normalizeTheLocale(locale) {
36
57
  return locale.replaceAll("_", "-").toLowerCase();
@@ -48,8 +69,15 @@ function toCodes(locales) {
48
69
  }
49
70
  return codes;
50
71
  }
72
+ class Unreachable extends Error {
73
+ constructor() {
74
+ super(
75
+ "Astro encountered an unexpected line of code.\nIn most cases, this is not your fault, but a bug in astro code.\nIf there isn't one already, please create an issue.\nhttps://astro.build/issues"
76
+ );
77
+ }
78
+ }
51
79
 
52
- const routeDataSymbol = Symbol.for("astro.routeData");
80
+ const routeDataSymbol$1 = Symbol.for(ROUTE_DATA_SYMBOL);
53
81
  function pathnameHasLocale(pathname, locales) {
54
82
  const segments = pathname.split("/");
55
83
  for (const segment of segments) {
@@ -65,60 +93,104 @@ function pathnameHasLocale(pathname, locales) {
65
93
  }
66
94
  return false;
67
95
  }
68
- function createI18nMiddleware(i18n, base, trailingSlash) {
69
- if (!i18n) {
96
+ function createI18nMiddleware(i18n, base, trailingSlash, buildFormat) {
97
+ if (!i18n)
98
+ return (_, next) => next();
99
+ const prefixAlways = (url, response, context) => {
100
+ if (url.pathname === base + "/" || url.pathname === base) {
101
+ if (shouldAppendForwardSlash(trailingSlash, buildFormat)) {
102
+ return context.redirect(`${appendForwardSlash$1(joinPaths(base, i18n.defaultLocale))}`);
103
+ } else {
104
+ return context.redirect(`${joinPaths(base, i18n.defaultLocale)}`);
105
+ }
106
+ } else if (!pathnameHasLocale(url.pathname, i18n.locales)) {
107
+ return new Response(null, {
108
+ status: 404,
109
+ headers: response.headers
110
+ });
111
+ }
70
112
  return void 0;
71
- }
113
+ };
114
+ const prefixOtherLocales = (url, response) => {
115
+ const pathnameContainsDefaultLocale = url.pathname.includes(`/${i18n.defaultLocale}`);
116
+ if (pathnameContainsDefaultLocale) {
117
+ const newLocation = url.pathname.replace(`/${i18n.defaultLocale}`, "");
118
+ response.headers.set("Location", newLocation);
119
+ return new Response(null, {
120
+ status: 404,
121
+ headers: response.headers
122
+ });
123
+ }
124
+ return void 0;
125
+ };
126
+ const prefixAlwaysNoRedirect = (url, response) => {
127
+ const isRoot = url.pathname === base + "/" || url.pathname === base;
128
+ if (!(isRoot || pathnameHasLocale(url.pathname, i18n.locales))) {
129
+ return new Response(null, {
130
+ status: 404,
131
+ headers: response.headers
132
+ });
133
+ }
134
+ return void 0;
135
+ };
72
136
  return async (context, next) => {
73
- if (!i18n) {
137
+ const routeData = Reflect.get(context.request, routeDataSymbol$1);
138
+ if (routeData?.type !== "page" && routeData?.type !== "fallback") {
74
139
  return await next();
75
140
  }
76
- const routeData = Reflect.get(context.request, routeDataSymbol);
77
- if (routeData) {
78
- if (routeData.type !== "page" && routeData.type !== "fallback") {
79
- return await next();
80
- }
81
- }
141
+ const currentLocale = context.currentLocale;
82
142
  const url = context.url;
83
143
  const { locales, defaultLocale, fallback, routing } = i18n;
84
144
  const response = await next();
85
145
  if (response instanceof Response) {
86
- const pathnameContainsDefaultLocale = url.pathname.includes(`/${defaultLocale}`);
87
146
  switch (i18n.routing) {
147
+ case "domains-prefix-other-locales": {
148
+ if (localeHasntDomain(i18n, currentLocale)) {
149
+ const result = prefixOtherLocales(url, response);
150
+ if (result) {
151
+ return result;
152
+ }
153
+ }
154
+ break;
155
+ }
88
156
  case "pathname-prefix-other-locales": {
89
- if (pathnameContainsDefaultLocale) {
90
- const newLocation = url.pathname.replace(`/${defaultLocale}`, "");
91
- response.headers.set("Location", newLocation);
92
- return new Response(null, {
93
- status: 404,
94
- headers: response.headers
95
- });
157
+ const result = prefixOtherLocales(url, response);
158
+ if (result) {
159
+ return result;
160
+ }
161
+ break;
162
+ }
163
+ case "domains-prefix-other-no-redirect": {
164
+ if (localeHasntDomain(i18n, currentLocale)) {
165
+ const result = prefixAlwaysNoRedirect(url, response);
166
+ if (result) {
167
+ return result;
168
+ }
96
169
  }
97
170
  break;
98
171
  }
99
172
  case "pathname-prefix-always-no-redirect": {
100
- const isRoot = url.pathname === base + "/" || url.pathname === base;
101
- if (!(isRoot || pathnameHasLocale(url.pathname, i18n.locales))) {
102
- return new Response(null, {
103
- status: 404,
104
- headers: response.headers
105
- });
173
+ const result = prefixAlwaysNoRedirect(url, response);
174
+ if (result) {
175
+ return result;
106
176
  }
107
177
  break;
108
178
  }
109
179
  case "pathname-prefix-always": {
110
- if (url.pathname === base + "/" || url.pathname === base) {
111
- if (trailingSlash === "always") {
112
- return context.redirect(`${appendForwardSlash$1(joinPaths(base, i18n.defaultLocale))}`);
113
- } else {
114
- return context.redirect(`${joinPaths(base, i18n.defaultLocale)}`);
180
+ const result = prefixAlways(url, response, context);
181
+ if (result) {
182
+ return result;
183
+ }
184
+ break;
185
+ }
186
+ case "domains-prefix-always": {
187
+ if (localeHasntDomain(i18n, currentLocale)) {
188
+ const result = prefixAlways(url, response, context);
189
+ if (result) {
190
+ return result;
115
191
  }
116
- } else if (!pathnameHasLocale(url.pathname, i18n.locales)) {
117
- return new Response(null, {
118
- status: 404,
119
- headers: response.headers
120
- });
121
192
  }
193
+ break;
122
194
  }
123
195
  }
124
196
  if (response.status >= 300 && fallback) {
@@ -153,8 +225,16 @@ function createI18nMiddleware(i18n, base, trailingSlash) {
153
225
  };
154
226
  }
155
227
  const i18nPipelineHook = (ctx) => {
156
- Reflect.set(ctx.request, routeDataSymbol, ctx.route);
228
+ Reflect.set(ctx.request, routeDataSymbol$1, ctx.route);
157
229
  };
230
+ function localeHasntDomain(i18n, currentLocale) {
231
+ for (const domainLocale of Object.values(i18n.domainLookupTable)) {
232
+ if (domainLocale === currentLocale) {
233
+ return false;
234
+ }
235
+ }
236
+ return true;
237
+ }
158
238
 
159
239
  const DELETED_EXPIRATION = /* @__PURE__ */ new Date(0);
160
240
  const DELETED_VALUE = "deleted";
@@ -748,6 +828,7 @@ function validatePrerenderEndpointCollision(route, mod, params) {
748
828
  }
749
829
 
750
830
  const clientLocalsSymbol$1 = Symbol.for("astro.locals");
831
+ const routeDataSymbol = Symbol.for(ROUTE_DATA_SYMBOL);
751
832
  async function createRenderContext(options) {
752
833
  const request = options.request;
753
834
  const pathname = options.pathname ?? new URL(request.url).pathname;
@@ -894,8 +975,11 @@ function computePreferredLocaleList(request, locales) {
894
975
  return result;
895
976
  }
896
977
  function computeCurrentLocale(request, locales, routingStrategy, defaultLocale) {
897
- const requestUrl = new URL(request.url);
898
- for (const segment of requestUrl.pathname.split("/")) {
978
+ const routeData = Reflect.get(request, routeDataSymbol);
979
+ if (!routeData) {
980
+ return defaultLocale;
981
+ }
982
+ for (const segment of routeData.route.split("/")) {
899
983
  for (const locale of locales) {
900
984
  if (typeof locale === "string") {
901
985
  if (normalizeTheLocale(locale) === normalizeTheLocale(segment)) {
@@ -908,7 +992,7 @@ function computeCurrentLocale(request, locales, routingStrategy, defaultLocale)
908
992
  }
909
993
  }
910
994
  }
911
- if (routingStrategy === "pathname-prefix-other-locales") {
995
+ if (routingStrategy === "pathname-prefix-other-locales" || routingStrategy === "domains-prefix-other-locales") {
912
996
  return defaultLocale;
913
997
  }
914
998
  return void 0;
@@ -1069,7 +1153,7 @@ function createAssetLink(href, base, assetsPrefix) {
1069
1153
  if (assetsPrefix) {
1070
1154
  return joinPaths(assetsPrefix, slash(href));
1071
1155
  } else if (base) {
1072
- return prependForwardSlash(joinPaths(base, slash(href)));
1156
+ return prependForwardSlash$1(joinPaths(base, slash(href)));
1073
1157
  } else {
1074
1158
  return href;
1075
1159
  }
@@ -1385,11 +1469,6 @@ class Pipeline {
1385
1469
  #hooks = {
1386
1470
  before: []
1387
1471
  };
1388
- /**
1389
- * The handler accepts the *original* `Request` and result returned by the endpoint.
1390
- * It must return a `Response`.
1391
- */
1392
- #endpointHandler;
1393
1472
  /**
1394
1473
  * When creating a pipeline, an environment is mandatory.
1395
1474
  * The environment won't change for the whole lifetime of the pipeline.
@@ -1399,14 +1478,6 @@ class Pipeline {
1399
1478
  }
1400
1479
  setEnvironment() {
1401
1480
  }
1402
- /**
1403
- * When rendering a route, an "endpoint" will a type that needs to be handled and transformed into a `Response`.
1404
- *
1405
- * Each consumer might have different needs; use this function to set up the handler.
1406
- */
1407
- setEndpointHandler(handler) {
1408
- this.#endpointHandler = handler;
1409
- }
1410
1481
  /**
1411
1482
  * A middleware function that will be called before each request.
1412
1483
  */
@@ -1432,22 +1503,7 @@ class Pipeline {
1432
1503
  for (const hook of this.#hooks.before) {
1433
1504
  hook(renderContext, componentInstance);
1434
1505
  }
1435
- const result = await this.#tryRenderRoute(
1436
- renderContext,
1437
- this.env,
1438
- componentInstance,
1439
- this.#onRequest
1440
- );
1441
- if (renderContext.route.type === "endpoint") {
1442
- if (!this.#endpointHandler) {
1443
- throw new Error(
1444
- "You created a pipeline that does not know how to handle the result coming from an endpoint."
1445
- );
1446
- }
1447
- return this.#endpointHandler(renderContext.request, result);
1448
- } else {
1449
- return result;
1450
- }
1506
+ return await this.#tryRenderRoute(renderContext, this.env, componentInstance, this.#onRequest);
1451
1507
  }
1452
1508
  /**
1453
1509
  * It attempts to render a route. A route can be a:
@@ -1508,25 +1564,7 @@ class Pipeline {
1508
1564
  }
1509
1565
  }
1510
1566
 
1511
- class EndpointNotFoundError extends Error {
1512
- originalResponse;
1513
- constructor(originalResponse) {
1514
- super();
1515
- this.originalResponse = originalResponse;
1516
- }
1517
- }
1518
1567
  class SSRRoutePipeline extends Pipeline {
1519
- constructor(env) {
1520
- super(env);
1521
- this.setEndpointHandler(this.#ssrEndpointHandler);
1522
- }
1523
- // This function is responsible for handling the result coming from an endpoint.
1524
- async #ssrEndpointHandler(request, response) {
1525
- if (response.headers.get("X-Astro-Response") === "Not-Found") {
1526
- throw new EndpointNotFoundError(response);
1527
- }
1528
- return response;
1529
- }
1530
1568
  }
1531
1569
 
1532
1570
  const localsSymbol = Symbol.for("astro.locals");
@@ -1610,19 +1648,69 @@ class App {
1610
1648
  }
1611
1649
  #getPathnameFromRequest(request) {
1612
1650
  const url = new URL(request.url);
1613
- const pathname = prependForwardSlash(this.removeBase(url.pathname));
1651
+ const pathname = prependForwardSlash$1(this.removeBase(url.pathname));
1614
1652
  return pathname;
1615
1653
  }
1616
1654
  match(request) {
1617
1655
  const url = new URL(request.url);
1618
1656
  if (this.#manifest.assets.has(url.pathname))
1619
1657
  return void 0;
1620
- const pathname = prependForwardSlash(this.removeBase(url.pathname));
1621
- const routeData = matchRoute(pathname, this.#manifestData);
1658
+ let pathname = this.#computePathnameFromDomain(request);
1659
+ if (!pathname) {
1660
+ pathname = prependForwardSlash$1(this.removeBase(url.pathname));
1661
+ }
1662
+ let routeData = matchRoute(pathname, this.#manifestData);
1622
1663
  if (!routeData || routeData.prerender)
1623
1664
  return void 0;
1624
1665
  return routeData;
1625
1666
  }
1667
+ #computePathnameFromDomain(request) {
1668
+ let pathname = void 0;
1669
+ const url = new URL(request.url);
1670
+ if (this.#manifest.i18n && (this.#manifest.i18n.routing === "domains-prefix-always" || this.#manifest.i18n.routing === "domains-prefix-other-locales" || this.#manifest.i18n.routing === "domains-prefix-other-no-redirect")) {
1671
+ let host = request.headers.get("X-Forwarded-Host");
1672
+ let protocol = request.headers.get("X-Forwarded-Proto");
1673
+ if (protocol) {
1674
+ protocol = protocol + ":";
1675
+ } else {
1676
+ protocol = url.protocol;
1677
+ }
1678
+ if (!host) {
1679
+ host = request.headers.get("Host");
1680
+ }
1681
+ if (host && protocol) {
1682
+ host = host.split(":")[0];
1683
+ try {
1684
+ let locale;
1685
+ const hostAsUrl = new URL(`${protocol}//${host}`);
1686
+ for (const [domainKey, localeValue] of Object.entries(
1687
+ this.#manifest.i18n.domainLookupTable
1688
+ )) {
1689
+ const domainKeyAsUrl = new URL(domainKey);
1690
+ if (hostAsUrl.host === domainKeyAsUrl.host && hostAsUrl.protocol === domainKeyAsUrl.protocol) {
1691
+ locale = localeValue;
1692
+ break;
1693
+ }
1694
+ }
1695
+ if (locale) {
1696
+ pathname = prependForwardSlash$1(
1697
+ joinPaths(normalizeTheLocale(locale), this.removeBase(url.pathname))
1698
+ );
1699
+ if (url.pathname.endsWith("/")) {
1700
+ pathname = appendForwardSlash$1(pathname);
1701
+ }
1702
+ }
1703
+ } catch (e) {
1704
+ this.#logger.error(
1705
+ "router",
1706
+ `Astro tried to parse ${protocol}//${host} as an URL, but it threw a parsing error. Check the X-Forwarded-Host and X-Forwarded-Proto headers.`
1707
+ );
1708
+ this.#logger.error("router", `Error: ${e}`);
1709
+ }
1710
+ }
1711
+ }
1712
+ return pathname;
1713
+ }
1626
1714
  async render(request, routeDataOrOptions, maybeLocals) {
1627
1715
  let routeData;
1628
1716
  let locals;
@@ -1680,36 +1768,28 @@ class App {
1680
1768
  const i18nMiddleware = createI18nMiddleware(
1681
1769
  this.#manifest.i18n,
1682
1770
  this.#manifest.base,
1683
- this.#manifest.trailingSlash
1771
+ this.#manifest.trailingSlash,
1772
+ this.#manifest.buildFormat
1684
1773
  );
1685
1774
  if (i18nMiddleware) {
1686
- if (mod.onRequest) {
1687
- this.#pipeline.setMiddlewareFunction(sequence(i18nMiddleware, mod.onRequest));
1688
- } else {
1689
- this.#pipeline.setMiddlewareFunction(i18nMiddleware);
1690
- }
1775
+ this.#pipeline.setMiddlewareFunction(sequence(i18nMiddleware, this.#manifest.middleware));
1691
1776
  this.#pipeline.onBeforeRenderRoute(i18nPipelineHook);
1692
1777
  } else {
1693
- if (mod.onRequest) {
1694
- this.#pipeline.setMiddlewareFunction(mod.onRequest);
1695
- }
1778
+ this.#pipeline.setMiddlewareFunction(this.#manifest.middleware);
1696
1779
  }
1697
1780
  response = await this.#pipeline.renderRoute(renderContext, pageModule);
1698
1781
  } catch (err) {
1699
- if (err instanceof EndpointNotFoundError) {
1700
- return this.#renderError(request, { status: 404, response: err.originalResponse });
1701
- } else {
1702
- this.#logger.error(null, err.stack || err.message || String(err));
1703
- return this.#renderError(request, { status: 500 });
1704
- }
1782
+ this.#logger.error(null, err.stack || err.message || String(err));
1783
+ return this.#renderError(request, { status: 500 });
1705
1784
  }
1706
- if (routeData.type === "page" || routeData.type === "redirect") {
1707
- if (REROUTABLE_STATUS_CODES.has(response.status)) {
1708
- return this.#renderError(request, {
1709
- response,
1710
- status: response.status
1711
- });
1712
- }
1785
+ if (REROUTABLE_STATUS_CODES.has(response.status) && response.headers.get(REROUTE_DIRECTIVE_HEADER) !== "no") {
1786
+ return this.#renderError(request, {
1787
+ response,
1788
+ status: response.status
1789
+ });
1790
+ }
1791
+ if (response.headers.has(REROUTE_DIRECTIVE_HEADER)) {
1792
+ response.headers.delete(REROUTE_DIRECTIVE_HEADER);
1713
1793
  }
1714
1794
  if (addCookieHeader) {
1715
1795
  for (const setCookieHeaderValue of App.getSetCookieFromResponse(response)) {
@@ -1763,7 +1843,7 @@ class App {
1763
1843
  defaultLocale: this.#manifest.i18n?.defaultLocale
1764
1844
  });
1765
1845
  } else {
1766
- const pathname = prependForwardSlash(this.removeBase(url.pathname));
1846
+ const pathname = prependForwardSlash$1(this.removeBase(url.pathname));
1767
1847
  const info = this.#routeDataToRouteInfo.get(routeData);
1768
1848
  const links = /* @__PURE__ */ new Set();
1769
1849
  const styles = createStylesheetElementSet(info.styles);
@@ -1827,8 +1907,8 @@ class App {
1827
1907
  status
1828
1908
  );
1829
1909
  const page = await mod.page();
1830
- if (skipMiddleware === false && mod.onRequest) {
1831
- this.#pipeline.setMiddlewareFunction(mod.onRequest);
1910
+ if (skipMiddleware === false) {
1911
+ this.#pipeline.setMiddlewareFunction(this.#manifest.middleware);
1832
1912
  }
1833
1913
  if (skipMiddleware) {
1834
1914
  this.#pipeline.unsetMiddlewareFunction();
@@ -1836,7 +1916,7 @@ class App {
1836
1916
  const response2 = await this.#pipeline.renderRoute(newRenderContext, page);
1837
1917
  return this.#mergeResponses(response2, originalResponse);
1838
1918
  } catch {
1839
- if (skipMiddleware === false && mod.onRequest) {
1919
+ if (skipMiddleware === false) {
1840
1920
  return this.#renderError(request, {
1841
1921
  status,
1842
1922
  response: originalResponse,
@@ -2014,27 +2094,27 @@ class NodeApp extends App {
2014
2094
  static async writeResponse(source, destination) {
2015
2095
  const { status, headers, body } = source;
2016
2096
  destination.writeHead(status, createOutgoingHttpHeaders(headers));
2017
- if (body) {
2018
- try {
2019
- const reader = body.getReader();
2020
- destination.on("close", () => {
2021
- reader.cancel().catch((err) => {
2022
- console.error(
2023
- `There was an uncaught error in the middle of the stream while rendering ${destination.req.url}.`,
2024
- err
2025
- );
2026
- });
2097
+ if (!body)
2098
+ return destination.end();
2099
+ try {
2100
+ const reader = body.getReader();
2101
+ destination.on("close", () => {
2102
+ reader.cancel().catch((err) => {
2103
+ console.error(
2104
+ `There was an uncaught error in the middle of the stream while rendering ${destination.req.url}.`,
2105
+ err
2106
+ );
2027
2107
  });
2028
- let result = await reader.read();
2029
- while (!result.done) {
2030
- destination.write(result.value);
2031
- result = await reader.read();
2032
- }
2033
- } catch {
2034
- destination.write("Internal server error");
2108
+ });
2109
+ let result = await reader.read();
2110
+ while (!result.done) {
2111
+ destination.write(result.value);
2112
+ result = await reader.read();
2035
2113
  }
2114
+ destination.end();
2115
+ } catch {
2116
+ destination.end("Internal server error");
2036
2117
  }
2037
- destination.end();
2038
2118
  }
2039
2119
  }
2040
2120
  function makeRequestHeaders(req) {
@@ -2104,8 +2184,44 @@ function createStaticHandler(app, options) {
2104
2184
  const client = resolveClientDir(options);
2105
2185
  return (req, res, ssr) => {
2106
2186
  if (req.url) {
2107
- let pathname = app.removeBase(req.url);
2108
- pathname = decodeURI(new URL(pathname, "http://host").pathname);
2187
+ const [urlPath, urlQuery] = req.url.split("?");
2188
+ const filePath = path.join(client, app.removeBase(urlPath));
2189
+ let pathname;
2190
+ let isDirectory = false;
2191
+ try {
2192
+ isDirectory = fs.lstatSync(filePath).isDirectory();
2193
+ } catch {
2194
+ }
2195
+ const { trailingSlash = "ignore" } = options;
2196
+ const hasSlash = urlPath.endsWith("/");
2197
+ switch (trailingSlash) {
2198
+ case "never":
2199
+ if (isDirectory && urlPath != "/" && hasSlash) {
2200
+ pathname = urlPath.slice(0, -1) + (urlQuery ? "?" + urlQuery : "");
2201
+ res.statusCode = 301;
2202
+ res.setHeader("Location", pathname);
2203
+ return res.end();
2204
+ } else
2205
+ pathname = urlPath;
2206
+ case "ignore":
2207
+ {
2208
+ if (isDirectory && !hasSlash) {
2209
+ pathname = urlPath + "/index.html";
2210
+ } else
2211
+ pathname = urlPath;
2212
+ }
2213
+ break;
2214
+ case "always":
2215
+ if (!hasSlash) {
2216
+ pathname = urlPath + "/" + (urlQuery ? "?" + urlQuery : "");
2217
+ res.statusCode = 301;
2218
+ res.setHeader("Location", pathname);
2219
+ return res.end();
2220
+ } else
2221
+ pathname = urlPath;
2222
+ break;
2223
+ }
2224
+ pathname = prependForwardSlash(app.removeBase(pathname));
2109
2225
  const stream = send(req, pathname, {
2110
2226
  root: client,
2111
2227
  dotfiles: pathname.startsWith("/.well-known/") ? "allow" : "deny"
@@ -2125,18 +2241,6 @@ function createStaticHandler(app, options) {
2125
2241
  _res.setHeader("Cache-Control", "public, max-age=31536000, immutable");
2126
2242
  }
2127
2243
  });
2128
- stream.on("directory", () => {
2129
- let location;
2130
- if (req.url.includes("?")) {
2131
- const [url1 = "", search] = req.url.split("?");
2132
- location = `${url1}/?${search}`;
2133
- } else {
2134
- location = appendForwardSlash(req.url);
2135
- }
2136
- res.statusCode = 301;
2137
- res.setHeader("Location", location);
2138
- res.end(location);
2139
- });
2140
2244
  stream.on("file", () => {
2141
2245
  forwardError = true;
2142
2246
  });
@@ -2155,6 +2259,9 @@ function resolveClientDir(options) {
2155
2259
  const client = url.fileURLToPath(clientURL);
2156
2260
  return client;
2157
2261
  }
2262
+ function prependForwardSlash(pth) {
2263
+ return pth.startsWith("/") ? pth : "/" + pth;
2264
+ }
2158
2265
  function appendForwardSlash(pth) {
2159
2266
  return pth.endsWith("/") ? pth : pth + "/";
2160
2267
  }
@@ -2308,6 +2415,7 @@ function createMiddleware(app) {
2308
2415
  apply();
2309
2416
  function createExports(manifest, options) {
2310
2417
  const app = new NodeApp(manifest);
2418
+ options.trailingSlash = manifest.trailingSlash;
2311
2419
  return {
2312
2420
  options,
2313
2421
  handler: options.mode === "middleware" ? createMiddleware(app) : createStandaloneHandler(app, options),
@@ -2322,32 +2430,47 @@ function start(manifest, options) {
2322
2430
  standalone(app, options);
2323
2431
  }
2324
2432
 
2325
- const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
2433
+ const serverEntrypointModule = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
2326
2434
  __proto__: null,
2327
2435
  createExports,
2328
2436
  start
2329
2437
  }, Symbol.toStringTag, { value: 'Module' }));
2330
2438
 
2331
- const _page0 = () => import('./chunks/node_Nzz44v5l.mjs');
2332
- const _page1 = () => import('./chunks/index_SwXtE1IM.mjs');
2333
- const _page2 = () => import('./chunks/account_4n4rpirV.mjs');
2334
- const _page3 = () => import('./chunks/_page__LqbeNfr1.mjs');
2335
- const _page4 = () => import('./chunks/~fallback_EWqi0UyU.mjs');
2336
- const _page5 = () => import('./chunks/_.._Lq3r7hpv.mjs');const pageMap = new Map([["../../node_modules/.pnpm/astro@4.2.1_@types+node@18.19.8_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node.js", _page0],["src/pages/app/index.astro", _page1],["src/pages/app/account.astro", _page2],["src/pages/blog/[page].astro", _page3],["src/pages/~fallback.astro", _page4],["src/pages/[...slug].astro", _page5]]);
2439
+ const _page0 = () => import('./chunks/node_zqXXqc-u.mjs');
2440
+ const _page1 = () => import('./chunks/~fallback_Wahcp9Wk.mjs');
2441
+ const _page2 = () => import('./chunks/index__05fnqFh.mjs');
2442
+ const _page3 = () => import('./chunks/account_vK6pmJlz.mjs');
2443
+ const _page4 = () => import('./chunks/_page__qqIVxbal.mjs');
2444
+ const _page5 = () => import('./chunks/_.._19fCuQdO.mjs');
2445
+ const pageMap = new Map([
2446
+ ["../../node_modules/.pnpm/astro@4.3.2_@types+node@18.19.14_typescript@5.2.2/node_modules/astro/dist/assets/endpoint/node.js", _page0],
2447
+ ["src/pages/~fallback.astro", _page1],
2448
+ ["src/pages/app/index.astro", _page2],
2449
+ ["src/pages/app/account.astro", _page3],
2450
+ ["src/pages/blog/[page].astro", _page4],
2451
+ ["src/pages/[...slug].astro", _page5]
2452
+ ]);
2453
+
2337
2454
  const _manifest = Object.assign(manifest, {
2338
- pageMap,
2339
- renderers,
2455
+ pageMap,
2456
+ renderers,
2457
+ middleware: onRequest
2340
2458
  });
2341
- const _args = {"mode":"middleware","client":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/","server":"file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/server/","host":false,"port":4321,"assets":"_astro"};
2342
-
2459
+ const _args = {
2460
+ "mode": "middleware",
2461
+ "client": "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/",
2462
+ "server": "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/server/",
2463
+ "host": false,
2464
+ "port": 4321,
2465
+ "assets": "_astro"
2466
+ };
2343
2467
  const _exports = createExports(_manifest, _args);
2344
2468
  const handler = _exports['handler'];
2345
2469
  const startServer = _exports['startServer'];
2346
2470
  const options = _exports['options'];
2347
-
2348
2471
  const _start = 'start';
2349
- if(_start in adapter) {
2350
- adapter[_start](_manifest, _args);
2472
+ if (_start in serverEntrypointModule) {
2473
+ serverEntrypointModule[_start](_manifest, _args);
2351
2474
  }
2352
2475
 
2353
2476
  export { handler, options, pageMap, startServer };