@vue-storefront/next 8.0.0-next.4 → 8.0.0-next.7
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/dist/index.cjs +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -142,6 +142,7 @@ function createImageOptimizer(config) {
|
|
|
142
142
|
const hosts = resolveHosts(config.hosts);
|
|
143
143
|
const warnedMissingHosts = /* @__PURE__ */ new Set();
|
|
144
144
|
function loader({ quality, src, width }) {
|
|
145
|
+
if (require_env.env("NEXT_PUBLIC_IMAGE_OPTIMIZER_ENABLED") !== "true") return src;
|
|
145
146
|
for (const host of hosts) {
|
|
146
147
|
const mediaHost = require_env.env(host.mediaHostEnvName);
|
|
147
148
|
if (!mediaHost) {
|
|
@@ -174,6 +175,7 @@ function createImageOptimizer(config) {
|
|
|
174
175
|
function _GET() {
|
|
175
176
|
_GET = require_asyncToGenerator._asyncToGenerator(function* (_request, { params }) {
|
|
176
177
|
var _env, _upstream$headers$get;
|
|
178
|
+
if (require_env.env("NEXT_PUBLIC_IMAGE_OPTIMIZER_ENABLED") !== "true") return errorResponse("Image optimizer is disabled", 404);
|
|
177
179
|
const { host: hostKey, path } = yield params;
|
|
178
180
|
const host = hosts.find((entry) => entry.key === hostKey);
|
|
179
181
|
if (!host) return errorResponse(`Unknown image proxy host "${hostKey}"`, 404);
|
package/dist/index.mjs
CHANGED
|
@@ -140,6 +140,7 @@ function createImageOptimizer(config) {
|
|
|
140
140
|
const hosts = resolveHosts(config.hosts);
|
|
141
141
|
const warnedMissingHosts = /* @__PURE__ */ new Set();
|
|
142
142
|
function loader({ quality, src, width }) {
|
|
143
|
+
if (env("NEXT_PUBLIC_IMAGE_OPTIMIZER_ENABLED") !== "true") return src;
|
|
143
144
|
for (const host of hosts) {
|
|
144
145
|
const mediaHost = env(host.mediaHostEnvName);
|
|
145
146
|
if (!mediaHost) {
|
|
@@ -172,6 +173,7 @@ function createImageOptimizer(config) {
|
|
|
172
173
|
function _GET() {
|
|
173
174
|
_GET = _asyncToGenerator(function* (_request, { params }) {
|
|
174
175
|
var _env, _upstream$headers$get;
|
|
176
|
+
if (env("NEXT_PUBLIC_IMAGE_OPTIMIZER_ENABLED") !== "true") return errorResponse("Image optimizer is disabled", 404);
|
|
175
177
|
const { host: hostKey, path } = yield params;
|
|
176
178
|
const host = hosts.find((entry) => entry.key === hostKey);
|
|
177
179
|
if (!host) return errorResponse(`Unknown image proxy host "${hostKey}"`, 404);
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vuestorefront/enterprise.git"
|
|
8
8
|
},
|
|
9
|
-
"version": "8.0.0-next.
|
|
9
|
+
"version": "8.0.0-next.7",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/index.d.mts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"zustand": "^4.5.4"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@alokai/connect": "2.3.0-next.
|
|
43
|
+
"@alokai/connect": "2.3.0-next.10",
|
|
44
44
|
"@shared/typescript-config": "1.0.0",
|
|
45
45
|
"@types/react": "^19",
|
|
46
46
|
"@types/react-dom": "^19",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"vitest": "4.0.18"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@alokai/connect": "2.3.0-next.
|
|
58
|
+
"@alokai/connect": "2.3.0-next.10",
|
|
59
59
|
"next": "^16.0.0",
|
|
60
60
|
"react": "^19.0.0"
|
|
61
61
|
},
|