cloudcommerce 0.0.71 → 0.0.74

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.
Files changed (139) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/CHANGELOG.md +38 -0
  3. package/package.json +9 -9
  4. package/packages/api/package.json +1 -1
  5. package/packages/apps/correios/package.json +1 -1
  6. package/packages/apps/custom-shipping/package.json +1 -1
  7. package/packages/apps/discounts/package.json +1 -1
  8. package/packages/apps/frenet/CHANGELOG.md +1 -0
  9. package/packages/apps/frenet/README.md +1 -0
  10. package/packages/apps/frenet/lib/frenet.d.ts +2 -0
  11. package/packages/apps/frenet/lib/frenet.js +6 -0
  12. package/packages/apps/frenet/lib/frenet.js.map +1 -0
  13. package/packages/apps/frenet/lib/index.d.ts +1 -0
  14. package/packages/apps/{tiny-erp → frenet}/lib/index.js +1 -1
  15. package/packages/apps/{tiny-erp → frenet}/lib/index.js.map +1 -1
  16. package/packages/apps/frenet/lib-mjs/calculate-frenet.mjs +152 -0
  17. package/packages/apps/frenet/package.json +28 -0
  18. package/packages/apps/frenet/src/frenet.ts +7 -0
  19. package/packages/apps/frenet/src/index.ts +1 -0
  20. package/packages/apps/frenet/tsconfig.json +6 -0
  21. package/packages/apps/tiny-erp/package.json +1 -1
  22. package/packages/cli/config/firebase.json +47 -0
  23. package/packages/cli/package.json +1 -1
  24. package/packages/config/lib/config.js +9 -8
  25. package/packages/config/lib/config.js.map +1 -1
  26. package/packages/config/package.json +1 -1
  27. package/packages/config/src/config.ts +11 -10
  28. package/packages/events/package.json +1 -1
  29. package/packages/firebase/lib/config.d.ts +3 -0
  30. package/packages/firebase/lib/config.js +3 -0
  31. package/packages/firebase/lib/config.js.map +1 -1
  32. package/packages/firebase/package.json +1 -1
  33. package/packages/firebase/src/config.ts +3 -0
  34. package/packages/modules/package.json +3 -1
  35. package/packages/modules/schemas/@checkout.cjs +28 -28
  36. package/packages/modules/schemas/apply_discount.cjs +2 -2
  37. package/packages/modules/schemas/calculate_shipping.cjs +4 -4
  38. package/packages/modules/schemas/create_transaction.cjs +30 -30
  39. package/packages/modules/schemas/list_payments.cjs +6 -6
  40. package/packages/modules/src/firebase/ajv.ts +2 -1
  41. package/packages/modules/src/firebase/call-app-module.ts +5 -0
  42. package/packages/modules/src/firebase/handle-module.ts +5 -1
  43. package/packages/modules/src/firebase/serve-modules-api.ts +5 -3
  44. package/packages/passport/lib/firebase/handle-passport.js +96 -92
  45. package/packages/passport/lib/firebase/serve-passport-api.js +35 -34
  46. package/packages/passport/lib/firebase.js +5 -7
  47. package/packages/passport/lib/index.js +2 -1
  48. package/packages/passport/package.json +1 -1
  49. package/packages/ssr/lib/firebase/serve-storefront.js +37 -55
  50. package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
  51. package/packages/ssr/lib/firebase.js +2 -4
  52. package/packages/ssr/lib/index.js +1 -2
  53. package/packages/ssr/package.json +1 -1
  54. package/packages/ssr/src/firebase/serve-storefront.ts +13 -36
  55. package/packages/storefront/astro.config.mjs +2 -0
  56. package/packages/storefront/dist/client/LoginModal.d6b935cf.js +1 -0
  57. package/packages/storefront/dist/client/assets/{_...98510c96.css → _...27b7eb4d.css} +1 -1
  58. package/packages/storefront/dist/client/assets/_...b3f65c5c.css +1 -0
  59. package/packages/storefront/dist/client/assets/fallback-index.90217cf0.css +1 -0
  60. package/packages/storefront/dist/client/assets/{404.530428e5.css → fallback.9cd2ed3f.css} +1 -1
  61. package/packages/storefront/dist/client/assets/{index.53a3a3e0.css → index.c5a9ea80.css} +1 -1
  62. package/packages/storefront/dist/client/chunks/index.esm.69f70489.js +1726 -0
  63. package/packages/storefront/dist/client/chunks/index.esm2017.1194d1a1.js +457 -0
  64. package/packages/storefront/dist/client/chunks/runtime-core.esm-bundler.a7337834.js +1 -0
  65. package/packages/storefront/dist/client/client.80b904f3.js +1 -0
  66. package/packages/storefront/dist/client/hoisted.24787260.js +376 -0
  67. package/packages/storefront/dist/server/entry.mjs +672 -144
  68. package/packages/storefront/package.json +13 -11
  69. package/packages/storefront/src/assets/firebaseui.css +648 -0
  70. package/packages/storefront/src/env.d.ts +1 -0
  71. package/packages/storefront/src/{components → lib/components}/Card.astro +0 -0
  72. package/packages/storefront/src/lib/components/LoginModal.vue +89 -0
  73. package/packages/storefront/src/lib/layouts/Layout.astro +84 -0
  74. package/packages/storefront/src/lib/layouts/meta/Head.astro +7 -0
  75. package/packages/storefront/src/lib/layouts/meta/Json.astro +34 -0
  76. package/packages/storefront/src/lib/ssr-context.ts +131 -0
  77. package/packages/storefront/src/lib/views/[...slug].astro +77 -0
  78. package/packages/storefront/src/lib/views/app/index.astro +0 -0
  79. package/packages/storefront/src/{pages/404.astro → lib/views/fallback.astro} +6 -1
  80. package/packages/storefront/src/lib/views/index.astro +87 -0
  81. package/packages/storefront/src/pages/[...slug].astro +12 -76
  82. package/packages/storefront/src/pages/fallback.astro +13 -0
  83. package/packages/storefront/src/pages/index.astro +15 -79
  84. package/packages/storefront/storefront.config.mjs +23 -6
  85. package/packages/storefront/tsconfig.json +4 -1
  86. package/packages/types/package.json +1 -1
  87. package/packages/apps/tiny-erp/lib/event-to-tiny.js +0 -115
  88. package/packages/apps/tiny-erp/lib/event-to-tiny.js.map +0 -1
  89. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js +0 -79
  90. package/packages/apps/tiny-erp/lib/integration/after-tiny-queue.js.map +0 -1
  91. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +0 -84
  92. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +0 -1
  93. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js +0 -58
  94. package/packages/apps/tiny-erp/lib/integration/export-product-to-tiny.js.map +0 -1
  95. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +0 -7
  96. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +0 -1
  97. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +0 -92
  98. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +0 -1
  99. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +0 -158
  100. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +0 -1
  101. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +0 -46
  102. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +0 -1
  103. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +0 -193
  104. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +0 -1
  105. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +0 -199
  106. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +0 -1
  107. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +0 -129
  108. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +0 -1
  109. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js +0 -34
  110. package/packages/apps/tiny-erp/lib/integration/parsers/status-from-tiny.js.map +0 -1
  111. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js +0 -39
  112. package/packages/apps/tiny-erp/lib/integration/parsers/status-to-tiny.js.map +0 -1
  113. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js +0 -47
  114. package/packages/apps/tiny-erp/lib/integration/post-tiny-erp.js.map +0 -1
  115. package/packages/apps/tiny-erp/lib/tiny-erp.js +0 -18
  116. package/packages/apps/tiny-erp/lib/tiny-erp.js.map +0 -1
  117. package/packages/apps/tiny-erp/lib/tiny-webhook.js +0 -92
  118. package/packages/apps/tiny-erp/lib/tiny-webhook.js.map +0 -1
  119. package/packages/modules/lib/firebase/ajv.js +0 -33
  120. package/packages/modules/lib/firebase/ajv.js.map +0 -1
  121. package/packages/modules/lib/firebase/call-app-module.js +0 -130
  122. package/packages/modules/lib/firebase/call-app-module.js.map +0 -1
  123. package/packages/modules/lib/firebase/checkout.js +0 -1
  124. package/packages/modules/lib/firebase/checkout.js.map +0 -1
  125. package/packages/modules/lib/firebase/handle-module.js +0 -165
  126. package/packages/modules/lib/firebase/handle-module.js.map +0 -1
  127. package/packages/modules/lib/firebase/proxy-apps.js +0 -1
  128. package/packages/modules/lib/firebase/proxy-apps.js.map +0 -1
  129. package/packages/modules/lib/firebase/serve-modules-api.js +0 -57
  130. package/packages/modules/lib/firebase/serve-modules-api.js.map +0 -1
  131. package/packages/modules/lib/firebase.js +0 -13
  132. package/packages/modules/lib/firebase.js.map +0 -1
  133. package/packages/modules/lib/index.js +0 -25
  134. package/packages/modules/lib/index.js.map +0 -1
  135. package/packages/storefront/dist/client/assets/404-_...d4aa8aff.css +0 -1
  136. package/packages/storefront/dist/client/assets/404-index.d9230d24.css +0 -1
  137. package/packages/storefront/dist/client/client.6d48c590.js +0 -1
  138. package/packages/storefront/src/layouts/Layout.astro +0 -63
  139. package/packages/storefront/src/types.ts +0 -18
@@ -1,41 +1,42 @@
1
1
  import { logger } from 'firebase-functions';
2
- import { sendError, getAuthCustomerApi } from './handle-passport.js';
3
-
2
+ import { sendError, getAuthCustomerApi, } from './handle-passport.js';
4
3
  export default async (req, res, firestore, authFirebase, storeId) => {
5
- const { method } = req;
6
- if (method !== 'POST') {
7
- return res.sendStatus(405);
8
- }
9
- if (method === 'POST'
4
+ const { method } = req;
5
+ if (method !== 'POST') {
6
+ return res.sendStatus(405);
7
+ }
8
+ if (method === 'POST'
10
9
  && (!req.body || typeof req.body !== 'object' || Array.isArray(req.body))) {
11
- return res.sendStatus(400);
12
- }
13
- let { url } = req;
14
- if (url.endsWith('.json')) {
15
- url = url.slice(0, -5);
16
- }
17
- const endpoint = url.split('/')[1];
18
- // endpoint /token
19
- if (endpoint === 'token' && method === 'POST') {
20
- const { authtoken } = req.body;
21
- if (!firestore) {
22
- return sendError(res, 'Firestore not found', 500);
10
+ return res.sendStatus(400);
11
+ }
12
+ let { url } = req;
13
+ if (url.endsWith('.json')) {
14
+ url = url.slice(0, -5);
23
15
  }
24
- if (storeId < 100) {
25
- return sendError(res, 'Invalid store');
16
+ const endpoint = url.split('/')[1];
17
+ // endpoint /token
18
+ if (endpoint === 'token' && method === 'POST') {
19
+ const { authtoken } = req.body;
20
+ if (!firestore) {
21
+ return sendError(res, 'Firestore not found', 500);
22
+ }
23
+ if (storeId < 100) {
24
+ return sendError(res, 'Invalid store');
25
+ }
26
+ try {
27
+ const authCustomerApi = await getAuthCustomerApi(firestore, authtoken, authFirebase);
28
+ if (authCustomerApi !== null) {
29
+ return res.send(authCustomerApi);
30
+ }
31
+ return sendError(res, 'Invalid token, unauthorized', 401);
32
+ }
33
+ catch (e) {
34
+ logger.error(e);
35
+ return sendError(res);
36
+ }
26
37
  }
27
- try {
28
- const authCustomerApi = await getAuthCustomerApi(firestore, authtoken, authFirebase);
29
- if (authCustomerApi !== null) {
30
- return res.send(authCustomerApi);
31
- }
32
- return sendError(res, 'Invalid token, unauthorized', 401);
33
- } catch (e) {
34
- logger.error(e);
35
- return sendError(res);
38
+ else {
39
+ return res.sendStatus(400);
36
40
  }
37
- } else {
38
- return res.sendStatus(400);
39
- }
40
41
  };
41
- // # sourceMappingURL=serve-passport-api.js.map
42
+ //# sourceMappingURL=serve-passport-api.js.map
@@ -7,7 +7,6 @@ import { getAuth } from 'firebase-admin/auth';
7
7
  import { onRequest } from 'firebase-functions/v2/https';
8
8
  import config from '@cloudcommerce/firebase/lib/config';
9
9
  import servePassportApi from './firebase/serve-passport-api.js';
10
-
11
10
  // References:
12
11
  // https:// firebase.google.com/docs/auth/admin/manage-cookies
13
12
  // https://itnext.io/how-to-use-firebase-auth-with-a-custom-node-backend-99a106376c8a
@@ -16,13 +15,12 @@ import servePassportApi from './firebase/serve-passport-api.js';
16
15
  const authFirebase = getAuth();
17
16
  const firestore = getFirestore();
18
17
  const options = {
19
- ...config.get().httpsFunctionOptions,
20
- memory: '128MiB',
18
+ ...config.get().httpsFunctionOptions,
19
+ memory: '128MiB',
21
20
  };
22
-
23
21
  // eslint-disable-next-line import/prefer-default-export
24
22
  export const passport = onRequest(options, (req, res) => {
25
- const { storeId } = config.get();
26
- servePassportApi(req, res, firestore, authFirebase, storeId);
23
+ const { storeId } = config.get();
24
+ servePassportApi(req, res, firestore, authFirebase, storeId);
27
25
  });
28
- // # sourceMappingURL=firebase.js.map
26
+ //# sourceMappingURL=firebase.js.map
@@ -1 +1,2 @@
1
- // # sourceMappingURL=index.js.map
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "0.0.71",
4
+ "version": "0.0.74",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,67 +1,49 @@
1
1
  import { join as joinPath } from 'path';
2
2
  import { readFile } from 'fs/promises';
3
-
4
- const { STOREFRONT_BASE_DIR, STOREFRONT_LONG_CACHE } = process.env;
3
+ const { STOREFRONT_BASE_DIR } = process.env;
5
4
  const baseDir = STOREFRONT_BASE_DIR || process.cwd();
6
5
  const clientRoot = new URL(joinPath(baseDir, 'dist/client/'), import.meta.url);
7
- const isLongCache = String(STOREFRONT_LONG_CACHE).toLowerCase() === 'true';
8
-
9
6
  export default (req, res) => {
10
- const url = req.url.replace(/\?.*$/, '').replace(/\.html$/, '');
11
- const setStatusAndCache = (status, defaultCache) => {
12
- return res.status(status)
13
- .set('X-SSR-ID', `v1/${Math.random()}`)
14
- .set('Cache-Control', (typeof global.cache_control === 'function' && global.cache_control(status))
7
+ const url = req.url.replace(/\?.*$/, '').replace(/\.html$/, '');
8
+ const setStatusAndCache = (status, defaultCache) => {
9
+ return res.status(status)
10
+ .set('X-SSR-ID', `v1/${Math.random()}`)
11
+ .set('Cache-Control', (typeof global.cache_control === 'function' && global.cache_control(status))
15
12
  || defaultCache);
16
- };
17
- const redirect = (toUrl, status = 302) => {
18
- let sMaxAge = status === 301 ? 360 : 12;
19
- if (isLongCache) {
20
- sMaxAge *= 10;
21
- }
22
- let cacheControl = `public, max-age=30, s-maxage=${sMaxAge}`;
23
- if (status === 302) {
24
- cacheControl += ', proxy-revalidate';
25
- }
26
- setStatusAndCache(status, cacheControl)
27
- .set('Location', toUrl).end();
28
- };
29
- const fallback = (status = 404) => {
30
- if (url.slice(-1) === '/') {
31
- redirect(url.slice(0, -1));
32
- } else if (url !== '/404' && (/\/[^/.]+$/.test(url) || /\.x?html$/.test(url))) {
33
- setStatusAndCache(status, `public, max-age=${(isLongCache ? 120 : 30)}`)
34
- .send('<html><head>'
35
- + `<meta http-equiv="refresh" content="0; url=/404?url=${encodeURIComponent(url)}"/>`
36
- + '</head><body></body></html>');
37
- } else {
38
- setStatusAndCache(status, isLongCache
39
- ? 'public, max-age=60, s-maxage=86400'
40
- : 'public, max-age=60, s-maxage=300')
41
- .end();
42
- }
43
- };
13
+ };
14
+ const fallback = (err, status = 500) => {
15
+ if (url !== '/fallback' && (/\/[^/.]+$/.test(url) || /\.x?html$/.test(url))) {
16
+ setStatusAndCache(status, 'public, max-age=120')
17
+ .send('<html><head>'
18
+ + '<meta http-equiv="refresh" content="0; '
19
+ + `url=/fallback?status=${status}&url=${encodeURIComponent(url)}"/>`
20
+ + `</head><body>${err.toString()}</body></html>`);
21
+ }
22
+ else {
23
+ setStatusAndCache(status, 'public, max-age=120, s-maxage=600')
24
+ .send(err.toString());
25
+ }
26
+ };
44
27
  /*
45
28
  https://github.com/withastro/astro/blob/main/examples/ssr/server/server.mjs
46
29
  import { handler as ssrHandler } from '../dist/server/entry.mjs';
47
30
  global.ssr_handler = ssrHandler;
48
31
  */
49
- global.ssr_handler(req, res, async (err) => {
50
- if (err) {
51
- res.set('X-SSR-ERROR', err.stack);
52
- fallback(500);
53
- return;
54
- }
55
- const local = new URL(`.${url}`, clientRoot);
56
- try {
57
- const data = await readFile(local);
58
- setStatusAndCache(200, isLongCache
59
- ? 'public, max-age=60, s-maxage=604800'
60
- : 'public, max-age=60, s-maxage=600, stale-while-revalidate=2592000')
61
- .send(data);
62
- } catch {
63
- fallback();
64
- }
65
- });
32
+ global.ssr_handler(req, res, async (err) => {
33
+ if (err) {
34
+ res.set('X-SSR-Error', err.message);
35
+ fallback(err);
36
+ return;
37
+ }
38
+ const local = new URL(`.${url}`, clientRoot);
39
+ try {
40
+ const data = await readFile(local);
41
+ setStatusAndCache(200, 'public, max-age=60, s-maxage=600')
42
+ .send(data);
43
+ }
44
+ catch {
45
+ fallback(err, 404);
46
+ }
47
+ });
66
48
  };
67
- // # sourceMappingURL=serve-storefront.js.map
49
+ //# sourceMappingURL=serve-storefront.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve-storefront.js","sourceRoot":"","sources":["../../src/firebase/serve-storefront.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,EACJ,mBAAmB,EACnB,qBAAqB,GACtB,GAAG,OAAO,CAAC,GAAG,CAAC;AAEhB,MAAM,OAAO,GAAG,mBAAmB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACrD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/E,MAAM,WAAW,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;AAE3E,eAAe,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;IAC7C,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAEhE,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,YAAoB,EAAE,EA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CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAQ,EAAE,EAAE;QAC9C,IAAI,GAAG,EAAE;YACP,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;YACpC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACd,OAAO;SACR;QACD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;QAC7C,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;YACnC,iBAAiB,CAAC,GAAG,EAAE,kCAAkC,CAAC;iBACvD,IAAI,CAAC,IAAI,CAAC,CAAC;SACf;QAAC,MAAM;YACN,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;SACpB;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -4,10 +4,8 @@ import '@cloudcommerce/firebase/lib/init';
4
4
  import { onRequest } from 'firebase-functions/v2/https';
5
5
  import config from '@cloudcommerce/firebase/lib/config';
6
6
  import serveStorefront from './firebase/serve-storefront.js';
7
-
8
7
  const { httpsFunctionOptions } = config.get();
9
-
10
8
  export const ssr = onRequest(httpsFunctionOptions, (req, res) => {
11
- serveStorefront(req, res);
9
+ serveStorefront(req, res);
12
10
  });
13
- // # sourceMappingURL=firebase.js.map
11
+ //# sourceMappingURL=firebase.js.map
@@ -1,4 +1,3 @@
1
1
  import serveStorefront from './firebase/serve-storefront.js';
2
-
3
2
  export default serveStorefront;
4
- // # sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "0.0.71",
4
+ "version": "0.0.74",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -2,14 +2,9 @@ import type { Request, Response } from 'firebase-functions';
2
2
  import { join as joinPath } from 'path';
3
3
  import { readFile } from 'fs/promises';
4
4
 
5
- const {
6
- STOREFRONT_BASE_DIR,
7
- STOREFRONT_LONG_CACHE,
8
- } = process.env;
9
-
5
+ const { STOREFRONT_BASE_DIR } = process.env;
10
6
  const baseDir = STOREFRONT_BASE_DIR || process.cwd();
11
7
  const clientRoot = new URL(joinPath(baseDir, 'dist/client/'), import.meta.url);
12
- const isLongCache = String(STOREFRONT_LONG_CACHE).toLowerCase() === 'true';
13
8
 
14
9
  export default (req: Request, res: Response) => {
15
10
  const url = req.url.replace(/\?.*$/, '').replace(/\.html$/, '');
@@ -24,32 +19,16 @@ export default (req: Request, res: Response) => {
24
19
  );
25
20
  };
26
21
 
27
- const redirect = (toUrl: string, status = 302) => {
28
- let sMaxAge = status === 301 ? 360 : 12;
29
- if (isLongCache) {
30
- sMaxAge *= 10;
31
- }
32
- let cacheControl = `public, max-age=30, s-maxage=${sMaxAge}`;
33
- if (status === 302) {
34
- cacheControl += ', proxy-revalidate';
35
- }
36
- setStatusAndCache(status, cacheControl)
37
- .set('Location', toUrl).end();
38
- };
39
-
40
- const fallback = (status = 404) => {
41
- if (url.slice(-1) === '/') {
42
- redirect(url.slice(0, -1));
43
- } else if (url !== '/404' && (/\/[^/.]+$/.test(url) || /\.x?html$/.test(url))) {
44
- setStatusAndCache(status, `public, max-age=${(isLongCache ? 120 : 30)}`)
22
+ const fallback = (err: any, status = 500) => {
23
+ if (url !== '/fallback' && (/\/[^/.]+$/.test(url) || /\.x?html$/.test(url))) {
24
+ setStatusAndCache(status, 'public, max-age=120')
45
25
  .send('<html><head>'
46
- + `<meta http-equiv="refresh" content="0; url=/404?url=${encodeURIComponent(url)}"/>`
47
- + '</head><body></body></html>');
26
+ + '<meta http-equiv="refresh" content="0; '
27
+ + `url=/fallback?status=${status}&url=${encodeURIComponent(url)}"/>`
28
+ + `</head><body>${err.toString()}</body></html>`);
48
29
  } else {
49
- setStatusAndCache(status, isLongCache
50
- ? 'public, max-age=60, s-maxage=86400'
51
- : 'public, max-age=60, s-maxage=300')
52
- .end();
30
+ setStatusAndCache(status, 'public, max-age=120, s-maxage=600')
31
+ .send(err.toString());
53
32
  }
54
33
  };
55
34
 
@@ -60,19 +39,17 @@ export default (req: Request, res: Response) => {
60
39
  */
61
40
  global.ssr_handler(req, res, async (err: any) => {
62
41
  if (err) {
63
- res.set('X-SSR-ERROR', err.stack);
64
- fallback(500);
42
+ res.set('X-SSR-Error', err.message);
43
+ fallback(err);
65
44
  return;
66
45
  }
67
46
  const local = new URL(`.${url}`, clientRoot);
68
47
  try {
69
48
  const data = await readFile(local);
70
- setStatusAndCache(200, isLongCache
71
- ? 'public, max-age=60, s-maxage=604800'
72
- : 'public, max-age=60, s-maxage=600, stale-while-revalidate=2592000')
49
+ setStatusAndCache(200, 'public, max-age=60, s-maxage=600')
73
50
  .send(data);
74
51
  } catch {
75
- fallback();
52
+ fallback(err, 404);
76
53
  }
77
54
  });
78
55
  };
@@ -4,6 +4,7 @@ import * as dotenv from 'dotenv';
4
4
  import { defineConfig } from 'astro/config';
5
5
  import node from '@astrojs/node';
6
6
  import vue from '@astrojs/vue';
7
+ import image from '@astrojs/image';
7
8
  import partytown from '@astrojs/partytown';
8
9
  import prefetch from '@astrojs/prefetch';
9
10
  import sitemap from '@astrojs/sitemap';
@@ -17,6 +18,7 @@ export default defineConfig({
17
18
  adapter: node(),
18
19
  integrations: [
19
20
  vue(),
21
+ image(),
20
22
  partytown(),
21
23
  prefetch(),
22
24
  sitemap(),
@@ -0,0 +1 @@
1
+ import{r as w,c as j,a as g,t as k,b as T,F as x,o as N}from"./chunks/runtime-core.esm-bundler.a7337834.js";/* empty css */const v="modulepreload",M=function(r){return"/"+r},U={},D=function(c,a,d){return!a||a.length===0?c():Promise.all(a.map(u=>{if(u=M(u),u in U)return;U[u]=!0;const _=u.endsWith(".css"),y=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${y}`))return;const i=document.createElement("link");if(i.rel=_?"stylesheet":v,_||(i.as="script",i.crossOrigin=""),i.href=u,document.head.appendChild(i),_)return new Promise((E,A)=>{i.addEventListener("load",E),i.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${u}`)))})})).then(()=>c())};var C={exports:{}};function R(r){function c(e){return e!=="constructor"&&e!=="prototype"&&e!=="__proto__"}function a(e){let t=0;const n=e.length,o=new Array(n);for(t=0;t<n;++t)o[t]=m(e[t]);return o}function d(e){const t={},n=i(e);let o,s,l;for(o=0,s=n.length;o<s;++o)c(l=n[o])&&(t[l]=m(e[l]));return t}function u(e,t){const n=e.length,o=t.length;let s=0;const l=new Array(n+o);for(s=0;s<n;++s)l[s]=m(e[s]);for(s=0;s<o;++s)l[s+n]=m(t[s]);return l}const _=Object.prototype.propertyIsEnumerable;function y(e){const t=Object.keys(e),n=Object.getOwnPropertySymbols(e);for(let o=0,s=n.length;o<s;++o)_.call(e,n[o])&&t.push(n[o]);return t}const i=r&&r.symbols?y:Object.keys;function E(e){return typeof e=="object"&&e!==null&&!(e instanceof RegExp)&&!(e instanceof Date)}function A(e){return typeof e!="object"||e===null}function I(e){return typeof e!="object"||e===null||e instanceof RegExp||e instanceof Date}const L=r&&typeof r.mergeArray=="function"?r.mergeArray({clone:m,deepmerge:b,getKeys:i,isMergeableObject:E}):u;function m(e){return E(e)?Array.isArray(e)?a(e):d(e):e}function P(e,t){const n={},o=i(e),s=i(t);let l,h,f;for(l=0,h=o.length;l<h;++l)c(f=o[l])&&s.indexOf(f)===-1&&(n[f]=m(e[f]));for(l=0,h=s.length;l<h;++l)c(f=s[l])&&(f in e&&(o.indexOf(f)!==-1&&(n[f]=b(e[f],t[f])),!0)||(n[f]=m(t[f])));return n}function b(e,t){const n=Array.isArray(t),o=Array.isArray(e);return A(t)?t:I(e)?m(t):n&&o?L(e,t):n!==o?m(t):P(e,t)}function S(){switch(arguments.length){case 0:return{};case 1:return m(arguments[0]);case 2:return b(arguments[0],arguments[1])}let e;for(let t=0,n=arguments.length;t<n;++t)e=b(e,arguments[t]);return e}return r&&r.all?S:b}C.exports=R;C.exports.default=R;C.exports.deepmerge=R;const $="pt_br",B="BRL",Y="R$",F="BR",p={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0},K=C.exports(),O=globalThis.__cloudCommerce||{config:{}};globalThis.__cloudCommerce=O;const V={get(){return{lang:p.ECOM_LANG||$,currency:p.ECOM_CURRENCY||B,currencySymbol:p.ECOM_CURRENCY_SYMBOL||Y,countryCode:p.ECOM_COUNTRY_CODE||F,storeId:Number(p.ECOM_STORE_ID),...O.config}},set(r){O.config=K(O.config,r),r.storeId&&(p.ECOM_STORE_ID=r.storeId)}},G=async()=>{const{lang:r}=V.get();D(()=>Promise.resolve({}),[]),await Promise.all([D(()=>import("./chunks/index.esm.69f70489.js"),["chunks/index.esm.69f70489.js","chunks/index.esm2017.1194d1a1.js"]),new Promise((_,y)=>{const i=document.createElement("script");i.src=`https://www.gstatic.com/firebasejs/ui/6.0.1/firebase-ui-auth__${r}.js`,i.onload=_,i.onerror=y,i.async=!0,document.body.appendChild(i)})]);const{firebase:c,firebaseui:a}=window,d=new a.auth.AuthUI(c.auth());console.log(c.auth);const u={signInSuccessUrl:"<url-to-redirect-to-on-success>",signInOptions:[c.auth.EmailAuthProvider.PROVIDER_ID],tosUrl:"<your-tos-url>",privacyPolicyUrl:"<your-privacy-policy-url>"};d.start("#firebaseui-auth-container",u)},q={setup(){G();const r=w(0);return{count:r,add:()=>{r.value+=1},subtract:()=>{r.value-=1}}}},W=(r,c)=>{const a=r.__vccOpts||r;for(const[d,u]of c)a[d]=u;return a},z={class:"counter"},H={class:"counter-message"},J=g("div",{id:"firebaseui-auth-container"},null,-1);function Q(r,c,a,d,u,_){return N(),j(x,null,[g("div",z,[g("button",{onClick:c[0]||(c[0]=y=>d.subtract())},"-"),g("pre",null,k(d.count),1),g("button",{onClick:c[1]||(c[1]=y=>d.add())},"+")]),g("div",H,[T(r.$slots,"default")]),J],64)}const ee=W(q,[["render",Q]]);export{ee as default};
@@ -1 +1 @@
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}
1
+ :root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-P5QKJ2WB){margin:2rem 0}main:where(.astro-P5QKJ2WB){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-P5QKJ2WB){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-P5QKJ2WB){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-P5QKJ2WB) code:where(.astro-P5QKJ2WB){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-P5QKJ2WB){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
@@ -0,0 +1 @@
1
+ :root{--font-size-base: clamp(1rem, .34vw + .91rem, 1.19rem);--font-size-lg: clamp(1.2rem, .7vw + 1.2rem, 1.5rem);--font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);--color-text: hsl(12, 5%, 4%);--color-bg: hsl(10, 21%, 95%);--color-border: hsl(17, 24%, 90%)}html{font-family:system-ui,sans-serif;font-size:var(--font-size-base);color:var(--color-text);background-color:var(--color-bg)}body{margin:0}h1{font-size:var(--font-size-xl)}h2{font-size:var(--font-size-lg)}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.counter{display:grid;font-size:2em;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:2em;place-items:center}.counter-message{text-align:center}.firebaseui-container{background-color:#fff;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;color:#000000de;direction:ltr;font:16px Roboto,arial,sans-serif;margin:0 auto;max-width:360px;overflow:visible;position:relative;text-align:left;width:100%}.firebaseui-container.mdl-card{overflow:visible}.firebaseui-card-header{padding:24px 24px 0}.firebaseui-card-content,.firebaseui-card-footer{padding:0 24px}.firebaseui-card-actions{box-sizing:border-box;display:table;font-size:14px;padding:8px 24px 24px;text-align:left;width:100%}.firebaseui-form-links{display:table-cell;vertical-align:middle;width:100%}.firebaseui-form-actions{display:table-cell;text-align:right;white-space:nowrap;width:100%}.firebaseui-title,.firebaseui-subtitle{color:#000000de;direction:ltr;font-size:20px;font-weight:500;line-height:24px;margin:0;padding:0;text-align:left}.firebaseui-title{padding-bottom:16px}.firebaseui-subtitle{margin:16px 0}.firebaseui-text{color:#000000de;direction:ltr;font-size:16px;line-height:24px;text-align:left}.firebaseui-id-page-password-recovery-email-sent p.firebaseui-text{margin:16px 0}.firebaseui-text-emphasis{font-weight:700}.firebaseui-error{color:#dd2c00;direction:ltr;font-size:12px;line-height:16px;margin:0;text-align:left}.firebaseui-text-input-error{margin:-16px 0 16px}.firebaseui-error-wrapper{min-height:16px}.firebaseui-list-item{direction:ltr;margin:0;padding:0;text-align:left}.firebaseui-hidden{display:none}.firebaseui-relative-wrapper{position:relative}.firebaseui-label{color:#0000008a;direction:ltr;font-size:16px;text-align:left}.mdl-textfield--floating-label.is-focused .mdl-textfield__label,.mdl-textfield--floating-label.is-dirty .mdl-textfield__label{color:#757575}.firebaseui-input,.firebaseui-input-invalid{border-radius:0;color:#000000de;direction:ltr;font-size:16px;width:100%}input.firebaseui-input,input.firebaseui-input-invalid{direction:ltr;text-align:left}.firebaseui-input-invalid{border-color:#dd2c00}.firebaseui-textfield{width:100%}.firebaseui-textfield.mdl-textfield .firebaseui-input{border-color:#0000001f}.firebaseui-textfield.mdl-textfield .firebaseui-label:after{background-color:#3f51b5}.firebaseui-textfield-invalid.mdl-textfield .firebaseui-input{border-color:#dd2c00}.firebaseui-textfield-invalid.mdl-textfield .firebaseui-label:after{background-color:#dd2c00}.firebaseui-button{display:inline-block;height:36px;margin-left:8px;min-width:88px}.firebaseui-link{color:#4285f4;font-variant:normal;font-weight:400;text-decoration:none}.firebaseui-link:hover{text-decoration:underline}.firebaseui-indent{margin-left:1em}.firebaseui-tos{color:#757575;direction:ltr;font-size:12px;line-height:16px;margin-bottom:24px;margin-top:0;text-align:left}.firebaseui-provider-sign-in-footer>.firebaseui-tos{text-align:center}.firebaseui-tos-list{list-style:none;text-align:right}.firebaseui-inline-list-item{display:inline-block;margin-left:5px;margin-right:5px}.firebaseui-page-provider-sign-in,.firebaseui-page-select-tenant{background:inherit}.firebaseui-idp-list,.firebaseui-tenant-list{list-style:none;margin:1em 0;padding:0}.firebaseui-idp-button,.firebaseui-tenant-button{direction:ltr;font-weight:500;height:auto;line-height:normal;max-width:220px;min-height:40px;padding:8px 16px;text-align:left;width:100%}.firebaseui-idp-list>.firebaseui-list-item,.firebaseui-tenant-list>.firebaseui-list-item{margin-bottom:15px;text-align:center}.firebaseui-idp-icon-wrapper{display:table-cell;vertical-align:middle}.firebaseui-idp-icon{border:none;display:inline-block;height:18px;vertical-align:middle;width:18px}.firebaseui-idp-favicon{border:none;display:inline-block;height:14px;margin-right:5px;vertical-align:middle;width:14px}.firebaseui-idp-text{color:#fff;display:table-cell;font-size:14px;padding-left:16px;text-transform:none;vertical-align:middle}.firebaseui-idp-text.firebaseui-idp-text-long{display:table-cell}.firebaseui-idp-text.firebaseui-idp-text-short{display:none}@media (max-width: 268px){.firebaseui-idp-text.firebaseui-idp-text-long{display:none}.firebaseui-idp-text.firebaseui-idp-text-short{display:table-cell}}@media (max-width: 320px){.firebaseui-recaptcha-container>div>div{transform:scale(.9);-webkit-transform:scale(.9);transform-origin:0 0;-webkit-transform-origin:0 0}}.firebaseui-idp-google>.firebaseui-idp-text{color:#757575}[data-provider-id="yahoo.com"]>.firebaseui-idp-icon-wrapper>.firebaseui-idp-icon{height:22px;width:22px}.firebaseui-info-bar{background-color:#f9edbe;border:1px solid #f0c36d;box-shadow:0 2px 4px #0003;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,.2);left:10%;padding:8px 16px;position:absolute;right:10%;text-align:center;top:0}.firebaseui-info-bar-message{font-size:12px;margin:0}.firebaseui-dialog{box-sizing:border-box;color:#000000de;font:16px Roboto,arial,sans-serif;height:auto;max-height:fit-content;padding:24px;text-align:left}.firebaseui-dialog-icon-wrapper{display:table-cell;vertical-align:middle}.firebaseui-dialog-icon{float:left;height:40px;margin-right:24px;width:40px}.firebaseui-progress-dialog-message{display:table-cell;font-size:16px;font-weight:400;min-height:40px;vertical-align:middle}.firebaseui-progress-dialog-loading-icon{height:28px;margin:6px 30px 6px 6px;width:28px}.firebaseui-icon-done{background-image:url(https://www.gstatic.com/images/icons/material/system/2x/done_googgreen_36dp.png);background-position:center;background-repeat:no-repeat;background-size:36px 36px}.firebaseui-phone-number{display:flex}.firebaseui-country-selector{background-image:url(https://www.gstatic.com/images/icons/material/system/1x/arrow_drop_down_grey600_18dp.png);background-position:right center;background-repeat:no-repeat;background-size:18px auto;border-radius:0;border-bottom:1px solid rgba(0,0,0,.12);color:#000000de;flex-shrink:0;font-size:16px;font-weight:400;height:initial;line-height:normal;margin:20px 24px 20px 0;padding:4px 20px 4px 0;width:90px}.firebaseui-country-selector-flag{display:inline-block;margin-right:1ex}.firebaseui-flag{background-image:url(https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/flags_sprite_2x.png);background-size:100% auto;filter:drop-shadow(1px 1px 1px rgba(0,0,0,.54));height:14px;width:24px}.firebaseui-list-box-dialog{max-height:90%;overflow:auto;padding:8px 0 0}.firebaseui-list-box-actions{padding-bottom:8px}.firebaseui-list-box-icon-wrapper{display:table-cell;padding-right:24px;vertical-align:top}.firebaseui-list-box-label-wrapper{display:table-cell;vertical-align:top}.firebaseui-list-box-dialog-button{color:#000000de;direction:ltr;font-size:16px;font-weight:400;height:initial;line-height:normal;min-height:48px;padding:14px 24px;text-align:left;text-transform:none;width:100%}.firebaseui-phone-number-error{margin-left:114px}.mdl-progress.firebaseui-busy-indicator{height:2px;left:0;position:absolute;top:55px;width:100%}.mdl-spinner.firebaseui-busy-indicator{direction:initial;height:56px;left:0;margin:auto;position:absolute;right:0;top:30%;width:56px}.firebaseui-callback-indicator-container .firebaseui-busy-indicator{top:0}.firebaseui-callback-indicator-container{height:120px}.firebaseui-new-password-component{display:inline-block;position:relative;width:100%}.firebaseui-input-floating-button{background-position:center;background-repeat:no-repeat;display:block;height:24px;position:absolute;right:0;top:20px;width:24px}.firebaseui-input-toggle-on{background-image:url(https://www.gstatic.com/images/icons/material/system/1x/visibility_black_24dp.png)}.firebaseui-input-toggle-off{background-image:url(https://www.gstatic.com/images/icons/material/system/1x/visibility_off_black_24dp.png)}.firebaseui-input-toggle-focus{opacity:.87}.firebaseui-input-toggle-blur{opacity:.38}.firebaseui-recaptcha-wrapper{display:table;margin:0 auto;padding-bottom:8px}.firebaseui-recaptcha-container{display:table-cell}.firebaseui-recaptcha-error-wrapper{caption-side:bottom;display:table-caption}.firebaseui-change-phone-number-link{display:block}.firebaseui-resend-container{direction:ltr;margin:20px 0;text-align:center}.firebaseui-id-resend-countdown{color:#00000061}.firebaseui-id-page-phone-sign-in-start .firebaseui-form-actions div{float:left}@media (max-width: 480px){.firebaseui-container{box-shadow:none;max-width:none;width:100%}.firebaseui-card-header{border-bottom:1px solid #e0e0e0;margin-bottom:16px;padding:16px 24px 0}.firebaseui-title{padding-bottom:16px}.firebaseui-card-actions{padding-right:24px}.firebaseui-busy-indicator{top:0}}.mdl-textfield__label{font-weight:400;margin-bottom:0}.firebaseui-id-page-blank,.firebaseui-id-page-spinner{background:inherit;height:64px}.firebaseui-email-sent{background-image:url(https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/success_status.png);background-position:center;background-repeat:no-repeat;background-size:64px 64px;height:64px;margin-top:16px;text-align:center}.firebaseui-text-justify{text-align:justify}
@@ -0,0 +1 @@
1
+ :root{--link-gradient: linear-gradient(45deg, #4F39FA, #DA62C4 30%, var(--color-border) 60%)}.link-card:where(.astro-ZCG72YVN){list-style:none;display:flex;padding:.15rem;background-image:var(--link-gradient);background-size:400%;border-radius:.5rem;background-position:100%;transition:background-position .6s cubic-bezier(.22,1,.36,1)}.link-card:where(.astro-ZCG72YVN)>a:where(.astro-ZCG72YVN){width:100%;text-decoration:none;line-height:1.4;padding:1em 1.3em;border-radius:.35rem;color:var(--text-color);background-color:#fff;opacity:.8}h2:where(.astro-ZCG72YVN){margin:0;transition:color .6s cubic-bezier(.22,1,.36,1)}p:where(.astro-ZCG72YVN){margin-top:.75rem;margin-bottom:0}h2:where(.astro-ZCG72YVN) span:where(.astro-ZCG72YVN){display:inline-block;transition:transform .3s cubic-bezier(.22,1,.36,1)}.link-card:where(.astro-ZCG72YVN):is(:hover,:focus-within){background-position:0}.link-card:where(.astro-ZCG72YVN):is(:hover,:focus-within) h2:where(.astro-ZCG72YVN){color:#4f39fa}.link-card:where(.astro-ZCG72YVN):is(:hover,:focus-within) h2:where(.astro-ZCG72YVN) span:where(.astro-ZCG72YVN){transform:translate(2px)}
@@ -1 +1 @@
1
- :root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-7FYMG5AV){margin:2rem 0}main:where(.astro-7FYMG5AV){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-7FYMG5AV){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-7FYMG5AV){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-7FYMG5AV) code:where(.astro-7FYMG5AV){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-7FYMG5AV){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
1
+ :root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-BZIQPEHV){margin:2rem 0}main:where(.astro-BZIQPEHV){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-BZIQPEHV){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-BZIQPEHV){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-BZIQPEHV) code:where(.astro-BZIQPEHV){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-BZIQPEHV){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
@@ -1 +1 @@
1
- :root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-C3E44E3K){margin:2rem 0}main:where(.astro-C3E44E3K){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-C3E44E3K){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-C3E44E3K){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-C3E44E3K) code:where(.astro-C3E44E3K){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-C3E44E3K){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
1
+ :root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-EBY2X3Y6){margin:2rem 0}main:where(.astro-EBY2X3Y6){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-EBY2X3Y6){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-EBY2X3Y6){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-EBY2X3Y6) code:where(.astro-EBY2X3Y6){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-EBY2X3Y6){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}