cloudcommerce 0.0.68 → 0.0.71
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 +16 -0
- package/package.json +1 -1
- 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/tiny-erp/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/astro.config.mjs +5 -0
- 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/{_...fae19676.css → _...98510c96.css} +1 -1
- package/packages/storefront/dist/server/entry.mjs +110 -107
- package/packages/storefront/example.env +1 -1
- package/packages/storefront/package.json +5 -2
- package/packages/storefront/src/layouts/Layout.astro +7 -0
- package/packages/storefront/src/pages/[...slug].astro +1 -1
- package/packages/storefront/src/types.ts +18 -0
- package/packages/storefront/storefront.config.mjs +41 -0
- package/packages/types/package.json +1 -1
- package/packages/storefront/src/storefront-config.ts +0 -39
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "@ecomplus/widget-gmc-ratings",
|
|
3
|
+
"active": false,
|
|
4
|
+
"desktopOnly": false,
|
|
5
|
+
"enableCheckout": true,
|
|
6
|
+
"disablePages": true,
|
|
7
|
+
"options": {
|
|
8
|
+
"badgePosition": "BOTTOM_LEFT",
|
|
9
|
+
"dialogPosition": "CENTER_DIALOG"
|
|
10
|
+
},
|
|
11
|
+
"stampsAppend": "src/append/stamps"
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "@ecomplus/widget-offers-notification",
|
|
3
|
+
"active": true,
|
|
4
|
+
"desktopOnly": false,
|
|
5
|
+
"options": {
|
|
6
|
+
"enableOutOfStock": true,
|
|
7
|
+
"enablePriceChange": true,
|
|
8
|
+
"popupOptions": "location=yes,height=400,width=320,status=yes"
|
|
9
|
+
},
|
|
10
|
+
"productSlots": "src/append/product-slots"
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "@ecomplus/widget-opinioes-verificadas",
|
|
3
|
+
"active": false,
|
|
4
|
+
"desktopOnly": false,
|
|
5
|
+
"enableCheckout": false,
|
|
6
|
+
"disablePages": true,
|
|
7
|
+
"options": {
|
|
8
|
+
"stamp": "",
|
|
9
|
+
"tagJs": ""
|
|
10
|
+
},
|
|
11
|
+
"headAppend": "src/append/head",
|
|
12
|
+
"bodyAppend": "src/append/body",
|
|
13
|
+
"productCardSlots": "src/append/product-card-slots",
|
|
14
|
+
"productSlots": "src/append/product-slots",
|
|
15
|
+
"productDescriptionAppend": "src/append/product-block",
|
|
16
|
+
"stampsAppend": "src/append/stamps",
|
|
17
|
+
"useJquery": true
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "@ecomplus/widget-product",
|
|
3
|
+
"active": true,
|
|
4
|
+
"desktopOnly": false,
|
|
5
|
+
"options": {
|
|
6
|
+
"buyText": "",
|
|
7
|
+
"buy": "",
|
|
8
|
+
"strHasQuantitySelector": "_",
|
|
9
|
+
"strHasPromotionTimer": "_",
|
|
10
|
+
"lowQuantityToWarn": 12,
|
|
11
|
+
"maxVariationOptionsBtns": 6
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "@ecomplus/widget-tag-manager",
|
|
3
|
+
"active": false,
|
|
4
|
+
"desktopOnly": false,
|
|
5
|
+
"enableCheckout": true,
|
|
6
|
+
"options": {
|
|
7
|
+
"gtmContainerId": "",
|
|
8
|
+
"dataLayerVar": "dataLayer"
|
|
9
|
+
},
|
|
10
|
+
"headAppend": "src/append/head",
|
|
11
|
+
"bodyAppend": "src/append/body"
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pkg": "@ecomplus/widget-trustvox",
|
|
3
|
+
"active": false,
|
|
4
|
+
"desktopOnly": false,
|
|
5
|
+
"enableCheckout": false,
|
|
6
|
+
"disablePages": true,
|
|
7
|
+
"options": {
|
|
8
|
+
"trustvoxStoreId": ""
|
|
9
|
+
},
|
|
10
|
+
"bodyAppend": "src/append/body",
|
|
11
|
+
"productDescriptionAppend": "src/append/product-block",
|
|
12
|
+
"productCardSlots": "src/append/product-card-slots",
|
|
13
|
+
"productSlots": "src/append/product-slots",
|
|
14
|
+
"stampsAppend": "src/append/stamps"
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-
|
|
1
|
+
:root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-WWHJ5KDF){margin:2rem 0}main:where(.astro-WWHJ5KDF){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-WWHJ5KDF){font-weight:900;background-image:var(--astro-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:100% 200%;background-position-y:100%;border-radius:.4rem;animation:pulse 4s ease-in-out infinite}@keyframes pulse{0%,to{background-position-y:0%}50%{background-position-y:80%}}.instructions:where(.astro-WWHJ5KDF){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-WWHJ5KDF) code:where(.astro-WWHJ5KDF){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-WWHJ5KDF){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
|
|
@@ -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
|
|
5
|
+
/* empty css *//* empty css */import { fileURLToPath } from 'url';
|
|
6
6
|
import { readFileSync } from 'fs';
|
|
7
7
|
import { resolve } from 'path';
|
|
8
8
|
import Deepmerge from '@fastify/deepmerge';
|
|
9
|
-
import 'mime';
|
|
9
|
+
/* empty css *//* empty css *//* empty css */import 'mime';
|
|
10
10
|
import 'kleur/colors';
|
|
11
11
|
import 'string-width';
|
|
12
12
|
import 'path-browserify';
|
|
@@ -1267,7 +1267,7 @@ var server_default = {
|
|
|
1267
1267
|
};
|
|
1268
1268
|
|
|
1269
1269
|
// @ts-ignore
|
|
1270
|
-
const _env$1 = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{LANG:process.env.LANG,ECOM_STORE_ID:
|
|
1270
|
+
const _env$1 = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{LANG:process.env.LANG,ECOM_STORE_ID:process.env.ECOM_STORE_ID,BASE_URL:'/',}))
|
|
1271
1271
|
|| (typeof process === 'object' && process?.env)
|
|
1272
1272
|
|| globalThis;
|
|
1273
1273
|
class ApiError extends Error {
|
|
@@ -1442,26 +1442,103 @@ const $$module1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
1442
1442
|
ApiError
|
|
1443
1443
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1444
1444
|
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1445
|
+
const DEFAULT_LANG = 'pt_br';
|
|
1446
|
+
|
|
1447
|
+
const DEFAULT_CURRENCY = 'BRL';
|
|
1448
|
+
|
|
1449
|
+
const DEFAULT_CURRENCY_SYMBOL = 'R$';
|
|
1450
|
+
|
|
1451
|
+
const DEFAULT_COUNTRY_CODE = 'BR';
|
|
1452
|
+
// # sourceMappingURL=defaults.js.map
|
|
1453
|
+
|
|
1454
|
+
// @ts-ignore
|
|
1455
|
+
const _env = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{LANG:process.env.LANG,ECOM_STORE_ID:process.env.ECOM_STORE_ID,}))
|
|
1456
|
+
|| (typeof process === 'object' && process?.env)
|
|
1457
|
+
|| globalThis;
|
|
1458
|
+
const deepmerge = Deepmerge();
|
|
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
|
+
},
|
|
1467
|
+
};
|
|
1468
|
+
globalThis.__cloudCommerce = self;
|
|
1469
|
+
|
|
1470
|
+
const config = {
|
|
1471
|
+
get() {
|
|
1472
|
+
return self.config;
|
|
1473
|
+
},
|
|
1474
|
+
set(config) {
|
|
1475
|
+
self.config = deepmerge(self.config, config);
|
|
1476
|
+
if (config.storeId) {
|
|
1477
|
+
_env.ECOM_STORE_ID = config.storeId;
|
|
1478
|
+
}
|
|
1479
|
+
},
|
|
1480
|
+
};
|
|
1481
|
+
// # sourceMappingURL=config.js.map
|
|
1482
|
+
|
|
1483
|
+
const getConfig = () => {
|
|
1484
|
+
const {
|
|
1485
|
+
STOREFRONT_BASE_DIR,
|
|
1486
|
+
VITE_ECOM_STORE_ID,
|
|
1487
|
+
} = (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
|
+
const { storeId, lang } = config.get();
|
|
1490
|
+
|
|
1491
|
+
let baseDir;
|
|
1492
|
+
if (STOREFRONT_BASE_DIR) {
|
|
1493
|
+
const currentDir = fileURLToPath(new URL('.', import.meta.url));
|
|
1494
|
+
baseDir = resolve(currentDir, STOREFRONT_BASE_DIR);
|
|
1495
|
+
} else {
|
|
1496
|
+
baseDir = process.cwd();
|
|
1497
|
+
}
|
|
1498
|
+
const dirContent = resolve(baseDir, 'content');
|
|
1499
|
+
if (VITE_ECOM_STORE_ID) {
|
|
1500
|
+
config.set({ storeId: Number(VITE_ECOM_STORE_ID) });
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
const settings = JSON.parse(
|
|
1504
|
+
readFileSync(resolve(dirContent, 'settings.json'), 'utf8'),
|
|
1505
|
+
);
|
|
1506
|
+
const { domain } = settings;
|
|
1507
|
+
const primaryColor = settings.primary_color || '#20c997';
|
|
1508
|
+
const secondaryColor = settings.secondary_color || '#343a40';
|
|
1509
|
+
|
|
1510
|
+
return {
|
|
1511
|
+
storeId,
|
|
1512
|
+
lang,
|
|
1513
|
+
domain,
|
|
1514
|
+
primaryColor,
|
|
1515
|
+
secondaryColor,
|
|
1516
|
+
settings,
|
|
1517
|
+
};
|
|
1518
|
+
};
|
|
1519
|
+
|
|
1520
|
+
const $$module2$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1521
|
+
__proto__: null,
|
|
1522
|
+
default: getConfig
|
|
1523
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1524
|
+
|
|
1525
|
+
var __freeze = Object.freeze;
|
|
1526
|
+
var __defProp = Object.defineProperty;
|
|
1527
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
1528
|
+
var _a;
|
|
1529
|
+
const $$metadata$5 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro", { modules: [{ module: $$module2$1, specifier: "../../storefront.config.mjs", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1530
|
+
const $$Astro$5 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1447
1531
|
const $$Layout = createComponent(async ($$result, $$props, $$slots) => {
|
|
1448
1532
|
const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
|
|
1449
1533
|
Astro2.self = $$Layout;
|
|
1450
1534
|
const { title } = Astro2.props;
|
|
1535
|
+
const { lang } = getConfig();
|
|
1451
1536
|
const STYLES = [];
|
|
1452
1537
|
for (const STYLE of STYLES)
|
|
1453
1538
|
$$result.styles.add(STYLE);
|
|
1454
|
-
return renderTemplate
|
|
1455
|
-
<
|
|
1456
|
-
<
|
|
1457
|
-
<meta name="viewport" content="width=device-width">
|
|
1458
|
-
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
1459
|
-
<title>${title}</title>
|
|
1460
|
-
${renderHead($$result)}</head>
|
|
1461
|
-
<body class="astro-ZMK4NUBX">
|
|
1462
|
-
${renderSlot($$result, $$slots["default"])}
|
|
1463
|
-
|
|
1464
|
-
</body></html>`;
|
|
1539
|
+
return renderTemplate(_a || (_a = __template(['<html lang="en" class="astro-DEZ7DR5X">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width">\n <link rel="icon" type="image/x-icon" href="/favicon.ico">\n <title>', `</title>
|
|
1540
|
+
<link rel="stylesheet" media="print" onload="this.media='all'" href="https://www.gstatic.com/firebasejs/ui/6.0.1/firebase-ui-auth.css">
|
|
1541
|
+
`, '</head>\n<body class="astro-DEZ7DR5X">\n ', '\n <script async type="text/partytown"', "><\/script>\n</body>\n</html>\n\n"])), title, renderHead($$result), renderSlot($$result, $$slots["default"]), addAttribute(`https://www.gstatic.com/firebasejs/ui/6.0.1/firebase-ui-auth__${lang}.js`, "src"));
|
|
1465
1542
|
});
|
|
1466
1543
|
|
|
1467
1544
|
const $$file$5 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro";
|
|
@@ -1476,7 +1553,7 @@ const $$module3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
1476
1553
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1477
1554
|
|
|
1478
1555
|
const $$metadata$4 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1479
|
-
const $$Astro$4 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1556
|
+
const $$Astro$4 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1480
1557
|
const $$Card = createComponent(async ($$result, $$props, $$slots) => {
|
|
1481
1558
|
const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
|
|
1482
1559
|
Astro2.self = $$Card;
|
|
@@ -1501,7 +1578,7 @@ const $$Card = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1501
1578
|
const $$file$4 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro";
|
|
1502
1579
|
const $$url$4 = undefined;
|
|
1503
1580
|
|
|
1504
|
-
const $$module2
|
|
1581
|
+
const $$module2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1505
1582
|
__proto__: null,
|
|
1506
1583
|
$$metadata: $$metadata$4,
|
|
1507
1584
|
default: $$Card,
|
|
@@ -1509,8 +1586,8 @@ const $$module2$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePropert
|
|
|
1509
1586
|
url: $$url$4
|
|
1510
1587
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1511
1588
|
|
|
1512
|
-
const $$metadata$3 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", { modules: [{ module: $$module1, specifier: "@cloudcommerce/api", assert: {} }, { module: $$module3, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2
|
|
1513
|
-
const $$Astro$3 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1589
|
+
const $$metadata$3 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", { modules: [{ module: $$module1, specifier: "@cloudcommerce/api", assert: {} }, { module: $$module3, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1590
|
+
const $$Astro$3 = 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/");
|
|
1514
1591
|
const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1515
1592
|
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
1516
1593
|
Astro2.self = $$Index$1;
|
|
@@ -1551,8 +1628,8 @@ const _page0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1551
1628
|
url: $$url$3
|
|
1552
1629
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1553
1630
|
|
|
1554
|
-
const $$metadata$2 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/404.astro", { modules: [{ module: $$module3, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2
|
|
1555
|
-
const $$Astro$2 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/404.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1631
|
+
const $$metadata$2 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/404.astro", { modules: [{ module: $$module3, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1632
|
+
const $$Astro$2 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/404.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1556
1633
|
const $$404 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1557
1634
|
const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
|
|
1558
1635
|
Astro2.self = $$404;
|
|
@@ -1588,7 +1665,7 @@ const _page1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1588
1665
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1589
1666
|
|
|
1590
1667
|
const $$metadata$1 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1591
|
-
const $$Astro$1 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1668
|
+
const $$Astro$1 = 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/");
|
|
1592
1669
|
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
|
|
1593
1670
|
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
1594
1671
|
Astro2.self = $$Index;
|
|
@@ -1606,82 +1683,8 @@ const _page2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1606
1683
|
url: $$url$1
|
|
1607
1684
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1608
1685
|
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1611
|
-
const DEFAULT_CURRENCY = 'BRL';
|
|
1612
|
-
|
|
1613
|
-
const DEFAULT_CURRENCY_SYMBOL = 'R$';
|
|
1614
|
-
|
|
1615
|
-
const DEFAULT_COUNTRY_CODE = 'BR';
|
|
1616
|
-
// # sourceMappingURL=defaults.js.map
|
|
1617
|
-
|
|
1618
|
-
// @ts-ignore
|
|
1619
|
-
const _env = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{LANG:process.env.LANG,ECOM_STORE_ID:"1011",}))
|
|
1620
|
-
|| (typeof process === 'object' && process?.env)
|
|
1621
|
-
|| globalThis;
|
|
1622
|
-
const deepmerge = Deepmerge();
|
|
1623
|
-
const self = globalThis.__cloudCommerce || {
|
|
1624
|
-
config: {
|
|
1625
|
-
lang: _env.ECOM_LANG || DEFAULT_LANG,
|
|
1626
|
-
currency: _env.ECOM_CURRENCY || DEFAULT_CURRENCY,
|
|
1627
|
-
currencySymbol: _env.ECOM_CURRENCY_SYMBOL || DEFAULT_CURRENCY_SYMBOL,
|
|
1628
|
-
countryCode: _env.ECOM_COUNTRY_CODE || DEFAULT_COUNTRY_CODE,
|
|
1629
|
-
storeId: Number(_env.ECOM_STORE_ID),
|
|
1630
|
-
},
|
|
1631
|
-
};
|
|
1632
|
-
globalThis.__cloudCommerce = self;
|
|
1633
|
-
|
|
1634
|
-
const config = {
|
|
1635
|
-
get() {
|
|
1636
|
-
return self.config;
|
|
1637
|
-
},
|
|
1638
|
-
set(config) {
|
|
1639
|
-
self.config = deepmerge(self.config, config);
|
|
1640
|
-
if (config.storeId) {
|
|
1641
|
-
_env.ECOM_STORE_ID = config.storeId;
|
|
1642
|
-
}
|
|
1643
|
-
},
|
|
1644
|
-
};
|
|
1645
|
-
// # sourceMappingURL=config.js.map
|
|
1646
|
-
|
|
1647
|
-
const {
|
|
1648
|
-
STOREFRONT_BASE_DIR,
|
|
1649
|
-
VITE_ECOM_STORE_ID
|
|
1650
|
-
} = Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}, { STOREFRONT_BASE_DIR: "../../../store/functions/ssr/", ECOM_STORE_ID: "1011" });
|
|
1651
|
-
let baseDir;
|
|
1652
|
-
if (STOREFRONT_BASE_DIR) {
|
|
1653
|
-
const currentDir = fileURLToPath(new URL(".", import.meta.url));
|
|
1654
|
-
baseDir = resolve(currentDir, STOREFRONT_BASE_DIR);
|
|
1655
|
-
} else {
|
|
1656
|
-
baseDir = process.cwd();
|
|
1657
|
-
}
|
|
1658
|
-
const dirContent = resolve(baseDir, "content");
|
|
1659
|
-
if (VITE_ECOM_STORE_ID) {
|
|
1660
|
-
config.set({ storeId: Number(VITE_ECOM_STORE_ID) });
|
|
1661
|
-
}
|
|
1662
|
-
const settings = JSON.parse(
|
|
1663
|
-
readFileSync(resolve(dirContent, "settings.json"), "utf8")
|
|
1664
|
-
);
|
|
1665
|
-
const primaryColor = settings.primary_color || "#20c997";
|
|
1666
|
-
const secondaryColor = settings.secondary_color || "#343a40";
|
|
1667
|
-
const storefrontConfig = () => {
|
|
1668
|
-
const { storeId, lang } = config.get();
|
|
1669
|
-
return {
|
|
1670
|
-
settings,
|
|
1671
|
-
lang,
|
|
1672
|
-
storeId,
|
|
1673
|
-
primaryColor,
|
|
1674
|
-
secondaryColor
|
|
1675
|
-
};
|
|
1676
|
-
};
|
|
1677
|
-
|
|
1678
|
-
const $$module2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1679
|
-
__proto__: null,
|
|
1680
|
-
default: storefrontConfig
|
|
1681
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1682
|
-
|
|
1683
|
-
const $$metadata = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", { modules: [{ module: $$module1, specifier: "@cloudcommerce/api", assert: {} }, { module: $$module2, specifier: "../storefront-config", assert: {} }, { module: $$module3, specifier: "../layouts/Layout.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1684
|
-
const $$Astro = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1686
|
+
const $$metadata = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro", { modules: [{ module: $$module1, specifier: "@cloudcommerce/api", assert: {} }, { module: $$module2$1, specifier: "../../storefront.config.mjs", assert: {} }, { module: $$module3, specifier: "../layouts/Layout.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1687
|
+
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/");
|
|
1685
1688
|
const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
1686
1689
|
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
1687
1690
|
Astro2.self = $$;
|
|
@@ -1698,13 +1701,13 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1698
1701
|
const STYLES = [];
|
|
1699
1702
|
for (const STYLE of STYLES)
|
|
1700
1703
|
$$result.styles.add(STYLE);
|
|
1701
|
-
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": doc.name, "class": "astro-
|
|
1702
|
-
<h1 class="astro-
|
|
1703
|
-
<hr class="astro-
|
|
1704
|
-
<div class="mt-3 astro-
|
|
1705
|
-
<mark class="astro-
|
|
1706
|
-
<p class="astro-
|
|
1707
|
-
<em class="astro-
|
|
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>
|
|
1708
1711
|
</div>
|
|
1709
1712
|
</main>` })}
|
|
1710
1713
|
|
|
@@ -1794,7 +1797,7 @@ function deserializeManifest(serializedManifest) {
|
|
|
1794
1797
|
};
|
|
1795
1798
|
}
|
|
1796
1799
|
|
|
1797
|
-
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":["assets/404-_...d4aa8aff.css","assets/404-index.d9230d24.css","assets/index.53a3a3e0.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/404-_...d4aa8aff.css","assets/404-index.d9230d24.css","assets/404.530428e5.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":"/404","type":"page","pattern":"^\\/404\\/?$","segments":[[{"content":"404","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/404.astro","pathname":"/404","_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/404-_...d4aa8aff.css","assets/_...
|
|
1800
|
+
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":["assets/404-_...d4aa8aff.css","assets/404-index.d9230d24.css","assets/index.53a3a3e0.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/404-_...d4aa8aff.css","assets/404-index.d9230d24.css","assets/404.530428e5.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":"/404","type":"page","pattern":"^\\/404\\/?$","segments":[[{"content":"404","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/404.astro","pathname":"/404","_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/404-_...d4aa8aff.css","assets/_...98510c96.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/404.530428e5.css","/assets/404-_...d4aa8aff.css","/assets/404-index.d9230d24.css","/assets/_...98510c96.css","/assets/index.53a3a3e0.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"]}), {
|
|
1798
1801
|
pageMap: pageMap,
|
|
1799
1802
|
renderers: renderers
|
|
1800
1803
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
STOREFRONT_BASE_DIR
|
|
1
|
+
STOREFRONT_BASE_DIR=../../store/functions/ssr/
|
|
2
2
|
ECOM_STORE_ID=1011
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.71",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"start": "astro dev",
|
|
21
21
|
"build": "astro build",
|
|
22
22
|
"preview": "astro preview",
|
|
23
|
-
"astro": "astro"
|
|
23
|
+
"astro": "astro",
|
|
24
|
+
"prerelease": "rm content && cp -r ../../store/functions/ssr/content ./",
|
|
25
|
+
"postrelease": "rm -rf content && ln -s ../../store/functions/ssr/content content"
|
|
24
26
|
},
|
|
25
27
|
"dependencies": {
|
|
26
28
|
"@astrojs/node": "^1.0.1",
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
"@nanostores/vue": "^0.6.0",
|
|
34
36
|
"@picocss/pico": "^1.5.3",
|
|
35
37
|
"astro": "^1.1.5",
|
|
38
|
+
"dotenv": "^16.0.2",
|
|
36
39
|
"nanostores": "^0.6.0",
|
|
37
40
|
"rollup": "^2.79.0",
|
|
38
41
|
"unocss": "^0.45.15",
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
+
import getConfig from '../../storefront.config.mjs';
|
|
3
|
+
|
|
2
4
|
export interface Props {
|
|
3
5
|
title: string;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
8
|
const { title } = Astro.props as Props;
|
|
9
|
+
const { lang } = getConfig();
|
|
7
10
|
---
|
|
8
11
|
|
|
9
12
|
<!DOCTYPE html>
|
|
@@ -13,9 +16,13 @@ const { title } = Astro.props as Props;
|
|
|
13
16
|
<meta name="viewport" content="width=device-width">
|
|
14
17
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
15
18
|
<title>{title}</title>
|
|
19
|
+
<link rel="stylesheet" media="print" onload="this.media='all'"
|
|
20
|
+
href="https://www.gstatic.com/firebasejs/ui/6.0.1/firebase-ui-auth.css" />
|
|
16
21
|
</head>
|
|
17
22
|
<body>
|
|
18
23
|
<slot />
|
|
24
|
+
<script async type="text/partytown"
|
|
25
|
+
src={`https://www.gstatic.com/firebasejs/ui/6.0.1/firebase-ui-auth__${lang}.js`}></script>
|
|
19
26
|
</body>
|
|
20
27
|
</html>
|
|
21
28
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BaseConfig } from '@cloudcommerce/config';
|
|
2
|
+
import settings from '../content/settings.json';
|
|
3
|
+
|
|
4
|
+
type CmsSettings = typeof settings;
|
|
5
|
+
|
|
6
|
+
type StorefrontConfig = {
|
|
7
|
+
storeId: BaseConfig['storeId'],
|
|
8
|
+
lang: BaseConfig['lang'],
|
|
9
|
+
domain: CmsSettings['domain'],
|
|
10
|
+
primaryColor: CmsSettings['primary_color'],
|
|
11
|
+
secondaryColor: CmsSettings['secondary_color'],
|
|
12
|
+
settings: CmsSettings,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type {
|
|
16
|
+
StorefrontConfig,
|
|
17
|
+
CmsSettings,
|
|
18
|
+
};
|