cloudcommerce 0.0.71 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -0
- package/CHANGELOG.md +16 -0
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/CHANGELOG.md +1 -0
- package/packages/apps/frenet/README.md +1 -0
- package/packages/apps/frenet/lib/frenet.d.ts +2 -0
- package/packages/apps/frenet/lib/frenet.js +6 -0
- package/packages/apps/frenet/lib/frenet.js.map +1 -0
- package/packages/apps/frenet/lib/index.d.ts +1 -0
- package/packages/apps/frenet/lib/index.js +2 -0
- package/packages/apps/frenet/lib/index.js.map +1 -0
- package/packages/apps/frenet/lib-mjs/calculate-frenet.mjs +152 -0
- package/packages/apps/frenet/package.json +28 -0
- package/packages/apps/frenet/src/frenet.ts +7 -0
- package/packages/apps/frenet/src/index.ts +1 -0
- package/packages/apps/frenet/tsconfig.json +6 -0
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/lib/config.js +9 -8
- package/packages/config/lib/config.js.map +1 -1
- package/packages/config/package.json +1 -1
- package/packages/config/src/config.ts +11 -10
- package/packages/events/package.json +1 -1
- package/packages/firebase/lib/config.d.ts +3 -0
- package/packages/firebase/lib/config.js +3 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +3 -0
- package/packages/modules/lib/firebase/call-app-module.js +5 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/package.json +2 -1
- package/packages/modules/src/firebase/call-app-module.ts +5 -0
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +6 -5
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/firebase/serve-storefront.ts +6 -5
- package/packages/storefront/dist/client/assets/{404-_...d4aa8aff.css → 404-500-_...d4aa8aff.css} +0 -0
- package/packages/storefront/dist/client/assets/{404-index.d9230d24.css → 404-500-index.d9230d24.css} +0 -0
- package/packages/storefront/dist/client/assets/{index.53a3a3e0.css → 404.b3ead908.css} +1 -1
- package/packages/storefront/dist/client/assets/{404.530428e5.css → 500.d5d7700b.css} +1 -1
- package/packages/storefront/dist/client/assets/{_...98510c96.css → _...c08e0a75.css} +1 -1
- package/packages/storefront/dist/client/assets/index.9745690c.css +1 -0
- package/packages/storefront/dist/server/entry.mjs +398 -115
- package/packages/storefront/package.json +3 -3
- package/packages/storefront/src/env.d.ts +1 -0
- package/packages/storefront/src/{components → lib/components}/Card.astro +0 -0
- package/packages/storefront/src/lib/components/LoginModal.vue +56 -0
- package/packages/storefront/src/{layouts → lib/layouts}/Layout.astro +8 -11
- package/packages/storefront/src/lib/layouts/meta/Head.astro +7 -0
- package/packages/storefront/src/lib/layouts/meta/Json.astro +34 -0
- package/packages/storefront/src/lib/ssr-context.ts +107 -0
- package/packages/storefront/src/lib/views/404.astro +79 -0
- package/packages/storefront/src/lib/views/500.astro +79 -0
- package/packages/storefront/src/lib/views/[...slug].astro +77 -0
- package/packages/storefront/src/lib/views/app/index.astro +0 -0
- package/packages/storefront/src/lib/views/index.astro +87 -0
- package/packages/storefront/src/pages/404.astro +10 -71
- package/packages/storefront/src/pages/500.astro +13 -0
- package/packages/storefront/src/pages/[...slug].astro +7 -76
- package/packages/storefront/src/pages/index.astro +10 -79
- package/packages/storefront/storefront.config.mjs +23 -6
- package/packages/storefront/tsconfig.json +4 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/src/types.ts +0 -18
|
@@ -38,15 +38,16 @@ export default (req: Request, res: Response) => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const fallback = (status = 404) => {
|
|
41
|
-
|
|
41
|
+
const is404 = status === 404;
|
|
42
|
+
if (is404 && url.slice(-1) === '/') {
|
|
42
43
|
redirect(url.slice(0, -1));
|
|
43
|
-
} else if (url !==
|
|
44
|
+
} else if (url !== `/${status}` && (/\/[^/.]+$/.test(url) || /\.x?html$/.test(url))) {
|
|
44
45
|
setStatusAndCache(status, `public, max-age=${(isLongCache ? 120 : 30)}`)
|
|
45
46
|
.send('<html><head>'
|
|
46
|
-
+ `<meta http-equiv="refresh" content="0; url
|
|
47
|
+
+ `<meta http-equiv="refresh" content="0; url=/${status}?url=${encodeURIComponent(url)}"/>`
|
|
47
48
|
+ '</head><body></body></html>');
|
|
48
49
|
} else {
|
|
49
|
-
setStatusAndCache(status, isLongCache
|
|
50
|
+
setStatusAndCache(status, isLongCache && is404
|
|
50
51
|
? 'public, max-age=60, s-maxage=86400'
|
|
51
52
|
: 'public, max-age=60, s-maxage=300')
|
|
52
53
|
.end();
|
|
@@ -60,7 +61,7 @@ export default (req: Request, res: Response) => {
|
|
|
60
61
|
*/
|
|
61
62
|
global.ssr_handler(req, res, async (err: any) => {
|
|
62
63
|
if (err) {
|
|
63
|
-
res.set('X-SSR-
|
|
64
|
+
res.set('X-SSR-Error', err.stack);
|
|
64
65
|
fallback(500);
|
|
65
66
|
return;
|
|
66
67
|
}
|
package/packages/storefront/dist/client/assets/{404-_...d4aa8aff.css → 404-500-_...d4aa8aff.css}
RENAMED
|
File without changes
|
package/packages/storefront/dist/client/assets/{404-index.d9230d24.css → 404-500-index.d9230d24.css}
RENAMED
|
File without changes
|
|
@@ -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-DJT3DWAO){margin:2rem 0}main:where(.astro-DJT3DWAO){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-DJT3DWAO){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-DJT3DWAO){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-DJT3DWAO) code:where(.astro-DJT3DWAO){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-DJT3DWAO){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-
|
|
1
|
+
:root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-NR6LLUHL){margin:2rem 0}main:where(.astro-NR6LLUHL){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-NR6LLUHL){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-NR6LLUHL){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-NR6LLUHL) code:where(.astro-NR6LLUHL){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-NR6LLUHL){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-
|
|
1
|
+
:root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-JWBYURAL){margin:2rem 0}main:where(.astro-JWBYURAL){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-JWBYURAL){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-JWBYURAL){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-JWBYURAL) code:where(.astro-JWBYURAL){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-JWBYURAL){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--astro-gradient: linear-gradient(0deg,#4F39FA, #DA62C4)}h1:where(.astro-FWWSR4V6){margin:2rem 0}main:where(.astro-FWWSR4V6){margin:auto;padding:1em;max-width:60ch}.text-gradient:where(.astro-FWWSR4V6){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-FWWSR4V6){line-height:1.6;margin:1rem 0;background:#4F39FA;padding:1rem;border-radius:.4rem;color:var(--color-bg)}.instructions:where(.astro-FWWSR4V6) code:where(.astro-FWWSR4V6){font-size:.875em;border:.1em solid var(--color-border);border-radius:4px;padding:.15em .25em}.link-card-grid:where(.astro-FWWSR4V6){display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:1rem;padding:0}
|