@herodevs/cli 0.2.1 → 0.2.2-beta.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/README.md +6 -30
- package/core-types/README.md +11 -0
- package/core-types/package.json +11 -0
- package/core-types/src/index.d.ts +1 -0
- package/core-types/src/index.js +5 -0
- package/core-types/src/index.js.map +1 -0
- package/core-types/src/lib/project-type.d.ts +1 -0
- package/core-types/src/lib/project-type.js +3 -0
- package/core-types/src/lib/project-type.js.map +1 -0
- package/init/README.md +11 -0
- package/init/package.json +11 -0
- package/init/src/index.d.ts +1 -0
- package/{dist/shared/command → init/src}/index.js +2 -1
- package/init/src/index.js.map +1 -0
- package/init/src/lib/configure-project.d.ts +3 -0
- package/init/src/lib/configure-project.js +11 -0
- package/init/src/lib/configure-project.js.map +1 -0
- package/init/src/lib/get-package-choices.d.ts +2 -0
- package/init/src/lib/get-package-choices.js +17 -0
- package/init/src/lib/get-package-choices.js.map +1 -0
- package/init/src/lib/get-product-choices.d.ts +3 -0
- package/init/src/lib/get-product-choices.js +19 -0
- package/init/src/lib/get-product-choices.js.map +1 -0
- package/init/src/lib/get-release-trains.d.ts +3 -0
- package/init/src/lib/get-release-trains.js +63 -0
- package/init/src/lib/get-release-trains.js.map +1 -0
- package/init/src/lib/init.d.ts +5 -0
- package/init/src/lib/init.js +56 -0
- package/init/src/lib/init.js.map +1 -0
- package/init/src/lib/mock-trains.d.ts +2 -0
- package/init/src/lib/mock-trains.js +190 -0
- package/init/src/lib/mock-trains.js.map +1 -0
- package/init/src/lib/models/choice.d.ts +4 -0
- package/init/src/lib/models/choice.js +3 -0
- package/init/src/lib/models/choice.js.map +1 -0
- package/init/src/lib/models/entry.d.ts +6 -0
- package/{dist/shared/types/flags.type.js → init/src/lib/models/entry.js} +1 -0
- package/init/src/lib/models/entry.js.map +1 -0
- package/init/src/lib/models/index.d.ts +5 -0
- package/init/src/lib/models/index.js +9 -0
- package/init/src/lib/models/index.js.map +1 -0
- package/init/src/lib/models/package-version.d.ts +14 -0
- package/init/src/lib/models/package-version.js +3 -0
- package/init/src/lib/models/package-version.js.map +1 -0
- package/init/src/lib/models/product.d.ts +5 -0
- package/init/src/lib/models/product.js +3 -0
- package/init/src/lib/models/product.js.map +1 -0
- package/init/src/lib/models/release-train.d.ts +9 -0
- package/init/src/lib/models/release-train.js +3 -0
- package/init/src/lib/models/release-train.js.map +1 -0
- package/init/src/lib/npm/configure-npm-project.d.ts +2 -0
- package/init/src/lib/npm/configure-npm-project.js +60 -0
- package/init/src/lib/npm/configure-npm-project.js.map +1 -0
- package/init/src/lib/verify-project-type.d.ts +6 -0
- package/init/src/lib/verify-project-type.js +20 -0
- package/init/src/lib/verify-project-type.js.map +1 -0
- package/package.json +12 -110
- package/report-committers/README.md +11 -0
- package/report-committers/package.json +11 -0
- package/report-committers/src/index.d.ts +1 -0
- package/{dist/shared/config → report-committers/src}/index.js +2 -1
- package/report-committers/src/index.js.map +1 -0
- package/report-committers/src/lib/collapse-and-sort-committer-info.d.ts +2 -0
- package/report-committers/src/lib/collapse-and-sort-committer-info.js +31 -0
- package/report-committers/src/lib/collapse-and-sort-committer-info.js.map +1 -0
- package/report-committers/src/lib/committers.d.ts +9 -0
- package/report-committers/src/lib/committers.js +102 -0
- package/report-committers/src/lib/committers.js.map +1 -0
- package/report-committers/src/lib/constants.d.ts +4 -0
- package/report-committers/src/lib/constants.js +8 -0
- package/report-committers/src/lib/constants.js.map +1 -0
- package/report-committers/src/lib/get-committer-counts.d.ts +2 -0
- package/report-committers/src/lib/get-committer-counts.js +18 -0
- package/report-committers/src/lib/get-committer-counts.js.map +1 -0
- package/report-committers/src/lib/parse-date-flags.d.ts +4 -0
- package/report-committers/src/lib/parse-date-flags.js +12 -0
- package/report-committers/src/lib/parse-date-flags.js.map +1 -0
- package/report-committers/src/lib/parse-git-log-entries.d.ts +2 -0
- package/report-committers/src/lib/parse-git-log-entries.js +12 -0
- package/report-committers/src/lib/parse-git-log-entries.js.map +1 -0
- package/report-committers/src/lib/parse-monthly.d.ts +6 -0
- package/report-committers/src/lib/parse-monthly.js +41 -0
- package/report-committers/src/lib/parse-monthly.js.map +1 -0
- package/report-committers/src/lib/print-committers.d.ts +0 -0
- package/report-committers/src/lib/print-committers.js +2 -0
- package/report-committers/src/lib/print-committers.js.map +1 -0
- package/report-committers/src/lib/print-monthly.d.ts +2 -0
- package/report-committers/src/lib/print-monthly.js +79 -0
- package/report-committers/src/lib/print-monthly.js.map +1 -0
- package/report-committers/src/lib/types.d.ts +26 -0
- package/report-committers/src/lib/types.js +3 -0
- package/report-committers/src/lib/types.js.map +1 -0
- package/report-diagnostics/README.md +11 -0
- package/report-diagnostics/package.json +11 -0
- package/report-diagnostics/src/index.d.ts +1 -0
- package/report-diagnostics/src/index.js +5 -0
- package/report-diagnostics/src/index.js.map +1 -0
- package/report-diagnostics/src/lib/diagnostics.d.ts +7 -0
- package/report-diagnostics/src/lib/diagnostics.js +94 -0
- package/report-diagnostics/src/lib/diagnostics.js.map +1 -0
- package/report-diagnostics/src/lib/get-diagnostic-types.d.ts +4 -0
- package/report-diagnostics/src/lib/get-diagnostic-types.js +16 -0
- package/report-diagnostics/src/lib/get-diagnostic-types.js.map +1 -0
- package/report-diagnostics/src/lib/get-file-contents.d.ts +1 -0
- package/report-diagnostics/src/lib/get-file-contents.js +13 -0
- package/report-diagnostics/src/lib/get-file-contents.js.map +1 -0
- package/report-diagnostics/src/lib/get-package-json-section.d.ts +1 -0
- package/report-diagnostics/src/lib/get-package-json-section.js +16 -0
- package/report-diagnostics/src/lib/get-package-json-section.js.map +1 -0
- package/src/lib/cli.d.ts +1 -0
- package/src/lib/cli.js +22 -0
- package/src/lib/cli.js.map +1 -0
- package/src/lib/create-group-command.d.ts +2 -0
- package/src/lib/create-group-command.js +29 -0
- package/src/lib/create-group-command.js.map +1 -0
- package/src/lib/ensure-version.d.ts +2 -0
- package/src/lib/ensure-version.js +52 -0
- package/src/lib/ensure-version.js.map +1 -0
- package/src/lib/get-commands.d.ts +2 -0
- package/src/lib/get-commands.js +18 -0
- package/src/lib/get-commands.js.map +1 -0
- package/{dist/shared/enums → src/lib}/log-colors.js +1 -0
- package/src/lib/log-colors.js.map +1 -0
- package/src/main.d.ts +2 -0
- package/src/main.js +6 -0
- package/src/main.js.map +1 -0
- package/tracker-init/README.md +11 -0
- package/tracker-init/package.json +11 -0
- package/tracker-init/src/index.d.ts +1 -0
- package/{dist/shared/enums → tracker-init/src}/index.js +2 -1
- package/tracker-init/src/index.js.map +1 -0
- package/tracker-init/src/lib/default-config.d.ts +2 -0
- package/tracker-init/src/lib/default-config.js +20 -0
- package/tracker-init/src/lib/default-config.js.map +1 -0
- package/tracker-init/src/lib/init.d.ts +5 -0
- package/tracker-init/src/lib/init.js +25 -0
- package/tracker-init/src/lib/init.js.map +1 -0
- package/tracker-run/README.md +11 -0
- package/tracker-run/package.json +11 -0
- package/tracker-run/src/index.d.ts +1 -0
- package/{dist/shared/types → tracker-run/src}/index.js +2 -1
- package/tracker-run/src/index.js.map +1 -0
- package/tracker-run/src/lib/get-data-filepath.d.ts +1 -0
- package/tracker-run/src/lib/get-data-filepath.js +9 -0
- package/tracker-run/src/lib/get-data-filepath.js.map +1 -0
- package/tracker-run/src/lib/get-data.d.ts +1 -0
- package/tracker-run/src/lib/get-data.js +15 -0
- package/tracker-run/src/lib/get-data.js.map +1 -0
- package/tracker-run/src/lib/get-git-commit.d.ts +4 -0
- package/tracker-run/src/lib/get-git-commit.js +33 -0
- package/tracker-run/src/lib/get-git-commit.js.map +1 -0
- package/tracker-run/src/lib/process-category.d.ts +2 -0
- package/tracker-run/src/lib/process-category.js +152 -0
- package/tracker-run/src/lib/process-category.js.map +1 -0
- package/tracker-run/src/lib/process-config.d.ts +2 -0
- package/tracker-run/src/lib/process-config.js +20 -0
- package/tracker-run/src/lib/process-config.js.map +1 -0
- package/tracker-run/src/lib/run.d.ts +7 -0
- package/tracker-run/src/lib/run.js +29 -0
- package/tracker-run/src/lib/run.js.map +1 -0
- package/tracker-run/src/lib/save-results.d.ts +2 -0
- package/tracker-run/src/lib/save-results.js +20 -0
- package/tracker-run/src/lib/save-results.js.map +1 -0
- package/tracker-shared/README.md +11 -0
- package/tracker-shared/package.json +11 -0
- package/tracker-shared/src/index.d.ts +2 -0
- package/tracker-shared/src/index.js +14 -0
- package/tracker-shared/src/index.js.map +1 -0
- package/tracker-shared/src/lib/models/aggregate-result.d.ts +4 -0
- package/tracker-shared/src/lib/models/aggregate-result.js +3 -0
- package/tracker-shared/src/lib/models/aggregate-result.js.map +1 -0
- package/tracker-shared/src/lib/models/category-result.d.ts +7 -0
- package/tracker-shared/src/lib/models/category-result.js +3 -0
- package/tracker-shared/src/lib/models/category-result.js.map +1 -0
- package/tracker-shared/src/lib/models/category.d.ts +9 -0
- package/tracker-shared/src/lib/models/category.js +3 -0
- package/tracker-shared/src/lib/models/category.js.map +1 -0
- package/tracker-shared/src/lib/models/config.d.ts +8 -0
- package/tracker-shared/src/lib/models/config.js +3 -0
- package/tracker-shared/src/lib/models/config.js.map +1 -0
- package/tracker-shared/src/lib/models/file-result.d.ts +5 -0
- package/tracker-shared/src/lib/models/file-result.js +3 -0
- package/tracker-shared/src/lib/models/file-result.js.map +1 -0
- package/tracker-shared/src/lib/models/index.d.ts +8 -0
- package/tracker-shared/src/lib/models/index.js +12 -0
- package/tracker-shared/src/lib/models/index.js.map +1 -0
- package/tracker-shared/src/lib/models/process-result.d.ts +6 -0
- package/tracker-shared/src/lib/models/process-result.js +3 -0
- package/tracker-shared/src/lib/models/process-result.js.map +1 -0
- package/tracker-shared/src/lib/models/result.d.ts +11 -0
- package/tracker-shared/src/lib/models/result.js +3 -0
- package/tracker-shared/src/lib/models/result.js.map +1 -0
- package/tracker-shared/src/lib/models/total-result.d.ts +4 -0
- package/tracker-shared/src/lib/models/total-result.js +3 -0
- package/tracker-shared/src/lib/models/total-result.js.map +1 -0
- package/tracker-shared/src/lib/read-config.d.ts +2 -0
- package/tracker-shared/src/lib/read-config.js +14 -0
- package/tracker-shared/src/lib/read-config.js.map +1 -0
- package/utility/README.md +11 -0
- package/utility/package.json +11 -0
- package/utility/src/index.d.ts +4 -0
- package/utility/src/index.js +8 -0
- package/utility/src/index.js.map +1 -0
- package/utility/src/lib/get-project-types.d.ts +2 -0
- package/utility/src/lib/get-project-types.js +14 -0
- package/utility/src/lib/get-project-types.js.map +1 -0
- package/utility/src/lib/get-root-dir.d.ts +1 -0
- package/utility/src/lib/get-root-dir.js +13 -0
- package/utility/src/lib/get-root-dir.js.map +1 -0
- package/utility/src/lib/run-command.d.ts +1 -0
- package/utility/src/lib/run-command.js +32 -0
- package/utility/src/lib/run-command.js.map +1 -0
- package/utility/src/lib/sort-by-name.d.ts +3 -0
- package/utility/src/lib/sort-by-name.js +8 -0
- package/utility/src/lib/sort-by-name.js.map +1 -0
- package/bin/dev +0 -17
- package/bin/dev.cmd +0 -3
- package/bin/run +0 -5
- package/bin/run.cmd +0 -3
- package/dist/commands/report/committers.d.ts +0 -19
- package/dist/commands/report/committers.js +0 -190
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -5
- package/dist/package.json +0 -117
- package/dist/shared/command/base-command.d.ts +0 -22
- package/dist/shared/command/base-command.js +0 -47
- package/dist/shared/command/index.d.ts +0 -1
- package/dist/shared/config/environment.d.ts +0 -4
- package/dist/shared/config/environment.js +0 -10
- package/dist/shared/config/index.d.ts +0 -1
- package/dist/shared/enums/index.d.ts +0 -1
- package/dist/shared/index.d.ts +0 -4
- package/dist/shared/index.js +0 -7
- package/dist/shared/lib/index.d.ts +0 -2
- package/dist/shared/lib/index.js +0 -5
- package/dist/shared/lib/shell.d.ts +0 -7
- package/dist/shared/lib/shell.js +0 -34
- package/dist/shared/lib/version-update.d.ts +0 -3
- package/dist/shared/lib/version-update.js +0 -52
- package/dist/shared/types/flags.type.d.ts +0 -4
- package/dist/shared/types/index.d.ts +0 -1
- package/oclif.manifest.json +0 -75
- /package/{dist/shared/enums → src/lib}/log-colors.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../../../../../libs/nes/init/src/lib/models/product.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-train.js","sourceRoot":"","sources":["../../../../../../../libs/nes/init/src/lib/models/release-train.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureNpmProject = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
function configureNpmProject(accessToken, packages) {
|
|
7
|
+
updatePackageJson(packages);
|
|
8
|
+
updateNpmrc(accessToken);
|
|
9
|
+
}
|
|
10
|
+
exports.configureNpmProject = configureNpmProject;
|
|
11
|
+
function updatePackageJson(packages) {
|
|
12
|
+
const packageJsonPath = path.join(process.cwd(), 'package.json');
|
|
13
|
+
const packageJsonContents = (0, fs_1.readFileSync)(packageJsonPath, 'utf8');
|
|
14
|
+
const packageJson = JSON.parse(packageJsonContents);
|
|
15
|
+
const pkgUpdates = packages
|
|
16
|
+
.map((p) => {
|
|
17
|
+
var _a;
|
|
18
|
+
return ({
|
|
19
|
+
key: ((_a = p.packageVersion.origination) === null || _a === void 0 ? void 0 : _a.name) || p.packageVersion.name,
|
|
20
|
+
value: p.packageVersion.fqns,
|
|
21
|
+
});
|
|
22
|
+
})
|
|
23
|
+
.reduce((acc, cur) => {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
// Update the appropriate section of the package.json (dependencies if not dev or peer)
|
|
26
|
+
if ((_a = packageJson.devDependencies) === null || _a === void 0 ? void 0 : _a[cur.key]) {
|
|
27
|
+
acc.devDeps[cur.key] = `npm:${cur.value}`;
|
|
28
|
+
}
|
|
29
|
+
else if ((_b = packageJson.peerDependencies) === null || _b === void 0 ? void 0 : _b[cur.key]) {
|
|
30
|
+
acc.peerDeps[cur.key] = `npm:${cur.value}`;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
acc.deps[cur.key] = `npm:${cur.value}`;
|
|
34
|
+
}
|
|
35
|
+
acc.overrides[cur.key] = { '.': `npm:${cur.value}` };
|
|
36
|
+
return acc;
|
|
37
|
+
}, { deps: {}, devDeps: {}, peerDeps: {}, overrides: {} });
|
|
38
|
+
packageJson.dependencies = Object.assign(Object.assign({}, (packageJson.dependencies || {})), pkgUpdates.deps);
|
|
39
|
+
packageJson.devDependencies = Object.assign(Object.assign({}, (packageJson.devDependencies || {})), pkgUpdates.devDeps);
|
|
40
|
+
packageJson.peerDependencies = Object.assign(Object.assign({}, (packageJson.peerDependencies || {})), pkgUpdates.peerDeps);
|
|
41
|
+
packageJson.overrides = Object.assign(Object.assign({}, (packageJson.overrides || {})), pkgUpdates.overrides);
|
|
42
|
+
(0, fs_1.writeFileSync)(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
43
|
+
}
|
|
44
|
+
function updateNpmrc(accessToken) {
|
|
45
|
+
const npmrcPath = path.join(process.cwd(), '.npmrc');
|
|
46
|
+
let npmrcContents = '';
|
|
47
|
+
if ((0, fs_1.existsSync)(npmrcPath)) {
|
|
48
|
+
npmrcContents = (0, fs_1.readFileSync)(npmrcPath, 'utf8');
|
|
49
|
+
}
|
|
50
|
+
if (npmrcContents.includes(`@neverendingsupport:registry`)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const updatedContents = npmrcContents +
|
|
54
|
+
`\n\n` +
|
|
55
|
+
`@neverendingsupport:registry=https://registry.nes.herodevs.com/npm/pkg/` +
|
|
56
|
+
`\n` +
|
|
57
|
+
`//registry.nes.herodevs.com/npm/pkg/:_authToken="${accessToken}"`;
|
|
58
|
+
(0, fs_1.writeFileSync)(npmrcPath, updatedContents);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=configure-npm-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-npm-project.js","sourceRoot":"","sources":["../../../../../../../libs/nes/init/src/lib/npm/configure-npm-project.ts"],"names":[],"mappings":";;;AAAA,2BAA6D;AAE7D,6BAA8B;AAE9B,SAAgB,mBAAmB,CAAC,WAAmB,EAAE,QAAiB;IACxE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5B,WAAW,CAAC,WAAW,CAAC,CAAC;AAC3B,CAAC;AAHD,kDAGC;AAED,SAAS,iBAAiB,CAAC,QAAiB;IAC1C,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IACjE,MAAM,mBAAmB,GAAG,IAAA,iBAAY,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAEpD,MAAM,UAAU,GAAG,QAAQ;SACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;QAAC,OAAA,CAAC;YACX,GAAG,EAAE,CAAA,MAAA,CAAC,CAAC,cAAc,CAAC,WAAW,0CAAE,IAAI,KAAI,CAAC,CAAC,cAAc,CAAC,IAAI;YAChE,KAAK,EAAE,CAAC,CAAC,cAAc,CAAC,IAAI;SAC7B,CAAC,CAAA;KAAA,CAAC;SACF,MAAM,CACL,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;;QACX,uFAAuF;QACvF,IAAI,MAAA,WAAW,CAAC,eAAe,0CAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3C,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;QAC5C,CAAC;aAAM,IAAI,MAAA,WAAW,CAAC,gBAAgB,0CAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,QAAQ,CAAC,GAA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,CAAC,EAAE,CAAC;QAC1B,aAAa,GAAG,IAAA,iBAAY,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,aAAa,CAAC,QAAQ,CAAC,8BAA8B,CAAC,EAAE,CAAC;QAC3D,OAAO;IACT,CAAC;IAED,MAAM,eAAe,GACnB,aAAa;QACb,MAAM;QACN,yEAAyE;QACzE,IAAI;QACJ,oDAAoD,WAAW,GAAG,CAAC;IAErE,IAAA,kBAAa,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyProjectType = void 0;
|
|
4
|
+
const utility_1 = require("../../../utility/src");
|
|
5
|
+
function verifyProjectType() {
|
|
6
|
+
const types = (0, utility_1.getProjectTypes)();
|
|
7
|
+
let valid = true;
|
|
8
|
+
let error = undefined;
|
|
9
|
+
if (types.length === 0) {
|
|
10
|
+
valid = false;
|
|
11
|
+
error = 'Unable to recognize a supported project type.';
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
types: types,
|
|
15
|
+
valid,
|
|
16
|
+
error,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.verifyProjectType = verifyProjectType;
|
|
20
|
+
//# sourceMappingURL=verify-project-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-project-type.js","sourceRoot":"","sources":["../../../../../../libs/nes/init/src/lib/verify-project-type.ts"],"names":[],"mappings":";;;AACA,+CAAoD;AAEpD,SAAgB,iBAAiB;IAK/B,MAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAChC,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAI,KAAK,GAAuB,SAAS,CAAC;IAC1C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,+CAA+C,CAAC;IAC1D,CAAC;IAED,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,KAAK;QACL,KAAK;KACN,CAAC;AACJ,CAAC;AAlBD,8CAkBC"}
|
package/package.json
CHANGED
|
@@ -1,117 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herodevs/cli",
|
|
3
|
-
"version": "0.2.1",
|
|
4
|
-
"
|
|
5
|
-
"author": "@herodevs",
|
|
6
|
-
"bin": {
|
|
7
|
-
"@herodevs/cli": "./bin/run",
|
|
8
|
-
"hd": "./bin/run"
|
|
9
|
-
},
|
|
10
|
-
"homepage": "https://github.com/herodevs/cli",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"main": "dist/index.js",
|
|
13
|
-
"repository": "herodevs/cli",
|
|
14
|
-
"files": [
|
|
15
|
-
"/bin",
|
|
16
|
-
"/dist",
|
|
17
|
-
"/npm-shrinkwrap.json",
|
|
18
|
-
"/oclif.manifest.json",
|
|
19
|
-
"package.json"
|
|
20
|
-
],
|
|
3
|
+
"version": "0.2.2-beta.1",
|
|
4
|
+
"bin": "./src/main.js",
|
|
21
5
|
"dependencies": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"@oclif/plugin-plugins": "^3.2.0",
|
|
25
|
-
"date-fns": "^2.30.0",
|
|
6
|
+
"tslib": "^2.3.0",
|
|
7
|
+
"yargs": "^17.7.2",
|
|
26
8
|
"get-json": "^1.0.1",
|
|
9
|
+
"date-fns": "^3.6.0",
|
|
10
|
+
"@inquirer/prompts": "^5.0.2",
|
|
27
11
|
"git-last-commit": "^1.0.1",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@oclif/test": "^2.4.4",
|
|
34
|
-
"@types/chai": "^4",
|
|
35
|
-
"@types/mocha": "^9.0.0",
|
|
36
|
-
"@types/node": "^16.18.40",
|
|
37
|
-
"chai": "^4",
|
|
38
|
-
"eslint": "^7.32.0",
|
|
39
|
-
"eslint-config-oclif": "^4",
|
|
40
|
-
"eslint-config-oclif-typescript": "^1.0.3",
|
|
41
|
-
"mocha": "^9",
|
|
42
|
-
"oclif": "^3.11.3",
|
|
43
|
-
"shx": "^0.3.3",
|
|
44
|
-
"ts-node": "^10.9.1",
|
|
45
|
-
"tslib": "^2.6.1",
|
|
46
|
-
"typescript": "^4.9.5"
|
|
47
|
-
},
|
|
48
|
-
"oclif": {
|
|
49
|
-
"bin": "@herodevs/cli",
|
|
50
|
-
"dirname": "@herodevs/cli",
|
|
51
|
-
"commands": "./dist/commands",
|
|
52
|
-
"plugins": [
|
|
53
|
-
"@oclif/plugin-help"
|
|
54
|
-
],
|
|
55
|
-
"topicSeparator": " ",
|
|
56
|
-
"topics": {
|
|
57
|
-
"report": {
|
|
58
|
-
"description": "Run reports for the current project (commands: committers)"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"scripts": {
|
|
63
|
-
"generate:command": "oclif generate command",
|
|
64
|
-
"start": "npm run dev",
|
|
65
|
-
"predev": "npm run build",
|
|
66
|
-
"dev": "./bin/dev",
|
|
67
|
-
"preprod": "npm run build",
|
|
68
|
-
"prod": "./bin/run",
|
|
69
|
-
"build": "shx rm -rf dist && tsc -b && shx cp package.json dist/package.json",
|
|
70
|
-
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
71
|
-
"postpack": "shx rm -f oclif.manifest.json",
|
|
72
|
-
"posttestXXX": "npm run lint",
|
|
73
|
-
"prepack": "npm run build && oclif manifest && oclif readme",
|
|
74
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
75
|
-
"version": "oclif readme && git add README.md",
|
|
76
|
-
"amendCommit": "git add . -A && git commit --amend --no-edit",
|
|
77
|
-
"version:branch": "npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag",
|
|
78
|
-
"prepublish:branch": "npm run version:branch",
|
|
79
|
-
"publish:branch": "npm publish --tag $(git rev-parse --short=8 HEAD^) --access public",
|
|
80
|
-
"postpublish:branch": "npm run amendCommit",
|
|
81
|
-
"version:beta": "npm version prerelease --preid beta --no-git-tag",
|
|
82
|
-
"prepublish:beta": "npm run version:beta",
|
|
83
|
-
"publish:beta": "npm publish --tag beta --access public",
|
|
84
|
-
"postpublish:beta": "npm run amendCommit",
|
|
85
|
-
"version:major": "npm version major --no-git-tag",
|
|
86
|
-
"prepublish:major": "npm run version:major",
|
|
87
|
-
"publish:major": "npm publish --access public",
|
|
88
|
-
"postpublish:major": "npm run amendCommit",
|
|
89
|
-
"version:minor": "npm version minor --no-git-tag",
|
|
90
|
-
"prepublish:minor": "npm run version:minor",
|
|
91
|
-
"publish:minor": "npm publish --access public",
|
|
92
|
-
"postpublish:minor": "npm run amendCommit",
|
|
93
|
-
"version:patch": "npm version patch --no-git-tag",
|
|
94
|
-
"prepublish:patch": "npm run version:patch",
|
|
95
|
-
"publish:patch": "npm publish --access public",
|
|
96
|
-
"postpublish:patch": "npm run amendCommit",
|
|
97
|
-
"buildAndPublishBranch": "npm run build && npm run publish:branch",
|
|
98
|
-
"buildAndPublishBeta": "npm run build && npm run publish:beta && npm dist-tag add @herodevs/cli@$(node -e \"console.log(require('./package.json').version)\") latest",
|
|
99
|
-
"buildAndPublishMajor": "npm run build && npm run publish:major",
|
|
100
|
-
"buildAndPublishMinor": "npm run build && npm run publish:minor",
|
|
101
|
-
"buildAndPublishPatch": "npm run build && npm run publish:patch"
|
|
102
|
-
},
|
|
103
|
-
"engines": {
|
|
104
|
-
"node": ">=12.0.0"
|
|
12
|
+
"sloc": "^0.3.2",
|
|
13
|
+
"@apollo/client": "^3.10.1",
|
|
14
|
+
"ora": "5.3.0"
|
|
105
15
|
},
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
],
|
|
110
|
-
"types": "dist/index.d.ts",
|
|
111
|
-
"prettier": {
|
|
112
|
-
"singleQuote": true,
|
|
113
|
-
"trailingComma": "es5",
|
|
114
|
-
"bracketSpacing": true,
|
|
115
|
-
"printWidth": 100
|
|
116
|
-
}
|
|
16
|
+
"type": "commonjs",
|
|
17
|
+
"main": "./src/main.js",
|
|
18
|
+
"typings": "./src/main.d.ts"
|
|
117
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/committers';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
tslib_1.__exportStar(require("./lib/committers"), exports);
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/report/committers/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collapseAndSortCommitterInfo = void 0;
|
|
4
|
+
function collapseAndSortCommitterInfo(startDate, endDate, rawEntries) {
|
|
5
|
+
return undefined;
|
|
6
|
+
/*
|
|
7
|
+
const entries = parseGitLogEntries(rawEntries);
|
|
8
|
+
const committerHash = {} as any;
|
|
9
|
+
for (let i = 0; i < entries.length; i++) {
|
|
10
|
+
committerHash[entries[i].committer] =
|
|
11
|
+
committerHash[entries[i].committer] || [];
|
|
12
|
+
committerHash[entries[i].committer].push(
|
|
13
|
+
[entries[i].commitHash, entries[i].date].join(' ')
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const sortable = [] as { name: string; commits: string[] }[];
|
|
18
|
+
Object.keys(committerHash).forEach((name) => {
|
|
19
|
+
sortable.push({ name, commits: committerHash[name] });
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const committers = sortable.sort((a, b) => {
|
|
23
|
+
return b.commits.length - a.commits.length;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const monthly = parseMonthly(startDate, endDate, entries);
|
|
27
|
+
return { committers, monthly };
|
|
28
|
+
*/
|
|
29
|
+
}
|
|
30
|
+
exports.collapseAndSortCommitterInfo = collapseAndSortCommitterInfo;
|
|
31
|
+
//# sourceMappingURL=collapse-and-sort-committer-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapse-and-sort-committer-info.js","sourceRoot":"","sources":["../../../../../../libs/report/committers/src/lib/collapse-and-sort-committer-info.ts"],"names":[],"mappings":";;;AAIA,SAAgB,4BAA4B,CAC1C,SAAe,EACf,OAAa,EACb,UAAoB;IAEpB,OAAO,SAAgB,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;;;MAsBE;AACJ,CAAC;AA7BD,oEA6BC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reportCommittersCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const date_fns_1 = require("date-fns");
|
|
6
|
+
const utility_1 = require("../../../utility/src");
|
|
7
|
+
const parse_date_flags_1 = require("./parse-date-flags");
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
const parse_git_log_entries_1 = require("./parse-git-log-entries");
|
|
10
|
+
const get_committer_counts_1 = require("./get-committer-counts");
|
|
11
|
+
exports.reportCommittersCommand = {
|
|
12
|
+
command: 'committers',
|
|
13
|
+
describe: 'show git committers',
|
|
14
|
+
aliases: [],
|
|
15
|
+
builder: {
|
|
16
|
+
startDate: {
|
|
17
|
+
alias: 's',
|
|
18
|
+
default: (0, date_fns_1.format)(new Date(), constants_1.dateFormat),
|
|
19
|
+
describe: `Start Date (format: ${constants_1.dateFormat})`,
|
|
20
|
+
string: true,
|
|
21
|
+
},
|
|
22
|
+
endDate: {
|
|
23
|
+
alias: 'e',
|
|
24
|
+
describe: `End Date (format: ${constants_1.dateFormat})`,
|
|
25
|
+
required: false,
|
|
26
|
+
default: (0, date_fns_1.format)((0, date_fns_1.subMonths)(new Date(), constants_1.monthsToSubtract), constants_1.dateFormat),
|
|
27
|
+
},
|
|
28
|
+
exclude: {
|
|
29
|
+
alias: 'x',
|
|
30
|
+
array: true,
|
|
31
|
+
describe: 'Path Exclusions (eg -x="./src/bin" -x="./dist")',
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
json: {
|
|
35
|
+
describe: 'Output to JSON format',
|
|
36
|
+
required: false,
|
|
37
|
+
default: false,
|
|
38
|
+
boolean: true,
|
|
39
|
+
},
|
|
40
|
+
// monthly: {
|
|
41
|
+
// alias: 'm',
|
|
42
|
+
// describe:
|
|
43
|
+
// 'Break down by calendar month, rather than by committer. (eg -m)',
|
|
44
|
+
// required: false,
|
|
45
|
+
// default: false,
|
|
46
|
+
// },
|
|
47
|
+
},
|
|
48
|
+
handler: run,
|
|
49
|
+
};
|
|
50
|
+
function run(args) {
|
|
51
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const { startDate, endDate } = (0, parse_date_flags_1.parseDateFlags)(constants_1.dateFormat, args.startDate, args.endDate);
|
|
53
|
+
const ignores = args.exclude && args.exclude.length ? `-- . "!(${args.exclude.join('|')})"` : '';
|
|
54
|
+
const gitCommand = `git log --since "${endDate}" --until "${startDate}" --pretty=format:${constants_1.gitOutputFormat} ${ignores}`;
|
|
55
|
+
const result = yield (0, utility_1.runCommand)(gitCommand);
|
|
56
|
+
const rawEntries = result.split('\n');
|
|
57
|
+
// const { committers, monthly } = collapseAndSortCommitterInfo(startDate, endDate, rawEntries);
|
|
58
|
+
// if( args.monthly ){
|
|
59
|
+
// printMonthly(monthly);
|
|
60
|
+
// return;
|
|
61
|
+
// }else{
|
|
62
|
+
// printCommitters(committers);
|
|
63
|
+
// return;
|
|
64
|
+
// }
|
|
65
|
+
if (rawEntries.length === 1 && rawEntries[0] === '') {
|
|
66
|
+
const startDateStr = (0, date_fns_1.format)(startDate, 'yyyy-MM-dd');
|
|
67
|
+
const endDateStr = (0, date_fns_1.format)(endDate, 'yyyy-MM-dd');
|
|
68
|
+
console.log(`No commits found between ${endDateStr} and ${startDateStr}`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const entries = (0, parse_git_log_entries_1.parseGitLogEntries)(rawEntries);
|
|
72
|
+
const committerCounts = (0, get_committer_counts_1.getCommitterCounts)(entries);
|
|
73
|
+
if (args.json) {
|
|
74
|
+
outputCommittersJson(committerCounts);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
outputCommitters(committerCounts);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function outputCommitters(committerCounts) {
|
|
82
|
+
const longestNameLength = committerCounts.reduce((acc, c) => {
|
|
83
|
+
return c.name.length > acc ? c.name.length : acc;
|
|
84
|
+
}, 'Committer'.length);
|
|
85
|
+
const header = `Committer${' '.repeat(longestNameLength - 9)} | Commits`;
|
|
86
|
+
console.log(header);
|
|
87
|
+
console.log(header
|
|
88
|
+
.split('')
|
|
89
|
+
.map((c) => (c === '|' ? '|' : '-'))
|
|
90
|
+
.join(''));
|
|
91
|
+
console.log(committerCounts
|
|
92
|
+
.map((c) => {
|
|
93
|
+
const committer = `${c.name}${' '.repeat(longestNameLength - c.name.length)}`;
|
|
94
|
+
const count = ' '.repeat(7 - c.count.toString().length) + c.count;
|
|
95
|
+
return `${committer} | ${count}`;
|
|
96
|
+
})
|
|
97
|
+
.join('\n'));
|
|
98
|
+
}
|
|
99
|
+
function outputCommittersJson(committerCounts) {
|
|
100
|
+
console.log(JSON.stringify(committerCounts, null, 2));
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=committers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"committers.js","sourceRoot":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 -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitOutputFormat = exports.monthsToSubtract = exports.gammaDelimiter = exports.dateFormat = void 0;
|
|
4
|
+
exports.dateFormat = 'yyyy-MM-dd';
|
|
5
|
+
exports.gammaDelimiter = 'ΓΓΓΓ';
|
|
6
|
+
exports.monthsToSubtract = 12;
|
|
7
|
+
exports.gitOutputFormat = `"${['%h', '%an', '%ad'].join(exports.gammaDelimiter)}"`;
|
|
8
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../libs/report/committers/src/lib/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,cAAc,GAAG,MAAM,CAAC;AACxB,QAAA,gBAAgB,GAAG,EAAE,CAAC;AACtB,QAAA,eAAe,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,sBAAc,CAAC,GAAG,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCommitterCounts = void 0;
|
|
4
|
+
function getCommitterCounts(entries) {
|
|
5
|
+
return entries
|
|
6
|
+
.reduce((acc, entry) => {
|
|
7
|
+
let committerCount = acc.find((c) => c.name === entry.committer);
|
|
8
|
+
if (!committerCount) {
|
|
9
|
+
committerCount = { name: entry.committer, count: 0 };
|
|
10
|
+
acc.push(committerCount);
|
|
11
|
+
}
|
|
12
|
+
committerCount.count++;
|
|
13
|
+
return acc;
|
|
14
|
+
}, [])
|
|
15
|
+
.sort((a, b) => b.count - a.count);
|
|
16
|
+
}
|
|
17
|
+
exports.getCommitterCounts = getCommitterCounts;
|
|
18
|
+
//# sourceMappingURL=get-committer-counts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-committer-counts.js","sourceRoot":"","sources":["../../../../../../libs/report/committers/src/lib/get-committer-counts.ts"],"names":[],"mappings":";;;AAEA,SAAgB,kBAAkB,CAAC,OAAiB;IAClD,OAAO,OAAO;SACX,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACrB,IAAI,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;QACjE,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,cAAc,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YACrD,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3B,CAAC;QACD,cAAc,CAAC,KAAK,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAsB,CAAC;SACzB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAZD,gDAYC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseDateFlags = void 0;
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
function parseDateFlags(dateFormat, startDate, endDate) {
|
|
6
|
+
return {
|
|
7
|
+
endDate: (0, date_fns_1.parse)(endDate, dateFormat, new Date()),
|
|
8
|
+
startDate: (0, date_fns_1.parse)(startDate, dateFormat, new Date()),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.parseDateFlags = parseDateFlags;
|
|
12
|
+
//# sourceMappingURL=parse-date-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-date-flags.js","sourceRoot":"","sources":["../../../../../../libs/report/committers/src/lib/parse-date-flags.ts"],"names":[],"mappings":";;;AAAA,uCAAiC;AAEjC,SAAgB,cAAc,CAC5B,UAAkB,EAClB,SAAiB,EACjB,OAAe;IAEf,OAAO;QACL,OAAO,EAAE,IAAA,gBAAK,EAAC,OAAO,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;QAC/C,SAAS,EAAE,IAAA,gBAAK,EAAC,SAAS,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;KACpD,CAAC;AACJ,CAAC;AATD,wCASC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseGitLogEntries = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
function parseGitLogEntries(entries) {
|
|
6
|
+
return entries.map((entry) => {
|
|
7
|
+
const [commitHash, committer, date] = entry.split(constants_1.gammaDelimiter);
|
|
8
|
+
return { commitHash, committer, date: new Date(date) };
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
exports.parseGitLogEntries = parseGitLogEntries;
|
|
12
|
+
//# sourceMappingURL=parse-git-log-entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-git-log-entries.js","sourceRoot":"","sources":["../../../../../../libs/report/committers/src/lib/parse-git-log-entries.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAG7C,SAAgB,kBAAkB,CAAC,OAAiB;IAClD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3B,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,0BAAc,CAAC,CAAC;QAClE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,EAAY,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AALD,gDAKC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseMonthly = void 0;
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
function parseMonthly(startDate, endDate, entries) {
|
|
6
|
+
const monthly = [];
|
|
7
|
+
const dates = [startDate, endDate];
|
|
8
|
+
const ival = {
|
|
9
|
+
start: (0, date_fns_1.min)(dates),
|
|
10
|
+
end: (0, date_fns_1.max)(dates),
|
|
11
|
+
};
|
|
12
|
+
const range = (0, date_fns_1.eachMonthOfInterval)(ival);
|
|
13
|
+
for (const idxr in range) {
|
|
14
|
+
const idx = parseInt(idxr);
|
|
15
|
+
if (idx + 1 >= range.length) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
const [start, end] = [range[idx], range[idx + 1]];
|
|
19
|
+
const month = {
|
|
20
|
+
name: (0, date_fns_1.format)(start, 'LLLL yyyy'),
|
|
21
|
+
start,
|
|
22
|
+
end,
|
|
23
|
+
committers: {},
|
|
24
|
+
};
|
|
25
|
+
for (const rec of entries) {
|
|
26
|
+
if ((0, date_fns_1.isWithinInterval)(new Date(rec.date), { start, end })) {
|
|
27
|
+
month.committers[rec.committer] = month.committers[rec.committer] || [];
|
|
28
|
+
month.committers[rec.committer].push({
|
|
29
|
+
hash: rec.commitHash,
|
|
30
|
+
date: rec.date,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (Object.keys(month.committers).length > 0) {
|
|
35
|
+
monthly.push(month);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return monthly;
|
|
39
|
+
}
|
|
40
|
+
exports.parseMonthly = parseMonthly;
|
|
41
|
+
//# sourceMappingURL=parse-monthly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC;oBACnC,IAAI,EAAE,GAAG,CAAC,UAAU;oBACpB,IAAI,EAAE,GAAG,CAAC,IAAI;iBACf,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAxCD,oCAwCC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print-committers.js","sourceRoot":"","sources":["../../../../../../libs/report/committers/src/lib/print-committers.ts"],"names":[],"mappings":""}
|