@commercetools-frontend/mc-scripts 27.4.1 → 27.5.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.
Files changed (65) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +15 -10
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +15 -10
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +15 -10
  4. package/dist/{build-8941e757.cjs.prod.js → build-2dde4016.cjs.prod.js} +4 -5
  5. package/dist/{build-43e4ad06.esm.js → build-51b09598.esm.js} +4 -5
  6. package/dist/{build-34cff19d.cjs.dev.js → build-7a3a4b48.cjs.dev.js} +4 -5
  7. package/dist/{build-vite-8cae71a0.esm.js → build-vite-1526e4f8.esm.js} +109 -20
  8. package/dist/{build-vite-837e7c94.cjs.dev.js → build-vite-2fb9320e.cjs.dev.js} +118 -20
  9. package/dist/{build-vite-b007241b.cjs.prod.js → build-vite-71889a4a.cjs.prod.js} +118 -20
  10. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  11. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  12. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  13. package/dist/{config-sync-c3777ff2.esm.js → config-sync-38bb2049.esm.js} +3 -3
  14. package/dist/{config-sync-670fe293.cjs.prod.js → config-sync-74ddb92a.cjs.prod.js} +3 -3
  15. package/dist/{config-sync-ci-c239e83b.cjs.prod.js → config-sync-ci-0d638a98.cjs.prod.js} +3 -3
  16. package/dist/{config-sync-ci-2a86810d.cjs.dev.js → config-sync-ci-f083fe23.cjs.dev.js} +3 -3
  17. package/dist/{config-sync-ci-d2a1a560.esm.js → config-sync-ci-f2adf187.esm.js} +3 -3
  18. package/dist/{config-sync-91880023.cjs.dev.js → config-sync-eac5312f.cjs.dev.js} +3 -3
  19. package/dist/{config-sync-helpers-2bbb7ef2.cjs.dev.js → config-sync-helpers-165afb6b.cjs.dev.js} +1 -1
  20. package/dist/{config-sync-helpers-afd3d75e.cjs.prod.js → config-sync-helpers-1dad1481.cjs.prod.js} +1 -1
  21. package/dist/{config-sync-helpers-9c2cbd1b.esm.js → config-sync-helpers-2bf06642.esm.js} +1 -1
  22. package/dist/{create-postcss-config-880af1a5.cjs.dev.js → create-postcss-config-1b021fb2.cjs.dev.js} +1 -1
  23. package/dist/{create-postcss-config-f732c04c.cjs.prod.js → create-postcss-config-434fe673.cjs.prod.js} +1 -1
  24. package/dist/{create-postcss-config-257247d7.esm.js → create-postcss-config-505c5a4e.esm.js} +1 -1
  25. package/dist/{create-webpack-config-for-development-22db7e21.cjs.prod.js → create-webpack-config-for-development-1db101e2.cjs.prod.js} +4 -5
  26. package/dist/{create-webpack-config-for-development-736b37a1.cjs.dev.js → create-webpack-config-for-development-65abeb3f.cjs.dev.js} +4 -5
  27. package/dist/{create-webpack-config-for-development-fa4927c0.esm.js → create-webpack-config-for-development-fd981a20.esm.js} +2 -3
  28. package/dist/{create-webpack-config-for-production-7888ee9e.cjs.dev.js → create-webpack-config-for-production-010a6fb4.cjs.dev.js} +4 -5
  29. package/dist/{create-webpack-config-for-production-da525cc3.cjs.prod.js → create-webpack-config-for-production-a239ba22.cjs.prod.js} +4 -5
  30. package/dist/{create-webpack-config-for-production-cfb9e90a.esm.js → create-webpack-config-for-production-bb66207f.esm.js} +2 -3
  31. package/dist/declarations/src/types.d.ts +3 -0
  32. package/dist/{deployment-previews-set-4ee2a4e5.esm.js → deployment-previews-set-6ceff6a3.esm.js} +2 -2
  33. package/dist/{deployment-previews-set-0a6480d0.cjs.prod.js → deployment-previews-set-beeaeb6d.cjs.prod.js} +2 -2
  34. package/dist/{deployment-previews-set-8c400e53.cjs.dev.js → deployment-previews-set-c4f8a461.cjs.dev.js} +2 -2
  35. package/dist/{graphql-requests-eb88492d.cjs.prod.js → graphql-requests-4c97fe92.cjs.prod.js} +1 -1
  36. package/dist/{graphql-requests-569dae6e.esm.js → graphql-requests-53a1f5dd.esm.js} +1 -1
  37. package/dist/{graphql-requests-25e057ed.cjs.dev.js → graphql-requests-86c87041.cjs.dev.js} +1 -1
  38. package/dist/{login-c18cb968.esm.js → login-1e4ddcda.esm.js} +1 -1
  39. package/dist/{login-1fd80a8d.cjs.dev.js → login-382b51ea.cjs.dev.js} +1 -1
  40. package/dist/{login-a6d93fd3.cjs.prod.js → login-c151a059.cjs.prod.js} +1 -1
  41. package/dist/{optimizations-bf991634.esm.js → optimizations-54382f7b.esm.js} +24 -9
  42. package/dist/{optimizations-fb93514f.cjs.prod.js → optimizations-56be74d6.cjs.dev.js} +24 -9
  43. package/dist/{optimizations-7789145e.cjs.dev.js → optimizations-da5a0cfa.cjs.prod.js} +24 -9
  44. package/dist/{package-8926f3f0.esm.js → package-02f0532d.esm.js} +13 -14
  45. package/dist/{package-2bdb4e7b.cjs.prod.js → package-c8f39856.cjs.dev.js} +13 -14
  46. package/dist/{package-d8f5b403.cjs.dev.js → package-dfc9c56b.cjs.prod.js} +13 -14
  47. package/dist/serve-00294d34.esm.js +77 -0
  48. package/dist/serve-81db9f2e.cjs.dev.js +88 -0
  49. package/dist/serve-d62433a1.cjs.prod.js +88 -0
  50. package/dist/{start-e1dffbe2.cjs.dev.js → start-32bc9eca.cjs.dev.js} +4 -5
  51. package/dist/{start-a35e973b.cjs.prod.js → start-5eb60c74.cjs.prod.js} +4 -5
  52. package/dist/{start-8d77546d.esm.js → start-6fc3b235.esm.js} +4 -5
  53. package/package.json +13 -14
  54. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  55. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  56. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  57. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +5 -6
  58. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +5 -6
  59. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +5 -6
  60. package/dist/has-jsx-runtime-aa5d21ee.cjs.dev.js +0 -15
  61. package/dist/has-jsx-runtime-c3202df5.cjs.prod.js +0 -15
  62. package/dist/has-jsx-runtime-e3ecb09b.esm.js +0 -13
  63. package/dist/serve-38456e1b.cjs.dev.js +0 -67
  64. package/dist/serve-be1f9439.esm.js +0 -57
  65. package/dist/serve-cc4a766d.cjs.prod.js +0 -67
@@ -1,13 +0,0 @@
1
- function hasJsxRuntime() {
2
- if (process.env.ENABLE_NEW_JSX_TRANSFORM !== 'true') {
3
- return false;
4
- }
5
- try {
6
- require.resolve('react/jsx-runtime');
7
- return true;
8
- } catch (e) {
9
- return false;
10
- }
11
- }
12
-
13
- export { hasJsxRuntime as h };
@@ -1,67 +0,0 @@
1
- 'use strict';
2
-
3
- var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
4
- var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
5
- var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
6
- var http = require('http');
7
- var serveHandler = require('serve-handler');
8
- var applicationConfig = require('@commercetools-frontend/application-config');
9
- var paths = require('./paths-b76fc753.cjs.dev.js');
10
- require('@babel/runtime-corejs3/core-js-stable/instance/find');
11
- require('fs');
12
- require('path');
13
- require('./does-file-exist-eb86baca.cjs.dev.js');
14
- require('node:fs');
15
-
16
- function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
17
-
18
- var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
19
- var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
20
- var _URL__default = /*#__PURE__*/_interopDefault(_URL);
21
- var http__default = /*#__PURE__*/_interopDefault(http);
22
- var serveHandler__default = /*#__PURE__*/_interopDefault(serveHandler);
23
-
24
- const port = 3001;
25
- async function run() {
26
- const applicationConfig$1 = await applicationConfig.processConfig();
27
- const server = http__default["default"].createServer((request, response) => {
28
- var _context;
29
- // When developing against local APIs, handle the login|logout routes separately.
30
- if (_startsWithInstanceProperty__default["default"](_context = applicationConfig$1.env.mcApiUrl).call(_context, 'http://localhost')) {
31
- var _context2, _context3, _context4, _context5;
32
- if (((_context2 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2), _context2))?.('/login/authorize')) {
33
- const redirectTo = new _URL__default["default"](request.url, applicationConfig$1.env.mcApiUrl);
34
- response.writeHead(301, {
35
- Location: redirectTo.toString()
36
- }).end();
37
- return;
38
- }
39
- if (((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/logout')) {
40
- response.end('Please clear your session storage.');
41
- return;
42
- }
43
- }
44
-
45
- // You pass two more arguments for config and middleware
46
- // More details here: https://github.com/vercel/serve-handler#options
47
- return serveHandler__default["default"](request, response, {
48
- public: paths.paths.appBuild,
49
- rewrites: [{
50
- source: '/favicon*',
51
- destination: '/favicon.png'
52
- }, {
53
- // Match all routes except for the login, logout, and favicon routes.
54
- // NOTE: this complex glob pattern would not be necessary if the rewrite
55
- // implementation would stop at the first match.
56
- // See https://github.com/vercel/serve-handler/issues/71
57
- source: '{/!(favicon|login|logout)*/**,/!(favicon|login|logout)*}',
58
- destination: '/index.html'
59
- }]
60
- });
61
- });
62
- server.listen(port, () => {
63
- console.log(`Running at http://localhost:${port}`);
64
- });
65
- }
66
-
67
- exports["default"] = run;
@@ -1,57 +0,0 @@
1
- import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
2
- import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
3
- import _URL from '@babel/runtime-corejs3/core-js-stable/url';
4
- import http from 'http';
5
- import serveHandler from 'serve-handler';
6
- import { processConfig } from '@commercetools-frontend/application-config';
7
- import { p as paths } from './paths-39f22b8b.esm.js';
8
- import '@babel/runtime-corejs3/core-js-stable/instance/find';
9
- import 'fs';
10
- import 'path';
11
- import './does-file-exist-32618334.esm.js';
12
- import 'node:fs';
13
-
14
- const port = 3001;
15
- async function run() {
16
- const applicationConfig = await processConfig();
17
- const server = http.createServer((request, response) => {
18
- var _context;
19
- // When developing against local APIs, handle the login|logout routes separately.
20
- if (_startsWithInstanceProperty(_context = applicationConfig.env.mcApiUrl).call(_context, 'http://localhost')) {
21
- var _context2, _context3, _context4, _context5;
22
- if (((_context2 = request.url) == null ? void 0 : _bindInstanceProperty(_context3 = Function.call).call(_context3, _startsWithInstanceProperty(_context2), _context2))?.('/login/authorize')) {
23
- const redirectTo = new _URL(request.url, applicationConfig.env.mcApiUrl);
24
- response.writeHead(301, {
25
- Location: redirectTo.toString()
26
- }).end();
27
- return;
28
- }
29
- if (((_context4 = request.url) == null ? void 0 : _bindInstanceProperty(_context5 = Function.call).call(_context5, _startsWithInstanceProperty(_context4), _context4))?.('/logout')) {
30
- response.end('Please clear your session storage.');
31
- return;
32
- }
33
- }
34
-
35
- // You pass two more arguments for config and middleware
36
- // More details here: https://github.com/vercel/serve-handler#options
37
- return serveHandler(request, response, {
38
- public: paths.appBuild,
39
- rewrites: [{
40
- source: '/favicon*',
41
- destination: '/favicon.png'
42
- }, {
43
- // Match all routes except for the login, logout, and favicon routes.
44
- // NOTE: this complex glob pattern would not be necessary if the rewrite
45
- // implementation would stop at the first match.
46
- // See https://github.com/vercel/serve-handler/issues/71
47
- source: '{/!(favicon|login|logout)*/**,/!(favicon|login|logout)*}',
48
- destination: '/index.html'
49
- }]
50
- });
51
- });
52
- server.listen(port, () => {
53
- console.log(`Running at http://localhost:${port}`);
54
- });
55
- }
56
-
57
- export { run as default };
@@ -1,67 +0,0 @@
1
- 'use strict';
2
-
3
- var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
4
- var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
5
- var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
6
- var http = require('http');
7
- var serveHandler = require('serve-handler');
8
- var applicationConfig = require('@commercetools-frontend/application-config');
9
- var paths = require('./paths-7768b440.cjs.prod.js');
10
- require('@babel/runtime-corejs3/core-js-stable/instance/find');
11
- require('fs');
12
- require('path');
13
- require('./does-file-exist-be53305d.cjs.prod.js');
14
- require('node:fs');
15
-
16
- function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
17
-
18
- var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
19
- var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
20
- var _URL__default = /*#__PURE__*/_interopDefault(_URL);
21
- var http__default = /*#__PURE__*/_interopDefault(http);
22
- var serveHandler__default = /*#__PURE__*/_interopDefault(serveHandler);
23
-
24
- const port = 3001;
25
- async function run() {
26
- const applicationConfig$1 = await applicationConfig.processConfig();
27
- const server = http__default["default"].createServer((request, response) => {
28
- var _context;
29
- // When developing against local APIs, handle the login|logout routes separately.
30
- if (_startsWithInstanceProperty__default["default"](_context = applicationConfig$1.env.mcApiUrl).call(_context, 'http://localhost')) {
31
- var _context2, _context3, _context4, _context5;
32
- if (((_context2 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2), _context2))?.('/login/authorize')) {
33
- const redirectTo = new _URL__default["default"](request.url, applicationConfig$1.env.mcApiUrl);
34
- response.writeHead(301, {
35
- Location: redirectTo.toString()
36
- }).end();
37
- return;
38
- }
39
- if (((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/logout')) {
40
- response.end('Please clear your session storage.');
41
- return;
42
- }
43
- }
44
-
45
- // You pass two more arguments for config and middleware
46
- // More details here: https://github.com/vercel/serve-handler#options
47
- return serveHandler__default["default"](request, response, {
48
- public: paths.paths.appBuild,
49
- rewrites: [{
50
- source: '/favicon*',
51
- destination: '/favicon.png'
52
- }, {
53
- // Match all routes except for the login, logout, and favicon routes.
54
- // NOTE: this complex glob pattern would not be necessary if the rewrite
55
- // implementation would stop at the first match.
56
- // See https://github.com/vercel/serve-handler/issues/71
57
- source: '{/!(favicon|login|logout)*/**,/!(favicon|login|logout)*}',
58
- destination: '/index.html'
59
- }]
60
- });
61
- });
62
- server.listen(port, () => {
63
- console.log(`Running at http://localhost:${port}`);
64
- });
65
- }
66
-
67
- exports["default"] = run;