@commercetools-frontend/mc-scripts 25.0.0 → 25.2.0
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/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +28 -14
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +28 -14
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +28 -14
- package/dist/{build-50f29fb0.cjs.prod.js → build-182a099c.cjs.prod.js} +7 -7
- package/dist/{build-0b4c6b04.esm.js → build-220a1658.esm.js} +7 -7
- package/dist/{build-1baf8a00.cjs.dev.js → build-519d246d.cjs.dev.js} +7 -7
- package/dist/{build-vite-e26f6c9f.cjs.dev.js → build-vite-837e7c94.cjs.dev.js} +64 -43
- package/dist/{build-vite-85211835.esm.js → build-vite-8cae71a0.esm.js} +61 -24
- package/dist/{build-vite-4a6c90c2.cjs.prod.js → build-vite-b007241b.cjs.prod.js} +64 -43
- 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/{compile-html-adfef598.esm.js → compile-html-025cd493.esm.js} +2 -4
- package/dist/{compile-html-b80f9651.cjs.prod.js → compile-html-50fd05ec.cjs.prod.js} +2 -5
- package/dist/{compile-html-8679f721.cjs.dev.js → compile-html-f4ac88cc.cjs.dev.js} +2 -5
- package/dist/config-sync-0b96d430.esm.js +255 -0
- package/dist/config-sync-b3072939.cjs.prod.js +265 -0
- package/dist/config-sync-ci-4a09aa00.cjs.prod.js +305 -0
- package/dist/config-sync-ci-85e3fec2.esm.js +294 -0
- package/dist/config-sync-ci-eadb8bfc.cjs.dev.js +305 -0
- package/dist/config-sync-f8fca39f.cjs.dev.js +265 -0
- package/dist/{config-sync-87ba9f28.cjs.prod.js → config-sync-helpers-11fc328f.cjs.prod.js} +193 -326
- package/dist/{config-sync-27ca0c93.cjs.dev.js → config-sync-helpers-dab59ed9.cjs.dev.js} +195 -328
- package/dist/{config-sync-ff4b1e5b.esm.js → config-sync-helpers-fe6ea729.esm.js} +186 -323
- package/dist/{create-postcss-config-34bab342.cjs.prod.js → create-postcss-config-56b74a34.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-0e833724.cjs.dev.js → create-postcss-config-78879a12.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-e6dfba3f.esm.js → create-postcss-config-95f9bf62.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-fe0945ce.cjs.prod.js → create-webpack-config-for-development-3eb1b365.cjs.prod.js} +7 -7
- package/dist/{create-webpack-config-for-development-2ac1d86f.cjs.dev.js → create-webpack-config-for-development-62b89920.cjs.dev.js} +7 -7
- package/dist/{create-webpack-config-for-development-be2722d6.esm.js → create-webpack-config-for-development-a28736fa.esm.js} +7 -7
- package/dist/{create-webpack-config-for-production-66c77849.esm.js → create-webpack-config-for-production-21ea561f.esm.js} +8 -8
- package/dist/{create-webpack-config-for-production-2200e554.cjs.prod.js → create-webpack-config-for-production-3b6599db.cjs.prod.js} +8 -8
- package/dist/{create-webpack-config-for-production-d2c41a9d.cjs.dev.js → create-webpack-config-for-production-e5ed8805.cjs.dev.js} +8 -8
- package/dist/{credentials-storage-381abf27.cjs.prod.js → credentials-storage-6d592cd6.cjs.prod.js} +21 -3
- package/dist/{credentials-storage-de220814.cjs.dev.js → credentials-storage-c4c5980e.cjs.dev.js} +21 -3
- package/dist/{credentials-storage-7285d7b4.esm.js → credentials-storage-fcc77fb6.esm.js} +21 -3
- package/dist/declarations/src/types.d.ts +4 -0
- package/dist/{deployment-previews-set-7f9fbfe5.esm.js → deployment-previews-set-7d49e7df.esm.js} +22 -27
- package/dist/{deployment-previews-set-3697be5e.cjs.dev.js → deployment-previews-set-8d6a1e99.cjs.dev.js} +22 -28
- package/dist/{deployment-previews-set-e92403f7.cjs.prod.js → deployment-previews-set-f8ce3db7.cjs.prod.js} +22 -28
- package/dist/{graphql-requests-bab5fcc3.cjs.dev.js → graphql-requests-b57fca4c.cjs.prod.js} +5 -8
- package/dist/{graphql-requests-d8bc2292.esm.js → graphql-requests-d2fa2ca7.esm.js} +6 -9
- package/dist/{graphql-requests-8ef89149.cjs.prod.js → graphql-requests-da194989.cjs.dev.js} +5 -8
- package/dist/{i18n-message-complilation-8aec9d1b.esm.js → i18n-message-complilation-21d3b0aa.esm.js} +1 -1
- package/dist/{i18n-message-complilation-3f80e8d6.cjs.dev.js → i18n-message-complilation-7311cb29.cjs.dev.js} +1 -1
- package/dist/{i18n-message-complilation-393d344a.cjs.prod.js → i18n-message-complilation-7762da61.cjs.prod.js} +1 -1
- package/dist/{login-5fd67aac.cjs.prod.js → login-9774c9cc.cjs.prod.js} +154 -38
- package/dist/login-abb38213.esm.js +337 -0
- package/dist/{login-9fac9eee.cjs.dev.js → login-f4550251.cjs.dev.js} +154 -38
- package/dist/{optimizations-ea21b802.cjs.prod.js → optimizations-7789145e.cjs.dev.js} +5 -8
- package/dist/{optimizations-ea71a24a.esm.js → optimizations-bf991634.esm.js} +5 -7
- package/dist/{optimizations-ebbeaf88.cjs.dev.js → optimizations-fb93514f.cjs.prod.js} +5 -8
- package/dist/{package-ff04bcf7.cjs.dev.js → package-0eebca1b.cjs.dev.js} +21 -11
- package/dist/{package-4bdd2ccf.esm.js → package-9e6910b8.esm.js} +21 -11
- package/dist/{package-428d5001.cjs.prod.js → package-b9298ce3.cjs.prod.js} +21 -11
- package/dist/{paths-7bf7e88e.esm.js → paths-39f22b8b.esm.js} +4 -9
- package/dist/{paths-af1a725a.cjs.prod.js → paths-7768b440.cjs.prod.js} +4 -10
- package/dist/{paths-ec3e3a7d.cjs.dev.js → paths-b76fc753.cjs.dev.js} +4 -10
- package/dist/{serve-04a03d5f.cjs.dev.js → serve-38456e1b.cjs.dev.js} +7 -6
- package/dist/{serve-fb1a0f5a.esm.js → serve-be1f9439.esm.js} +6 -6
- package/dist/{serve-2a863026.cjs.prod.js → serve-cc4a766d.cjs.prod.js} +7 -6
- package/dist/{start-643a55bb.esm.js → start-109f9462.esm.js} +8 -9
- package/dist/{start-47ea5e04.cjs.dev.js → start-7765f44c.cjs.dev.js} +8 -9
- package/dist/{start-84cdf12b.cjs.prod.js → start-e014127c.cjs.prod.js} +8 -9
- package/dist/{start-vite-eea72ba9.cjs.dev.js → start-vite-068e9f73.cjs.dev.js} +3 -4
- package/dist/{start-vite-d548c121.cjs.prod.js → start-vite-29078b3a.cjs.prod.js} +3 -4
- package/dist/{start-vite-d649d1f3.esm.js → start-vite-7d1161e8.esm.js} +3 -4
- package/dist/{vite-plugin-svgr-53ef97c7.cjs.dev.js → vite-plugin-svgr-4034a834.cjs.prod.js} +4 -4
- package/dist/{vite-plugin-svgr-5de1cad9.cjs.prod.js → vite-plugin-svgr-7d06f400.cjs.dev.js} +4 -4
- package/dist/{vite-plugin-svgr-22c8d518.esm.js → vite-plugin-svgr-de6ee7da.esm.js} +4 -4
- package/package.json +21 -11
- 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 +6 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +6 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +6 -6
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
- package/dist/login-9ee43381.esm.js +0 -223
package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// Dynamically inject webpack `publicPath`, for resolving assets locations.
|
|
5
5
|
// https://webpack.js.org/guides/public-path/#on-the-fly
|
|
6
6
|
// https://webpack.js.org/configuration/output/#output-publicpath
|
|
7
|
-
if (process.env.NODE_ENV !== 'test') __webpack_public_path__ =
|
|
7
|
+
if (process.env.NODE_ENV !== 'test') __webpack_public_path__ = `${window.app.cdnUrl.replace(/\/$/, '')}/`;
|
package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// Dynamically inject webpack `publicPath`, for resolving assets locations.
|
|
5
5
|
// https://webpack.js.org/guides/public-path/#on-the-fly
|
|
6
6
|
// https://webpack.js.org/configuration/output/#output-publicpath
|
|
7
|
-
__webpack_public_path__ =
|
|
7
|
+
__webpack_public_path__ = `${window.app.cdnUrl.replace(/\/$/, '')}/`;
|
package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// Dynamically inject webpack `publicPath`, for resolving assets locations.
|
|
3
3
|
// https://webpack.js.org/guides/public-path/#on-the-fly
|
|
4
4
|
// https://webpack.js.org/configuration/output/#output-publicpath
|
|
5
|
-
if (process.env.NODE_ENV !== 'test') __webpack_public_path__ =
|
|
5
|
+
if (process.env.NODE_ENV !== 'test') __webpack_public_path__ = `${window.app.cdnUrl.replace(/\/$/, '')}/`;
|
|
@@ -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-0eebca1b.cjs.dev.js');
|
|
14
14
|
var doesFileExist = require('../../dist/does-file-exist-eb86baca.cjs.dev.js');
|
|
15
15
|
require('node:fs');
|
|
16
16
|
|
|
@@ -24,8 +24,9 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
24
24
|
var dotenv__default = /*#__PURE__*/_interopDefault(dotenv);
|
|
25
25
|
var dotenvExpand__default = /*#__PURE__*/_interopDefault(dotenvExpand);
|
|
26
26
|
|
|
27
|
-
commander.program.name('mc-scripts').description('CLI to develop and build Merchant Center customizations.').version(_package.pkgJson.version).option('-e, --env <path...>',
|
|
28
|
-
|
|
27
|
+
commander.program.name('mc-scripts').description('CLI to develop and build Merchant Center customizations.').version(_package.pkgJson.version).option('-e, --env <path...>',
|
|
28
|
+
// Variadic option. It allows multiple `--env` options to be provided.
|
|
29
|
+
`(optional) Parses the file path as a dotenv file and adds the variables to the environment. Multiple flags are allowed.`);
|
|
29
30
|
|
|
30
31
|
// Makes the script crash on unhandled rejections instead of silently
|
|
31
32
|
// ignoring them. In the future, promise rejections that are not handled will
|
|
@@ -53,7 +54,7 @@ async function run() {
|
|
|
53
54
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
54
55
|
console.log('');
|
|
55
56
|
}
|
|
56
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-
|
|
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-7765f44c.cjs.dev.js'); });
|
|
57
58
|
await startCommand.default();
|
|
58
59
|
});
|
|
59
60
|
|
|
@@ -72,12 +73,12 @@ async function run() {
|
|
|
72
73
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
73
74
|
console.log('');
|
|
74
75
|
}
|
|
75
|
-
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-837e7c94.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-519d246d.cjs.dev.js'); });
|
|
76
77
|
await buildCommand.default();
|
|
77
78
|
const shouldAlsoCompile = !options.buildOnly;
|
|
78
79
|
if (shouldAlsoCompile) {
|
|
79
80
|
console.log('');
|
|
80
|
-
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-
|
|
81
|
+
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-f4ac88cc.cjs.dev.js'); });
|
|
81
82
|
await compileHtmlCommand.default({
|
|
82
83
|
printSecurityHeaders: false
|
|
83
84
|
});
|
|
@@ -94,7 +95,7 @@ async function run() {
|
|
|
94
95
|
|
|
95
96
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
96
97
|
process.env.NODE_ENV = 'production';
|
|
97
|
-
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-
|
|
98
|
+
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-f4ac88cc.cjs.dev.js'); });
|
|
98
99
|
await compileHtmlCommand.default(options);
|
|
99
100
|
});
|
|
100
101
|
|
|
@@ -108,14 +109,14 @@ async function run() {
|
|
|
108
109
|
|
|
109
110
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
110
111
|
process.env.NODE_ENV = 'production';
|
|
111
|
-
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-
|
|
112
|
+
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-38456e1b.cjs.dev.js'); });
|
|
112
113
|
await serveCommand.default();
|
|
113
114
|
});
|
|
114
115
|
|
|
115
116
|
// Command: login
|
|
116
117
|
commander.program.command('login').description('Log in to your Merchant Center account through the CLI, using the cloud environment information from the Merchant Center customization config file. An API token is generated and stored in a configuration file for the related cloud environment, and valid for 36 hours.').option('--mc-api-url <url>', '(optional) The URL of the Merchant Center API. If not provided, the command will try to read it from the environment variable `MC_API_URL` or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--project-key <key>', '(optional) The project key to issue an API access token for. If not provided, the command will try to read it from the environment variable `CTP_PROJECT_KEY` or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--oauth-scope <scope...>',
|
|
117
118
|
// Variadic option. It allows multiple `--oauth-scope` options to be provided.
|
|
118
|
-
'(optional) The OAuth Scope to request when generating an API access token. Multiple flags are allowed. If not provided, the command will try to read it from the environment variable `CTP_OAUTH_SCOPES` (comma-separated list) or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--force', '(optional) If defined, the command will force the login even if a valid session already exists.', false).action(async options => {
|
|
119
|
+
'(optional) The OAuth Scope to request when generating an API access token. Multiple flags are allowed. If not provided, the command will try to read it from the environment variable `CTP_OAUTH_SCOPES` (comma-separated list) or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--force', '(optional) If defined, the command will force the login even if a valid session already exists.', false).option('--headless', '(optional) Use Puppeteer for automated headless login. Requires IDENTITY_EMAIL and IDENTITY_PASSWORD environment variables. Useful for CI/CD environments.', false).action(async options => {
|
|
119
120
|
const globalOptions = commander.program.opts();
|
|
120
121
|
|
|
121
122
|
// Load dotenv files into the process environment.
|
|
@@ -124,7 +125,7 @@ async function run() {
|
|
|
124
125
|
|
|
125
126
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
126
127
|
process.env.NODE_ENV = 'production';
|
|
127
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
128
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-f4550251.cjs.dev.js'); });
|
|
128
129
|
await loginCommand.default(options);
|
|
129
130
|
});
|
|
130
131
|
|
|
@@ -138,10 +139,23 @@ async function run() {
|
|
|
138
139
|
|
|
139
140
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
140
141
|
process.env.NODE_ENV = 'production';
|
|
141
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
142
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-f8fca39f.cjs.dev.js'); });
|
|
142
143
|
await configSyncCommand.default(options);
|
|
143
144
|
});
|
|
144
145
|
|
|
146
|
+
// Command: config:sync:ci
|
|
147
|
+
commander.program.command('config:sync:ci').description('Synchronizes the local Merchant Center customization config with the Merchant Center (CI mode). ' + 'Designed for non-interactive CI/CD environments.\n\n' + 'Environment variables:\n' + ' MC_ACCESS_TOKEN - Session token for authentication\n' + ' CT_ORGANIZATION_ID - Organization ID (required if multiple orgs)\n' + ' CT_ORGANIZATION_NAME - Organization name (required if multiple orgs)\n\n' + 'On create, outputs the app/view ID to a file in the config directory.\n\n' + 'To obtain MC_ACCESS_TOKEN:\n' + ' Option 1: Run "mc-scripts login --headless" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n' + ' Option 2: Run "mc-scripts login" locally, then extract token from ~/.commercetools/mc-credentials.json\n\n' + 'SSO Authentication:\n' + ' This command does NOT support SSO directly (requires browser interaction).\n' + ' For SSO organizations, use a service account without SSO for CI/CD.').option('--dry-run', '(optional) Executes the command but does not send any mutation request.', false).action(async options => {
|
|
148
|
+
const globalOptions = commander.program.opts();
|
|
149
|
+
|
|
150
|
+
// Load dotenv files into the process environment.
|
|
151
|
+
loadDotEnvFiles(globalOptions);
|
|
152
|
+
|
|
153
|
+
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
|
+
process.env.NODE_ENV = 'production';
|
|
155
|
+
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-eadb8bfc.cjs.dev.js'); });
|
|
156
|
+
await configSyncCICommand.default(options);
|
|
157
|
+
});
|
|
158
|
+
|
|
145
159
|
// Command: deployment-previews:set
|
|
146
160
|
commander.program.command('deployment-previews:set').description('Creates or updates a deployment preview for the Custom Application.').option('--alias <deployment-preview-alias>', "(optional) Alias to be used for the deployment preview. If you don't provide an alias, the command will prompt you for it.").option('--url <deployment-preview-url>', "(optional) URL to be used for the deployment preview. If you don't provide a URL, the command will prompt you for it.").option('--dry-run', '(optional) Executes the command but does not send any mutation request.', false).action(async options => {
|
|
147
161
|
const globalOptions = commander.program.opts();
|
|
@@ -152,7 +166,7 @@ async function run() {
|
|
|
152
166
|
|
|
153
167
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
168
|
process.env.NODE_ENV = 'production';
|
|
155
|
-
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-
|
|
169
|
+
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-8d6a1e99.cjs.dev.js'); });
|
|
156
170
|
await deploymentsSetCommand.default(options);
|
|
157
171
|
});
|
|
158
172
|
commander.program.parse();
|
|
@@ -175,11 +189,11 @@ function loadDotEnvFiles(globalOptions) {
|
|
|
175
189
|
}
|
|
176
190
|
|
|
177
191
|
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
|
178
|
-
dotenvFiles.push(..._filterInstanceProperty__default["default"](_context = [
|
|
192
|
+
dotenvFiles.push(..._filterInstanceProperty__default["default"](_context = [`.env.${environment}.local`,
|
|
179
193
|
// Don't include `.env.local` for `test` environment
|
|
180
194
|
// since normally you expect tests to produce the same
|
|
181
195
|
// results for everyone
|
|
182
|
-
process.env.NODE_ENV !== 'test' &&
|
|
196
|
+
process.env.NODE_ENV !== 'test' && `.env.local`, `.env.${environment}`, '.env']).call(_context, Boolean));
|
|
183
197
|
|
|
184
198
|
// Load environment variables from .env* files. Suppress warnings using silent
|
|
185
199
|
// if this file is missing. dotenv will never modify any environment variables
|
|
@@ -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-b9298ce3.cjs.prod.js');
|
|
14
14
|
var doesFileExist = require('../../dist/does-file-exist-be53305d.cjs.prod.js');
|
|
15
15
|
require('node:fs');
|
|
16
16
|
|
|
@@ -24,8 +24,9 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
24
24
|
var dotenv__default = /*#__PURE__*/_interopDefault(dotenv);
|
|
25
25
|
var dotenvExpand__default = /*#__PURE__*/_interopDefault(dotenvExpand);
|
|
26
26
|
|
|
27
|
-
commander.program.name('mc-scripts').description('CLI to develop and build Merchant Center customizations.').version(_package.pkgJson.version).option('-e, --env <path...>',
|
|
28
|
-
|
|
27
|
+
commander.program.name('mc-scripts').description('CLI to develop and build Merchant Center customizations.').version(_package.pkgJson.version).option('-e, --env <path...>',
|
|
28
|
+
// Variadic option. It allows multiple `--env` options to be provided.
|
|
29
|
+
`(optional) Parses the file path as a dotenv file and adds the variables to the environment. Multiple flags are allowed.`);
|
|
29
30
|
|
|
30
31
|
// Makes the script crash on unhandled rejections instead of silently
|
|
31
32
|
// ignoring them. In the future, promise rejections that are not handled will
|
|
@@ -53,7 +54,7 @@ async function run() {
|
|
|
53
54
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
54
55
|
console.log('');
|
|
55
56
|
}
|
|
56
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-
|
|
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-e014127c.cjs.prod.js'); });
|
|
57
58
|
await startCommand.default();
|
|
58
59
|
});
|
|
59
60
|
|
|
@@ -72,12 +73,12 @@ async function run() {
|
|
|
72
73
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
73
74
|
console.log('');
|
|
74
75
|
}
|
|
75
|
-
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-b007241b.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-182a099c.cjs.prod.js'); });
|
|
76
77
|
await buildCommand.default();
|
|
77
78
|
const shouldAlsoCompile = !options.buildOnly;
|
|
78
79
|
if (shouldAlsoCompile) {
|
|
79
80
|
console.log('');
|
|
80
|
-
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-
|
|
81
|
+
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-50fd05ec.cjs.prod.js'); });
|
|
81
82
|
await compileHtmlCommand.default({
|
|
82
83
|
printSecurityHeaders: false
|
|
83
84
|
});
|
|
@@ -94,7 +95,7 @@ async function run() {
|
|
|
94
95
|
|
|
95
96
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
96
97
|
process.env.NODE_ENV = 'production';
|
|
97
|
-
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-
|
|
98
|
+
const compileHtmlCommand = await Promise.resolve().then(function () { return require('../../dist/compile-html-50fd05ec.cjs.prod.js'); });
|
|
98
99
|
await compileHtmlCommand.default(options);
|
|
99
100
|
});
|
|
100
101
|
|
|
@@ -108,14 +109,14 @@ async function run() {
|
|
|
108
109
|
|
|
109
110
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
110
111
|
process.env.NODE_ENV = 'production';
|
|
111
|
-
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-
|
|
112
|
+
const serveCommand = await Promise.resolve().then(function () { return require('../../dist/serve-cc4a766d.cjs.prod.js'); });
|
|
112
113
|
await serveCommand.default();
|
|
113
114
|
});
|
|
114
115
|
|
|
115
116
|
// Command: login
|
|
116
117
|
commander.program.command('login').description('Log in to your Merchant Center account through the CLI, using the cloud environment information from the Merchant Center customization config file. An API token is generated and stored in a configuration file for the related cloud environment, and valid for 36 hours.').option('--mc-api-url <url>', '(optional) The URL of the Merchant Center API. If not provided, the command will try to read it from the environment variable `MC_API_URL` or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--project-key <key>', '(optional) The project key to issue an API access token for. If not provided, the command will try to read it from the environment variable `CTP_PROJECT_KEY` or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--oauth-scope <scope...>',
|
|
117
118
|
// Variadic option. It allows multiple `--oauth-scope` options to be provided.
|
|
118
|
-
'(optional) The OAuth Scope to request when generating an API access token. Multiple flags are allowed. If not provided, the command will try to read it from the environment variable `CTP_OAUTH_SCOPES` (comma-separated list) or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--force', '(optional) If defined, the command will force the login even if a valid session already exists.', false).action(async options => {
|
|
119
|
+
'(optional) The OAuth Scope to request when generating an API access token. Multiple flags are allowed. If not provided, the command will try to read it from the environment variable `CTP_OAUTH_SCOPES` (comma-separated list) or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--force', '(optional) If defined, the command will force the login even if a valid session already exists.', false).option('--headless', '(optional) Use Puppeteer for automated headless login. Requires IDENTITY_EMAIL and IDENTITY_PASSWORD environment variables. Useful for CI/CD environments.', false).action(async options => {
|
|
119
120
|
const globalOptions = commander.program.opts();
|
|
120
121
|
|
|
121
122
|
// Load dotenv files into the process environment.
|
|
@@ -124,7 +125,7 @@ async function run() {
|
|
|
124
125
|
|
|
125
126
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
126
127
|
process.env.NODE_ENV = 'production';
|
|
127
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
128
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-9774c9cc.cjs.prod.js'); });
|
|
128
129
|
await loginCommand.default(options);
|
|
129
130
|
});
|
|
130
131
|
|
|
@@ -138,10 +139,23 @@ async function run() {
|
|
|
138
139
|
|
|
139
140
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
140
141
|
process.env.NODE_ENV = 'production';
|
|
141
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
142
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-b3072939.cjs.prod.js'); });
|
|
142
143
|
await configSyncCommand.default(options);
|
|
143
144
|
});
|
|
144
145
|
|
|
146
|
+
// Command: config:sync:ci
|
|
147
|
+
commander.program.command('config:sync:ci').description('Synchronizes the local Merchant Center customization config with the Merchant Center (CI mode). ' + 'Designed for non-interactive CI/CD environments.\n\n' + 'Environment variables:\n' + ' MC_ACCESS_TOKEN - Session token for authentication\n' + ' CT_ORGANIZATION_ID - Organization ID (required if multiple orgs)\n' + ' CT_ORGANIZATION_NAME - Organization name (required if multiple orgs)\n\n' + 'On create, outputs the app/view ID to a file in the config directory.\n\n' + 'To obtain MC_ACCESS_TOKEN:\n' + ' Option 1: Run "mc-scripts login --headless" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n' + ' Option 2: Run "mc-scripts login" locally, then extract token from ~/.commercetools/mc-credentials.json\n\n' + 'SSO Authentication:\n' + ' This command does NOT support SSO directly (requires browser interaction).\n' + ' For SSO organizations, use a service account without SSO for CI/CD.').option('--dry-run', '(optional) Executes the command but does not send any mutation request.', false).action(async options => {
|
|
148
|
+
const globalOptions = commander.program.opts();
|
|
149
|
+
|
|
150
|
+
// Load dotenv files into the process environment.
|
|
151
|
+
loadDotEnvFiles(globalOptions);
|
|
152
|
+
|
|
153
|
+
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
|
+
process.env.NODE_ENV = 'production';
|
|
155
|
+
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-4a09aa00.cjs.prod.js'); });
|
|
156
|
+
await configSyncCICommand.default(options);
|
|
157
|
+
});
|
|
158
|
+
|
|
145
159
|
// Command: deployment-previews:set
|
|
146
160
|
commander.program.command('deployment-previews:set').description('Creates or updates a deployment preview for the Custom Application.').option('--alias <deployment-preview-alias>', "(optional) Alias to be used for the deployment preview. If you don't provide an alias, the command will prompt you for it.").option('--url <deployment-preview-url>', "(optional) URL to be used for the deployment preview. If you don't provide a URL, the command will prompt you for it.").option('--dry-run', '(optional) Executes the command but does not send any mutation request.', false).action(async options => {
|
|
147
161
|
const globalOptions = commander.program.opts();
|
|
@@ -152,7 +166,7 @@ async function run() {
|
|
|
152
166
|
|
|
153
167
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
168
|
process.env.NODE_ENV = 'production';
|
|
155
|
-
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-
|
|
169
|
+
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-f8ce3db7.cjs.prod.js'); });
|
|
156
170
|
await deploymentsSetCommand.default(options);
|
|
157
171
|
});
|
|
158
172
|
commander.program.parse();
|
|
@@ -175,11 +189,11 @@ function loadDotEnvFiles(globalOptions) {
|
|
|
175
189
|
}
|
|
176
190
|
|
|
177
191
|
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
|
178
|
-
dotenvFiles.push(..._filterInstanceProperty__default["default"](_context = [
|
|
192
|
+
dotenvFiles.push(..._filterInstanceProperty__default["default"](_context = [`.env.${environment}.local`,
|
|
179
193
|
// Don't include `.env.local` for `test` environment
|
|
180
194
|
// since normally you expect tests to produce the same
|
|
181
195
|
// results for everyone
|
|
182
|
-
|
|
196
|
+
`.env.local`, `.env.${environment}`, '.env']).call(_context, Boolean));
|
|
183
197
|
|
|
184
198
|
// Load environment variables from .env* files. Suppress warnings using silent
|
|
185
199
|
// if this file is missing. dotenv will never modify any environment variables
|
|
@@ -6,12 +6,13 @@ 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-9e6910b8.esm.js';
|
|
10
10
|
import { d as doesFileExist } from '../../dist/does-file-exist-32618334.esm.js';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
|
|
13
|
-
program.name('mc-scripts').description('CLI to develop and build Merchant Center customizations.').version(pkgJson.version).option('-e, --env <path...>',
|
|
14
|
-
|
|
13
|
+
program.name('mc-scripts').description('CLI to develop and build Merchant Center customizations.').version(pkgJson.version).option('-e, --env <path...>',
|
|
14
|
+
// Variadic option. It allows multiple `--env` options to be provided.
|
|
15
|
+
`(optional) Parses the file path as a dotenv file and adds the variables to the environment. Multiple flags are allowed.`);
|
|
15
16
|
|
|
16
17
|
// Makes the script crash on unhandled rejections instead of silently
|
|
17
18
|
// ignoring them. In the future, promise rejections that are not handled will
|
|
@@ -39,7 +40,7 @@ async function run() {
|
|
|
39
40
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
40
41
|
console.log('');
|
|
41
42
|
}
|
|
42
|
-
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-
|
|
43
|
+
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-7d1161e8.esm.js') : await import('../../dist/start-109f9462.esm.js');
|
|
43
44
|
await startCommand.default();
|
|
44
45
|
});
|
|
45
46
|
|
|
@@ -58,12 +59,12 @@ async function run() {
|
|
|
58
59
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
59
60
|
console.log('');
|
|
60
61
|
}
|
|
61
|
-
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-
|
|
62
|
+
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-8cae71a0.esm.js') : await import('../../dist/build-220a1658.esm.js');
|
|
62
63
|
await buildCommand.default();
|
|
63
64
|
const shouldAlsoCompile = !options.buildOnly;
|
|
64
65
|
if (shouldAlsoCompile) {
|
|
65
66
|
console.log('');
|
|
66
|
-
const compileHtmlCommand = await import('../../dist/compile-html-
|
|
67
|
+
const compileHtmlCommand = await import('../../dist/compile-html-025cd493.esm.js');
|
|
67
68
|
await compileHtmlCommand.default({
|
|
68
69
|
printSecurityHeaders: false
|
|
69
70
|
});
|
|
@@ -80,7 +81,7 @@ async function run() {
|
|
|
80
81
|
|
|
81
82
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
82
83
|
process.env.NODE_ENV = 'production';
|
|
83
|
-
const compileHtmlCommand = await import('../../dist/compile-html-
|
|
84
|
+
const compileHtmlCommand = await import('../../dist/compile-html-025cd493.esm.js');
|
|
84
85
|
await compileHtmlCommand.default(options);
|
|
85
86
|
});
|
|
86
87
|
|
|
@@ -94,14 +95,14 @@ async function run() {
|
|
|
94
95
|
|
|
95
96
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
96
97
|
process.env.NODE_ENV = 'production';
|
|
97
|
-
const serveCommand = await import('../../dist/serve-
|
|
98
|
+
const serveCommand = await import('../../dist/serve-be1f9439.esm.js');
|
|
98
99
|
await serveCommand.default();
|
|
99
100
|
});
|
|
100
101
|
|
|
101
102
|
// Command: login
|
|
102
103
|
program.command('login').description('Log in to your Merchant Center account through the CLI, using the cloud environment information from the Merchant Center customization config file. An API token is generated and stored in a configuration file for the related cloud environment, and valid for 36 hours.').option('--mc-api-url <url>', '(optional) The URL of the Merchant Center API. If not provided, the command will try to read it from the environment variable `MC_API_URL` or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--project-key <key>', '(optional) The project key to issue an API access token for. If not provided, the command will try to read it from the environment variable `CTP_PROJECT_KEY` or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--oauth-scope <scope...>',
|
|
103
104
|
// Variadic option. It allows multiple `--oauth-scope` options to be provided.
|
|
104
|
-
'(optional) The OAuth Scope to request when generating an API access token. Multiple flags are allowed. If not provided, the command will try to read it from the environment variable `CTP_OAUTH_SCOPES` (comma-separated list) or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--force', '(optional) If defined, the command will force the login even if a valid session already exists.', false).action(async options => {
|
|
105
|
+
'(optional) The OAuth Scope to request when generating an API access token. Multiple flags are allowed. If not provided, the command will try to read it from the environment variable `CTP_OAUTH_SCOPES` (comma-separated list) or the Merchant Center Customization configuration file. In this case, the command needs to be executed from the folder where the Merchant Center Customization configuration file is located.').option('--force', '(optional) If defined, the command will force the login even if a valid session already exists.', false).option('--headless', '(optional) Use Puppeteer for automated headless login. Requires IDENTITY_EMAIL and IDENTITY_PASSWORD environment variables. Useful for CI/CD environments.', false).action(async options => {
|
|
105
106
|
const globalOptions = program.opts();
|
|
106
107
|
|
|
107
108
|
// Load dotenv files into the process environment.
|
|
@@ -110,7 +111,7 @@ async function run() {
|
|
|
110
111
|
|
|
111
112
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
112
113
|
process.env.NODE_ENV = 'production';
|
|
113
|
-
const loginCommand = await import('../../dist/login-
|
|
114
|
+
const loginCommand = await import('../../dist/login-abb38213.esm.js');
|
|
114
115
|
await loginCommand.default(options);
|
|
115
116
|
});
|
|
116
117
|
|
|
@@ -124,10 +125,23 @@ async function run() {
|
|
|
124
125
|
|
|
125
126
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
126
127
|
process.env.NODE_ENV = 'production';
|
|
127
|
-
const configSyncCommand = await import('../../dist/config-sync-
|
|
128
|
+
const configSyncCommand = await import('../../dist/config-sync-0b96d430.esm.js');
|
|
128
129
|
await configSyncCommand.default(options);
|
|
129
130
|
});
|
|
130
131
|
|
|
132
|
+
// Command: config:sync:ci
|
|
133
|
+
program.command('config:sync:ci').description('Synchronizes the local Merchant Center customization config with the Merchant Center (CI mode). ' + 'Designed for non-interactive CI/CD environments.\n\n' + 'Environment variables:\n' + ' MC_ACCESS_TOKEN - Session token for authentication\n' + ' CT_ORGANIZATION_ID - Organization ID (required if multiple orgs)\n' + ' CT_ORGANIZATION_NAME - Organization name (required if multiple orgs)\n\n' + 'On create, outputs the app/view ID to a file in the config directory.\n\n' + 'To obtain MC_ACCESS_TOKEN:\n' + ' Option 1: Run "mc-scripts login --headless" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n' + ' Option 2: Run "mc-scripts login" locally, then extract token from ~/.commercetools/mc-credentials.json\n\n' + 'SSO Authentication:\n' + ' This command does NOT support SSO directly (requires browser interaction).\n' + ' For SSO organizations, use a service account without SSO for CI/CD.').option('--dry-run', '(optional) Executes the command but does not send any mutation request.', false).action(async options => {
|
|
134
|
+
const globalOptions = program.opts();
|
|
135
|
+
|
|
136
|
+
// Load dotenv files into the process environment.
|
|
137
|
+
loadDotEnvFiles(globalOptions);
|
|
138
|
+
|
|
139
|
+
// Do this as the first thing so that any code reading it knows the right env.
|
|
140
|
+
process.env.NODE_ENV = 'production';
|
|
141
|
+
const configSyncCICommand = await import('../../dist/config-sync-ci-85e3fec2.esm.js');
|
|
142
|
+
await configSyncCICommand.default(options);
|
|
143
|
+
});
|
|
144
|
+
|
|
131
145
|
// Command: deployment-previews:set
|
|
132
146
|
program.command('deployment-previews:set').description('Creates or updates a deployment preview for the Custom Application.').option('--alias <deployment-preview-alias>', "(optional) Alias to be used for the deployment preview. If you don't provide an alias, the command will prompt you for it.").option('--url <deployment-preview-url>', "(optional) URL to be used for the deployment preview. If you don't provide a URL, the command will prompt you for it.").option('--dry-run', '(optional) Executes the command but does not send any mutation request.', false).action(async options => {
|
|
133
147
|
const globalOptions = program.opts();
|
|
@@ -138,7 +152,7 @@ async function run() {
|
|
|
138
152
|
|
|
139
153
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
140
154
|
process.env.NODE_ENV = 'production';
|
|
141
|
-
const deploymentsSetCommand = await import('../../dist/deployment-previews-set-
|
|
155
|
+
const deploymentsSetCommand = await import('../../dist/deployment-previews-set-7d49e7df.esm.js');
|
|
142
156
|
await deploymentsSetCommand.default(options);
|
|
143
157
|
});
|
|
144
158
|
program.parse();
|
|
@@ -161,11 +175,11 @@ function loadDotEnvFiles(globalOptions) {
|
|
|
161
175
|
}
|
|
162
176
|
|
|
163
177
|
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
|
164
|
-
dotenvFiles.push(..._filterInstanceProperty(_context = [
|
|
178
|
+
dotenvFiles.push(..._filterInstanceProperty(_context = [`.env.${environment}.local`,
|
|
165
179
|
// Don't include `.env.local` for `test` environment
|
|
166
180
|
// since normally you expect tests to produce the same
|
|
167
181
|
// results for everyone
|
|
168
|
-
process.env.NODE_ENV !== 'test' &&
|
|
182
|
+
process.env.NODE_ENV !== 'test' && `.env.local`, `.env.${environment}`, '.env']).call(_context, Boolean));
|
|
169
183
|
|
|
170
184
|
// Load environment variables from .env* files. Suppress warnings using silent
|
|
171
185
|
// if this file is missing. dotenv will never modify any environment variables
|
|
@@ -10,8 +10,8 @@ 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-
|
|
14
|
-
var paths = require('./paths-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-3b6599db.cjs.prod.js');
|
|
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');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -40,11 +40,11 @@ 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-56b74a34.cjs.prod.js');
|
|
44
44
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
45
|
-
require('./package-
|
|
45
|
+
require('./package-b9298ce3.cjs.prod.js');
|
|
46
46
|
require('./has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
47
|
-
require('./optimizations-
|
|
47
|
+
require('./optimizations-fb93514f.cjs.prod.js');
|
|
48
48
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
49
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
50
50
|
require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
@@ -103,7 +103,7 @@ async function run() {
|
|
|
103
103
|
if (error instanceof Error) {
|
|
104
104
|
printBuildError__default["default"](error);
|
|
105
105
|
}
|
|
106
|
-
throw new Error(
|
|
106
|
+
throw new Error(`Failed to compile`);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
// Create the production build and print the deployment instructions.
|
|
@@ -134,7 +134,7 @@ async function run() {
|
|
|
134
134
|
warnings: []
|
|
135
135
|
});
|
|
136
136
|
} else {
|
|
137
|
-
messages = formatWebpackMessages__default["default"](stats
|
|
137
|
+
messages = formatWebpackMessages__default["default"](stats?.toJson({
|
|
138
138
|
all: false,
|
|
139
139
|
warnings: true,
|
|
140
140
|
errors: true
|
|
@@ -8,8 +8,8 @@ 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-
|
|
12
|
-
import { p as paths } from './paths-
|
|
11
|
+
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-21ea561f.esm.js';
|
|
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';
|
|
15
15
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
@@ -38,11 +38,11 @@ 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-95f9bf62.esm.js';
|
|
42
42
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
43
|
-
import './package-
|
|
43
|
+
import './package-9e6910b8.esm.js';
|
|
44
44
|
import './has-jsx-runtime-e3ecb09b.esm.js';
|
|
45
|
-
import './optimizations-
|
|
45
|
+
import './optimizations-bf991634.esm.js';
|
|
46
46
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
47
47
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
48
48
|
import './vendors-to-transpile-7dc84a72.esm.js';
|
|
@@ -89,7 +89,7 @@ async function run() {
|
|
|
89
89
|
if (error instanceof Error) {
|
|
90
90
|
printBuildError(error);
|
|
91
91
|
}
|
|
92
|
-
throw new Error(
|
|
92
|
+
throw new Error(`Failed to compile`);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// Create the production build and print the deployment instructions.
|
|
@@ -120,7 +120,7 @@ async function run() {
|
|
|
120
120
|
warnings: []
|
|
121
121
|
});
|
|
122
122
|
} else {
|
|
123
|
-
messages = formatWebpackMessages(stats
|
|
123
|
+
messages = formatWebpackMessages(stats?.toJson({
|
|
124
124
|
all: false,
|
|
125
125
|
warnings: true,
|
|
126
126
|
errors: true
|
|
@@ -10,8 +10,8 @@ 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-
|
|
14
|
-
var paths = require('./paths-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-e5ed8805.cjs.dev.js');
|
|
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');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -40,11 +40,11 @@ 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-78879a12.cjs.dev.js');
|
|
44
44
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
45
|
-
require('./package-
|
|
45
|
+
require('./package-0eebca1b.cjs.dev.js');
|
|
46
46
|
require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
47
|
-
require('./optimizations-
|
|
47
|
+
require('./optimizations-7789145e.cjs.dev.js');
|
|
48
48
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
49
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
50
50
|
require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
@@ -103,7 +103,7 @@ async function run() {
|
|
|
103
103
|
if (error instanceof Error) {
|
|
104
104
|
printBuildError__default["default"](error);
|
|
105
105
|
}
|
|
106
|
-
throw new Error(
|
|
106
|
+
throw new Error(`Failed to compile`);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
// Create the production build and print the deployment instructions.
|
|
@@ -134,7 +134,7 @@ async function run() {
|
|
|
134
134
|
warnings: []
|
|
135
135
|
});
|
|
136
136
|
} else {
|
|
137
|
-
messages = formatWebpackMessages__default["default"](stats
|
|
137
|
+
messages = formatWebpackMessages__default["default"](stats?.toJson({
|
|
138
138
|
all: false,
|
|
139
139
|
warnings: true,
|
|
140
140
|
errors: true
|