@commercetools-frontend/mc-scripts 21.23.10 → 21.24.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 (89) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +120 -326
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +120 -326
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +116 -321
  4. package/dist/build-980cf2c9.cjs.prod.js +170 -0
  5. package/dist/build-c9601b07.esm.js +156 -0
  6. package/dist/build-e8a49b56.cjs.dev.js +170 -0
  7. package/dist/build-vite-b531d3d3.esm.js +118 -0
  8. package/dist/build-vite-c40a55c3.cjs.dev.js +129 -0
  9. package/dist/build-vite-d17432ec.cjs.prod.js +129 -0
  10. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +2 -2
  11. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +2 -2
  12. package/dist/commercetools-frontend-mc-scripts.esm.js +2 -2
  13. package/dist/compile-html-41195e35.cjs.dev.js +49 -0
  14. package/dist/compile-html-5abd78aa.cjs.prod.js +49 -0
  15. package/dist/compile-html-f9de842c.esm.js +40 -0
  16. package/dist/config-sync-0ecc13b3.cjs.dev.js +783 -0
  17. package/dist/config-sync-4b1ddec3.esm.js +759 -0
  18. package/dist/config-sync-bb59a82d.cjs.prod.js +778 -0
  19. package/dist/{create-postcss-config-f65c7e31.cjs.dev.js → create-postcss-config-5cc679d5.cjs.dev.js} +9 -14
  20. package/dist/{create-postcss-config-06b2e5c2.esm.js → create-postcss-config-a0d4cffa.esm.js} +9 -13
  21. package/dist/{create-postcss-config-787d905f.cjs.prod.js → create-postcss-config-f94c07fd.cjs.prod.js} +9 -14
  22. package/dist/{create-webpack-config-for-development-fd365d6a.esm.js → create-webpack-config-for-development-95334073.esm.js} +21 -25
  23. package/dist/{create-webpack-config-for-development-d46ef148.cjs.dev.js → create-webpack-config-for-development-a53bab71.cjs.dev.js} +24 -28
  24. package/dist/{create-webpack-config-for-development-59faaed8.cjs.prod.js → create-webpack-config-for-development-c915ec0c.cjs.prod.js} +24 -28
  25. package/dist/{create-webpack-config-for-production-b28b3d33.esm.js → create-webpack-config-for-production-342485cd.esm.js} +18 -21
  26. package/dist/{create-webpack-config-for-production-1af3a454.cjs.prod.js → create-webpack-config-for-production-af6f3138.cjs.prod.js} +20 -23
  27. package/dist/{create-webpack-config-for-production-e12e3c30.cjs.dev.js → create-webpack-config-for-production-db45d9ab.cjs.dev.js} +20 -23
  28. package/dist/{user-agent-9a470e39.cjs.dev.js → credentials-storage-a37a8915.cjs.dev.js} +24 -24
  29. package/dist/{user-agent-6e8d0e0b.cjs.prod.js → credentials-storage-b803a804.cjs.prod.js} +24 -24
  30. package/dist/{user-agent-4b60934e.esm.js → credentials-storage-cb88e8fc.esm.js} +22 -22
  31. package/dist/declarations/src/deprecated-entry-points.d.ts +1 -1
  32. package/dist/login-35040a86.cjs.dev.js +93 -0
  33. package/dist/login-6e17747d.esm.js +84 -0
  34. package/dist/login-90736d7e.cjs.prod.js +93 -0
  35. package/dist/{package-a5454c97.esm.js → package-17f18481.esm.js} +17 -16
  36. package/dist/{package-e2d9b5e0.cjs.dev.js → package-c42dc2ac.cjs.dev.js} +17 -16
  37. package/dist/{package-808a31f1.cjs.prod.js → package-db15171f.cjs.prod.js} +17 -16
  38. package/dist/{paths-76b66e74.cjs.prod.js → paths-284c77fb.cjs.prod.js} +6 -8
  39. package/dist/{paths-ed23d5a1.esm.js → paths-55c5d5a2.esm.js} +6 -8
  40. package/dist/{paths-16823f56.cjs.dev.js → paths-db35ac0f.cjs.dev.js} +6 -8
  41. package/dist/serve-41077dad.cjs.prod.js +48 -0
  42. package/dist/serve-660e2ee0.esm.js +41 -0
  43. package/dist/serve-b8063204.cjs.dev.js +48 -0
  44. package/dist/start-0aa71e9a.esm.js +166 -0
  45. package/dist/start-2e7ec87c.cjs.dev.js +180 -0
  46. package/dist/start-c0ffe8d7.cjs.prod.js +180 -0
  47. package/dist/start-vite-324af14d.cjs.prod.js +119 -0
  48. package/dist/start-vite-7d10ae71.esm.js +107 -0
  49. package/dist/start-vite-8f03b0df.cjs.dev.js +119 -0
  50. package/dist/{vendors-to-transpile-367e0ba8.cjs.prod.js → vendors-to-transpile-04a49d40.cjs.prod.js} +1 -1
  51. package/dist/{vendors-to-transpile-b51af5d3.cjs.dev.js → vendors-to-transpile-6ab4ea06.cjs.dev.js} +1 -1
  52. package/dist/{vendors-to-transpile-68e03526.esm.js → vendors-to-transpile-7dc84a72.esm.js} +1 -1
  53. package/dist/vite-plugin-svgr-9a4e7f77.cjs.prod.js +79 -0
  54. package/dist/vite-plugin-svgr-f17db78a.esm.js +55 -0
  55. package/dist/vite-plugin-svgr-fdb37ccf.cjs.dev.js +79 -0
  56. package/package.json +17 -16
  57. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -4
  58. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -4
  59. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -4
  60. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +12 -13
  61. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +12 -13
  62. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +12 -13
  63. package/dist/build-0e6d74d1.esm.js +0 -209
  64. package/dist/build-9074fc85.cjs.dev.js +0 -224
  65. package/dist/build-ae132901.cjs.prod.js +0 -224
  66. package/dist/build-vite-482a21b8.cjs.dev.js +0 -151
  67. package/dist/build-vite-cc68e3bf.esm.js +0 -139
  68. package/dist/build-vite-f095b68d.cjs.prod.js +0 -151
  69. package/dist/compile-html-4361a0b3.esm.js +0 -77
  70. package/dist/compile-html-d6331c35.cjs.prod.js +0 -87
  71. package/dist/compile-html-d9e731aa.cjs.dev.js +0 -87
  72. package/dist/config-sync-2a9945bc.cjs.dev.js +0 -989
  73. package/dist/config-sync-43a80f60.cjs.prod.js +0 -984
  74. package/dist/config-sync-c6c4d1cf.esm.js +0 -964
  75. package/dist/login-7f1cc8d0.cjs.prod.js +0 -167
  76. package/dist/login-d21a49e8.esm.js +0 -157
  77. package/dist/login-ed827138.cjs.dev.js +0 -167
  78. package/dist/serve-12de323b.cjs.dev.js +0 -70
  79. package/dist/serve-784f4fcd.cjs.prod.js +0 -70
  80. package/dist/serve-d6b437b1.esm.js +0 -62
  81. package/dist/start-10a4d95a.esm.js +0 -194
  82. package/dist/start-d021fa98.cjs.prod.js +0 -209
  83. package/dist/start-eea524f2.cjs.dev.js +0 -209
  84. package/dist/start-vite-57ec5175.cjs.dev.js +0 -146
  85. package/dist/start-vite-94c2db8c.esm.js +0 -133
  86. package/dist/start-vite-fc0b15d3.cjs.prod.js +0 -146
  87. package/dist/vite-plugin-svgr-4205f2b5.cjs.dev.js +0 -110
  88. package/dist/vite-plugin-svgr-eb8524fa.esm.js +0 -85
  89. package/dist/vite-plugin-svgr-f3bbedbe.cjs.prod.js +0 -110
@@ -1,167 +0,0 @@
1
- 'use strict';
2
-
3
- var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
4
- var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
5
- var prompts = require('prompts');
6
- var chalk = require('chalk');
7
- var applicationConfig = require('@commercetools-frontend/application-config');
8
- var userAgent = require('./user-agent-6e8d0e0b.cjs.prod.js');
9
- var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
10
- var fetch = require('node-fetch');
11
- require('@babel/runtime-corejs3/helpers/classCallCheck');
12
- require('@babel/runtime-corejs3/helpers/createClass');
13
- require('@babel/runtime-corejs3/core-js-stable/date/now');
14
- require('fs');
15
- require('path');
16
- require('os');
17
- require('@commercetools/http-user-agent');
18
- require('./package-808a31f1.cjs.prod.js');
19
-
20
- function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
21
-
22
- var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
23
- var prompts__default = /*#__PURE__*/_interopDefault(prompts);
24
- var chalk__default = /*#__PURE__*/_interopDefault(chalk);
25
- var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
26
- var fetch__default = /*#__PURE__*/_interopDefault(fetch);
27
-
28
- var getAuthToken = /*#__PURE__*/function () {
29
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(mcApiUrl, payload) {
30
- var response, text, parsed, errorMessage, authToken;
31
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
32
- while (1) {
33
- switch (_context.prev = _context.next) {
34
- case 0:
35
- _context.next = 2;
36
- return fetch__default["default"]("".concat(mcApiUrl, "/tokens/cli"), {
37
- method: 'POST',
38
- headers: {
39
- Accept: 'application/json',
40
- 'Content-Type': 'application/json',
41
- 'x-user-agent': userAgent.userAgent
42
- },
43
- body: _JSON$stringify__default["default"](payload)
44
- });
45
-
46
- case 2:
47
- response = _context.sent;
48
-
49
- if (response.ok) {
50
- _context.next = 10;
51
- break;
52
- }
53
-
54
- _context.next = 6;
55
- return response.text();
56
-
57
- case 6:
58
- text = _context.sent;
59
-
60
- try {
61
- parsed = JSON.parse(text);
62
- } catch (error) {}
63
-
64
- errorMessage = parsed ? parsed.message : text;
65
- throw new Error(errorMessage);
66
-
67
- case 10:
68
- _context.next = 12;
69
- return response.json();
70
-
71
- case 12:
72
- authToken = _context.sent;
73
- return _context.abrupt("return", authToken);
74
-
75
- case 14:
76
- case "end":
77
- return _context.stop();
78
- }
79
- }
80
- }, _callee);
81
- }));
82
-
83
- return function getAuthToken(_x, _x2) {
84
- return _ref.apply(this, arguments);
85
- };
86
- }();
87
-
88
- var credentialsStorage = new userAgent.CredentialsStorage();
89
-
90
- function run() {
91
- return _run.apply(this, arguments);
92
- }
93
-
94
- function _run() {
95
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
96
- var applicationConfig$1, mcApiUrl, _yield$prompts, email, _yield$prompts2, password, credentials;
97
-
98
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
99
- while (1) {
100
- switch (_context.prev = _context.next) {
101
- case 0:
102
- applicationConfig$1 = applicationConfig.processConfig();
103
- mcApiUrl = applicationConfig$1.env.mcApiUrl;
104
- console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
105
- console.log();
106
-
107
- if (!credentialsStorage.isSessionValid(mcApiUrl)) {
108
- _context.next = 7;
109
- break;
110
- }
111
-
112
- console.log("You already have a valid session.");
113
- return _context.abrupt("return");
114
-
115
- case 7:
116
- console.log("Enter the login credentials:");
117
- _context.next = 10;
118
- return prompts__default["default"]({
119
- type: 'text',
120
- name: 'email',
121
- message: 'Email'
122
- });
123
-
124
- case 10:
125
- _yield$prompts = _context.sent;
126
- email = _yield$prompts.email;
127
- _context.next = 14;
128
- return prompts__default["default"]({
129
- type: 'invisible',
130
- name: 'password',
131
- message: 'Password (hidden)'
132
- });
133
-
134
- case 14:
135
- _yield$prompts2 = _context.sent;
136
- password = _yield$prompts2.password;
137
-
138
- if (!(!email || !password)) {
139
- _context.next = 18;
140
- break;
141
- }
142
-
143
- throw new Error("Missing email or password values. Aborting.");
144
-
145
- case 18:
146
- _context.next = 20;
147
- return getAuthToken(mcApiUrl, {
148
- email: email,
149
- password: password
150
- });
151
-
152
- case 20:
153
- credentials = _context.sent;
154
- credentialsStorage.setToken(mcApiUrl, credentials);
155
- console.log(chalk__default["default"].green("Login successful.\n"));
156
-
157
- case 23:
158
- case "end":
159
- return _context.stop();
160
- }
161
- }
162
- }, _callee);
163
- }));
164
- return _run.apply(this, arguments);
165
- }
166
-
167
- exports["default"] = run;
@@ -1,157 +0,0 @@
1
- import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
2
- import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
3
- import prompts from 'prompts';
4
- import chalk from 'chalk';
5
- import { processConfig } from '@commercetools-frontend/application-config';
6
- import { u as userAgent, C as CredentialsStorage } from './user-agent-4b60934e.esm.js';
7
- import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
8
- import fetch from 'node-fetch';
9
- import '@babel/runtime-corejs3/helpers/classCallCheck';
10
- import '@babel/runtime-corejs3/helpers/createClass';
11
- import '@babel/runtime-corejs3/core-js-stable/date/now';
12
- import 'fs';
13
- import 'path';
14
- import 'os';
15
- import '@commercetools/http-user-agent';
16
- import './package-a5454c97.esm.js';
17
-
18
- var getAuthToken = /*#__PURE__*/function () {
19
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mcApiUrl, payload) {
20
- var response, text, parsed, errorMessage, authToken;
21
- return _regeneratorRuntime.wrap(function _callee$(_context) {
22
- while (1) {
23
- switch (_context.prev = _context.next) {
24
- case 0:
25
- _context.next = 2;
26
- return fetch("".concat(mcApiUrl, "/tokens/cli"), {
27
- method: 'POST',
28
- headers: {
29
- Accept: 'application/json',
30
- 'Content-Type': 'application/json',
31
- 'x-user-agent': userAgent
32
- },
33
- body: _JSON$stringify(payload)
34
- });
35
-
36
- case 2:
37
- response = _context.sent;
38
-
39
- if (response.ok) {
40
- _context.next = 10;
41
- break;
42
- }
43
-
44
- _context.next = 6;
45
- return response.text();
46
-
47
- case 6:
48
- text = _context.sent;
49
-
50
- try {
51
- parsed = JSON.parse(text);
52
- } catch (error) {}
53
-
54
- errorMessage = parsed ? parsed.message : text;
55
- throw new Error(errorMessage);
56
-
57
- case 10:
58
- _context.next = 12;
59
- return response.json();
60
-
61
- case 12:
62
- authToken = _context.sent;
63
- return _context.abrupt("return", authToken);
64
-
65
- case 14:
66
- case "end":
67
- return _context.stop();
68
- }
69
- }
70
- }, _callee);
71
- }));
72
-
73
- return function getAuthToken(_x, _x2) {
74
- return _ref.apply(this, arguments);
75
- };
76
- }();
77
-
78
- var credentialsStorage = new CredentialsStorage();
79
-
80
- function run() {
81
- return _run.apply(this, arguments);
82
- }
83
-
84
- function _run() {
85
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
86
- var applicationConfig, mcApiUrl, _yield$prompts, email, _yield$prompts2, password, credentials;
87
-
88
- return _regeneratorRuntime.wrap(function _callee$(_context) {
89
- while (1) {
90
- switch (_context.prev = _context.next) {
91
- case 0:
92
- applicationConfig = processConfig();
93
- mcApiUrl = applicationConfig.env.mcApiUrl;
94
- console.log("Using Merchant Center environment \"".concat(chalk.green(mcApiUrl), "\"."));
95
- console.log();
96
-
97
- if (!credentialsStorage.isSessionValid(mcApiUrl)) {
98
- _context.next = 7;
99
- break;
100
- }
101
-
102
- console.log("You already have a valid session.");
103
- return _context.abrupt("return");
104
-
105
- case 7:
106
- console.log("Enter the login credentials:");
107
- _context.next = 10;
108
- return prompts({
109
- type: 'text',
110
- name: 'email',
111
- message: 'Email'
112
- });
113
-
114
- case 10:
115
- _yield$prompts = _context.sent;
116
- email = _yield$prompts.email;
117
- _context.next = 14;
118
- return prompts({
119
- type: 'invisible',
120
- name: 'password',
121
- message: 'Password (hidden)'
122
- });
123
-
124
- case 14:
125
- _yield$prompts2 = _context.sent;
126
- password = _yield$prompts2.password;
127
-
128
- if (!(!email || !password)) {
129
- _context.next = 18;
130
- break;
131
- }
132
-
133
- throw new Error("Missing email or password values. Aborting.");
134
-
135
- case 18:
136
- _context.next = 20;
137
- return getAuthToken(mcApiUrl, {
138
- email: email,
139
- password: password
140
- });
141
-
142
- case 20:
143
- credentials = _context.sent;
144
- credentialsStorage.setToken(mcApiUrl, credentials);
145
- console.log(chalk.green("Login successful.\n"));
146
-
147
- case 23:
148
- case "end":
149
- return _context.stop();
150
- }
151
- }
152
- }, _callee);
153
- }));
154
- return _run.apply(this, arguments);
155
- }
156
-
157
- export { run as default };
@@ -1,167 +0,0 @@
1
- 'use strict';
2
-
3
- var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
4
- var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
5
- var prompts = require('prompts');
6
- var chalk = require('chalk');
7
- var applicationConfig = require('@commercetools-frontend/application-config');
8
- var userAgent = require('./user-agent-9a470e39.cjs.dev.js');
9
- var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
10
- var fetch = require('node-fetch');
11
- require('@babel/runtime-corejs3/helpers/classCallCheck');
12
- require('@babel/runtime-corejs3/helpers/createClass');
13
- require('@babel/runtime-corejs3/core-js-stable/date/now');
14
- require('fs');
15
- require('path');
16
- require('os');
17
- require('@commercetools/http-user-agent');
18
- require('./package-e2d9b5e0.cjs.dev.js');
19
-
20
- function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
21
-
22
- var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
23
- var prompts__default = /*#__PURE__*/_interopDefault(prompts);
24
- var chalk__default = /*#__PURE__*/_interopDefault(chalk);
25
- var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
26
- var fetch__default = /*#__PURE__*/_interopDefault(fetch);
27
-
28
- var getAuthToken = /*#__PURE__*/function () {
29
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(mcApiUrl, payload) {
30
- var response, text, parsed, errorMessage, authToken;
31
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
32
- while (1) {
33
- switch (_context.prev = _context.next) {
34
- case 0:
35
- _context.next = 2;
36
- return fetch__default["default"]("".concat(mcApiUrl, "/tokens/cli"), {
37
- method: 'POST',
38
- headers: {
39
- Accept: 'application/json',
40
- 'Content-Type': 'application/json',
41
- 'x-user-agent': userAgent.userAgent
42
- },
43
- body: _JSON$stringify__default["default"](payload)
44
- });
45
-
46
- case 2:
47
- response = _context.sent;
48
-
49
- if (response.ok) {
50
- _context.next = 10;
51
- break;
52
- }
53
-
54
- _context.next = 6;
55
- return response.text();
56
-
57
- case 6:
58
- text = _context.sent;
59
-
60
- try {
61
- parsed = JSON.parse(text);
62
- } catch (error) {}
63
-
64
- errorMessage = parsed ? parsed.message : text;
65
- throw new Error(errorMessage);
66
-
67
- case 10:
68
- _context.next = 12;
69
- return response.json();
70
-
71
- case 12:
72
- authToken = _context.sent;
73
- return _context.abrupt("return", authToken);
74
-
75
- case 14:
76
- case "end":
77
- return _context.stop();
78
- }
79
- }
80
- }, _callee);
81
- }));
82
-
83
- return function getAuthToken(_x, _x2) {
84
- return _ref.apply(this, arguments);
85
- };
86
- }();
87
-
88
- var credentialsStorage = new userAgent.CredentialsStorage();
89
-
90
- function run() {
91
- return _run.apply(this, arguments);
92
- }
93
-
94
- function _run() {
95
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
96
- var applicationConfig$1, mcApiUrl, _yield$prompts, email, _yield$prompts2, password, credentials;
97
-
98
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
99
- while (1) {
100
- switch (_context.prev = _context.next) {
101
- case 0:
102
- applicationConfig$1 = applicationConfig.processConfig();
103
- mcApiUrl = applicationConfig$1.env.mcApiUrl;
104
- console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
105
- console.log();
106
-
107
- if (!credentialsStorage.isSessionValid(mcApiUrl)) {
108
- _context.next = 7;
109
- break;
110
- }
111
-
112
- console.log("You already have a valid session.");
113
- return _context.abrupt("return");
114
-
115
- case 7:
116
- console.log("Enter the login credentials:");
117
- _context.next = 10;
118
- return prompts__default["default"]({
119
- type: 'text',
120
- name: 'email',
121
- message: 'Email'
122
- });
123
-
124
- case 10:
125
- _yield$prompts = _context.sent;
126
- email = _yield$prompts.email;
127
- _context.next = 14;
128
- return prompts__default["default"]({
129
- type: 'invisible',
130
- name: 'password',
131
- message: 'Password (hidden)'
132
- });
133
-
134
- case 14:
135
- _yield$prompts2 = _context.sent;
136
- password = _yield$prompts2.password;
137
-
138
- if (!(!email || !password)) {
139
- _context.next = 18;
140
- break;
141
- }
142
-
143
- throw new Error("Missing email or password values. Aborting.");
144
-
145
- case 18:
146
- _context.next = 20;
147
- return getAuthToken(mcApiUrl, {
148
- email: email,
149
- password: password
150
- });
151
-
152
- case 20:
153
- credentials = _context.sent;
154
- credentialsStorage.setToken(mcApiUrl, credentials);
155
- console.log(chalk__default["default"].green("Login successful.\n"));
156
-
157
- case 23:
158
- case "end":
159
- return _context.stop();
160
- }
161
- }
162
- }, _callee);
163
- }));
164
- return _run.apply(this, arguments);
165
- }
166
-
167
- exports["default"] = run;
@@ -1,70 +0,0 @@
1
- 'use strict';
2
-
3
- var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
4
- var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
5
- var http = require('http');
6
- var serveHandler = require('serve-handler');
7
- var paths = require('./paths-16823f56.cjs.dev.js');
8
- require('@babel/runtime-corejs3/core-js-stable/instance/find');
9
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
10
- require('fs');
11
- require('path');
12
-
13
- function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
14
-
15
- var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
16
- var http__default = /*#__PURE__*/_interopDefault(http);
17
- var serveHandler__default = /*#__PURE__*/_interopDefault(serveHandler);
18
-
19
- var port = 3001;
20
-
21
- function run() {
22
- return _run.apply(this, arguments);
23
- }
24
-
25
- function _run() {
26
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
27
- var server;
28
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
29
- while (1) {
30
- switch (_context.prev = _context.next) {
31
- case 0:
32
- server = http__default["default"].createServer(function (request, response) {
33
- // You pass two more arguments for config and middleware
34
- // More details here: https://github.com/vercel/serve-handler#options
35
- return serveHandler__default["default"](request, response, {
36
- public: paths.paths.appBuild,
37
- rewrites: [{
38
- source: '/favicon*',
39
- destination: '/favicon.png'
40
- }, {
41
- source: '/login*',
42
- destination: '/login.html'
43
- }, {
44
- source: '/logout',
45
- destination: '/logout.html'
46
- }, {
47
- // Match all routes except for the login, logout, and favicon routes.
48
- // NOTE: this complex glob pattern would not be necessary if the rewrite
49
- // implementation would stop at the first match.
50
- // See https://github.com/vercel/serve-handler/issues/71
51
- source: '{/!(favicon|login|logout)*/**,/!(favicon|login|logout)*}',
52
- destination: '/index.html'
53
- }]
54
- });
55
- });
56
- server.listen(port, function () {
57
- console.log("Running at http://localhost:".concat(port));
58
- });
59
-
60
- case 2:
61
- case "end":
62
- return _context.stop();
63
- }
64
- }
65
- }, _callee);
66
- }));
67
- return _run.apply(this, arguments);
68
- }
69
-
70
- exports["default"] = run;
@@ -1,70 +0,0 @@
1
- 'use strict';
2
-
3
- var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
4
- var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
5
- var http = require('http');
6
- var serveHandler = require('serve-handler');
7
- var paths = require('./paths-76b66e74.cjs.prod.js');
8
- require('@babel/runtime-corejs3/core-js-stable/instance/find');
9
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
10
- require('fs');
11
- require('path');
12
-
13
- function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
14
-
15
- var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
16
- var http__default = /*#__PURE__*/_interopDefault(http);
17
- var serveHandler__default = /*#__PURE__*/_interopDefault(serveHandler);
18
-
19
- var port = 3001;
20
-
21
- function run() {
22
- return _run.apply(this, arguments);
23
- }
24
-
25
- function _run() {
26
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
27
- var server;
28
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
29
- while (1) {
30
- switch (_context.prev = _context.next) {
31
- case 0:
32
- server = http__default["default"].createServer(function (request, response) {
33
- // You pass two more arguments for config and middleware
34
- // More details here: https://github.com/vercel/serve-handler#options
35
- return serveHandler__default["default"](request, response, {
36
- public: paths.paths.appBuild,
37
- rewrites: [{
38
- source: '/favicon*',
39
- destination: '/favicon.png'
40
- }, {
41
- source: '/login*',
42
- destination: '/login.html'
43
- }, {
44
- source: '/logout',
45
- destination: '/logout.html'
46
- }, {
47
- // Match all routes except for the login, logout, and favicon routes.
48
- // NOTE: this complex glob pattern would not be necessary if the rewrite
49
- // implementation would stop at the first match.
50
- // See https://github.com/vercel/serve-handler/issues/71
51
- source: '{/!(favicon|login|logout)*/**,/!(favicon|login|logout)*}',
52
- destination: '/index.html'
53
- }]
54
- });
55
- });
56
- server.listen(port, function () {
57
- console.log("Running at http://localhost:".concat(port));
58
- });
59
-
60
- case 2:
61
- case "end":
62
- return _context.stop();
63
- }
64
- }
65
- }, _callee);
66
- }));
67
- return _run.apply(this, arguments);
68
- }
69
-
70
- exports["default"] = run;
@@ -1,62 +0,0 @@
1
- import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
2
- import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
3
- import http from 'http';
4
- import serveHandler from 'serve-handler';
5
- import { p as paths } from './paths-ed23d5a1.esm.js';
6
- import '@babel/runtime-corejs3/core-js-stable/instance/find';
7
- import '@babel/runtime-corejs3/core-js-stable/instance/concat';
8
- import 'fs';
9
- import 'path';
10
-
11
- var port = 3001;
12
-
13
- function run() {
14
- return _run.apply(this, arguments);
15
- }
16
-
17
- function _run() {
18
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
19
- var server;
20
- return _regeneratorRuntime.wrap(function _callee$(_context) {
21
- while (1) {
22
- switch (_context.prev = _context.next) {
23
- case 0:
24
- server = http.createServer(function (request, response) {
25
- // You pass two more arguments for config and middleware
26
- // More details here: https://github.com/vercel/serve-handler#options
27
- return serveHandler(request, response, {
28
- public: paths.appBuild,
29
- rewrites: [{
30
- source: '/favicon*',
31
- destination: '/favicon.png'
32
- }, {
33
- source: '/login*',
34
- destination: '/login.html'
35
- }, {
36
- source: '/logout',
37
- destination: '/logout.html'
38
- }, {
39
- // Match all routes except for the login, logout, and favicon routes.
40
- // NOTE: this complex glob pattern would not be necessary if the rewrite
41
- // implementation would stop at the first match.
42
- // See https://github.com/vercel/serve-handler/issues/71
43
- source: '{/!(favicon|login|logout)*/**,/!(favicon|login|logout)*}',
44
- destination: '/index.html'
45
- }]
46
- });
47
- });
48
- server.listen(port, function () {
49
- console.log("Running at http://localhost:".concat(port));
50
- });
51
-
52
- case 2:
53
- case "end":
54
- return _context.stop();
55
- }
56
- }
57
- }, _callee);
58
- }));
59
- return _run.apply(this, arguments);
60
- }
61
-
62
- export { run as default };