cloudcommerce 0.0.65 → 0.0.68
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 +36 -0
- package/package.json +8 -8
- package/packages/api/lib/api.js +8 -8
- package/packages/api/lib/api.js.map +1 -1
- package/packages/api/package.json +1 -1
- package/packages/api/src/api.ts +8 -8
- package/packages/apps/correios/package.json +3 -3
- package/packages/apps/custom-shipping/package.json +3 -3
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/cli/config/firebase.json +6 -6
- package/packages/cli/package.json +1 -1
- package/packages/config/CHANGELOG.md +1 -0
- package/packages/config/README.md +1 -0
- package/packages/config/lib/config.d.ts +13 -0
- package/packages/config/lib/config.js +33 -0
- package/packages/config/lib/config.js.map +1 -0
- package/packages/{firebase → config}/lib/defaults.d.ts +0 -0
- package/packages/{firebase → config}/lib/defaults.js +0 -0
- package/packages/{firebase → config}/lib/defaults.js.map +0 -0
- package/packages/config/lib/env.d.ts +11 -0
- package/packages/config/lib/env.js +33 -0
- package/packages/config/lib/env.js.map +1 -0
- package/packages/config/package.json +33 -0
- package/packages/config/src/config.ts +47 -0
- package/packages/{firebase → config}/src/defaults.ts +0 -0
- package/packages/config/src/env.ts +46 -0
- package/packages/config/tsconfig.json +6 -0
- package/packages/events/package.json +2 -2
- package/packages/firebase/lib/config.d.ts +21 -24
- package/packages/firebase/lib/config.js +20 -44
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/env.d.ts +2 -10
- package/packages/firebase/lib/env.js +3 -27
- package/packages/firebase/lib/env.js.map +1 -1
- package/packages/firebase/lib/handlers/check-store-events.js +17 -8
- package/packages/firebase/lib/handlers/check-store-events.js.map +1 -1
- package/packages/firebase/package.json +3 -3
- package/packages/firebase/src/config.ts +23 -48
- package/packages/firebase/src/env.ts +2 -38
- package/packages/firebase/src/handlers/check-store-events.ts +18 -9
- package/packages/modules/package.json +2 -2
- package/packages/passport/package.json +2 -2
- package/packages/ssr/lib/firebase/serve-storefront.js +67 -0
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -0
- package/packages/ssr/lib/firebase.js +4 -3
- package/packages/ssr/lib/firebase.js.map +1 -1
- package/packages/ssr/lib/index.js +3 -0
- package/packages/ssr/lib/index.js.map +1 -1
- package/packages/ssr/package.json +2 -3
- package/packages/ssr/src/firebase/serve-storefront.ts +78 -0
- package/packages/ssr/src/firebase.ts +4 -3
- package/packages/ssr/src/index.ts +3 -0
- package/packages/storefront/.eslintrc.cjs +6 -0
- package/packages/storefront/dist/client/assets/{_...d4aa8aff.css → 404-_...d4aa8aff.css} +0 -0
- package/packages/storefront/dist/client/assets/404-index.d9230d24.css +1 -0
- package/packages/storefront/dist/client/assets/{_...0b5ebd52.css → 404.530428e5.css} +1 -1
- package/packages/storefront/dist/client/assets/_...fae19676.css +1 -0
- package/packages/storefront/dist/client/assets/index.53a3a3e0.css +1 -0
- package/packages/storefront/dist/client/client.6d48c590.js +1 -0
- package/packages/storefront/dist/server/entry.mjs +272 -135
- package/packages/storefront/example.env +2 -0
- package/packages/storefront/package.json +10 -7
- package/packages/storefront/src/pages/404.astro +74 -0
- package/packages/storefront/src/pages/[...slug].astro +11 -5
- package/packages/{ssr/src/firebase/.gitkeep → storefront/src/pages/app/index.astro} +0 -0
- package/packages/storefront/src/pages/index.astro +2 -2
- package/packages/storefront/src/storefront-config.ts +39 -0
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/assets/index.5608ba47.css +0 -1
- package/packages/storefront/dist/client/client.dbac84dd.js +0 -1
|
@@ -2,7 +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 *//* empty css *//* empty css *//* empty css */import { fileURLToPath } from 'url';
|
|
6
|
+
import { readFileSync } from 'fs';
|
|
7
|
+
import { resolve } from 'path';
|
|
8
|
+
import Deepmerge from '@fastify/deepmerge';
|
|
9
|
+
import 'mime';
|
|
6
10
|
import 'kleur/colors';
|
|
7
11
|
import 'string-width';
|
|
8
12
|
import 'path-browserify';
|
|
@@ -44,7 +48,7 @@ const _renderer1 = {
|
|
|
44
48
|
renderToStaticMarkup: renderToStaticMarkup$1,
|
|
45
49
|
};
|
|
46
50
|
|
|
47
|
-
const ASTRO_VERSION = "1.1.
|
|
51
|
+
const ASTRO_VERSION = "1.1.5";
|
|
48
52
|
function createDeprecatedFetchContentFn() {
|
|
49
53
|
return () => {
|
|
50
54
|
throw new Error("Deprecated: Astro.fetchContent() has been replaced with Astro.glob().");
|
|
@@ -1262,120 +1266,10 @@ var server_default = {
|
|
|
1262
1266
|
renderToStaticMarkup
|
|
1263
1267
|
};
|
|
1264
1268
|
|
|
1265
|
-
const $$metadata$3 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1266
|
-
const $$Astro$3 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1267
|
-
const $$Layout = createComponent(async ($$result, $$props, $$slots) => {
|
|
1268
|
-
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
1269
|
-
Astro2.self = $$Layout;
|
|
1270
|
-
const { title } = Astro2.props;
|
|
1271
|
-
const STYLES = [];
|
|
1272
|
-
for (const STYLE of STYLES)
|
|
1273
|
-
$$result.styles.add(STYLE);
|
|
1274
|
-
return renderTemplate`<html lang="en" class="astro-ZMK4NUBX">
|
|
1275
|
-
<head>
|
|
1276
|
-
<meta charset="UTF-8">
|
|
1277
|
-
<meta name="viewport" content="width=device-width">
|
|
1278
|
-
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
1279
|
-
<title>${title}</title>
|
|
1280
|
-
${renderHead($$result)}</head>
|
|
1281
|
-
<body class="astro-ZMK4NUBX">
|
|
1282
|
-
${renderSlot($$result, $$slots["default"])}
|
|
1283
|
-
|
|
1284
|
-
</body></html>`;
|
|
1285
|
-
});
|
|
1286
|
-
|
|
1287
|
-
const $$file$3 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro";
|
|
1288
|
-
const $$url$3 = undefined;
|
|
1289
|
-
|
|
1290
|
-
const $$module2$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1291
|
-
__proto__: null,
|
|
1292
|
-
$$metadata: $$metadata$3,
|
|
1293
|
-
default: $$Layout,
|
|
1294
|
-
file: $$file$3,
|
|
1295
|
-
url: $$url$3
|
|
1296
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1297
|
-
|
|
1298
|
-
const $$metadata$2 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1299
|
-
const $$Astro$2 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1300
|
-
const $$Card = createComponent(async ($$result, $$props, $$slots) => {
|
|
1301
|
-
const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
|
|
1302
|
-
Astro2.self = $$Card;
|
|
1303
|
-
const { href, title, body } = Astro2.props;
|
|
1304
|
-
const STYLES = [];
|
|
1305
|
-
for (const STYLE of STYLES)
|
|
1306
|
-
$$result.styles.add(STYLE);
|
|
1307
|
-
return renderTemplate`${maybeRenderHead($$result)}<li class="link-card astro-ASCHB54V">
|
|
1308
|
-
<a${addAttribute(href, "href")} class="astro-ASCHB54V">
|
|
1309
|
-
<h2 class="astro-ASCHB54V">
|
|
1310
|
-
${title}
|
|
1311
|
-
<span class="astro-ASCHB54V">→</span>
|
|
1312
|
-
</h2>
|
|
1313
|
-
<p class="astro-ASCHB54V">
|
|
1314
|
-
${body}
|
|
1315
|
-
</p>
|
|
1316
|
-
</a>
|
|
1317
|
-
</li>
|
|
1318
|
-
`;
|
|
1319
|
-
});
|
|
1320
|
-
|
|
1321
|
-
const $$file$2 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro";
|
|
1322
|
-
const $$url$2 = undefined;
|
|
1323
|
-
|
|
1324
|
-
const $$module2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1325
|
-
__proto__: null,
|
|
1326
|
-
$$metadata: $$metadata$2,
|
|
1327
|
-
default: $$Card,
|
|
1328
|
-
file: $$file$2,
|
|
1329
|
-
url: $$url$2
|
|
1330
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1331
|
-
|
|
1332
|
-
const $$metadata$1 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", { modules: [{ module: $$module2$1, specifier: "../layouts/Layout.astro", assert: {} }, { module: $$module2, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1333
|
-
const $$Astro$1 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1334
|
-
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
|
|
1335
|
-
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
1336
|
-
Astro2.self = $$Index;
|
|
1337
|
-
const fetchingProducts = await fetch("https://ecomplus.io/v2/:1056/products");
|
|
1338
|
-
const products = (await fetchingProducts.json()).result;
|
|
1339
|
-
const STYLES = [];
|
|
1340
|
-
for (const STYLE of STYLES)
|
|
1341
|
-
$$result.styles.add(STYLE);
|
|
1342
|
-
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-2COIDAMR" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-2COIDAMR">
|
|
1343
|
-
<h1 class="astro-2COIDAMR">Welcome to <span class="text-gradient astro-2COIDAMR">Astro</span></h1>
|
|
1344
|
-
<p class="instructions astro-2COIDAMR">
|
|
1345
|
-
Check out the <code class="astro-2COIDAMR">src/pages</code> directory to get started.<br class="astro-2COIDAMR">
|
|
1346
|
-
<strong class="astro-2COIDAMR">Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
1347
|
-
</p>
|
|
1348
|
-
<ul role="list" class="link-card-grid astro-2COIDAMR">
|
|
1349
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-2COIDAMR" })}
|
|
1350
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-2COIDAMR" })}
|
|
1351
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-2COIDAMR" })}
|
|
1352
|
-
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-2COIDAMR" })}
|
|
1353
|
-
</ul>
|
|
1354
|
-
<ul role="list" class="mt-3 fs-20 astro-2COIDAMR">
|
|
1355
|
-
${products.map((product) => renderTemplate`<li class="astro-2COIDAMR">
|
|
1356
|
-
<a${addAttribute(`/${product.slug}`, "href")} class="astro-2COIDAMR">${product.sku}</a>
|
|
1357
|
-
</li>`)}
|
|
1358
|
-
</ul>
|
|
1359
|
-
</main>` })}
|
|
1360
|
-
|
|
1361
|
-
`;
|
|
1362
|
-
});
|
|
1363
|
-
|
|
1364
|
-
const $$file$1 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro";
|
|
1365
|
-
const $$url$1 = "";
|
|
1366
|
-
|
|
1367
|
-
const _page0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1368
|
-
__proto__: null,
|
|
1369
|
-
$$metadata: $$metadata$1,
|
|
1370
|
-
default: $$Index,
|
|
1371
|
-
file: $$file$1,
|
|
1372
|
-
url: $$url$1
|
|
1373
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1374
|
-
|
|
1375
1269
|
// @ts-ignore
|
|
1376
|
-
const
|
|
1377
|
-
|| (typeof process === 'object' && process
|
|
1378
|
-
||
|
|
1270
|
+
const _env$1 = (Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true},{LANG:process.env.LANG,ECOM_STORE_ID:"1011",BASE_URL:'/',}))
|
|
1271
|
+
|| (typeof process === 'object' && process?.env)
|
|
1272
|
+
|| globalThis;
|
|
1379
1273
|
class ApiError extends Error {
|
|
1380
1274
|
constructor(config, response, msg, isTimeout = false) {
|
|
1381
1275
|
if (response) {
|
|
@@ -1398,8 +1292,8 @@ const def = {
|
|
|
1398
1292
|
// eslint-disable-next-line dot-notation
|
|
1399
1293
|
headers['Authorization'] = `Bearer ${config.accessToken}`;
|
|
1400
1294
|
} else {
|
|
1401
|
-
const authenticationId = config.authenticationId ||
|
|
1402
|
-
const apiKey = config.apiKey ||
|
|
1295
|
+
const authenticationId = config.authenticationId || _env$1.ECOM_AUTHENTICATION_ID;
|
|
1296
|
+
const apiKey = config.apiKey || _env$1.ECOM_API_KEY;
|
|
1403
1297
|
if (authenticationId && apiKey) {
|
|
1404
1298
|
const rawAuth = `${authenticationId}:${apiKey}`;
|
|
1405
1299
|
const base64Auth = typeof Buffer === 'function'
|
|
@@ -1409,18 +1303,18 @@ const def = {
|
|
|
1409
1303
|
}
|
|
1410
1304
|
}
|
|
1411
1305
|
}
|
|
1412
|
-
let url = config.baseUrl ||
|
|
1306
|
+
let url = config.baseUrl || _env$1.API_BASE_URL || 'https://ecomplus.io/v2';
|
|
1413
1307
|
const { endpoint, params } = config;
|
|
1414
1308
|
if (endpoint !== 'login'
|
|
1415
1309
|
&& endpoint !== 'authenticate'
|
|
1416
1310
|
&& endpoint !== 'ask-auth-callback'
|
|
1417
1311
|
&& endpoint !== 'check-username') {
|
|
1418
|
-
const storeId = config.storeId ||
|
|
1312
|
+
const storeId = config.storeId || _env$1.ECOM_STORE_ID;
|
|
1419
1313
|
if (!storeId) {
|
|
1420
1314
|
throw new Error('`storeId` must be set in config or `ECOM_STORE_ID` env var');
|
|
1421
1315
|
}
|
|
1422
1316
|
url += `/:${storeId}`;
|
|
1423
|
-
const lang = config.lang ||
|
|
1317
|
+
const lang = config.lang || _env$1.ECOM_LANG;
|
|
1424
1318
|
if (lang) {
|
|
1425
1319
|
url += `,lang:${lang}`;
|
|
1426
1320
|
}
|
|
@@ -1548,26 +1442,269 @@ const $$module1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty(
|
|
|
1548
1442
|
ApiError
|
|
1549
1443
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1550
1444
|
|
|
1551
|
-
const $$metadata = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/
|
|
1445
|
+
const $$metadata$5 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro", { modules: [], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
1446
|
+
const $$Astro$5 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro", "", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
|
|
1447
|
+
const $$Layout = createComponent(async ($$result, $$props, $$slots) => {
|
|
1448
|
+
const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
|
|
1449
|
+
Astro2.self = $$Layout;
|
|
1450
|
+
const { title } = Astro2.props;
|
|
1451
|
+
const STYLES = [];
|
|
1452
|
+
for (const STYLE of STYLES)
|
|
1453
|
+
$$result.styles.add(STYLE);
|
|
1454
|
+
return renderTemplate`<html lang="en" class="astro-ZMK4NUBX">
|
|
1455
|
+
<head>
|
|
1456
|
+
<meta charset="UTF-8">
|
|
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>`;
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
const $$file$5 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Layout.astro";
|
|
1468
|
+
const $$url$5 = undefined;
|
|
1469
|
+
|
|
1470
|
+
const $$module3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1471
|
+
__proto__: null,
|
|
1472
|
+
$$metadata: $$metadata$5,
|
|
1473
|
+
default: $$Layout,
|
|
1474
|
+
file: $$file$5,
|
|
1475
|
+
url: $$url$5
|
|
1476
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1477
|
+
|
|
1478
|
+
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/");
|
|
1480
|
+
const $$Card = createComponent(async ($$result, $$props, $$slots) => {
|
|
1481
|
+
const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
|
|
1482
|
+
Astro2.self = $$Card;
|
|
1483
|
+
const { href, title, body } = Astro2.props;
|
|
1484
|
+
const STYLES = [];
|
|
1485
|
+
for (const STYLE of STYLES)
|
|
1486
|
+
$$result.styles.add(STYLE);
|
|
1487
|
+
return renderTemplate`${maybeRenderHead($$result)}<li class="link-card astro-ASCHB54V">
|
|
1488
|
+
<a${addAttribute(href, "href")} class="astro-ASCHB54V">
|
|
1489
|
+
<h2 class="astro-ASCHB54V">
|
|
1490
|
+
${title}
|
|
1491
|
+
<span class="astro-ASCHB54V">→</span>
|
|
1492
|
+
</h2>
|
|
1493
|
+
<p class="astro-ASCHB54V">
|
|
1494
|
+
${body}
|
|
1495
|
+
</p>
|
|
1496
|
+
</a>
|
|
1497
|
+
</li>
|
|
1498
|
+
`;
|
|
1499
|
+
});
|
|
1500
|
+
|
|
1501
|
+
const $$file$4 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/Card.astro";
|
|
1502
|
+
const $$url$4 = undefined;
|
|
1503
|
+
|
|
1504
|
+
const $$module2$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1505
|
+
__proto__: null,
|
|
1506
|
+
$$metadata: $$metadata$4,
|
|
1507
|
+
default: $$Card,
|
|
1508
|
+
file: $$file$4,
|
|
1509
|
+
url: $$url$4
|
|
1510
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1511
|
+
|
|
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$1, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
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/");
|
|
1514
|
+
const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1515
|
+
const Astro2 = $$result.createAstro($$Astro$3, $$props, $$slots);
|
|
1516
|
+
Astro2.self = $$Index$1;
|
|
1517
|
+
const products = (await api.get("products")).data.result;
|
|
1518
|
+
const STYLES = [];
|
|
1519
|
+
for (const STYLE of STYLES)
|
|
1520
|
+
$$result.styles.add(STYLE);
|
|
1521
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-C3E44E3K" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-C3E44E3K">
|
|
1522
|
+
<h1 class="astro-C3E44E3K">Welcome to <span class="text-gradient astro-C3E44E3K">Astro</span></h1>
|
|
1523
|
+
<p class="instructions astro-C3E44E3K">
|
|
1524
|
+
Check out the <code class="astro-C3E44E3K">src/pages</code> directory to get started.<br class="astro-C3E44E3K">
|
|
1525
|
+
<strong class="astro-C3E44E3K">Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
1526
|
+
</p>
|
|
1527
|
+
<ul role="list" class="link-card-grid astro-C3E44E3K">
|
|
1528
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-C3E44E3K" })}
|
|
1529
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-C3E44E3K" })}
|
|
1530
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-C3E44E3K" })}
|
|
1531
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-C3E44E3K" })}
|
|
1532
|
+
</ul>
|
|
1533
|
+
<ul role="list" class="mt-3 fs-20 astro-C3E44E3K">
|
|
1534
|
+
${products.map((product) => renderTemplate`<li class="astro-C3E44E3K">
|
|
1535
|
+
<a${addAttribute(`/${product.slug}`, "href")} class="astro-C3E44E3K">${product.sku}</a>
|
|
1536
|
+
</li>`)}
|
|
1537
|
+
</ul>
|
|
1538
|
+
</main>` })}
|
|
1539
|
+
|
|
1540
|
+
`;
|
|
1541
|
+
});
|
|
1542
|
+
|
|
1543
|
+
const $$file$3 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro";
|
|
1544
|
+
const $$url$3 = "";
|
|
1545
|
+
|
|
1546
|
+
const _page0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1547
|
+
__proto__: null,
|
|
1548
|
+
$$metadata: $$metadata$3,
|
|
1549
|
+
default: $$Index$1,
|
|
1550
|
+
file: $$file$3,
|
|
1551
|
+
url: $$url$3
|
|
1552
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1553
|
+
|
|
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$1, specifier: "../components/Card.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [] });
|
|
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/");
|
|
1556
|
+
const $$404 = createComponent(async ($$result, $$props, $$slots) => {
|
|
1557
|
+
const Astro2 = $$result.createAstro($$Astro$2, $$props, $$slots);
|
|
1558
|
+
Astro2.self = $$404;
|
|
1559
|
+
const STYLES = [];
|
|
1560
|
+
for (const STYLE of STYLES)
|
|
1561
|
+
$$result.styles.add(STYLE);
|
|
1562
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": "Welcome to Astro.", "class": "astro-7FYMG5AV" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-7FYMG5AV">
|
|
1563
|
+
<h1 class="astro-7FYMG5AV">404</h1>
|
|
1564
|
+
<p class="instructions astro-7FYMG5AV">
|
|
1565
|
+
Check out the <code class="astro-7FYMG5AV">src/pages</code> directory to get started.<br class="astro-7FYMG5AV">
|
|
1566
|
+
<strong class="astro-7FYMG5AV">Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
1567
|
+
</p>
|
|
1568
|
+
<ul role="list" class="link-card-grid astro-7FYMG5AV">
|
|
1569
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://docs.astro.build/", "title": "Documentation", "body": "Learn how Astro works and explore the official API docs.", "class": "astro-7FYMG5AV" })}
|
|
1570
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/integrations/", "title": "Integrations", "body": "Supercharge your project with new frameworks and libraries.", "class": "astro-7FYMG5AV" })}
|
|
1571
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/themes/", "title": "Themes", "body": "Explore a galaxy of community-built starter themes.", "class": "astro-7FYMG5AV" })}
|
|
1572
|
+
${renderComponent($$result, "Card", $$Card, { "href": "https://astro.build/chat/", "title": "Chat", "body": "Come say hi to our amazing Discord community. \u2764\uFE0F", "class": "astro-7FYMG5AV" })}
|
|
1573
|
+
</ul>
|
|
1574
|
+
</main>` })}
|
|
1575
|
+
|
|
1576
|
+
`;
|
|
1577
|
+
});
|
|
1578
|
+
|
|
1579
|
+
const $$file$2 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/404.astro";
|
|
1580
|
+
const $$url$2 = "/404";
|
|
1581
|
+
|
|
1582
|
+
const _page1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1583
|
+
__proto__: null,
|
|
1584
|
+
$$metadata: $$metadata$2,
|
|
1585
|
+
default: $$404,
|
|
1586
|
+
file: $$file$2,
|
|
1587
|
+
url: $$url$2
|
|
1588
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1589
|
+
|
|
1590
|
+
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/");
|
|
1592
|
+
const $$Index = createComponent(async ($$result, $$props, $$slots) => {
|
|
1593
|
+
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
1594
|
+
Astro2.self = $$Index;
|
|
1595
|
+
return renderTemplate``;
|
|
1596
|
+
});
|
|
1597
|
+
|
|
1598
|
+
const $$file$1 = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/app/index.astro";
|
|
1599
|
+
const $$url$1 = "/app";
|
|
1600
|
+
|
|
1601
|
+
const _page2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1602
|
+
__proto__: null,
|
|
1603
|
+
$$metadata: $$metadata$1,
|
|
1604
|
+
default: $$Index,
|
|
1605
|
+
file: $$file$1,
|
|
1606
|
+
url: $$url$1
|
|
1607
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1608
|
+
|
|
1609
|
+
const DEFAULT_LANG = 'pt_br';
|
|
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: [] });
|
|
1552
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/");
|
|
1553
1685
|
const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
1554
1686
|
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
1555
1687
|
Astro2.self = $$;
|
|
1556
1688
|
const { slug } = Astro2.params;
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1689
|
+
let resource;
|
|
1690
|
+
let doc;
|
|
1691
|
+
try {
|
|
1692
|
+
const { data } = await api.get(`slugs/${slug}`, { fetch });
|
|
1693
|
+
resource = data.resource;
|
|
1694
|
+
doc = data.doc;
|
|
1695
|
+
} catch {
|
|
1696
|
+
return Astro2.redirect(`/404?url=${encodeURIComponent(`/${slug}`)}`);
|
|
1697
|
+
}
|
|
1561
1698
|
const STYLES = [];
|
|
1562
1699
|
for (const STYLE of STYLES)
|
|
1563
1700
|
$$result.styles.add(STYLE);
|
|
1564
|
-
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": doc.name, "class": "astro-
|
|
1565
|
-
<h1 class="astro-
|
|
1566
|
-
<hr class="astro-
|
|
1567
|
-
<div class="mt-3 astro-
|
|
1568
|
-
<mark class="astro-
|
|
1569
|
-
<p class="astro-
|
|
1570
|
-
<em class="astro-
|
|
1701
|
+
return renderTemplate`${renderComponent($$result, "Layout", $$Layout, { "title": doc.name, "class": "astro-NJCM7BMR" }, { "default": () => renderTemplate`${maybeRenderHead($$result)}<main class="astro-NJCM7BMR">
|
|
1702
|
+
<h1 class="astro-NJCM7BMR">Hello <span class="text-gradient astro-NJCM7BMR">${doc.name}</span></h1>
|
|
1703
|
+
<hr class="astro-NJCM7BMR">
|
|
1704
|
+
<div class="mt-3 astro-NJCM7BMR">
|
|
1705
|
+
<mark class="astro-NJCM7BMR">${doc._id}</mark> from <i class="astro-NJCM7BMR">${resource}</i>
|
|
1706
|
+
<p class="astro-NJCM7BMR">${Math.random()}</p>
|
|
1707
|
+
<em class="astro-NJCM7BMR">Lorem ipsum dolor sit amet</em>
|
|
1571
1708
|
</div>
|
|
1572
1709
|
</main>` })}
|
|
1573
1710
|
|
|
@@ -1577,7 +1714,7 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1577
1714
|
const $$file = "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro";
|
|
1578
1715
|
const $$url = "/[...slug]";
|
|
1579
1716
|
|
|
1580
|
-
const
|
|
1717
|
+
const _page3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
1581
1718
|
__proto__: null,
|
|
1582
1719
|
$$metadata,
|
|
1583
1720
|
default: $$,
|
|
@@ -1585,7 +1722,7 @@ const _page1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1585
1722
|
url: $$url
|
|
1586
1723
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1587
1724
|
|
|
1588
|
-
const pageMap = new Map([['src/pages/index.astro', _page0],['src/pages/[...slug].astro',
|
|
1725
|
+
const pageMap = new Map([['src/pages/index.astro', _page0],['src/pages/404.astro', _page1],['src/pages/app/index.astro', _page2],['src/pages/[...slug].astro', _page3],]);
|
|
1589
1726
|
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 }),];
|
|
1590
1727
|
|
|
1591
1728
|
if (typeof process !== "undefined") {
|
|
@@ -1657,7 +1794,7 @@ function deserializeManifest(serializedManifest) {
|
|
|
1657
1794
|
};
|
|
1658
1795
|
}
|
|
1659
1796
|
|
|
1660
|
-
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":["assets/_...d4aa8aff.css","assets/index.
|
|
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/_...fae19676.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"}}}],"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/_...fae19676.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"]}), {
|
|
1661
1798
|
pageMap: pageMap,
|
|
1662
1799
|
renderers: renderers
|
|
1663
1800
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.68",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -23,18 +23,21 @@
|
|
|
23
23
|
"astro": "astro"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@astrojs/node": "^1.0.
|
|
26
|
+
"@astrojs/node": "^1.0.1",
|
|
27
27
|
"@astrojs/partytown": "^1.0.0",
|
|
28
28
|
"@astrojs/prefetch": "^0.0.7",
|
|
29
29
|
"@astrojs/sitemap": "^1.0.0",
|
|
30
30
|
"@astrojs/vue": "^1.0.0",
|
|
31
31
|
"@cloudcommerce/api": "workspace:*",
|
|
32
|
+
"@cloudcommerce/config": "workspace:*",
|
|
33
|
+
"@nanostores/vue": "^0.6.0",
|
|
32
34
|
"@picocss/pico": "^1.5.3",
|
|
33
|
-
"astro": "^1.1.
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"astro": "^1.1.5",
|
|
36
|
+
"nanostores": "^0.6.0",
|
|
37
|
+
"rollup": "^2.79.0",
|
|
38
|
+
"unocss": "^0.45.15",
|
|
39
|
+
"vite": "^3.1.0",
|
|
37
40
|
"vite-plugin-pwa": "^0.12.6",
|
|
38
|
-
"vue": "^3.2.
|
|
41
|
+
"vue": "^3.2.38"
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Layout from '../layouts/Layout.astro';
|
|
3
|
+
import Card from '../components/Card.astro';
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<Layout title="Welcome to Astro.">
|
|
7
|
+
<main>
|
|
8
|
+
<h1>404</h1>
|
|
9
|
+
<p class="instructions">
|
|
10
|
+
Check out the <code>src/pages</code> directory to get started.<br/>
|
|
11
|
+
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
|
12
|
+
</p>
|
|
13
|
+
<ul role="list" class="link-card-grid">
|
|
14
|
+
<Card href="https://docs.astro.build/" title="Documentation" body="Learn how Astro works and explore the official API docs." />
|
|
15
|
+
<Card href="https://astro.build/integrations/" title="Integrations" body="Supercharge your project with new frameworks and libraries." />
|
|
16
|
+
<Card href="https://astro.build/themes/" title="Themes" body="Explore a galaxy of community-built starter themes." />
|
|
17
|
+
<Card href="https://astro.build/chat/" title="Chat" body="Come say hi to our amazing Discord community. ❤️" />
|
|
18
|
+
</ul>
|
|
19
|
+
</main>
|
|
20
|
+
</Layout>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
:root {
|
|
24
|
+
--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
h1 {
|
|
28
|
+
margin: 2rem 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
main {
|
|
32
|
+
margin: auto;
|
|
33
|
+
padding: 1em;
|
|
34
|
+
max-width: 60ch;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.text-gradient {
|
|
38
|
+
font-weight: 900;
|
|
39
|
+
background-image: var(--astro-gradient);
|
|
40
|
+
-webkit-background-clip: text;
|
|
41
|
+
-webkit-text-fill-color: transparent;
|
|
42
|
+
background-size: 100% 200%;
|
|
43
|
+
background-position-y: 100%;
|
|
44
|
+
border-radius: 0.4rem;
|
|
45
|
+
animation: pulse 4s ease-in-out infinite;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes pulse {
|
|
49
|
+
0%, 100% { background-position-y: 0%; }
|
|
50
|
+
50% { background-position-y: 80%; }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.instructions {
|
|
54
|
+
line-height: 1.6;
|
|
55
|
+
margin: 1rem 0;
|
|
56
|
+
background: #4F39FA;
|
|
57
|
+
padding: 1.0rem;
|
|
58
|
+
border-radius: 0.4rem;
|
|
59
|
+
color: var(--color-bg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.instructions code {
|
|
63
|
+
font-size: 0.875em;
|
|
64
|
+
border: 0.1em solid var(--color-border);
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
padding: 0.15em 0.25em;
|
|
67
|
+
}
|
|
68
|
+
.link-card-grid {
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
|
71
|
+
gap: 1rem;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
</style>
|