@commercetools-frontend/mc-scripts 27.5.1 → 27.5.3
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 +19 -39
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +19 -39
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +11 -11
- package/dist/{build-7c7442bd.cjs.prod.js → build-BP3m-wjz.cjs.prod.js} +23 -23
- package/dist/{build-2cbde331.cjs.dev.js → build-Dq8dqtsd.cjs.dev.js} +23 -23
- package/dist/{build-4ab9306b.esm.js → build-GEMI3W9m.esm.js} +7 -7
- package/dist/{build-vite-1526e4f8.esm.js → build-vite-CO8mi4hd.esm.js} +20 -10
- package/dist/{build-vite-71889a4a.cjs.prod.js → build-vite-D67xSRU1.cjs.prod.js} +46 -36
- package/dist/{build-vite-2fb9320e.cjs.dev.js → build-vite-Dxi3rfHf.cjs.dev.js} +46 -36
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +2 -4
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +2 -4
- package/dist/commercetools-frontend-mc-scripts.esm.js +2 -2
- package/dist/{compile-html-025cd493.esm.js → compile-html-BVvy3IQD.esm.js} +2 -2
- package/dist/{compile-html-f4ac88cc.cjs.dev.js → compile-html-DZlUpFXg.cjs.prod.js} +8 -8
- package/dist/{compile-html-50fd05ec.cjs.prod.js → compile-html-Ds1YojsY.cjs.dev.js} +8 -8
- package/dist/{config-sync-d5c4aa9b.esm.js → config-sync-Bu7U5gn5.esm.js} +5 -5
- package/dist/{config-sync-7ae74804.cjs.dev.js → config-sync-Cd0sSSrd.cjs.dev.js} +22 -22
- package/dist/{config-sync-d3d5d721.cjs.prod.js → config-sync-D6xLjo9S.cjs.prod.js} +22 -22
- package/dist/{config-sync-ci-d3104a62.cjs.prod.js → config-sync-ci-CXgQcemF.cjs.prod.js} +21 -21
- package/dist/{config-sync-ci-9c50ed6f.esm.js → config-sync-ci-Dq7bAqeu.esm.js} +5 -5
- package/dist/{config-sync-ci-732e0c5d.cjs.dev.js → config-sync-ci-SDsF-Onw.cjs.dev.js} +21 -21
- package/dist/{config-sync-helpers-ea628bce.cjs.prod.js → config-sync-helpers-9kvPwuoy.cjs.prod.js} +47 -47
- package/dist/{config-sync-helpers-bea5f027.esm.js → config-sync-helpers-BLXJp1-D.esm.js} +3 -3
- package/dist/{config-sync-helpers-178da465.cjs.dev.js → config-sync-helpers-DUK45F_R.cjs.dev.js} +47 -47
- package/dist/{create-postcss-config-f6a5f68b.esm.js → create-postcss-config-CN9_8Usa.esm.js} +1 -1
- package/dist/{create-postcss-config-3f3bda09.cjs.prod.js → create-postcss-config-DAShdAyB.cjs.prod.js} +3 -3
- package/dist/{create-postcss-config-e4c767b4.cjs.dev.js → create-postcss-config-NN2FAhvH.cjs.dev.js} +3 -3
- package/dist/{create-webpack-config-for-development-c6e48557.esm.js → create-webpack-config-for-development-5HpRHV9G.esm.js} +5 -5
- package/dist/{create-webpack-config-for-development-4a2616e9.cjs.prod.js → create-webpack-config-for-development-CxGehl7I.cjs.prod.js} +25 -25
- package/dist/{create-webpack-config-for-development-a2df037a.cjs.dev.js → create-webpack-config-for-development-hxSNyq2_.cjs.dev.js} +25 -25
- package/dist/{create-webpack-config-for-production-04a7a9f8.esm.js → create-webpack-config-for-production-BY0UNoNz.esm.js} +5 -5
- package/dist/{create-webpack-config-for-production-443f6fe7.cjs.prod.js → create-webpack-config-for-production-CW0DlZBz.cjs.prod.js} +32 -32
- package/dist/{create-webpack-config-for-production-12e257fc.cjs.dev.js → create-webpack-config-for-production-Edp9dzmw.cjs.dev.js} +32 -32
- package/dist/{credentials-storage-fd195144.cjs.dev.js → credentials-storage-B0tDCH7i.cjs.dev.js} +10 -10
- package/dist/{credentials-storage-67deadc3.esm.js → credentials-storage-B79bb0Ns.esm.js} +1 -1
- package/dist/{credentials-storage-ea1c16dc.cjs.prod.js → credentials-storage-C3TlK0a8.cjs.prod.js} +10 -10
- package/dist/{deployment-previews-set-491442d7.cjs.dev.js → deployment-previews-set-BuHX8wKo.cjs.dev.js} +22 -22
- package/dist/{deployment-previews-set-4b020cb4.esm.js → deployment-previews-set-C2OPIfy-.esm.js} +4 -4
- package/dist/{deployment-previews-set-2b334c11.cjs.prod.js → deployment-previews-set-nvkAPwYw.cjs.prod.js} +22 -22
- package/dist/{does-file-exist-be53305d.cjs.prod.js → does-file-exist-DrcZIPe6.cjs.dev.js} +2 -2
- package/dist/{does-file-exist-eb86baca.cjs.dev.js → does-file-exist-DrcZIPe6.cjs.prod.js} +2 -2
- package/dist/{graphql-requests-bd7a3fe9.cjs.dev.js → graphql-requests-BeUd4g3v.cjs.dev.js} +9 -9
- package/dist/{graphql-requests-6ead2029.cjs.prod.js → graphql-requests-D0rtMo7K.cjs.prod.js} +9 -9
- package/dist/{graphql-requests-87338c52.esm.js → graphql-requests-DCLX_2y0.esm.js} +4 -4
- package/dist/{i18n-message-complilation-7311cb29.cjs.dev.js → i18n-message-complilation-CdVhuyWk.cjs.dev.js} +3 -3
- package/dist/{i18n-message-complilation-7762da61.cjs.prod.js → i18n-message-complilation-CdVhuyWk.cjs.prod.js} +3 -3
- package/dist/{login-2d10deff.cjs.dev.js → login-BagHOLO1.cjs.prod.js} +42 -60
- package/dist/{login-26cfe1af.cjs.prod.js → login-DKzmRa46.cjs.dev.js} +42 -60
- package/dist/{login-ab249036.esm.js → login-DZVfG3Jq.esm.js} +3 -3
- package/dist/{optimizations-da5a0cfa.cjs.prod.js → optimizations-CEaq4axa.cjs.dev.js} +8 -8
- package/dist/{optimizations-56be74d6.cjs.dev.js → optimizations-CEaq4axa.cjs.prod.js} +8 -8
- package/dist/{optimizations-54382f7b.esm.js → optimizations-Cjrg77Gu.esm.js} +1 -1
- package/dist/package-B1Y3_DDl.cjs.dev.js +17 -0
- package/dist/package-BiK3ergJ.esm.js +15 -0
- package/dist/package-DxhqRLHb.cjs.prod.js +12 -0
- package/dist/{paths-b76fc753.cjs.dev.js → paths-B0WM5jb9.cjs.dev.js} +5 -5
- package/dist/{paths-39f22b8b.esm.js → paths-Cg5Vq6RE.esm.js} +1 -1
- package/dist/{paths-7768b440.cjs.prod.js → paths-DtvtCG0U.cjs.prod.js} +5 -5
- package/dist/{serve-b1c12985.cjs.dev.js → serve-BwNRk6vi.cjs.prod.js} +13 -13
- package/dist/{serve-3837602d.cjs.prod.js → serve-BxRJOSeR.cjs.dev.js} +13 -13
- package/dist/{serve-22475fec.esm.js → serve-fXDv4-Pm.esm.js} +2 -2
- package/dist/{start-19facf6d.cjs.prod.js → start-CQgQhNhU.cjs.prod.js} +17 -17
- package/dist/{start-9b1252f9.cjs.dev.js → start-OjGog63p.cjs.dev.js} +17 -17
- package/dist/{start-3c1e5902.esm.js → start-suUcoYml.esm.js} +7 -7
- package/dist/{start-vite-7d1161e8.esm.js → start-vite-BOrX5xsW.esm.js} +3 -3
- package/dist/{start-vite-29078b3a.cjs.prod.js → start-vite-Bf9UIg63.cjs.prod.js} +14 -14
- package/dist/{start-vite-068e9f73.cjs.dev.js → start-vite-CeaoWKrT.cjs.dev.js} +14 -14
- package/dist/{vite-plugin-svgr-4034a834.cjs.prod.js → vite-plugin-svgr-CRRIY_Py.cjs.dev.js} +6 -24
- package/dist/{vite-plugin-svgr-7d06f400.cjs.dev.js → vite-plugin-svgr-CRRIY_Py.cjs.prod.js} +6 -24
- package/package.json +8 -8
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -4
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -4
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +8 -10
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +8 -10
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +8 -8
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +2 -2
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +2 -2
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
- package/dist/package-62998a4b.cjs.prod.js +0 -167
- package/dist/package-a686a0ee.esm.js +0 -165
- package/dist/package-fe1840f3.cjs.dev.js +0 -167
- /package/dist/{does-file-exist-32618334.esm.js → does-file-exist-C7l6j7NP.esm.js} +0 -0
- /package/dist/{i18n-message-complilation-21d3b0aa.esm.js → i18n-message-complilation-BRZ7ffQI.esm.js} +0 -0
- /package/dist/{vendors-to-transpile-04a49d40.cjs.prod.js → vendors-to-transpile-DLHlk7c-.cjs.dev.js} +0 -0
- /package/dist/{vendors-to-transpile-6ab4ea06.cjs.dev.js → vendors-to-transpile-DLHlk7c-.cjs.prod.js} +0 -0
- /package/dist/{vendors-to-transpile-7dc84a72.esm.js → vendors-to-transpile-uu9TNPDO.esm.js} +0 -0
- /package/dist/{vite-plugin-svgr-de6ee7da.esm.js → vite-plugin-svgr-B1JerYlQ.esm.js} +0 -0
|
@@ -10,19 +10,19 @@ 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-DtvtCG0U.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
|
-
var vitePluginSvgr = require('./vite-plugin-svgr-
|
|
16
|
+
var vitePluginSvgr = require('./vite-plugin-svgr-CRRIY_Py.cjs.prod.js');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
18
18
|
require('fs');
|
|
19
|
-
require('./does-file-exist-
|
|
19
|
+
require('./does-file-exist-DrcZIPe6.cjs.prod.js');
|
|
20
20
|
require('node:fs');
|
|
21
21
|
require('crypto');
|
|
22
22
|
require('@rollup/pluginutils');
|
|
23
23
|
require('@babel/runtime-corejs3/core-js/instance/match-all');
|
|
24
24
|
|
|
25
|
-
function _interopDefault (e) { return e && e.__esModule ? e : {
|
|
25
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
26
|
|
|
27
27
|
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
28
28
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
@@ -58,7 +58,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
58
58
|
*/
|
|
59
59
|
transformIndexHtml(rawHtml, _ctx) {
|
|
60
60
|
const compiledHeaders = mcHtmlTemplate.processHeaders(applicationConfig);
|
|
61
|
-
const enhancedLocalEnv = _Object$assign__default
|
|
61
|
+
const enhancedLocalEnv = _Object$assign__default.default({}, applicationConfig.env,
|
|
62
62
|
// Now that the app config is defined as a `env.json`, when we start the FE app
|
|
63
63
|
// to point to the local backend API by passing the `MC_API_URL` env does not
|
|
64
64
|
// work anymore). To make it work again, we can override the `env.json` config
|
|
@@ -79,50 +79,50 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
async function run() {
|
|
82
|
-
const DEFAULT_PORT = _parseInt__default
|
|
82
|
+
const DEFAULT_PORT = _parseInt__default.default(String(process.env.HTTP_PORT), 10) || 3001;
|
|
83
83
|
|
|
84
84
|
// Load the Merchant Center customization config file first.
|
|
85
85
|
const applicationConfig$1 = await applicationConfig.processConfig();
|
|
86
86
|
|
|
87
87
|
// Ensure the `/public` folder exists.
|
|
88
|
-
fs__default
|
|
88
|
+
fs__default.default.mkdirSync(paths.paths.appBuild, {
|
|
89
89
|
recursive: true
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
// Generate `index.html` (template).
|
|
93
|
-
const appEntryPoint = path__default
|
|
93
|
+
const appEntryPoint = path__default.default.relative(paths.paths.appRoot, paths.paths.entryPoint);
|
|
94
94
|
const html = mcHtmlTemplate.generateTemplate({
|
|
95
95
|
// Define the module entry point (path relative to the `/public` folder).
|
|
96
96
|
// NOTE: that this is different from the production configuration.
|
|
97
97
|
scriptImports: [`<script type="module" src="/../${appEntryPoint}" defer></script>`]
|
|
98
98
|
});
|
|
99
99
|
// Write `index.html` (template) into the `/public` folder.
|
|
100
|
-
fs__default
|
|
100
|
+
fs__default.default.writeFileSync(paths.paths.appIndexHtml, html, {
|
|
101
101
|
encoding: 'utf8'
|
|
102
102
|
});
|
|
103
103
|
const compiledHeaders = mcHtmlTemplate.processHeaders(applicationConfig$1);
|
|
104
104
|
const server = await vite.createServer({
|
|
105
105
|
root: paths.paths.appRoot,
|
|
106
106
|
define: {
|
|
107
|
-
'process.env.DEBUG': _JSON$stringify__default
|
|
108
|
-
'process.env.NODE_ENV': _JSON$stringify__default
|
|
107
|
+
'process.env.DEBUG': _JSON$stringify__default.default(false),
|
|
108
|
+
'process.env.NODE_ENV': _JSON$stringify__default.default('development')
|
|
109
109
|
},
|
|
110
110
|
server: {
|
|
111
111
|
open: true,
|
|
112
112
|
port: DEFAULT_PORT,
|
|
113
113
|
headers: compiledHeaders
|
|
114
114
|
},
|
|
115
|
-
plugins: [pluginGraphql__default
|
|
115
|
+
plugins: [pluginGraphql__default.default(), pluginReact__default.default({
|
|
116
116
|
jsxImportSource: '@emotion/react'
|
|
117
117
|
}), vitePluginSvgr.vitePluginSvgr(), vitePluginCustomApplication(applicationConfig$1)]
|
|
118
118
|
});
|
|
119
119
|
await server.listen();
|
|
120
120
|
|
|
121
121
|
// Copy public assets to `/public` folder (even in development).
|
|
122
|
-
fs__default
|
|
122
|
+
fs__default.default.copySync(path__default.default.join(assets.packageLocation, 'html-page'), paths.paths.appBuild, {
|
|
123
123
|
dereference: true
|
|
124
124
|
});
|
|
125
125
|
server.printUrls();
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
exports
|
|
128
|
+
exports.default = run;
|
|
@@ -10,19 +10,19 @@ 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-B0WM5jb9.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
|
-
var vitePluginSvgr = require('./vite-plugin-svgr-
|
|
16
|
+
var vitePluginSvgr = require('./vite-plugin-svgr-CRRIY_Py.cjs.dev.js');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
18
18
|
require('fs');
|
|
19
|
-
require('./does-file-exist-
|
|
19
|
+
require('./does-file-exist-DrcZIPe6.cjs.dev.js');
|
|
20
20
|
require('node:fs');
|
|
21
21
|
require('crypto');
|
|
22
22
|
require('@rollup/pluginutils');
|
|
23
23
|
require('@babel/runtime-corejs3/core-js/instance/match-all');
|
|
24
24
|
|
|
25
|
-
function _interopDefault (e) { return e && e.__esModule ? e : {
|
|
25
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
26
|
|
|
27
27
|
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
28
28
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
@@ -58,7 +58,7 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
58
58
|
*/
|
|
59
59
|
transformIndexHtml(rawHtml, _ctx) {
|
|
60
60
|
const compiledHeaders = mcHtmlTemplate.processHeaders(applicationConfig);
|
|
61
|
-
const enhancedLocalEnv = _Object$assign__default
|
|
61
|
+
const enhancedLocalEnv = _Object$assign__default.default({}, applicationConfig.env,
|
|
62
62
|
// Now that the app config is defined as a `env.json`, when we start the FE app
|
|
63
63
|
// to point to the local backend API by passing the `MC_API_URL` env does not
|
|
64
64
|
// work anymore). To make it work again, we can override the `env.json` config
|
|
@@ -79,50 +79,50 @@ const vitePluginCustomApplication = applicationConfig => {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
async function run() {
|
|
82
|
-
const DEFAULT_PORT = _parseInt__default
|
|
82
|
+
const DEFAULT_PORT = _parseInt__default.default(String(process.env.HTTP_PORT), 10) || 3001;
|
|
83
83
|
|
|
84
84
|
// Load the Merchant Center customization config file first.
|
|
85
85
|
const applicationConfig$1 = await applicationConfig.processConfig();
|
|
86
86
|
|
|
87
87
|
// Ensure the `/public` folder exists.
|
|
88
|
-
fs__default
|
|
88
|
+
fs__default.default.mkdirSync(paths.paths.appBuild, {
|
|
89
89
|
recursive: true
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
// Generate `index.html` (template).
|
|
93
|
-
const appEntryPoint = path__default
|
|
93
|
+
const appEntryPoint = path__default.default.relative(paths.paths.appRoot, paths.paths.entryPoint);
|
|
94
94
|
const html = mcHtmlTemplate.generateTemplate({
|
|
95
95
|
// Define the module entry point (path relative to the `/public` folder).
|
|
96
96
|
// NOTE: that this is different from the production configuration.
|
|
97
97
|
scriptImports: [`<script type="module" src="/../${appEntryPoint}" defer></script>`]
|
|
98
98
|
});
|
|
99
99
|
// Write `index.html` (template) into the `/public` folder.
|
|
100
|
-
fs__default
|
|
100
|
+
fs__default.default.writeFileSync(paths.paths.appIndexHtml, html, {
|
|
101
101
|
encoding: 'utf8'
|
|
102
102
|
});
|
|
103
103
|
const compiledHeaders = mcHtmlTemplate.processHeaders(applicationConfig$1);
|
|
104
104
|
const server = await vite.createServer({
|
|
105
105
|
root: paths.paths.appRoot,
|
|
106
106
|
define: {
|
|
107
|
-
'process.env.DEBUG': _JSON$stringify__default
|
|
108
|
-
'process.env.NODE_ENV': _JSON$stringify__default
|
|
107
|
+
'process.env.DEBUG': _JSON$stringify__default.default(false),
|
|
108
|
+
'process.env.NODE_ENV': _JSON$stringify__default.default('development')
|
|
109
109
|
},
|
|
110
110
|
server: {
|
|
111
111
|
open: true,
|
|
112
112
|
port: DEFAULT_PORT,
|
|
113
113
|
headers: compiledHeaders
|
|
114
114
|
},
|
|
115
|
-
plugins: [pluginGraphql__default
|
|
115
|
+
plugins: [pluginGraphql__default.default(), pluginReact__default.default({
|
|
116
116
|
jsxImportSource: '@emotion/react'
|
|
117
117
|
}), vitePluginSvgr.vitePluginSvgr(), vitePluginCustomApplication(applicationConfig$1)]
|
|
118
118
|
});
|
|
119
119
|
await server.listen();
|
|
120
120
|
|
|
121
121
|
// Copy public assets to `/public` folder (even in development).
|
|
122
|
-
fs__default
|
|
122
|
+
fs__default.default.copySync(path__default.default.join(assets.packageLocation, 'html-page'), paths.paths.appBuild, {
|
|
123
123
|
dereference: true
|
|
124
124
|
});
|
|
125
125
|
server.printUrls();
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
exports
|
|
128
|
+
exports.default = run;
|
|
@@ -6,25 +6,7 @@ var pluginutils = require('@rollup/pluginutils');
|
|
|
6
6
|
var vite = require('vite');
|
|
7
7
|
var _matchAllInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/match-all');
|
|
8
8
|
|
|
9
|
-
function _interopDefault (e) { return e && e.__esModule ? e : {
|
|
10
|
-
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n["default"] = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
10
|
|
|
29
11
|
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
30
12
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
@@ -33,7 +15,7 @@ var _matchAllInstanceProperty__default = /*#__PURE__*/_interopDefault(_matchAllI
|
|
|
33
15
|
async function optimizeEmbeddedPngs(code, id) {
|
|
34
16
|
const pngRegex = /href="data:image\/png;base64,([a-zA-Z0-9+/]+=*)"/gs;
|
|
35
17
|
let modifiedCode = code;
|
|
36
|
-
const matchesIterator = _matchAllInstanceProperty__default
|
|
18
|
+
const matchesIterator = _matchAllInstanceProperty__default.default(code).call(code, pngRegex);
|
|
37
19
|
for (const match of matchesIterator) {
|
|
38
20
|
const originalBase64 = match[1];
|
|
39
21
|
if (originalBase64) {
|
|
@@ -43,7 +25,7 @@ async function optimizeEmbeddedPngs(code, id) {
|
|
|
43
25
|
console.warn(`\n🚨 You have a large png embedded in ${fileName} - consider using an image tag instead 🚨`);
|
|
44
26
|
try {
|
|
45
27
|
const pngBuffer = Buffer.from(originalBase64, 'base64');
|
|
46
|
-
const sharp = (await
|
|
28
|
+
const sharp = (await import('sharp')).default;
|
|
47
29
|
const optimizedBuffer = await sharp(pngBuffer).png({
|
|
48
30
|
quality: 10,
|
|
49
31
|
compressionLevel: 9
|
|
@@ -72,9 +54,9 @@ function vitePluginSvgr() {
|
|
|
72
54
|
name: 'vite-plugin-svgr',
|
|
73
55
|
async transform(_code, id) {
|
|
74
56
|
if (filter(id)) {
|
|
75
|
-
const _await$import = await
|
|
57
|
+
const _await$import = await import('@svgr/core'),
|
|
76
58
|
transform = _await$import.transform;
|
|
77
|
-
const svgCode = await fs__default
|
|
59
|
+
const svgCode = await fs__default.default.promises.readFile(id, 'utf8');
|
|
78
60
|
let transformableSVGCode;
|
|
79
61
|
if (process.env.ENABLE_EXPERIMENTAL_SVG_PNG_OPTIMIZATION === 'true') {
|
|
80
62
|
// This is a temporary fix for the issue with large embedded PNGs
|
|
@@ -123,7 +105,7 @@ function vitePluginSvgr() {
|
|
|
123
105
|
name: 'prefixIds',
|
|
124
106
|
params: {
|
|
125
107
|
delim: '',
|
|
126
|
-
prefix: (_, info) => `svg${crypto__default
|
|
108
|
+
prefix: (_, info) => `svg${crypto__default.default.createHash('shake256', {
|
|
127
109
|
outputLength: 6
|
|
128
110
|
}).update(info.path || '').digest('hex')}`
|
|
129
111
|
}
|
|
@@ -6,25 +6,7 @@ var pluginutils = require('@rollup/pluginutils');
|
|
|
6
6
|
var vite = require('vite');
|
|
7
7
|
var _matchAllInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/match-all');
|
|
8
8
|
|
|
9
|
-
function _interopDefault (e) { return e && e.__esModule ? e : {
|
|
10
|
-
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n["default"] = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
10
|
|
|
29
11
|
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
30
12
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
@@ -33,7 +15,7 @@ var _matchAllInstanceProperty__default = /*#__PURE__*/_interopDefault(_matchAllI
|
|
|
33
15
|
async function optimizeEmbeddedPngs(code, id) {
|
|
34
16
|
const pngRegex = /href="data:image\/png;base64,([a-zA-Z0-9+/]+=*)"/gs;
|
|
35
17
|
let modifiedCode = code;
|
|
36
|
-
const matchesIterator = _matchAllInstanceProperty__default
|
|
18
|
+
const matchesIterator = _matchAllInstanceProperty__default.default(code).call(code, pngRegex);
|
|
37
19
|
for (const match of matchesIterator) {
|
|
38
20
|
const originalBase64 = match[1];
|
|
39
21
|
if (originalBase64) {
|
|
@@ -43,7 +25,7 @@ async function optimizeEmbeddedPngs(code, id) {
|
|
|
43
25
|
console.warn(`\n🚨 You have a large png embedded in ${fileName} - consider using an image tag instead 🚨`);
|
|
44
26
|
try {
|
|
45
27
|
const pngBuffer = Buffer.from(originalBase64, 'base64');
|
|
46
|
-
const sharp = (await
|
|
28
|
+
const sharp = (await import('sharp')).default;
|
|
47
29
|
const optimizedBuffer = await sharp(pngBuffer).png({
|
|
48
30
|
quality: 10,
|
|
49
31
|
compressionLevel: 9
|
|
@@ -72,9 +54,9 @@ function vitePluginSvgr() {
|
|
|
72
54
|
name: 'vite-plugin-svgr',
|
|
73
55
|
async transform(_code, id) {
|
|
74
56
|
if (filter(id)) {
|
|
75
|
-
const _await$import = await
|
|
57
|
+
const _await$import = await import('@svgr/core'),
|
|
76
58
|
transform = _await$import.transform;
|
|
77
|
-
const svgCode = await fs__default
|
|
59
|
+
const svgCode = await fs__default.default.promises.readFile(id, 'utf8');
|
|
78
60
|
let transformableSVGCode;
|
|
79
61
|
if (process.env.ENABLE_EXPERIMENTAL_SVG_PNG_OPTIMIZATION === 'true') {
|
|
80
62
|
// This is a temporary fix for the issue with large embedded PNGs
|
|
@@ -123,7 +105,7 @@ function vitePluginSvgr() {
|
|
|
123
105
|
name: 'prefixIds',
|
|
124
106
|
params: {
|
|
125
107
|
delim: '',
|
|
126
|
-
prefix: (_, info) => `svg${crypto__default
|
|
108
|
+
prefix: (_, info) => `svg${crypto__default.default.createHash('shake256', {
|
|
127
109
|
outputLength: 6
|
|
128
110
|
}).update(info.path || '').digest('hex')}`
|
|
129
111
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/mc-scripts",
|
|
3
|
-
"version": "27.5.
|
|
3
|
+
"version": "27.5.3",
|
|
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": {
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"@babel/plugin-proposal-do-expressions": "^7.22.5",
|
|
62
62
|
"@babel/runtime": "^7.22.15",
|
|
63
63
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
64
|
-
"@commercetools-frontend/application-components": "27.5.
|
|
65
|
-
"@commercetools-frontend/application-config": "27.5.
|
|
66
|
-
"@commercetools-frontend/assets": "27.5.
|
|
67
|
-
"@commercetools-frontend/babel-preset-mc-app": "27.5.
|
|
68
|
-
"@commercetools-frontend/constants": "27.5.
|
|
69
|
-
"@commercetools-frontend/mc-dev-authentication": "27.5.
|
|
70
|
-
"@commercetools-frontend/mc-html-template": "27.5.
|
|
64
|
+
"@commercetools-frontend/application-components": "27.5.3",
|
|
65
|
+
"@commercetools-frontend/application-config": "27.5.3",
|
|
66
|
+
"@commercetools-frontend/assets": "27.5.3",
|
|
67
|
+
"@commercetools-frontend/babel-preset-mc-app": "27.5.3",
|
|
68
|
+
"@commercetools-frontend/constants": "27.5.3",
|
|
69
|
+
"@commercetools-frontend/mc-dev-authentication": "27.5.3",
|
|
70
|
+
"@commercetools-frontend/mc-html-template": "27.5.3",
|
|
71
71
|
"@commercetools/http-user-agent": "3.0.0",
|
|
72
72
|
"@emotion/babel-plugin": "^11.13.5",
|
|
73
73
|
"@formatjs/cli-lib": "^6.3.8",
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var createPostcssConfig = require('../../dist/create-postcss-config-e4c767b4.cjs.dev.js');
|
|
3
|
+
var createPostcssConfig = require('../../dist/create-postcss-config-NN2FAhvH.cjs.dev.js');
|
|
6
4
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
7
5
|
require('path');
|
|
8
|
-
require('../../dist/package-
|
|
6
|
+
require('../../dist/package-B1Y3_DDl.cjs.dev.js');
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var createPostcssConfig = require('../../dist/create-postcss-config-3f3bda09.cjs.prod.js');
|
|
3
|
+
var createPostcssConfig = require('../../dist/create-postcss-config-DAShdAyB.cjs.prod.js');
|
|
6
4
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
7
5
|
require('path');
|
|
8
|
-
require('../../dist/package-
|
|
6
|
+
require('../../dist/package-DxhqRLHb.cjs.prod.js');
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createPostcssConfig } from '../../dist/create-postcss-config-
|
|
1
|
+
export { c as createPostcssConfig } from '../../dist/create-postcss-config-CN9_8Usa.esm.js';
|
|
2
2
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
3
3
|
import 'path';
|
|
4
|
-
import '../../dist/package-
|
|
4
|
+
import '../../dist/package-BiK3ergJ.esm.js';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-a2df037a.cjs.dev.js');
|
|
6
|
-
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-12e257fc.cjs.dev.js');
|
|
3
|
+
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-hxSNyq2_.cjs.dev.js');
|
|
4
|
+
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-Edp9dzmw.cjs.dev.js');
|
|
7
5
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
8
6
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
9
7
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -29,20 +27,20 @@ require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
29
27
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
28
|
require('@commercetools-frontend/application-config');
|
|
31
29
|
require('@commercetools-frontend/mc-html-template');
|
|
32
|
-
require('../../dist/create-postcss-config-
|
|
30
|
+
require('../../dist/create-postcss-config-NN2FAhvH.cjs.dev.js');
|
|
33
31
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
34
|
-
require('../../dist/package-
|
|
35
|
-
require('../../dist/optimizations-
|
|
32
|
+
require('../../dist/package-B1Y3_DDl.cjs.dev.js');
|
|
33
|
+
require('../../dist/optimizations-CEaq4axa.cjs.dev.js');
|
|
36
34
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
37
35
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
38
36
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
39
37
|
require('chalk');
|
|
40
|
-
require('../../dist/paths-
|
|
38
|
+
require('../../dist/paths-B0WM5jb9.cjs.dev.js');
|
|
41
39
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
42
40
|
require('fs');
|
|
43
|
-
require('../../dist/does-file-exist-
|
|
41
|
+
require('../../dist/does-file-exist-DrcZIPe6.cjs.dev.js');
|
|
44
42
|
require('node:fs');
|
|
45
|
-
require('../../dist/vendors-to-transpile-
|
|
43
|
+
require('../../dist/vendors-to-transpile-DLHlk7c-.cjs.dev.js');
|
|
46
44
|
require('@babel/runtime-corejs3/core-js-stable/number/is-integer');
|
|
47
45
|
require('css-minimizer-webpack-plugin');
|
|
48
46
|
require('mini-css-extract-plugin');
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-4a2616e9.cjs.prod.js');
|
|
6
|
-
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-443f6fe7.cjs.prod.js');
|
|
3
|
+
var createWebpackConfigForDevelopment = require('../../dist/create-webpack-config-for-development-CxGehl7I.cjs.prod.js');
|
|
4
|
+
var createWebpackConfigForProduction = require('../../dist/create-webpack-config-for-production-CW0DlZBz.cjs.prod.js');
|
|
7
5
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
8
6
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
9
7
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -29,20 +27,20 @@ require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
29
27
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
28
|
require('@commercetools-frontend/application-config');
|
|
31
29
|
require('@commercetools-frontend/mc-html-template');
|
|
32
|
-
require('../../dist/create-postcss-config-
|
|
30
|
+
require('../../dist/create-postcss-config-DAShdAyB.cjs.prod.js');
|
|
33
31
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
34
|
-
require('../../dist/package-
|
|
35
|
-
require('../../dist/optimizations-
|
|
32
|
+
require('../../dist/package-DxhqRLHb.cjs.prod.js');
|
|
33
|
+
require('../../dist/optimizations-CEaq4axa.cjs.prod.js');
|
|
36
34
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
37
35
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
38
36
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
39
37
|
require('chalk');
|
|
40
|
-
require('../../dist/paths-
|
|
38
|
+
require('../../dist/paths-DtvtCG0U.cjs.prod.js');
|
|
41
39
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
42
40
|
require('fs');
|
|
43
|
-
require('../../dist/does-file-exist-
|
|
41
|
+
require('../../dist/does-file-exist-DrcZIPe6.cjs.prod.js');
|
|
44
42
|
require('node:fs');
|
|
45
|
-
require('../../dist/vendors-to-transpile-
|
|
43
|
+
require('../../dist/vendors-to-transpile-DLHlk7c-.cjs.prod.js');
|
|
46
44
|
require('@babel/runtime-corejs3/core-js-stable/number/is-integer');
|
|
47
45
|
require('css-minimizer-webpack-plugin');
|
|
48
46
|
require('mini-css-extract-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-5HpRHV9G.esm.js';
|
|
2
|
+
export { c as createWebpackConfigForProduction } from '../../dist/create-webpack-config-for-production-BY0UNoNz.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,20 +25,20 @@ 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-CN9_8Usa.esm.js';
|
|
29
29
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
30
|
-
import '../../dist/package-
|
|
31
|
-
import '../../dist/optimizations-
|
|
30
|
+
import '../../dist/package-BiK3ergJ.esm.js';
|
|
31
|
+
import '../../dist/optimizations-Cjrg77Gu.esm.js';
|
|
32
32
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
33
33
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
34
34
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
35
35
|
import 'chalk';
|
|
36
|
-
import '../../dist/paths-
|
|
36
|
+
import '../../dist/paths-Cg5Vq6RE.esm.js';
|
|
37
37
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
38
38
|
import 'fs';
|
|
39
|
-
import '../../dist/does-file-exist-
|
|
39
|
+
import '../../dist/does-file-exist-C7l6j7NP.esm.js';
|
|
40
40
|
import 'node:fs';
|
|
41
|
-
import '../../dist/vendors-to-transpile-
|
|
41
|
+
import '../../dist/vendors-to-transpile-uu9TNPDO.esm.js';
|
|
42
42
|
import '@babel/runtime-corejs3/core-js-stable/number/is-integer';
|
|
43
43
|
import 'css-minimizer-webpack-plugin';
|
|
44
44
|
import 'mini-css-extract-plugin';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var cliLib = require('@formatjs/cli-lib');
|
|
6
|
-
var i18nMessageComplilation = require('../../../dist/i18n-message-complilation-
|
|
6
|
+
var i18nMessageComplilation = require('../../../dist/i18n-message-complilation-CdVhuyWk.cjs.dev.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
8
8
|
require('chalk');
|
|
9
9
|
|
|
@@ -27,4 +27,4 @@ const i18nMessageCompilationLoader = function (source) {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
exports
|
|
30
|
+
exports.default = i18nMessageCompilationLoader;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var cliLib = require('@formatjs/cli-lib');
|
|
6
|
-
var i18nMessageComplilation = require('../../../dist/i18n-message-complilation-
|
|
6
|
+
var i18nMessageComplilation = require('../../../dist/i18n-message-complilation-CdVhuyWk.cjs.prod.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
8
8
|
require('chalk');
|
|
9
9
|
|
|
@@ -27,4 +27,4 @@ const i18nMessageCompilationLoader = function (source) {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
exports
|
|
30
|
+
exports.default = i18nMessageCompilationLoader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compile } from '@formatjs/cli-lib';
|
|
2
|
-
import { g as getI18nMessageFormat, h as handleMessageCompilationError } from '../../../dist/i18n-message-complilation-
|
|
2
|
+
import { g as getI18nMessageFormat, h as handleMessageCompilationError } from '../../../dist/i18n-message-complilation-BRZ7ffQI.esm.js';
|
|
3
3
|
import '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
4
4
|
import 'chalk';
|
|
5
5
|
|