@commercetools-frontend/mc-scripts 27.4.0 → 27.4.2
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/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +12 -9
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +12 -9
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +12 -9
- package/dist/{build-538589f8.esm.js → build-2b934f0c.esm.js} +4 -5
- package/dist/{build-4bec1911.cjs.dev.js → build-b59ae957.cjs.dev.js} +4 -5
- package/dist/{build-4947dde1.cjs.prod.js → build-cebaad1c.cjs.prod.js} +4 -5
- package/dist/{build-vite-8cae71a0.esm.js → build-vite-1526e4f8.esm.js} +109 -20
- package/dist/{build-vite-837e7c94.cjs.dev.js → build-vite-2fb9320e.cjs.dev.js} +118 -20
- package/dist/{build-vite-b007241b.cjs.prod.js → build-vite-71889a4a.cjs.prod.js} +118 -20
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
- package/dist/{config-sync-847ba904.esm.js → config-sync-3be9dd65.esm.js} +4 -4
- package/dist/{config-sync-05b6c655.cjs.prod.js → config-sync-6707192b.cjs.prod.js} +4 -4
- package/dist/{config-sync-1b1cd062.cjs.dev.js → config-sync-7bd473d2.cjs.dev.js} +4 -4
- package/dist/{config-sync-ci-a466eac1.cjs.dev.js → config-sync-ci-3fabd319.cjs.dev.js} +4 -4
- package/dist/{config-sync-ci-e23e1a0c.esm.js → config-sync-ci-ceed6879.esm.js} +4 -4
- package/dist/{config-sync-ci-37b018f4.cjs.prod.js → config-sync-ci-eaa2c74c.cjs.prod.js} +4 -4
- package/dist/{config-sync-helpers-96a4e385.cjs.prod.js → config-sync-helpers-2f9ce5e7.cjs.prod.js} +1 -1
- package/dist/{config-sync-helpers-328a753c.esm.js → config-sync-helpers-4c1e6ef7.esm.js} +1 -1
- package/dist/{config-sync-helpers-9358fd5c.cjs.dev.js → config-sync-helpers-9e7101ca.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-21beaad3.esm.js → create-postcss-config-040fa794.esm.js} +1 -1
- package/dist/{create-postcss-config-5449cc23.cjs.dev.js → create-postcss-config-7cebb3e2.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-f816432f.cjs.prod.js → create-postcss-config-82c6d99e.cjs.prod.js} +1 -1
- package/dist/{create-webpack-config-for-development-c814a86b.esm.js → create-webpack-config-for-development-5fba3c63.esm.js} +2 -3
- package/dist/{create-webpack-config-for-development-c1bbf893.cjs.dev.js → create-webpack-config-for-development-835be72f.cjs.dev.js} +4 -5
- package/dist/{create-webpack-config-for-development-4aef0f7d.cjs.prod.js → create-webpack-config-for-development-9d0b5ccd.cjs.prod.js} +4 -5
- package/dist/{create-webpack-config-for-production-1ce27fee.esm.js → create-webpack-config-for-production-1c770191.esm.js} +2 -3
- package/dist/{create-webpack-config-for-production-9d3513bb.cjs.prod.js → create-webpack-config-for-production-8c3f894b.cjs.prod.js} +4 -5
- package/dist/{create-webpack-config-for-production-13725420.cjs.dev.js → create-webpack-config-for-production-ffeb4a22.cjs.dev.js} +4 -5
- package/dist/{credentials-storage-fcc77fb6.esm.js → credentials-storage-67deadc3.esm.js} +14 -10
- package/dist/{credentials-storage-6d592cd6.cjs.prod.js → credentials-storage-ea1c16dc.cjs.prod.js} +14 -10
- package/dist/{credentials-storage-c4c5980e.cjs.dev.js → credentials-storage-fd195144.cjs.dev.js} +14 -10
- package/dist/{deployment-previews-set-eb7f91c7.cjs.dev.js → deployment-previews-set-68c37d9d.cjs.dev.js} +3 -3
- package/dist/{deployment-previews-set-3e3dd21a.cjs.prod.js → deployment-previews-set-6dd7e367.cjs.prod.js} +3 -3
- package/dist/{deployment-previews-set-e4851a8c.esm.js → deployment-previews-set-add2d9c6.esm.js} +3 -3
- package/dist/{graphql-requests-85c0591e.cjs.dev.js → graphql-requests-24e04c13.cjs.dev.js} +2 -2
- package/dist/{graphql-requests-3cf2d374.cjs.prod.js → graphql-requests-5e31d639.cjs.prod.js} +2 -2
- package/dist/{graphql-requests-c17c5c77.esm.js → graphql-requests-c07e7b8f.esm.js} +2 -2
- package/dist/{login-2d035398.cjs.dev.js → login-a1ad5f07.cjs.dev.js} +2 -2
- package/dist/{login-69b7ff2d.esm.js → login-af2522fd.esm.js} +2 -2
- package/dist/{login-d3937863.cjs.prod.js → login-c05816f1.cjs.prod.js} +2 -2
- package/dist/{optimizations-bf991634.esm.js → optimizations-54382f7b.esm.js} +24 -9
- package/dist/{optimizations-fb93514f.cjs.prod.js → optimizations-56be74d6.cjs.dev.js} +24 -9
- package/dist/{optimizations-7789145e.cjs.dev.js → optimizations-da5a0cfa.cjs.prod.js} +24 -9
- package/dist/{package-6d9b67e1.esm.js → package-14789720.esm.js} +11 -12
- package/dist/{package-21b8dea0.cjs.dev.js → package-6dcc2c4f.cjs.dev.js} +11 -12
- package/dist/{package-bcffa3f9.cjs.prod.js → package-d75d6b9f.cjs.prod.js} +11 -12
- package/dist/serve-4062385a.esm.js +70 -0
- package/dist/serve-5a455e72.cjs.prod.js +81 -0
- package/dist/serve-b9ac0b0c.cjs.dev.js +81 -0
- package/dist/{start-936260c4.esm.js → start-c9b32028.esm.js} +4 -5
- package/dist/{start-47888d2b.cjs.prod.js → start-f52d8e68.cjs.prod.js} +4 -5
- package/dist/{start-3114422d.cjs.dev.js → start-f93cb36f.cjs.dev.js} +4 -5
- package/package.json +11 -12
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +5 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +5 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +5 -6
- package/dist/has-jsx-runtime-aa5d21ee.cjs.dev.js +0 -15
- package/dist/has-jsx-runtime-c3202df5.cjs.prod.js +0 -15
- package/dist/has-jsx-runtime-e3ecb09b.esm.js +0 -13
- package/dist/serve-38456e1b.cjs.dev.js +0 -67
- package/dist/serve-be1f9439.esm.js +0 -57
- package/dist/serve-cc4a766d.cjs.prod.js +0 -67
|
@@ -10,7 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var commander = require('commander');
|
|
11
11
|
var dotenv = require('dotenv');
|
|
12
12
|
var dotenvExpand = require('dotenv-expand');
|
|
13
|
-
var _package = require('../../dist/package-
|
|
13
|
+
var _package = require('../../dist/package-6dcc2c4f.cjs.dev.js');
|
|
14
14
|
var doesFileExist = require('../../dist/does-file-exist-eb86baca.cjs.dev.js');
|
|
15
15
|
require('node:fs');
|
|
16
16
|
|
|
@@ -54,7 +54,7 @@ async function run() {
|
|
|
54
54
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
55
55
|
console.log('');
|
|
56
56
|
}
|
|
57
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-068e9f73.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-
|
|
57
|
+
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-068e9f73.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-f93cb36f.cjs.dev.js'); });
|
|
58
58
|
await startCommand.default();
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -73,7 +73,7 @@ async function run() {
|
|
|
73
73
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
74
74
|
console.log('');
|
|
75
75
|
}
|
|
76
|
-
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-
|
|
76
|
+
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-2fb9320e.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-b59ae957.cjs.dev.js'); });
|
|
77
77
|
await buildCommand.default();
|
|
78
78
|
const shouldAlsoCompile = !options.buildOnly;
|
|
79
79
|
if (shouldAlsoCompile) {
|
|
@@ -109,8 +109,11 @@ async function run() {
|
|
|
109
109
|
|
|
110
110
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
111
111
|
process.env.NODE_ENV = 'production';
|
|
112
|
-
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-
|
|
113
|
-
await serveCommand.default();
|
|
112
|
+
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-b9ac0b0c.cjs.dev.js'); });
|
|
113
|
+
const server = await serveCommand.default();
|
|
114
|
+
const address = server.address();
|
|
115
|
+
const boundPort = address && typeof address === 'object' ? address.port : '?';
|
|
116
|
+
console.log(`Running at http://localhost:${boundPort}`);
|
|
114
117
|
});
|
|
115
118
|
|
|
116
119
|
// Command: login
|
|
@@ -125,7 +128,7 @@ async function run() {
|
|
|
125
128
|
|
|
126
129
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
127
130
|
process.env.NODE_ENV = 'production';
|
|
128
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
131
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-a1ad5f07.cjs.dev.js'); });
|
|
129
132
|
await loginCommand.default(options);
|
|
130
133
|
});
|
|
131
134
|
|
|
@@ -139,7 +142,7 @@ async function run() {
|
|
|
139
142
|
|
|
140
143
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
141
144
|
process.env.NODE_ENV = 'production';
|
|
142
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
145
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-7bd473d2.cjs.dev.js'); });
|
|
143
146
|
await configSyncCommand.default(options);
|
|
144
147
|
});
|
|
145
148
|
|
|
@@ -152,7 +155,7 @@ async function run() {
|
|
|
152
155
|
|
|
153
156
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
157
|
process.env.NODE_ENV = 'production';
|
|
155
|
-
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-
|
|
158
|
+
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-3fabd319.cjs.dev.js'); });
|
|
156
159
|
await configSyncCICommand.default(options);
|
|
157
160
|
});
|
|
158
161
|
|
|
@@ -166,7 +169,7 @@ async function run() {
|
|
|
166
169
|
|
|
167
170
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
168
171
|
process.env.NODE_ENV = 'production';
|
|
169
|
-
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-
|
|
172
|
+
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-68c37d9d.cjs.dev.js'); });
|
|
170
173
|
await deploymentsSetCommand.default(options);
|
|
171
174
|
});
|
|
172
175
|
commander.program.parse();
|
|
@@ -10,7 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var commander = require('commander');
|
|
11
11
|
var dotenv = require('dotenv');
|
|
12
12
|
var dotenvExpand = require('dotenv-expand');
|
|
13
|
-
var _package = require('../../dist/package-
|
|
13
|
+
var _package = require('../../dist/package-d75d6b9f.cjs.prod.js');
|
|
14
14
|
var doesFileExist = require('../../dist/does-file-exist-be53305d.cjs.prod.js');
|
|
15
15
|
require('node:fs');
|
|
16
16
|
|
|
@@ -54,7 +54,7 @@ async function run() {
|
|
|
54
54
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
55
55
|
console.log('');
|
|
56
56
|
}
|
|
57
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-29078b3a.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-
|
|
57
|
+
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-29078b3a.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-f52d8e68.cjs.prod.js'); });
|
|
58
58
|
await startCommand.default();
|
|
59
59
|
});
|
|
60
60
|
|
|
@@ -73,7 +73,7 @@ async function run() {
|
|
|
73
73
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
74
74
|
console.log('');
|
|
75
75
|
}
|
|
76
|
-
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-
|
|
76
|
+
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-71889a4a.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-cebaad1c.cjs.prod.js'); });
|
|
77
77
|
await buildCommand.default();
|
|
78
78
|
const shouldAlsoCompile = !options.buildOnly;
|
|
79
79
|
if (shouldAlsoCompile) {
|
|
@@ -109,8 +109,11 @@ async function run() {
|
|
|
109
109
|
|
|
110
110
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
111
111
|
process.env.NODE_ENV = 'production';
|
|
112
|
-
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-
|
|
113
|
-
await serveCommand.default();
|
|
112
|
+
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-5a455e72.cjs.prod.js'); });
|
|
113
|
+
const server = await serveCommand.default();
|
|
114
|
+
const address = server.address();
|
|
115
|
+
const boundPort = address && typeof address === 'object' ? address.port : '?';
|
|
116
|
+
console.log(`Running at http://localhost:${boundPort}`);
|
|
114
117
|
});
|
|
115
118
|
|
|
116
119
|
// Command: login
|
|
@@ -125,7 +128,7 @@ async function run() {
|
|
|
125
128
|
|
|
126
129
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
127
130
|
process.env.NODE_ENV = 'production';
|
|
128
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
131
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-c05816f1.cjs.prod.js'); });
|
|
129
132
|
await loginCommand.default(options);
|
|
130
133
|
});
|
|
131
134
|
|
|
@@ -139,7 +142,7 @@ async function run() {
|
|
|
139
142
|
|
|
140
143
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
141
144
|
process.env.NODE_ENV = 'production';
|
|
142
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
145
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-6707192b.cjs.prod.js'); });
|
|
143
146
|
await configSyncCommand.default(options);
|
|
144
147
|
});
|
|
145
148
|
|
|
@@ -152,7 +155,7 @@ async function run() {
|
|
|
152
155
|
|
|
153
156
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
157
|
process.env.NODE_ENV = 'production';
|
|
155
|
-
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-
|
|
158
|
+
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-eaa2c74c.cjs.prod.js'); });
|
|
156
159
|
await configSyncCICommand.default(options);
|
|
157
160
|
});
|
|
158
161
|
|
|
@@ -166,7 +169,7 @@ async function run() {
|
|
|
166
169
|
|
|
167
170
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
168
171
|
process.env.NODE_ENV = 'production';
|
|
169
|
-
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-
|
|
172
|
+
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-6dd7e367.cjs.prod.js'); });
|
|
170
173
|
await deploymentsSetCommand.default(options);
|
|
171
174
|
});
|
|
172
175
|
commander.program.parse();
|
|
@@ -6,7 +6,7 @@ import path from 'path';
|
|
|
6
6
|
import { program } from 'commander';
|
|
7
7
|
import dotenv from 'dotenv';
|
|
8
8
|
import dotenvExpand from 'dotenv-expand';
|
|
9
|
-
import { p as pkgJson } from '../../dist/package-
|
|
9
|
+
import { p as pkgJson } from '../../dist/package-14789720.esm.js';
|
|
10
10
|
import { d as doesFileExist } from '../../dist/does-file-exist-32618334.esm.js';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
|
|
@@ -40,7 +40,7 @@ async function run() {
|
|
|
40
40
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
41
41
|
console.log('');
|
|
42
42
|
}
|
|
43
|
-
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-7d1161e8.esm.js') : await import('../../dist/start-
|
|
43
|
+
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-7d1161e8.esm.js') : await import('../../dist/start-c9b32028.esm.js');
|
|
44
44
|
await startCommand.default();
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -59,7 +59,7 @@ async function run() {
|
|
|
59
59
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
60
60
|
console.log('');
|
|
61
61
|
}
|
|
62
|
-
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-
|
|
62
|
+
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-1526e4f8.esm.js') : await import('../../dist/build-2b934f0c.esm.js');
|
|
63
63
|
await buildCommand.default();
|
|
64
64
|
const shouldAlsoCompile = !options.buildOnly;
|
|
65
65
|
if (shouldAlsoCompile) {
|
|
@@ -95,8 +95,11 @@ async function run() {
|
|
|
95
95
|
|
|
96
96
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
97
97
|
process.env.NODE_ENV = 'production';
|
|
98
|
-
const serveCommand = await import('../../dist/serve-
|
|
99
|
-
await serveCommand.default();
|
|
98
|
+
const serveCommand = await import('../../dist/serve-4062385a.esm.js');
|
|
99
|
+
const server = await serveCommand.default();
|
|
100
|
+
const address = server.address();
|
|
101
|
+
const boundPort = address && typeof address === 'object' ? address.port : '?';
|
|
102
|
+
console.log(`Running at http://localhost:${boundPort}`);
|
|
100
103
|
});
|
|
101
104
|
|
|
102
105
|
// Command: login
|
|
@@ -111,7 +114,7 @@ async function run() {
|
|
|
111
114
|
|
|
112
115
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
113
116
|
process.env.NODE_ENV = 'production';
|
|
114
|
-
const loginCommand = await import('../../dist/login-
|
|
117
|
+
const loginCommand = await import('../../dist/login-af2522fd.esm.js');
|
|
115
118
|
await loginCommand.default(options);
|
|
116
119
|
});
|
|
117
120
|
|
|
@@ -125,7 +128,7 @@ async function run() {
|
|
|
125
128
|
|
|
126
129
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
127
130
|
process.env.NODE_ENV = 'production';
|
|
128
|
-
const configSyncCommand = await import('../../dist/config-sync-
|
|
131
|
+
const configSyncCommand = await import('../../dist/config-sync-3be9dd65.esm.js');
|
|
129
132
|
await configSyncCommand.default(options);
|
|
130
133
|
});
|
|
131
134
|
|
|
@@ -138,7 +141,7 @@ async function run() {
|
|
|
138
141
|
|
|
139
142
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
140
143
|
process.env.NODE_ENV = 'production';
|
|
141
|
-
const configSyncCICommand = await import('../../dist/config-sync-ci-
|
|
144
|
+
const configSyncCICommand = await import('../../dist/config-sync-ci-ceed6879.esm.js');
|
|
142
145
|
await configSyncCICommand.default(options);
|
|
143
146
|
});
|
|
144
147
|
|
|
@@ -152,7 +155,7 @@ async function run() {
|
|
|
152
155
|
|
|
153
156
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
157
|
process.env.NODE_ENV = 'production';
|
|
155
|
-
const deploymentsSetCommand = await import('../../dist/deployment-previews-set-
|
|
158
|
+
const deploymentsSetCommand = await import('../../dist/deployment-previews-set-add2d9c6.esm.js');
|
|
156
159
|
await deploymentsSetCommand.default(options);
|
|
157
160
|
});
|
|
158
161
|
program.parse();
|
|
@@ -8,7 +8,7 @@ import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';
|
|
|
8
8
|
import printBuildError from 'react-dev-utils/printBuildError';
|
|
9
9
|
import webpack from 'webpack';
|
|
10
10
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
11
|
-
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-
|
|
11
|
+
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-1c770191.esm.js';
|
|
12
12
|
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
13
13
|
import { d as doesFileExist } from './does-file-exist-32618334.esm.js';
|
|
14
14
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
@@ -38,11 +38,10 @@ import '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
|
38
38
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
39
39
|
import '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
40
40
|
import 'fs';
|
|
41
|
-
import './create-postcss-config-
|
|
41
|
+
import './create-postcss-config-040fa794.esm.js';
|
|
42
42
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
43
|
-
import './package-
|
|
44
|
-
import './
|
|
45
|
-
import './optimizations-bf991634.esm.js';
|
|
43
|
+
import './package-14789720.esm.js';
|
|
44
|
+
import './optimizations-54382f7b.esm.js';
|
|
46
45
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
47
46
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
48
47
|
import './vendors-to-transpile-7dc84a72.esm.js';
|
|
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
|
10
10
|
var printBuildError = require('react-dev-utils/printBuildError');
|
|
11
11
|
var webpack = require('webpack');
|
|
12
12
|
var assets = require('@commercetools-frontend/assets');
|
|
13
|
-
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-ffeb4a22.cjs.dev.js');
|
|
14
14
|
var paths = require('./paths-b76fc753.cjs.dev.js');
|
|
15
15
|
var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -40,11 +40,10 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
|
40
40
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
41
41
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
42
42
|
require('fs');
|
|
43
|
-
require('./create-postcss-config-
|
|
43
|
+
require('./create-postcss-config-7cebb3e2.cjs.dev.js');
|
|
44
44
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
45
|
-
require('./package-
|
|
46
|
-
require('./
|
|
47
|
-
require('./optimizations-7789145e.cjs.dev.js');
|
|
45
|
+
require('./package-6dcc2c4f.cjs.dev.js');
|
|
46
|
+
require('./optimizations-56be74d6.cjs.dev.js');
|
|
48
47
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
48
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
50
49
|
require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
|
10
10
|
var printBuildError = require('react-dev-utils/printBuildError');
|
|
11
11
|
var webpack = require('webpack');
|
|
12
12
|
var assets = require('@commercetools-frontend/assets');
|
|
13
|
-
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-8c3f894b.cjs.prod.js');
|
|
14
14
|
var paths = require('./paths-7768b440.cjs.prod.js');
|
|
15
15
|
var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -40,11 +40,10 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
|
40
40
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
41
41
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
42
42
|
require('fs');
|
|
43
|
-
require('./create-postcss-config-
|
|
43
|
+
require('./create-postcss-config-82c6d99e.cjs.prod.js');
|
|
44
44
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
45
|
-
require('./package-
|
|
46
|
-
require('./
|
|
47
|
-
require('./optimizations-fb93514f.cjs.prod.js');
|
|
45
|
+
require('./package-d75d6b9f.cjs.prod.js');
|
|
46
|
+
require('./optimizations-da5a0cfa.cjs.prod.js');
|
|
48
47
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
48
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
50
49
|
require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
@@ -10,8 +10,16 @@ import { build } from 'vite';
|
|
|
10
10
|
import { analyzer } from 'vite-bundle-analyzer';
|
|
11
11
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
12
12
|
import { generateTemplate } from '@commercetools-frontend/mc-html-template';
|
|
13
|
-
import { a as getViteCacheGroups } from './optimizations-bf991634.esm.js';
|
|
14
13
|
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
14
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
15
|
+
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
16
|
+
import _Map from '@babel/runtime-corejs3/core-js-stable/map';
|
|
17
|
+
import _keysInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/keys';
|
|
18
|
+
import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
19
|
+
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
20
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
21
|
+
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
22
|
+
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
15
23
|
import { compile } from '@formatjs/cli-lib';
|
|
16
24
|
import { createFilter } from '@rollup/pluginutils';
|
|
17
25
|
import { g as getI18nMessageFormat, h as handleMessageCompilationError } from './i18n-message-complilation-21d3b0aa.esm.js';
|
|
@@ -19,23 +27,10 @@ import fs from 'node:fs';
|
|
|
19
27
|
import path from 'node:path';
|
|
20
28
|
import { globSync } from 'glob';
|
|
21
29
|
import { v as vitePluginSvgr } from './vite-plugin-svgr-de6ee7da.esm.js';
|
|
22
|
-
import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
23
|
-
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
24
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
25
|
-
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
26
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
27
|
-
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
28
|
-
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
29
|
-
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
30
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
31
|
-
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
32
|
-
import '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
33
|
-
import '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
34
|
-
import 'chalk';
|
|
35
30
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
36
31
|
import 'fs';
|
|
37
32
|
import './does-file-exist-32618334.esm.js';
|
|
38
|
-
import '
|
|
33
|
+
import 'chalk';
|
|
39
34
|
import 'crypto';
|
|
40
35
|
import '@babel/runtime-corejs3/core-js/instance/match-all';
|
|
41
36
|
|
|
@@ -44,6 +39,94 @@ function nonNullable(value) {
|
|
|
44
39
|
return value !== null && value !== undefined;
|
|
45
40
|
}
|
|
46
41
|
|
|
42
|
+
// Structural subset of Rollup's OutputChunk / OutputBundle. We avoid
|
|
43
|
+
// importing the real types because Rollup is a transitive dep via Vite and
|
|
44
|
+
// is not declared in mc-scripts' own `dependencies`. We only touch three
|
|
45
|
+
// fields, so a local type is cheaper than adding a dep.
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Health check: after Rollup produces the output bundle, verify that the
|
|
49
|
+
* graph of cross-chunk imports is a DAG. Chunk-level cycles are a class of
|
|
50
|
+
* bug that doesn't fail at build time but crashes at runtime the moment one
|
|
51
|
+
* chunk reads a variable from its partner before that partner finishes
|
|
52
|
+
* initializing (TDZ). The historical failure mode was `@commercetools-uikit/icons`
|
|
53
|
+
* ↔ `app-shell` under `manualChunks`.
|
|
54
|
+
*/
|
|
55
|
+
function pluginChunkCycleCheck() {
|
|
56
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
57
|
+
const onCycle = options.onCycle ?? 'error';
|
|
58
|
+
return {
|
|
59
|
+
name: 'vite-plugin-chunk-cycle-check',
|
|
60
|
+
apply: 'build',
|
|
61
|
+
// `generateBundle` runs once the chunk graph is final but before files
|
|
62
|
+
// hit disk — the cheapest place to inspect it.
|
|
63
|
+
generateBundle(_, bundle) {
|
|
64
|
+
const cycles = findChunkCycles(bundle);
|
|
65
|
+
if (cycles.length === 0) return;
|
|
66
|
+
const formatted = _mapInstanceProperty(cycles).call(cycles, cycle => ` ${cycle.join(' → ')}`).join('\n');
|
|
67
|
+
const message = `Detected circular imports between output chunks:\n${formatted}\n` + `\nChunk cycles produce TDZ runtime errors (e.g. "X is undefined") ` + `because Rollup emits real ESM and one chunk can observe another ` + `chunk's not-yet-initialized top-level vars mid-evaluation. ` + `Review \`output.manualChunks\` or any plugin assigning chunks.`;
|
|
68
|
+
if (onCycle === 'error') {
|
|
69
|
+
this.error(message);
|
|
70
|
+
} else {
|
|
71
|
+
this.warn(message);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Pure graph algorithm extracted for direct unit testing. Builds the
|
|
79
|
+
* chunk-to-chunk import graph and returns every elementary cycle found.
|
|
80
|
+
*/
|
|
81
|
+
function findChunkCycles(bundle) {
|
|
82
|
+
var _context;
|
|
83
|
+
const chunks = _filterInstanceProperty(_context = _Object$values(bundle)).call(_context, entry => entry.type === 'chunk');
|
|
84
|
+
const graph = new _Map();
|
|
85
|
+
for (const chunk of chunks) {
|
|
86
|
+
// `imports` covers static imports between chunks. `dynamicImports` are
|
|
87
|
+
// deliberately ignored — those create legitimate lazy boundaries that
|
|
88
|
+
// can back-reference the parent without a runtime cycle.
|
|
89
|
+
graph.set(chunk.fileName, chunk.imports);
|
|
90
|
+
}
|
|
91
|
+
const WHITE = 0;
|
|
92
|
+
const GRAY = 1;
|
|
93
|
+
const BLACK = 2;
|
|
94
|
+
const color = new _Map();
|
|
95
|
+
for (const name of _keysInstanceProperty(graph).call(graph)) color.set(name, WHITE);
|
|
96
|
+
const cycles = [];
|
|
97
|
+
const seenCycleKeys = new _Set();
|
|
98
|
+
const pathStack = [];
|
|
99
|
+
const visit = node => {
|
|
100
|
+
color.set(node, GRAY);
|
|
101
|
+
pathStack.push(node);
|
|
102
|
+
for (const next of graph.get(node) ?? []) {
|
|
103
|
+
// Imports may reference assets or chunks outside our map (e.g. CSS).
|
|
104
|
+
if (!graph.has(next)) continue;
|
|
105
|
+
const nextColor = color.get(next);
|
|
106
|
+
if (nextColor === GRAY) {
|
|
107
|
+
var _context2, _context3, _context4;
|
|
108
|
+
const startIdx = _indexOfInstanceProperty(pathStack).call(pathStack, next);
|
|
109
|
+
const cycle = _concatInstanceProperty(_context2 = _sliceInstanceProperty(pathStack).call(pathStack, startIdx)).call(_context2, next);
|
|
110
|
+
// Normalize so we report each elementary cycle only once regardless
|
|
111
|
+
// of which node in the cycle DFS entered from.
|
|
112
|
+
const key = _sortInstanceProperty(_context3 = _sliceInstanceProperty(_context4 = [...cycle]).call(_context4, 0, -1)).call(_context3).join('|');
|
|
113
|
+
if (!seenCycleKeys.has(key)) {
|
|
114
|
+
seenCycleKeys.add(key);
|
|
115
|
+
cycles.push(cycle);
|
|
116
|
+
}
|
|
117
|
+
} else if (nextColor === WHITE) {
|
|
118
|
+
visit(next);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
pathStack.pop();
|
|
122
|
+
color.set(node, BLACK);
|
|
123
|
+
};
|
|
124
|
+
for (const node of _keysInstanceProperty(graph).call(graph)) {
|
|
125
|
+
if (color.get(node) === WHITE) visit(node);
|
|
126
|
+
}
|
|
127
|
+
return cycles;
|
|
128
|
+
}
|
|
129
|
+
|
|
47
130
|
// This script/function is injected into the `index.html` and used by Vite
|
|
48
131
|
// on runtime to build the assets URL (for example when using a separate CDN for the assets).
|
|
49
132
|
// Inspired by https://github.com/vitejs/vite/blob/main/playground/assets/vite.config-runtime-base.js
|
|
@@ -151,7 +234,6 @@ async function run() {
|
|
|
151
234
|
fs$1.writeFileSync(paths.appIndexHtml, html, {
|
|
152
235
|
encoding: 'utf8'
|
|
153
236
|
});
|
|
154
|
-
const appDependencies = require(paths.appPackageJson).dependencies;
|
|
155
237
|
await build({
|
|
156
238
|
root: paths.appRoot,
|
|
157
239
|
base: './',
|
|
@@ -170,9 +252,12 @@ async function run() {
|
|
|
170
252
|
// NOTE that after the build, Vite will write the `index.html` (template)
|
|
171
253
|
// at the `/public/public/index.html` location. See `fs.renameSync` below.
|
|
172
254
|
input: paths.appIndexHtml,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
255
|
+
// NOTE: we intentionally do not set `output.manualChunks` here. The
|
|
256
|
+
// declarative form does not claim transitive deps, so shared packages
|
|
257
|
+
// (babel-runtime, emotion, uikit internals) can land in a chunk that
|
|
258
|
+
// also imports back from another chunk — producing a TDZ cycle at
|
|
259
|
+
// runtime (historical "aM is undefined" crash with the icons/app-shell
|
|
260
|
+
// split). Rollup's default chunking handles co-location correctly.
|
|
176
261
|
// Reduce the memory footprint when building sourcemaps.
|
|
177
262
|
// https://github.com/vitejs/vite/issues/2433#issuecomment-1361094727
|
|
178
263
|
cache: false
|
|
@@ -218,7 +303,11 @@ async function run() {
|
|
|
218
303
|
outputDir: paths.appBuild,
|
|
219
304
|
patterns: ['*.react-*.svg'],
|
|
220
305
|
verbose: true // logs the files that are removed
|
|
221
|
-
}), vitePluginDynamicBaseAssetsGlobals(), vitePluginI18nMessageCompilation(),
|
|
306
|
+
}), vitePluginDynamicBaseAssetsGlobals(), vitePluginI18nMessageCompilation(),
|
|
307
|
+
// Fail the build if the emitted chunk graph contains circular imports.
|
|
308
|
+
// Chunk cycles are silent at build time but crash at runtime with TDZ
|
|
309
|
+
// errors (historical "aM is undefined" from the icons/app-shell split).
|
|
310
|
+
pluginChunkCycleCheck(), process.env.ANALYZE_BUNDLE === 'true' && analyzer({
|
|
222
311
|
defaultSizes: 'stat',
|
|
223
312
|
openAnalyzer: true
|
|
224
313
|
}), process.env.ANALYZE_BUNDLE_TREE === 'true' && visualizer({
|