@commercetools-frontend/mc-scripts 22.7.1 → 22.8.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 +5 -5
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +5 -5
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +5 -5
- package/dist/{build-892510a9.cjs.prod.js → build-3264d351.cjs.prod.js} +3 -3
- package/dist/{build-8973fc06.cjs.dev.js → build-3a00beff.cjs.dev.js} +3 -3
- package/dist/{build-a3d29b86.esm.js → build-a2fc942f.esm.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-45a36f3e.cjs.prod.js → config-sync-43b665e0.cjs.prod.js} +18 -16
- package/dist/{config-sync-8bb629a0.cjs.dev.js → config-sync-532351e4.cjs.dev.js} +18 -16
- package/dist/{config-sync-23a4c471.esm.js → config-sync-c5d7313a.esm.js} +18 -16
- package/dist/{create-postcss-config-c57d1c88.cjs.dev.js → create-postcss-config-1390002c.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-5f26772d.esm.js → create-postcss-config-66182fad.esm.js} +1 -1
- package/dist/{create-postcss-config-d53cbd2a.cjs.prod.js → create-postcss-config-c3f849e7.cjs.prod.js} +1 -1
- package/dist/{create-webpack-config-for-development-8573e2f2.esm.js → create-webpack-config-for-development-415428d4.esm.js} +3 -3
- package/dist/{create-webpack-config-for-development-6de9f082.cjs.prod.js → create-webpack-config-for-development-5319b2e0.cjs.prod.js} +3 -3
- package/dist/{create-webpack-config-for-development-a95b86ae.cjs.dev.js → create-webpack-config-for-development-ceba50a4.cjs.dev.js} +3 -3
- package/dist/{create-webpack-config-for-production-de7ba047.cjs.prod.js → create-webpack-config-for-production-1445f85d.cjs.prod.js} +3 -3
- package/dist/{create-webpack-config-for-production-8815d830.esm.js → create-webpack-config-for-production-1f83e4c1.esm.js} +3 -3
- package/dist/{create-webpack-config-for-production-3e70ec15.cjs.dev.js → create-webpack-config-for-production-474adf87.cjs.dev.js} +3 -3
- package/dist/{credentials-storage-56a5405e.esm.js → credentials-storage-085a9533.esm.js} +1 -1
- package/dist/{credentials-storage-0c4e6bd2.cjs.prod.js → credentials-storage-6aeef52d.cjs.prod.js} +1 -1
- package/dist/{credentials-storage-9f0431c6.cjs.dev.js → credentials-storage-bed1fedc.cjs.dev.js} +1 -1
- package/dist/declarations/src/generated/settings.d.ts +78 -2
- package/dist/{login-6c86481c.esm.js → login-19d77a64.esm.js} +5 -12
- package/dist/{login-f17a6acc.cjs.dev.js → login-5b4edba4.cjs.dev.js} +5 -13
- package/dist/{login-7f73d578.cjs.prod.js → login-85b71012.cjs.prod.js} +5 -13
- package/dist/{package-f6c23cfe.cjs.dev.js → package-62154e5e.cjs.dev.js} +19 -19
- package/dist/{package-8fb3bdf6.esm.js → package-6d13cf9a.esm.js} +19 -19
- package/dist/{package-6a3a74e6.cjs.prod.js → package-d233d621.cjs.prod.js} +19 -19
- package/dist/{start-33943e55.esm.js → start-5b7cf4f2.esm.js} +4 -4
- package/dist/{start-b6ee0e11.cjs.dev.js → start-842f518b.cjs.dev.js} +4 -4
- package/dist/{start-14388e1f.cjs.prod.js → start-ec3a3fce.cjs.prod.js} +4 -4
- package/package.json +19 -19
- 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
|
@@ -10,7 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var cac = require('cac');
|
|
11
11
|
var dotenv = require('dotenv');
|
|
12
12
|
var dotenvExpand = require('dotenv-expand');
|
|
13
|
-
var _package = require('../../dist/package-
|
|
13
|
+
var _package = require('../../dist/package-62154e5e.cjs.dev.js');
|
|
14
14
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
16
16
|
|
|
@@ -56,7 +56,7 @@ async function run() {
|
|
|
56
56
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
57
57
|
console.log('');
|
|
58
58
|
}
|
|
59
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-3966d625.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-
|
|
59
|
+
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-3966d625.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-842f518b.cjs.dev.js'); });
|
|
60
60
|
await startCommand.default();
|
|
61
61
|
});
|
|
62
62
|
|
|
@@ -77,7 +77,7 @@ async function run() {
|
|
|
77
77
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
78
78
|
console.log('');
|
|
79
79
|
}
|
|
80
|
-
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-e7a6315c.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-
|
|
80
|
+
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-e7a6315c.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-3a00beff.cjs.dev.js'); });
|
|
81
81
|
await buildCommand.default();
|
|
82
82
|
const shouldAlsoCompile = !options.buildOnly;
|
|
83
83
|
if (shouldAlsoCompile) {
|
|
@@ -126,7 +126,7 @@ async function run() {
|
|
|
126
126
|
|
|
127
127
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
128
128
|
process.env.NODE_ENV = 'production';
|
|
129
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
129
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-5b4edba4.cjs.dev.js'); });
|
|
130
130
|
await loginCommand.default();
|
|
131
131
|
});
|
|
132
132
|
|
|
@@ -141,7 +141,7 @@ async function run() {
|
|
|
141
141
|
|
|
142
142
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
143
143
|
process.env.NODE_ENV = 'production';
|
|
144
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
144
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-532351e4.cjs.dev.js'); });
|
|
145
145
|
await configSyncCommand.default(options);
|
|
146
146
|
});
|
|
147
147
|
cli.help();
|
|
@@ -10,7 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var cac = require('cac');
|
|
11
11
|
var dotenv = require('dotenv');
|
|
12
12
|
var dotenvExpand = require('dotenv-expand');
|
|
13
|
-
var _package = require('../../dist/package-
|
|
13
|
+
var _package = require('../../dist/package-d233d621.cjs.prod.js');
|
|
14
14
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
16
16
|
|
|
@@ -56,7 +56,7 @@ async function run() {
|
|
|
56
56
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
57
57
|
console.log('');
|
|
58
58
|
}
|
|
59
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-5c78605b.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-
|
|
59
|
+
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-5c78605b.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-ec3a3fce.cjs.prod.js'); });
|
|
60
60
|
await startCommand.default();
|
|
61
61
|
});
|
|
62
62
|
|
|
@@ -77,7 +77,7 @@ async function run() {
|
|
|
77
77
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
78
78
|
console.log('');
|
|
79
79
|
}
|
|
80
|
-
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-1ba28dd8.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-
|
|
80
|
+
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-1ba28dd8.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-3264d351.cjs.prod.js'); });
|
|
81
81
|
await buildCommand.default();
|
|
82
82
|
const shouldAlsoCompile = !options.buildOnly;
|
|
83
83
|
if (shouldAlsoCompile) {
|
|
@@ -126,7 +126,7 @@ async function run() {
|
|
|
126
126
|
|
|
127
127
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
128
128
|
process.env.NODE_ENV = 'production';
|
|
129
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
129
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-85b71012.cjs.prod.js'); });
|
|
130
130
|
await loginCommand.default();
|
|
131
131
|
});
|
|
132
132
|
|
|
@@ -141,7 +141,7 @@ async function run() {
|
|
|
141
141
|
|
|
142
142
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
143
143
|
process.env.NODE_ENV = 'production';
|
|
144
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
144
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-43b665e0.cjs.prod.js'); });
|
|
145
145
|
await configSyncCommand.default(options);
|
|
146
146
|
});
|
|
147
147
|
cli.help();
|
|
@@ -6,7 +6,7 @@ import path from 'path';
|
|
|
6
6
|
import { cac } from 'cac';
|
|
7
7
|
import dotenv from 'dotenv';
|
|
8
8
|
import dotenvExpand from 'dotenv-expand';
|
|
9
|
-
import { p as pkgJson } from '../../dist/package-
|
|
9
|
+
import { p as pkgJson } from '../../dist/package-6d13cf9a.esm.js';
|
|
10
10
|
|
|
11
11
|
const cli = cac('mc-scripts');
|
|
12
12
|
|
|
@@ -42,7 +42,7 @@ async function run() {
|
|
|
42
42
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
43
43
|
console.log('');
|
|
44
44
|
}
|
|
45
|
-
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-cf0213a1.esm.js') : await import('../../dist/start-
|
|
45
|
+
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-cf0213a1.esm.js') : await import('../../dist/start-5b7cf4f2.esm.js');
|
|
46
46
|
await startCommand.default();
|
|
47
47
|
});
|
|
48
48
|
|
|
@@ -63,7 +63,7 @@ async function run() {
|
|
|
63
63
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
64
64
|
console.log('');
|
|
65
65
|
}
|
|
66
|
-
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-9de4820c.esm.js') : await import('../../dist/build-
|
|
66
|
+
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-9de4820c.esm.js') : await import('../../dist/build-a2fc942f.esm.js');
|
|
67
67
|
await buildCommand.default();
|
|
68
68
|
const shouldAlsoCompile = !options.buildOnly;
|
|
69
69
|
if (shouldAlsoCompile) {
|
|
@@ -112,7 +112,7 @@ async function run() {
|
|
|
112
112
|
|
|
113
113
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
114
114
|
process.env.NODE_ENV = 'production';
|
|
115
|
-
const loginCommand = await import('../../dist/login-
|
|
115
|
+
const loginCommand = await import('../../dist/login-19d77a64.esm.js');
|
|
116
116
|
await loginCommand.default();
|
|
117
117
|
});
|
|
118
118
|
|
|
@@ -127,7 +127,7 @@ async function run() {
|
|
|
127
127
|
|
|
128
128
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
129
129
|
process.env.NODE_ENV = 'production';
|
|
130
|
-
const configSyncCommand = await import('../../dist/config-sync-
|
|
130
|
+
const configSyncCommand = await import('../../dist/config-sync-c5d7313a.esm.js');
|
|
131
131
|
await configSyncCommand.default(options);
|
|
132
132
|
});
|
|
133
133
|
cli.help();
|
|
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
|
10
10
|
var printBuildError = require('react-dev-utils/printBuildError');
|
|
11
11
|
var webpack = require('webpack');
|
|
12
12
|
var assets = require('@commercetools-frontend/assets');
|
|
13
|
-
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-1445f85d.cjs.prod.js');
|
|
14
14
|
var paths = require('./paths-854af5ef.cjs.prod.js');
|
|
15
15
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -38,9 +38,9 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
39
39
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
40
40
|
require('fs');
|
|
41
|
-
require('./create-postcss-config-
|
|
41
|
+
require('./create-postcss-config-c3f849e7.cjs.prod.js');
|
|
42
42
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
43
|
-
require('./package-
|
|
43
|
+
require('./package-d233d621.cjs.prod.js');
|
|
44
44
|
require('./has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
45
45
|
require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
46
46
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
|
10
10
|
var printBuildError = require('react-dev-utils/printBuildError');
|
|
11
11
|
var webpack = require('webpack');
|
|
12
12
|
var assets = require('@commercetools-frontend/assets');
|
|
13
|
-
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-474adf87.cjs.dev.js');
|
|
14
14
|
var paths = require('./paths-d1febc82.cjs.dev.js');
|
|
15
15
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -38,9 +38,9 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
39
39
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
40
40
|
require('fs');
|
|
41
|
-
require('./create-postcss-config-
|
|
41
|
+
require('./create-postcss-config-1390002c.cjs.dev.js');
|
|
42
42
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
43
|
-
require('./package-
|
|
43
|
+
require('./package-62154e5e.cjs.dev.js');
|
|
44
44
|
require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
45
45
|
require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
46
46
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
@@ -8,7 +8,7 @@ import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';
|
|
|
8
8
|
import printBuildError from 'react-dev-utils/printBuildError';
|
|
9
9
|
import webpack from 'webpack';
|
|
10
10
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
11
|
-
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-
|
|
11
|
+
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-1f83e4c1.esm.js';
|
|
12
12
|
import { p as paths } from './paths-ded20ae1.esm.js';
|
|
13
13
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
14
14
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
@@ -36,9 +36,9 @@ import '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
|
36
36
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
37
37
|
import '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
38
38
|
import 'fs';
|
|
39
|
-
import './create-postcss-config-
|
|
39
|
+
import './create-postcss-config-66182fad.esm.js';
|
|
40
40
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
41
|
-
import './package-
|
|
41
|
+
import './package-6d13cf9a.esm.js';
|
|
42
42
|
import './has-jsx-runtime-e3ecb09b.esm.js';
|
|
43
43
|
import './vendors-to-transpile-7dc84a72.esm.js';
|
|
44
44
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
-
var version = "22.
|
|
8
|
+
var version = "22.8.1";
|
|
9
9
|
|
|
10
10
|
// These exports are deprecated.
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
-
var version = "22.
|
|
8
|
+
var version = "22.8.1";
|
|
9
9
|
|
|
10
10
|
// These exports are deprecated.
|
|
11
11
|
|
|
@@ -10,7 +10,7 @@ var chalk = require('chalk');
|
|
|
10
10
|
var omit = require('lodash/omit');
|
|
11
11
|
var prompts = require('prompts');
|
|
12
12
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
13
|
-
var credentialsStorage$2 = require('./credentials-storage-
|
|
13
|
+
var credentialsStorage$2 = require('./credentials-storage-6aeef52d.cjs.prod.js');
|
|
14
14
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
15
15
|
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
16
16
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
@@ -27,7 +27,7 @@ var graphql = require('graphql');
|
|
|
27
27
|
var graphqlRequest = require('graphql-request');
|
|
28
28
|
var constants = require('@commercetools-frontend/constants');
|
|
29
29
|
require('@commercetools/http-user-agent');
|
|
30
|
-
require('./package-
|
|
30
|
+
require('./package-d233d621.cjs.prod.js');
|
|
31
31
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
32
32
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
33
33
|
require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
@@ -57,8 +57,8 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
|
|
|
57
57
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
58
58
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
59
59
|
|
|
60
|
-
function ownKeys$1(
|
|
61
|
-
function _objectSpread$1(
|
|
60
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
61
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context20, _context21; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context20 = ownKeys$1(Object(t), !0)).call(_context20, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context21 = ownKeys$1(Object(t))).call(_context21, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
62
62
|
const red = str => {
|
|
63
63
|
return chalk__default["default"].red(str);
|
|
64
64
|
};
|
|
@@ -100,7 +100,7 @@ const getArrayDiff = _ref2 => {
|
|
|
100
100
|
indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
|
|
101
101
|
const oldArraySet = new _Set__default["default"](previousValue);
|
|
102
102
|
const arrayDiff = [];
|
|
103
|
-
nextValue === null || nextValue === void 0
|
|
103
|
+
nextValue === null || nextValue === void 0 || _forEachInstanceProperty__default["default"](nextValue).call(nextValue, item => {
|
|
104
104
|
if (oldArraySet.has(item)) {
|
|
105
105
|
oldArraySet.delete(item);
|
|
106
106
|
} else {
|
|
@@ -407,8 +407,8 @@ const getConfigDiff = (oldConfig, newConfig) => {
|
|
|
407
407
|
return diff.join('\n');
|
|
408
408
|
};
|
|
409
409
|
|
|
410
|
-
function ownKeys(
|
|
411
|
-
function _objectSpread(
|
|
410
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
411
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
412
412
|
var CreateCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomApplicationDraftDataInput" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 201, source: { body: "mutation CreateCustomApplicationFromCli(\n $organizationId: String!\n $data: CustomApplicationDraftDataInput!\n) {\n createCustomApplication(organizationId: $organizationId, data: $data) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
413
413
|
var FetchCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "entryPointUriPath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationExtensionForCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "entryPointUriPath" }, value: { kind: "Variable", name: { kind: "Name", value: "entryPointUriPath" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "application" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "entryPointUriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "oAuthScopes" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mainMenuLink" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "submenuLinks" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 647, source: { body: "query FetchCustomApplicationFromCli($entryPointUriPath: String!) {\n organizationExtensionForCustomApplication(\n entryPointUriPath: $entryPointUriPath\n ) {\n organizationId\n application {\n id\n entryPointUriPath\n name\n description\n url\n icon\n permissions {\n name\n oAuthScopes\n }\n mainMenuLink {\n defaultLabel\n permissions\n labelAllLocales {\n locale\n value\n }\n }\n submenuLinks {\n uriPath\n defaultLabel\n permissions\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
414
414
|
var FetchMyOrganizationsFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchMyOrganizationsFromCli" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "myOrganizations" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 112, source: { body: "query FetchMyOrganizationsFromCli {\n myOrganizations {\n total\n results {\n id\n name\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -539,14 +539,16 @@ const getMcUrlLink = (mcApiUrl, organizationId, applicationId) => {
|
|
|
539
539
|
return customAppLink;
|
|
540
540
|
};
|
|
541
541
|
async function run(options) {
|
|
542
|
-
var
|
|
542
|
+
var _context5;
|
|
543
543
|
const applicationConfig$1 = applicationConfig.processConfig();
|
|
544
544
|
const localCustomAppData = applicationConfig$1.data;
|
|
545
545
|
const _applicationConfig$en = applicationConfig$1.env,
|
|
546
546
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
547
|
+
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
548
|
+
customViewId = _applicationConfig$en.customViewId;
|
|
549
|
+
if (customViewId) {
|
|
550
|
+
throw new Error("Syncing the configuration for Custom Views is not supported at the moment.");
|
|
551
|
+
}
|
|
550
552
|
console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
|
|
551
553
|
console.log();
|
|
552
554
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
@@ -559,7 +561,7 @@ async function run(options) {
|
|
|
559
561
|
applicationIdentifier
|
|
560
562
|
});
|
|
561
563
|
if (!fetchedCustomApplication) {
|
|
562
|
-
var
|
|
564
|
+
var _context4;
|
|
563
565
|
const userOrganizations = await fetchUserOrganizations({
|
|
564
566
|
mcApiUrl,
|
|
565
567
|
applicationIdentifier
|
|
@@ -574,8 +576,8 @@ async function run(options) {
|
|
|
574
576
|
organizationId = organization.id;
|
|
575
577
|
organizationName = organization.name;
|
|
576
578
|
} else {
|
|
577
|
-
var
|
|
578
|
-
const organizationChoices = _mapInstanceProperty__default["default"](
|
|
579
|
+
var _context3;
|
|
580
|
+
const organizationChoices = _mapInstanceProperty__default["default"](_context3 = userOrganizations.results).call(_context3, organization => ({
|
|
579
581
|
title: organization.name,
|
|
580
582
|
value: organization.id
|
|
581
583
|
}));
|
|
@@ -599,7 +601,7 @@ async function run(options) {
|
|
|
599
601
|
const _await$prompts2 = await prompts__default["default"]({
|
|
600
602
|
type: 'text',
|
|
601
603
|
name: 'confirmation',
|
|
602
|
-
message: _filterInstanceProperty__default["default"](
|
|
604
|
+
message: _filterInstanceProperty__default["default"](_context4 = ["You are about to create a new Custom Application in the \"".concat(chalk__default["default"].green(organizationName), "\" organization. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context4, Boolean).join('\n'),
|
|
603
605
|
initial: 'yes'
|
|
604
606
|
}),
|
|
605
607
|
confirmation = _await$prompts2.confirmation;
|
|
@@ -647,7 +649,7 @@ async function run(options) {
|
|
|
647
649
|
const _await$prompts3 = await prompts__default["default"]({
|
|
648
650
|
type: 'text',
|
|
649
651
|
name: 'confirmation',
|
|
650
|
-
message: _filterInstanceProperty__default["default"](
|
|
652
|
+
message: _filterInstanceProperty__default["default"](_context5 = ["You are about to update the Custom Application \"".concat(chalk__default["default"].green(localCustomAppData.entryPointUriPath), "\" with the changes above. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context5, Boolean).join('\n'),
|
|
651
653
|
initial: 'yes'
|
|
652
654
|
}),
|
|
653
655
|
confirmation = _await$prompts3.confirmation;
|
|
@@ -10,7 +10,7 @@ var chalk = require('chalk');
|
|
|
10
10
|
var omit = require('lodash/omit');
|
|
11
11
|
var prompts = require('prompts');
|
|
12
12
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
13
|
-
var credentialsStorage$2 = require('./credentials-storage-
|
|
13
|
+
var credentialsStorage$2 = require('./credentials-storage-bed1fedc.cjs.dev.js');
|
|
14
14
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
15
15
|
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
16
16
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
@@ -27,7 +27,7 @@ var graphql = require('graphql');
|
|
|
27
27
|
var graphqlRequest = require('graphql-request');
|
|
28
28
|
var constants = require('@commercetools-frontend/constants');
|
|
29
29
|
require('@commercetools/http-user-agent');
|
|
30
|
-
require('./package-
|
|
30
|
+
require('./package-62154e5e.cjs.dev.js');
|
|
31
31
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
32
32
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
33
33
|
require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
@@ -57,8 +57,8 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
|
|
|
57
57
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
58
58
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
59
59
|
|
|
60
|
-
function ownKeys$1(
|
|
61
|
-
function _objectSpread$1(
|
|
60
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
61
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context20, _context21; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context20 = ownKeys$1(Object(t), !0)).call(_context20, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context21 = ownKeys$1(Object(t))).call(_context21, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
62
62
|
|
|
63
63
|
// Since not all terminal supports colors, to make things more consistent for testing purposes,
|
|
64
64
|
// during tests the color used is appended before the string instead of coloring it.
|
|
@@ -106,7 +106,7 @@ const getArrayDiff = _ref2 => {
|
|
|
106
106
|
indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
|
|
107
107
|
const oldArraySet = new _Set__default["default"](previousValue);
|
|
108
108
|
const arrayDiff = [];
|
|
109
|
-
nextValue === null || nextValue === void 0
|
|
109
|
+
nextValue === null || nextValue === void 0 || _forEachInstanceProperty__default["default"](nextValue).call(nextValue, item => {
|
|
110
110
|
if (oldArraySet.has(item)) {
|
|
111
111
|
oldArraySet.delete(item);
|
|
112
112
|
} else {
|
|
@@ -413,8 +413,8 @@ const getConfigDiff = (oldConfig, newConfig) => {
|
|
|
413
413
|
return diff.join('\n');
|
|
414
414
|
};
|
|
415
415
|
|
|
416
|
-
function ownKeys(
|
|
417
|
-
function _objectSpread(
|
|
416
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
417
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
418
418
|
var CreateCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomApplicationDraftDataInput" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 201, source: { body: "mutation CreateCustomApplicationFromCli(\n $organizationId: String!\n $data: CustomApplicationDraftDataInput!\n) {\n createCustomApplication(organizationId: $organizationId, data: $data) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
419
419
|
var FetchCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "entryPointUriPath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationExtensionForCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "entryPointUriPath" }, value: { kind: "Variable", name: { kind: "Name", value: "entryPointUriPath" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "application" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "entryPointUriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "oAuthScopes" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mainMenuLink" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "submenuLinks" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 647, source: { body: "query FetchCustomApplicationFromCli($entryPointUriPath: String!) {\n organizationExtensionForCustomApplication(\n entryPointUriPath: $entryPointUriPath\n ) {\n organizationId\n application {\n id\n entryPointUriPath\n name\n description\n url\n icon\n permissions {\n name\n oAuthScopes\n }\n mainMenuLink {\n defaultLabel\n permissions\n labelAllLocales {\n locale\n value\n }\n }\n submenuLinks {\n uriPath\n defaultLabel\n permissions\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
420
420
|
var FetchMyOrganizationsFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchMyOrganizationsFromCli" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "myOrganizations" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 112, source: { body: "query FetchMyOrganizationsFromCli {\n myOrganizations {\n total\n results {\n id\n name\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -545,14 +545,16 @@ const getMcUrlLink = (mcApiUrl, organizationId, applicationId) => {
|
|
|
545
545
|
return customAppLink;
|
|
546
546
|
};
|
|
547
547
|
async function run(options) {
|
|
548
|
-
var
|
|
548
|
+
var _context5;
|
|
549
549
|
const applicationConfig$1 = applicationConfig.processConfig();
|
|
550
550
|
const localCustomAppData = applicationConfig$1.data;
|
|
551
551
|
const _applicationConfig$en = applicationConfig$1.env,
|
|
552
552
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
553
|
+
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
554
|
+
customViewId = _applicationConfig$en.customViewId;
|
|
555
|
+
if (customViewId) {
|
|
556
|
+
throw new Error("Syncing the configuration for Custom Views is not supported at the moment.");
|
|
557
|
+
}
|
|
556
558
|
console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
|
|
557
559
|
console.log();
|
|
558
560
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
@@ -565,7 +567,7 @@ async function run(options) {
|
|
|
565
567
|
applicationIdentifier
|
|
566
568
|
});
|
|
567
569
|
if (!fetchedCustomApplication) {
|
|
568
|
-
var
|
|
570
|
+
var _context4;
|
|
569
571
|
const userOrganizations = await fetchUserOrganizations({
|
|
570
572
|
mcApiUrl,
|
|
571
573
|
applicationIdentifier
|
|
@@ -580,8 +582,8 @@ async function run(options) {
|
|
|
580
582
|
organizationId = organization.id;
|
|
581
583
|
organizationName = organization.name;
|
|
582
584
|
} else {
|
|
583
|
-
var
|
|
584
|
-
const organizationChoices = _mapInstanceProperty__default["default"](
|
|
585
|
+
var _context3;
|
|
586
|
+
const organizationChoices = _mapInstanceProperty__default["default"](_context3 = userOrganizations.results).call(_context3, organization => ({
|
|
585
587
|
title: organization.name,
|
|
586
588
|
value: organization.id
|
|
587
589
|
}));
|
|
@@ -605,7 +607,7 @@ async function run(options) {
|
|
|
605
607
|
const _await$prompts2 = await prompts__default["default"]({
|
|
606
608
|
type: 'text',
|
|
607
609
|
name: 'confirmation',
|
|
608
|
-
message: _filterInstanceProperty__default["default"](
|
|
610
|
+
message: _filterInstanceProperty__default["default"](_context4 = ["You are about to create a new Custom Application in the \"".concat(chalk__default["default"].green(organizationName), "\" organization. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context4, Boolean).join('\n'),
|
|
609
611
|
initial: 'yes'
|
|
610
612
|
}),
|
|
611
613
|
confirmation = _await$prompts2.confirmation;
|
|
@@ -653,7 +655,7 @@ async function run(options) {
|
|
|
653
655
|
const _await$prompts3 = await prompts__default["default"]({
|
|
654
656
|
type: 'text',
|
|
655
657
|
name: 'confirmation',
|
|
656
|
-
message: _filterInstanceProperty__default["default"](
|
|
658
|
+
message: _filterInstanceProperty__default["default"](_context5 = ["You are about to update the Custom Application \"".concat(chalk__default["default"].green(localCustomAppData.entryPointUriPath), "\" with the changes above. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context5, Boolean).join('\n'),
|
|
657
659
|
initial: 'yes'
|
|
658
660
|
}),
|
|
659
661
|
confirmation = _await$prompts3.confirmation;
|