cloudcommerce 0.34.0 → 0.35.1
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 +41 -0
- package/action.yml +11 -3
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/~fallback.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +6 -6
- package/packages/api/lib/api.js +1 -1
- package/packages/api/lib/api.js.map +1 -1
- package/packages/api/package.json +1 -1
- package/packages/api/src/api.ts +1 -1
- package/packages/apps/affilate-program/package.json +2 -2
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +2 -2
- package/packages/apps/fb-conversions/package.json +2 -2
- package/packages/apps/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/lib/google-analytics-events.js +4 -4
- package/packages/apps/google-analytics/lib/google-analytics-events.js.map +1 -1
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/google-analytics/src/google-analytics-events.ts +4 -4
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/pagarme-v5/package.json +2 -2
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/package.json +4 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +1 -1
- package/packages/events/package.json +2 -2
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +2 -2
- package/packages/passport/package.json +2 -2
- package/packages/ssr/lib/analytics/send-to-ga4.js +44 -0
- package/packages/ssr/lib/analytics/send-to-ga4.js.map +1 -0
- package/packages/ssr/lib/analytics/send-to-meta.js +44 -0
- package/packages/ssr/lib/analytics/send-to-meta.js.map +1 -0
- package/packages/ssr/lib/analytics/send-to-tiktok.js +44 -0
- package/packages/ssr/lib/analytics/send-to-tiktok.js.map +1 -0
- package/packages/ssr/lib/analytics-events.js +52 -24
- package/packages/ssr/lib/analytics-events.js.map +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +16 -3
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +6 -5
- package/packages/ssr/src/analytics/send-to-ga4.ts +56 -0
- package/packages/ssr/src/analytics/send-to-meta.ts +50 -0
- package/packages/ssr/src/analytics/send-to-tiktok.ts +49 -0
- package/packages/ssr/src/analytics-events.ts +57 -27
- package/packages/ssr/src/firebase/serve-storefront.ts +17 -3
- package/packages/storefront/dist/client/_astro/AccountPage.700be123.js +1 -0
- package/packages/storefront/dist/client/_astro/{CartSidebar.8151e4ee.js → CartSidebar.430b55df.js} +1 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.bd684ed8.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.06e0f831.js +1 -0
- package/packages/storefront/dist/client/_astro/{Prices.311303d8.js → Prices.0e829c31.js} +1 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.06da998d.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.3f4f38b5.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.bf82838b.js +1 -0
- package/packages/storefront/dist/client/_astro/QuantitySelector.ebf60845.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.b6aa5ef7.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.2d6e361a.js +4 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.f75743ee.js +1 -0
- package/packages/storefront/dist/client/_astro/_slug_.e7cac999.css +1 -0
- package/packages/storefront/dist/client/_astro/client.41b42098.js +1 -0
- package/packages/storefront/dist/client/_astro/customer-session.5ab9ab1a.js +1 -0
- package/packages/storefront/dist/client/_astro/ecom-utils.5cbfb95e.js +1 -0
- package/packages/storefront/dist/client/_astro/{format-money.8962a5ab.js → format-money.9cf6b04d.js} +1 -1
- package/packages/storefront/dist/client/_astro/{hoisted.57d8d9d0.js → hoisted.085a62c9.js} +1 -1
- package/packages/storefront/dist/client/_astro/hoisted.799e5593.js +1 -0
- package/packages/storefront/dist/client/_astro/{i18n.78f362d9.js → i18n.29216eeb.js} +1 -1
- package/packages/storefront/dist/client/_astro/{img.bfbd75a8.js → img.4f23a3dd.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.570b84fe.js +1 -0
- package/packages/storefront/dist/client/_astro/index.8ac1db99.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.3c447a07.js → modules-info.55780599.js} +1 -1
- package/packages/storefront/dist/client/_astro/name.01410784.js +1 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.d9f601dd.js +1 -0
- package/packages/storefront/dist/client/_astro/{use-analytics.d0c184ef.js → use-analytics.cc95e346.js} +1 -1
- package/packages/storefront/dist/client/_astro/{use-product-card.e0990572.js → use-product-card.437911bb.js} +1 -1
- package/packages/storefront/dist/server/chunks/{CartSidebar_03b51b57.mjs → CartSidebar_eab28771.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/SearchModal_f66549d4.mjs +147 -0
- package/packages/storefront/dist/server/chunks/{_.._4def02ff.mjs → _.._5a781fb3.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{account_2ee873cf.mjs → account_519edb70.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/astro/{assets-service_66a9c838.mjs → assets-service_a9d9ab5f.mjs} +58 -10
- package/packages/storefront/dist/server/chunks/{astro_8447f017.mjs → astro_d98f7186.mjs} +7 -1
- package/packages/storefront/dist/server/chunks/{index_5dcbbe32.mjs → index_10e14f85.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{index_37bacd45.mjs → index_5e3ed8a0.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{node_b3ae36f1.mjs → node_1119b0d1.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{__80fd1c60.mjs → __93ade2dd.mjs} +485 -224
- package/packages/storefront/dist/server/chunks/pages/account_e5d410a7.mjs +28 -0
- package/packages/storefront/dist/server/chunks/pages/{index_8e1d063c.mjs → index_7e25afc1.mjs} +29 -8
- package/packages/storefront/dist/server/chunks/pages/node_bd378ac0.mjs +93 -0
- package/packages/storefront/dist/server/chunks/pages/{~fallback_6ff698cd.mjs → ~fallback_73578d2f.mjs} +16 -6
- package/packages/storefront/dist/server/chunks/{~fallback_7c4b84d5.mjs → ~fallback_41122b9b.mjs} +1 -1
- package/packages/storefront/dist/server/entry.mjs +8 -8
- package/packages/storefront/dist/server/{manifest_2019b8a9.mjs → manifest_6bc0c00d.mjs} +2 -2
- package/packages/storefront/dist/server/renderers.mjs +5 -3
- package/packages/storefront/package.json +8 -8
- package/packages/storefront/src/lib/assets/forms.css +35 -30
- package/packages/storefront/src/lib/components/Carousel.vue +3 -1
- package/packages/storefront/src/lib/components/CarouselControl.vue +1 -1
- package/packages/storefront/src/lib/components/Drawer.vue +45 -7
- package/packages/storefront/src/lib/components/globals/Fade.vue +1 -1
- package/packages/storefront/src/lib/composables/use-product-shelf.ts +1 -1
- package/packages/storefront/src/lib/scripts/vbeta-app.ts +25 -15
- package/packages/storefront/src/lib/ssr-context.ts +11 -8
- package/packages/storefront/src/lib/state/search-engine.ts +101 -0
- package/packages/storefront/src/lib/state/shopping-cart.ts +52 -65
- package/packages/storefront/src/lib/state/use-analytics.ts +2 -1
- package/packages/storefront/src/lib/state/use-storage.ts +5 -2
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/ssr/lib/analytics-providers/google-analytics.js +0 -48
- package/packages/ssr/lib/analytics-providers/google-analytics.js.map +0 -1
- package/packages/ssr/lib/analytics-providers/meta-conversions-api.js +0 -44
- package/packages/ssr/lib/analytics-providers/meta-conversions-api.js.map +0 -1
- package/packages/ssr/src/analytics-providers/google-analytics.ts +0 -67
- package/packages/ssr/src/analytics-providers/meta-conversions-api.ts +0 -57
- package/packages/storefront/dist/client/_astro/AccountPage.6ead88b1.js +0 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.46474cda.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.fbca6881.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductDetails.d66f9f7e.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.9536b4c1.js +0 -1
- package/packages/storefront/dist/client/_astro/QuantitySelector.e74e368a.js +0 -1
- package/packages/storefront/dist/client/_astro/SearchModal.83b73e0b.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.06f4d486.js +0 -4
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.dd1a60ce.js +0 -1
- package/packages/storefront/dist/client/_astro/_slug_.52cde7a0.css +0 -1
- package/packages/storefront/dist/client/_astro/client.7c1b0374.js +0 -1
- package/packages/storefront/dist/client/_astro/customer-session.2d173cc1.js +0 -1
- package/packages/storefront/dist/client/_astro/ecom-icon_12falx.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_15pqnO.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_t3guw.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-utils.c385a436.js +0 -1
- package/packages/storefront/dist/client/_astro/headphone_T2Jjc.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1CG18r.webp +0 -0
- package/packages/storefront/dist/client/_astro/hoisted.f16496bc.js +0 -1
- package/packages/storefront/dist/client/_astro/index.e02b88b7.js +0 -1
- package/packages/storefront/dist/client/_astro/index.e20e07e3.js +0 -1
- package/packages/storefront/dist/client/_astro/logo_1UBsBq.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1K5PE9.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1KIIl1.avif +0 -0
- package/packages/storefront/dist/client/_astro/name.3cd31c8b.js +0 -1
- package/packages/storefront/dist/client/_astro/passion_LHbe9.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z23MeUb.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1TtOHY.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1f5opX.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_IUskt.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Uxfdf.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z15uApA.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1Ap1Im.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1JT1HB.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_ZY9mtN.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_tMFW0.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1TgQXS.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2Nm1z.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_DIqwR.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z1IKDb2.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z29FI4V.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2kFHGk.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZkpPFI.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_jXzBi.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_x1l16.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1TSfW7.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1re32x.webp +0 -0
- package/packages/storefront/dist/client/_astro/shopping-cart.6b03b120.js +0 -1
- package/packages/storefront/dist/client/~fallback.html +0 -74
- package/packages/storefront/dist/client/~index.html +0 -120
- package/packages/storefront/dist/server/chunks/SearchModal_2afca4fe.mjs +0 -18
- package/packages/storefront/dist/server/chunks/pages/account_bfd9a66a.mjs +0 -21
- package/packages/storefront/dist/server/chunks/pages/node_530334cf.mjs +0 -160
- package/packages/storefront/dist/server/images.dist.csv +0 -30
- package/packages/storefront/dist/server/images.src.csv +0 -11
- package/packages/storefront/dist/server/static-builds.csv +0 -66
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { isRemotePath } from '@astrojs/internal-helpers/path';
|
|
2
|
-
import { readFile } from 'fs/promises';
|
|
3
|
-
import mime from 'mime/lite.js';
|
|
4
|
-
import 'os';
|
|
5
|
-
import { i as isESMImportedImage, g as getImage$1, a as getConfiguredImageService, b as isRemoteAllowed } from '../astro/assets-service_66a9c838.mjs';
|
|
6
|
-
import { d as createAstro, e as createComponent, A as AstroError, l as ImageMissingAlt, r as renderTemplate, m as maybeRenderHead, f as addAttribute, s as spreadAttributes } from '../astro_8447f017.mjs';
|
|
7
|
-
import 'clsx';
|
|
8
|
-
|
|
9
|
-
const fnv1a52 = (str) => {
|
|
10
|
-
const len = str.length;
|
|
11
|
-
let i = 0, t0 = 0, v0 = 8997, t1 = 0, v1 = 33826, t2 = 0, v2 = 40164, t3 = 0, v3 = 52210;
|
|
12
|
-
while (i < len) {
|
|
13
|
-
v0 ^= str.charCodeAt(i++);
|
|
14
|
-
t0 = v0 * 435;
|
|
15
|
-
t1 = v1 * 435;
|
|
16
|
-
t2 = v2 * 435;
|
|
17
|
-
t3 = v3 * 435;
|
|
18
|
-
t2 += v0 << 8;
|
|
19
|
-
t3 += v1 << 8;
|
|
20
|
-
t1 += t0 >>> 16;
|
|
21
|
-
v0 = t0 & 65535;
|
|
22
|
-
t2 += t1 >>> 16;
|
|
23
|
-
v1 = t1 & 65535;
|
|
24
|
-
v3 = t3 + (t2 >>> 16) & 65535;
|
|
25
|
-
v2 = t2 & 65535;
|
|
26
|
-
}
|
|
27
|
-
return (v3 & 15) * 281474976710656 + v2 * 4294967296 + v1 * 65536 + (v0 ^ v3 >> 4);
|
|
28
|
-
};
|
|
29
|
-
const etag = (payload, weak = false) => {
|
|
30
|
-
const prefix = weak ? 'W/"' : '"';
|
|
31
|
-
return prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '"';
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const $$Astro$1 = createAstro("https://demo.ecomplus.app");
|
|
35
|
-
const $$Image = createComponent(async ($$result, $$props, $$slots) => {
|
|
36
|
-
const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
|
|
37
|
-
Astro2.self = $$Image;
|
|
38
|
-
const props = Astro2.props;
|
|
39
|
-
if (props.alt === void 0 || props.alt === null) {
|
|
40
|
-
throw new AstroError(ImageMissingAlt);
|
|
41
|
-
}
|
|
42
|
-
if (typeof props.width === "string") {
|
|
43
|
-
props.width = parseInt(props.width);
|
|
44
|
-
}
|
|
45
|
-
if (typeof props.height === "string") {
|
|
46
|
-
props.height = parseInt(props.height);
|
|
47
|
-
}
|
|
48
|
-
const image = await getImage(props);
|
|
49
|
-
const additionalAttributes = {};
|
|
50
|
-
if (image.srcSet.values.length > 0) {
|
|
51
|
-
additionalAttributes.srcset = image.srcSet.attribute;
|
|
52
|
-
}
|
|
53
|
-
return renderTemplate`${maybeRenderHead()}<img${addAttribute(image.src, "src")}${spreadAttributes(additionalAttributes)}${spreadAttributes(image.attributes)}>`;
|
|
54
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/components/Image.astro", void 0);
|
|
55
|
-
|
|
56
|
-
const $$Astro = createAstro("https://demo.ecomplus.app");
|
|
57
|
-
const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
|
|
58
|
-
const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
|
|
59
|
-
Astro2.self = $$Picture;
|
|
60
|
-
const defaultFormats = ["webp"];
|
|
61
|
-
const defaultFallbackFormat = "png";
|
|
62
|
-
const specialFormatsFallback = ["gif", "svg", "jpg", "jpeg"];
|
|
63
|
-
const { formats = defaultFormats, pictureAttributes = {}, fallbackFormat, ...props } = Astro2.props;
|
|
64
|
-
if (props.alt === void 0 || props.alt === null) {
|
|
65
|
-
throw new AstroError(ImageMissingAlt);
|
|
66
|
-
}
|
|
67
|
-
const optimizedImages = await Promise.all(
|
|
68
|
-
formats.map(
|
|
69
|
-
async (format) => await getImage({ ...props, format, widths: props.widths, densities: props.densities })
|
|
70
|
-
)
|
|
71
|
-
);
|
|
72
|
-
let resultFallbackFormat = fallbackFormat ?? defaultFallbackFormat;
|
|
73
|
-
if (!fallbackFormat && isESMImportedImage(props.src) && specialFormatsFallback.includes(props.src.format)) {
|
|
74
|
-
resultFallbackFormat = props.src.format;
|
|
75
|
-
}
|
|
76
|
-
const fallbackImage = await getImage({
|
|
77
|
-
...props,
|
|
78
|
-
format: resultFallbackFormat,
|
|
79
|
-
widths: props.widths,
|
|
80
|
-
densities: props.densities
|
|
81
|
-
});
|
|
82
|
-
const imgAdditionalAttributes = {};
|
|
83
|
-
const sourceAdditionaAttributes = {};
|
|
84
|
-
if (props.sizes) {
|
|
85
|
-
sourceAdditionaAttributes.sizes = props.sizes;
|
|
86
|
-
}
|
|
87
|
-
if (fallbackImage.srcSet.values.length > 0) {
|
|
88
|
-
imgAdditionalAttributes.srcset = fallbackImage.srcSet.attribute;
|
|
89
|
-
}
|
|
90
|
-
return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttributes)}> ${Object.entries(optimizedImages).map(([_, image]) => {
|
|
91
|
-
const srcsetAttribute = props.densities || !props.densities && !props.widths ? `${image.src}${image.srcSet.values.length > 0 ? ", " + image.srcSet.attribute : ""}` : image.srcSet.attribute;
|
|
92
|
-
return renderTemplate`<source${addAttribute(srcsetAttribute, "srcset")}${addAttribute("image/" + image.options.format, "type")}${spreadAttributes(sourceAdditionaAttributes)}>`;
|
|
93
|
-
})} <img${addAttribute(fallbackImage.src, "src")}${spreadAttributes(imgAdditionalAttributes)}${spreadAttributes(fallbackImage.attributes)}> </picture>`;
|
|
94
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/astro/components/Picture.astro", void 0);
|
|
95
|
-
|
|
96
|
-
const imageConfig = {"service":{"entrypoint":"astro/assets/services/noop","config":{}},"domains":[],"remotePatterns":[],"endpoint":"astro/assets/endpoint/node"};
|
|
97
|
-
const assetsDir = new URL("file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/dist/client/");
|
|
98
|
-
const getImage = async (options) => await getImage$1(options, imageConfig);
|
|
99
|
-
|
|
100
|
-
async function loadLocalImage(src, url) {
|
|
101
|
-
const filePath = new URL("." + src, assetsDir);
|
|
102
|
-
let buffer = void 0;
|
|
103
|
-
try {
|
|
104
|
-
buffer = await readFile(filePath);
|
|
105
|
-
} catch (e) {
|
|
106
|
-
const sourceUrl = new URL(src, url.origin);
|
|
107
|
-
buffer = await loadRemoteImage(sourceUrl);
|
|
108
|
-
}
|
|
109
|
-
return buffer;
|
|
110
|
-
}
|
|
111
|
-
async function loadRemoteImage(src) {
|
|
112
|
-
try {
|
|
113
|
-
const res = await fetch(src);
|
|
114
|
-
if (!res.ok) {
|
|
115
|
-
return void 0;
|
|
116
|
-
}
|
|
117
|
-
return Buffer.from(await res.arrayBuffer());
|
|
118
|
-
} catch (err) {
|
|
119
|
-
return void 0;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const GET = async ({ request }) => {
|
|
123
|
-
try {
|
|
124
|
-
const imageService = await getConfiguredImageService();
|
|
125
|
-
if (!("transform" in imageService)) {
|
|
126
|
-
throw new Error("Configured image service is not a local service");
|
|
127
|
-
}
|
|
128
|
-
const url = new URL(request.url);
|
|
129
|
-
const transform = await imageService.parseURL(url, imageConfig);
|
|
130
|
-
if (!transform?.src) {
|
|
131
|
-
throw new Error("Incorrect transform returned by `parseURL`");
|
|
132
|
-
}
|
|
133
|
-
let inputBuffer = void 0;
|
|
134
|
-
if (isRemotePath(transform.src)) {
|
|
135
|
-
if (isRemoteAllowed(transform.src, imageConfig) === false) {
|
|
136
|
-
return new Response("Forbidden", { status: 403 });
|
|
137
|
-
}
|
|
138
|
-
inputBuffer = await loadRemoteImage(new URL(transform.src));
|
|
139
|
-
} else {
|
|
140
|
-
inputBuffer = await loadLocalImage(transform.src, url);
|
|
141
|
-
}
|
|
142
|
-
if (!inputBuffer) {
|
|
143
|
-
return new Response("Not Found", { status: 404 });
|
|
144
|
-
}
|
|
145
|
-
const { data, format } = await imageService.transform(inputBuffer, transform, imageConfig);
|
|
146
|
-
return new Response(data, {
|
|
147
|
-
status: 200,
|
|
148
|
-
headers: {
|
|
149
|
-
"Content-Type": mime.getType(format) ?? `image/${format}`,
|
|
150
|
-
"Cache-Control": "public, max-age=31536000",
|
|
151
|
-
ETag: etag(data.toString()),
|
|
152
|
-
Date: (/* @__PURE__ */ new Date()).toUTCString()
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
} catch (err) {
|
|
156
|
-
return new Response(`Server Error: ${err}`, { status: 500 });
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export { GET };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
ecom-icon_12falx.png,192,192
|
|
2
|
-
ecom-icon_15pqnO.png,512,512
|
|
3
|
-
ecom-icon_t3guw.png,32,32
|
|
4
|
-
logo_Z1K5PE9.png,300,71
|
|
5
|
-
rect8589_1TtOHY.png,640,159
|
|
6
|
-
rect8589_Uxfdf.png,1500,373
|
|
7
|
-
rect8589_Z15uApA.png,828,206
|
|
8
|
-
rect859_DIqwR.png,640,159
|
|
9
|
-
rect859_jXzBi.png,1500,373
|
|
10
|
-
rect859_Z1IKDb2.png,828,206
|
|
11
|
-
headphone_Z1CG18r.webp,480,320
|
|
12
|
-
logo_1UBsBq.webp,300,71
|
|
13
|
-
passion_LHbe9.webp,480,320
|
|
14
|
-
rect8589_1f5opX.webp,640,159
|
|
15
|
-
rect8589_IUskt.webp,1500,373
|
|
16
|
-
rect8589_Z1JT1HB.webp,828,206
|
|
17
|
-
rect859_x1l16.webp,828,206
|
|
18
|
-
rect859_Z29FI4V.webp,640,159
|
|
19
|
-
rect859_ZkpPFI.webp,1500,373
|
|
20
|
-
rect89_Z1re32x.webp,1201,311
|
|
21
|
-
headphone_T2Jjc.avif,480,320
|
|
22
|
-
logo_Z1KIIl1.avif,300,71
|
|
23
|
-
passion_Z23MeUb.avif,480,320
|
|
24
|
-
rect8589_tMFW0.avif,828,206
|
|
25
|
-
rect8589_Z1Ap1Im.avif,640,159
|
|
26
|
-
rect8589_ZY9mtN.avif,1500,373
|
|
27
|
-
rect859_1TgQXS.avif,1500,373
|
|
28
|
-
rect859_2Nm1z.avif,640,159
|
|
29
|
-
rect859_Z2kFHGk.avif,828,206
|
|
30
|
-
rect89_1TSfW7.avif,1201,311
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
img/icon.png,512,512
|
|
2
|
-
img/large-icon.png,1024,1024
|
|
3
|
-
img/uploads/ecom-icon.png,1024,1024
|
|
4
|
-
img/uploads/logo.png,411,97
|
|
5
|
-
img/uploads/og-image.png,1200,1200
|
|
6
|
-
img/uploads/rect8589.png,1500,373
|
|
7
|
-
img/uploads/rect859.png,1500,373
|
|
8
|
-
img/uploads/banner2.webp,1200,311
|
|
9
|
-
img/uploads/headphone.webp,480,320
|
|
10
|
-
img/uploads/passion.webp,480,320
|
|
11
|
-
img/uploads/rect89.webp,1201,311
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/_astro/AccountPage.6ead88b1.js
|
|
2
|
-
/_astro/afetch.f4507208.js
|
|
3
|
-
/_astro/CartSidebar.8151e4ee.js
|
|
4
|
-
/_astro/client.7c1b0374.js
|
|
5
|
-
/_astro/customer-session.2d173cc1.js
|
|
6
|
-
/_astro/ecom-icon_12falx.png
|
|
7
|
-
/_astro/ecom-icon_15pqnO.png
|
|
8
|
-
/_astro/ecom-icon_t3guw.png
|
|
9
|
-
/_astro/ecom-utils.c385a436.js
|
|
10
|
-
/_astro/firebase-app.992a296f.js
|
|
11
|
-
/_astro/format-money.8962a5ab.js
|
|
12
|
-
/_astro/headphone_T2Jjc.avif
|
|
13
|
-
/_astro/headphone_Z1CG18r.webp
|
|
14
|
-
/_astro/HeroSlider.46474cda.js
|
|
15
|
-
/_astro/hoisted.57d8d9d0.js
|
|
16
|
-
/_astro/hoisted.f16496bc.js
|
|
17
|
-
/_astro/i18n.78f362d9.js
|
|
18
|
-
/_astro/img.bfbd75a8.js
|
|
19
|
-
/_astro/img-sizes.41e0efe4.js
|
|
20
|
-
/_astro/index-61e5ac61.bdc8d0cd.js
|
|
21
|
-
/_astro/index.e02b88b7.js
|
|
22
|
-
/_astro/index.e20e07e3.js
|
|
23
|
-
/_astro/logo_1UBsBq.webp
|
|
24
|
-
/_astro/logo_Z1K5PE9.png
|
|
25
|
-
/_astro/logo_Z1KIIl1.avif
|
|
26
|
-
/_astro/modules-info.3c447a07.js
|
|
27
|
-
/_astro/name.3cd31c8b.js
|
|
28
|
-
/_astro/passion_LHbe9.webp
|
|
29
|
-
/_astro/passion_Z23MeUb.avif
|
|
30
|
-
/_astro/photoswipe.01431ec7.js
|
|
31
|
-
/_astro/photoswipe.esm.92c2d901.js
|
|
32
|
-
/_astro/photoswipe-lightbox.esm.c157838f.js
|
|
33
|
-
/_astro/PitchBar.fbca6881.js
|
|
34
|
-
/_astro/_plugin-vue_export-helper.dd1a60ce.js
|
|
35
|
-
/_astro/price.04ceb6c4.js
|
|
36
|
-
/_astro/Prices.311303d8.js
|
|
37
|
-
/_astro/ProductDetails.d66f9f7e.js
|
|
38
|
-
/_astro/ProductShelf.9536b4c1.js
|
|
39
|
-
/_astro/QuantitySelector.e74e368a.js
|
|
40
|
-
/_astro/rect8589_1f5opX.webp
|
|
41
|
-
/_astro/rect8589_1TtOHY.png
|
|
42
|
-
/_astro/rect8589_IUskt.webp
|
|
43
|
-
/_astro/rect8589_tMFW0.avif
|
|
44
|
-
/_astro/rect8589_Uxfdf.png
|
|
45
|
-
/_astro/rect8589_Z15uApA.png
|
|
46
|
-
/_astro/rect8589_Z1Ap1Im.avif
|
|
47
|
-
/_astro/rect8589_Z1JT1HB.webp
|
|
48
|
-
/_astro/rect8589_ZY9mtN.avif
|
|
49
|
-
/_astro/rect859_1TgQXS.avif
|
|
50
|
-
/_astro/rect859_2Nm1z.avif
|
|
51
|
-
/_astro/rect859_DIqwR.png
|
|
52
|
-
/_astro/rect859_jXzBi.png
|
|
53
|
-
/_astro/rect859_x1l16.webp
|
|
54
|
-
/_astro/rect859_Z1IKDb2.png
|
|
55
|
-
/_astro/rect859_Z29FI4V.webp
|
|
56
|
-
/_astro/rect859_Z2kFHGk.avif
|
|
57
|
-
/_astro/rect859_ZkpPFI.webp
|
|
58
|
-
/_astro/rect89_1TSfW7.avif
|
|
59
|
-
/_astro/rect89_Z1re32x.webp
|
|
60
|
-
/_astro/SearchModal.83b73e0b.js
|
|
61
|
-
/_astro/sf-utils.b04e1813.js
|
|
62
|
-
/_astro/ShopHeader.06f4d486.js
|
|
63
|
-
/_astro/shopping-cart.6b03b120.js
|
|
64
|
-
/_astro/_slug_.52cde7a0.css
|
|
65
|
-
/_astro/use-analytics.d0c184ef.js
|
|
66
|
-
/_astro/use-product-card.e0990572.js
|