@commercetools-frontend/mc-scripts 27.4.2 → 27.5.1
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 +39 -10
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +39 -10
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +21 -10
- package/dist/{build-b59ae957.cjs.dev.js → build-2cbde331.cjs.dev.js} +3 -3
- package/dist/{build-2b934f0c.esm.js → build-4ab9306b.esm.js} +3 -3
- package/dist/{build-cebaad1c.cjs.prod.js → build-7c7442bd.cjs.prod.js} +3 -3
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
- package/dist/{config-sync-7bd473d2.cjs.dev.js → config-sync-7ae74804.cjs.dev.js} +3 -3
- package/dist/{config-sync-ci-3fabd319.cjs.dev.js → config-sync-ci-732e0c5d.cjs.dev.js} +3 -3
- package/dist/{config-sync-ci-ceed6879.esm.js → config-sync-ci-9c50ed6f.esm.js} +3 -3
- package/dist/{config-sync-ci-eaa2c74c.cjs.prod.js → config-sync-ci-d3104a62.cjs.prod.js} +3 -3
- package/dist/{config-sync-6707192b.cjs.prod.js → config-sync-d3d5d721.cjs.prod.js} +3 -3
- package/dist/{config-sync-3be9dd65.esm.js → config-sync-d5c4aa9b.esm.js} +3 -3
- package/dist/{config-sync-helpers-9e7101ca.cjs.dev.js → config-sync-helpers-178da465.cjs.dev.js} +1 -1
- package/dist/{config-sync-helpers-4c1e6ef7.esm.js → config-sync-helpers-bea5f027.esm.js} +1 -1
- package/dist/{config-sync-helpers-2f9ce5e7.cjs.prod.js → config-sync-helpers-ea628bce.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-82c6d99e.cjs.prod.js → create-postcss-config-3f3bda09.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-7cebb3e2.cjs.dev.js → create-postcss-config-e4c767b4.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-040fa794.esm.js → create-postcss-config-f6a5f68b.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-9d0b5ccd.cjs.prod.js → create-webpack-config-for-development-4a2616e9.cjs.prod.js} +1 -1
- package/dist/{create-webpack-config-for-development-835be72f.cjs.dev.js → create-webpack-config-for-development-a2df037a.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-development-5fba3c63.esm.js → create-webpack-config-for-development-c6e48557.esm.js} +1 -1
- package/dist/{create-webpack-config-for-production-1c770191.esm.js → create-webpack-config-for-production-04a7a9f8.esm.js} +1 -1
- package/dist/{create-webpack-config-for-production-ffeb4a22.cjs.dev.js → create-webpack-config-for-production-12e257fc.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-production-8c3f894b.cjs.prod.js → create-webpack-config-for-production-443f6fe7.cjs.prod.js} +1 -1
- package/dist/declarations/src/types.d.ts +3 -0
- package/dist/{deployment-previews-set-6dd7e367.cjs.prod.js → deployment-previews-set-2b334c11.cjs.prod.js} +2 -2
- package/dist/{deployment-previews-set-68c37d9d.cjs.dev.js → deployment-previews-set-491442d7.cjs.dev.js} +2 -2
- package/dist/{deployment-previews-set-add2d9c6.esm.js → deployment-previews-set-4b020cb4.esm.js} +2 -2
- package/dist/{graphql-requests-5e31d639.cjs.prod.js → graphql-requests-6ead2029.cjs.prod.js} +1 -1
- package/dist/{graphql-requests-c07e7b8f.esm.js → graphql-requests-87338c52.esm.js} +1 -1
- package/dist/{graphql-requests-24e04c13.cjs.dev.js → graphql-requests-bd7a3fe9.cjs.dev.js} +1 -1
- package/dist/{login-c05816f1.cjs.prod.js → login-26cfe1af.cjs.prod.js} +1 -1
- package/dist/{login-a1ad5f07.cjs.dev.js → login-2d10deff.cjs.dev.js} +1 -1
- package/dist/{login-af2522fd.esm.js → login-ab249036.esm.js} +1 -1
- package/dist/{package-d75d6b9f.cjs.prod.js → package-62998a4b.cjs.prod.js} +12 -12
- package/dist/{package-14789720.esm.js → package-a686a0ee.esm.js} +12 -12
- package/dist/{package-6dcc2c4f.cjs.dev.js → package-fe1840f3.cjs.dev.js} +12 -12
- package/dist/serve-22475fec.esm.js +80 -0
- package/dist/serve-3837602d.cjs.prod.js +91 -0
- package/dist/serve-b1c12985.cjs.dev.js +91 -0
- package/dist/{start-f52d8e68.cjs.prod.js → start-19facf6d.cjs.prod.js} +3 -3
- package/dist/{start-c9b32028.esm.js → start-3c1e5902.esm.js} +3 -3
- package/dist/{start-f93cb36f.cjs.dev.js → start-9b1252f9.cjs.dev.js} +3 -3
- package/package.json +12 -12
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
- package/dist/serve-4062385a.esm.js +0 -70
- package/dist/serve-5a455e72.cjs.prod.js +0 -81
- package/dist/serve-b9ac0b0c.cjs.dev.js +0 -81
|
@@ -25,7 +25,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
25
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
26
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
27
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
28
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-e4c767b4.cjs.dev.js');
|
|
29
29
|
var optimizations = require('./optimizations-56be74d6.cjs.dev.js');
|
|
30
30
|
var paths = require('./paths-b76fc753.cjs.dev.js');
|
|
31
31
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
@@ -23,7 +23,7 @@ import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
|
23
23
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
24
24
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
25
25
|
import { replaceHtmlPlaceholders } from '@commercetools-frontend/mc-html-template';
|
|
26
|
-
import { c as createPostcssConfig } from './create-postcss-config-
|
|
26
|
+
import { c as createPostcssConfig } from './create-postcss-config-f6a5f68b.esm.js';
|
|
27
27
|
import { g as getWepbackCacheGroups, h as hasJsxRuntime } from './optimizations-54382f7b.esm.js';
|
|
28
28
|
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
29
29
|
import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
|
|
@@ -27,7 +27,7 @@ import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
27
27
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
28
28
|
import fs from 'fs';
|
|
29
29
|
import path from 'path';
|
|
30
|
-
import { c as createPostcssConfig } from './create-postcss-config-
|
|
30
|
+
import { c as createPostcssConfig } from './create-postcss-config-f6a5f68b.esm.js';
|
|
31
31
|
import { g as getWepbackCacheGroups, h as hasJsxRuntime } from './optimizations-54382f7b.esm.js';
|
|
32
32
|
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
33
33
|
import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
|
|
@@ -29,7 +29,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
29
29
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
30
|
var fs = require('fs');
|
|
31
31
|
var path = require('path');
|
|
32
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
32
|
+
var createPostcssConfig = require('./create-postcss-config-e4c767b4.cjs.dev.js');
|
|
33
33
|
var optimizations = require('./optimizations-56be74d6.cjs.dev.js');
|
|
34
34
|
var paths = require('./paths-b76fc753.cjs.dev.js');
|
|
35
35
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
@@ -29,7 +29,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
29
29
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
30
|
var fs = require('fs');
|
|
31
31
|
var path = require('path');
|
|
32
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
32
|
+
var createPostcssConfig = require('./create-postcss-config-3f3bda09.cjs.prod.js');
|
|
33
33
|
var optimizations = require('./optimizations-da5a0cfa.cjs.prod.js');
|
|
34
34
|
var paths = require('./paths-7768b440.cjs.prod.js');
|
|
35
35
|
var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
@@ -14,6 +14,9 @@ export type TCliCommandConfigSyncOptions = {
|
|
|
14
14
|
export type TCliCommandConfigSyncCIOptions = {
|
|
15
15
|
dryRun: boolean;
|
|
16
16
|
};
|
|
17
|
+
export type TCliCommandServeOptions = {
|
|
18
|
+
handleAuthRoutes: string;
|
|
19
|
+
};
|
|
17
20
|
export type TCliCommandLoginOptions = {
|
|
18
21
|
mcApiUrl?: string;
|
|
19
22
|
projectKey?: string;
|
|
@@ -8,7 +8,7 @@ var chalk = require('chalk');
|
|
|
8
8
|
var prompts = require('prompts');
|
|
9
9
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
10
10
|
var credentialsStorage$1 = require('./credentials-storage-ea1c16dc.cjs.prod.js');
|
|
11
|
-
var graphqlRequests = require('./graphql-requests-
|
|
11
|
+
var graphqlRequests = require('./graphql-requests-6ead2029.cjs.prod.js');
|
|
12
12
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
13
13
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
14
14
|
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
@@ -30,7 +30,7 @@ require('graphql');
|
|
|
30
30
|
require('graphql-request');
|
|
31
31
|
require('@commercetools-frontend/constants');
|
|
32
32
|
require('@commercetools/http-user-agent');
|
|
33
|
-
require('./package-
|
|
33
|
+
require('./package-62998a4b.cjs.prod.js');
|
|
34
34
|
|
|
35
35
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
36
36
|
|
|
@@ -8,7 +8,7 @@ var chalk = require('chalk');
|
|
|
8
8
|
var prompts = require('prompts');
|
|
9
9
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
10
10
|
var credentialsStorage$1 = require('./credentials-storage-fd195144.cjs.dev.js');
|
|
11
|
-
var graphqlRequests = require('./graphql-requests-
|
|
11
|
+
var graphqlRequests = require('./graphql-requests-bd7a3fe9.cjs.dev.js');
|
|
12
12
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
13
13
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
14
14
|
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
@@ -30,7 +30,7 @@ require('graphql');
|
|
|
30
30
|
require('graphql-request');
|
|
31
31
|
require('@commercetools-frontend/constants');
|
|
32
32
|
require('@commercetools/http-user-agent');
|
|
33
|
-
require('./package-
|
|
33
|
+
require('./package-fe1840f3.cjs.dev.js');
|
|
34
34
|
|
|
35
35
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
36
36
|
|
package/dist/{deployment-previews-set-add2d9c6.esm.js → deployment-previews-set-4b020cb4.esm.js}
RENAMED
|
@@ -6,7 +6,7 @@ import chalk from 'chalk';
|
|
|
6
6
|
import prompts from 'prompts';
|
|
7
7
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
8
8
|
import { C as CredentialsStorage } from './credentials-storage-67deadc3.esm.js';
|
|
9
|
-
import { d as fetchCustomApplication, g as updateCustomApplicationDeploymentPreview, h as createCustomApplicationDeploymentPreview } from './graphql-requests-
|
|
9
|
+
import { d as fetchCustomApplication, g as updateCustomApplicationDeploymentPreview, h as createCustomApplicationDeploymentPreview } from './graphql-requests-87338c52.esm.js';
|
|
10
10
|
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
11
11
|
import '@babel/runtime-corejs3/helpers/createClass';
|
|
12
12
|
import '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
@@ -28,7 +28,7 @@ import 'graphql';
|
|
|
28
28
|
import 'graphql-request';
|
|
29
29
|
import '@commercetools-frontend/constants';
|
|
30
30
|
import '@commercetools/http-user-agent';
|
|
31
|
-
import './package-
|
|
31
|
+
import './package-a686a0ee.esm.js';
|
|
32
32
|
|
|
33
33
|
const credentialsStorage = new CredentialsStorage();
|
|
34
34
|
const validateUrl = function () {
|
package/dist/{graphql-requests-5e31d639.cjs.prod.js → graphql-requests-6ead2029.cjs.prod.js}
RENAMED
|
@@ -16,7 +16,7 @@ var graphqlRequest = require('graphql-request');
|
|
|
16
16
|
var constants = require('@commercetools-frontend/constants');
|
|
17
17
|
var credentialsStorage$1 = require('./credentials-storage-ea1c16dc.cjs.prod.js');
|
|
18
18
|
var createHttpUserAgent = require('@commercetools/http-user-agent');
|
|
19
|
-
var _package = require('./package-
|
|
19
|
+
var _package = require('./package-62998a4b.cjs.prod.js');
|
|
20
20
|
|
|
21
21
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
22
22
|
|
|
@@ -14,7 +14,7 @@ import { GraphQLClient, ClientError } from 'graphql-request';
|
|
|
14
14
|
import { GRAPHQL_TARGETS, SUPPORTED_HEADERS } from '@commercetools-frontend/constants';
|
|
15
15
|
import { C as CredentialsStorage } from './credentials-storage-67deadc3.esm.js';
|
|
16
16
|
import createHttpUserAgent from '@commercetools/http-user-agent';
|
|
17
|
-
import { p as pkgJson } from './package-
|
|
17
|
+
import { p as pkgJson } from './package-a686a0ee.esm.js';
|
|
18
18
|
|
|
19
19
|
const userAgent = createHttpUserAgent({
|
|
20
20
|
name: 'graphql-request',
|
|
@@ -16,7 +16,7 @@ var graphqlRequest = require('graphql-request');
|
|
|
16
16
|
var constants = require('@commercetools-frontend/constants');
|
|
17
17
|
var credentialsStorage$1 = require('./credentials-storage-fd195144.cjs.dev.js');
|
|
18
18
|
var createHttpUserAgent = require('@commercetools/http-user-agent');
|
|
19
|
-
var _package = require('./package-
|
|
19
|
+
var _package = require('./package-fe1840f3.cjs.dev.js');
|
|
20
20
|
|
|
21
21
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
22
22
|
|
|
@@ -15,7 +15,7 @@ var crypto = require('node:crypto');
|
|
|
15
15
|
var process = require('node:process');
|
|
16
16
|
var chalk = require('chalk');
|
|
17
17
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
18
|
-
var _package = require('./package-
|
|
18
|
+
var _package = require('./package-62998a4b.cjs.prod.js');
|
|
19
19
|
var http = require('node:http');
|
|
20
20
|
var jwtDecode = require('jwt-decode');
|
|
21
21
|
var credentialsStorage$1 = require('./credentials-storage-ea1c16dc.cjs.prod.js');
|
|
@@ -15,7 +15,7 @@ var crypto = require('node:crypto');
|
|
|
15
15
|
var process = require('node:process');
|
|
16
16
|
var chalk = require('chalk');
|
|
17
17
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
18
|
-
var _package = require('./package-
|
|
18
|
+
var _package = require('./package-fe1840f3.cjs.dev.js');
|
|
19
19
|
var http = require('node:http');
|
|
20
20
|
var jwtDecode = require('jwt-decode');
|
|
21
21
|
var credentialsStorage$1 = require('./credentials-storage-fd195144.cjs.dev.js');
|
|
@@ -13,7 +13,7 @@ import crypto from 'node:crypto';
|
|
|
13
13
|
import process, { exit } from 'node:process';
|
|
14
14
|
import chalk from 'chalk';
|
|
15
15
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
16
|
-
import { p as pkgJson } from './package-
|
|
16
|
+
import { p as pkgJson } from './package-a686a0ee.esm.js';
|
|
17
17
|
import http from 'node:http';
|
|
18
18
|
import jwtDecode from 'jwt-decode';
|
|
19
19
|
import { C as CredentialsStorage } from './credentials-storage-67deadc3.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var pkgJson = {
|
|
4
4
|
name: "@commercetools-frontend/mc-scripts",
|
|
5
|
-
version: "27.
|
|
5
|
+
version: "27.5.1",
|
|
6
6
|
description: "Configuration and scripts for developing a MC application",
|
|
7
7
|
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
8
8
|
repository: {
|
|
@@ -63,13 +63,13 @@ var pkgJson = {
|
|
|
63
63
|
"@babel/plugin-proposal-do-expressions": "^7.22.5",
|
|
64
64
|
"@babel/runtime": "^7.22.15",
|
|
65
65
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
66
|
-
"@commercetools-frontend/application-components": "27.
|
|
67
|
-
"@commercetools-frontend/application-config": "27.
|
|
68
|
-
"@commercetools-frontend/assets": "27.
|
|
69
|
-
"@commercetools-frontend/babel-preset-mc-app": "27.
|
|
70
|
-
"@commercetools-frontend/constants": "27.
|
|
71
|
-
"@commercetools-frontend/mc-dev-authentication": "27.
|
|
72
|
-
"@commercetools-frontend/mc-html-template": "27.
|
|
66
|
+
"@commercetools-frontend/application-components": "27.5.1",
|
|
67
|
+
"@commercetools-frontend/application-config": "27.5.1",
|
|
68
|
+
"@commercetools-frontend/assets": "27.5.1",
|
|
69
|
+
"@commercetools-frontend/babel-preset-mc-app": "27.5.1",
|
|
70
|
+
"@commercetools-frontend/constants": "27.5.1",
|
|
71
|
+
"@commercetools-frontend/mc-dev-authentication": "27.5.1",
|
|
72
|
+
"@commercetools-frontend/mc-html-template": "27.5.1",
|
|
73
73
|
"@commercetools/http-user-agent": "3.0.0",
|
|
74
74
|
"@emotion/babel-plugin": "^11.13.5",
|
|
75
75
|
"@formatjs/cli-lib": "^6.3.8",
|
|
@@ -93,7 +93,7 @@ var pkgJson = {
|
|
|
93
93
|
commander: "^13.1.0",
|
|
94
94
|
"core-js": "^3.32.2",
|
|
95
95
|
"css-loader": "6.11.0",
|
|
96
|
-
"css-minimizer-webpack-plugin": "
|
|
96
|
+
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
97
97
|
dotenv: "16.6.1",
|
|
98
98
|
"dotenv-expand": "8.0.3",
|
|
99
99
|
"fs-extra": "10.1.0",
|
|
@@ -110,7 +110,7 @@ var pkgJson = {
|
|
|
110
110
|
"moment-locales-webpack-plugin": "1.2.0",
|
|
111
111
|
"node-fetch": "2.7.0",
|
|
112
112
|
open: "^10.1.0",
|
|
113
|
-
postcss: "8.5.
|
|
113
|
+
postcss: "^8.5.12",
|
|
114
114
|
"postcss-custom-media": "8.0.2",
|
|
115
115
|
"postcss-custom-properties": "12.1.4",
|
|
116
116
|
"postcss-import": "14.1.0",
|
|
@@ -127,7 +127,7 @@ var pkgJson = {
|
|
|
127
127
|
sirv: "^3.0.2",
|
|
128
128
|
"style-loader": "3.3.4",
|
|
129
129
|
"svg-url-loader": "7.1.1",
|
|
130
|
-
"terser-webpack-plugin": "5.
|
|
130
|
+
"terser-webpack-plugin": "^5.5.0",
|
|
131
131
|
"thread-loader": "3.0.4",
|
|
132
132
|
url: "^0.11.0",
|
|
133
133
|
vite: "~6.4.2",
|
|
@@ -152,7 +152,7 @@ var pkgJson = {
|
|
|
152
152
|
rimraf: "6.0.1"
|
|
153
153
|
},
|
|
154
154
|
engines: {
|
|
155
|
-
node: "
|
|
155
|
+
node: "20.x || >=22.0.0"
|
|
156
156
|
},
|
|
157
157
|
peerDependencies: {
|
|
158
158
|
puppeteer: ">=20.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var pkgJson = {
|
|
2
2
|
name: "@commercetools-frontend/mc-scripts",
|
|
3
|
-
version: "27.
|
|
3
|
+
version: "27.5.1",
|
|
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 @@ var pkgJson = {
|
|
|
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.
|
|
65
|
-
"@commercetools-frontend/application-config": "27.
|
|
66
|
-
"@commercetools-frontend/assets": "27.
|
|
67
|
-
"@commercetools-frontend/babel-preset-mc-app": "27.
|
|
68
|
-
"@commercetools-frontend/constants": "27.
|
|
69
|
-
"@commercetools-frontend/mc-dev-authentication": "27.
|
|
70
|
-
"@commercetools-frontend/mc-html-template": "27.
|
|
64
|
+
"@commercetools-frontend/application-components": "27.5.1",
|
|
65
|
+
"@commercetools-frontend/application-config": "27.5.1",
|
|
66
|
+
"@commercetools-frontend/assets": "27.5.1",
|
|
67
|
+
"@commercetools-frontend/babel-preset-mc-app": "27.5.1",
|
|
68
|
+
"@commercetools-frontend/constants": "27.5.1",
|
|
69
|
+
"@commercetools-frontend/mc-dev-authentication": "27.5.1",
|
|
70
|
+
"@commercetools-frontend/mc-html-template": "27.5.1",
|
|
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",
|
|
@@ -91,7 +91,7 @@ var pkgJson = {
|
|
|
91
91
|
commander: "^13.1.0",
|
|
92
92
|
"core-js": "^3.32.2",
|
|
93
93
|
"css-loader": "6.11.0",
|
|
94
|
-
"css-minimizer-webpack-plugin": "
|
|
94
|
+
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
95
95
|
dotenv: "16.6.1",
|
|
96
96
|
"dotenv-expand": "8.0.3",
|
|
97
97
|
"fs-extra": "10.1.0",
|
|
@@ -108,7 +108,7 @@ var pkgJson = {
|
|
|
108
108
|
"moment-locales-webpack-plugin": "1.2.0",
|
|
109
109
|
"node-fetch": "2.7.0",
|
|
110
110
|
open: "^10.1.0",
|
|
111
|
-
postcss: "8.5.
|
|
111
|
+
postcss: "^8.5.12",
|
|
112
112
|
"postcss-custom-media": "8.0.2",
|
|
113
113
|
"postcss-custom-properties": "12.1.4",
|
|
114
114
|
"postcss-import": "14.1.0",
|
|
@@ -125,7 +125,7 @@ var pkgJson = {
|
|
|
125
125
|
sirv: "^3.0.2",
|
|
126
126
|
"style-loader": "3.3.4",
|
|
127
127
|
"svg-url-loader": "7.1.1",
|
|
128
|
-
"terser-webpack-plugin": "5.
|
|
128
|
+
"terser-webpack-plugin": "^5.5.0",
|
|
129
129
|
"thread-loader": "3.0.4",
|
|
130
130
|
url: "^0.11.0",
|
|
131
131
|
vite: "~6.4.2",
|
|
@@ -150,7 +150,7 @@ var pkgJson = {
|
|
|
150
150
|
rimraf: "6.0.1"
|
|
151
151
|
},
|
|
152
152
|
engines: {
|
|
153
|
-
node: "
|
|
153
|
+
node: "20.x || >=22.0.0"
|
|
154
154
|
},
|
|
155
155
|
peerDependencies: {
|
|
156
156
|
puppeteer: ">=20.0.0"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var pkgJson = {
|
|
4
4
|
name: "@commercetools-frontend/mc-scripts",
|
|
5
|
-
version: "27.
|
|
5
|
+
version: "27.5.1",
|
|
6
6
|
description: "Configuration and scripts for developing a MC application",
|
|
7
7
|
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
8
8
|
repository: {
|
|
@@ -63,13 +63,13 @@ var pkgJson = {
|
|
|
63
63
|
"@babel/plugin-proposal-do-expressions": "^7.22.5",
|
|
64
64
|
"@babel/runtime": "^7.22.15",
|
|
65
65
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
66
|
-
"@commercetools-frontend/application-components": "27.
|
|
67
|
-
"@commercetools-frontend/application-config": "27.
|
|
68
|
-
"@commercetools-frontend/assets": "27.
|
|
69
|
-
"@commercetools-frontend/babel-preset-mc-app": "27.
|
|
70
|
-
"@commercetools-frontend/constants": "27.
|
|
71
|
-
"@commercetools-frontend/mc-dev-authentication": "27.
|
|
72
|
-
"@commercetools-frontend/mc-html-template": "27.
|
|
66
|
+
"@commercetools-frontend/application-components": "27.5.1",
|
|
67
|
+
"@commercetools-frontend/application-config": "27.5.1",
|
|
68
|
+
"@commercetools-frontend/assets": "27.5.1",
|
|
69
|
+
"@commercetools-frontend/babel-preset-mc-app": "27.5.1",
|
|
70
|
+
"@commercetools-frontend/constants": "27.5.1",
|
|
71
|
+
"@commercetools-frontend/mc-dev-authentication": "27.5.1",
|
|
72
|
+
"@commercetools-frontend/mc-html-template": "27.5.1",
|
|
73
73
|
"@commercetools/http-user-agent": "3.0.0",
|
|
74
74
|
"@emotion/babel-plugin": "^11.13.5",
|
|
75
75
|
"@formatjs/cli-lib": "^6.3.8",
|
|
@@ -93,7 +93,7 @@ var pkgJson = {
|
|
|
93
93
|
commander: "^13.1.0",
|
|
94
94
|
"core-js": "^3.32.2",
|
|
95
95
|
"css-loader": "6.11.0",
|
|
96
|
-
"css-minimizer-webpack-plugin": "
|
|
96
|
+
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
97
97
|
dotenv: "16.6.1",
|
|
98
98
|
"dotenv-expand": "8.0.3",
|
|
99
99
|
"fs-extra": "10.1.0",
|
|
@@ -110,7 +110,7 @@ var pkgJson = {
|
|
|
110
110
|
"moment-locales-webpack-plugin": "1.2.0",
|
|
111
111
|
"node-fetch": "2.7.0",
|
|
112
112
|
open: "^10.1.0",
|
|
113
|
-
postcss: "8.5.
|
|
113
|
+
postcss: "^8.5.12",
|
|
114
114
|
"postcss-custom-media": "8.0.2",
|
|
115
115
|
"postcss-custom-properties": "12.1.4",
|
|
116
116
|
"postcss-import": "14.1.0",
|
|
@@ -127,7 +127,7 @@ var pkgJson = {
|
|
|
127
127
|
sirv: "^3.0.2",
|
|
128
128
|
"style-loader": "3.3.4",
|
|
129
129
|
"svg-url-loader": "7.1.1",
|
|
130
|
-
"terser-webpack-plugin": "5.
|
|
130
|
+
"terser-webpack-plugin": "^5.5.0",
|
|
131
131
|
"thread-loader": "3.0.4",
|
|
132
132
|
url: "^0.11.0",
|
|
133
133
|
vite: "~6.4.2",
|
|
@@ -152,7 +152,7 @@ var pkgJson = {
|
|
|
152
152
|
rimraf: "6.0.1"
|
|
153
153
|
},
|
|
154
154
|
engines: {
|
|
155
|
-
node: "
|
|
155
|
+
node: "20.x || >=22.0.0"
|
|
156
156
|
},
|
|
157
157
|
peerDependencies: {
|
|
158
158
|
puppeteer: ">=20.0.0"
|
|
@@ -0,0 +1,80 @@
|
|
|
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 _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
5
|
+
import http from 'http';
|
|
6
|
+
import sirv from 'sirv';
|
|
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 DEFAULT_PORT = 3001;
|
|
15
|
+
async function run() {
|
|
16
|
+
var _context, _context2, _context3;
|
|
17
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
|
+
const port = options.port ?? DEFAULT_PORT;
|
|
19
|
+
const publicPath = options.publicPath ?? paths.appBuild;
|
|
20
|
+
const handleAuthRoutes = options.handleAuthRoutes ?? true;
|
|
21
|
+
const applicationConfig = options.applicationConfig;
|
|
22
|
+
const isLocalMcApi = ((_context = applicationConfig) == null ? void 0 : _bindInstanceProperty(_context3 = Function.call).call(_context3, _startsWithInstanceProperty(_context2 = _context.env.mcApiUrl), _context2))?.('http://localhost') ?? false;
|
|
23
|
+
|
|
24
|
+
// `single: true` gives us the SPA fallback — any unmatched path is served as
|
|
25
|
+
// the root `index.html`. This replaces the complex glob workaround that
|
|
26
|
+
// `serve-handler` needed because of vercel/serve-handler#71.
|
|
27
|
+
const staticHandler = sirv(publicPath, {
|
|
28
|
+
single: true,
|
|
29
|
+
etag: true
|
|
30
|
+
});
|
|
31
|
+
const server = http.createServer((request, response) => {
|
|
32
|
+
var _context10, _context11;
|
|
33
|
+
// The auth-route handlers are the only consumer of `applicationConfig`,
|
|
34
|
+
// so the branch is entered only when both the flag is on AND the caller
|
|
35
|
+
// supplied a config. The CLI pairs the two — see `serve` action in
|
|
36
|
+
// `cli.ts`. Apps that own the `/login*` / `/logout*` routes themselves
|
|
37
|
+
// (e.g. `application-authentication`) opt out via
|
|
38
|
+
// `--handle-auth-routes=false` so those paths flow through to the SPA
|
|
39
|
+
// fallback like any other route.
|
|
40
|
+
if (handleAuthRoutes && applicationConfig) {
|
|
41
|
+
var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
|
|
42
|
+
// Localhost-only: inline replacement for the login/logout UI that
|
|
43
|
+
// `mc-dev-authentication` used to ship as static HTML (#3734).
|
|
44
|
+
if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty(_context5 = Function.call).call(_context5, _startsWithInstanceProperty(_context4), _context4))?.('/login/authorize')) {
|
|
45
|
+
const redirectTo = new _URL(request.url, applicationConfig.env.mcApiUrl);
|
|
46
|
+
response.writeHead(301, {
|
|
47
|
+
Location: redirectTo.toString()
|
|
48
|
+
}).end();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty(_context7 = Function.call).call(_context7, _startsWithInstanceProperty(_context6), _context6))?.('/logout')) {
|
|
52
|
+
response.end('Please clear your session storage.');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Preserve the pre-swap contract: any other `/login*` or `/logout*`
|
|
57
|
+
// request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
|
|
58
|
+
// fall back to the SPA — that would mask OAuth callback
|
|
59
|
+
// misconfigurations by rendering the app on a URL the backend owns.
|
|
60
|
+
if (((_context8 = request.url) == null ? void 0 : _bindInstanceProperty(_context9 = Function.call).call(_context9, _startsWithInstanceProperty(_context8), _context8))?.('/login') || ((_context0 = request.url) == null ? void 0 : _bindInstanceProperty(_context1 = Function.call).call(_context1, _startsWithInstanceProperty(_context0), _context0))?.('/logout')) {
|
|
61
|
+
response.writeHead(404).end();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
|
|
67
|
+
// into the single PNG the app ships.
|
|
68
|
+
if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty(_context11 = Function.call).call(_context11, _startsWithInstanceProperty(_context10), _context10))?.('/favicon')) {
|
|
69
|
+
request.url = '/favicon.png';
|
|
70
|
+
}
|
|
71
|
+
staticHandler(request, response, () => {
|
|
72
|
+
response.writeHead(404).end();
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
return new _Promise(resolve => {
|
|
76
|
+
server.listen(port, () => resolve(server));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { run as default };
|
|
@@ -0,0 +1,91 @@
|
|
|
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 _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
7
|
+
var http = require('http');
|
|
8
|
+
var sirv = require('sirv');
|
|
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 _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
22
|
+
var http__default = /*#__PURE__*/_interopDefault(http);
|
|
23
|
+
var sirv__default = /*#__PURE__*/_interopDefault(sirv);
|
|
24
|
+
|
|
25
|
+
const DEFAULT_PORT = 3001;
|
|
26
|
+
async function run() {
|
|
27
|
+
var _context, _context2, _context3;
|
|
28
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
|
+
const port = options.port ?? DEFAULT_PORT;
|
|
30
|
+
const publicPath = options.publicPath ?? paths.paths.appBuild;
|
|
31
|
+
const handleAuthRoutes = options.handleAuthRoutes ?? true;
|
|
32
|
+
const applicationConfig = options.applicationConfig;
|
|
33
|
+
const isLocalMcApi = ((_context = applicationConfig) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2 = _context.env.mcApiUrl), _context2))?.('http://localhost') ?? false;
|
|
34
|
+
|
|
35
|
+
// `single: true` gives us the SPA fallback — any unmatched path is served as
|
|
36
|
+
// the root `index.html`. This replaces the complex glob workaround that
|
|
37
|
+
// `serve-handler` needed because of vercel/serve-handler#71.
|
|
38
|
+
const staticHandler = sirv__default["default"](publicPath, {
|
|
39
|
+
single: true,
|
|
40
|
+
etag: true
|
|
41
|
+
});
|
|
42
|
+
const server = http__default["default"].createServer((request, response) => {
|
|
43
|
+
var _context10, _context11;
|
|
44
|
+
// The auth-route handlers are the only consumer of `applicationConfig`,
|
|
45
|
+
// so the branch is entered only when both the flag is on AND the caller
|
|
46
|
+
// supplied a config. The CLI pairs the two — see `serve` action in
|
|
47
|
+
// `cli.ts`. Apps that own the `/login*` / `/logout*` routes themselves
|
|
48
|
+
// (e.g. `application-authentication`) opt out via
|
|
49
|
+
// `--handle-auth-routes=false` so those paths flow through to the SPA
|
|
50
|
+
// fallback like any other route.
|
|
51
|
+
if (handleAuthRoutes && applicationConfig) {
|
|
52
|
+
var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
|
|
53
|
+
// Localhost-only: inline replacement for the login/logout UI that
|
|
54
|
+
// `mc-dev-authentication` used to ship as static HTML (#3734).
|
|
55
|
+
if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/login/authorize')) {
|
|
56
|
+
const redirectTo = new _URL__default["default"](request.url, applicationConfig.env.mcApiUrl);
|
|
57
|
+
response.writeHead(301, {
|
|
58
|
+
Location: redirectTo.toString()
|
|
59
|
+
}).end();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/logout')) {
|
|
63
|
+
response.end('Please clear your session storage.');
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Preserve the pre-swap contract: any other `/login*` or `/logout*`
|
|
68
|
+
// request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
|
|
69
|
+
// fall back to the SPA — that would mask OAuth callback
|
|
70
|
+
// misconfigurations by rendering the app on a URL the backend owns.
|
|
71
|
+
if (((_context8 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context9 = Function.call).call(_context9, _startsWithInstanceProperty__default["default"](_context8), _context8))?.('/login') || ((_context0 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context1 = Function.call).call(_context1, _startsWithInstanceProperty__default["default"](_context0), _context0))?.('/logout')) {
|
|
72
|
+
response.writeHead(404).end();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
|
|
78
|
+
// into the single PNG the app ships.
|
|
79
|
+
if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context11 = Function.call).call(_context11, _startsWithInstanceProperty__default["default"](_context10), _context10))?.('/favicon')) {
|
|
80
|
+
request.url = '/favicon.png';
|
|
81
|
+
}
|
|
82
|
+
staticHandler(request, response, () => {
|
|
83
|
+
response.writeHead(404).end();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
return new _Promise__default["default"](resolve => {
|
|
87
|
+
server.listen(port, () => resolve(server));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
exports["default"] = run;
|