cloudcommerce 0.26.2 → 0.26.3
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/CHANGELOG.md +13 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/index.js +0 -1
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +8 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartItem.vue +64 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +38 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +2 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +8 -4
- 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/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/package.json +8 -8
- package/ecomplus-stores/iluminim/functions/ssr/src/components/CartItem.vue +64 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +37 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +2 -3
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +6 -2
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +2 -2
- package/package.json +3 -3
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-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 +2 -2
- 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/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/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 +3 -3
- 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/request-to-module.js +2 -2
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/utils.js +21 -9
- package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
- package/packages/modules/package.json +2 -2
- package/packages/modules/schemas/@checkout.cjs +0 -1
- package/packages/modules/src/firebase/functions-checkout/request-to-module.ts +2 -2
- package/packages/modules/src/firebase/functions-checkout/utils.ts +23 -9
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/storefront/dist/client/_astro/{Carousel.926668f2.js → Carousel.0b24e2cb.js} +1 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.2731d333.js +1 -0
- package/packages/storefront/dist/client/_astro/{HeroSlider.1f0524aa.js → HeroSlider.a70b2582.js} +1 -1
- package/packages/storefront/dist/client/_astro/{PitchBar.7407eeaf.js → PitchBar.13991988.js} +1 -1
- package/packages/storefront/dist/client/_astro/{Prices.562a32ab.js → Prices.cdfa346a.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.763cd2ca.js → ProductShelf.619c56a5.js} +1 -1
- package/packages/storefront/dist/client/_astro/SearchModal.117a477d.js +1 -0
- package/packages/storefront/dist/client/_astro/{ShopHeader.126900a6.js → ShopHeader.2c2fded7.js} +2 -2
- package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +1 -0
- package/packages/storefront/dist/client/_astro/{_plugin-vue_export-helper.ee681fa8.js → _plugin-vue_export-helper.fc5e2f5b.js} +1 -1
- package/packages/storefront/dist/client/_astro/{api.a2eda23e.js → api.39f40cd8.js} +1 -1
- package/packages/storefront/dist/client/_astro/client.a5d2898b.js +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.93857bfb.js → firebase-app.8c541cce.js} +3 -3
- package/packages/storefront/dist/client/_astro/{format-money.923559cc.js → format-money.86f14860.js} +1 -1
- package/packages/storefront/dist/client/_astro/hoisted.d90361ee.js +1 -0
- package/packages/storefront/dist/client/_astro/{img.ec6ba316.js → img.d4891d80.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.33801818.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.48980668.js → modules-info.ec412b24.js} +1 -1
- package/packages/storefront/dist/client/_empty-middleware.mjs +3 -0
- package/packages/storefront/dist/client/chunks/CartSidebar.0ce1e999.mjs +382 -0
- package/packages/storefront/dist/client/chunks/SearchModal.f603145b.mjs +32 -0
- package/packages/storefront/dist/client/chunks/astro.11be33ee.mjs +1424 -0
- package/packages/storefront/dist/{server/chunks/pages/_...slug_.astro.fd8a229f.mjs → client/chunks/pages/_...slug_.astro.ec6517ba.mjs} +360 -274
- package/packages/storefront/dist/{server/chunks/pages/account.astro.3b21bff8.mjs → client/chunks/pages/account.astro.3d2605e6.mjs} +2 -10
- package/packages/storefront/dist/{server/chunks/pages/index.astro.dab642f5.mjs → client/chunks/pages/index.astro.8ad03206.mjs} +167 -17
- package/packages/storefront/dist/{server/chunks/pages/~fallback.astro.7630c0d6.mjs → client/chunks/pages/~fallback.astro.d31d20b4.mjs} +8 -20
- package/packages/storefront/dist/client/chunks/sharp.3f154e38.mjs +74 -0
- package/packages/storefront/dist/client/manifest.e39eb543.mjs +79 -0
- package/packages/storefront/dist/client/pages/_---slug_.astro.mjs +23 -0
- package/packages/storefront/dist/client/pages/app/account.astro.mjs +23 -0
- package/packages/storefront/dist/client/pages/app.astro.mjs +23 -0
- package/packages/storefront/dist/client/pages/index.astro.mjs +23 -0
- package/packages/storefront/dist/client/pages/~fallback.astro.mjs +23 -0
- package/packages/storefront/dist/client/registerSW.js +1 -0
- package/packages/storefront/dist/client/renderers.mjs +369 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{CartSidebar.2b555408.mjs → CartSidebar.cca9fdd3.mjs} +14 -24
- package/packages/storefront/dist/server/chunks/{SearchModal.f418e188.mjs → SearchModal.a680efae.mjs} +8 -19
- package/packages/storefront/dist/server/chunks/_...f7cdc954.mjs +24 -0
- package/packages/storefront/dist/server/chunks/account@_@astro.fa8b921b.mjs +24 -0
- package/packages/storefront/dist/server/chunks/{astro.bb5b7191.mjs → astro.440a2e08.mjs} +149 -1859
- package/packages/storefront/dist/server/chunks/image-endpoint@_@js.802bf648.mjs +24 -0
- package/packages/storefront/dist/server/chunks/index@_@astro.a122f091.mjs +24 -0
- package/packages/storefront/dist/server/chunks/index@_@astro.da98dcbe.mjs +24 -0
- package/packages/storefront/dist/server/chunks/pages/_...slug_.astro.08ba5973.mjs +3930 -0
- package/packages/storefront/dist/server/chunks/pages/account.astro.f11f26f3.mjs +15 -0
- package/packages/storefront/dist/server/chunks/pages/image-endpoint.js.a9374d3e.mjs +238 -0
- package/packages/storefront/dist/server/chunks/pages/index.astro.079f316a.mjs +1650 -0
- package/packages/storefront/dist/server/chunks/pages/~fallback.astro.01594623.mjs +55 -0
- package/packages/storefront/dist/server/chunks/sharp.52841bb4.mjs +75 -0
- package/packages/storefront/dist/server/chunks/~fallback@_@astro.876a97c5.mjs +24 -0
- package/packages/storefront/dist/server/entry.mjs +1167 -2360
- package/packages/storefront/dist/server/manifest.12e7a10c.mjs +561 -0
- package/packages/storefront/dist/server/renderers.mjs +10 -21
- package/packages/storefront/package.json +6 -6
- package/packages/storefront/src/lib/layouts/BaseHead.astro +3 -2
- package/packages/test-base/package.json +1 -1
- package/packages/types/modules/@checkout:params.d.ts +1 -1
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/iluminim/.ecomplus.cd.json +0 -5
- package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +0 -1
- package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +0 -1
- package/packages/storefront/dist/client/_astro/client.e6d9439a.js +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.572313d6.js +0 -1
- package/packages/storefront/dist/client/_astro/index.709ac149.js +0 -1
- package/packages/storefront/dist/server/chunks/_...d32bcc0c.mjs +0 -35
- package/packages/storefront/dist/server/chunks/account@_@astro.0106855f.mjs +0 -35
- package/packages/storefront/dist/server/chunks/endpoint@_@js.35807882.mjs +0 -35
- package/packages/storefront/dist/server/chunks/index@_@astro.477f5af1.mjs +0 -35
- package/packages/storefront/dist/server/chunks/index@_@astro.e5a61d6e.mjs +0 -35
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.247079ba.mjs +0 -119
- package/packages/storefront/dist/server/chunks/~fallback@_@astro.65227dd7.mjs +0 -35
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
import { serialize, parse } from 'cookie';
|
|
2
|
+
import { bold } from 'kleur/colors';
|
|
3
|
+
import 'string-width';
|
|
4
|
+
import '@astrojs/internal-helpers/path';
|
|
5
|
+
import { A as AstroError, w as ResponseSentError, z as MiddlewareNoDataOrNextCalled, B as MiddlewareNotAResponse, D as ASTRO_VERSION, C as ClientAddressNotAvailable, S as StaticClientAddressNotAvailable, H as renderEndpoint, q as LocalsNotAnObject } from './chunks/astro.440a2e08.mjs';
|
|
6
|
+
import 'clsx';
|
|
7
|
+
import mime from 'mime';
|
|
8
|
+
import { compile } from 'path-to-regexp';
|
|
9
|
+
import 'html-escaper';
|
|
10
|
+
|
|
11
|
+
const DELETED_EXPIRATION = /* @__PURE__ */ new Date(0);
|
|
12
|
+
const DELETED_VALUE = "deleted";
|
|
13
|
+
const responseSentSymbol = Symbol.for("astro.responseSent");
|
|
14
|
+
class AstroCookie {
|
|
15
|
+
constructor(value) {
|
|
16
|
+
this.value = value;
|
|
17
|
+
}
|
|
18
|
+
json() {
|
|
19
|
+
if (this.value === void 0) {
|
|
20
|
+
throw new Error(`Cannot convert undefined to an object.`);
|
|
21
|
+
}
|
|
22
|
+
return JSON.parse(this.value);
|
|
23
|
+
}
|
|
24
|
+
number() {
|
|
25
|
+
return Number(this.value);
|
|
26
|
+
}
|
|
27
|
+
boolean() {
|
|
28
|
+
if (this.value === "false")
|
|
29
|
+
return false;
|
|
30
|
+
if (this.value === "0")
|
|
31
|
+
return false;
|
|
32
|
+
return Boolean(this.value);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
class AstroCookies {
|
|
36
|
+
#request;
|
|
37
|
+
#requestValues;
|
|
38
|
+
#outgoing;
|
|
39
|
+
constructor(request) {
|
|
40
|
+
this.#request = request;
|
|
41
|
+
this.#requestValues = null;
|
|
42
|
+
this.#outgoing = null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Astro.cookies.delete(key) is used to delete a cookie. Using this method will result
|
|
46
|
+
* in a Set-Cookie header added to the response.
|
|
47
|
+
* @param key The cookie to delete
|
|
48
|
+
* @param options Options related to this deletion, such as the path of the cookie.
|
|
49
|
+
*/
|
|
50
|
+
delete(key, options) {
|
|
51
|
+
const serializeOptions = {
|
|
52
|
+
expires: DELETED_EXPIRATION
|
|
53
|
+
};
|
|
54
|
+
if (options?.domain) {
|
|
55
|
+
serializeOptions.domain = options.domain;
|
|
56
|
+
}
|
|
57
|
+
if (options?.path) {
|
|
58
|
+
serializeOptions.path = options.path;
|
|
59
|
+
}
|
|
60
|
+
this.#ensureOutgoingMap().set(key, [
|
|
61
|
+
DELETED_VALUE,
|
|
62
|
+
serialize(key, DELETED_VALUE, serializeOptions),
|
|
63
|
+
false
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Astro.cookies.get(key) is used to get a cookie value. The cookie value is read from the
|
|
68
|
+
* request. If you have set a cookie via Astro.cookies.set(key, value), the value will be taken
|
|
69
|
+
* from that set call, overriding any values already part of the request.
|
|
70
|
+
* @param key The cookie to get.
|
|
71
|
+
* @returns An object containing the cookie value as well as convenience methods for converting its value.
|
|
72
|
+
*/
|
|
73
|
+
get(key) {
|
|
74
|
+
if (this.#outgoing?.has(key)) {
|
|
75
|
+
let [serializedValue, , isSetValue] = this.#outgoing.get(key);
|
|
76
|
+
if (isSetValue) {
|
|
77
|
+
return new AstroCookie(serializedValue);
|
|
78
|
+
} else {
|
|
79
|
+
return void 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const values = this.#ensureParsed();
|
|
83
|
+
if (key in values) {
|
|
84
|
+
const value = values[key];
|
|
85
|
+
return new AstroCookie(value);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Astro.cookies.has(key) returns a boolean indicating whether this cookie is either
|
|
90
|
+
* part of the initial request or set via Astro.cookies.set(key)
|
|
91
|
+
* @param key The cookie to check for.
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
has(key) {
|
|
95
|
+
if (this.#outgoing?.has(key)) {
|
|
96
|
+
let [, , isSetValue] = this.#outgoing.get(key);
|
|
97
|
+
return isSetValue;
|
|
98
|
+
}
|
|
99
|
+
const values = this.#ensureParsed();
|
|
100
|
+
return !!values[key];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Astro.cookies.set(key, value) is used to set a cookie's value. If provided
|
|
104
|
+
* an object it will be stringified via JSON.stringify(value). Additionally you
|
|
105
|
+
* can provide options customizing how this cookie will be set, such as setting httpOnly
|
|
106
|
+
* in order to prevent the cookie from being read in client-side JavaScript.
|
|
107
|
+
* @param key The name of the cookie to set.
|
|
108
|
+
* @param value A value, either a string or other primitive or an object.
|
|
109
|
+
* @param options Options for the cookie, such as the path and security settings.
|
|
110
|
+
*/
|
|
111
|
+
set(key, value, options) {
|
|
112
|
+
let serializedValue;
|
|
113
|
+
if (typeof value === "string") {
|
|
114
|
+
serializedValue = value;
|
|
115
|
+
} else {
|
|
116
|
+
let toStringValue = value.toString();
|
|
117
|
+
if (toStringValue === Object.prototype.toString.call(value)) {
|
|
118
|
+
serializedValue = JSON.stringify(value);
|
|
119
|
+
} else {
|
|
120
|
+
serializedValue = toStringValue;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const serializeOptions = {};
|
|
124
|
+
if (options) {
|
|
125
|
+
Object.assign(serializeOptions, options);
|
|
126
|
+
}
|
|
127
|
+
this.#ensureOutgoingMap().set(key, [
|
|
128
|
+
serializedValue,
|
|
129
|
+
serialize(key, serializedValue, serializeOptions),
|
|
130
|
+
true
|
|
131
|
+
]);
|
|
132
|
+
if (this.#request[responseSentSymbol]) {
|
|
133
|
+
throw new AstroError({
|
|
134
|
+
...ResponseSentError
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Astro.cookies.header() returns an iterator for the cookies that have previously
|
|
140
|
+
* been set by either Astro.cookies.set() or Astro.cookies.delete().
|
|
141
|
+
* This method is primarily used by adapters to set the header on outgoing responses.
|
|
142
|
+
* @returns
|
|
143
|
+
*/
|
|
144
|
+
*headers() {
|
|
145
|
+
if (this.#outgoing == null)
|
|
146
|
+
return;
|
|
147
|
+
for (const [, value] of this.#outgoing) {
|
|
148
|
+
yield value[1];
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
#ensureParsed() {
|
|
152
|
+
if (!this.#requestValues) {
|
|
153
|
+
this.#parse();
|
|
154
|
+
}
|
|
155
|
+
if (!this.#requestValues) {
|
|
156
|
+
this.#requestValues = {};
|
|
157
|
+
}
|
|
158
|
+
return this.#requestValues;
|
|
159
|
+
}
|
|
160
|
+
#ensureOutgoingMap() {
|
|
161
|
+
if (!this.#outgoing) {
|
|
162
|
+
this.#outgoing = /* @__PURE__ */ new Map();
|
|
163
|
+
}
|
|
164
|
+
return this.#outgoing;
|
|
165
|
+
}
|
|
166
|
+
#parse() {
|
|
167
|
+
const raw = this.#request.headers.get("cookie");
|
|
168
|
+
if (!raw) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.#requestValues = parse(raw);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const astroCookiesSymbol = Symbol.for("astro.cookies");
|
|
176
|
+
function attachCookiesToResponse(response, cookies) {
|
|
177
|
+
Reflect.set(response, astroCookiesSymbol, cookies);
|
|
178
|
+
}
|
|
179
|
+
function getFromResponse(response) {
|
|
180
|
+
let cookies = Reflect.get(response, astroCookiesSymbol);
|
|
181
|
+
if (cookies != null) {
|
|
182
|
+
return cookies;
|
|
183
|
+
} else {
|
|
184
|
+
return void 0;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function* getSetCookiesFromResponse(response) {
|
|
188
|
+
const cookies = getFromResponse(response);
|
|
189
|
+
if (!cookies) {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
for (const headerValue of cookies.headers()) {
|
|
193
|
+
yield headerValue;
|
|
194
|
+
}
|
|
195
|
+
return [];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
199
|
+
hour: "2-digit",
|
|
200
|
+
minute: "2-digit",
|
|
201
|
+
second: "2-digit"
|
|
202
|
+
});
|
|
203
|
+
const levels = {
|
|
204
|
+
debug: 20,
|
|
205
|
+
info: 30,
|
|
206
|
+
warn: 40,
|
|
207
|
+
error: 50,
|
|
208
|
+
silent: 90
|
|
209
|
+
};
|
|
210
|
+
function log(opts, level, label, message) {
|
|
211
|
+
const logLevel = opts.level;
|
|
212
|
+
const dest = opts.dest;
|
|
213
|
+
const event = {
|
|
214
|
+
label,
|
|
215
|
+
level,
|
|
216
|
+
message
|
|
217
|
+
};
|
|
218
|
+
if (levels[logLevel] > levels[level]) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
dest.write(event);
|
|
222
|
+
}
|
|
223
|
+
function info(opts, label, message) {
|
|
224
|
+
return log(opts, "info", label, message);
|
|
225
|
+
}
|
|
226
|
+
function warn(opts, label, message) {
|
|
227
|
+
return log(opts, "warn", label, message);
|
|
228
|
+
}
|
|
229
|
+
function error(opts, label, message) {
|
|
230
|
+
return log(opts, "error", label, message);
|
|
231
|
+
}
|
|
232
|
+
function debug(...args) {
|
|
233
|
+
if ("_astroGlobalDebug" in globalThis) {
|
|
234
|
+
globalThis._astroGlobalDebug(...args);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (typeof process !== "undefined") {
|
|
238
|
+
let proc = process;
|
|
239
|
+
if ("argv" in proc && Array.isArray(proc.argv)) {
|
|
240
|
+
if (proc.argv.includes("--verbose")) ; else if (proc.argv.includes("--silent")) ; else ;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
class Logger {
|
|
244
|
+
options;
|
|
245
|
+
constructor(options) {
|
|
246
|
+
this.options = options;
|
|
247
|
+
}
|
|
248
|
+
info(label, message) {
|
|
249
|
+
info(this.options, label, message);
|
|
250
|
+
}
|
|
251
|
+
warn(label, message) {
|
|
252
|
+
warn(this.options, label, message);
|
|
253
|
+
}
|
|
254
|
+
error(label, message) {
|
|
255
|
+
error(this.options, label, message);
|
|
256
|
+
}
|
|
257
|
+
debug(label, message, ...args) {
|
|
258
|
+
debug(this.options, label, message, args);
|
|
259
|
+
}
|
|
260
|
+
level() {
|
|
261
|
+
return this.options.level;
|
|
262
|
+
}
|
|
263
|
+
forkIntegrationLogger(label) {
|
|
264
|
+
return new AstroIntegrationLogger(this.options, label);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
class AstroIntegrationLogger {
|
|
268
|
+
options;
|
|
269
|
+
label;
|
|
270
|
+
constructor(logging, label) {
|
|
271
|
+
this.options = logging;
|
|
272
|
+
this.label = label;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Creates a new logger instance with a new label, but the same log options.
|
|
276
|
+
*/
|
|
277
|
+
fork(label) {
|
|
278
|
+
return new AstroIntegrationLogger(this.options, label);
|
|
279
|
+
}
|
|
280
|
+
info(message) {
|
|
281
|
+
info(this.options, this.label, message);
|
|
282
|
+
}
|
|
283
|
+
warn(message) {
|
|
284
|
+
warn(this.options, this.label, message);
|
|
285
|
+
}
|
|
286
|
+
error(message) {
|
|
287
|
+
error(this.options, this.label, message);
|
|
288
|
+
}
|
|
289
|
+
debug(message) {
|
|
290
|
+
debug(this.options, this.label, message);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
async function callMiddleware(logger, onRequest, apiContext, responseFunction) {
|
|
295
|
+
let nextCalled = false;
|
|
296
|
+
let responseFunctionPromise = void 0;
|
|
297
|
+
const next = async () => {
|
|
298
|
+
nextCalled = true;
|
|
299
|
+
responseFunctionPromise = responseFunction();
|
|
300
|
+
return responseFunctionPromise;
|
|
301
|
+
};
|
|
302
|
+
let middlewarePromise = onRequest(apiContext, next);
|
|
303
|
+
return await Promise.resolve(middlewarePromise).then(async (value) => {
|
|
304
|
+
if (isEndpointOutput(value)) {
|
|
305
|
+
logger.warn(
|
|
306
|
+
"middleware",
|
|
307
|
+
`Using simple endpoints can cause unexpected issues in the chain of middleware functions.
|
|
308
|
+
It's strongly suggested to use full ${bold("Response")} objects.`
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
if (nextCalled) {
|
|
312
|
+
if (typeof value !== "undefined") {
|
|
313
|
+
if (value instanceof Response === false) {
|
|
314
|
+
throw new AstroError(MiddlewareNotAResponse);
|
|
315
|
+
}
|
|
316
|
+
return value;
|
|
317
|
+
} else {
|
|
318
|
+
if (responseFunctionPromise) {
|
|
319
|
+
return responseFunctionPromise;
|
|
320
|
+
} else {
|
|
321
|
+
throw new AstroError(MiddlewareNotAResponse);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
} else if (typeof value === "undefined") {
|
|
325
|
+
throw new AstroError(MiddlewareNoDataOrNextCalled);
|
|
326
|
+
} else if (value instanceof Response === false) {
|
|
327
|
+
throw new AstroError(MiddlewareNotAResponse);
|
|
328
|
+
} else {
|
|
329
|
+
return value;
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
function isEndpointOutput(endpointResult) {
|
|
334
|
+
return !(endpointResult instanceof Response) && typeof endpointResult === "object" && typeof endpointResult.body === "string";
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const encoder = new TextEncoder();
|
|
338
|
+
const clientAddressSymbol = Symbol.for("astro.clientAddress");
|
|
339
|
+
const clientLocalsSymbol = Symbol.for("astro.locals");
|
|
340
|
+
function createAPIContext({
|
|
341
|
+
request,
|
|
342
|
+
params,
|
|
343
|
+
site,
|
|
344
|
+
props,
|
|
345
|
+
adapterName
|
|
346
|
+
}) {
|
|
347
|
+
initResponseWithEncoding();
|
|
348
|
+
const context = {
|
|
349
|
+
cookies: new AstroCookies(request),
|
|
350
|
+
request,
|
|
351
|
+
params,
|
|
352
|
+
site: site ? new URL(site) : void 0,
|
|
353
|
+
generator: `Astro v${ASTRO_VERSION}`,
|
|
354
|
+
props,
|
|
355
|
+
redirect(path, status) {
|
|
356
|
+
return new Response(null, {
|
|
357
|
+
status: status || 302,
|
|
358
|
+
headers: {
|
|
359
|
+
Location: path
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
},
|
|
363
|
+
ResponseWithEncoding,
|
|
364
|
+
url: new URL(request.url),
|
|
365
|
+
get clientAddress() {
|
|
366
|
+
if (!(clientAddressSymbol in request)) {
|
|
367
|
+
if (adapterName) {
|
|
368
|
+
throw new AstroError({
|
|
369
|
+
...ClientAddressNotAvailable,
|
|
370
|
+
message: ClientAddressNotAvailable.message(adapterName)
|
|
371
|
+
});
|
|
372
|
+
} else {
|
|
373
|
+
throw new AstroError(StaticClientAddressNotAvailable);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return Reflect.get(request, clientAddressSymbol);
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
Object.defineProperty(context, "locals", {
|
|
380
|
+
enumerable: true,
|
|
381
|
+
get() {
|
|
382
|
+
return Reflect.get(request, clientLocalsSymbol);
|
|
383
|
+
},
|
|
384
|
+
set(val) {
|
|
385
|
+
if (typeof val !== "object") {
|
|
386
|
+
throw new AstroError(LocalsNotAnObject);
|
|
387
|
+
} else {
|
|
388
|
+
Reflect.set(request, clientLocalsSymbol, val);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
return context;
|
|
393
|
+
}
|
|
394
|
+
let ResponseWithEncoding;
|
|
395
|
+
let initResponseWithEncoding = () => {
|
|
396
|
+
class LocalResponseWithEncoding extends Response {
|
|
397
|
+
constructor(body, init, encoding) {
|
|
398
|
+
if (typeof body === "string") {
|
|
399
|
+
if (typeof Buffer !== "undefined" && Buffer.from) {
|
|
400
|
+
body = Buffer.from(body, encoding);
|
|
401
|
+
} else if (encoding == null || encoding === "utf8" || encoding === "utf-8") {
|
|
402
|
+
body = encoder.encode(body);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
super(body, init);
|
|
406
|
+
if (encoding) {
|
|
407
|
+
this.headers.set("X-Astro-Encoding", encoding);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
ResponseWithEncoding = LocalResponseWithEncoding;
|
|
412
|
+
initResponseWithEncoding = () => {
|
|
413
|
+
};
|
|
414
|
+
return LocalResponseWithEncoding;
|
|
415
|
+
};
|
|
416
|
+
async function callEndpoint(mod, env, ctx, onRequest) {
|
|
417
|
+
const context = createAPIContext({
|
|
418
|
+
request: ctx.request,
|
|
419
|
+
params: ctx.params,
|
|
420
|
+
props: ctx.props,
|
|
421
|
+
site: env.site,
|
|
422
|
+
adapterName: env.adapterName
|
|
423
|
+
});
|
|
424
|
+
let response;
|
|
425
|
+
if (onRequest) {
|
|
426
|
+
response = await callMiddleware(
|
|
427
|
+
env.logger,
|
|
428
|
+
onRequest,
|
|
429
|
+
context,
|
|
430
|
+
async () => {
|
|
431
|
+
return await renderEndpoint(mod, context, env.ssr, env.logger);
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
} else {
|
|
435
|
+
response = await renderEndpoint(mod, context, env.ssr, env.logger);
|
|
436
|
+
}
|
|
437
|
+
const isEndpointSSR = env.ssr && !ctx.route?.prerender;
|
|
438
|
+
if (response instanceof Response) {
|
|
439
|
+
if (isEndpointSSR && response.headers.get("X-Astro-Encoding")) {
|
|
440
|
+
env.logger.warn(
|
|
441
|
+
"ssr",
|
|
442
|
+
"`ResponseWithEncoding` is ignored in SSR. Please return an instance of Response. See https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes for more information."
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
attachCookiesToResponse(response, context.cookies);
|
|
446
|
+
return response;
|
|
447
|
+
}
|
|
448
|
+
env.logger.warn(
|
|
449
|
+
"astro",
|
|
450
|
+
`${ctx.route.component} returns a simple object which is deprecated. Please return an instance of Response. See https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes for more information.`
|
|
451
|
+
);
|
|
452
|
+
if (isEndpointSSR) {
|
|
453
|
+
if (response.hasOwnProperty("headers")) {
|
|
454
|
+
env.logger.warn(
|
|
455
|
+
"ssr",
|
|
456
|
+
"Setting headers is not supported when returning an object. Please return an instance of Response. See https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes for more information."
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
if (response.encoding) {
|
|
460
|
+
env.logger.warn(
|
|
461
|
+
"ssr",
|
|
462
|
+
"`encoding` is ignored in SSR. To return a charset other than UTF-8, please return an instance of Response. See https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes for more information."
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
let body;
|
|
467
|
+
const headers = new Headers();
|
|
468
|
+
const pathname = ctx.route ? (
|
|
469
|
+
// Try the static route `pathname`
|
|
470
|
+
ctx.route.pathname ?? // Dynamic routes don't include `pathname`, so synthesize a path for these (e.g. 'src/pages/[slug].svg')
|
|
471
|
+
ctx.route.segments.map((s) => s.map((p) => p.content).join("")).join("/")
|
|
472
|
+
) : (
|
|
473
|
+
// Fallback to pathname of the request
|
|
474
|
+
ctx.pathname
|
|
475
|
+
);
|
|
476
|
+
const mimeType = mime.getType(pathname) || "text/plain";
|
|
477
|
+
headers.set("Content-Type", `${mimeType};charset=utf-8`);
|
|
478
|
+
if (response.encoding) {
|
|
479
|
+
headers.set("X-Astro-Encoding", response.encoding);
|
|
480
|
+
}
|
|
481
|
+
if (response.body instanceof Uint8Array) {
|
|
482
|
+
body = response.body;
|
|
483
|
+
headers.set("Content-Length", body.byteLength.toString());
|
|
484
|
+
} else if (typeof Buffer !== "undefined" && Buffer.from) {
|
|
485
|
+
body = Buffer.from(response.body, response.encoding);
|
|
486
|
+
headers.set("Content-Length", body.byteLength.toString());
|
|
487
|
+
} else if (response.encoding == null || response.encoding === "utf8" || response.encoding === "utf-8") {
|
|
488
|
+
body = encoder.encode(response.body);
|
|
489
|
+
headers.set("Content-Length", body.byteLength.toString());
|
|
490
|
+
} else {
|
|
491
|
+
body = response.body;
|
|
492
|
+
}
|
|
493
|
+
response = new Response(body, {
|
|
494
|
+
status: 200,
|
|
495
|
+
headers
|
|
496
|
+
});
|
|
497
|
+
attachCookiesToResponse(response, context.cookies);
|
|
498
|
+
return response;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
function getRouteGenerator(segments, addTrailingSlash) {
|
|
502
|
+
const template = segments.map((segment) => {
|
|
503
|
+
return "/" + segment.map((part) => {
|
|
504
|
+
if (part.spread) {
|
|
505
|
+
return `:${part.content.slice(3)}(.*)?`;
|
|
506
|
+
} else if (part.dynamic) {
|
|
507
|
+
return `:${part.content}`;
|
|
508
|
+
} else {
|
|
509
|
+
return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
510
|
+
}
|
|
511
|
+
}).join("");
|
|
512
|
+
}).join("");
|
|
513
|
+
let trailing = "";
|
|
514
|
+
if (addTrailingSlash === "always" && segments.length) {
|
|
515
|
+
trailing = "/";
|
|
516
|
+
}
|
|
517
|
+
const toPath = compile(template + trailing);
|
|
518
|
+
return toPath;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
function deserializeRouteData(rawRouteData) {
|
|
522
|
+
return {
|
|
523
|
+
route: rawRouteData.route,
|
|
524
|
+
type: rawRouteData.type,
|
|
525
|
+
pattern: new RegExp(rawRouteData.pattern),
|
|
526
|
+
params: rawRouteData.params,
|
|
527
|
+
component: rawRouteData.component,
|
|
528
|
+
generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
|
|
529
|
+
pathname: rawRouteData.pathname || void 0,
|
|
530
|
+
segments: rawRouteData.segments,
|
|
531
|
+
prerender: rawRouteData.prerender,
|
|
532
|
+
redirect: rawRouteData.redirect,
|
|
533
|
+
redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
function deserializeManifest(serializedManifest) {
|
|
538
|
+
const routes = [];
|
|
539
|
+
for (const serializedRoute of serializedManifest.routes) {
|
|
540
|
+
routes.push({
|
|
541
|
+
...serializedRoute,
|
|
542
|
+
routeData: deserializeRouteData(serializedRoute.routeData)
|
|
543
|
+
});
|
|
544
|
+
const route = serializedRoute;
|
|
545
|
+
route.routeData = deserializeRouteData(serializedRoute.routeData);
|
|
546
|
+
}
|
|
547
|
+
const assets = new Set(serializedManifest.assets);
|
|
548
|
+
const componentMetadata = new Map(serializedManifest.componentMetadata);
|
|
549
|
+
const clientDirectives = new Map(serializedManifest.clientDirectives);
|
|
550
|
+
return {
|
|
551
|
+
...serializedManifest,
|
|
552
|
+
assets,
|
|
553
|
+
componentMetadata,
|
|
554
|
+
clientDirectives,
|
|
555
|
+
routes
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
const manifest = deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/astro@3.0.5/node_modules/astro/dist/assets/image-endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.d90361ee.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.b693913e.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.d90361ee.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.b693913e.css"}],"routeData":{"route":"/~fallback","type":"page","pattern":"^\\/~fallback\\/?$","segments":[[{"content":"~fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/~fallback.astro","pathname":"/~fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.d90361ee.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.b693913e.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"componentMetadata":[],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.f11f26f3.mjs","/../../node_modules/.pnpm/astro@3.0.5/node_modules/astro/dist/assets/image-endpoint.js":"chunks/pages/image-endpoint.js.a9374d3e.mjs","/src/pages/~fallback.astro":"chunks/pages/~fallback.astro.01594623.mjs","\u0000@astrojs-manifest":"manifest.12e7a10c.mjs","\u0000@astro-page:../../node_modules/.pnpm/astro@3.0.5/node_modules/astro/dist/assets/image-endpoint@_@js":"chunks/image-endpoint@_@js.802bf648.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.a122f091.mjs","\u0000@astro-page:src/pages/~fallback@_@astro":"chunks/~fallback@_@astro.876a97c5.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.da98dcbe.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.fa8b921b.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...f7cdc954.mjs","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/dist/assets/services/sharp.js":"chunks/sharp.52841bb4.mjs","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/SearchModal.vue":"_astro/SearchModal.117a477d.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/CartSidebar.vue":"_astro/CartSidebar.2731d333.js","@astrojs/vue/client.js":"_astro/client.a5d2898b.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","~/components/HeroSlider.vue":"_astro/HeroSlider.a70b2582.js","~/components/ProductShelf.vue":"_astro/ProductShelf.619c56a5.js","/astro/hoisted.js?q=0":"_astro/hoisted.d90361ee.js","~/components/PitchBar.vue":"_astro/PitchBar.13991988.js","~/components/ShopHeader.vue":"_astro/ShopHeader.d50a07c1.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.93857bfb.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.b693913e.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.0b24e2cb.js","/_astro/CartSidebar.2731d333.js","/_astro/HeroSlider.a70b2582.js","/_astro/PitchBar.13991988.js","/_astro/Prices.cdfa346a.js","/_astro/ProductShelf.619c56a5.js","/_astro/SearchModal.117a477d.js","/_astro/ShopHeader.d50a07c1.js","/_astro/_plugin-vue_export-helper.fc5e2f5b.js","/_astro/api.39f40cd8.js","/_astro/client.a5d2898b.js","/_astro/firebase-app.93857bfb.js","/_astro/format-money.86f14860.js","/_astro/hoisted.d90361ee.js","/_astro/img.d4891d80.js","/_astro/index.33801818.js","/_astro/modules-info.ec412b24.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]});
|
|
560
|
+
|
|
561
|
+
export { AstroCookies as A, Logger as L, attachCookiesToResponse as a, callEndpoint as b, createAPIContext as c, dateTimeFormat as d, callMiddleware as e, AstroIntegrationLogger as f, getSetCookiesFromResponse as g, levels as l, manifest };
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
import { i as server_default } from './chunks/astro.bb5b7191.mjs';
|
|
2
1
|
import { useSSRContext, defineComponent, computed, createVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, h, createSSRApp } from 'vue';
|
|
3
2
|
import { ssrRenderSlotInner, ssrRenderVNode, ssrRenderSlot, ssrRenderAttrs, ssrRenderClass, renderToString } from 'vue/server-renderer';
|
|
4
3
|
import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
|
|
5
|
-
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.
|
|
6
|
-
import 'path-to-regexp';
|
|
7
|
-
import 'cookie';
|
|
4
|
+
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.08ba5973.mjs';
|
|
8
5
|
import '@astrojs/internal-helpers/path';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import 'node:http';
|
|
12
|
-
import 'node:tls';
|
|
13
|
-
import 'mime';
|
|
14
|
-
import 'string-width';
|
|
6
|
+
import './chunks/astro.440a2e08.mjs';
|
|
7
|
+
import 'clsx';
|
|
15
8
|
import 'html-escaper';
|
|
16
|
-
import 'node:fs/promises';
|
|
17
|
-
import 'node:path';
|
|
18
|
-
import 'node:url';
|
|
19
|
-
import 'http-cache-semantics';
|
|
20
|
-
import 'node:os';
|
|
21
|
-
import 'image-size';
|
|
22
|
-
import 'magic-string';
|
|
23
|
-
import 'node:stream';
|
|
24
9
|
import '@cloudcommerce/api';
|
|
25
10
|
import 'node:events';
|
|
11
|
+
import 'node:fs';
|
|
12
|
+
import 'node:path';
|
|
26
13
|
import '@cloudcommerce/config';
|
|
27
14
|
import 'ultrahtml';
|
|
28
|
-
/* empty css */import '
|
|
15
|
+
/* empty css */import 'image-size';
|
|
16
|
+
import 'mime';
|
|
17
|
+
import '@vueuse/core';
|
|
29
18
|
import '@headlessui/vue';
|
|
30
19
|
|
|
31
20
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
@@ -370,12 +359,12 @@ async function renderToStaticMarkup(Component, props, slotted, metadata) {
|
|
|
370
359
|
return { html };
|
|
371
360
|
}
|
|
372
361
|
|
|
373
|
-
const
|
|
362
|
+
const _renderer0 = {
|
|
374
363
|
check,
|
|
375
364
|
renderToStaticMarkup,
|
|
376
365
|
supportsAstroStaticSlot: true,
|
|
377
366
|
};
|
|
378
367
|
|
|
379
|
-
const renderers = [Object.assign({"name":"
|
|
368
|
+
const renderers = [Object.assign({"name":"@astrojs/vue","clientEntrypoint":"@astrojs/vue/client.js","serverEntrypoint":"@astrojs/vue/server.js"}, { ssr: _renderer0 }),];
|
|
380
369
|
|
|
381
370
|
export { renderers };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.3",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"@headlessui/vue": "^1.7.16",
|
|
41
41
|
"@iconify-json/fa6-brands": "^1.1.13",
|
|
42
42
|
"@iconify-json/heroicons": "^1.1.12",
|
|
43
|
-
"@iconify-json/logos": "^1.1.
|
|
44
|
-
"@vite-pwa/astro": "^0.1.
|
|
43
|
+
"@iconify-json/logos": "^1.1.35",
|
|
44
|
+
"@vite-pwa/astro": "^0.1.2",
|
|
45
45
|
"@vueuse/core": "10.4.1",
|
|
46
|
-
"astro": "2.10.
|
|
46
|
+
"astro": "2.10.15",
|
|
47
47
|
"astro-capo": "^0.0.1",
|
|
48
48
|
"chroma-js": "^2.4.2",
|
|
49
49
|
"dotenv": "^16.3.1",
|
|
50
|
-
"firebase": "^10.3.
|
|
50
|
+
"firebase": "^10.3.1",
|
|
51
51
|
"image-size": "^1.0.2",
|
|
52
52
|
"mime": "^3.0.0",
|
|
53
53
|
"semver": "^7.5.4",
|
|
54
54
|
"sharp": "^0.32.5",
|
|
55
55
|
"tailwindcss": "^3.3.3",
|
|
56
|
-
"unocss": "^0.55.
|
|
56
|
+
"unocss": "^0.55.7",
|
|
57
57
|
"vite": "^4.4.9",
|
|
58
58
|
"vite-plugin-pwa": "^0.16.4",
|
|
59
59
|
"vue": "^3.3.4"
|
|
@@ -29,7 +29,7 @@ if (fetchingApiContext) {
|
|
|
29
29
|
|
|
30
30
|
const apiDoc = apiContext.doc;
|
|
31
31
|
const state: Record<string, any> = apiDoc || cmsContent || {};
|
|
32
|
-
const title = state.meta_title || state.name || state.title ||
|
|
32
|
+
const title = state.meta_title || state.name || state.title || settings.name;
|
|
33
33
|
const description = state.meta_description || state.short_description || settings.description;
|
|
34
34
|
const favicon = settings.icon ? getIconUrl(32) : '/favicon.ico';
|
|
35
35
|
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
@@ -137,9 +137,10 @@ const inlineJSONLd = JSON.stringify({
|
|
|
137
137
|
{metatagsContent?.twitter_username &&
|
|
138
138
|
<meta name="twitter:site" content={metatagsContent.twitter_username} />}
|
|
139
139
|
<meta name="ecom-store-id" content={String(storeId)}>
|
|
140
|
+
|
|
140
141
|
<script>
|
|
141
142
|
import { registerSW } from 'virtual:pwa-register';
|
|
142
|
-
registerSW({ immediate:
|
|
143
|
+
registerSW({ immediate: false });
|
|
143
144
|
</script>
|
|
144
145
|
{pwaInfo && <Fragment set:html={pwaInfo.webManifest.linkTag} />}
|
|
145
146
|
{(!pwaInfo && !import.meta.env.DEV) &&
|