@plugjs/plug 0.0.1
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.md +211 -0
- package/NOTICE.md +13 -0
- package/README.md +7 -0
- package/dist/assert.cjs +72 -0
- package/dist/assert.cjs.map +6 -0
- package/dist/assert.mjs +41 -0
- package/dist/assert.mjs.map +6 -0
- package/dist/async.cjs +58 -0
- package/dist/async.cjs.map +6 -0
- package/dist/async.mjs +30 -0
- package/dist/async.mjs.map +6 -0
- package/dist/build.cjs +136 -0
- package/dist/build.cjs.map +6 -0
- package/dist/build.mjs +110 -0
- package/dist/build.mjs.map +6 -0
- package/dist/files.cjs +113 -0
- package/dist/files.cjs.map +6 -0
- package/dist/files.mjs +88 -0
- package/dist/files.mjs.map +6 -0
- package/dist/fork.cjs +177 -0
- package/dist/fork.cjs.map +6 -0
- package/dist/fork.mjs +151 -0
- package/dist/fork.mjs.map +6 -0
- package/dist/helpers.cjs +129 -0
- package/dist/helpers.cjs.map +6 -0
- package/dist/helpers.mjs +97 -0
- package/dist/helpers.mjs.map +6 -0
- package/dist/index.cjs +25 -0
- package/dist/index.cjs.map +6 -0
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +6 -0
- package/dist/log/colors.cjs +129 -0
- package/dist/log/colors.cjs.map +6 -0
- package/dist/log/colors.mjs +93 -0
- package/dist/log/colors.mjs.map +6 -0
- package/dist/log/emit.cjs +109 -0
- package/dist/log/emit.cjs.map +6 -0
- package/dist/log/emit.mjs +83 -0
- package/dist/log/emit.mjs.map +6 -0
- package/dist/log/levels.cjs +75 -0
- package/dist/log/levels.cjs.map +6 -0
- package/dist/log/levels.mjs +41 -0
- package/dist/log/levels.mjs.map +6 -0
- package/dist/log/logger.cjs +129 -0
- package/dist/log/logger.cjs.map +6 -0
- package/dist/log/logger.mjs +104 -0
- package/dist/log/logger.mjs.map +6 -0
- package/dist/log/options.cjs +149 -0
- package/dist/log/options.cjs.map +6 -0
- package/dist/log/options.mjs +124 -0
- package/dist/log/options.mjs.map +6 -0
- package/dist/log/report.cjs +284 -0
- package/dist/log/report.cjs.map +6 -0
- package/dist/log/report.mjs +259 -0
- package/dist/log/report.mjs.map +6 -0
- package/dist/log/spinner.cjs +83 -0
- package/dist/log/spinner.cjs.map +6 -0
- package/dist/log/spinner.mjs +57 -0
- package/dist/log/spinner.mjs.map +6 -0
- package/dist/log.cjs +71 -0
- package/dist/log.cjs.map +6 -0
- package/dist/log.mjs +45 -0
- package/dist/log.mjs.map +6 -0
- package/dist/paths.cjs +158 -0
- package/dist/paths.cjs.map +6 -0
- package/dist/paths.mjs +122 -0
- package/dist/paths.mjs.map +6 -0
- package/dist/pipe.cjs +71 -0
- package/dist/pipe.cjs.map +6 -0
- package/dist/pipe.mjs +44 -0
- package/dist/pipe.mjs.map +6 -0
- package/dist/plugs/copy.cjs +95 -0
- package/dist/plugs/copy.cjs.map +6 -0
- package/dist/plugs/copy.mjs +64 -0
- package/dist/plugs/copy.mjs.map +6 -0
- package/dist/plugs/coverage/analysis.cjs +229 -0
- package/dist/plugs/coverage/analysis.cjs.map +6 -0
- package/dist/plugs/coverage/analysis.mjs +202 -0
- package/dist/plugs/coverage/analysis.mjs.map +6 -0
- package/dist/plugs/coverage/report.cjs +215 -0
- package/dist/plugs/coverage/report.cjs.map +6 -0
- package/dist/plugs/coverage/report.mjs +200 -0
- package/dist/plugs/coverage/report.mjs.map +6 -0
- package/dist/plugs/coverage.cjs +142 -0
- package/dist/plugs/coverage.cjs.map +6 -0
- package/dist/plugs/coverage.mjs +117 -0
- package/dist/plugs/coverage.mjs.map +6 -0
- package/dist/plugs/debug.cjs +50 -0
- package/dist/plugs/debug.cjs.map +6 -0
- package/dist/plugs/debug.mjs +25 -0
- package/dist/plugs/debug.mjs.map +6 -0
- package/dist/plugs/esbuild/bundle-locals.cjs +51 -0
- package/dist/plugs/esbuild/bundle-locals.cjs.map +6 -0
- package/dist/plugs/esbuild/bundle-locals.mjs +26 -0
- package/dist/plugs/esbuild/bundle-locals.mjs.map +6 -0
- package/dist/plugs/esbuild/check-dependencies.cjs +140 -0
- package/dist/plugs/esbuild/check-dependencies.cjs.map +6 -0
- package/dist/plugs/esbuild/check-dependencies.mjs +115 -0
- package/dist/plugs/esbuild/check-dependencies.mjs.map +6 -0
- package/dist/plugs/esbuild/fix-extensions.cjs +91 -0
- package/dist/plugs/esbuild/fix-extensions.cjs.map +6 -0
- package/dist/plugs/esbuild/fix-extensions.mjs +60 -0
- package/dist/plugs/esbuild/fix-extensions.mjs.map +6 -0
- package/dist/plugs/esbuild.cjs +109 -0
- package/dist/plugs/esbuild.cjs.map +6 -0
- package/dist/plugs/esbuild.mjs +83 -0
- package/dist/plugs/esbuild.mjs.map +6 -0
- package/dist/plugs/eslint/runner.cjs +91 -0
- package/dist/plugs/eslint/runner.cjs.map +6 -0
- package/dist/plugs/eslint/runner.mjs +68 -0
- package/dist/plugs/eslint/runner.mjs.map +6 -0
- package/dist/plugs/exec.cjs +128 -0
- package/dist/plugs/exec.cjs.map +6 -0
- package/dist/plugs/exec.mjs +96 -0
- package/dist/plugs/exec.mjs.map +6 -0
- package/dist/plugs/filter.cjs +59 -0
- package/dist/plugs/filter.cjs.map +6 -0
- package/dist/plugs/filter.mjs +34 -0
- package/dist/plugs/filter.mjs.map +6 -0
- package/dist/plugs/mocha/reporter.cjs +140 -0
- package/dist/plugs/mocha/reporter.cjs.map +6 -0
- package/dist/plugs/mocha/reporter.mjs +107 -0
- package/dist/plugs/mocha/reporter.mjs.map +6 -0
- package/dist/plugs/mocha/runner.cjs +73 -0
- package/dist/plugs/mocha/runner.cjs.map +6 -0
- package/dist/plugs/mocha/runner.mjs +44 -0
- package/dist/plugs/mocha/runner.mjs.map +6 -0
- package/dist/plugs/tsc/compiler.cjs +74 -0
- package/dist/plugs/tsc/compiler.cjs.map +6 -0
- package/dist/plugs/tsc/compiler.mjs +43 -0
- package/dist/plugs/tsc/compiler.mjs.map +6 -0
- package/dist/plugs/tsc/options.cjs +82 -0
- package/dist/plugs/tsc/options.cjs.map +6 -0
- package/dist/plugs/tsc/options.mjs +51 -0
- package/dist/plugs/tsc/options.mjs.map +6 -0
- package/dist/plugs/tsc/report.cjs +90 -0
- package/dist/plugs/tsc/report.cjs.map +6 -0
- package/dist/plugs/tsc/report.mjs +59 -0
- package/dist/plugs/tsc/report.mjs.map +6 -0
- package/dist/plugs/tsc/runner.cjs +101 -0
- package/dist/plugs/tsc/runner.cjs.map +6 -0
- package/dist/plugs/tsc/runner.mjs +72 -0
- package/dist/plugs/tsc/runner.mjs.map +6 -0
- package/dist/plugs.cjs +31 -0
- package/dist/plugs.cjs.map +6 -0
- package/dist/plugs.mjs +13 -0
- package/dist/plugs.mjs.map +6 -0
- package/dist/run.cjs +95 -0
- package/dist/run.cjs.map +6 -0
- package/dist/run.mjs +70 -0
- package/dist/run.mjs.map +6 -0
- package/dist/task.cjs +39 -0
- package/dist/task.cjs.map +6 -0
- package/dist/task.mjs +14 -0
- package/dist/task.mjs.map +6 -0
- package/dist/utils/asyncfs.cjs +143 -0
- package/dist/utils/asyncfs.cjs.map +6 -0
- package/dist/utils/asyncfs.mjs +83 -0
- package/dist/utils/asyncfs.mjs.map +6 -0
- package/dist/utils/caller.cjs +59 -0
- package/dist/utils/caller.cjs.map +6 -0
- package/dist/utils/caller.mjs +34 -0
- package/dist/utils/caller.mjs.map +6 -0
- package/dist/utils/match.cjs +69 -0
- package/dist/utils/match.cjs.map +6 -0
- package/dist/utils/match.mjs +38 -0
- package/dist/utils/match.mjs.map +6 -0
- package/dist/utils/options.cjs +41 -0
- package/dist/utils/options.cjs.map +6 -0
- package/dist/utils/options.mjs +16 -0
- package/dist/utils/options.mjs.map +6 -0
- package/dist/utils/walk.cjs +104 -0
- package/dist/utils/walk.cjs.map +6 -0
- package/dist/utils/walk.mjs +79 -0
- package/dist/utils/walk.mjs.map +6 -0
- package/extra/cli.mjs +212 -0
- package/extra/ts-loader.mjs +214 -0
- package/extra/webassembly.d.ts +11 -0
- package/package.json +57 -0
- package/src/assert.ts +47 -0
- package/src/async.ts +50 -0
- package/src/files.ts +129 -0
- package/src/fork.ts +263 -0
- package/src/helpers.ts +145 -0
- package/src/index.ts +20 -0
- package/src/log/colors.ts +119 -0
- package/src/log/emit.ts +125 -0
- package/src/log/levels.ts +65 -0
- package/src/log/logger.ts +171 -0
- package/src/log/options.ts +199 -0
- package/src/log/report.ts +433 -0
- package/src/log/spinner.ts +70 -0
- package/src/log.ts +68 -0
- package/src/paths.ts +213 -0
- package/src/pipe.ts +231 -0
- package/src/plugs/copy.ts +113 -0
- package/src/plugs/coverage/analysis.ts +395 -0
- package/src/plugs/coverage/report.ts +337 -0
- package/src/plugs/coverage.ts +194 -0
- package/src/plugs/debug.ts +35 -0
- package/src/plugs/esbuild/bundle-locals.ts +33 -0
- package/src/plugs/esbuild/check-dependencies.ts +158 -0
- package/src/plugs/esbuild/fix-extensions.ts +108 -0
- package/src/plugs/esbuild.ts +128 -0
- package/src/plugs/eslint/runner.ts +112 -0
- package/src/plugs/exec.ts +215 -0
- package/src/plugs/filter.ts +56 -0
- package/src/plugs/mocha/reporter.ts +152 -0
- package/src/plugs/mocha/runner.ts +77 -0
- package/src/plugs/tsc/compiler.ts +66 -0
- package/src/plugs/tsc/options.ts +97 -0
- package/src/plugs/tsc/report.ts +74 -0
- package/src/plugs/tsc/runner.ts +100 -0
- package/src/plugs.ts +33 -0
- package/src/run.ts +160 -0
- package/src/task.ts +26 -0
- package/src/utils/asyncfs.ts +82 -0
- package/src/utils/caller.ts +45 -0
- package/src/utils/match.ts +286 -0
- package/src/utils/options.ts +22 -0
- package/src/utils/walk.ts +136 -0
- package/types/assert.d.ts +18 -0
- package/types/async.d.ts +20 -0
- package/types/build.d.ts +56 -0
- package/types/files.d.ts +44 -0
- package/types/fork.d.ts +57 -0
- package/types/helpers.d.ts +49 -0
- package/types/index.d.ts +14 -0
- package/types/log/colors.d.ts +25 -0
- package/types/log/emit.d.ts +14 -0
- package/types/log/levels.d.ts +52 -0
- package/types/log/logger.d.ts +31 -0
- package/types/log/options.d.ts +40 -0
- package/types/log/report.d.ts +64 -0
- package/types/log/spinner.d.ts +2 -0
- package/types/log.d.ts +10 -0
- package/types/paths.d.ts +76 -0
- package/types/pipe.d.ts +152 -0
- package/types/plugs/copy.d.ts +27 -0
- package/types/plugs/coverage/analysis.d.ts +104 -0
- package/types/plugs/coverage/report.d.ts +53 -0
- package/types/plugs/coverage.d.ts +46 -0
- package/types/plugs/debug.d.ts +14 -0
- package/types/plugs/esbuild/bundle-locals.d.ts +6 -0
- package/types/plugs/esbuild/check-dependencies.d.ts +12 -0
- package/types/plugs/esbuild/fix-extensions.d.ts +29 -0
- package/types/plugs/esbuild.d.ts +24 -0
- package/types/plugs/eslint/runner.d.ts +22 -0
- package/types/plugs/exec.d.ts +90 -0
- package/types/plugs/filter.d.ts +23 -0
- package/types/plugs/mocha/reporter.d.ts +8 -0
- package/types/plugs/mocha/runner.d.ts +34 -0
- package/types/plugs/tsc/compiler.d.ts +24 -0
- package/types/plugs/tsc/options.d.ts +8 -0
- package/types/plugs/tsc/report.d.ts +5 -0
- package/types/plugs/tsc/runner.d.ts +13 -0
- package/types/plugs.d.ts +16 -0
- package/types/run.d.ts +89 -0
- package/types/task.d.ts +15 -0
- package/types/utils/asyncfs.d.ts +37 -0
- package/types/utils/caller.d.ts +7 -0
- package/types/utils/match.d.ts +216 -0
- package/types/utils/options.d.ts +15 -0
- package/types/utils/walk.d.ts +28 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// plugs/coverage.ts
|
|
21
|
+
var coverage_exports = {};
|
|
22
|
+
__export(coverage_exports, {
|
|
23
|
+
Coverage: () => Coverage
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(coverage_exports);
|
|
26
|
+
var import_cov8_html = require("@plugjs/cov8-html");
|
|
27
|
+
var import_node_path = require("node:path");
|
|
28
|
+
var import_assert = require("../assert.cjs");
|
|
29
|
+
var import_log = require("../log.cjs");
|
|
30
|
+
var import_pipe = require("../pipe.cjs");
|
|
31
|
+
var import_analysis = require("./coverage/analysis.cjs");
|
|
32
|
+
var import_report = require("./coverage/report.cjs");
|
|
33
|
+
var Coverage = class {
|
|
34
|
+
constructor(_coverageDir, _options = {}) {
|
|
35
|
+
this._coverageDir = _coverageDir;
|
|
36
|
+
this._options = _options;
|
|
37
|
+
}
|
|
38
|
+
async pipe(files, run) {
|
|
39
|
+
const coverageFiles = await run.find("coverage-*.json", {
|
|
40
|
+
directory: this._coverageDir
|
|
41
|
+
});
|
|
42
|
+
if (coverageFiles.length === 0) {
|
|
43
|
+
(0, import_assert.fail)(`No coverage files found in ${(0, import_log.$p)(coverageFiles.directory)}`);
|
|
44
|
+
}
|
|
45
|
+
const sourceFiles = [...files.absolutePaths()];
|
|
46
|
+
const ms1 = Date.now();
|
|
47
|
+
const analyser = await (0, import_analysis.createAnalyser)(
|
|
48
|
+
sourceFiles,
|
|
49
|
+
[...coverageFiles.absolutePaths()],
|
|
50
|
+
this._options.sourceMapBias || "least_upper_bound",
|
|
51
|
+
run.log
|
|
52
|
+
);
|
|
53
|
+
run.log.info("Parsed", coverageFiles.length, "coverage files", (0, import_log.$ms)(Date.now() - ms1));
|
|
54
|
+
const ms2 = Date.now();
|
|
55
|
+
const report = await (0, import_report.coverageReport)(analyser, sourceFiles, run.log);
|
|
56
|
+
run.log.info("Analysed", sourceFiles.length, "source files", (0, import_log.$ms)(Date.now() - ms2));
|
|
57
|
+
analyser.destroy();
|
|
58
|
+
const {
|
|
59
|
+
minimumCoverage = 50,
|
|
60
|
+
minimumFileCoverage = minimumCoverage,
|
|
61
|
+
optimalCoverage = Math.round((100 + minimumCoverage) / 2),
|
|
62
|
+
optimalFileCoverage = Math.round((100 + minimumFileCoverage) / 2)
|
|
63
|
+
} = this._options;
|
|
64
|
+
let max = 0;
|
|
65
|
+
for (const file in report) {
|
|
66
|
+
if (file.length > max)
|
|
67
|
+
max = file.length;
|
|
68
|
+
}
|
|
69
|
+
let maxLength = 0;
|
|
70
|
+
for (const file in report.results) {
|
|
71
|
+
if (file.length > maxLength)
|
|
72
|
+
maxLength = file.length;
|
|
73
|
+
}
|
|
74
|
+
let fileErrors = 0;
|
|
75
|
+
let fileWarnings = 0;
|
|
76
|
+
const _report = run.report("Coverage report");
|
|
77
|
+
for (const [_file, result] of Object.entries(report.results)) {
|
|
78
|
+
const { coverage } = result.nodeCoverage;
|
|
79
|
+
const file = _file;
|
|
80
|
+
if (coverage < minimumFileCoverage) {
|
|
81
|
+
_report.annotate(import_log.ERROR, file, `${coverage} %`);
|
|
82
|
+
fileErrors++;
|
|
83
|
+
} else if (coverage < optimalFileCoverage) {
|
|
84
|
+
_report.annotate(import_log.WARN, file, `${coverage} %`);
|
|
85
|
+
fileWarnings++;
|
|
86
|
+
} else {
|
|
87
|
+
_report.annotate(import_log.NOTICE, file, `${coverage} %`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (report.nodes.coverage < minimumCoverage) {
|
|
91
|
+
const message = `${(0, import_log.$red)(`${report.nodes.coverage}%`)} does not meet minimum coverage ${(0, import_log.$gry)(`(${minimumCoverage}%)`)}`;
|
|
92
|
+
_report.add({ level: import_log.ERROR, message });
|
|
93
|
+
} else if (report.nodes.coverage < optimalCoverage) {
|
|
94
|
+
const message = `${(0, import_log.$ylw)(`${report.nodes.coverage}%`)} does not meet optimal coverage ${(0, import_log.$gry)(`(${optimalCoverage}%)`)}`;
|
|
95
|
+
_report.add({ level: import_log.WARN, message });
|
|
96
|
+
}
|
|
97
|
+
if (fileErrors) {
|
|
98
|
+
const message = `${(0, import_log.$red)(fileErrors)} files do not meet minimum file coverage ${(0, import_log.$gry)(`(${minimumFileCoverage}%)`)}`;
|
|
99
|
+
_report.add({ level: import_log.ERROR, message });
|
|
100
|
+
}
|
|
101
|
+
if (fileWarnings) {
|
|
102
|
+
const message = `${(0, import_log.$ylw)(fileWarnings)} files do not meet optimal file coverage ${(0, import_log.$gry)(`(${optimalFileCoverage}%)`)}`;
|
|
103
|
+
_report.add({ level: import_log.WARN, message });
|
|
104
|
+
}
|
|
105
|
+
if (this._options.reportDir == null)
|
|
106
|
+
return _report.done(false);
|
|
107
|
+
const builder = run.files(this._options.reportDir);
|
|
108
|
+
const date = new Date().toISOString();
|
|
109
|
+
const thresholds = {
|
|
110
|
+
minimumCoverage,
|
|
111
|
+
minimumFileCoverage,
|
|
112
|
+
optimalCoverage,
|
|
113
|
+
optimalFileCoverage
|
|
114
|
+
};
|
|
115
|
+
await builder.write("report.json", JSON.stringify({ ...report, thresholds, date }));
|
|
116
|
+
await builder.write("index.html", import_cov8_html.html);
|
|
117
|
+
const results = {};
|
|
118
|
+
for (const [rel, abs] of files.pathMappings()) {
|
|
119
|
+
results[rel] = report.results[abs];
|
|
120
|
+
}
|
|
121
|
+
const tree = {};
|
|
122
|
+
for (const relative of Object.keys(results)) {
|
|
123
|
+
const directories = relative.split(import_node_path.sep);
|
|
124
|
+
const file = directories.pop();
|
|
125
|
+
let node = tree;
|
|
126
|
+
for (const dir of directories) {
|
|
127
|
+
node = node[dir] = node[dir] || {};
|
|
128
|
+
}
|
|
129
|
+
node[file] = relative;
|
|
130
|
+
}
|
|
131
|
+
const jsonp = JSON.stringify({ ...report, results, thresholds, tree, date });
|
|
132
|
+
await builder.write("report.js", `${import_cov8_html.initFunction}(${jsonp});`);
|
|
133
|
+
_report.done(false);
|
|
134
|
+
return builder.build();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
(0, import_pipe.install)("coverage", Coverage);
|
|
138
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
139
|
+
0 && (module.exports = {
|
|
140
|
+
Coverage
|
|
141
|
+
});
|
|
142
|
+
//# sourceMappingURL=coverage.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/plugs/coverage.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAmC;AACnC,uBAAoB;AACpB,oBAAqB;AAErB,iBAA+D;AAE/D,kBAA8B;AAE9B,sBAA8C;AAC9C,oBAA+C;AAiCxC,IAAM,WAAN,MAEgE;AAAA,EAGrE,YACqB,cACA,WAA2C,CAAC,GAC/D;AAFmB;AACA;AAAA,EAClB;AAAA,EAEH,MAAM,KAAK,OAAc,KAAwE;AAC/F,UAAM,gBAAgB,MAAM,IAAI,KAAK,mBAAmB;AAAA,MACtD,WAAW,KAAK;AAAA,IAClB,CAAC;AAED,QAAI,cAAc,WAAW,GAAG;AAC9B,8BAAK,kCAA8B,eAAG,cAAc,SAAS,GAAG;AAAA,IAClE;AAEA,UAAM,cAAc,CAAE,GAAG,MAAM,cAAc,CAAE;AAE/C,UAAM,MAAM,KAAK,IAAI;AACrB,UAAM,WAAW,UAAM;AAAA,MACnB;AAAA,MACA,CAAE,GAAG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OAAO,YAAY,IAAI;AAE7B,UAAI,OAAO;AACX,iBAAW,OAAO,aAAa;AAC7B,eAAO,KAAK,OAAO,KAAK,QAAQ,CAAC;AAAA,MACnC;AAEA,WAAK,QAAQ;AAAA,IACf;AAEA,UAAM,QAAQ,KAAK,UAAU,EAAE,GAAG,QAAQ,SAAS,YAAY,MAAM,KAAK,CAAC;AAC3E,UAAM,QAAQ,MAAM,aAAa,GAAG,iCAAgB,SAAS;AAG7D,YAAQ,KAAK,KAAK;AAGlB,WAAO,QAAQ,MAAM;AAAA,EACvB;AACF;AAAA,IAMA,qBAAQ,YAAY,QAAQ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// plugs/coverage.ts
|
|
2
|
+
import { html, initFunction } from "@plugjs/cov8-html";
|
|
3
|
+
import { sep } from "node:path";
|
|
4
|
+
import { fail } from "../assert.mjs";
|
|
5
|
+
import { $gry, $ms, $p, $red, $ylw, ERROR, NOTICE, WARN } from "../log.mjs";
|
|
6
|
+
import { install } from "../pipe.mjs";
|
|
7
|
+
import { createAnalyser } from "./coverage/analysis.mjs";
|
|
8
|
+
import { coverageReport } from "./coverage/report.mjs";
|
|
9
|
+
var Coverage = class {
|
|
10
|
+
constructor(_coverageDir, _options = {}) {
|
|
11
|
+
this._coverageDir = _coverageDir;
|
|
12
|
+
this._options = _options;
|
|
13
|
+
}
|
|
14
|
+
async pipe(files, run) {
|
|
15
|
+
const coverageFiles = await run.find("coverage-*.json", {
|
|
16
|
+
directory: this._coverageDir
|
|
17
|
+
});
|
|
18
|
+
if (coverageFiles.length === 0) {
|
|
19
|
+
fail(`No coverage files found in ${$p(coverageFiles.directory)}`);
|
|
20
|
+
}
|
|
21
|
+
const sourceFiles = [...files.absolutePaths()];
|
|
22
|
+
const ms1 = Date.now();
|
|
23
|
+
const analyser = await createAnalyser(
|
|
24
|
+
sourceFiles,
|
|
25
|
+
[...coverageFiles.absolutePaths()],
|
|
26
|
+
this._options.sourceMapBias || "least_upper_bound",
|
|
27
|
+
run.log
|
|
28
|
+
);
|
|
29
|
+
run.log.info("Parsed", coverageFiles.length, "coverage files", $ms(Date.now() - ms1));
|
|
30
|
+
const ms2 = Date.now();
|
|
31
|
+
const report = await coverageReport(analyser, sourceFiles, run.log);
|
|
32
|
+
run.log.info("Analysed", sourceFiles.length, "source files", $ms(Date.now() - ms2));
|
|
33
|
+
analyser.destroy();
|
|
34
|
+
const {
|
|
35
|
+
minimumCoverage = 50,
|
|
36
|
+
minimumFileCoverage = minimumCoverage,
|
|
37
|
+
optimalCoverage = Math.round((100 + minimumCoverage) / 2),
|
|
38
|
+
optimalFileCoverage = Math.round((100 + minimumFileCoverage) / 2)
|
|
39
|
+
} = this._options;
|
|
40
|
+
let max = 0;
|
|
41
|
+
for (const file in report) {
|
|
42
|
+
if (file.length > max)
|
|
43
|
+
max = file.length;
|
|
44
|
+
}
|
|
45
|
+
let maxLength = 0;
|
|
46
|
+
for (const file in report.results) {
|
|
47
|
+
if (file.length > maxLength)
|
|
48
|
+
maxLength = file.length;
|
|
49
|
+
}
|
|
50
|
+
let fileErrors = 0;
|
|
51
|
+
let fileWarnings = 0;
|
|
52
|
+
const _report = run.report("Coverage report");
|
|
53
|
+
for (const [_file, result] of Object.entries(report.results)) {
|
|
54
|
+
const { coverage } = result.nodeCoverage;
|
|
55
|
+
const file = _file;
|
|
56
|
+
if (coverage < minimumFileCoverage) {
|
|
57
|
+
_report.annotate(ERROR, file, `${coverage} %`);
|
|
58
|
+
fileErrors++;
|
|
59
|
+
} else if (coverage < optimalFileCoverage) {
|
|
60
|
+
_report.annotate(WARN, file, `${coverage} %`);
|
|
61
|
+
fileWarnings++;
|
|
62
|
+
} else {
|
|
63
|
+
_report.annotate(NOTICE, file, `${coverage} %`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (report.nodes.coverage < minimumCoverage) {
|
|
67
|
+
const message = `${$red(`${report.nodes.coverage}%`)} does not meet minimum coverage ${$gry(`(${minimumCoverage}%)`)}`;
|
|
68
|
+
_report.add({ level: ERROR, message });
|
|
69
|
+
} else if (report.nodes.coverage < optimalCoverage) {
|
|
70
|
+
const message = `${$ylw(`${report.nodes.coverage}%`)} does not meet optimal coverage ${$gry(`(${optimalCoverage}%)`)}`;
|
|
71
|
+
_report.add({ level: WARN, message });
|
|
72
|
+
}
|
|
73
|
+
if (fileErrors) {
|
|
74
|
+
const message = `${$red(fileErrors)} files do not meet minimum file coverage ${$gry(`(${minimumFileCoverage}%)`)}`;
|
|
75
|
+
_report.add({ level: ERROR, message });
|
|
76
|
+
}
|
|
77
|
+
if (fileWarnings) {
|
|
78
|
+
const message = `${$ylw(fileWarnings)} files do not meet optimal file coverage ${$gry(`(${optimalFileCoverage}%)`)}`;
|
|
79
|
+
_report.add({ level: WARN, message });
|
|
80
|
+
}
|
|
81
|
+
if (this._options.reportDir == null)
|
|
82
|
+
return _report.done(false);
|
|
83
|
+
const builder = run.files(this._options.reportDir);
|
|
84
|
+
const date = new Date().toISOString();
|
|
85
|
+
const thresholds = {
|
|
86
|
+
minimumCoverage,
|
|
87
|
+
minimumFileCoverage,
|
|
88
|
+
optimalCoverage,
|
|
89
|
+
optimalFileCoverage
|
|
90
|
+
};
|
|
91
|
+
await builder.write("report.json", JSON.stringify({ ...report, thresholds, date }));
|
|
92
|
+
await builder.write("index.html", html);
|
|
93
|
+
const results = {};
|
|
94
|
+
for (const [rel, abs] of files.pathMappings()) {
|
|
95
|
+
results[rel] = report.results[abs];
|
|
96
|
+
}
|
|
97
|
+
const tree = {};
|
|
98
|
+
for (const relative of Object.keys(results)) {
|
|
99
|
+
const directories = relative.split(sep);
|
|
100
|
+
const file = directories.pop();
|
|
101
|
+
let node = tree;
|
|
102
|
+
for (const dir of directories) {
|
|
103
|
+
node = node[dir] = node[dir] || {};
|
|
104
|
+
}
|
|
105
|
+
node[file] = relative;
|
|
106
|
+
}
|
|
107
|
+
const jsonp = JSON.stringify({ ...report, results, thresholds, tree, date });
|
|
108
|
+
await builder.write("report.js", `${initFunction}(${jsonp});`);
|
|
109
|
+
_report.done(false);
|
|
110
|
+
return builder.build();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
install("coverage", Coverage);
|
|
114
|
+
export {
|
|
115
|
+
Coverage
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=coverage.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/plugs/coverage.ts"],
|
|
4
|
+
"mappings": ";AAAA,SAAS,MAAM,oBAAoB;AACnC,SAAS,WAAW;AACpB,SAAS,YAAY;AAErB,SAAS,MAAM,KAAK,IAAI,MAAM,MAAM,OAAO,QAAQ,YAAY;AAE/D,SAAS,eAAqB;AAE9B,SAAS,sBAAqC;AAC9C,SAAS,sBAAsC;AAiCxC,IAAM,WAAN,MAEgE;AAAA,EAGrE,YACqB,cACA,WAA2C,CAAC,GAC/D;AAFmB;AACA;AAAA,EAClB;AAAA,EAEH,MAAM,KAAK,OAAc,KAAwE;AAC/F,UAAM,gBAAgB,MAAM,IAAI,KAAK,mBAAmB;AAAA,MACtD,WAAW,KAAK;AAAA,IAClB,CAAC;AAED,QAAI,cAAc,WAAW,GAAG;AAC9B,WAAK,8BAA8B,GAAG,cAAc,SAAS,GAAG;AAAA,IAClE;AAEA,UAAM,cAAc,CAAE,GAAG,MAAM,cAAc,CAAE;AAE/C,UAAM,MAAM,KAAK,IAAI;AACrB,UAAM,WAAW,MAAM;AAAA,MACnB;AAAA,MACA,CAAE,GAAG,cAAc,cAAc,CAAE;AAAA,MACnC,KAAK,SAAS,iBAAiB;AAAA,MAC/B,IAAI;AAAA,IACR;AACA,QAAI,IAAI,KAAK,UAAU,cAAc,QAAQ,kBAAkB,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC;AAEpF,UAAM,MAAM,KAAK,IAAI;AACrB,UAAM,SAAS,MAAM,eAAe,UAAU,aAA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AG,gBAAgB,SAAS;AAG7D,YAAQ,KAAK,KAAK;AAGlB,WAAO,QAAQ,MAAM;AAAA,EACvB;AACF;AAMA,QAAQ,YAAY,QAAQ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// plugs/debug.ts
|
|
21
|
+
var debug_exports = {};
|
|
22
|
+
__export(debug_exports, {
|
|
23
|
+
Debug: () => Debug
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(debug_exports);
|
|
26
|
+
var import_log = require("../log.cjs");
|
|
27
|
+
var import_pipe = require("../pipe.cjs");
|
|
28
|
+
var Debug = class {
|
|
29
|
+
constructor() {
|
|
30
|
+
}
|
|
31
|
+
async pipe(files, run) {
|
|
32
|
+
import_log.log.notice("Debugging", files.length, "files");
|
|
33
|
+
import_log.log.notice("- base dir:", (0, import_log.$p)(run.resolve("@")));
|
|
34
|
+
import_log.log.notice("- build file dir:", (0, import_log.$p)(run.resolve(".")));
|
|
35
|
+
import_log.log.notice("- files dir:", (0, import_log.$p)(files.directory));
|
|
36
|
+
if (files.length) {
|
|
37
|
+
const [path, ...paths] = files;
|
|
38
|
+
import_log.log.notice("- relative paths:", (0, import_log.$und)((0, import_log.$gry)(path)));
|
|
39
|
+
for (const p of paths)
|
|
40
|
+
import_log.log.notice("- :", (0, import_log.$und)((0, import_log.$gry)(p)));
|
|
41
|
+
}
|
|
42
|
+
return files;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
(0, import_pipe.install)("debug", Debug);
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
Debug
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=debug.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/plugs/debug.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAoC;AACpC,kBAA8B;AAIvB,IAAM,QAAN,MAAmC;AAAA,EACxC,cAAc;AAAA,EAAC;AAAA,EAEf,MAAM,KAAK,OAAc,KAA0B;AACjD,mBAAI,OAAO,aAAa,MAAM,QAAQ,OAAO;AAC7C,mBAAI,OAAO,0BAAsB,eAAG,IAAI,QAAQ,GAAG,CAAC,CAAC;AACrD,mBAAI,OAAO,0BAAsB,eAAG,IAAI,QAAQ,GAAG,CAAC,CAAC;AACrD,mBAAI,OAAO,0BAAsB,eAAG,MAAM,SAAS,CAAC;AACpD,QAAI,MAAM,QAAQ;AAChB,YAAM,CAAE,SAAS,KAAM,IAAI;AAC3B,qBAAI,OAAO,0BAAsB,qBAAK,iBAAK,IAAI,CAAC,CAAC;AACjD,iBAAW,KAAK;AAAO,uBAAI,OAAO,0BAAsB,qBAAK,iBAAK,CAAC,CAAC,CAAC;AAAA,IACvE;AACA,WAAO;AAAA,EACT;AACF;AAAA,IAMA,qBAAQ,SAAS,KAAK;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// plugs/debug.ts
|
|
2
|
+
import { $gry, $p, $und, log } from "../log.mjs";
|
|
3
|
+
import { install } from "../pipe.mjs";
|
|
4
|
+
var Debug = class {
|
|
5
|
+
constructor() {
|
|
6
|
+
}
|
|
7
|
+
async pipe(files, run) {
|
|
8
|
+
log.notice("Debugging", files.length, "files");
|
|
9
|
+
log.notice("- base dir:", $p(run.resolve("@")));
|
|
10
|
+
log.notice("- build file dir:", $p(run.resolve(".")));
|
|
11
|
+
log.notice("- files dir:", $p(files.directory));
|
|
12
|
+
if (files.length) {
|
|
13
|
+
const [path, ...paths] = files;
|
|
14
|
+
log.notice("- relative paths:", $und($gry(path)));
|
|
15
|
+
for (const p of paths)
|
|
16
|
+
log.notice("- :", $und($gry(p)));
|
|
17
|
+
}
|
|
18
|
+
return files;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
install("debug", Debug);
|
|
22
|
+
export {
|
|
23
|
+
Debug
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=debug.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/plugs/debug.ts"],
|
|
4
|
+
"mappings": ";AACA,SAAS,MAAM,IAAI,MAAM,WAAW;AACpC,SAAS,eAAqB;AAIvB,IAAM,QAAN,MAAmC;AAAA,EACxC,cAAc;AAAA,EAAC;AAAA,EAEf,MAAM,KAAK,OAAc,KAA0B;AACjD,QAAI,OAAO,aAAa,MAAM,QAAQ,OAAO;AAC7C,QAAI,OAAO,sBAAsB,GAAG,IAAI,QAAQ,GAAG,CAAC,CAAC;AACrD,QAAI,OAAO,sBAAsB,GAAG,IAAI,QAAQ,GAAG,CAAC,CAAC;AACrD,QAAI,OAAO,sBAAsB,GAAG,MAAM,SAAS,CAAC;AACpD,QAAI,MAAM,QAAQ;AAChB,YAAM,CAAE,SAAS,KAAM,IAAI;AAC3B,UAAI,OAAO,sBAAsB,KAAK,KAAK,IAAI,CAAC,CAAC;AACjD,iBAAW,KAAK;AAAO,YAAI,OAAO,sBAAsB,KAAK,KAAK,CAAC,CAAC,CAAC;AAAA,IACvE;AACA,WAAO;AAAA,EACT;AACF;AAMA,QAAQ,SAAS,KAAK;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// plugs/esbuild/bundle-locals.ts
|
|
21
|
+
var bundle_locals_exports = {};
|
|
22
|
+
__export(bundle_locals_exports, {
|
|
23
|
+
bundleLocals: () => bundleLocals
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(bundle_locals_exports);
|
|
26
|
+
function bundleLocals() {
|
|
27
|
+
let disabled = false;
|
|
28
|
+
return {
|
|
29
|
+
name: "bundle-locals",
|
|
30
|
+
setup(build) {
|
|
31
|
+
build.onStart(() => {
|
|
32
|
+
if (build.initialOptions.bundle)
|
|
33
|
+
return;
|
|
34
|
+
disabled = true;
|
|
35
|
+
return { warnings: [{ text: "Plugin disabled when not bundling" }] };
|
|
36
|
+
});
|
|
37
|
+
build.onResolve({ filter: /.*/ }, (args) => {
|
|
38
|
+
if (disabled)
|
|
39
|
+
return;
|
|
40
|
+
if (!args.importer)
|
|
41
|
+
return null;
|
|
42
|
+
return args.path.startsWith(".") ? null : { external: true };
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
bundleLocals
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=bundle-locals.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugs/esbuild/bundle-locals.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,SAAS,eAAuB;AACrC,MAAI,WAAW;AAEf,SAAO;AAAA,IACL,MAAM;AAAA,IAEN,MAAM,OAAa;AACjB,YAAM,QAAQ,MAAM;AAClB,YAAI,MAAM,eAAe;AAAQ;AAEjC,mBAAW;AACX,eAAO,EAAE,UAAU,CAAE,EAAE,MAAM,oCAAoC,CAAE,EAAE;AAAA,MACvE,CAAC;AAGD,YAAM,UAAU,EAAE,QAAQ,KAAK,GAAG,CAAC,SAAS;AAC1C,YAAI;AAAU;AAGd,YAAI,CAAE,KAAK;AAAU,iBAAO;AAG5B,eAAO,KAAK,KAAK,WAAW,GAAG,IAAI,OAAO,EAAE,UAAU,KAAK;AAAA,MAC7D,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// plugs/esbuild/bundle-locals.ts
|
|
2
|
+
function bundleLocals() {
|
|
3
|
+
let disabled = false;
|
|
4
|
+
return {
|
|
5
|
+
name: "bundle-locals",
|
|
6
|
+
setup(build) {
|
|
7
|
+
build.onStart(() => {
|
|
8
|
+
if (build.initialOptions.bundle)
|
|
9
|
+
return;
|
|
10
|
+
disabled = true;
|
|
11
|
+
return { warnings: [{ text: "Plugin disabled when not bundling" }] };
|
|
12
|
+
});
|
|
13
|
+
build.onResolve({ filter: /.*/ }, (args) => {
|
|
14
|
+
if (disabled)
|
|
15
|
+
return;
|
|
16
|
+
if (!args.importer)
|
|
17
|
+
return null;
|
|
18
|
+
return args.path.startsWith(".") ? null : { external: true };
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
bundleLocals
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=bundle-locals.mjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugs/esbuild/bundle-locals.ts"],
|
|
4
|
+
"mappings": ";AAMO,SAAS,eAAuB;AACrC,MAAI,WAAW;AAEf,SAAO;AAAA,IACL,MAAM;AAAA,IAEN,MAAM,OAAa;AACjB,YAAM,QAAQ,MAAM;AAClB,YAAI,MAAM,eAAe;AAAQ;AAEjC,mBAAW;AACX,eAAO,EAAE,UAAU,CAAE,EAAE,MAAM,oCAAoC,CAAE,EAAE;AAAA,MACvE,CAAC;AAGD,YAAM,UAAU,EAAE,QAAQ,KAAK,GAAG,CAAC,SAAS;AAC1C,YAAI;AAAU;AAGd,YAAI,CAAE,KAAK;AAAU,iBAAO;AAG5B,eAAO,KAAK,KAAK,WAAW,GAAG,IAAI,OAAO,EAAE,UAAU,KAAK;AAAA,MAC7D,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// plugs/esbuild/check-dependencies.ts
|
|
21
|
+
var check_dependencies_exports = {};
|
|
22
|
+
__export(check_dependencies_exports, {
|
|
23
|
+
checkDependencies: () => checkDependencies
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(check_dependencies_exports);
|
|
26
|
+
var import_async = require("../../async.cjs");
|
|
27
|
+
var import_log = require("../../log.cjs");
|
|
28
|
+
var import_asyncfs = require("../../utils/asyncfs.cjs");
|
|
29
|
+
var import_options = require("../../utils/options.cjs");
|
|
30
|
+
function checkDependencies(...args) {
|
|
31
|
+
const run = (0, import_async.currentRun)();
|
|
32
|
+
const { params, options } = (0, import_options.parseOptions)(args, {
|
|
33
|
+
ignored: [],
|
|
34
|
+
allowDev: false,
|
|
35
|
+
allowPeer: true,
|
|
36
|
+
allowOptional: true,
|
|
37
|
+
allowUnused: false
|
|
38
|
+
});
|
|
39
|
+
const allowDev = convertOption(options.allowDev);
|
|
40
|
+
const allowPeer = convertOption(options.allowPeer);
|
|
41
|
+
const allowOptional = convertOption(options.allowOptional);
|
|
42
|
+
const allowUnused = convertOption(options.allowUnused);
|
|
43
|
+
const dependencies = [];
|
|
44
|
+
const devDependencies = [];
|
|
45
|
+
const peerDependencies = [];
|
|
46
|
+
const optionalDependencies = [];
|
|
47
|
+
const ignored = new Set(options.ignored);
|
|
48
|
+
const used = /* @__PURE__ */ new Set();
|
|
49
|
+
return {
|
|
50
|
+
name: "check-dependencies",
|
|
51
|
+
setup(build) {
|
|
52
|
+
build.initialOptions.bundle = true;
|
|
53
|
+
let packageJson;
|
|
54
|
+
build.onStart(async () => {
|
|
55
|
+
if (!run)
|
|
56
|
+
return { errors: [{ text: "Unable to find current Run" }] };
|
|
57
|
+
const resolved = run.resolve(params[0] || "@package.json");
|
|
58
|
+
packageJson = resolved;
|
|
59
|
+
try {
|
|
60
|
+
const data = await (0, import_asyncfs.readFile)(resolved, "utf-8");
|
|
61
|
+
const json = JSON.parse(data);
|
|
62
|
+
dependencies.push(...dependencyKeys(json.dependencies));
|
|
63
|
+
devDependencies.push(...dependencyKeys(json.devDependencies));
|
|
64
|
+
peerDependencies.push(...dependencyKeys(json.peerDependencies));
|
|
65
|
+
optionalDependencies.push(...dependencyKeys(json.optionalDependencies));
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return { errors: [{ text: `Unable to parse ${(0, import_log.$p)(resolved)}` }] };
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
build.onResolve({ filter: /.*/ }, (args2) => {
|
|
71
|
+
if (args2.importer.match(/\/node_modules\//))
|
|
72
|
+
return;
|
|
73
|
+
if (args2.path.startsWith("node:"))
|
|
74
|
+
return;
|
|
75
|
+
if (args2.path.startsWith("."))
|
|
76
|
+
return;
|
|
77
|
+
if (dependencies.includes(args2.path)) {
|
|
78
|
+
used.add(args2.path);
|
|
79
|
+
return { external: true };
|
|
80
|
+
}
|
|
81
|
+
const [result, label] = optionalDependencies.includes(args2.path) ? [allowOptional, "an optional"] : peerDependencies.includes(args2.path) ? [allowPeer, "a peer"] : devDependencies.includes(args2.path) ? [allowDev, "a dev"] : ["error", void 0];
|
|
82
|
+
if (ignored.has(args2.path))
|
|
83
|
+
return { external: true };
|
|
84
|
+
if (result === "ignore")
|
|
85
|
+
return { external: true };
|
|
86
|
+
const text = label ? `Dependency "${args2.path}" is ${label} dependency` : `Dependency "${args2.path}" not specified in "package.json"`;
|
|
87
|
+
return result === "warn" ? { external: true, warnings: [{ text }] } : { external: true, errors: [{ text }] };
|
|
88
|
+
});
|
|
89
|
+
build.onEnd((result) => {
|
|
90
|
+
if (allowUnused === "ignore")
|
|
91
|
+
return;
|
|
92
|
+
const unused = new Set(dependencies);
|
|
93
|
+
ignored.forEach((dep) => unused.delete(dep));
|
|
94
|
+
used.forEach((dep) => unused.delete(dep));
|
|
95
|
+
const messages = [...unused].map((dep) => `Unused dependency "${dep}"`).map((text) => ({
|
|
96
|
+
id: "",
|
|
97
|
+
pluginName: "check-dependencies",
|
|
98
|
+
location: {
|
|
99
|
+
file: packageJson,
|
|
100
|
+
namespace: "file",
|
|
101
|
+
line: 0,
|
|
102
|
+
column: 0,
|
|
103
|
+
length: 0,
|
|
104
|
+
lineText: "",
|
|
105
|
+
suggestion: ""
|
|
106
|
+
},
|
|
107
|
+
text,
|
|
108
|
+
notes: [],
|
|
109
|
+
detail: void 0
|
|
110
|
+
}));
|
|
111
|
+
if (allowUnused === "warn") {
|
|
112
|
+
result.warnings.push(...messages);
|
|
113
|
+
} else {
|
|
114
|
+
result.errors.push(...messages);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function convertOption(option) {
|
|
121
|
+
if (option === "warn")
|
|
122
|
+
return "warn";
|
|
123
|
+
if (option === "error")
|
|
124
|
+
return "error";
|
|
125
|
+
if (option)
|
|
126
|
+
return "ignore";
|
|
127
|
+
return "error";
|
|
128
|
+
}
|
|
129
|
+
function dependencyKeys(dependencies) {
|
|
130
|
+
if (!dependencies)
|
|
131
|
+
return [];
|
|
132
|
+
if (typeof dependencies !== "object")
|
|
133
|
+
return [];
|
|
134
|
+
return Object.keys(dependencies).filter((key) => typeof key === "string");
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
checkDependencies
|
|
139
|
+
});
|
|
140
|
+
//# sourceMappingURL=check-dependencies.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugs/esbuild/check-dependencies.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA2B;AAC3B,iBAAmB;AAEnB,qBAAyB;AACzB,qBAA2C;AAepC,SAAS,qBAAqB,MAAsD;AACzF,QAAM,UAAM,yBAAW;AAEvB,QAAM,EAAE,QAAQ,QAAQ,QAAI,6BAAa,MAAM;AAAA,IAC7C,SAAS,CAAC;AAAA,IACV,UAAU;AAAA,IACV,WAAW;AAAA,IACX,eAAe;AAAA,IACf,aAAa;AAAA,EACf,CAAC;AAED,QAAM,WAAW,cAAc,QAAQ,QAAQ;AAC/C,QAAM,YAAY,cAAc,QAAQ,SAAS;AACjD,QAAM,gBAAgB,cAAc,QAAQ,aAAa;AACzD,QAAM,cAAc,cAAc,QAAQ,WAAW;AAErD,QAAM,eAAyB,CAAC;AAChC,QAAM,kBAA4B,CAAC;AACnC,QAAM,mBAA6B,CAAC;AACpC,QAAM,uBAAiC,CAAC;AACxC,QAAM,UAAU,IAAI,IAAI,QAAQ,OAAO;AACvC,QAAM,OAAO,oBAAI,IAAY;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM,OAAa;AAEjB,YAAM,eAAe,SAAS;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