@commercetools-frontend/mc-scripts 22.23.3 → 22.25.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/README.md +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +13 -11
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +13 -11
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +13 -11
- package/dist/{build-19eb7958.esm.js → build-7360068c.esm.js} +7 -5
- package/dist/{build-701032ff.cjs.prod.js → build-86840fca.cjs.prod.js} +7 -5
- package/dist/{build-4bf35d2b.cjs.dev.js → build-b2dbc8b9.cjs.dev.js} +7 -5
- package/dist/{build-vite-a10a325b.cjs.dev.js → build-vite-4dbdebec.cjs.dev.js} +3 -1
- package/dist/{build-vite-827820e1.esm.js → build-vite-6b0997ab.esm.js} +3 -1
- package/dist/{build-vite-068594c6.cjs.prod.js → build-vite-891aeb58.cjs.prod.js} +3 -1
- 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-079067bd.cjs.prod.js → compile-html-8679f721.cjs.dev.js} +3 -1
- package/dist/{compile-html-606b302e.esm.js → compile-html-adfef598.esm.js} +3 -1
- package/dist/{compile-html-3ff2fed0.cjs.dev.js → compile-html-b80f9651.cjs.prod.js} +3 -1
- package/dist/{config-sync-e7b2af10.cjs.prod.js → config-sync-1193eadf.cjs.prod.js} +4 -2
- package/dist/{config-sync-1e4944ea.cjs.dev.js → config-sync-7f70a947.cjs.dev.js} +4 -2
- package/dist/{config-sync-055bb0ca.esm.js → config-sync-afe6ef75.esm.js} +4 -2
- package/dist/{create-postcss-config-701434e2.cjs.dev.js → create-postcss-config-6d4bea52.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-a417ef56.cjs.prod.js → create-postcss-config-b4f3b872.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-f69cacb7.esm.js → create-postcss-config-dcc87d4c.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-59476c8d.cjs.dev.js → create-webpack-config-for-development-8617b657.cjs.dev.js} +2 -2
- package/dist/{create-webpack-config-for-development-64e699f7.cjs.prod.js → create-webpack-config-for-development-d8306fb5.cjs.prod.js} +2 -2
- package/dist/{create-webpack-config-for-development-776953de.esm.js → create-webpack-config-for-development-e2c3eb7f.esm.js} +2 -2
- package/dist/{create-webpack-config-for-production-148d3db5.cjs.prod.js → create-webpack-config-for-production-73ae0ffb.cjs.prod.js} +5 -2
- package/dist/{create-webpack-config-for-production-9a2b6533.esm.js → create-webpack-config-for-production-7707d181.esm.js} +5 -2
- package/dist/{create-webpack-config-for-production-aaa780e0.cjs.dev.js → create-webpack-config-for-production-b131d6d7.cjs.dev.js} +5 -2
- package/dist/{credentials-storage-a21f661b.esm.js → credentials-storage-61166b3c.esm.js} +3 -2
- package/dist/{credentials-storage-346496c2.cjs.dev.js → credentials-storage-a0995751.cjs.dev.js} +3 -2
- package/dist/{credentials-storage-231d21aa.cjs.prod.js → credentials-storage-c9208a8f.cjs.prod.js} +3 -2
- package/dist/declarations/src/utils/does-file-exist.d.ts +2 -0
- package/dist/declarations/src/webpack-loaders/i18n-message-compilation-loader.d.ts +3 -0
- package/dist/does-file-exist-32618334.esm.js +12 -0
- package/dist/does-file-exist-be53305d.cjs.prod.js +18 -0
- package/dist/does-file-exist-eb86baca.cjs.dev.js +18 -0
- package/dist/{login-515ed1ff.esm.js → login-7f92db67.esm.js} +4 -2
- package/dist/{login-56ac9db2.cjs.dev.js → login-e0d6247f.cjs.dev.js} +4 -2
- package/dist/{login-3dbe1c49.cjs.prod.js → login-eb5b64ee.cjs.prod.js} +4 -2
- package/dist/{package-35063bd4.cjs.prod.js → package-751ef612.cjs.dev.js} +14 -10
- package/dist/{package-afe2cf2c.esm.js → package-8981cb95.esm.js} +14 -10
- package/dist/{package-6517b011.cjs.dev.js → package-edc8f749.cjs.prod.js} +14 -10
- package/dist/{paths-ded20ae1.esm.js → paths-7bf7e88e.esm.js} +2 -1
- package/dist/{paths-854af5ef.cjs.prod.js → paths-af1a725a.cjs.prod.js} +2 -1
- package/dist/{paths-d1febc82.cjs.dev.js → paths-ec3e3a7d.cjs.dev.js} +2 -1
- package/dist/{serve-65b5a149.esm.js → serve-5f480513.esm.js} +3 -1
- package/dist/{serve-12571b42.cjs.prod.js → serve-7b2e35a1.cjs.prod.js} +3 -1
- package/dist/{serve-7339c495.cjs.dev.js → serve-efceb930.cjs.dev.js} +3 -1
- package/dist/{start-4197a42f.cjs.dev.js → start-07285706.cjs.dev.js} +9 -8
- package/dist/{start-f636eb04.esm.js → start-add48c1f.esm.js} +9 -7
- package/dist/{start-f0fda099.cjs.prod.js → start-fa56dc7c.cjs.prod.js} +9 -8
- package/dist/{start-vite-2aeafa6b.cjs.dev.js → start-vite-7d25a064.cjs.dev.js} +5 -3
- package/dist/{start-vite-b4770706.cjs.prod.js → start-vite-8e72a6a9.cjs.prod.js} +5 -3
- package/dist/{start-vite-381081d2.esm.js → start-vite-e706f764.esm.js} +5 -3
- package/package.json +14 -10
- 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 +7 -5
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +7 -5
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +7 -5
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.d.ts +3 -0
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.d.ts.map +1 -0
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +25 -0
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.js +7 -0
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +25 -0
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +17 -0
- package/webpack-loaders/i18n-message-compilation-loader/package.json +4 -0
- /package/dist/declarations/src/vite-plugins/{vite-plugin-custom-application.d.ts → vite-plugin-merchant-center-customization.d.ts} +0 -0
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
4
4
|
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
5
|
-
var fs = require('fs');
|
|
6
5
|
var chalk = require('chalk');
|
|
7
6
|
var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
|
8
7
|
var clearConsole = require('react-dev-utils/clearConsole');
|
|
@@ -10,11 +9,12 @@ var openBrowser = require('react-dev-utils/openBrowser');
|
|
|
10
9
|
var WebpackDevServerUtils = require('react-dev-utils/WebpackDevServerUtils');
|
|
11
10
|
var webpack = require('webpack');
|
|
12
11
|
var WebpackDevServer = require('webpack-dev-server');
|
|
13
|
-
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-
|
|
14
|
-
var paths = require('./paths-
|
|
12
|
+
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-8617b657.cjs.dev.js');
|
|
13
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
15
14
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
16
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
17
16
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
17
|
+
var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
18
18
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
19
19
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
20
20
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -36,18 +36,19 @@ require('webpackbar');
|
|
|
36
36
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
37
37
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
39
|
-
require('./create-postcss-config-
|
|
39
|
+
require('./create-postcss-config-6d4bea52.cjs.dev.js');
|
|
40
40
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
41
|
-
require('./package-
|
|
41
|
+
require('./package-751ef612.cjs.dev.js');
|
|
42
42
|
require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
43
43
|
require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
44
44
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
45
|
+
require('fs');
|
|
46
|
+
require('node:fs');
|
|
45
47
|
|
|
46
48
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
47
49
|
|
|
48
50
|
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
49
51
|
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
50
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
51
52
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
52
53
|
var checkRequiredFiles__default = /*#__PURE__*/_interopDefault(checkRequiredFiles);
|
|
53
54
|
var clearConsole__default = /*#__PURE__*/_interopDefault(clearConsole);
|
|
@@ -110,13 +111,13 @@ const createWebpackDevServerConfig = _ref => {
|
|
|
110
111
|
|
|
111
112
|
async function run() {
|
|
112
113
|
var _config$output, _context;
|
|
113
|
-
const useYarn =
|
|
114
|
+
const useYarn = doesFileExist.doesFileExist(paths.paths.yarnLockFile);
|
|
114
115
|
const isInteractive = process.stdout.isTTY;
|
|
115
116
|
|
|
116
117
|
// Whether or not `react-refresh` is enabled, `react-refresh` is not 100% stable at this time,
|
|
117
118
|
// which is why it's disabled by default.
|
|
118
119
|
|
|
119
|
-
const hasWebpackConfig =
|
|
120
|
+
const hasWebpackConfig = doesFileExist.doesFileExist(paths.paths.appWebpackConfig);
|
|
120
121
|
|
|
121
122
|
// Warn and crash if required files are missing
|
|
122
123
|
if (!checkRequiredFiles__default["default"]([])) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
2
2
|
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
3
|
-
import fs from 'fs';
|
|
4
3
|
import chalk from 'chalk';
|
|
5
4
|
import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles';
|
|
6
5
|
import clearConsole from 'react-dev-utils/clearConsole';
|
|
@@ -8,11 +7,12 @@ import openBrowser from 'react-dev-utils/openBrowser';
|
|
|
8
7
|
import { choosePort, prepareUrls, createCompiler } from 'react-dev-utils/WebpackDevServerUtils';
|
|
9
8
|
import webpack from 'webpack';
|
|
10
9
|
import WebpackDevServer from 'webpack-dev-server';
|
|
11
|
-
import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-
|
|
12
|
-
import { p as paths } from './paths-
|
|
10
|
+
import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-e2c3eb7f.esm.js';
|
|
11
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
13
12
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
14
13
|
import { createMcDevAuthenticationMiddleware } from '@commercetools-frontend/mc-dev-authentication';
|
|
15
14
|
import { processHeaders } from '@commercetools-frontend/mc-html-template';
|
|
15
|
+
import { d as doesFileExist } from './does-file-exist-32618334.esm.js';
|
|
16
16
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
17
17
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
18
18
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
@@ -34,12 +34,14 @@ import 'webpackbar';
|
|
|
34
34
|
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
35
35
|
import '@babel/runtime-corejs3/helpers/createClass';
|
|
36
36
|
import '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
37
|
-
import './create-postcss-config-
|
|
37
|
+
import './create-postcss-config-dcc87d4c.esm.js';
|
|
38
38
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
39
|
-
import './package-
|
|
39
|
+
import './package-8981cb95.esm.js';
|
|
40
40
|
import './has-jsx-runtime-e3ecb09b.esm.js';
|
|
41
41
|
import './vendors-to-transpile-7dc84a72.esm.js';
|
|
42
42
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
43
|
+
import 'fs';
|
|
44
|
+
import 'node:fs';
|
|
43
45
|
|
|
44
46
|
const host = process.env.HOST || '0.0.0.0';
|
|
45
47
|
// We support configuring the sockjs pathname during development.
|
|
@@ -96,13 +98,13 @@ const createWebpackDevServerConfig = _ref => {
|
|
|
96
98
|
|
|
97
99
|
async function run() {
|
|
98
100
|
var _config$output, _context;
|
|
99
|
-
const useYarn =
|
|
101
|
+
const useYarn = doesFileExist(paths.yarnLockFile);
|
|
100
102
|
const isInteractive = process.stdout.isTTY;
|
|
101
103
|
|
|
102
104
|
// Whether or not `react-refresh` is enabled, `react-refresh` is not 100% stable at this time,
|
|
103
105
|
// which is why it's disabled by default.
|
|
104
106
|
|
|
105
|
-
const hasWebpackConfig =
|
|
107
|
+
const hasWebpackConfig = doesFileExist(paths.appWebpackConfig);
|
|
106
108
|
|
|
107
109
|
// Warn and crash if required files are missing
|
|
108
110
|
if (!checkRequiredFiles([])) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
4
4
|
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
5
|
-
var fs = require('fs');
|
|
6
5
|
var chalk = require('chalk');
|
|
7
6
|
var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
|
8
7
|
var clearConsole = require('react-dev-utils/clearConsole');
|
|
@@ -10,11 +9,12 @@ var openBrowser = require('react-dev-utils/openBrowser');
|
|
|
10
9
|
var WebpackDevServerUtils = require('react-dev-utils/WebpackDevServerUtils');
|
|
11
10
|
var webpack = require('webpack');
|
|
12
11
|
var WebpackDevServer = require('webpack-dev-server');
|
|
13
|
-
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-
|
|
14
|
-
var paths = require('./paths-
|
|
12
|
+
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-d8306fb5.cjs.prod.js');
|
|
13
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
15
14
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
16
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
17
16
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
17
|
+
var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
|
|
18
18
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
19
19
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
20
20
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -36,18 +36,19 @@ require('webpackbar');
|
|
|
36
36
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
37
37
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
39
|
-
require('./create-postcss-config-
|
|
39
|
+
require('./create-postcss-config-b4f3b872.cjs.prod.js');
|
|
40
40
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
41
|
-
require('./package-
|
|
41
|
+
require('./package-edc8f749.cjs.prod.js');
|
|
42
42
|
require('./has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
43
43
|
require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
44
44
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
45
|
+
require('fs');
|
|
46
|
+
require('node:fs');
|
|
45
47
|
|
|
46
48
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
47
49
|
|
|
48
50
|
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
49
51
|
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
50
|
-
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
51
52
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
52
53
|
var checkRequiredFiles__default = /*#__PURE__*/_interopDefault(checkRequiredFiles);
|
|
53
54
|
var clearConsole__default = /*#__PURE__*/_interopDefault(clearConsole);
|
|
@@ -110,13 +111,13 @@ const createWebpackDevServerConfig = _ref => {
|
|
|
110
111
|
|
|
111
112
|
async function run() {
|
|
112
113
|
var _config$output, _context;
|
|
113
|
-
const useYarn =
|
|
114
|
+
const useYarn = doesFileExist.doesFileExist(paths.paths.yarnLockFile);
|
|
114
115
|
const isInteractive = process.stdout.isTTY;
|
|
115
116
|
|
|
116
117
|
// Whether or not `react-refresh` is enabled, `react-refresh` is not 100% stable at this time,
|
|
117
118
|
// which is why it's disabled by default.
|
|
118
119
|
|
|
119
|
-
const hasWebpackConfig =
|
|
120
|
+
const hasWebpackConfig = doesFileExist.doesFileExist(paths.paths.appWebpackConfig);
|
|
120
121
|
|
|
121
122
|
// Warn and crash if required files are missing
|
|
122
123
|
if (!checkRequiredFiles__default["default"]([])) {
|
|
@@ -10,13 +10,15 @@ var vite = require('vite');
|
|
|
10
10
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
11
11
|
var assets = require('@commercetools-frontend/assets');
|
|
12
12
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
13
|
-
var paths = require('./paths-
|
|
13
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
14
14
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
15
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
16
16
|
var vitePluginSvgr = require('./vite-plugin-svgr-496f5b25.cjs.dev.js');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
18
18
|
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
19
19
|
require('fs');
|
|
20
|
+
require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
21
|
+
require('node:fs');
|
|
20
22
|
require('crypto');
|
|
21
23
|
require('@rollup/pluginutils');
|
|
22
24
|
|
|
@@ -36,7 +38,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
36
38
|
configureServer(server) {
|
|
37
39
|
return () => {
|
|
38
40
|
// Users do not need to have/maintain the `index.html` (as expected by Vite)
|
|
39
|
-
// as it's generated and maintained by the
|
|
41
|
+
// as it's generated and maintained by the Merchant Center customization CLI.
|
|
40
42
|
// Therefore, the generated `index.html` (template) is written into the `/public`
|
|
41
43
|
// folder so that it's gitignored.
|
|
42
44
|
// As a result, we need to make sure to point the URI path to the correct location.
|
|
@@ -79,7 +81,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
79
81
|
async function run() {
|
|
80
82
|
const DEFAULT_PORT = _parseInt__default["default"](String(process.env.HTTP_PORT), 10) || 3001;
|
|
81
83
|
|
|
82
|
-
// Load the
|
|
84
|
+
// Load the Merchant Center customization config file first.
|
|
83
85
|
const applicationConfig$1 = applicationConfig.processConfig();
|
|
84
86
|
|
|
85
87
|
// Ensure the `/public` folder exists.
|
|
@@ -10,13 +10,15 @@ var vite = require('vite');
|
|
|
10
10
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
11
11
|
var assets = require('@commercetools-frontend/assets');
|
|
12
12
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
13
|
-
var paths = require('./paths-
|
|
13
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
14
14
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
15
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
16
16
|
var vitePluginSvgr = require('./vite-plugin-svgr-7def8ea1.cjs.prod.js');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
18
18
|
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
19
19
|
require('fs');
|
|
20
|
+
require('./does-file-exist-be53305d.cjs.prod.js');
|
|
21
|
+
require('node:fs');
|
|
20
22
|
require('crypto');
|
|
21
23
|
require('@rollup/pluginutils');
|
|
22
24
|
|
|
@@ -36,7 +38,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
36
38
|
configureServer(server) {
|
|
37
39
|
return () => {
|
|
38
40
|
// Users do not need to have/maintain the `index.html` (as expected by Vite)
|
|
39
|
-
// as it's generated and maintained by the
|
|
41
|
+
// as it's generated and maintained by the Merchant Center customization CLI.
|
|
40
42
|
// Therefore, the generated `index.html` (template) is written into the `/public`
|
|
41
43
|
// folder so that it's gitignored.
|
|
42
44
|
// As a result, we need to make sure to point the URI path to the correct location.
|
|
@@ -79,7 +81,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
79
81
|
async function run() {
|
|
80
82
|
const DEFAULT_PORT = _parseInt__default["default"](String(process.env.HTTP_PORT), 10) || 3001;
|
|
81
83
|
|
|
82
|
-
// Load the
|
|
84
|
+
// Load the Merchant Center customization config file first.
|
|
83
85
|
const applicationConfig$1 = applicationConfig.processConfig();
|
|
84
86
|
|
|
85
87
|
// Ensure the `/public` folder exists.
|
|
@@ -8,13 +8,15 @@ import { createServer } from 'vite';
|
|
|
8
8
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
9
9
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
10
10
|
import { processHeaders, replaceHtmlPlaceholders, generateTemplate } from '@commercetools-frontend/mc-html-template';
|
|
11
|
-
import { p as paths } from './paths-
|
|
11
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
12
12
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
13
13
|
import { createMcDevAuthenticationMiddleware } from '@commercetools-frontend/mc-dev-authentication';
|
|
14
14
|
import { v as vitePluginSvgr } from './vite-plugin-svgr-13d96e7a.esm.js';
|
|
15
15
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
16
16
|
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
17
17
|
import 'fs';
|
|
18
|
+
import './does-file-exist-32618334.esm.js';
|
|
19
|
+
import 'node:fs';
|
|
18
20
|
import 'crypto';
|
|
19
21
|
import '@rollup/pluginutils';
|
|
20
22
|
|
|
@@ -24,7 +26,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
24
26
|
configureServer(server) {
|
|
25
27
|
return () => {
|
|
26
28
|
// Users do not need to have/maintain the `index.html` (as expected by Vite)
|
|
27
|
-
// as it's generated and maintained by the
|
|
29
|
+
// as it's generated and maintained by the Merchant Center customization CLI.
|
|
28
30
|
// Therefore, the generated `index.html` (template) is written into the `/public`
|
|
29
31
|
// folder so that it's gitignored.
|
|
30
32
|
// As a result, we need to make sure to point the URI path to the correct location.
|
|
@@ -67,7 +69,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
67
69
|
async function run() {
|
|
68
70
|
const DEFAULT_PORT = _parseInt(String(process.env.HTTP_PORT), 10) || 3001;
|
|
69
71
|
|
|
70
|
-
// Load the
|
|
72
|
+
// Load the Merchant Center customization config file first.
|
|
71
73
|
const applicationConfig = processConfig();
|
|
72
74
|
|
|
73
75
|
// Ensure the `/public` folder exists.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/mc-scripts",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.25.0",
|
|
4
4
|
"description": "Configuration and scripts for developing a MC application",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
9
9
|
"directory": "packages/mc-scripts"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://docs.commercetools.com/
|
|
11
|
+
"homepage": "https://docs.commercetools.com/merchant-center-customizations",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"javascript",
|
|
14
14
|
"frontend",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"./application-runtime.ts",
|
|
28
28
|
"./cli.ts",
|
|
29
29
|
"./postcss.ts",
|
|
30
|
-
"./webpack.ts"
|
|
30
|
+
"./webpack.ts",
|
|
31
|
+
"./webpack-loaders/i18n-message-compilation-loader.ts"
|
|
31
32
|
]
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
"application-runtime",
|
|
39
40
|
"postcss",
|
|
40
41
|
"webpack",
|
|
42
|
+
"webpack-loaders",
|
|
41
43
|
"package.json",
|
|
42
44
|
"LICENSE",
|
|
43
45
|
"README.md"
|
|
@@ -58,14 +60,15 @@
|
|
|
58
60
|
"@babel/core": "^7.22.17",
|
|
59
61
|
"@babel/runtime": "^7.22.15",
|
|
60
62
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
61
|
-
"@commercetools-frontend/application-components": "22.
|
|
62
|
-
"@commercetools-frontend/application-config": "22.
|
|
63
|
-
"@commercetools-frontend/assets": "22.
|
|
64
|
-
"@commercetools-frontend/babel-preset-mc-app": "22.
|
|
65
|
-
"@commercetools-frontend/constants": "22.
|
|
66
|
-
"@commercetools-frontend/mc-dev-authentication": "22.
|
|
67
|
-
"@commercetools-frontend/mc-html-template": "22.
|
|
63
|
+
"@commercetools-frontend/application-components": "22.25.0",
|
|
64
|
+
"@commercetools-frontend/application-config": "22.25.0",
|
|
65
|
+
"@commercetools-frontend/assets": "22.25.0",
|
|
66
|
+
"@commercetools-frontend/babel-preset-mc-app": "22.25.0",
|
|
67
|
+
"@commercetools-frontend/constants": "22.25.0",
|
|
68
|
+
"@commercetools-frontend/mc-dev-authentication": "22.25.0",
|
|
69
|
+
"@commercetools-frontend/mc-html-template": "22.25.0",
|
|
68
70
|
"@commercetools/http-user-agent": "3.0.0",
|
|
71
|
+
"@formatjs/cli-lib": "^6.3.8",
|
|
69
72
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
|
|
70
73
|
"@rollup/plugin-graphql": "2.0.4",
|
|
71
74
|
"@rollup/pluginutils": "5.1.0",
|
|
@@ -131,6 +134,7 @@
|
|
|
131
134
|
"@types/moment-locales-webpack-plugin": "^1.2.3",
|
|
132
135
|
"@types/node-fetch": "2.6.11",
|
|
133
136
|
"@types/serve-handler": "^6.1.1",
|
|
137
|
+
"memfs": "^4.8.2",
|
|
134
138
|
"mock-fs": "^5.2.0",
|
|
135
139
|
"msw": "0.49.3",
|
|
136
140
|
"rimraf": "5.0.5"
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createPostcssConfig = require('../../dist/create-postcss-config-
|
|
5
|
+
var createPostcssConfig = require('../../dist/create-postcss-config-6d4bea52.cjs.dev.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
7
7
|
require('path');
|
|
8
|
-
require('../../dist/package-
|
|
8
|
+
require('../../dist/package-751ef612.cjs.dev.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createPostcssConfig = require('../../dist/create-postcss-config-
|
|
5
|
+
var createPostcssConfig = require('../../dist/create-postcss-config-b4f3b872.cjs.prod.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
7
7
|
require('path');
|
|
8
|
-
require('../../dist/package-
|
|
8
|
+
require('../../dist/package-edc8f749.cjs.prod.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createPostcssConfig } from '../../dist/create-postcss-config-
|
|
1
|
+
export { c as createPostcssConfig } from '../../dist/create-postcss-config-dcc87d4c.esm.js';
|
|
2
2
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
3
3
|
import 'path';
|
|
4
|
-
import '../../dist/package-
|
|
4
|
+
import '../../dist/package-8981cb95.esm.js';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-
|
|
6
|
-
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-
|
|
5
|
+
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-8617b657.cjs.dev.js');
|
|
6
|
+
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-b131d6d7.cjs.dev.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
8
8
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -29,13 +29,15 @@ require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
29
29
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
30
|
require('@commercetools-frontend/application-config');
|
|
31
31
|
require('@commercetools-frontend/mc-html-template');
|
|
32
|
-
require('../../dist/create-postcss-config-
|
|
32
|
+
require('../../dist/create-postcss-config-6d4bea52.cjs.dev.js');
|
|
33
33
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
34
|
-
require('../../dist/package-
|
|
34
|
+
require('../../dist/package-751ef612.cjs.dev.js');
|
|
35
35
|
require('../../dist/has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
36
|
-
require('../../dist/paths-
|
|
36
|
+
require('../../dist/paths-ec3e3a7d.cjs.dev.js');
|
|
37
37
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
38
38
|
require('fs');
|
|
39
|
+
require('../../dist/does-file-exist-eb86baca.cjs.dev.js');
|
|
40
|
+
require('node:fs');
|
|
39
41
|
require('../../dist/vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
40
42
|
require('@babel/runtime-corejs3/core-js-stable/number/is-integer');
|
|
41
43
|
require('css-minimizer-webpack-plugin');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-
|
|
6
|
-
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-
|
|
5
|
+
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-d8306fb5.cjs.prod.js');
|
|
6
|
+
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-73ae0ffb.cjs.prod.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
8
8
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -29,13 +29,15 @@ require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
29
29
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
30
|
require('@commercetools-frontend/application-config');
|
|
31
31
|
require('@commercetools-frontend/mc-html-template');
|
|
32
|
-
require('../../dist/create-postcss-config-
|
|
32
|
+
require('../../dist/create-postcss-config-b4f3b872.cjs.prod.js');
|
|
33
33
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
34
|
-
require('../../dist/package-
|
|
34
|
+
require('../../dist/package-edc8f749.cjs.prod.js');
|
|
35
35
|
require('../../dist/has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
36
|
-
require('../../dist/paths-
|
|
36
|
+
require('../../dist/paths-af1a725a.cjs.prod.js');
|
|
37
37
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
38
38
|
require('fs');
|
|
39
|
+
require('../../dist/does-file-exist-be53305d.cjs.prod.js');
|
|
40
|
+
require('node:fs');
|
|
39
41
|
require('../../dist/vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
40
42
|
require('@babel/runtime-corejs3/core-js-stable/number/is-integer');
|
|
41
43
|
require('css-minimizer-webpack-plugin');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as createWebpackConfigForDevelopment } from '../../dist/create-webpack-config-for-development-
|
|
2
|
-
export { c as createWebpackConfigForProduction } from '../../dist/create-webpack-config-for-production-
|
|
1
|
+
export { c as createWebpackConfigForDevelopment } from '../../dist/create-webpack-config-for-development-e2c3eb7f.esm.js';
|
|
2
|
+
export { c as createWebpackConfigForProduction } from '../../dist/create-webpack-config-for-production-7707d181.esm.js';
|
|
3
3
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
4
4
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
5
5
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
@@ -25,13 +25,15 @@ import '@babel/runtime-corejs3/helpers/createClass';
|
|
|
25
25
|
import '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
26
26
|
import '@commercetools-frontend/application-config';
|
|
27
27
|
import '@commercetools-frontend/mc-html-template';
|
|
28
|
-
import '../../dist/create-postcss-config-
|
|
28
|
+
import '../../dist/create-postcss-config-dcc87d4c.esm.js';
|
|
29
29
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
30
|
-
import '../../dist/package-
|
|
30
|
+
import '../../dist/package-8981cb95.esm.js';
|
|
31
31
|
import '../../dist/has-jsx-runtime-e3ecb09b.esm.js';
|
|
32
|
-
import '../../dist/paths-
|
|
32
|
+
import '../../dist/paths-7bf7e88e.esm.js';
|
|
33
33
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
34
34
|
import 'fs';
|
|
35
|
+
import '../../dist/does-file-exist-32618334.esm.js';
|
|
36
|
+
import 'node:fs';
|
|
35
37
|
import '../../dist/vendors-to-transpile-7dc84a72.esm.js';
|
|
36
38
|
import '@babel/runtime-corejs3/core-js-stable/number/is-integer';
|
|
37
39
|
import 'css-minimizer-webpack-plugin';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from "../../../dist/declarations/src/webpack-loaders/i18n-message-compilation-loader";
|
|
2
|
+
export { default } from "../../../dist/declarations/src/webpack-loaders/i18n-message-compilation-loader";
|
|
3
|
+
//# sourceMappingURL=commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.d.ts","sourceRoot":"","sources":["../../../dist/declarations/src/webpack-loaders/i18n-message-compilation-loader.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
6
|
+
var cliLib = require('@formatjs/cli-lib');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
11
|
+
|
|
12
|
+
const i18nMessageCompilationLoader = function (source) {
|
|
13
|
+
const callback = this.async();
|
|
14
|
+
const messageContents = JSON.parse(source);
|
|
15
|
+
const firstValue = _Object$values__default["default"](messageContents)[0];
|
|
16
|
+
const format = typeof firstValue === 'string' ? 'simple' : 'transifex';
|
|
17
|
+
cliLib.compile([this.resourcePath], {
|
|
18
|
+
ast: true,
|
|
19
|
+
format
|
|
20
|
+
}).then(result => {
|
|
21
|
+
callback(null, result);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports["default"] = i18nMessageCompilationLoader;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
if (process.env.NODE_ENV === "production") {
|
|
4
|
+
module.exports = require("./commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js");
|
|
5
|
+
} else {
|
|
6
|
+
module.exports = require("./commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js");
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
6
|
+
var cliLib = require('@formatjs/cli-lib');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
11
|
+
|
|
12
|
+
const i18nMessageCompilationLoader = function (source) {
|
|
13
|
+
const callback = this.async();
|
|
14
|
+
const messageContents = JSON.parse(source);
|
|
15
|
+
const firstValue = _Object$values__default["default"](messageContents)[0];
|
|
16
|
+
const format = typeof firstValue === 'string' ? 'simple' : 'transifex';
|
|
17
|
+
cliLib.compile([this.resourcePath], {
|
|
18
|
+
ast: true,
|
|
19
|
+
format
|
|
20
|
+
}).then(result => {
|
|
21
|
+
callback(null, result);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports["default"] = i18nMessageCompilationLoader;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
2
|
+
import { compile } from '@formatjs/cli-lib';
|
|
3
|
+
|
|
4
|
+
const i18nMessageCompilationLoader = function (source) {
|
|
5
|
+
const callback = this.async();
|
|
6
|
+
const messageContents = JSON.parse(source);
|
|
7
|
+
const firstValue = _Object$values(messageContents)[0];
|
|
8
|
+
const format = typeof firstValue === 'string' ? 'simple' : 'transifex';
|
|
9
|
+
compile([this.resourcePath], {
|
|
10
|
+
ast: true,
|
|
11
|
+
format
|
|
12
|
+
}).then(result => {
|
|
13
|
+
callback(null, result);
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { i18nMessageCompilationLoader as default };
|