@pnpm/default-reporter 8.5.14 → 8.5.15
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.
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
@@ -10,7 +33,7 @@ const reportDeprecations_1 = __importDefault(require("./reportDeprecations"));
|
|
|
10
33
|
const reportHooks_1 = __importDefault(require("./reportHooks"));
|
|
11
34
|
const reportInstallChecks_1 = __importDefault(require("./reportInstallChecks"));
|
|
12
35
|
const reportLifecycleScripts_1 = __importDefault(require("./reportLifecycleScripts"));
|
|
13
|
-
const reportMisc_1 =
|
|
36
|
+
const reportMisc_1 = __importStar(require("./reportMisc"));
|
|
14
37
|
const reportPeerDependencyIssues_1 = __importDefault(require("./reportPeerDependencyIssues"));
|
|
15
38
|
const reportProgress_1 = __importDefault(require("./reportProgress"));
|
|
16
39
|
const reportRequestRetry_1 = __importDefault(require("./reportRequestRetry"));
|
|
@@ -20,25 +43,19 @@ const reportStats_1 = __importDefault(require("./reportStats"));
|
|
|
20
43
|
const reportSummary_1 = __importDefault(require("./reportSummary"));
|
|
21
44
|
const reportUpdateCheck_1 = __importDefault(require("./reportUpdateCheck"));
|
|
22
45
|
function default_1(log$, opts) {
|
|
23
|
-
var _a, _b, _c, _d;
|
|
46
|
+
var _a, _b, _c, _d, _e, _f;
|
|
24
47
|
const width = (_b = (_a = opts.width) !== null && _a !== void 0 ? _a : process.stdout.columns) !== null && _b !== void 0 ? _b : 80;
|
|
25
48
|
const cwd = (_d = (_c = opts.pnpmConfig) === null || _c === void 0 ? void 0 : _c.dir) !== null && _d !== void 0 ? _d : process.cwd();
|
|
26
49
|
const throttle = typeof opts.throttleProgress === 'number' && opts.throttleProgress > 0
|
|
27
50
|
? (0, operators_1.throttleTime)(opts.throttleProgress, undefined, { leading: true, trailing: true })
|
|
28
51
|
: undefined;
|
|
29
52
|
const outputs = [
|
|
30
|
-
(0, reportProgress_1.default)(log$, {
|
|
31
|
-
cwd,
|
|
32
|
-
throttle,
|
|
33
|
-
}),
|
|
34
|
-
(0, reportPeerDependencyIssues_1.default)(log$),
|
|
35
53
|
(0, reportLifecycleScripts_1.default)(log$, {
|
|
36
54
|
appendOnly: opts.appendOnly === true || opts.streamLifecycleOutput,
|
|
37
55
|
aggregateOutput: opts.aggregateOutput,
|
|
38
56
|
cwd,
|
|
39
57
|
width,
|
|
40
58
|
}),
|
|
41
|
-
(0, reportDeprecations_1.default)(log$.deprecation, { cwd, isRecursive: opts.isRecursive }),
|
|
42
59
|
(0, reportMisc_1.default)(log$, {
|
|
43
60
|
appendOnly: opts.appendOnly === true,
|
|
44
61
|
config: opts.config,
|
|
@@ -46,12 +63,6 @@ function default_1(log$, opts) {
|
|
|
46
63
|
logLevel: opts.logLevel,
|
|
47
64
|
zoomOutCurrent: opts.isRecursive,
|
|
48
65
|
}),
|
|
49
|
-
...(0, reportStats_1.default)(log$, {
|
|
50
|
-
cmd: opts.cmd,
|
|
51
|
-
cwd,
|
|
52
|
-
isRecursive: opts.isRecursive,
|
|
53
|
-
width,
|
|
54
|
-
}),
|
|
55
66
|
(0, reportInstallChecks_1.default)(log$.installCheck, { cwd }),
|
|
56
67
|
(0, reportRequestRetry_1.default)(log$.requestRetry),
|
|
57
68
|
(0, reportScope_1.default)(log$.scope, { isRecursive: opts.isRecursive, cmd: opts.cmd }),
|
|
@@ -60,6 +71,22 @@ function default_1(log$, opts) {
|
|
|
60
71
|
(0, reportContext_1.default)(log$, { cwd }),
|
|
61
72
|
(0, reportUpdateCheck_1.default)(log$.updateCheck),
|
|
62
73
|
];
|
|
74
|
+
// logLevelNumber: 0123 = error warn info debug
|
|
75
|
+
const logLevelNumber = (_f = reportMisc_1.LOG_LEVEL_NUMBER[(_e = opts.logLevel) !== null && _e !== void 0 ? _e : 'info']) !== null && _f !== void 0 ? _f : reportMisc_1.LOG_LEVEL_NUMBER['info'];
|
|
76
|
+
if (logLevelNumber >= reportMisc_1.LOG_LEVEL_NUMBER.warn) {
|
|
77
|
+
outputs.push((0, reportPeerDependencyIssues_1.default)(log$), (0, reportDeprecations_1.default)(log$.deprecation, { cwd, isRecursive: opts.isRecursive }));
|
|
78
|
+
}
|
|
79
|
+
if (logLevelNumber >= reportMisc_1.LOG_LEVEL_NUMBER.info) {
|
|
80
|
+
outputs.push((0, reportProgress_1.default)(log$, {
|
|
81
|
+
cwd,
|
|
82
|
+
throttle,
|
|
83
|
+
}), ...(0, reportStats_1.default)(log$, {
|
|
84
|
+
cmd: opts.cmd,
|
|
85
|
+
cwd,
|
|
86
|
+
isRecursive: opts.isRecursive,
|
|
87
|
+
width,
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
63
90
|
if (!opts.appendOnly) {
|
|
64
91
|
outputs.push((0, reportBigTarballsProgress_1.default)(log$));
|
|
65
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporterForClient/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporterForClient/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,8CAA6C;AAC7C,4FAAmE;AACnE,oEAA2C;AAC3C,8EAAqD;AACrD,gEAAuC;AACvC,gFAAuD;AACvD,sFAA6D;AAC7D,2DAA2D;AAC3D,8FAAqE;AACrE,sEAA6C;AAC7C,8EAAqD;AACrD,gEAAuC;AACvC,4GAAmF;AACnF,gEAAuC;AACvC,oEAA2C;AAC3C,4EAAmD;AAEnD,mBACE,IAsBC,EACD,IAYC;;IAED,MAAM,KAAK,GAAG,MAAA,MAAA,IAAI,CAAC,KAAK,mCAAI,OAAO,CAAC,MAAM,CAAC,OAAO,mCAAI,EAAE,CAAA;IACxD,MAAM,GAAG,GAAG,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,GAAG,mCAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IACjD,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,gBAAgB,KAAK,QAAQ,IAAI,IAAI,CAAC,gBAAgB,GAAG,CAAC;QACrF,CAAC,CAAC,IAAA,wBAAY,EAAC,IAAI,CAAC,gBAAgB,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACnF,CAAC,CAAC,SAAS,CAAA;IAEb,MAAM,OAAO,GAAuD;QAClE,IAAA,gCAAsB,EAAC,IAAI,EAAE;YAC3B,UAAU,EA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AAG,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAC7E,CAAA;KACF;IAED,IAAI,cAAc,IAAI,6BAAgB,CAAC,IAAI,EAAE;QAC3C,OAAO,CAAC,IAAI,CACV,IAAA,wBAAc,EAAC,IAAI,EAAE;YACnB,GAAG;YACH,QAAQ;SACT,CAAC,EACF,GAAG,IAAA,qBAAW,EAAC,IAAI,EAAE;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG;YACH,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK;SACN,CAAC,CACH,CAAA;KACF;IAED,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QACpB,OAAO,CAAC,IAAI,CAAC,IAAA,mCAAyB,EAAC,IAAI,CAAC,CAAC,CAAA;KAC9C;IAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QACrB,OAAO,CAAC,IAAI,CAAC,IAAA,uBAAa,EAAC,IAAI,EAAE;YAC/B,GAAG;YACH,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC,CAAA;KACJ;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AA5GD,4BA4GC"}
|
|
@@ -2,6 +2,7 @@ import { Config } from '@pnpm/config';
|
|
|
2
2
|
import { Log, RegistryLog } from '@pnpm/core-loggers';
|
|
3
3
|
import { LogLevel } from '@pnpm/logger';
|
|
4
4
|
import * as Rx from 'rxjs';
|
|
5
|
+
export declare const LOG_LEVEL_NUMBER: Record<LogLevel, number>;
|
|
5
6
|
declare const _default: (log$: {
|
|
6
7
|
registry: Rx.Observable<RegistryLog>;
|
|
7
8
|
other: Rx.Observable<Log>;
|
|
@@ -26,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.LOG_LEVEL_NUMBER = void 0;
|
|
29
30
|
const os_1 = __importDefault(require("os"));
|
|
30
31
|
const Rx = __importStar(require("rxjs"));
|
|
31
32
|
const operators_1 = require("rxjs/operators");
|
|
@@ -33,7 +34,7 @@ const reportError_1 = __importDefault(require("../reportError"));
|
|
|
33
34
|
const formatWarn_1 = __importDefault(require("./utils/formatWarn"));
|
|
34
35
|
const zooming_1 = require("./utils/zooming");
|
|
35
36
|
// eslint-disable:object-literal-sort-keys
|
|
36
|
-
|
|
37
|
+
exports.LOG_LEVEL_NUMBER = {
|
|
37
38
|
error: 0,
|
|
38
39
|
warn: 1,
|
|
39
40
|
info: 2,
|
|
@@ -43,9 +44,9 @@ const LOG_LEVEL_NUMBER = {
|
|
|
43
44
|
const MAX_SHOWN_WARNINGS = 5;
|
|
44
45
|
exports.default = (log$, opts) => {
|
|
45
46
|
var _a, _b;
|
|
46
|
-
const maxLogLevel = (_b = LOG_LEVEL_NUMBER[(_a = opts.logLevel) !== null && _a !== void 0 ? _a : 'info']) !== null && _b !== void 0 ? _b : LOG_LEVEL_NUMBER['info'];
|
|
47
|
+
const maxLogLevel = (_b = exports.LOG_LEVEL_NUMBER[(_a = opts.logLevel) !== null && _a !== void 0 ? _a : 'info']) !== null && _b !== void 0 ? _b : exports.LOG_LEVEL_NUMBER['info'];
|
|
47
48
|
const reportWarning = makeWarningReporter(opts);
|
|
48
|
-
return Rx.merge(log$.registry, log$.other).pipe((0, operators_1.filter)((obj) => LOG_LEVEL_NUMBER[obj.level] <= maxLogLevel &&
|
|
49
|
+
return Rx.merge(log$.registry, log$.other).pipe((0, operators_1.filter)((obj) => exports.LOG_LEVEL_NUMBER[obj.level] <= maxLogLevel &&
|
|
49
50
|
(obj.level !== 'info' || !obj['prefix'] || obj['prefix'] === opts.cwd)), (0, operators_1.map)((obj) => {
|
|
50
51
|
switch (obj.level) {
|
|
51
52
|
case 'warn': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reportMisc.js","sourceRoot":"","sources":["../../src/reporterForClient/reportMisc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reportMisc.js","sourceRoot":"","sources":["../../src/reporterForClient/reportMisc.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmB;AAInB,yCAA0B;AAC1B,8CAA4C;AAC5C,iEAAwC;AACxC,oEAA2C;AAC3C,6CAA0C;AAE1C,0CAA0C;AAC7B,QAAA,gBAAgB,GAA6B;IACxD,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;CACT,CAAA;AACD,yCAAyC;AAEzC,MAAM,kBAAkB,GAAG,CAAC,CAAA;AAE5B,kBAAe,CACb,IAGC,EACD,IAMC,EACD,EAAE;;IACF,MAAM,WAAW,GAAG,MAAA,wBAAgB,CAAC,MAAA,IAAI,CAAC,QAAQ,mCAAI,MAAM,CAAC,mCAAI,wBAAgB,CAAC,MAAM,CAAC,CAAA;IACzF,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAA;IAC/C,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAC7C,IAAA,kBAAM,EAAC,CAAC,GAAG,EAAE,EAAE,CAAC,wBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,WAAW;QACxD,CAAC,GAAG,CAAC,KAAK,KAAK,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,EACzE,IAAA,eAAG,EAAC,CAAC,GAAG,EAAE,EAAE;QACV,QAAQ,GAAG,CAAC,KAAK,EAAE;YACnB,KAAK,MAAM,CAAC,CAAC;gBACX,OAAO,aAAa,CAAC,GAAG,CAAC,CAAA;aAC1B;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I,EAAE,CAAC,OAAO,EAAE,CAAA;YACpC,2GAA2G;YAC3G,wEAAwE;YACxE,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YAChE,OAAO,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;SAClC;QACD,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAkB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACjE,OAAO,EAAE,CAAC,KAAK,CAAA;IACjB,CAAC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/default-reporter",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.15",
|
|
4
4
|
"description": "The default reporter of pnpm",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"strip-ansi": "^6.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@pnpm/default-reporter": "8.5.
|
|
47
|
+
"@pnpm/default-reporter": "8.5.15",
|
|
48
48
|
"@pnpm/logger": "^4.0.0",
|
|
49
49
|
"@types/normalize-path": "^3.0.0",
|
|
50
50
|
"@types/ramda": "0.27.39",
|