reposizer 0.2.3 → 0.2.5
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/src/commands/loc.js +4 -4
- package/package.json +1 -1
package/dist/src/commands/loc.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.getLocPayload = getLocPayload;
|
|
|
4
4
|
exports.printLocResult = printLocResult;
|
|
5
5
|
exports.runLocCommand = runLocCommand;
|
|
6
6
|
const tree_1 = require("../services/tree");
|
|
7
|
+
const size_1 = require("../utils/size");
|
|
7
8
|
const IGNORED_SEGMENTS = new Set([
|
|
8
9
|
"node_modules",
|
|
9
10
|
"dist",
|
|
@@ -155,23 +156,22 @@ async function getLocPayload(owner, repo) {
|
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
158
|
function printLocResult(payload) {
|
|
158
|
-
const formatLineCount = (value) => new Intl.NumberFormat("en-US").format(value);
|
|
159
159
|
if (payload.truncated) {
|
|
160
160
|
console.error("Warning: Git tree response was truncated by GitHub; LOC totals may be incomplete.");
|
|
161
161
|
}
|
|
162
162
|
console.log(`Repository: ${payload.repository}`);
|
|
163
|
-
console.log(`Total LOC (approx): ${
|
|
163
|
+
console.log(`Total LOC (approx): ${(0, size_1.formatCompactCount)(payload.total_lines)}`);
|
|
164
164
|
console.log("");
|
|
165
165
|
console.log("Top languages:");
|
|
166
166
|
console.log("--------------");
|
|
167
167
|
for (const row of payload.by_language) {
|
|
168
|
-
console.log(`${row.language.padEnd(15)} ${
|
|
168
|
+
console.log(`${row.language.padEnd(15)} ${(0, size_1.formatCompactCount)(row.lines)}`);
|
|
169
169
|
}
|
|
170
170
|
console.log("");
|
|
171
171
|
console.log("Top directories:");
|
|
172
172
|
console.log("----------------");
|
|
173
173
|
for (const row of payload.by_directory) {
|
|
174
|
-
console.log(`${row.directory.padEnd(15)} ${
|
|
174
|
+
console.log(`${row.directory.padEnd(15)} ${(0, size_1.formatCompactCount)(row.lines)}`);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
async function runLocCommand(owner, repo) {
|