@atlaspack/create-react-app 2.14.5-dev-swc44-53cdb819f.0 → 2.14.5-dev-ce9f111cb.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/lib/cli.js +13 -9
- package/lib/emoji.js +0 -1
- package/package.json +6 -6
package/lib/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _commander() {
|
|
4
|
-
const data =
|
|
4
|
+
const data = require("commander");
|
|
5
5
|
_commander = function () {
|
|
6
6
|
return data;
|
|
7
7
|
};
|
|
@@ -57,9 +57,9 @@ function _promiseSpawn() {
|
|
|
57
57
|
};
|
|
58
58
|
return data;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function _rimraf2() {
|
|
61
61
|
const data = _interopRequireDefault(require("rimraf"));
|
|
62
|
-
|
|
62
|
+
_rimraf2 = function () {
|
|
63
63
|
return data;
|
|
64
64
|
};
|
|
65
65
|
return data;
|
|
@@ -79,9 +79,8 @@ function _chalk() {
|
|
|
79
79
|
return data;
|
|
80
80
|
}
|
|
81
81
|
var emoji = _interopRequireWildcard(require("./emoji"));
|
|
82
|
-
function
|
|
83
|
-
function
|
|
84
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
82
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
83
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
85
84
|
// flowlint-next-line untyped-import:off
|
|
86
85
|
|
|
87
86
|
// flowlint-next-line untyped-import:off
|
|
@@ -92,12 +91,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
92
91
|
|
|
93
92
|
// flowlint-next-line untyped-import:off
|
|
94
93
|
// @ts-expect-error TS7016
|
|
94
|
+
|
|
95
|
+
// @ts-expect-error TS7016
|
|
96
|
+
|
|
95
97
|
// @ts-expect-error TS7016
|
|
98
|
+
|
|
96
99
|
const TEMPLATES_DIR = _path().default.resolve(__dirname, '../templates');
|
|
97
100
|
const ncp = (0, _util().promisify)(_ncp2().default);
|
|
101
|
+
const rimraf = (0, _util().promisify)(_rimraf2().default);
|
|
98
102
|
// eslint-disable-next-line no-console
|
|
99
103
|
const log = console.log;
|
|
100
|
-
_commander().
|
|
104
|
+
const program = new (_commander().Command)();
|
|
105
|
+
program.name('create-react-app').version(_package.version).arguments('<path-to-new-app>').action(command => {
|
|
101
106
|
run(command).catch(reason => {
|
|
102
107
|
// eslint-disable-next-line no-console
|
|
103
108
|
console.error((0, _chalk().default)`${emoji.error} {red ${reason.message}}`);
|
|
@@ -113,8 +118,7 @@ async function run(packagePath) {
|
|
|
113
118
|
try {
|
|
114
119
|
await createApp(_path().default.basename(packagePath), tempPath);
|
|
115
120
|
} catch (e) {
|
|
116
|
-
|
|
117
|
-
await (0, _rimraf().default)(tempPath);
|
|
121
|
+
await rimraf(tempPath);
|
|
118
122
|
throw e;
|
|
119
123
|
}
|
|
120
124
|
await _fs().default.promises.rename(tempPath, packagePath);
|
package/lib/emoji.js
CHANGED
|
@@ -10,7 +10,6 @@ function isUnicodeSupported() {
|
|
|
10
10
|
if (process.platform !== 'win32') {
|
|
11
11
|
return process.env.TERM !== 'linux'; // Linux console (kernel)
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) ||
|
|
15
14
|
// Windows Terminal
|
|
16
15
|
process.env.ConEmuTask === '{cmd::Cmder}' ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/create-react-app",
|
|
3
|
-
"version": "2.14.5-dev-
|
|
3
|
+
"version": "2.14.5-dev-ce9f111cb.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"atlaspack-create-react-app": "lib/bin.js"
|
|
6
6
|
},
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"@npmcli/promise-spawn": "^1.3.2",
|
|
30
30
|
"chalk": "^2.4.2",
|
|
31
31
|
"command-exists": "^1.2.6",
|
|
32
|
-
"commander": "^
|
|
32
|
+
"commander": "^8.3.0",
|
|
33
33
|
"ncp": "^2.0.0",
|
|
34
|
-
"rimraf": "^
|
|
34
|
+
"rimraf": "^3.0.2",
|
|
35
35
|
"simple-git": "^3.21.0",
|
|
36
36
|
"tempy": "^0.2.1",
|
|
37
37
|
"v8-compile-cache": "^2.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@atlaspack/babel-register": "2.14.5-dev-
|
|
40
|
+
"@atlaspack/babel-register": "2.14.5-dev-ce9f111cb.0",
|
|
41
41
|
"@babel/core": "^7.22.11",
|
|
42
|
-
"rimraf": "^
|
|
42
|
+
"rimraf": "^3.0.2"
|
|
43
43
|
},
|
|
44
44
|
"type": "commonjs",
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ce9f111cb9f9e852c6a0fdaa8f72308d365fe823"
|
|
46
46
|
}
|