docs(changelog test): i test how to automate ChangeLog
This commit is contained in:
339
node_modules/commitizen/dist/configLoader/findup.js
generated
vendored
Normal file
339
node_modules/commitizen/dist/configLoader/findup.js
generated
vendored
Normal file
@@ -0,0 +1,339 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _path = _interopRequireDefault(require("path"));
|
||||
var _glob = _interopRequireDefault(require("glob"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
function cov_wjwib8bhg() {
|
||||
var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/findup.js";
|
||||
var hash = "6f6cc99ed279f909c532154d9f66555fb82a2d2a";
|
||||
var global = new Function("return this")();
|
||||
var gcv = "__coverage__";
|
||||
var coverageData = {
|
||||
path: "/home/runner/work/cz-cli/cz-cli/src/configLoader/findup.js",
|
||||
statementMap: {
|
||||
"0": {
|
||||
start: {
|
||||
line: 14,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 14,
|
||||
column: 37
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
start: {
|
||||
line: 15,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 15,
|
||||
column: 25
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
start: {
|
||||
line: 16,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 16,
|
||||
column: 44
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
start: {
|
||||
line: 18,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 33,
|
||||
column: 39
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
start: {
|
||||
line: 19,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 14
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
start: {
|
||||
line: 20,
|
||||
column: 29
|
||||
},
|
||||
end: {
|
||||
line: 20,
|
||||
column: 59
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
start: {
|
||||
line: 22,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 13
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
start: {
|
||||
line: 23,
|
||||
column: 16
|
||||
},
|
||||
end: {
|
||||
line: 23,
|
||||
column: 62
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
start: {
|
||||
line: 27,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 29,
|
||||
column: 9
|
||||
}
|
||||
},
|
||||
"9": {
|
||||
start: {
|
||||
line: 28,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 28,
|
||||
column: 48
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
start: {
|
||||
line: 31,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 31,
|
||||
column: 31
|
||||
}
|
||||
},
|
||||
"11": {
|
||||
start: {
|
||||
line: 32,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 32,
|
||||
column: 54
|
||||
}
|
||||
}
|
||||
},
|
||||
fnMap: {
|
||||
"0": {
|
||||
name: "findup",
|
||||
decl: {
|
||||
start: {
|
||||
line: 8,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 8,
|
||||
column: 15
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 8,
|
||||
column: 40
|
||||
},
|
||||
end: {
|
||||
line: 34,
|
||||
column: 1
|
||||
}
|
||||
},
|
||||
line: 8
|
||||
},
|
||||
"1": {
|
||||
name: "(anonymous_1)",
|
||||
decl: {
|
||||
start: {
|
||||
line: 19,
|
||||
column: 31
|
||||
},
|
||||
end: {
|
||||
line: 19,
|
||||
column: 32
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 19,
|
||||
column: 50
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 9
|
||||
}
|
||||
},
|
||||
line: 19
|
||||
}
|
||||
},
|
||||
branchMap: {
|
||||
"0": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 22,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 13
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 22,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 13
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 22
|
||||
},
|
||||
"1": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 27,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 29,
|
||||
column: 9
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 27,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 29,
|
||||
column: 9
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 27
|
||||
}
|
||||
},
|
||||
s: {
|
||||
"0": 0,
|
||||
"1": 0,
|
||||
"2": 0,
|
||||
"3": 0,
|
||||
"4": 0,
|
||||
"5": 0,
|
||||
"6": 0,
|
||||
"7": 0,
|
||||
"8": 0,
|
||||
"9": 0,
|
||||
"10": 0,
|
||||
"11": 0
|
||||
},
|
||||
f: {
|
||||
"0": 0,
|
||||
"1": 0
|
||||
},
|
||||
b: {
|
||||
"0": [0, 0],
|
||||
"1": [0, 0]
|
||||
},
|
||||
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
||||
hash: "6f6cc99ed279f909c532154d9f66555fb82a2d2a"
|
||||
};
|
||||
var coverage = global[gcv] || (global[gcv] = {});
|
||||
if (!coverage[path] || coverage[path].hash !== hash) {
|
||||
coverage[path] = coverageData;
|
||||
}
|
||||
var actualCoverage = coverage[path];
|
||||
{
|
||||
// @ts-ignore
|
||||
cov_wjwib8bhg = function () {
|
||||
return actualCoverage;
|
||||
};
|
||||
}
|
||||
return actualCoverage;
|
||||
}
|
||||
cov_wjwib8bhg();
|
||||
var _default = findup; // Before, "findup-sync" package was used,
|
||||
// but it does not provide filter callback
|
||||
exports.default = _default;
|
||||
function findup(patterns, options, fn) {
|
||||
cov_wjwib8bhg().f[0]++;
|
||||
/* jshint -W083 */
|
||||
|
||||
var lastpath;
|
||||
var file;
|
||||
cov_wjwib8bhg().s[0]++;
|
||||
options = Object.create(options);
|
||||
cov_wjwib8bhg().s[1]++;
|
||||
options.maxDepth = 1;
|
||||
cov_wjwib8bhg().s[2]++;
|
||||
options.cwd = _path.default.resolve(options.cwd);
|
||||
cov_wjwib8bhg().s[3]++;
|
||||
do {
|
||||
cov_wjwib8bhg().s[4]++;
|
||||
file = patterns.filter(function (pattern) {
|
||||
cov_wjwib8bhg().f[1]++;
|
||||
var configPath = (cov_wjwib8bhg().s[5]++, _glob.default.sync(pattern, options)[0]);
|
||||
cov_wjwib8bhg().s[6]++;
|
||||
if (configPath) {
|
||||
cov_wjwib8bhg().b[0][0]++;
|
||||
cov_wjwib8bhg().s[7]++;
|
||||
return fn(_path.default.join(options.cwd, configPath));
|
||||
} else {
|
||||
cov_wjwib8bhg().b[0][1]++;
|
||||
}
|
||||
})[0];
|
||||
cov_wjwib8bhg().s[8]++;
|
||||
if (file) {
|
||||
cov_wjwib8bhg().b[1][0]++;
|
||||
cov_wjwib8bhg().s[9]++;
|
||||
return _path.default.join(options.cwd, file);
|
||||
} else {
|
||||
cov_wjwib8bhg().b[1][1]++;
|
||||
}
|
||||
cov_wjwib8bhg().s[10]++;
|
||||
lastpath = options.cwd;
|
||||
cov_wjwib8bhg().s[11]++;
|
||||
options.cwd = _path.default.resolve(options.cwd, '..');
|
||||
} while (options.cwd !== lastpath);
|
||||
}
|
700
node_modules/commitizen/dist/configLoader/getContent.js
generated
vendored
Normal file
700
node_modules/commitizen/dist/configLoader/getContent.js
generated
vendored
Normal file
@@ -0,0 +1,700 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _fs = _interopRequireDefault(require("fs"));
|
||||
var _path = _interopRequireDefault(require("path"));
|
||||
var _stripJsonComments = _interopRequireDefault(require("strip-json-comments"));
|
||||
var _isUtf = _interopRequireDefault(require("is-utf8"));
|
||||
var _stripBom = _interopRequireDefault(require("strip-bom"));
|
||||
var _configLoader = require("../configLoader");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
function cov_1jep83s2x2() {
|
||||
var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/getContent.js";
|
||||
var hash = "403573c0a0b7b4db0113fca9d9beb1098d95eac2";
|
||||
var global = new Function("return this")();
|
||||
var gcv = "__coverage__";
|
||||
var coverageData = {
|
||||
path: "/home/runner/work/cz-cli/cz-cli/src/configLoader/getContent.js",
|
||||
statementMap: {
|
||||
"0": {
|
||||
start: {
|
||||
line: 20,
|
||||
column: 23
|
||||
},
|
||||
end: {
|
||||
line: 20,
|
||||
column: 45
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
start: {
|
||||
line: 21,
|
||||
column: 21
|
||||
},
|
||||
end: {
|
||||
line: 21,
|
||||
column: 75
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
start: {
|
||||
line: 22,
|
||||
column: 23
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 56
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
start: {
|
||||
line: 23,
|
||||
column: 18
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
start: {
|
||||
line: 24,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 59
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
start: {
|
||||
line: 27,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 42,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
start: {
|
||||
line: 28,
|
||||
column: 23
|
||||
},
|
||||
end: {
|
||||
line: 28,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
start: {
|
||||
line: 30,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 32,
|
||||
column: 11
|
||||
}
|
||||
},
|
||||
"9": {
|
||||
start: {
|
||||
line: 34,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 34,
|
||||
column: 22
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
start: {
|
||||
line: 36,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 39,
|
||||
column: 21
|
||||
}
|
||||
},
|
||||
"11": {
|
||||
start: {
|
||||
line: 41,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 41,
|
||||
column: 20
|
||||
}
|
||||
},
|
||||
"12": {
|
||||
start: {
|
||||
line: 52,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 54,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"13": {
|
||||
start: {
|
||||
line: 53,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 53,
|
||||
column: 13
|
||||
}
|
||||
},
|
||||
"14": {
|
||||
start: {
|
||||
line: 56,
|
||||
column: 25
|
||||
},
|
||||
end: {
|
||||
line: 56,
|
||||
column: 64
|
||||
}
|
||||
},
|
||||
"15": {
|
||||
start: {
|
||||
line: 57,
|
||||
column: 27
|
||||
},
|
||||
end: {
|
||||
line: 57,
|
||||
column: 54
|
||||
}
|
||||
},
|
||||
"16": {
|
||||
start: {
|
||||
line: 59,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 61,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"17": {
|
||||
start: {
|
||||
line: 60,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 60,
|
||||
column: 47
|
||||
}
|
||||
},
|
||||
"18": {
|
||||
start: {
|
||||
line: 63,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 63,
|
||||
column: 51
|
||||
}
|
||||
},
|
||||
"19": {
|
||||
start: {
|
||||
line: 64,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 64,
|
||||
column: 56
|
||||
}
|
||||
},
|
||||
"20": {
|
||||
start: {
|
||||
line: 75,
|
||||
column: 22
|
||||
},
|
||||
end: {
|
||||
line: 75,
|
||||
column: 49
|
||||
}
|
||||
},
|
||||
"21": {
|
||||
start: {
|
||||
line: 77,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 79,
|
||||
column: 3
|
||||
}
|
||||
},
|
||||
"22": {
|
||||
start: {
|
||||
line: 78,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 78,
|
||||
column: 96
|
||||
}
|
||||
},
|
||||
"23": {
|
||||
start: {
|
||||
line: 81,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 81,
|
||||
column: 50
|
||||
}
|
||||
}
|
||||
},
|
||||
fnMap: {
|
||||
"0": {
|
||||
name: "readConfigContent",
|
||||
decl: {
|
||||
start: {
|
||||
line: 19,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 19,
|
||||
column: 26
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 19,
|
||||
column: 40
|
||||
},
|
||||
end: {
|
||||
line: 43,
|
||||
column: 1
|
||||
}
|
||||
},
|
||||
line: 19
|
||||
},
|
||||
"1": {
|
||||
name: "(anonymous_1)",
|
||||
decl: {
|
||||
start: {
|
||||
line: 24,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 7
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 24,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 59
|
||||
}
|
||||
},
|
||||
line: 24
|
||||
},
|
||||
"2": {
|
||||
name: "(anonymous_2)",
|
||||
decl: {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 7
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
line: 25
|
||||
},
|
||||
"3": {
|
||||
name: "getConfigContent",
|
||||
decl: {
|
||||
start: {
|
||||
line: 51,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 51,
|
||||
column: 25
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 51,
|
||||
column: 54
|
||||
},
|
||||
end: {
|
||||
line: 65,
|
||||
column: 1
|
||||
}
|
||||
},
|
||||
line: 51
|
||||
},
|
||||
"4": {
|
||||
name: "readConfigFileContent",
|
||||
decl: {
|
||||
start: {
|
||||
line: 73,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 73,
|
||||
column: 30
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 73,
|
||||
column: 44
|
||||
},
|
||||
end: {
|
||||
line: 82,
|
||||
column: 1
|
||||
}
|
||||
},
|
||||
line: 73
|
||||
}
|
||||
},
|
||||
branchMap: {
|
||||
"0": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 21,
|
||||
column: 21
|
||||
},
|
||||
end: {
|
||||
line: 21,
|
||||
column: 75
|
||||
}
|
||||
},
|
||||
type: "binary-expr",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 21,
|
||||
column: 21
|
||||
},
|
||||
end: {
|
||||
line: 21,
|
||||
column: 45
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 21,
|
||||
column: 49
|
||||
},
|
||||
end: {
|
||||
line: 21,
|
||||
column: 75
|
||||
}
|
||||
}],
|
||||
line: 21
|
||||
},
|
||||
"1": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 23,
|
||||
column: 18
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
type: "cond-expr",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 24,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 24,
|
||||
column: 59
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 40
|
||||
}
|
||||
}],
|
||||
line: 23
|
||||
},
|
||||
"2": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 52,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 54,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 52,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 54,
|
||||
column: 5
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 52
|
||||
},
|
||||
"3": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 59,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 61,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 59,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 61,
|
||||
column: 5
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 59
|
||||
},
|
||||
"4": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 77,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 79,
|
||||
column: 3
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 77,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 79,
|
||||
column: 3
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 77
|
||||
}
|
||||
},
|
||||
s: {
|
||||
"0": 0,
|
||||
"1": 0,
|
||||
"2": 0,
|
||||
"3": 0,
|
||||
"4": 0,
|
||||
"5": 0,
|
||||
"6": 0,
|
||||
"7": 0,
|
||||
"8": 0,
|
||||
"9": 0,
|
||||
"10": 0,
|
||||
"11": 0,
|
||||
"12": 0,
|
||||
"13": 0,
|
||||
"14": 0,
|
||||
"15": 0,
|
||||
"16": 0,
|
||||
"17": 0,
|
||||
"18": 0,
|
||||
"19": 0,
|
||||
"20": 0,
|
||||
"21": 0,
|
||||
"22": 0,
|
||||
"23": 0
|
||||
},
|
||||
f: {
|
||||
"0": 0,
|
||||
"1": 0,
|
||||
"2": 0,
|
||||
"3": 0,
|
||||
"4": 0
|
||||
},
|
||||
b: {
|
||||
"0": [0, 0],
|
||||
"1": [0, 0],
|
||||
"2": [0, 0],
|
||||
"3": [0, 0],
|
||||
"4": [0, 0]
|
||||
},
|
||||
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
||||
hash: "403573c0a0b7b4db0113fca9d9beb1098d95eac2"
|
||||
};
|
||||
var coverage = global[gcv] || (global[gcv] = {});
|
||||
if (!coverage[path] || coverage[path].hash !== hash) {
|
||||
coverage[path] = coverageData;
|
||||
}
|
||||
var actualCoverage = coverage[path];
|
||||
{
|
||||
// @ts-ignore
|
||||
cov_1jep83s2x2 = function () {
|
||||
return actualCoverage;
|
||||
};
|
||||
}
|
||||
return actualCoverage;
|
||||
}
|
||||
cov_1jep83s2x2();
|
||||
var _default = getConfigContent;
|
||||
/**
|
||||
* Read the content of a configuration file
|
||||
* - if not js or json: strip any comments
|
||||
* - if js or json: require it
|
||||
* @param {String} configPath - full path to configuration file
|
||||
* @return {Object}
|
||||
*/
|
||||
exports.default = _default;
|
||||
function readConfigContent(configPath) {
|
||||
cov_1jep83s2x2().f[0]++;
|
||||
const parsedPath = (cov_1jep83s2x2().s[0]++, _path.default.parse(configPath));
|
||||
const isRcFile = (cov_1jep83s2x2().s[1]++, (cov_1jep83s2x2().b[0][0]++, parsedPath.ext !== '.js') && (cov_1jep83s2x2().b[0][1]++, parsedPath.ext !== '.json'));
|
||||
const jsonString = (cov_1jep83s2x2().s[2]++, readConfigFileContent(configPath));
|
||||
const parse = (cov_1jep83s2x2().s[3]++, isRcFile ? (cov_1jep83s2x2().b[1][0]++, contents => {
|
||||
cov_1jep83s2x2().f[1]++;
|
||||
cov_1jep83s2x2().s[4]++;
|
||||
return JSON.parse((0, _stripJsonComments.default)(contents));
|
||||
}) : (cov_1jep83s2x2().b[1][1]++, contents => {
|
||||
cov_1jep83s2x2().f[2]++;
|
||||
cov_1jep83s2x2().s[5]++;
|
||||
return JSON.parse(contents);
|
||||
}));
|
||||
cov_1jep83s2x2().s[6]++;
|
||||
try {
|
||||
const parsed = (cov_1jep83s2x2().s[7]++, parse(jsonString));
|
||||
cov_1jep83s2x2().s[8]++;
|
||||
Object.defineProperty(parsed, 'configPath', {
|
||||
value: configPath
|
||||
});
|
||||
cov_1jep83s2x2().s[9]++;
|
||||
return parsed;
|
||||
} catch (error) {
|
||||
cov_1jep83s2x2().s[10]++;
|
||||
error.message = [`Parsing JSON at ${configPath} for commitizen config failed:`, error.mesasge].join('\n');
|
||||
cov_1jep83s2x2().s[11]++;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content of the configuration file
|
||||
* @param {String} configPath - partial path to configuration file
|
||||
* @param {String} directory - directory path which will be joined with config argument
|
||||
* @return {Object}
|
||||
*/
|
||||
function getConfigContent(configPath, baseDirectory) {
|
||||
cov_1jep83s2x2().f[3]++;
|
||||
cov_1jep83s2x2().s[12]++;
|
||||
if (!configPath) {
|
||||
cov_1jep83s2x2().b[2][0]++;
|
||||
cov_1jep83s2x2().s[13]++;
|
||||
return;
|
||||
} else {
|
||||
cov_1jep83s2x2().b[2][1]++;
|
||||
}
|
||||
const resolvedPath = (cov_1jep83s2x2().s[14]++, _path.default.resolve(baseDirectory, configPath));
|
||||
const configBasename = (cov_1jep83s2x2().s[15]++, _path.default.basename(resolvedPath));
|
||||
cov_1jep83s2x2().s[16]++;
|
||||
if (!_fs.default.existsSync(resolvedPath)) {
|
||||
cov_1jep83s2x2().b[3][0]++;
|
||||
cov_1jep83s2x2().s[17]++;
|
||||
return (0, _configLoader.getNormalizedConfig)(resolvedPath);
|
||||
} else {
|
||||
cov_1jep83s2x2().b[3][1]++;
|
||||
}
|
||||
const content = (cov_1jep83s2x2().s[18]++, readConfigContent(resolvedPath));
|
||||
cov_1jep83s2x2().s[19]++;
|
||||
return (0, _configLoader.getNormalizedConfig)(configBasename, content);
|
||||
}
|
||||
;
|
||||
|
||||
/**
|
||||
* Read proper content from config file.
|
||||
* If the chartset of the config file is not utf-8, one error will be thrown.
|
||||
* @param {String} configPath
|
||||
* @return {String}
|
||||
*/
|
||||
function readConfigFileContent(configPath) {
|
||||
cov_1jep83s2x2().f[4]++;
|
||||
let rawBufContent = (cov_1jep83s2x2().s[20]++, _fs.default.readFileSync(configPath));
|
||||
cov_1jep83s2x2().s[21]++;
|
||||
if (!(0, _isUtf.default)(rawBufContent)) {
|
||||
cov_1jep83s2x2().b[4][0]++;
|
||||
cov_1jep83s2x2().s[22]++;
|
||||
throw new Error(`The config file at "${configPath}" contains invalid charset, expect utf8`);
|
||||
} else {
|
||||
cov_1jep83s2x2().b[4][1]++;
|
||||
}
|
||||
cov_1jep83s2x2().s[23]++;
|
||||
return (0, _stripBom.default)(rawBufContent.toString("utf8"));
|
||||
}
|
404
node_modules/commitizen/dist/configLoader/getNormalizedConfig.js
generated
vendored
Normal file
404
node_modules/commitizen/dist/configLoader/getNormalizedConfig.js
generated
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
function cov_27tktivjps() {
|
||||
var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/getNormalizedConfig.js";
|
||||
var hash = "4f6f52b87cc201f346900b4ddb8d92d48fe58a78";
|
||||
var global = new Function("return this")();
|
||||
var gcv = "__coverage__";
|
||||
var coverageData = {
|
||||
path: "/home/runner/work/cz-cli/cz-cli/src/configLoader/getNormalizedConfig.js",
|
||||
statementMap: {
|
||||
"0": {
|
||||
start: {
|
||||
line: 7,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 26,
|
||||
column: 3
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
start: {
|
||||
line: 12,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
start: {
|
||||
line: 13,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 13,
|
||||
column: 39
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
start: {
|
||||
line: 14,
|
||||
column: 11
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
start: {
|
||||
line: 17,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 20,
|
||||
column: 7
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
start: {
|
||||
line: 19,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 19,
|
||||
column: 341
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
start: {
|
||||
line: 21,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 21,
|
||||
column: 30
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 25,
|
||||
column: 19
|
||||
}
|
||||
}
|
||||
},
|
||||
fnMap: {
|
||||
"0": {
|
||||
name: "getNormalizedConfig",
|
||||
decl: {
|
||||
start: {
|
||||
line: 5,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 5,
|
||||
column: 28
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 5,
|
||||
column: 47
|
||||
},
|
||||
end: {
|
||||
line: 28,
|
||||
column: 1
|
||||
}
|
||||
},
|
||||
line: 5
|
||||
}
|
||||
},
|
||||
branchMap: {
|
||||
"0": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 7,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 26,
|
||||
column: 3
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 7,
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 26,
|
||||
column: 3
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 23,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 26,
|
||||
column: 3
|
||||
}
|
||||
}],
|
||||
line: 7
|
||||
},
|
||||
"1": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 7,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 7,
|
||||
column: 44
|
||||
}
|
||||
},
|
||||
type: "binary-expr",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 7,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 7,
|
||||
column: 13
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 7,
|
||||
column: 18
|
||||
},
|
||||
end: {
|
||||
line: 7,
|
||||
column: 43
|
||||
}
|
||||
}],
|
||||
line: 7
|
||||
},
|
||||
"2": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 12,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 12,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 14,
|
||||
column: 11
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
}],
|
||||
line: 12
|
||||
},
|
||||
"3": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 12,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 12,
|
||||
column: 51
|
||||
}
|
||||
},
|
||||
type: "binary-expr",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 12,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 12,
|
||||
column: 22
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 12,
|
||||
column: 26
|
||||
},
|
||||
end: {
|
||||
line: 12,
|
||||
column: 51
|
||||
}
|
||||
}],
|
||||
line: 12
|
||||
},
|
||||
"4": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 14,
|
||||
column: 11
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 14,
|
||||
column: 11
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 5
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 14
|
||||
},
|
||||
"5": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 17,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 20,
|
||||
column: 7
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 17,
|
||||
column: 6
|
||||
},
|
||||
end: {
|
||||
line: 20,
|
||||
column: 7
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 17
|
||||
}
|
||||
},
|
||||
s: {
|
||||
"0": 0,
|
||||
"1": 0,
|
||||
"2": 0,
|
||||
"3": 0,
|
||||
"4": 0,
|
||||
"5": 0,
|
||||
"6": 0,
|
||||
"7": 0
|
||||
},
|
||||
f: {
|
||||
"0": 0
|
||||
},
|
||||
b: {
|
||||
"0": [0, 0],
|
||||
"1": [0, 0],
|
||||
"2": [0, 0],
|
||||
"3": [0, 0],
|
||||
"4": [0, 0],
|
||||
"5": [0, 0]
|
||||
},
|
||||
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
||||
hash: "4f6f52b87cc201f346900b4ddb8d92d48fe58a78"
|
||||
};
|
||||
var coverage = global[gcv] || (global[gcv] = {});
|
||||
if (!coverage[path] || coverage[path].hash !== hash) {
|
||||
coverage[path] = coverageData;
|
||||
}
|
||||
var actualCoverage = coverage[path];
|
||||
{
|
||||
// @ts-ignore
|
||||
cov_27tktivjps = function () {
|
||||
return actualCoverage;
|
||||
};
|
||||
}
|
||||
return actualCoverage;
|
||||
}
|
||||
cov_27tktivjps();
|
||||
var _default = getNormalizedConfig; // Given a config and content, plucks the actual
|
||||
// settings that we're interested in
|
||||
exports.default = _default;
|
||||
function getNormalizedConfig(config, content) {
|
||||
cov_27tktivjps().f[0]++;
|
||||
cov_27tktivjps().s[0]++;
|
||||
if ((cov_27tktivjps().b[1][0]++, content) && (cov_27tktivjps().b[1][1]++, config === 'package.json')) {
|
||||
cov_27tktivjps().b[0][0]++;
|
||||
cov_27tktivjps().s[1]++;
|
||||
// PACKAGE.JSON
|
||||
|
||||
// Use the npm config key, be good citizens
|
||||
if ((cov_27tktivjps().b[3][0]++, content.config) && (cov_27tktivjps().b[3][1]++, content.config.commitizen)) {
|
||||
cov_27tktivjps().b[2][0]++;
|
||||
cov_27tktivjps().s[2]++;
|
||||
return content.config.commitizen;
|
||||
} else {
|
||||
cov_27tktivjps().b[2][1]++;
|
||||
cov_27tktivjps().s[3]++;
|
||||
if (content.czConfig) {
|
||||
cov_27tktivjps().b[4][0]++;
|
||||
cov_27tktivjps().s[4]++;
|
||||
// Old method, will be deprecated in 3.0.0
|
||||
|
||||
// Suppress during test
|
||||
if (typeof global.it !== 'function') {
|
||||
cov_27tktivjps().b[5][0]++;
|
||||
cov_27tktivjps().s[5]++;
|
||||
console.error("\n********\nWARNING: This repository's package.json is using czConfig. czConfig will be deprecated in Commitizen 3. \nPlease use this instead:\n{\n \"config\": {\n \"commitizen\": {\n \"path\": \"./path/to/adapter\"\n }\n }\n}\nFor more information, see: http://commitizen.github.io/cz-cli/\n********\n");
|
||||
} else {
|
||||
cov_27tktivjps().b[5][1]++;
|
||||
}
|
||||
cov_27tktivjps().s[6]++;
|
||||
return content.czConfig;
|
||||
} else {
|
||||
cov_27tktivjps().b[4][1]++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cov_27tktivjps().b[0][1]++;
|
||||
cov_27tktivjps().s[7]++;
|
||||
// .cz.json or .czrc
|
||||
return content;
|
||||
}
|
||||
}
|
427
node_modules/commitizen/dist/configLoader/loader.js
generated
vendored
Normal file
427
node_modules/commitizen/dist/configLoader/loader.js
generated
vendored
Normal file
@@ -0,0 +1,427 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _path = _interopRequireDefault(require("path"));
|
||||
var _configLoader = require("../configLoader");
|
||||
var _util = require("../common/util.js");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
function cov_aqt8wzdi9() {
|
||||
var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/loader.js";
|
||||
var hash = "4c4dccab67b6ecaa244de00bc5a7718df1c2c5ea";
|
||||
var global = new Function("return this")();
|
||||
var gcv = "__coverage__";
|
||||
var coverageData = {
|
||||
path: "/home/runner/work/cz-cli/cz-cli/src/configLoader/loader.js",
|
||||
statementMap: {
|
||||
"0": {
|
||||
start: {
|
||||
line: 22,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 27,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
start: {
|
||||
line: 26,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 26,
|
||||
column: 45
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
start: {
|
||||
line: 29,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 37,
|
||||
column: 6
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
start: {
|
||||
line: 31,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 33,
|
||||
column: 13
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
start: {
|
||||
line: 35,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 35,
|
||||
column: 24
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
start: {
|
||||
line: 39,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 41,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
start: {
|
||||
line: 40,
|
||||
column: 8
|
||||
},
|
||||
end: {
|
||||
line: 40,
|
||||
column: 23
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
start: {
|
||||
line: 43,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 59,
|
||||
column: 5
|
||||
}
|
||||
}
|
||||
},
|
||||
fnMap: {
|
||||
"0": {
|
||||
name: "loader",
|
||||
decl: {
|
||||
start: {
|
||||
line: 20,
|
||||
column: 9
|
||||
},
|
||||
end: {
|
||||
line: 20,
|
||||
column: 15
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 20,
|
||||
column: 39
|
||||
},
|
||||
end: {
|
||||
line: 60,
|
||||
column: 1
|
||||
}
|
||||
},
|
||||
line: 20
|
||||
},
|
||||
"1": {
|
||||
name: "(anonymous_1)",
|
||||
decl: {
|
||||
start: {
|
||||
line: 30,
|
||||
column: 58
|
||||
},
|
||||
end: {
|
||||
line: 30,
|
||||
column: 59
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 30,
|
||||
column: 80
|
||||
},
|
||||
end: {
|
||||
line: 36,
|
||||
column: 9
|
||||
}
|
||||
},
|
||||
line: 30
|
||||
}
|
||||
},
|
||||
branchMap: {
|
||||
"0": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 22,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 40
|
||||
}
|
||||
},
|
||||
type: "binary-expr",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 22,
|
||||
column: 20
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 23
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: 22,
|
||||
column: 27
|
||||
},
|
||||
end: {
|
||||
line: 22,
|
||||
column: 40
|
||||
}
|
||||
}],
|
||||
line: 22
|
||||
},
|
||||
"1": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 25,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 27,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 25,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 27,
|
||||
column: 5
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 25
|
||||
},
|
||||
"2": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 31,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 33,
|
||||
column: 13
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 31,
|
||||
column: 12
|
||||
},
|
||||
end: {
|
||||
line: 33,
|
||||
column: 13
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 31
|
||||
},
|
||||
"3": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 39,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 41,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: 39,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 41,
|
||||
column: 5
|
||||
}
|
||||
}, {
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 39
|
||||
},
|
||||
"4": {
|
||||
loc: {
|
||||
start: {
|
||||
line: 43,
|
||||
column: 4
|
||||
},
|
||||
end: {
|
||||
line: 59,
|
||||
column: 5
|
||||
}
|
||||
},
|
||||
type: "if",
|
||||
locations: [{
|
||||
start: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
},
|
||||
end: {
|
||||
line: undefined,
|
||||
column: undefined
|
||||
}
|
||||
}],
|
||||
line: 43
|
||||
}
|
||||
},
|
||||
s: {
|
||||
"0": 0,
|
||||
"1": 0,
|
||||
"2": 0,
|
||||
"3": 0,
|
||||
"4": 0,
|
||||
"5": 0,
|
||||
"6": 0,
|
||||
"7": 0,
|
||||
"8": 0
|
||||
},
|
||||
f: {
|
||||
"0": 0,
|
||||
"1": 0
|
||||
},
|
||||
b: {
|
||||
"0": [0, 0],
|
||||
"1": [0, 0],
|
||||
"2": [0, 0],
|
||||
"3": [0, 0],
|
||||
"4": [0]
|
||||
},
|
||||
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
||||
hash: "4c4dccab67b6ecaa244de00bc5a7718df1c2c5ea"
|
||||
};
|
||||
var coverage = global[gcv] || (global[gcv] = {});
|
||||
if (!coverage[path] || coverage[path].hash !== hash) {
|
||||
coverage[path] = coverageData;
|
||||
}
|
||||
var actualCoverage = coverage[path];
|
||||
{
|
||||
// @ts-ignore
|
||||
cov_aqt8wzdi9 = function () {
|
||||
return actualCoverage;
|
||||
};
|
||||
}
|
||||
return actualCoverage;
|
||||
}
|
||||
cov_aqt8wzdi9();
|
||||
var _default = loader;
|
||||
/**
|
||||
* Command line config helpers
|
||||
* Shamelessly ripped from with slight modifications:
|
||||
* https://github.com/jscs-dev/node-jscs/blob/master/lib/cli-config.js
|
||||
*/
|
||||
/**
|
||||
* Get content of the configuration file
|
||||
* @param {String} config - partial path to configuration file
|
||||
* @param {String} [cwd = process.cwd()] - directory path which will be joined with config argument
|
||||
* @return {Object|undefined}
|
||||
*/
|
||||
exports.default = _default;
|
||||
function loader(configs, config, cwd) {
|
||||
cov_aqt8wzdi9().f[0]++;
|
||||
var content;
|
||||
var directory = (cov_aqt8wzdi9().s[0]++, (cov_aqt8wzdi9().b[0][0]++, cwd) || (cov_aqt8wzdi9().b[0][1]++, process.cwd()));
|
||||
|
||||
// If config option is given, attempt to load it
|
||||
cov_aqt8wzdi9().s[1]++;
|
||||
if (config) {
|
||||
cov_aqt8wzdi9().b[1][0]++;
|
||||
cov_aqt8wzdi9().s[2]++;
|
||||
return (0, _configLoader.getContent)(config, directory);
|
||||
} else {
|
||||
cov_aqt8wzdi9().b[1][1]++;
|
||||
}
|
||||
cov_aqt8wzdi9().s[3]++;
|
||||
content = (0, _configLoader.getContent)((0, _configLoader.findup)(configs, {
|
||||
nocase: true,
|
||||
cwd: directory
|
||||
}, function (configPath) {
|
||||
cov_aqt8wzdi9().f[1]++;
|
||||
cov_aqt8wzdi9().s[4]++;
|
||||
if (_path.default.basename(configPath) === 'package.json') {
|
||||
cov_aqt8wzdi9().b[2][0]++;
|
||||
} // return !!this.getContent(configPath);
|
||||
else {
|
||||
cov_aqt8wzdi9().b[2][1]++;
|
||||
}
|
||||
cov_aqt8wzdi9().s[5]++;
|
||||
return true;
|
||||
}));
|
||||
cov_aqt8wzdi9().s[6]++;
|
||||
if (content) {
|
||||
cov_aqt8wzdi9().b[3][0]++;
|
||||
cov_aqt8wzdi9().s[7]++;
|
||||
return content;
|
||||
} else {
|
||||
cov_aqt8wzdi9().b[3][1]++;
|
||||
}
|
||||
/* istanbul ignore if */
|
||||
cov_aqt8wzdi9().s[8]++;
|
||||
if (!(0, _util.isInTest)()) {
|
||||
// Try to load standard configs from home dir
|
||||
var directoryArr = [process.env.USERPROFILE, process.env.HOMEPATH, process.env.HOME];
|
||||
for (var i = 0, dirLen = directoryArr.length; i < dirLen; i++) {
|
||||
if (!directoryArr[i]) {
|
||||
continue;
|
||||
}
|
||||
for (var j = 0, len = configs.length; j < len; j++) {
|
||||
content = (0, _configLoader.getContent)(configs[j], directoryArr[i]);
|
||||
if (content) {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cov_aqt8wzdi9().b[4][0]++;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user