@naturalcycles/dev-lib 16.6.2 → 16.6.3
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/dist/bin/dev-lib.js +0 -18
- package/package.json +1 -1
package/dist/bin/dev-lib.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const node_os_1 = tslib_1.__importDefault(require("node:os"));
|
|
6
4
|
const prompts_1 = require("@inquirer/prompts");
|
|
7
5
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
8
6
|
const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
|
|
@@ -113,7 +111,6 @@ const commands = [
|
|
|
113
111
|
const commandMap = (0, js_lib_1._by)(commands.filter(c => !(c instanceof prompts_1.Separator)), c => c.name);
|
|
114
112
|
const { CI } = process.env;
|
|
115
113
|
(0, nodejs_lib_1.runScript)(async () => {
|
|
116
|
-
logEnvironment();
|
|
117
114
|
let cmd = process.argv.find(s => commandMap[s] && !commandMap[s].interactiveOnly);
|
|
118
115
|
if (!cmd) {
|
|
119
116
|
// interactive mode
|
|
@@ -146,18 +143,3 @@ async function bt() {
|
|
|
146
143
|
async function tscAll() {
|
|
147
144
|
await (0, build_util_1.runTSCInFolders)(['.', 'scripts', 'e2e'], ['--noEmit']);
|
|
148
145
|
}
|
|
149
|
-
function logEnvironment() {
|
|
150
|
-
const { platform, arch, versions: { node }, env: { CPU_LIMIT, NODE_OPTIONS = 'not defined' }, } = process;
|
|
151
|
-
const cpuLimit = Number(CPU_LIMIT) || undefined;
|
|
152
|
-
const availableParallelism = node_os_1.default.availableParallelism?.();
|
|
153
|
-
const cpus = node_os_1.default.cpus().length;
|
|
154
|
-
console.log((0, nodejs_lib_1.dimGrey)(Object.entries({
|
|
155
|
-
node: `${node} ${platform} ${arch}`,
|
|
156
|
-
NODE_OPTIONS,
|
|
157
|
-
cpus,
|
|
158
|
-
availableParallelism,
|
|
159
|
-
cpuLimit,
|
|
160
|
-
})
|
|
161
|
-
.map(([k, v]) => `${k}: ${v}`)
|
|
162
|
-
.join(', ')));
|
|
163
|
-
}
|