cloudcommerce 0.0.70 → 0.0.73
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/.eslintrc.cjs +1 -0
- package/CHANGELOG.md +27 -0
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/CHANGELOG.md +1 -0
- package/packages/apps/frenet/README.md +1 -0
- package/packages/apps/frenet/lib/frenet.d.ts +2 -0
- package/packages/apps/frenet/lib/frenet.js +6 -0
- package/packages/apps/frenet/lib/frenet.js.map +1 -0
- package/packages/apps/frenet/lib/index.d.ts +1 -0
- package/packages/apps/frenet/lib/index.js +2 -0
- package/packages/apps/frenet/lib/index.js.map +1 -0
- package/packages/apps/frenet/lib-mjs/calculate-frenet.mjs +152 -0
- package/packages/apps/frenet/package.json +28 -0
- package/packages/apps/frenet/src/frenet.ts +7 -0
- package/packages/apps/frenet/src/index.ts +1 -0
- package/packages/apps/frenet/tsconfig.json +6 -0
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/lib/config.js +9 -8
- package/packages/config/lib/config.js.map +1 -1
- package/packages/config/package.json +1 -1
- package/packages/config/src/config.ts +11 -10
- package/packages/events/package.json +1 -1
- package/packages/firebase/lib/config.d.ts +3 -0
- package/packages/firebase/lib/config.js +3 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +3 -0
- package/packages/modules/lib/firebase/call-app-module.js +5 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/package.json +2 -1
- package/packages/modules/src/firebase/call-app-module.ts +5 -0
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +13 -31
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/firebase/serve-storefront.ts +13 -36
- package/packages/storefront/content/blog.json +18 -0
- package/packages/storefront/content/brands.json +24 -0
- package/packages/storefront/content/categories.json +24 -0
- package/packages/storefront/content/code.json +5 -0
- package/packages/storefront/content/collections.json +24 -0
- package/packages/storefront/content/contacts.json +13 -0
- package/packages/storefront/content/footer.json +46 -0
- package/packages/storefront/content/header.json +27 -0
- package/packages/storefront/content/home.json +45 -0
- package/packages/storefront/content/info.json +18 -0
- package/packages/storefront/content/maintenance.json +6 -0
- package/packages/storefront/content/menu.json +6 -0
- package/packages/storefront/content/pages/contato.json +6 -0
- package/packages/storefront/content/pages/entrega.json +6 -0
- package/packages/storefront/content/pages/faq.json +6 -0
- package/packages/storefront/content/pages/pagamentos.json +6 -0
- package/packages/storefront/content/pages/privacidade.json +6 -0
- package/packages/storefront/content/pages/sobre-nos.json +6 -0
- package/packages/storefront/content/pages/termos.json +6 -0
- package/packages/storefront/content/pages/trocas.json +6 -0
- package/packages/storefront/content/posts/esta-loja-e-um-pwa.json +9 -0
- package/packages/storefront/content/products.json +32 -0
- package/packages/storefront/content/search.json +8 -0
- package/packages/storefront/content/settings.json +21 -0
- package/packages/storefront/content/social.json +5 -0
- package/packages/storefront/content/widgets/analytics.json +11 -0
- package/packages/storefront/content/widgets/compre-confie.json +11 -0
- package/packages/storefront/content/widgets/ebit.json +11 -0
- package/packages/storefront/content/widgets/fb-pixel.json +12 -0
- package/packages/storefront/content/widgets/gmc-ratings.json +12 -0
- package/packages/storefront/content/widgets/minicart.json +6 -0
- package/packages/storefront/content/widgets/offers-notification.json +11 -0
- package/packages/storefront/content/widgets/opinioes-verificadas.json +18 -0
- package/packages/storefront/content/widgets/product-card.json +10 -0
- package/packages/storefront/content/widgets/product.json +13 -0
- package/packages/storefront/content/widgets/search-engine.json +8 -0
- package/packages/storefront/content/widgets/search.json +6 -0
- package/packages/storefront/content/widgets/tag-manager.json +12 -0
- package/packages/storefront/content/widgets/tawkto.json +12 -0
- package/packages/storefront/content/widgets/trustvox.json +15 -0
- package/packages/storefront/content/widgets/user.json +5 -0
- package/packages/storefront/dist/client/assets/{index.53a3a3e0.css → _...c08e0a75.css} +1 -1
- package/packages/storefront/dist/client/assets/{404-_...d4aa8aff.css → _...d4aa8aff.css} +0 -0
- package/packages/storefront/dist/client/assets/{404-index.d9230d24.css → fallback-index.d9230d24.css} +0 -0
- package/packages/storefront/dist/client/assets/{_...98510c96.css → fallback.9745a8aa.css} +1 -1
- package/packages/storefront/dist/client/assets/{404.530428e5.css → index.9745690c.css} +1 -1
- package/packages/storefront/dist/server/entry.mjs +370 -115
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/src/env.d.ts +1 -0
- package/packages/storefront/src/{components → lib/components}/Card.astro +0 -0
- package/packages/storefront/src/lib/components/LoginModal.vue +56 -0
- package/packages/storefront/src/{layouts → lib/layouts}/Layout.astro +8 -11
- package/packages/storefront/src/lib/layouts/meta/Head.astro +7 -0
- package/packages/storefront/src/lib/layouts/meta/Json.astro +34 -0
- package/packages/storefront/src/lib/ssr-context.ts +131 -0
- package/packages/storefront/src/lib/views/[...slug].astro +77 -0
- package/packages/storefront/src/lib/views/app/index.astro +0 -0
- package/packages/storefront/src/{pages/404.astro → lib/views/fallback.astro} +6 -1
- package/packages/storefront/src/lib/views/index.astro +87 -0
- package/packages/storefront/src/pages/[...slug].astro +12 -76
- package/packages/storefront/src/pages/fallback.astro +13 -0
- package/packages/storefront/src/pages/index.astro +15 -79
- package/packages/storefront/storefront.config.mjs +23 -6
- package/packages/storefront/tsconfig.json +4 -1
- package/packages/types/package.json +1 -1
- package/turbo.json +0 -6
- package/packages/storefront/src/types.ts +0 -18
|
@@ -2,11 +2,11 @@ import * as adapter from '@astrojs/node/server.js';
|
|
|
2
2
|
import { defineComponent, h, createSSRApp } from 'vue';
|
|
3
3
|
import { renderToString as renderToString$1 } from 'vue/server-renderer';
|
|
4
4
|
import { escape } from 'html-escaper';
|
|
5
|
-
/* empty css *//* empty css
|
|
6
|
-
import
|
|
5
|
+
/* empty css *//* empty css */import { fileURLToPath } from 'url';
|
|
6
|
+
import fs from 'fs';
|
|
7
7
|
import { resolve } from 'path';
|
|
8
8
|
import Deepmerge from '@fastify/deepmerge';
|
|
9
|
-
/* empty css
|
|
9
|
+
/* empty css *//* empty css *//* empty css */import 'mime';
|
|
10
10
|
import 'kleur/colors';
|
|
11
11
|
import 'string-width';
|
|
12
12
|
import 'path-browserify';
|
|
@@ -1430,7 +1430,7 @@ api.del = del;
|
|
|
1430
1430
|
api.delete = del;
|
|
1431
1431
|
// # sourceMappingURL=api.js.map
|
|
1432
1432
|
|
|
1433
|
-
const $$module1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1433
|
+
const $$module1$4 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1434
1434
|
__proto__: null,
|
|
1435
1435
|
default: api,
|
|
1436
1436
|
setMiddleware,
|
|
@@ -1457,19 +1457,20 @@ const _env = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PRO
|
|
|
1457
1457
|
|| globalThis;
|
|
1458
1458
|
const deepmerge = Deepmerge();
|
|
1459
1459
|
const self = globalThis.__cloudCommerce || {
|
|
1460
|
-
config: {
|
|
1461
|
-
lang: _env.ECOM_LANG || DEFAULT_LANG,
|
|
1462
|
-
currency: _env.ECOM_CURRENCY || DEFAULT_CURRENCY,
|
|
1463
|
-
currencySymbol: _env.ECOM_CURRENCY_SYMBOL || DEFAULT_CURRENCY_SYMBOL,
|
|
1464
|
-
countryCode: _env.ECOM_COUNTRY_CODE || DEFAULT_COUNTRY_CODE,
|
|
1465
|
-
storeId: Number(_env.ECOM_STORE_ID),
|
|
1466
|
-
},
|
|
1460
|
+
config: {},
|
|
1467
1461
|
};
|
|
1468
1462
|
globalThis.__cloudCommerce = self;
|
|
1469
1463
|
|
|
1470
1464
|
const config = {
|
|
1471
1465
|
get() {
|
|
1472
|
-
return
|
|
1466
|
+
return {
|
|
1467
|
+
lang: _env.ECOM_LANG || DEFAULT_LANG,
|
|
1468
|
+
currency: _env.ECOM_CURRENCY || DEFAULT_CURRENCY,
|
|
1469
|
+
currencySymbol: _env.ECOM_CURRENCY_SYMBOL || DEFAULT_CURRENCY_SYMBOL,
|
|
1470
|
+
countryCode: _env.ECOM_COUNTRY_CODE || DEFAULT_COUNTRY_CODE,
|
|
1471
|
+
storeId: Number(_env.ECOM_STORE_ID),
|
|
1472
|
+
...self.config,
|
|
1473
|
+
};
|
|
1473
1474
|
},
|
|
1474
1475
|
set(config) {
|
|
1475
1476
|
self.config = deepmerge(self.config, config);
|
|
@@ -1480,14 +1481,12 @@ const config = {
|
|
|
1480
1481
|
};
|
|
1481
1482
|
// # sourceMappingURL=config.js.map
|
|
1482
1483
|
|
|
1483
|
-
const
|
|
1484
|
+
const _getConfig = () => {
|
|
1484
1485
|
const {
|
|
1485
1486
|
STOREFRONT_BASE_DIR,
|
|
1486
1487
|
VITE_ECOM_STORE_ID,
|
|
1487
1488
|
} = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{STOREFRONT_BASE_DIR:process.env.STOREFRONT_BASE_DIR,ECOM_STORE_ID:process.env.ECOM_STORE_ID,})) || process.env;
|
|
1488
1489
|
|
|
1489
|
-
const { storeId, lang } = config.get();
|
|
1490
|
-
|
|
1491
1490
|
let baseDir;
|
|
1492
1491
|
if (STOREFRONT_BASE_DIR) {
|
|
1493
1492
|
const currentDir = fileURLToPath(new URL('.', import.meta.url));
|
|
@@ -1500,9 +1499,24 @@ const getConfig = () => {
|
|
|
1500
1499
|
config.set({ storeId: Number(VITE_ECOM_STORE_ID) });
|
|
1501
1500
|
}
|
|
1502
1501
|
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
|
|
1502
|
+
const {
|
|
1503
|
+
storeId,
|
|
1504
|
+
lang,
|
|
1505
|
+
countryCode,
|
|
1506
|
+
currency,
|
|
1507
|
+
currencySymbol,
|
|
1508
|
+
} = config.get();
|
|
1509
|
+
|
|
1510
|
+
const cms = (filename) => {
|
|
1511
|
+
if (filename.endsWith('/')) {
|
|
1512
|
+
const dirColl = resolve(dirContent, filename);
|
|
1513
|
+
return fs.readdirSync(dirColl).map((_filename) => _filename.replace('.json', ''));
|
|
1514
|
+
}
|
|
1515
|
+
const filepath = resolve(dirContent, `${filename}.json`);
|
|
1516
|
+
return JSON.parse(fs.readFileSync(filepath, 'utf8'));
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
const settings = cms('settings');
|
|
1506
1520
|
const { domain } = settings;
|
|
1507
1521
|
const primaryColor = settings.primary_color || '#20c997';
|
|
1508
1522
|
const secondaryColor = settings.secondary_color || '#343a40';
|
|
@@ -1510,52 +1524,216 @@ const getConfig = () => {
|
|
|
1510
1524
|
return {
|
|
1511
1525
|
storeId,
|
|
1512
1526
|
lang,
|
|
1527
|
+
countryCode,
|
|
1528
|
+
currency,
|
|
1529
|
+
currencySymbol,
|
|
1513
1530
|
domain,
|
|
1514
1531
|
primaryColor,
|
|
1515
1532
|
secondaryColor,
|
|
1516
1533
|
settings,
|
|
1534
|
+
cms,
|
|
1517
1535
|
};
|
|
1518
1536
|
};
|
|
1519
1537
|
|
|
1538
|
+
const getConfig = _getConfig;
|
|
1539
|
+
if (!globalThis.api_prefetch_endpoints) {
|
|
1540
|
+
globalThis.api_prefetch_endpoints = ["categories"];
|
|
1541
|
+
}
|
|
1542
|
+
const setResponseCache = (Astro, maxAge, sMaxAge) => {
|
|
1543
|
+
const headerName = Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}, { SSR: true }).PROD ? "Cache-Control" : "X-Cache-Control";
|
|
1544
|
+
let cacheControl = `public, max-age=${maxAge}`;
|
|
1545
|
+
if (sMaxAge) {
|
|
1546
|
+
cacheControl += `, s-maxage=${sMaxAge}, stale-while-revalidate=86400`;
|
|
1547
|
+
}
|
|
1548
|
+
Astro.response.headers.set(headerName, cacheControl);
|
|
1549
|
+
};
|
|
1550
|
+
const loadPageContext = async (Astro, {
|
|
1551
|
+
cmsCollection,
|
|
1552
|
+
apiPrefetchEndpoints = globalThis.api_prefetch_endpoints
|
|
1553
|
+
} = {}) => {
|
|
1554
|
+
const urlPath = Astro.url.pathname;
|
|
1555
|
+
const { slug } = Astro.params;
|
|
1556
|
+
const config = getConfig();
|
|
1557
|
+
let cmsContent;
|
|
1558
|
+
let apiResource;
|
|
1559
|
+
let apiDoc;
|
|
1560
|
+
const apiState = {};
|
|
1561
|
+
const apiOptions = {
|
|
1562
|
+
fetch,
|
|
1563
|
+
isNoAuth: true
|
|
1564
|
+
};
|
|
1565
|
+
const apiFetchings = [
|
|
1566
|
+
null,
|
|
1567
|
+
...apiPrefetchEndpoints.map((endpoint) => api.get(endpoint, apiOptions))
|
|
1568
|
+
];
|
|
1569
|
+
if (slug) {
|
|
1570
|
+
if (cmsCollection) {
|
|
1571
|
+
cmsContent = config.cms(`${cmsCollection}/${slug}`);
|
|
1572
|
+
} else {
|
|
1573
|
+
apiFetchings[0] = api.get(`slugs/${slug}`, apiOptions);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
try {
|
|
1577
|
+
const [slugResponse, ...prefetchResponses] = await Promise.all(apiFetchings);
|
|
1578
|
+
if (slugResponse) {
|
|
1579
|
+
apiResource = slugResponse.data.resource;
|
|
1580
|
+
apiDoc = slugResponse.data.doc;
|
|
1581
|
+
apiState[`${apiResource}/${apiDoc._id}`] = apiDoc;
|
|
1582
|
+
}
|
|
1583
|
+
prefetchResponses.forEach(({ config: { endpoint }, data }) => {
|
|
1584
|
+
apiState[endpoint] = data;
|
|
1585
|
+
});
|
|
1586
|
+
} catch (err) {
|
|
1587
|
+
const error = err;
|
|
1588
|
+
const status = error.statusCode || 500;
|
|
1589
|
+
if (status === 404) {
|
|
1590
|
+
if (urlPath.endsWith("/")) {
|
|
1591
|
+
err.redirectUrl = urlPath.slice(0, -1);
|
|
1592
|
+
err.astroResponse = Astro.redirect(err.redirectUrl);
|
|
1593
|
+
throw err;
|
|
1594
|
+
}
|
|
1595
|
+
setResponseCache(Astro, 120, 300);
|
|
1596
|
+
} else {
|
|
1597
|
+
console.error(error);
|
|
1598
|
+
setResponseCache(Astro, 30);
|
|
1599
|
+
Astro.response.headers.set("X-SSR-Error", error.message);
|
|
1600
|
+
}
|
|
1601
|
+
Astro.response.status = status;
|
|
1602
|
+
err.responseHTML = `<html><head>
|
|
1603
|
+
<meta http-equiv="refresh" content="0;
|
|
1604
|
+
url=/fallback?status=${status}&url=${encodeURIComponent(urlPath)}"/>
|
|
1605
|
+
</head>
|
|
1606
|
+
<body></body></html>`;
|
|
1607
|
+
throw err;
|
|
1608
|
+
}
|
|
1609
|
+
if (urlPath === "/fallback") {
|
|
1610
|
+
setResponseCache(Astro, 3600, 86400);
|
|
1611
|
+
} else {
|
|
1612
|
+
setResponseCache(Astro, 120, 600);
|
|
1613
|
+
}
|
|
1614
|
+
return {
|
|
1615
|
+
...config,
|
|
1616
|
+
cmsContent,
|
|
1617
|
+
apiResource,
|
|
1618
|
+
apiDoc,
|
|
1619
|
+
apiState
|
|
1620
|
+
};
|
|
1621
|
+
};
|
|
1622
|
+
|
|
1623
|
+
const $$module2$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1624
|
+
__proto__: null,
|
|
1625
|
+
default: loadPageContext,
|
|
1626
|
+
getConfig,
|
|
1627
|
+
loadPageContext
|
|
1628
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1629
|
+
|
|
1630
|
+
const $$metadata$a = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/meta/Head.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1631
|
+
const $$Astro$a = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/meta/Head.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1632
|
+
const $$Head = createComponent(async ($$result, $$props, $$slots) => {
|
|
1633
|
+
const Astro2 = $$result.createAstro($$Astro$a, $$props, $$slots);
|
|
1634
|
+
Astro2.self = $$Head;
|
|
1635
|
+
return renderTemplate`<meta charset="UTF-8">
|
|
1636
|
+
<meta name="viewport" content="width=device-width">
|
|
1637
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
1638
|
+
`;
|
|
1639
|
+
});
|
|
1640
|
+
|
|
1641
|
+
const $$file$a = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/meta/Head.astro";
|
|
1642
|
+
const $$url$a = undefined;
|
|
1643
|
+
|
|
1520
1644
|
const $$module2$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1521
1645
|
__proto__: null,
|
|
1522
|
-
|
|
1646
|
+
$$metadata: $$metadata$a,
|
|
1647
|
+
default: $$Head,
|
|
1648
|
+
file: $$file$a,
|
|
1649
|
+
url: $$url$a
|
|
1523
1650
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1524
1651
|
|
|
1525
1652
|
var __freeze = Object.freeze;
|
|
1526
1653
|
var __defProp = Object.defineProperty;
|
|
1527
1654
|
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
1528
1655
|
var _a;
|
|
1529
|
-
const $$metadata$
|
|
1530
|
-
const $$Astro$
|
|
1656
|
+
const $$metadata$9 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/meta/Json.astro", { modules: [{ module: $$module2$2, specifier: "../../ssr-context", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1657
|
+
const $$Astro$9 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/meta/Json.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1658
|
+
const $$Json = createComponent(async ($$result, $$props, $$slots) => {
|
|
1659
|
+
const Astro2 = $$result.createAstro($$Astro$9, $$props, $$slots);
|
|
1660
|
+
Astro2.self = $$Json;
|
|
1661
|
+
const {
|
|
1662
|
+
storeId,
|
|
1663
|
+
lang,
|
|
1664
|
+
countryCode,
|
|
1665
|
+
currency,
|
|
1666
|
+
currencySymbol,
|
|
1667
|
+
domain,
|
|
1668
|
+
settings
|
|
1669
|
+
} = getConfig();
|
|
1670
|
+
const inlineClientJS = `
|
|
1671
|
+
window._settings = ${JSON.stringify({
|
|
1672
|
+
...settings,
|
|
1673
|
+
store_id: storeId,
|
|
1674
|
+
lang,
|
|
1675
|
+
country_code: countryCode,
|
|
1676
|
+
currency,
|
|
1677
|
+
currency_symbol: currencySymbol
|
|
1678
|
+
})};`;
|
|
1679
|
+
const inlineJSONLd = JSON.stringify({
|
|
1680
|
+
"@context": "http://schema.org",
|
|
1681
|
+
"@type": "Organization",
|
|
1682
|
+
name: settings.name,
|
|
1683
|
+
url: `https://${domain}/`,
|
|
1684
|
+
logo: `https://${domain}${settings.logo}`
|
|
1685
|
+
});
|
|
1686
|
+
return renderTemplate(_a || (_a = __template(["<script>", '<\/script>\n<script type="application/ld+json">', "<\/script>\n"])), markHTMLString(inlineClientJS), markHTMLString(inlineJSONLd));
|
|
1687
|
+
});
|
|
1688
|
+
|
|
1689
|
+
const $$file$9 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/meta/Json.astro";
|
|
1690
|
+
const $$url$9 = undefined;
|
|
1691
|
+
|
|
1692
|
+
const $$module3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1693
|
+
__proto__: null,
|
|
1694
|
+
$$metadata: $$metadata$9,
|
|
1695
|
+
default: $$Json,
|
|
1696
|
+
file: $$file$9,
|
|
1697
|
+
url: $$url$9
|
|
1698
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1699
|
+
|
|
1700
|
+
const $$metadata$8 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Layout.astro", { modules: [{ module: $$module2$2, specifier: "../ssr-context", assert: {} }, { module: $$module2$1, specifier: "./meta/Head.astro", assert: {} }, { module: $$module3, specifier: "./meta/Json.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1701
|
+
const $$Astro$8 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Layout.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1531
1702
|
const $$Layout = createComponent(async ($$result, $$props, $$slots) => {
|
|
1532
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
1703
|
+
const Astro2 = $$result.createAstro($$Astro$8, $$props, $$slots);
|
|
1533
1704
|
Astro2.self = $$Layout;
|
|
1534
|
-
const { title } = Astro2.props;
|
|
1535
1705
|
const { lang } = getConfig();
|
|
1706
|
+
const { title } = Astro2.props;
|
|
1536
1707
|
const STYLES = [];
|
|
1537
1708
|
for (const STYLE of STYLES)
|
|
1538
1709
|
$$result.styles.add(STYLE);
|
|
1539
|
-
return renderTemplate(
|
|
1540
|
-
|
|
1541
|
-
|
|
1710
|
+
return renderTemplate`<html${addAttribute(lang.replace("_", "-"), "lang")} class="astro-6U5GBOCX">
|
|
1711
|
+
<head>
|
|
1712
|
+
${renderComponent($$result, "MetaHead", $$Head, { "class": "astro-6U5GBOCX" })}
|
|
1713
|
+
<title>${title}</title>
|
|
1714
|
+
${renderHead($$result)}</head>
|
|
1715
|
+
<body class="astro-6U5GBOCX">
|
|
1716
|
+
${renderSlot($$result, $$slots["default"])}
|
|
1717
|
+
${renderComponent($$result, "MetaJson", $$Json, { "class": "astro-6U5GBOCX" })}
|
|
1718
|
+
|
|
1719
|
+
</body></html>`;
|
|
1542
1720
|
});
|
|
1543
1721
|
|
|
1544
|
-
const $$file$
|
|
1545
|
-
const $$url$
|
|
1722
|
+
const $$file$8 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Layout.astro";
|
|
1723
|
+
const $$url$8 = undefined;
|
|
1546
1724
|
|
|
1547
|
-
const $$
|
|
1725
|
+
const $$module1$3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1548
1726
|
__proto__: null,
|
|
1549
|
-
$$metadata: $$metadata$
|
|
1727
|
+
$$metadata: $$metadata$8,
|
|
1550
1728
|
default: $$Layout,
|
|
1551
|
-
file: $$file$
|
|
1552
|
-
url: $$url$
|
|
1729
|
+
file: $$file$8,
|
|
1730
|
+
url: $$url$8
|
|
1553
1731
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1554
1732
|
|
|
1555
|
-
const $$metadata$
|
|
1556
|
-
const $$Astro$
|
|
1733
|
+
const $$metadata$7 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Card.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1734
|
+
const $$Astro$7 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Card.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1557
1735
|
const $$Card = createComponent(async ($$result, $$props, $$slots) => {
|
|
1558
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
1736
|
+
const Astro2 = $$result.createAstro($$Astro$7, $$props, $$slots);
|
|
1559
1737
|
Astro2.self = $$Card;
|
|
1560
1738
|
const { href, title, body } = Astro2.props;
|
|
1561
1739
|
const STYLES = [];
|
|
@@ -1575,41 +1753,41 @@ const $$Card = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1575
1753
|
`;
|
|
1576
1754
|
});
|
|
1577
1755
|
|
|
1578
|
-
const $$file$
|
|
1579
|
-
const $$url$
|
|
1756
|
+
const $$file$7 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/Card.astro";
|
|
1757
|
+
const $$url$7 = undefined;
|
|
1580
1758
|
|
|
1581
1759
|
const $$module2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1582
1760
|
__proto__: null,
|
|
1583
|
-
$$metadata: $$metadata$
|
|
1761
|
+
$$metadata: $$metadata$7,
|
|
1584
1762
|
default: $$Card,
|
|
1585
|
-
file: $$file$
|
|
1586
|
-
url: $$url$
|
|
1763
|
+
file: $$file$7,
|
|
1764
|
+
url: $$url$7
|
|
1587
1765
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1588
1766
|
|
|
1589
|
-
const $$metadata$
|
|
1590
|
-
const $$Astro$
|
|
1591
|
-
const $$Index$
|
|
1592
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
1593
|
-
Astro2.self = $$Index$
|
|
1767
|
+
const $$metadata$6 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/index.astro", { modules: [{ module: $$module1$4, specifier: "@cloudcommerce/api", assert: {} }, { module: $$module1$3, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1768
|
+
const $$Astro$6 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/index.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1769
|
+
const $$Index$2 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1770
|
+
const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
|
|
1771
|
+
Astro2.self = $$Index$2;
|
|
1594
1772
|
const products = (await api.get("products")).data.result;
|
|
1595
1773
|
const STYLES = [];
|
|
1596
1774
|
for (const STYLE of STYLES)
|
|
1597
1775
|
$$result.styles.add(STYLE);
|
|
1598
|
-
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-
|
|
1599
|
-
<h1 class="astro-
|
|
1600
|
-
<p class="instructions astro-
|
|
1601
|
-
Check out the <code class="astro-
|
|
1602
|
-
<strong class="astro-
|
|
1776
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-FWWSR4V6" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-FWWSR4V6">
|
|
1777
|
+
<h1 class="astro-FWWSR4V6">Welcome to <span class="text-gradient astro-FWWSR4V6">Astro</span></h1>
|
|
1778
|
+
<p class="instructions astro-FWWSR4V6">
|
|
1779
|
+
Check out the <code class="astro-FWWSR4V6">src/pages</code> directory to get started.<br class="astro-FWWSR4V6">
|
|
1780
|
+
<strong class="astro-FWWSR4V6">Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
1603
1781
|
</p>
|
|
1604
|
-
<ul role="list" class="link-card-grid astro-
|
|
1605
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-
|
|
1606
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-
|
|
1607
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-
|
|
1608
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-
|
|
1782
|
+
<ul role="list" class="link-card-grid astro-FWWSR4V6">
|
|
1783
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-FWWSR4V6" })}
|
|
1784
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-FWWSR4V6" })}
|
|
1785
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-FWWSR4V6" })}
|
|
1786
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-FWWSR4V6" })}
|
|
1609
1787
|
</ul>
|
|
1610
|
-
<ul role="list" class="mt-3 fs-20 astro-
|
|
1611
|
-
${products.map((product) => renderTemplate`<li class="astro-
|
|
1612
|
-
<a${addAttribute(`/${product.slug}`, "href")} class="astro-
|
|
1788
|
+
<ul role="list" class="mt-3 fs-20 astro-FWWSR4V6">
|
|
1789
|
+
${products.map((product) => renderTemplate`<li class="astro-FWWSR4V6">
|
|
1790
|
+
<a${addAttribute(`/${product.slug}`, "href")} class="astro-FWWSR4V6">${product.sku}</a>
|
|
1613
1791
|
</li>`)}
|
|
1614
1792
|
</ul>
|
|
1615
1793
|
</main>` })}
|
|
@@ -1617,101 +1795,178 @@ const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1617
1795
|
`;
|
|
1618
1796
|
});
|
|
1619
1797
|
|
|
1620
|
-
const $$file$
|
|
1621
|
-
const $$url$
|
|
1798
|
+
const $$file$6 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/index.astro";
|
|
1799
|
+
const $$url$6 = undefined;
|
|
1800
|
+
|
|
1801
|
+
const $$module1$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1802
|
+
__proto__: null,
|
|
1803
|
+
$$metadata: $$metadata$6,
|
|
1804
|
+
default: $$Index$2,
|
|
1805
|
+
file: $$file$6,
|
|
1806
|
+
url: $$url$6
|
|
1807
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1808
|
+
|
|
1809
|
+
const $$metadata$5 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", { modules: [{ module: $$module1$2, specifier: "../lib/views/index.astro", assert: {} }, { module: $$module2$2, specifier: "../lib/ssr-context", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1810
|
+
const $$Astro$5 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1811
|
+
const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1812
|
+
const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
|
|
1813
|
+
Astro2.self = $$Index$1;
|
|
1814
|
+
let pageContext;
|
|
1815
|
+
let loadError;
|
|
1816
|
+
try {
|
|
1817
|
+
pageContext = await loadPageContext(Astro2);
|
|
1818
|
+
} catch (err) {
|
|
1819
|
+
if (err.astroResponse) {
|
|
1820
|
+
return err.astroResponse;
|
|
1821
|
+
}
|
|
1822
|
+
loadError = err;
|
|
1823
|
+
}
|
|
1824
|
+
return renderTemplate`${pageContext && renderTemplate`${renderComponent($$result, "ViewHome", $$Index$2, { "pageContext": pageContext })}`}
|
|
1825
|
+
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": () => renderTemplate`${markHTMLString(loadError.responseHTML)}` })}`}`;
|
|
1826
|
+
});
|
|
1827
|
+
|
|
1828
|
+
const $$file$5 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro";
|
|
1829
|
+
const $$url$5 = "";
|
|
1622
1830
|
|
|
1623
1831
|
const _page0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1624
1832
|
__proto__: null,
|
|
1625
|
-
$$metadata: $$metadata$
|
|
1833
|
+
$$metadata: $$metadata$5,
|
|
1626
1834
|
default: $$Index$1,
|
|
1627
|
-
file: $$file$
|
|
1628
|
-
url: $$url$
|
|
1835
|
+
file: $$file$5,
|
|
1836
|
+
url: $$url$5
|
|
1629
1837
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1630
1838
|
|
|
1631
|
-
const $$metadata$
|
|
1632
|
-
const $$Astro$
|
|
1633
|
-
const $$
|
|
1634
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
1635
|
-
Astro2.self = $$
|
|
1839
|
+
const $$metadata$4 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/fallback.astro", { modules: [{ module: $$module1$3, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1840
|
+
const $$Astro$4 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/fallback.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1841
|
+
const $$Fallback$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1842
|
+
const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
|
|
1843
|
+
Astro2.self = $$Fallback$1;
|
|
1636
1844
|
const STYLES = [];
|
|
1637
1845
|
for (const STYLE of STYLES)
|
|
1638
1846
|
$$result.styles.add(STYLE);
|
|
1639
|
-
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-
|
|
1640
|
-
<h1 class="astro-
|
|
1641
|
-
<p class="instructions astro-
|
|
1642
|
-
Check out the <code class="astro-
|
|
1643
|
-
<strong class="astro-
|
|
1847
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-HIITKN5F" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-HIITKN5F">
|
|
1848
|
+
<h1 class="astro-HIITKN5F">Error :/</h1>
|
|
1849
|
+
<p class="instructions astro-HIITKN5F">
|
|
1850
|
+
Check out the <code class="astro-HIITKN5F">src/pages</code> directory to get started.<br class="astro-HIITKN5F">
|
|
1851
|
+
<strong class="astro-HIITKN5F">Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
1644
1852
|
</p>
|
|
1645
|
-
<ul role="list" class="link-card-grid astro-
|
|
1646
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-
|
|
1647
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-
|
|
1648
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-
|
|
1649
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-
|
|
1853
|
+
<ul role="list" class="link-card-grid astro-HIITKN5F">
|
|
1854
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-HIITKN5F" })}
|
|
1855
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-HIITKN5F" })}
|
|
1856
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-HIITKN5F" })}
|
|
1857
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-HIITKN5F" })}
|
|
1650
1858
|
</ul>
|
|
1651
1859
|
</main>` })}
|
|
1652
1860
|
|
|
1653
1861
|
`;
|
|
1654
1862
|
});
|
|
1655
1863
|
|
|
1656
|
-
const $$file$
|
|
1657
|
-
const $$url$
|
|
1864
|
+
const $$file$4 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/fallback.astro";
|
|
1865
|
+
const $$url$4 = undefined;
|
|
1866
|
+
|
|
1867
|
+
const $$module1$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1868
|
+
__proto__: null,
|
|
1869
|
+
$$metadata: $$metadata$4,
|
|
1870
|
+
default: $$Fallback$1,
|
|
1871
|
+
file: $$file$4,
|
|
1872
|
+
url: $$url$4
|
|
1873
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1874
|
+
|
|
1875
|
+
const $$metadata$3 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro", { modules: [{ module: $$module1$1, specifier: "../lib/views/fallback.astro", assert: {} }, { module: $$module2$2, specifier: "../lib/ssr-context", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1876
|
+
const $$Astro$3 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1877
|
+
const $$Fallback = createComponent(async ($$result, $$props, $$slots) => {
|
|
1878
|
+
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
1879
|
+
Astro2.self = $$Fallback;
|
|
1880
|
+
let pageContext;
|
|
1881
|
+
try {
|
|
1882
|
+
pageContext = await loadPageContext(Astro2);
|
|
1883
|
+
} catch (err) {
|
|
1884
|
+
return err.astroResponse;
|
|
1885
|
+
}
|
|
1886
|
+
return renderTemplate`${renderComponent($$result, "ViewFallback", $$Fallback$1, { "pageContext": pageContext })}`;
|
|
1887
|
+
});
|
|
1888
|
+
|
|
1889
|
+
const $$file$3 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro";
|
|
1890
|
+
const $$url$3 = "/fallback";
|
|
1658
1891
|
|
|
1659
1892
|
const _page1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1660
1893
|
__proto__: null,
|
|
1661
|
-
$$metadata: $$metadata$
|
|
1662
|
-
default: $$
|
|
1663
|
-
file: $$file$
|
|
1664
|
-
url: $$url$
|
|
1894
|
+
$$metadata: $$metadata$3,
|
|
1895
|
+
default: $$Fallback,
|
|
1896
|
+
file: $$file$3,
|
|
1897
|
+
url: $$url$3
|
|
1665
1898
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1666
1899
|
|
|
1667
|
-
const $$metadata$
|
|
1668
|
-
const $$Astro$
|
|
1900
|
+
const $$metadata$2 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1901
|
+
const $$Astro$2 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1669
1902
|
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
|
|
1670
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
1903
|
+
const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
|
|
1671
1904
|
Astro2.self = $$Index;
|
|
1672
1905
|
return renderTemplate``;
|
|
1673
1906
|
});
|
|
1674
1907
|
|
|
1675
|
-
const $$file$
|
|
1676
|
-
const $$url$
|
|
1908
|
+
const $$file$2 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro";
|
|
1909
|
+
const $$url$2 = "/app";
|
|
1677
1910
|
|
|
1678
1911
|
const _page2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1679
1912
|
__proto__: null,
|
|
1680
|
-
$$metadata: $$metadata$
|
|
1913
|
+
$$metadata: $$metadata$2,
|
|
1681
1914
|
default: $$Index,
|
|
1915
|
+
file: $$file$2,
|
|
1916
|
+
url: $$url$2
|
|
1917
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1918
|
+
|
|
1919
|
+
const $$metadata$1 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/[...slug].astro", { modules: [{ module: $$module1$3, specifier: "../layouts/Layout.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1920
|
+
const $$Astro$1 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/[...slug].astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1921
|
+
const $$$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1922
|
+
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
1923
|
+
Astro2.self = $$$1;
|
|
1924
|
+
const { pageContext } = Astro2.props;
|
|
1925
|
+
const { apiResource, apiDoc } = pageContext;
|
|
1926
|
+
const STYLES = [];
|
|
1927
|
+
for (const STYLE of STYLES)
|
|
1928
|
+
$$result.styles.add(STYLE);
|
|
1929
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": apiDoc.name, "class": "astro-JWBYURAL" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-JWBYURAL">
|
|
1930
|
+
<h1 class="astro-JWBYURAL">Hello <span class="text-gradient astro-JWBYURAL">${apiDoc.name}</span></h1>
|
|
1931
|
+
<hr class="astro-JWBYURAL">
|
|
1932
|
+
<div class="mt-3 astro-JWBYURAL">
|
|
1933
|
+
<mark class="astro-JWBYURAL">${apiDoc._id}</mark> from <i class="astro-JWBYURAL">${apiResource}</i>
|
|
1934
|
+
<p class="astro-JWBYURAL">${Math.random()}</p>
|
|
1935
|
+
<em class="astro-JWBYURAL">Lorem ipsum dolor sit amet</em>
|
|
1936
|
+
</div>
|
|
1937
|
+
</main>` })}
|
|
1938
|
+
|
|
1939
|
+
`;
|
|
1940
|
+
});
|
|
1941
|
+
|
|
1942
|
+
const $$file$1 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/views/[...slug].astro";
|
|
1943
|
+
const $$url$1 = undefined;
|
|
1944
|
+
|
|
1945
|
+
const $$module1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1946
|
+
__proto__: null,
|
|
1947
|
+
$$metadata: $$metadata$1,
|
|
1948
|
+
default: $$$1,
|
|
1682
1949
|
file: $$file$1,
|
|
1683
1950
|
url: $$url$1
|
|
1684
1951
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1685
1952
|
|
|
1686
|
-
const $$metadata = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", { modules: [{ module: $$module1, specifier: "
|
|
1953
|
+
const $$metadata = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", { modules: [{ module: $$module1, specifier: "../lib/views/[...slug].astro", assert: {} }, { module: $$module2$2, specifier: "../lib/ssr-context", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1687
1954
|
const $$Astro = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1688
1955
|
const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
1689
1956
|
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
1690
1957
|
Astro2.self = $$;
|
|
1691
|
-
|
|
1692
|
-
let
|
|
1693
|
-
let doc;
|
|
1958
|
+
let pageContext;
|
|
1959
|
+
let loadError;
|
|
1694
1960
|
try {
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1961
|
+
pageContext = await loadPageContext(Astro2);
|
|
1962
|
+
} catch (err) {
|
|
1963
|
+
if (err.astroResponse) {
|
|
1964
|
+
return err.astroResponse;
|
|
1965
|
+
}
|
|
1966
|
+
loadError = err;
|
|
1700
1967
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
$$result.styles.add(STYLE);
|
|
1704
|
-
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": doc.name, "class": "astro-WWHJ5KDF" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-WWHJ5KDF">
|
|
1705
|
-
<h1 class="astro-WWHJ5KDF">Hello <span class="text-gradient astro-WWHJ5KDF">${doc.name}</span></h1>
|
|
1706
|
-
<hr class="astro-WWHJ5KDF">
|
|
1707
|
-
<div class="mt-3 astro-WWHJ5KDF">
|
|
1708
|
-
<mark class="astro-WWHJ5KDF">${doc._id}</mark> from <i class="astro-WWHJ5KDF">${resource}</i>
|
|
1709
|
-
<p class="astro-WWHJ5KDF">${Math.random()}</p>
|
|
1710
|
-
<em class="astro-WWHJ5KDF">Lorem ipsum dolor sit amet</em>
|
|
1711
|
-
</div>
|
|
1712
|
-
</main>` })}
|
|
1713
|
-
|
|
1714
|
-
`;
|
|
1968
|
+
return renderTemplate`${pageContext && renderTemplate`${renderComponent($$result, "ViewWildcard", $$$1, { "pageContext": pageContext })}`}
|
|
1969
|
+
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": () => renderTemplate`${markHTMLString(loadError.responseHTML)}` })}`}`;
|
|
1715
1970
|
});
|
|
1716
1971
|
|
|
1717
1972
|
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro";
|
|
@@ -1725,7 +1980,7 @@ const _page3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1725
1980
|
url: $$url
|
|
1726
1981
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1727
1982
|
|
|
1728
|
-
const pageMap = new Map([['src/pages/index.astro', _page0],['src/pages/
|
|
1983
|
+
const pageMap = new Map([['src/pages/index.astro', _page0],['src/pages/fallback.astro', _page1],['src/pages/app/index.astro', _page2],['src/pages/[...slug].astro', _page3],]);
|
|
1729
1984
|
const renderers = [Object.assign({"name":"astro:jsx","serverEntrypoint":"astro/jsx/server.js","jsxImportSource":"astro"}, { ssr: server_default }),Object.assign({"name":"@astrojs/vue","clientEntrypoint":"@astrojs/vue/client.js","serverEntrypoint":"@astrojs/vue/server.js"}, { ssr: _renderer1 }),];
|
|
1730
1985
|
|
|
1731
1986
|
if (typeof process !== "undefined") {
|
|
@@ -1797,7 +2052,7 @@ function deserializeManifest(serializedManifest) {
|
|
|
1797
2052
|
};
|
|
1798
2053
|
}
|
|
1799
2054
|
|
|
1800
|
-
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":["assets/
|
|
2055
|
+
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":["assets/_...d4aa8aff.css","assets/fallback-index.d9230d24.css","assets/index.9745690c.css"],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...d4aa8aff.css","assets/fallback-index.d9230d24.css","assets/fallback.9745a8aa.css"],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...d4aa8aff.css","assets/_...c08e0a75.css"],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://storefront-demo.e-com.plus/","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"extendDefaultPlugins":false,"isAstroFlavoredMd":false},"pageMap":null,"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","@astrojs/vue/client.js":"client.6d48c590.js","astro:scripts/page.js":"page.3aa82516.js","astro:scripts/before-hydration.js":"data:text/javascript;charset=utf-8,//[no before-hydration script]"},"assets":["/assets/_...c08e0a75.css","/assets/_...d4aa8aff.css","/assets/fallback.9745a8aa.css","/assets/fallback-index.d9230d24.css","/assets/index.9745690c.css","/client.6d48c590.js","/favicon.ico","/page.3aa82516.js","/page.3aa82516.js","/~partytown/partytown-atomics.js","/~partytown/partytown-media.js","/~partytown/partytown-sw.js","/~partytown/partytown.js"]}), {
|
|
1801
2056
|
pageMap: pageMap,
|
|
1802
2057
|
renderers: renderers
|
|
1803
2058
|
});
|