cloudcommerce 0.20.2 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/package.json +4 -4
- 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 +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/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/config/firebase.json +10 -0
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- 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/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +24 -18
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/ssr/src/firebase/serve-storefront.ts +25 -18
- package/packages/storefront/client.d.ts +1 -19
- package/packages/storefront/dist/client/_astro/{ShopHeader.0c884bbe.js → ShopHeader.82ae97a5.js} +1 -1
- package/packages/storefront/dist/client/_astro/_...slug_.c85b8978.css +1 -0
- package/packages/storefront/dist/client/_astro/{client.8035a95a.js → client.0fb6b44e.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.9d9d7ac4.js → hoisted.572313d6.js} +1 -1
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/_...49a92e87.mjs +34 -0
- package/packages/storefront/dist/server/chunks/{account@_@astro.89e4cf60.mjs → account@_@astro.5388531b.mjs} +6 -7
- package/packages/storefront/dist/server/chunks/{astro.45d3047f.mjs → astro.161c5a41.mjs} +72 -54
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.f880a152.mjs → endpoint@_@js.fe113d0d.mjs} +6 -7
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.89538855.mjs → fallback@_@astro.23b17e3d.mjs} +6 -7
- package/packages/storefront/dist/server/chunks/{index@_@astro.56fdd6da.mjs → index@_@astro.2527898d.mjs} +6 -7
- package/packages/storefront/dist/server/chunks/{index@_@astro.548cf7ad.mjs → index@_@astro.433809ce.mjs} +6 -7
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.bde9380b.mjs → _...slug_.astro.1d0e7f10.mjs} +83 -95
- package/packages/storefront/dist/server/chunks/pages/{account.astro.f07cf19e.mjs → account.astro.7539e037.mjs} +4 -4
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.d4e37801.mjs → endpoint.js.b71736ca.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.e2e8a0e4.mjs → fallback.astro.15292657.mjs} +7 -7
- package/packages/storefront/dist/server/chunks/pages/{index.astro.3760ebe3.mjs → index.astro.9592fbd6.mjs} +4 -3
- package/packages/storefront/dist/server/entry.mjs +12 -11
- package/packages/storefront/dist/server/renderers.mjs +6 -7
- package/packages/storefront/package.json +2 -2
- package/packages/storefront/server.d.ts +3 -27
- package/packages/storefront/src/lib/$storefront.d.ts +28 -0
- package/packages/storefront/src/lib/assets/base.css +2 -0
- package/packages/storefront/src/lib/layouts/Base.astro +1 -9
- package/packages/storefront/src/lib/layouts/BaseHead.astro +73 -2
- package/packages/storefront/src/lib/pages/_vue.ts +1 -1
- package/packages/storefront/src/lib/server-data.ts +1 -1
- package/packages/storefront/src/lib/ssr-context.ts +46 -36
- package/packages/storefront/src/vue-globals.d.ts +3 -3
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/_...slug_.c2da43fb.css +0 -1
- package/packages/storefront/dist/server/chunks/_...9e22b578.mjs +0 -35
- package/packages/storefront/src/lib/layouts/BaseStateJson.astro +0 -68
|
@@ -8,7 +8,7 @@ import sizeOf from 'image-size';
|
|
|
8
8
|
import 'magic-string';
|
|
9
9
|
import mime from 'mime';
|
|
10
10
|
import 'node:stream';
|
|
11
|
-
import { c as createAstro, a as createComponent, r as renderTemplate,
|
|
11
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, u as unescapeHTML, b as renderComponent, d as addAttribute, F as Fragment, m as maybeRenderHead, s as spreadAttributes, e as renderSlot, f as renderHead } from '../astro.161c5a41.mjs';
|
|
12
12
|
import api from '@cloudcommerce/api';
|
|
13
13
|
import { EventEmitter } from 'node:events';
|
|
14
14
|
import fs from 'node:fs';
|
|
@@ -299,14 +299,18 @@ const loadRouteContext = async (Astro, {
|
|
|
299
299
|
const config = getConfig();
|
|
300
300
|
globalThis.$storefront.settings = config.settings;
|
|
301
301
|
let cmsContent;
|
|
302
|
-
let apiResource;
|
|
303
|
-
let apiDoc;
|
|
304
302
|
const apiState = {};
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
303
|
+
const apiPrefetchings = [
|
|
304
|
+
...apiPrefetchEndpoints.map((endpoint) => {
|
|
305
|
+
if (endpoint === ":slug")
|
|
306
|
+
return null;
|
|
307
|
+
return api.get(endpoint);
|
|
308
|
+
})
|
|
309
309
|
];
|
|
310
|
+
let fetchingApiContext = null;
|
|
311
|
+
const apiContext = {
|
|
312
|
+
error: null
|
|
313
|
+
};
|
|
310
314
|
if (isHomepage) {
|
|
311
315
|
cmsContent = await config.getContent("pages/home");
|
|
312
316
|
} else {
|
|
@@ -320,23 +324,37 @@ const loadRouteContext = async (Astro, {
|
|
|
320
324
|
err.responseHTML = `<head></head><body>${err.message}</body>`;
|
|
321
325
|
throw err;
|
|
322
326
|
} else {
|
|
323
|
-
|
|
327
|
+
fetchingApiContext = api.get(`slugs/${slug}`).then((response) => {
|
|
328
|
+
Object.assign(apiContext, response.data);
|
|
329
|
+
const apiResource = apiContext.resource;
|
|
330
|
+
const apiDoc = apiContext.doc;
|
|
331
|
+
apiState[`${apiResource}/${apiDoc._id}`] = apiDoc;
|
|
332
|
+
globalThis.$storefront.apiContext = {
|
|
333
|
+
resource: apiResource,
|
|
334
|
+
doc: apiDoc,
|
|
335
|
+
timestamp: Date.now()
|
|
336
|
+
};
|
|
337
|
+
return response;
|
|
338
|
+
});
|
|
339
|
+
const index = apiPrefetchings.findIndex((pr) => pr === null);
|
|
340
|
+
if (index > -1) {
|
|
341
|
+
apiPrefetchings[index] = fetchingApiContext;
|
|
342
|
+
} else {
|
|
343
|
+
fetchingApiContext.catch((err) => {
|
|
344
|
+
apiContext.error = err;
|
|
345
|
+
});
|
|
346
|
+
}
|
|
324
347
|
}
|
|
325
348
|
}
|
|
326
349
|
}
|
|
327
350
|
try {
|
|
328
|
-
|
|
329
|
-
if (slugResponse) {
|
|
330
|
-
apiResource = slugResponse.data.resource;
|
|
331
|
-
apiDoc = slugResponse.data.doc;
|
|
332
|
-
if (apiDoc) {
|
|
333
|
-
apiState[`${apiResource}/${apiDoc._id}`] = apiDoc;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
prefetchResponses.forEach((response) => {
|
|
351
|
+
(await Promise.all(apiPrefetchings)).forEach((response) => {
|
|
337
352
|
if (response) {
|
|
338
353
|
const { config: { endpoint }, data } = response;
|
|
339
|
-
|
|
354
|
+
const apiStateKey = endpoint.replace(/\?.*$/, "");
|
|
355
|
+
if (!apiState[apiStateKey]) {
|
|
356
|
+
apiState[apiStateKey] = data.result || data;
|
|
357
|
+
}
|
|
340
358
|
}
|
|
341
359
|
});
|
|
342
360
|
} catch (err) {
|
|
@@ -370,19 +388,12 @@ const loadRouteContext = async (Astro, {
|
|
|
370
388
|
} else {
|
|
371
389
|
setResponseCache(Astro, 120, 300);
|
|
372
390
|
}
|
|
373
|
-
if (apiDoc) {
|
|
374
|
-
globalThis.$storefront.context = {
|
|
375
|
-
resource: apiResource,
|
|
376
|
-
doc: apiDoc,
|
|
377
|
-
timestamp: Date.now()
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
391
|
const routeContext = {
|
|
381
392
|
...config,
|
|
382
393
|
isHomepage,
|
|
383
394
|
cmsContent,
|
|
384
|
-
|
|
385
|
-
|
|
395
|
+
fetchingApiContext,
|
|
396
|
+
apiContext,
|
|
386
397
|
apiState,
|
|
387
398
|
isPreview
|
|
388
399
|
};
|
|
@@ -393,9 +404,13 @@ const loadRouteContext = async (Astro, {
|
|
|
393
404
|
|
|
394
405
|
const pwaInfo = {"pwaInDevEnvironment":false,"webManifest":{"href":"/manifest.webmanifest","useCredentials":false,"linkTag":"<link rel=\"manifest\" href=\"/manifest.webmanifest\">"}};
|
|
395
406
|
|
|
396
|
-
|
|
407
|
+
var __freeze$1 = Object.freeze;
|
|
408
|
+
var __defProp$1 = Object.defineProperty;
|
|
409
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
410
|
+
var _a$1;
|
|
411
|
+
const $$Astro$8 = createAstro("https://ecom2-demo.web.app");
|
|
397
412
|
const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
398
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
413
|
+
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
399
414
|
Astro2.self = $$BaseHead;
|
|
400
415
|
const deployRand = ({}).DEPLOY_RAND || "_";
|
|
401
416
|
const getIconUrl = (size) => {
|
|
@@ -404,13 +419,22 @@ const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
404
419
|
const {
|
|
405
420
|
storeId,
|
|
406
421
|
cmsContent,
|
|
407
|
-
|
|
422
|
+
fetchingApiContext,
|
|
423
|
+
apiContext,
|
|
408
424
|
lang,
|
|
425
|
+
countryCode,
|
|
426
|
+
currency,
|
|
427
|
+
currencySymbol,
|
|
409
428
|
domain,
|
|
410
429
|
primaryColor,
|
|
411
430
|
settings,
|
|
431
|
+
isPreview,
|
|
412
432
|
getContent
|
|
413
433
|
} = Astro2.locals.routeContext;
|
|
434
|
+
if (fetchingApiContext) {
|
|
435
|
+
await fetchingApiContext;
|
|
436
|
+
}
|
|
437
|
+
const apiDoc = apiContext.doc;
|
|
414
438
|
const state = apiDoc || cmsContent || {};
|
|
415
439
|
const title = state.meta_title || state.name || state.title || Astro2.props.title || settings.name;
|
|
416
440
|
const description = state.meta_description || state.short_description || settings.description;
|
|
@@ -431,55 +455,6 @@ const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
431
455
|
} else {
|
|
432
456
|
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
433
457
|
}
|
|
434
|
-
return renderTemplate`<meta charset="UTF-8">
|
|
435
|
-
<meta name="viewport" content="width=device-width">
|
|
436
|
-
<meta name="theme-color"${addAttribute(primaryColor, "content")}>
|
|
437
|
-
<link rel="icon" type="image/png"${addAttribute(favicon, "href")} sizes="32x32">
|
|
438
|
-
${shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`}
|
|
439
|
-
<title>${title}</title>
|
|
440
|
-
<meta name="description"${addAttribute(description, "content")}>
|
|
441
|
-
<meta name="author"${addAttribute(settings.name, "content")}>
|
|
442
|
-
<meta name="generator"${addAttribute(Astro2.generator, "content")}>
|
|
443
|
-
<link rel="canonical"${addAttribute(canonicalUrl, "href")}>
|
|
444
|
-
${shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`}
|
|
445
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
446
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
447
|
-
<meta property="og:site_name"${addAttribute(settings.name, "content")}>
|
|
448
|
-
<meta property="og:url"${addAttribute(canonicalUrl, "content")}>
|
|
449
|
-
<meta property="og:title"${addAttribute(title, "content")}>
|
|
450
|
-
<meta property="og:description"${addAttribute(description, "content")}>
|
|
451
|
-
<meta property="og:type" content="website">
|
|
452
|
-
<meta property="og:locale"${addAttribute(ogLocale, "content")}>
|
|
453
|
-
${ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`}
|
|
454
|
-
${metatagsContent?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fb_app_id, "content")}>`}
|
|
455
|
-
<meta name="twitter:card" content="summary">
|
|
456
|
-
${metatagsContent?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitter_username, "content")}>`}
|
|
457
|
-
<meta name="ecom-store-id"${addAttribute(String(storeId), "content")}>
|
|
458
|
-
|
|
459
|
-
${pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`}
|
|
460
|
-
${!pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`}`;
|
|
461
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
|
|
462
|
-
|
|
463
|
-
var __freeze$1 = Object.freeze;
|
|
464
|
-
var __defProp$1 = Object.defineProperty;
|
|
465
|
-
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", { value: __freeze$1(raw || cooked.slice()) }));
|
|
466
|
-
var _a$1;
|
|
467
|
-
const $$Astro$8 = createAstro("https://ecom2-demo.web.app");
|
|
468
|
-
const $$BaseStateJson = createComponent(async ($$result, $$props, $$slots) => {
|
|
469
|
-
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
470
|
-
Astro2.self = $$BaseStateJson;
|
|
471
|
-
const {
|
|
472
|
-
storeId,
|
|
473
|
-
apiResource,
|
|
474
|
-
apiDoc,
|
|
475
|
-
lang,
|
|
476
|
-
countryCode,
|
|
477
|
-
currency,
|
|
478
|
-
currencySymbol,
|
|
479
|
-
domain,
|
|
480
|
-
settings,
|
|
481
|
-
isPreview
|
|
482
|
-
} = Astro2.locals.routeContext;
|
|
483
458
|
let inlineClientJS = `
|
|
484
459
|
window.ECOM_STORE_ID = ${storeId};
|
|
485
460
|
window.ECOM_LANG = '${lang}';
|
|
@@ -487,6 +462,15 @@ window.ECOM_CURRENCY = '${currency}';
|
|
|
487
462
|
window.ECOM_CURRENCY_SYMBOL = '${currencySymbol}';
|
|
488
463
|
window.ECOM_COUNTRY_CODE = '${countryCode}';
|
|
489
464
|
window.$storefront = ${JSON.stringify({ settings })};`;
|
|
465
|
+
if (apiContext.error) {
|
|
466
|
+
const { message, statusCode } = apiContext.error;
|
|
467
|
+
const url = Astro2.url.pathname;
|
|
468
|
+
inlineClientJS += `
|
|
469
|
+
console.error(${JSON.stringify(message)});
|
|
470
|
+
setTimeout(() => {
|
|
471
|
+
window.location.replace("/fallback?status=${statusCode}&url=${encodeURIComponent(url)}");
|
|
472
|
+
}, 1);`;
|
|
473
|
+
}
|
|
490
474
|
if (apiDoc) {
|
|
491
475
|
if (typeof apiDoc.price === "number") {
|
|
492
476
|
apiDoc.price = price(apiDoc);
|
|
@@ -509,11 +493,12 @@ window.$storefront = ${JSON.stringify({ settings })};`;
|
|
|
509
493
|
return nestedDoc;
|
|
510
494
|
};
|
|
511
495
|
inlineClientJS += `
|
|
512
|
-
window.$storefront.
|
|
513
|
-
resource:
|
|
496
|
+
window.$storefront.apiContext = ${JSON.stringify({
|
|
497
|
+
resource: apiContext.resource,
|
|
514
498
|
doc: minifyApiDoc({ ...apiDoc }),
|
|
515
499
|
timestamp: Date.now()
|
|
516
|
-
})}
|
|
500
|
+
})};
|
|
501
|
+
window.$storefront.context /* DEPRECATED */ = window.$storefront.apiContext`;
|
|
517
502
|
}
|
|
518
503
|
if (isPreview) {
|
|
519
504
|
inlineClientJS += `
|
|
@@ -526,8 +511,8 @@ window.$isCmsPreview = true;`;
|
|
|
526
511
|
url: `https://${domain}/`,
|
|
527
512
|
logo: `https://${domain}${settings.logo}`
|
|
528
513
|
});
|
|
529
|
-
return renderTemplate(_a$1 || (_a$1 = __template$1(["<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
|
|
530
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/
|
|
514
|
+
return renderTemplate(_a$1 || (_a$1 = __template$1(['<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width">\n<meta name="theme-color"', '>\n<link rel="icon" type="image/png"', ' sizes="32x32">\n', "\n<title>", '</title>\n<meta name="description"', '>\n<meta name="author"', '>\n<meta name="generator"', '>\n<link rel="canonical"', ">\n", '\n<meta name="apple-mobile-web-app-capable" content="yes">\n<meta name="apple-mobile-web-app-status-bar-style" content="default">\n<meta property="og:site_name"', '>\n<meta property="og:url"', '>\n<meta property="og:title"', '>\n<meta property="og:description"', '>\n<meta property="og:type" content="website">\n<meta property="og:locale"', ">\n", "\n", '\n<meta name="twitter:card" content="summary">\n', '\n<meta name="ecom-store-id"', ">\n\n", "\n", "\n\n<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>"])), addAttribute(primaryColor, "content"), addAttribute(favicon, "href"), shortcutIcon && renderTemplate`<link rel="icon" type="image/png"${addAttribute(shortcutIcon, "href")} sizes="192x192">`, title, addAttribute(description, "content"), addAttribute(settings.name, "content"), addAttribute(Astro2.generator, "content"), addAttribute(canonicalUrl, "href"), shortcutIcon && renderTemplate`<link rel="apple-touch-icon"${addAttribute(shortcutIcon, "href")}>`, addAttribute(settings.name, "content"), addAttribute(canonicalUrl, "content"), addAttribute(title, "content"), addAttribute(description, "content"), addAttribute(ogLocale, "content"), ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`, metatagsContent?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(metatagsContent.fb_app_id, "content")}>`, metatagsContent?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(metatagsContent.twitter_username, "content")}>`, addAttribute(String(storeId), "content"), pwaInfo && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(pwaInfo.webManifest.linkTag)}` })}`, !pwaInfo && !false && renderTemplate`<link rel="manifest" href="/manifest.webmanifest">`, unescapeHTML(inlineClientJS), unescapeHTML(inlineJSONLd));
|
|
515
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
|
|
531
516
|
|
|
532
517
|
function isRemoteImage(src) {
|
|
533
518
|
return /^(https?:)?\/\//.test(src);
|
|
@@ -615,7 +600,7 @@ async function getImage(transform) {
|
|
|
615
600
|
}
|
|
616
601
|
let loader = (_a = globalThis.astroImage) == null ? void 0 : _a.loader;
|
|
617
602
|
if (!loader) {
|
|
618
|
-
const { default: mod } = await import('./endpoint.js.
|
|
603
|
+
const { default: mod } = await import('./endpoint.js.b71736ca.mjs').then(n => n.s).catch(() => {
|
|
619
604
|
throw new Error(
|
|
620
605
|
"[@astrojs/image] Builtin image loader not found. (Did you remember to add the integration to your Astro config?)"
|
|
621
606
|
);
|
|
@@ -906,12 +891,10 @@ const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
|
|
|
906
891
|
const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
907
892
|
const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
|
|
908
893
|
Astro2.self = $$Base$1;
|
|
909
|
-
const { title } = Astro2.props;
|
|
910
894
|
const { getContent } = Astro2.locals.routeContext;
|
|
911
895
|
const { custom_code: customCodeContent } = await getContent("layout");
|
|
912
896
|
return renderTemplate`<head>
|
|
913
|
-
${
|
|
914
|
-
${renderComponent($$result, "BaseStateJson", $$BaseStateJson, {})}
|
|
897
|
+
${renderSlot($$result, $$slots["base-head"])}
|
|
915
898
|
${customCodeContent?.css && renderTemplate`<style>{customCodeContent.css}</style>`}
|
|
916
899
|
${customCodeContent?.html_head && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(customCodeContent.html_head)}` })}`}
|
|
917
900
|
${renderSlot($$result, $$slots["base-head-scripts"])}
|
|
@@ -939,8 +922,10 @@ const $$Astro$3 = createAstro("https://ecom2-demo.web.app");
|
|
|
939
922
|
const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
940
923
|
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
941
924
|
Astro2.self = $$Base;
|
|
942
|
-
|
|
943
|
-
|
|
925
|
+
return renderTemplate`${renderComponent($$result, "SfBase", $$Base$1, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "Fragment", Fragment, { "slot": "base-head" }, { "default": ($$result3) => renderTemplate`
|
|
926
|
+
${renderSlot($$result3, $$slots["base-head"])}
|
|
927
|
+
` })}`, "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`
|
|
928
|
+
|
|
944
929
|
|
|
945
930
|
${renderSlot($$result2, $$slots["default"])}
|
|
946
931
|
` })}`;
|
|
@@ -1989,7 +1974,7 @@ const initializeFirebaseAuth = (canWaitIdle = !window.location.pathname.startsWi
|
|
|
1989
1974
|
|
|
1990
1975
|
const {
|
|
1991
1976
|
settings,
|
|
1992
|
-
|
|
1977
|
+
apiContext
|
|
1993
1978
|
} = globalThis.$storefront;
|
|
1994
1979
|
const networkNames = [
|
|
1995
1980
|
"whatsapp",
|
|
@@ -3574,10 +3559,12 @@ const $$Astro$1 = createAstro("https://ecom2-demo.web.app");
|
|
|
3574
3559
|
const $$Wildcard = createComponent(async ($$result, $$props, $$slots) => {
|
|
3575
3560
|
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
3576
3561
|
Astro2.self = $$Wildcard;
|
|
3577
|
-
const {
|
|
3562
|
+
const { fetchingApiContext, apiContext } = Astro2.locals.routeContext;
|
|
3563
|
+
await fetchingApiContext;
|
|
3564
|
+
const apiDoc = apiContext.doc;
|
|
3578
3565
|
return renderTemplate`${maybeRenderHead()}<main>
|
|
3579
3566
|
${apiDoc && renderTemplate`<h1>Hello <span class="text-gradient">${apiDoc.name}</span></h1><hr><div class="mt-3">
|
|
3580
|
-
<mark>${apiDoc._id}</mark> from <i>${
|
|
3567
|
+
<mark>${apiDoc._id}</mark> from <i>${apiContext.resource}</i>
|
|
3581
3568
|
<p>${Math.random()}</p>
|
|
3582
3569
|
<em>Lorem ipsum dolor sit amet</em>
|
|
3583
3570
|
</div>`}
|
|
@@ -3605,7 +3592,8 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
3605
3592
|
loadError = err;
|
|
3606
3593
|
}
|
|
3607
3594
|
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
3608
|
-
${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "default": ($$result2) => renderTemplate`
|
|
3595
|
+
${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`
|
|
3596
|
+
|
|
3609
3597
|
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
3610
3598
|
${renderComponent($$result2, "WildcardMain", $$Wildcard, {})}
|
|
3611
3599
|
` })}`}
|
|
@@ -3624,4 +3612,4 @@ const ____slug_ = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
3624
3612
|
url: $$url
|
|
3625
3613
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3626
3614
|
|
|
3627
|
-
export { $$
|
|
3615
|
+
export { $$BaseHead as $, BaseSSRService as B, Carousel as C, _export_sfc as _, $$PageHeader as a, $$Base as b, $$Picture as c, CarouselControl as d, availableExtraDiscount as e, installmentsOption as f, discountOption as g, loyaltyPointsPrograms as h, isOutputFormatSupportsAlpha as i, addProductToCart as j, ____slug_ as k, loadRouteContext as l, parseShippingPhrase as p };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate } from '../astro.
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate } from '../astro.161c5a41.mjs';
|
|
2
2
|
import 'path-to-regexp';
|
|
3
3
|
import 'cookie';
|
|
4
4
|
import '@astrojs/internal-helpers/path';
|
|
5
5
|
import 'kleur/colors';
|
|
6
|
-
import 'fs';
|
|
7
|
-
import 'http';
|
|
8
|
-
import 'tls';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:http';
|
|
8
|
+
import 'node:tls';
|
|
9
9
|
import 'mime';
|
|
10
10
|
import 'html-escaper';
|
|
11
11
|
import 'string-width';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mime from 'mime';
|
|
2
2
|
import sharp$1 from 'sharp';
|
|
3
|
-
import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.
|
|
3
|
+
import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.1d0e7f10.mjs';
|
|
4
4
|
|
|
5
5
|
class SharpService extends BaseSSRService {
|
|
6
6
|
async transform(inputBuffer, transform) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead,
|
|
2
|
-
import { l as loadRouteContext, $ as $$
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.161c5a41.mjs';
|
|
2
|
+
import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.1d0e7f10.mjs';
|
|
3
3
|
import 'path-to-regexp';
|
|
4
4
|
import 'cookie';
|
|
5
5
|
import '@astrojs/internal-helpers/path';
|
|
6
6
|
import 'kleur/colors';
|
|
7
|
-
import 'fs';
|
|
8
|
-
import 'http';
|
|
9
|
-
import 'tls';
|
|
7
|
+
import 'node:fs';
|
|
8
|
+
import 'node:http';
|
|
9
|
+
import 'node:tls';
|
|
10
10
|
import 'mime';
|
|
11
11
|
import 'html-escaper';
|
|
12
12
|
import 'string-width';
|
|
@@ -20,7 +20,6 @@ import 'magic-string';
|
|
|
20
20
|
import 'node:stream';
|
|
21
21
|
import '@cloudcommerce/api';
|
|
22
22
|
import 'node:events';
|
|
23
|
-
import 'node:fs';
|
|
24
23
|
import '@cloudcommerce/config';
|
|
25
24
|
import '@ecomplus/utils';
|
|
26
25
|
/* empty css */import 'vue';
|
|
@@ -52,7 +51,8 @@ const $$Fallback = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
52
51
|
return err.astroResponse;
|
|
53
52
|
}
|
|
54
53
|
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
55
|
-
${renderComponent($$result, "Base", $$Base, {}, { "default": ($$result2) => renderTemplate`
|
|
54
|
+
${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`
|
|
55
|
+
|
|
56
56
|
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
57
57
|
${renderComponent($$result2, "FallbackMain", $$Fallback$1, {})}
|
|
58
58
|
` })}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate,
|
|
2
|
-
import {
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, b as renderComponent, m as maybeRenderHead, d as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.161c5a41.mjs';
|
|
2
|
+
import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.1d0e7f10.mjs';
|
|
3
3
|
import { ref, shallowReactive, computed, useSSRContext, defineComponent, mergeProps, createVNode, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, withDirectives, vShow, openBlock, createBlock, Fragment, renderList, resolveComponent, createCommentVNode, withModifiers, withAsyncContext } from 'vue';
|
|
4
4
|
import api from '@cloudcommerce/api';
|
|
5
5
|
import { inStock, price, name, img, onPromotion } from '@ecomplus/utils';
|
|
@@ -1258,7 +1258,8 @@ const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1258
1258
|
loadError = err;
|
|
1259
1259
|
}
|
|
1260
1260
|
return renderTemplate`<html${addAttribute(routeContext?.lang.replace("_", "-"), "lang")}>
|
|
1261
|
-
${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "default": ($$result2) => renderTemplate`
|
|
1261
|
+
${routeContext && renderTemplate`${renderComponent($$result, "Base", $$Base, {}, { "base-head": ($$result2) => renderTemplate`${renderComponent($$result2, "BaseHead", $$BaseHead, { "slot": "base-head" })}`, "default": ($$result2) => renderTemplate`
|
|
1262
|
+
|
|
1262
1263
|
${renderComponent($$result2, "PageHeader", $$PageHeader, {})}
|
|
1263
1264
|
${renderComponent($$result2, "HomeMain", $$Home, {})}
|
|
1264
1265
|
` })}`}
|
|
@@ -3,7 +3,7 @@ import { webcrypto } from 'node:crypto';
|
|
|
3
3
|
import { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from 'node:stream/web';
|
|
4
4
|
import { File, FormData, Headers, Request, Response, fetch } from 'undici';
|
|
5
5
|
import { setTimeout as setTimeout$1, clearTimeout as clearTimeout$1 } from 'node:timers';
|
|
6
|
-
import { N as NodeApp, g as deserializeManifest } from './chunks/astro.
|
|
6
|
+
import { N as NodeApp, g as deserializeManifest } from './chunks/astro.161c5a41.mjs';
|
|
7
7
|
import { Readable } from 'stream';
|
|
8
8
|
import https from 'https';
|
|
9
9
|
import path from 'path';
|
|
@@ -18,13 +18,15 @@ import 'cookie';
|
|
|
18
18
|
import 'kleur/colors';
|
|
19
19
|
import '@astrojs/internal-helpers/path';
|
|
20
20
|
import 'path-to-regexp';
|
|
21
|
-
import '
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'node:http';
|
|
23
|
+
import 'node:tls';
|
|
22
24
|
import 'html-escaper';
|
|
23
25
|
import 'string-width';
|
|
24
26
|
import 'vue';
|
|
25
27
|
import 'vue/server-renderer';
|
|
26
28
|
import '@ecomplus/utils';
|
|
27
|
-
import './chunks/pages/_...slug_.astro.
|
|
29
|
+
import './chunks/pages/_...slug_.astro.1d0e7f10.mjs';
|
|
28
30
|
import 'node:fs/promises';
|
|
29
31
|
import 'node:path';
|
|
30
32
|
import 'node:url';
|
|
@@ -35,7 +37,6 @@ import 'magic-string';
|
|
|
35
37
|
import 'node:stream';
|
|
36
38
|
import '@cloudcommerce/api';
|
|
37
39
|
import 'node:events';
|
|
38
|
-
import 'node:fs';
|
|
39
40
|
import '@cloudcommerce/config';
|
|
40
41
|
/* empty css */import '@vueuse/core';
|
|
41
42
|
import '@headlessui/vue';
|
|
@@ -2824,13 +2825,13 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2824
2825
|
start
|
|
2825
2826
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2826
2827
|
|
|
2827
|
-
const _page0 = () => import('./chunks/endpoint@_@js.
|
|
2828
|
-
const _page1 = () => import('./chunks/index@_@astro.
|
|
2829
|
-
const _page2 = () => import('./chunks/fallback@_@astro.
|
|
2830
|
-
const _page3 = () => import('./chunks/index@_@astro.
|
|
2831
|
-
const _page4 = () => import('./chunks/account@_@astro.
|
|
2832
|
-
const _page5 = () => import('./chunks/_...
|
|
2833
|
-
const _manifest = Object.assign(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/@astrojs+image@0.17.2_astro@2.8.
|
|
2828
|
+
const _page0 = () => import('./chunks/endpoint@_@js.fe113d0d.mjs');
|
|
2829
|
+
const _page1 = () => import('./chunks/index@_@astro.2527898d.mjs');
|
|
2830
|
+
const _page2 = () => import('./chunks/fallback@_@astro.23b17e3d.mjs');
|
|
2831
|
+
const _page3 = () => import('./chunks/index@_@astro.433809ce.mjs');
|
|
2832
|
+
const _page4 = () => import('./chunks/account@_@astro.5388531b.mjs');
|
|
2833
|
+
const _page5 = () => import('./chunks/_...49a92e87.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.8.5_sharp@0.32.3/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
|
|
2834
|
+
const _manifest = Object.assign(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/@astrojs+image@0.17.2_astro@2.8.5_sharp@0.32.3/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c85b8978.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.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c85b8978.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.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.c85b8978.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,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"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":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.7539e037.mjs","/src/pages/fallback.astro":"chunks/pages/fallback.astro.15292657.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.8.5_sharp@0.32.3/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.fe113d0d.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.2527898d.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.23b17e3d.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.433809ce.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.5388531b.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...49a92e87.mjs","~/components/PitchBar.vue":"_astro/PitchBar.ed85833a.js","~/components/HeroSlider.vue":"_astro/HeroSlider.eb156f18.js","~/components/ProductShelf.vue":"_astro/ProductShelf.9e290480.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","~/components/ShopHeader.vue":"_astro/ShopHeader.82ae97a5.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.84207480.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.c85b8978.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.62c97a79.js","/_astro/HeroSlider.eb156f18.js","/_astro/PitchBar.ed85833a.js","/_astro/ProductShelf.9e290480.js","/_astro/ShopHeader.82ae97a5.js","/_astro/_plugin-vue_export-helper.4cb7dd76.js","/_astro/api.4984c5be.js","/_astro/client.0fb6b44e.js","/_astro/firebase-app.84207480.js","/_astro/hoisted.572313d6.js","/_astro/img.abbe849f.js","/_astro/index.b93f3d06.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/assets/cms-preview.css","/assets/cms.css","/assets/cvv.png","/assets/img-placeholder.png","/assets/payments.png","/assets/ssl-safe.png","/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"]}), {
|
|
2834
2835
|
pageMap,
|
|
2835
2836
|
renderers,
|
|
2836
2837
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { h as server_default } from './chunks/astro.
|
|
1
|
+
import { h as server_default } from './chunks/astro.161c5a41.mjs';
|
|
2
2
|
import { useSSRContext, defineComponent, computed, mergeProps, h, createSSRApp } from 'vue';
|
|
3
3
|
import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
|
|
4
4
|
import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
|
|
5
|
-
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.
|
|
5
|
+
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.1d0e7f10.mjs';
|
|
6
6
|
import 'path-to-regexp';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import '@astrojs/internal-helpers/path';
|
|
9
9
|
import 'kleur/colors';
|
|
10
|
-
import 'fs';
|
|
11
|
-
import 'http';
|
|
12
|
-
import 'tls';
|
|
10
|
+
import 'node:fs';
|
|
11
|
+
import 'node:http';
|
|
12
|
+
import 'node:tls';
|
|
13
13
|
import 'mime';
|
|
14
14
|
import 'html-escaper';
|
|
15
15
|
import 'string-width';
|
|
@@ -23,7 +23,6 @@ import 'magic-string';
|
|
|
23
23
|
import 'node:stream';
|
|
24
24
|
import '@cloudcommerce/api';
|
|
25
25
|
import 'node:events';
|
|
26
|
-
import 'node:fs';
|
|
27
26
|
import '@cloudcommerce/config';
|
|
28
27
|
/* empty css */import '@vueuse/core';
|
|
29
28
|
import '@headlessui/vue';
|
|
@@ -272,7 +271,7 @@ const createApp = (app) => {
|
|
|
272
271
|
app2.config.globalProperties.$money = formatMoney;
|
|
273
272
|
app2.config.globalProperties.$percentage = formatPercentage;
|
|
274
273
|
app2.config.globalProperties.$settings = globalThis.$storefront.settings;
|
|
275
|
-
app2.config.globalProperties.$
|
|
274
|
+
app2.config.globalProperties.$apiContext = globalThis.$storefront.apiContext;
|
|
276
275
|
}
|
|
277
276
|
});
|
|
278
277
|
app.component("Fade", Fade);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@iconify-json/logos": "^1.1.33",
|
|
44
44
|
"@vite-pwa/astro": "^0.1.1",
|
|
45
45
|
"@vueuse/core": "10.2.1",
|
|
46
|
-
"astro": "2.8.
|
|
46
|
+
"astro": "2.8.5",
|
|
47
47
|
"chroma-js": "^2.4.2",
|
|
48
48
|
"dotenv": "^16.3.1",
|
|
49
49
|
"firebase": "^9.23.0",
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/* eslint-disable vars-on-top, no-var */
|
|
2
2
|
|
|
3
3
|
import type { ApiEndpoint } from '@cloudcommerce/api';
|
|
4
|
-
import type {
|
|
5
|
-
ProductSet,
|
|
6
|
-
CategorySet,
|
|
7
|
-
BrandSet,
|
|
8
|
-
CollectionSet,
|
|
9
|
-
} from '@cloudcommerce/api/types';
|
|
10
4
|
import type { RouteContext } from '@@sf/ssr-context';
|
|
11
|
-
import type {
|
|
5
|
+
import type { $Storefront } from '@@sf/$storefront';
|
|
12
6
|
|
|
13
7
|
declare global {
|
|
14
8
|
namespace App {
|
|
@@ -17,28 +11,10 @@ declare global {
|
|
|
17
11
|
}
|
|
18
12
|
}
|
|
19
13
|
|
|
20
|
-
var $storefront: {
|
|
21
|
-
settings: Partial<SettingsContent>,
|
|
22
|
-
context?: {
|
|
23
|
-
resource: 'products',
|
|
24
|
-
doc: ProductSet,
|
|
25
|
-
timestamp: number,
|
|
26
|
-
} | {
|
|
27
|
-
resource: 'categories',
|
|
28
|
-
doc: CategorySet,
|
|
29
|
-
timestamp: number,
|
|
30
|
-
} | {
|
|
31
|
-
resource: 'brands',
|
|
32
|
-
doc: BrandSet,
|
|
33
|
-
timestamp: number,
|
|
34
|
-
} | {
|
|
35
|
-
resource: 'collections',
|
|
36
|
-
doc: CollectionSet,
|
|
37
|
-
timestamp: number,
|
|
38
|
-
},
|
|
14
|
+
var $storefront: $Storefront & {
|
|
39
15
|
onLoad: (callback: (...args: any[]) => void) => void,
|
|
40
16
|
};
|
|
41
|
-
var $apiPrefetchEndpoints: ApiEndpoint
|
|
17
|
+
var $apiPrefetchEndpoints: Array<ApiEndpoint | ':slug'>;
|
|
42
18
|
var $storefrontSlimDocRegex: undefined | RegExp;
|
|
43
19
|
// @TODO
|
|
44
20
|
var $storefrontCmsHandler: undefined | any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProductSet,
|
|
3
|
+
CategorySet,
|
|
4
|
+
BrandSet,
|
|
5
|
+
CollectionSet,
|
|
6
|
+
} from '@cloudcommerce/api/types';
|
|
7
|
+
import type { SettingsContent } from '@@sf/content';
|
|
8
|
+
|
|
9
|
+
export type $Storefront = {
|
|
10
|
+
settings: Partial<SettingsContent>,
|
|
11
|
+
apiContext?: {
|
|
12
|
+
resource: 'products',
|
|
13
|
+
doc: ProductSet,
|
|
14
|
+
timestamp: number,
|
|
15
|
+
} | {
|
|
16
|
+
resource: 'categories',
|
|
17
|
+
doc: CategorySet,
|
|
18
|
+
timestamp: number,
|
|
19
|
+
} | {
|
|
20
|
+
resource: 'brands',
|
|
21
|
+
doc: BrandSet,
|
|
22
|
+
timestamp: number,
|
|
23
|
+
} | {
|
|
24
|
+
resource: 'collections',
|
|
25
|
+
doc: CollectionSet,
|
|
26
|
+
timestamp: number,
|
|
27
|
+
},
|
|
28
|
+
};
|