@commercetools-frontend/mc-scripts 21.7.0 → 21.9.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.
- package/LICENSE +1 -1
- package/README.md +1 -42
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.d.ts +1 -0
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +7 -0
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.js +7 -0
- package/{build/config/application-runtime.js → application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js} +2 -2
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +5 -0
- package/application-runtime/package.json +4 -0
- package/bin/cli.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.d.ts +1 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +361 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.js +7 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +361 -0
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +345 -0
- package/cli/package.json +4 -0
- package/config/create-webpack-config-for-development.js +7 -1
- package/config/create-webpack-config-for-production.js +7 -1
- package/config/vendors-to-transpile.js +5 -1
- package/dist/build-5357ad26.cjs.prod.js +224 -0
- package/dist/build-9b6d7eee.cjs.dev.js +224 -0
- package/dist/build-c483e87f.esm.js +209 -0
- package/dist/build-vite-3b82522e.cjs.dev.js +151 -0
- package/dist/build-vite-93abdc95.esm.js +139 -0
- package/dist/build-vite-b7cd993a.cjs.prod.js +151 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.d.ts +1 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +30 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.js +7 -0
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +30 -0
- package/dist/commercetools-frontend-mc-scripts.esm.js +22 -0
- package/dist/compile-html-4361a0b3.esm.js +77 -0
- package/dist/compile-html-d6331c35.cjs.prod.js +87 -0
- package/dist/compile-html-d9e731aa.cjs.dev.js +87 -0
- package/dist/config-sync-6b31d972.esm.js +840 -0
- package/dist/config-sync-a478bc0f.cjs.dev.js +864 -0
- package/dist/config-sync-f07734e4.cjs.prod.js +859 -0
- package/{build/config/create-postcss-config.js → dist/create-postcss-config-04243dea.esm.js} +27 -25
- package/dist/create-postcss-config-760e2dc5.cjs.dev.js +90 -0
- package/dist/create-postcss-config-ddc3abee.cjs.prod.js +90 -0
- package/dist/create-webpack-config-for-development-76fdab59.cjs.prod.js +419 -0
- package/{build/config/create-webpack-config-for-development.js → dist/create-webpack-config-for-development-d93ae4b2.esm.js} +94 -57
- package/dist/create-webpack-config-for-development-dfd1c174.cjs.dev.js +419 -0
- package/{build/config/create-webpack-config-for-production.js → dist/create-webpack-config-for-production-9290479a.esm.js} +120 -54
- package/dist/create-webpack-config-for-production-bc8c1f37.cjs.dev.js +469 -0
- package/dist/create-webpack-config-for-production-d652ad1a.cjs.prod.js +469 -0
- package/dist/declarations/src/application-runtime.d.ts +1 -0
- package/dist/declarations/src/cli.d.ts +4 -0
- package/dist/declarations/src/commands/build-vite.d.ts +2 -0
- package/dist/declarations/src/commands/build.d.ts +2 -0
- package/dist/declarations/src/commands/compile-html.d.ts +3 -0
- package/dist/declarations/src/commands/config-sync.d.ts +3 -0
- package/dist/declarations/src/commands/login.d.ts +2 -0
- package/dist/declarations/src/commands/serve.d.ts +2 -0
- package/dist/declarations/src/commands/start-vite.d.ts +2 -0
- package/dist/declarations/src/commands/start.d.ts +2 -0
- package/dist/declarations/src/config/create-postcss-config.d.ts +4 -0
- package/dist/declarations/src/config/create-webpack-config-for-development.d.ts +10 -0
- package/dist/declarations/src/config/create-webpack-config-for-production.d.ts +10 -0
- package/dist/declarations/src/config/has-jsx-runtime.d.ts +2 -0
- package/dist/declarations/src/config/moment-locales.d.ts +2 -0
- package/dist/declarations/src/config/paths.d.ts +12 -0
- package/dist/declarations/src/config/vendors-to-transpile.d.ts +2 -0
- package/dist/declarations/src/config/webpack-dev-server.config.d.ts +6 -0
- package/dist/declarations/src/deprecated-entry-points.d.ts +7 -0
- package/dist/declarations/src/generated/core.d.ts +710 -0
- package/dist/declarations/src/generated/settings.d.ts +2485 -0
- package/dist/declarations/src/index.d.ts +3 -0
- package/dist/declarations/src/postcss.d.ts +1 -0
- package/dist/declarations/src/types.d.ts +82 -0
- package/dist/declarations/src/utils/auth.d.ts +6 -0
- package/dist/declarations/src/utils/credentials-storage.d.ts +11 -0
- package/dist/declarations/src/utils/get-config-diff.d.ts +3 -0
- package/dist/declarations/src/utils/graphql-requests.d.ts +80 -0
- package/dist/declarations/src/utils/user-agent.d.ts +2 -0
- package/dist/declarations/src/version.d.ts +2 -0
- package/dist/declarations/src/vite-plugins/vite-plugin-custom-application.d.ts +4 -0
- package/dist/declarations/src/vite-plugins/vite-plugin-dynamic-base-assets-globals.d.ts +3 -0
- package/dist/declarations/src/vite-plugins/vite-plugin-svgr.d.ts +3 -0
- package/dist/declarations/src/webpack-plugins/final-stats-writer-plugin.d.ts +12 -0
- package/dist/declarations/src/webpack-plugins/local-html-webpack-plugin.d.ts +5 -0
- package/dist/declarations/src/webpack.d.ts +2 -0
- package/dist/has-jsx-runtime-0b03b72e.cjs.prod.js +17 -0
- package/dist/has-jsx-runtime-3d4bb633.cjs.dev.js +17 -0
- package/{build/config/has-jsx-runtime.js → dist/has-jsx-runtime-8314226e.esm.js} +1 -3
- package/dist/login-7b7ae27e.esm.js +155 -0
- package/dist/login-b13f26e7.cjs.dev.js +165 -0
- package/dist/login-c11fb977.cjs.prod.js +165 -0
- package/dist/package-4b4fcf02.cjs.prod.js +139 -0
- package/dist/package-4c3e3fb7.cjs.dev.js +139 -0
- package/dist/package-8e6305bd.esm.js +137 -0
- package/dist/paths-16823f56.cjs.dev.js +55 -0
- package/dist/paths-76b66e74.cjs.prod.js +55 -0
- package/dist/paths-ed23d5a1.esm.js +46 -0
- package/dist/serve-12de323b.cjs.dev.js +70 -0
- package/dist/serve-784f4fcd.cjs.prod.js +70 -0
- package/dist/serve-d6b437b1.esm.js +62 -0
- package/dist/start-1b7dad90.cjs.prod.js +209 -0
- package/dist/start-45ca01f2.cjs.dev.js +209 -0
- package/dist/start-600d06a3.esm.js +194 -0
- package/dist/start-vite-22de08dc.cjs.dev.js +151 -0
- package/dist/start-vite-dc046cba.esm.js +138 -0
- package/dist/start-vite-fe13330b.cjs.prod.js +151 -0
- package/dist/user-agent-5f8ec93d.cjs.prod.js +106 -0
- package/dist/user-agent-ca628320.esm.js +94 -0
- package/dist/user-agent-ee57c98a.cjs.dev.js +106 -0
- package/dist/vendors-to-transpile-367e0ba8.cjs.prod.js +5 -0
- package/dist/vendors-to-transpile-68e03526.esm.js +3 -0
- package/dist/vendors-to-transpile-b51af5d3.cjs.dev.js +5 -0
- package/dist/vite-plugin-svgr-4205f2b5.cjs.dev.js +110 -0
- package/dist/vite-plugin-svgr-eb8524fa.esm.js +85 -0
- package/dist/vite-plugin-svgr-f3bbedbe.cjs.prod.js +110 -0
- package/package.json +56 -50
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.d.ts +1 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +14 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.js +7 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +14 -0
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +6 -0
- package/postcss/package.json +4 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.d.ts +1 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +51 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.js +7 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +51 -0
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +42 -0
- package/webpack/package.json +4 -0
- package/build/bin/cli.js +0 -264
- package/build/commands/build-vite.js +0 -91
- package/build/commands/build.js +0 -140
- package/build/commands/compile-html.js +0 -53
- package/build/commands/config-sync.js +0 -176
- package/build/commands/login.js +0 -60
- package/build/commands/serve.js +0 -37
- package/build/commands/start-vite.js +0 -138
- package/build/commands/start.js +0 -108
- package/build/config/paths.js +0 -38
- package/build/config/vendors-to-transpile.js +0 -3
- package/build/config/webpack-dev-server.config.js +0 -69
- package/build/index.js +0 -16
- package/build/utils/auth.js +0 -34
- package/build/utils/auth.spec.js +0 -61
- package/build/utils/create-custom-application.settings.graphql +0 -8
- package/build/utils/credentials-storage.js +0 -72
- package/build/utils/credentials-storage.spec.js +0 -69
- package/build/utils/fetch-custom-application.settings.graphql +0 -36
- package/build/utils/fetch-user-organizations.core.graphql +0 -9
- package/build/utils/get-config-diff.js +0 -308
- package/build/utils/get-config-diff.spec.js +0 -285
- package/build/utils/graphql-requests.js +0 -105
- package/build/utils/graphql-requests.spec.js +0 -159
- package/build/utils/require-graphql.js +0 -15
- package/build/utils/update-custom-application.settings.graphql +0 -13
- package/build/utils/user-agent.js +0 -15
- package/build/webpack-plugins/final-stats-writer-plugin.js +0 -50
- package/build/webpack-plugins/local-html-webpack-plugin.js +0 -38
|
@@ -0,0 +1,165 @@
|
|
|
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-5f8ec93d.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-4b4fcf02.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
|
+
|
|
105
|
+
if (!credentialsStorage.isSessionValid(mcApiUrl)) {
|
|
106
|
+
_context.next = 5;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
console.log("You already have a valid session for the ".concat(mcApiUrl, " environment.\n"));
|
|
111
|
+
return _context.abrupt("return");
|
|
112
|
+
|
|
113
|
+
case 5:
|
|
114
|
+
console.log(chalk__default["default"].gray("Enter the login credentials for the ".concat(mcApiUrl, " environment.\n")));
|
|
115
|
+
_context.next = 8;
|
|
116
|
+
return prompts__default["default"]({
|
|
117
|
+
type: 'text',
|
|
118
|
+
name: 'email',
|
|
119
|
+
message: 'Email'
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
case 8:
|
|
123
|
+
_yield$prompts = _context.sent;
|
|
124
|
+
email = _yield$prompts.email;
|
|
125
|
+
_context.next = 12;
|
|
126
|
+
return prompts__default["default"]({
|
|
127
|
+
type: 'invisible',
|
|
128
|
+
name: 'password',
|
|
129
|
+
message: 'Password (hidden)'
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
case 12:
|
|
133
|
+
_yield$prompts2 = _context.sent;
|
|
134
|
+
password = _yield$prompts2.password;
|
|
135
|
+
|
|
136
|
+
if (!(!email || !password)) {
|
|
137
|
+
_context.next = 16;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
throw new Error("Missing email or password values. Aborting.");
|
|
142
|
+
|
|
143
|
+
case 16:
|
|
144
|
+
_context.next = 18;
|
|
145
|
+
return getAuthToken(mcApiUrl, {
|
|
146
|
+
email: email,
|
|
147
|
+
password: password
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
case 18:
|
|
151
|
+
credentials = _context.sent;
|
|
152
|
+
credentialsStorage.setToken(mcApiUrl, credentials);
|
|
153
|
+
console.log(chalk__default["default"].green("Login successful.\n"));
|
|
154
|
+
|
|
155
|
+
case 21:
|
|
156
|
+
case "end":
|
|
157
|
+
return _context.stop();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, _callee);
|
|
161
|
+
}));
|
|
162
|
+
return _run.apply(this, arguments);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
exports["default"] = run;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var pkgJson = {
|
|
4
|
+
name: "@commercetools-frontend/mc-scripts",
|
|
5
|
+
version: "21.9.0",
|
|
6
|
+
description: "Configuration and scripts for developing a MC application",
|
|
7
|
+
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
8
|
+
repository: {
|
|
9
|
+
type: "git",
|
|
10
|
+
url: "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
11
|
+
directory: "packages/mc-scripts"
|
|
12
|
+
},
|
|
13
|
+
homepage: "https://docs.commercetools.com/custom-applications",
|
|
14
|
+
keywords: [
|
|
15
|
+
"javascript",
|
|
16
|
+
"frontend",
|
|
17
|
+
"react",
|
|
18
|
+
"toolkit"
|
|
19
|
+
],
|
|
20
|
+
license: "MIT",
|
|
21
|
+
publishConfig: {
|
|
22
|
+
access: "public"
|
|
23
|
+
},
|
|
24
|
+
main: "dist/commercetools-frontend-mc-scripts.cjs.js",
|
|
25
|
+
module: "dist/commercetools-frontend-mc-scripts.esm.js",
|
|
26
|
+
preconstruct: {
|
|
27
|
+
entrypoints: [
|
|
28
|
+
"./index.ts",
|
|
29
|
+
"./application-runtime.ts",
|
|
30
|
+
"./cli.ts",
|
|
31
|
+
"./postcss.ts",
|
|
32
|
+
"./webpack.ts"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
files: [
|
|
36
|
+
"bin",
|
|
37
|
+
"cli",
|
|
38
|
+
"dist",
|
|
39
|
+
"config",
|
|
40
|
+
"application-runtime",
|
|
41
|
+
"postcss",
|
|
42
|
+
"webpack",
|
|
43
|
+
"package.json",
|
|
44
|
+
"LICENSE",
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
47
|
+
bin: "./bin/cli.js",
|
|
48
|
+
browserslist: {
|
|
49
|
+
production: [
|
|
50
|
+
">1%",
|
|
51
|
+
"not op_mini all",
|
|
52
|
+
"not dead"
|
|
53
|
+
],
|
|
54
|
+
development: [
|
|
55
|
+
"last 2 firefox versions",
|
|
56
|
+
"last 2 chrome versions"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
dependencies: {
|
|
60
|
+
"@babel/core": "^7.18.6",
|
|
61
|
+
"@babel/runtime": "^7.18.6",
|
|
62
|
+
"@babel/runtime-corejs3": "^7.18.6",
|
|
63
|
+
"@commercetools-frontend/application-config": "21.9.0",
|
|
64
|
+
"@commercetools-frontend/assets": "21.9.0",
|
|
65
|
+
"@commercetools-frontend/babel-preset-mc-app": "21.9.0",
|
|
66
|
+
"@commercetools-frontend/constants": "21.9.0",
|
|
67
|
+
"@commercetools-frontend/mc-dev-authentication": "21.9.0",
|
|
68
|
+
"@commercetools-frontend/mc-html-template": "21.9.0",
|
|
69
|
+
"@commercetools/http-user-agent": "2.1.2",
|
|
70
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
|
71
|
+
"@rollup/plugin-graphql": "1.1.0",
|
|
72
|
+
"@rollup/pluginutils": "4.2.1",
|
|
73
|
+
"@svgr/babel-preset": "^6.2.0",
|
|
74
|
+
"@svgr/core": "^6.2.1",
|
|
75
|
+
"@svgr/webpack": "^6.2.1",
|
|
76
|
+
"@types/prompts": "^2.0.14",
|
|
77
|
+
"@types/svgo": "^2.6.3",
|
|
78
|
+
"@vitejs/plugin-react": "2.0.0",
|
|
79
|
+
autoprefixer: "^10.4.7",
|
|
80
|
+
"babel-loader": "8.2.5",
|
|
81
|
+
browserslist: "^4.20.2",
|
|
82
|
+
cac: "6.7.12",
|
|
83
|
+
chalk: "4.1.2",
|
|
84
|
+
"core-js": "^3.23.4",
|
|
85
|
+
"css-loader": "6.7.1",
|
|
86
|
+
"css-minimizer-webpack-plugin": "3.4.1",
|
|
87
|
+
dotenv: "16.0.0",
|
|
88
|
+
"dotenv-expand": "8.0.3",
|
|
89
|
+
"fs-extra": "10.1.0",
|
|
90
|
+
"graphql-request": "^4.3.0",
|
|
91
|
+
"graphql-tag": "^2.12.6",
|
|
92
|
+
"html-webpack-plugin": "5.5.0",
|
|
93
|
+
"json-loader": "0.5.7",
|
|
94
|
+
lodash: "4.17.21",
|
|
95
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
96
|
+
"moment-locales-webpack-plugin": "1.2.0",
|
|
97
|
+
"node-fetch": "2.6.7",
|
|
98
|
+
postcss: "8.4.14",
|
|
99
|
+
"postcss-custom-media": "8.0.0",
|
|
100
|
+
"postcss-custom-properties": "12.1.4",
|
|
101
|
+
"postcss-import": "14.1.0",
|
|
102
|
+
"postcss-loader": "6.2.1",
|
|
103
|
+
"postcss-reporter": "7.0.5",
|
|
104
|
+
prettier: "2.6.2",
|
|
105
|
+
prompts: "^2.4.2",
|
|
106
|
+
"querystring-es3": "^0.2.1",
|
|
107
|
+
rcfile: "1.0.3",
|
|
108
|
+
"react-dev-utils": "12.0.1",
|
|
109
|
+
"react-refresh": "0.13.0",
|
|
110
|
+
"serve-handler": "6.1.3",
|
|
111
|
+
shelljs: "0.8.5",
|
|
112
|
+
"style-loader": "3.3.1",
|
|
113
|
+
"svg-url-loader": "7.1.1",
|
|
114
|
+
"terser-webpack-plugin": "5.3.1",
|
|
115
|
+
"thread-loader": "3.0.4",
|
|
116
|
+
url: "^0.11.0",
|
|
117
|
+
vite: "3.0.0",
|
|
118
|
+
webpack: "5.72.0",
|
|
119
|
+
"webpack-bundle-analyzer": "4.5.0",
|
|
120
|
+
"webpack-dev-server": "4.9.0",
|
|
121
|
+
webpackbar: "5.0.2"
|
|
122
|
+
},
|
|
123
|
+
devDependencies: {
|
|
124
|
+
"@tsconfig/node16": "^1.0.3",
|
|
125
|
+
"@types/lodash": "^4.14.182",
|
|
126
|
+
"@types/mock-fs": "^4.13.1",
|
|
127
|
+
"@types/moment-locales-webpack-plugin": "^1.2.3",
|
|
128
|
+
"@types/node-fetch": "2.6.2",
|
|
129
|
+
"@types/serve-handler": "^6.1.1",
|
|
130
|
+
"mock-fs": "^5.1.2",
|
|
131
|
+
msw: "0.44.0",
|
|
132
|
+
rimraf: "3.0.2"
|
|
133
|
+
},
|
|
134
|
+
engines: {
|
|
135
|
+
node: ">=14"
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.pkgJson = pkgJson;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var pkgJson = {
|
|
4
|
+
name: "@commercetools-frontend/mc-scripts",
|
|
5
|
+
version: "21.9.0",
|
|
6
|
+
description: "Configuration and scripts for developing a MC application",
|
|
7
|
+
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
8
|
+
repository: {
|
|
9
|
+
type: "git",
|
|
10
|
+
url: "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
11
|
+
directory: "packages/mc-scripts"
|
|
12
|
+
},
|
|
13
|
+
homepage: "https://docs.commercetools.com/custom-applications",
|
|
14
|
+
keywords: [
|
|
15
|
+
"javascript",
|
|
16
|
+
"frontend",
|
|
17
|
+
"react",
|
|
18
|
+
"toolkit"
|
|
19
|
+
],
|
|
20
|
+
license: "MIT",
|
|
21
|
+
publishConfig: {
|
|
22
|
+
access: "public"
|
|
23
|
+
},
|
|
24
|
+
main: "dist/commercetools-frontend-mc-scripts.cjs.js",
|
|
25
|
+
module: "dist/commercetools-frontend-mc-scripts.esm.js",
|
|
26
|
+
preconstruct: {
|
|
27
|
+
entrypoints: [
|
|
28
|
+
"./index.ts",
|
|
29
|
+
"./application-runtime.ts",
|
|
30
|
+
"./cli.ts",
|
|
31
|
+
"./postcss.ts",
|
|
32
|
+
"./webpack.ts"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
files: [
|
|
36
|
+
"bin",
|
|
37
|
+
"cli",
|
|
38
|
+
"dist",
|
|
39
|
+
"config",
|
|
40
|
+
"application-runtime",
|
|
41
|
+
"postcss",
|
|
42
|
+
"webpack",
|
|
43
|
+
"package.json",
|
|
44
|
+
"LICENSE",
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
47
|
+
bin: "./bin/cli.js",
|
|
48
|
+
browserslist: {
|
|
49
|
+
production: [
|
|
50
|
+
">1%",
|
|
51
|
+
"not op_mini all",
|
|
52
|
+
"not dead"
|
|
53
|
+
],
|
|
54
|
+
development: [
|
|
55
|
+
"last 2 firefox versions",
|
|
56
|
+
"last 2 chrome versions"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
dependencies: {
|
|
60
|
+
"@babel/core": "^7.18.6",
|
|
61
|
+
"@babel/runtime": "^7.18.6",
|
|
62
|
+
"@babel/runtime-corejs3": "^7.18.6",
|
|
63
|
+
"@commercetools-frontend/application-config": "21.9.0",
|
|
64
|
+
"@commercetools-frontend/assets": "21.9.0",
|
|
65
|
+
"@commercetools-frontend/babel-preset-mc-app": "21.9.0",
|
|
66
|
+
"@commercetools-frontend/constants": "21.9.0",
|
|
67
|
+
"@commercetools-frontend/mc-dev-authentication": "21.9.0",
|
|
68
|
+
"@commercetools-frontend/mc-html-template": "21.9.0",
|
|
69
|
+
"@commercetools/http-user-agent": "2.1.2",
|
|
70
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
|
71
|
+
"@rollup/plugin-graphql": "1.1.0",
|
|
72
|
+
"@rollup/pluginutils": "4.2.1",
|
|
73
|
+
"@svgr/babel-preset": "^6.2.0",
|
|
74
|
+
"@svgr/core": "^6.2.1",
|
|
75
|
+
"@svgr/webpack": "^6.2.1",
|
|
76
|
+
"@types/prompts": "^2.0.14",
|
|
77
|
+
"@types/svgo": "^2.6.3",
|
|
78
|
+
"@vitejs/plugin-react": "2.0.0",
|
|
79
|
+
autoprefixer: "^10.4.7",
|
|
80
|
+
"babel-loader": "8.2.5",
|
|
81
|
+
browserslist: "^4.20.2",
|
|
82
|
+
cac: "6.7.12",
|
|
83
|
+
chalk: "4.1.2",
|
|
84
|
+
"core-js": "^3.23.4",
|
|
85
|
+
"css-loader": "6.7.1",
|
|
86
|
+
"css-minimizer-webpack-plugin": "3.4.1",
|
|
87
|
+
dotenv: "16.0.0",
|
|
88
|
+
"dotenv-expand": "8.0.3",
|
|
89
|
+
"fs-extra": "10.1.0",
|
|
90
|
+
"graphql-request": "^4.3.0",
|
|
91
|
+
"graphql-tag": "^2.12.6",
|
|
92
|
+
"html-webpack-plugin": "5.5.0",
|
|
93
|
+
"json-loader": "0.5.7",
|
|
94
|
+
lodash: "4.17.21",
|
|
95
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
96
|
+
"moment-locales-webpack-plugin": "1.2.0",
|
|
97
|
+
"node-fetch": "2.6.7",
|
|
98
|
+
postcss: "8.4.14",
|
|
99
|
+
"postcss-custom-media": "8.0.0",
|
|
100
|
+
"postcss-custom-properties": "12.1.4",
|
|
101
|
+
"postcss-import": "14.1.0",
|
|
102
|
+
"postcss-loader": "6.2.1",
|
|
103
|
+
"postcss-reporter": "7.0.5",
|
|
104
|
+
prettier: "2.6.2",
|
|
105
|
+
prompts: "^2.4.2",
|
|
106
|
+
"querystring-es3": "^0.2.1",
|
|
107
|
+
rcfile: "1.0.3",
|
|
108
|
+
"react-dev-utils": "12.0.1",
|
|
109
|
+
"react-refresh": "0.13.0",
|
|
110
|
+
"serve-handler": "6.1.3",
|
|
111
|
+
shelljs: "0.8.5",
|
|
112
|
+
"style-loader": "3.3.1",
|
|
113
|
+
"svg-url-loader": "7.1.1",
|
|
114
|
+
"terser-webpack-plugin": "5.3.1",
|
|
115
|
+
"thread-loader": "3.0.4",
|
|
116
|
+
url: "^0.11.0",
|
|
117
|
+
vite: "3.0.0",
|
|
118
|
+
webpack: "5.72.0",
|
|
119
|
+
"webpack-bundle-analyzer": "4.5.0",
|
|
120
|
+
"webpack-dev-server": "4.9.0",
|
|
121
|
+
webpackbar: "5.0.2"
|
|
122
|
+
},
|
|
123
|
+
devDependencies: {
|
|
124
|
+
"@tsconfig/node16": "^1.0.3",
|
|
125
|
+
"@types/lodash": "^4.14.182",
|
|
126
|
+
"@types/mock-fs": "^4.13.1",
|
|
127
|
+
"@types/moment-locales-webpack-plugin": "^1.2.3",
|
|
128
|
+
"@types/node-fetch": "2.6.2",
|
|
129
|
+
"@types/serve-handler": "^6.1.1",
|
|
130
|
+
"mock-fs": "^5.1.2",
|
|
131
|
+
msw: "0.44.0",
|
|
132
|
+
rimraf: "3.0.2"
|
|
133
|
+
},
|
|
134
|
+
engines: {
|
|
135
|
+
node: ">=14"
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.pkgJson = pkgJson;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
var pkgJson = {
|
|
2
|
+
name: "@commercetools-frontend/mc-scripts",
|
|
3
|
+
version: "21.9.0",
|
|
4
|
+
description: "Configuration and scripts for developing a MC application",
|
|
5
|
+
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
|
+
repository: {
|
|
7
|
+
type: "git",
|
|
8
|
+
url: "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
9
|
+
directory: "packages/mc-scripts"
|
|
10
|
+
},
|
|
11
|
+
homepage: "https://docs.commercetools.com/custom-applications",
|
|
12
|
+
keywords: [
|
|
13
|
+
"javascript",
|
|
14
|
+
"frontend",
|
|
15
|
+
"react",
|
|
16
|
+
"toolkit"
|
|
17
|
+
],
|
|
18
|
+
license: "MIT",
|
|
19
|
+
publishConfig: {
|
|
20
|
+
access: "public"
|
|
21
|
+
},
|
|
22
|
+
main: "dist/commercetools-frontend-mc-scripts.cjs.js",
|
|
23
|
+
module: "dist/commercetools-frontend-mc-scripts.esm.js",
|
|
24
|
+
preconstruct: {
|
|
25
|
+
entrypoints: [
|
|
26
|
+
"./index.ts",
|
|
27
|
+
"./application-runtime.ts",
|
|
28
|
+
"./cli.ts",
|
|
29
|
+
"./postcss.ts",
|
|
30
|
+
"./webpack.ts"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
files: [
|
|
34
|
+
"bin",
|
|
35
|
+
"cli",
|
|
36
|
+
"dist",
|
|
37
|
+
"config",
|
|
38
|
+
"application-runtime",
|
|
39
|
+
"postcss",
|
|
40
|
+
"webpack",
|
|
41
|
+
"package.json",
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"README.md"
|
|
44
|
+
],
|
|
45
|
+
bin: "./bin/cli.js",
|
|
46
|
+
browserslist: {
|
|
47
|
+
production: [
|
|
48
|
+
">1%",
|
|
49
|
+
"not op_mini all",
|
|
50
|
+
"not dead"
|
|
51
|
+
],
|
|
52
|
+
development: [
|
|
53
|
+
"last 2 firefox versions",
|
|
54
|
+
"last 2 chrome versions"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
dependencies: {
|
|
58
|
+
"@babel/core": "^7.18.6",
|
|
59
|
+
"@babel/runtime": "^7.18.6",
|
|
60
|
+
"@babel/runtime-corejs3": "^7.18.6",
|
|
61
|
+
"@commercetools-frontend/application-config": "21.9.0",
|
|
62
|
+
"@commercetools-frontend/assets": "21.9.0",
|
|
63
|
+
"@commercetools-frontend/babel-preset-mc-app": "21.9.0",
|
|
64
|
+
"@commercetools-frontend/constants": "21.9.0",
|
|
65
|
+
"@commercetools-frontend/mc-dev-authentication": "21.9.0",
|
|
66
|
+
"@commercetools-frontend/mc-html-template": "21.9.0",
|
|
67
|
+
"@commercetools/http-user-agent": "2.1.2",
|
|
68
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
|
69
|
+
"@rollup/plugin-graphql": "1.1.0",
|
|
70
|
+
"@rollup/pluginutils": "4.2.1",
|
|
71
|
+
"@svgr/babel-preset": "^6.2.0",
|
|
72
|
+
"@svgr/core": "^6.2.1",
|
|
73
|
+
"@svgr/webpack": "^6.2.1",
|
|
74
|
+
"@types/prompts": "^2.0.14",
|
|
75
|
+
"@types/svgo": "^2.6.3",
|
|
76
|
+
"@vitejs/plugin-react": "2.0.0",
|
|
77
|
+
autoprefixer: "^10.4.7",
|
|
78
|
+
"babel-loader": "8.2.5",
|
|
79
|
+
browserslist: "^4.20.2",
|
|
80
|
+
cac: "6.7.12",
|
|
81
|
+
chalk: "4.1.2",
|
|
82
|
+
"core-js": "^3.23.4",
|
|
83
|
+
"css-loader": "6.7.1",
|
|
84
|
+
"css-minimizer-webpack-plugin": "3.4.1",
|
|
85
|
+
dotenv: "16.0.0",
|
|
86
|
+
"dotenv-expand": "8.0.3",
|
|
87
|
+
"fs-extra": "10.1.0",
|
|
88
|
+
"graphql-request": "^4.3.0",
|
|
89
|
+
"graphql-tag": "^2.12.6",
|
|
90
|
+
"html-webpack-plugin": "5.5.0",
|
|
91
|
+
"json-loader": "0.5.7",
|
|
92
|
+
lodash: "4.17.21",
|
|
93
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
94
|
+
"moment-locales-webpack-plugin": "1.2.0",
|
|
95
|
+
"node-fetch": "2.6.7",
|
|
96
|
+
postcss: "8.4.14",
|
|
97
|
+
"postcss-custom-media": "8.0.0",
|
|
98
|
+
"postcss-custom-properties": "12.1.4",
|
|
99
|
+
"postcss-import": "14.1.0",
|
|
100
|
+
"postcss-loader": "6.2.1",
|
|
101
|
+
"postcss-reporter": "7.0.5",
|
|
102
|
+
prettier: "2.6.2",
|
|
103
|
+
prompts: "^2.4.2",
|
|
104
|
+
"querystring-es3": "^0.2.1",
|
|
105
|
+
rcfile: "1.0.3",
|
|
106
|
+
"react-dev-utils": "12.0.1",
|
|
107
|
+
"react-refresh": "0.13.0",
|
|
108
|
+
"serve-handler": "6.1.3",
|
|
109
|
+
shelljs: "0.8.5",
|
|
110
|
+
"style-loader": "3.3.1",
|
|
111
|
+
"svg-url-loader": "7.1.1",
|
|
112
|
+
"terser-webpack-plugin": "5.3.1",
|
|
113
|
+
"thread-loader": "3.0.4",
|
|
114
|
+
url: "^0.11.0",
|
|
115
|
+
vite: "3.0.0",
|
|
116
|
+
webpack: "5.72.0",
|
|
117
|
+
"webpack-bundle-analyzer": "4.5.0",
|
|
118
|
+
"webpack-dev-server": "4.9.0",
|
|
119
|
+
webpackbar: "5.0.2"
|
|
120
|
+
},
|
|
121
|
+
devDependencies: {
|
|
122
|
+
"@tsconfig/node16": "^1.0.3",
|
|
123
|
+
"@types/lodash": "^4.14.182",
|
|
124
|
+
"@types/mock-fs": "^4.13.1",
|
|
125
|
+
"@types/moment-locales-webpack-plugin": "^1.2.3",
|
|
126
|
+
"@types/node-fetch": "2.6.2",
|
|
127
|
+
"@types/serve-handler": "^6.1.1",
|
|
128
|
+
"mock-fs": "^5.1.2",
|
|
129
|
+
msw: "0.44.0",
|
|
130
|
+
rimraf: "3.0.2"
|
|
131
|
+
},
|
|
132
|
+
engines: {
|
|
133
|
+
node: ">=14"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { pkgJson as p };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
4
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
5
|
+
var fs = require('fs');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
11
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
12
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
13
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
14
|
+
|
|
15
|
+
var moduleFileExtensions = ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx']; // Make sure any symlinks in the project folder are resolved:
|
|
16
|
+
// https://github.com/facebook/create-react-app/issues/637
|
|
17
|
+
|
|
18
|
+
var appDirectory = fs__default["default"].realpathSync(process.cwd());
|
|
19
|
+
|
|
20
|
+
var resolveApp = function resolveApp(relativePath) {
|
|
21
|
+
return path__default["default"].resolve(appDirectory, relativePath);
|
|
22
|
+
}; // Resolve file paths in the order given
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var resolveModule = function resolveModule(resolveFn, filePath) {
|
|
26
|
+
var extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, function (extension) {
|
|
27
|
+
var _context;
|
|
28
|
+
|
|
29
|
+
return fs__default["default"].existsSync(resolveFn(_concatInstanceProperty__default["default"](_context = "".concat(filePath, ".")).call(_context, extension)));
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (extension) {
|
|
33
|
+
var _context2;
|
|
34
|
+
|
|
35
|
+
return resolveFn(_concatInstanceProperty__default["default"](_context2 = "".concat(filePath, ".")).call(_context2, extension));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return resolveFn("".concat(filePath, ".js"));
|
|
39
|
+
}; // Resolve the absolute path of the caller location. This is necessary
|
|
40
|
+
// to point to files within that folder.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
var paths = {
|
|
44
|
+
appPackageJson: resolveApp('package.json'),
|
|
45
|
+
appBuild: resolveApp('public'),
|
|
46
|
+
appIndexHtmlTemplate: resolveApp('public/index.html.template'),
|
|
47
|
+
appIndexHtml: resolveApp('public/index.html'),
|
|
48
|
+
appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat(process.env.NODE_ENV === 'production' ? 'prod' : 'dev')),
|
|
49
|
+
yarnLockFile: resolveApp('yarn.lock'),
|
|
50
|
+
appRoot: resolveApp('.'),
|
|
51
|
+
entryPoint: resolveModule(resolveApp, 'src/index'),
|
|
52
|
+
sourceFolders: [resolveApp('src')]
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.paths = paths;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
4
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
5
|
+
var fs = require('fs');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
11
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
12
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
13
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
14
|
+
|
|
15
|
+
var moduleFileExtensions = ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx']; // Make sure any symlinks in the project folder are resolved:
|
|
16
|
+
// https://github.com/facebook/create-react-app/issues/637
|
|
17
|
+
|
|
18
|
+
var appDirectory = fs__default["default"].realpathSync(process.cwd());
|
|
19
|
+
|
|
20
|
+
var resolveApp = function resolveApp(relativePath) {
|
|
21
|
+
return path__default["default"].resolve(appDirectory, relativePath);
|
|
22
|
+
}; // Resolve file paths in the order given
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var resolveModule = function resolveModule(resolveFn, filePath) {
|
|
26
|
+
var extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, function (extension) {
|
|
27
|
+
var _context;
|
|
28
|
+
|
|
29
|
+
return fs__default["default"].existsSync(resolveFn(_concatInstanceProperty__default["default"](_context = "".concat(filePath, ".")).call(_context, extension)));
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (extension) {
|
|
33
|
+
var _context2;
|
|
34
|
+
|
|
35
|
+
return resolveFn(_concatInstanceProperty__default["default"](_context2 = "".concat(filePath, ".")).call(_context2, extension));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return resolveFn("".concat(filePath, ".js"));
|
|
39
|
+
}; // Resolve the absolute path of the caller location. This is necessary
|
|
40
|
+
// to point to files within that folder.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
var paths = {
|
|
44
|
+
appPackageJson: resolveApp('package.json'),
|
|
45
|
+
appBuild: resolveApp('public'),
|
|
46
|
+
appIndexHtmlTemplate: resolveApp('public/index.html.template'),
|
|
47
|
+
appIndexHtml: resolveApp('public/index.html'),
|
|
48
|
+
appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat('prod' )),
|
|
49
|
+
yarnLockFile: resolveApp('yarn.lock'),
|
|
50
|
+
appRoot: resolveApp('.'),
|
|
51
|
+
entryPoint: resolveModule(resolveApp, 'src/index'),
|
|
52
|
+
sourceFolders: [resolveApp('src')]
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.paths = paths;
|