@herodevs/cli 0.2.2 → 0.2.3-rc1

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.
Files changed (75) hide show
  1. package/main.js +959 -0
  2. package/package.json +14 -115
  3. package/README.md +0 -35
  4. package/bin/dev +0 -17
  5. package/bin/dev.cmd +0 -3
  6. package/bin/run +0 -5
  7. package/bin/run.cmd +0 -3
  8. package/dist/commands/report/committers.d.ts +0 -19
  9. package/dist/commands/report/committers.js +0 -190
  10. package/dist/commands/tracker/init.d.ts +0 -8
  11. package/dist/commands/tracker/init.js +0 -16
  12. package/dist/commands/tracker/run.d.ts +0 -11
  13. package/dist/commands/tracker/run.js +0 -37
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.js +0 -5
  16. package/dist/package.json +0 -120
  17. package/dist/shared/command/base-command.d.ts +0 -22
  18. package/dist/shared/command/base-command.js +0 -47
  19. package/dist/shared/command/index.d.ts +0 -1
  20. package/dist/shared/command/index.js +0 -4
  21. package/dist/shared/config/environment.d.ts +0 -4
  22. package/dist/shared/config/environment.js +0 -10
  23. package/dist/shared/config/index.d.ts +0 -1
  24. package/dist/shared/config/index.js +0 -4
  25. package/dist/shared/enums/index.d.ts +0 -1
  26. package/dist/shared/enums/index.js +0 -4
  27. package/dist/shared/enums/log-colors.d.ts +0 -28
  28. package/dist/shared/enums/log-colors.js +0 -9
  29. package/dist/shared/index.d.ts +0 -4
  30. package/dist/shared/index.js +0 -7
  31. package/dist/shared/lib/index.d.ts +0 -2
  32. package/dist/shared/lib/index.js +0 -5
  33. package/dist/shared/lib/shell.d.ts +0 -7
  34. package/dist/shared/lib/shell.js +0 -34
  35. package/dist/shared/lib/version-update.d.ts +0 -3
  36. package/dist/shared/lib/version-update.js +0 -52
  37. package/dist/shared/tracker/default-config.d.ts +0 -3
  38. package/dist/shared/tracker/default-config.js +0 -19
  39. package/dist/shared/tracker/initialize.d.ts +0 -1
  40. package/dist/shared/tracker/initialize.js +0 -15
  41. package/dist/shared/tracker/models/aggregate-result.d.ts +0 -4
  42. package/dist/shared/tracker/models/aggregate-result.js +0 -2
  43. package/dist/shared/tracker/models/category-result.d.ts +0 -7
  44. package/dist/shared/tracker/models/category-result.js +0 -2
  45. package/dist/shared/tracker/models/category.d.ts +0 -9
  46. package/dist/shared/tracker/models/category.js +0 -2
  47. package/dist/shared/tracker/models/chart-config.d.ts +0 -24
  48. package/dist/shared/tracker/models/chart-config.js +0 -65
  49. package/dist/shared/tracker/models/config.d.ts +0 -8
  50. package/dist/shared/tracker/models/config.js +0 -2
  51. package/dist/shared/tracker/models/file-result.d.ts +0 -5
  52. package/dist/shared/tracker/models/file-result.js +0 -2
  53. package/dist/shared/tracker/models/process-result.d.ts +0 -6
  54. package/dist/shared/tracker/models/process-result.js +0 -2
  55. package/dist/shared/tracker/models/result.d.ts +0 -11
  56. package/dist/shared/tracker/models/result.js +0 -2
  57. package/dist/shared/tracker/models/total-result.d.ts +0 -4
  58. package/dist/shared/tracker/models/total-result.js +0 -2
  59. package/dist/shared/tracker/models/viz-dataset.d.ts +0 -4
  60. package/dist/shared/tracker/models/viz-dataset.js +0 -2
  61. package/dist/shared/tracker/models/viz-labels-datasets.d.ts +0 -5
  62. package/dist/shared/tracker/models/viz-labels-datasets.js +0 -2
  63. package/dist/shared/tracker/process-category.d.ts +0 -3
  64. package/dist/shared/tracker/process-category.js +0 -155
  65. package/dist/shared/tracker/process-config.d.ts +0 -3
  66. package/dist/shared/tracker/process-config.js +0 -16
  67. package/dist/shared/tracker/tracker-chart.d.ts +0 -0
  68. package/dist/shared/tracker/tracker-chart.js +0 -156
  69. package/dist/shared/tracker/util.d.ts +0 -17
  70. package/dist/shared/tracker/util.js +0 -98
  71. package/dist/shared/types/flags.type.d.ts +0 -4
  72. package/dist/shared/types/flags.type.js +0 -2
  73. package/dist/shared/types/index.d.ts +0 -1
  74. package/dist/shared/types/index.js +0 -4
  75. package/oclif.manifest.json +0 -118
package/package.json CHANGED
@@ -1,120 +1,19 @@
1
1
  {
2
2
  "name": "@herodevs/cli",
3
- "version": "0.2.2",
4
- "description": "HeroDevs CLI",
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.3-rc1",
4
+ "bin": "./main.js",
21
5
  "dependencies": {
22
- "@oclif/core": "^2",
23
- "@oclif/plugin-help": "^5",
24
- "@oclif/plugin-plugins": "^3.2.0",
25
- "date-fns": "^2.30.0",
26
- "get-json": "^1.0.1",
27
- "git-last-commit": "^1.0.1",
28
- "module-alias": "^2.2.3",
29
- "shelljs": "^0.8.5",
30
- "sloc": "^0.3.2"
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
- "tracker": {
61
- "description": "Track project progress based upon lines of code (commands: init, run)"
62
- }
63
- }
64
- },
65
- "scripts": {
66
- "generate:command": "oclif generate command",
67
- "start": "npm run dev",
68
- "predev": "npm run build",
69
- "dev": "./bin/dev",
70
- "preprod": "npm run build",
71
- "prod": "./bin/run",
72
- "build": "shx rm -rf dist && tsc -b && shx cp package.json dist/package.json",
73
- "lint": "eslint . --ext .ts --config .eslintrc",
74
- "postpack": "shx rm -f oclif.manifest.json",
75
- "posttestXXX": "npm run lint",
76
- "prepack": "npm run build && oclif manifest && oclif readme",
77
- "test": "mocha --forbid-only \"test/**/*.test.ts\"",
78
- "version": "oclif readme && git add README.md",
79
- "amendCommit": "git add . -A && git commit --amend --no-edit",
80
- "version:branch": "npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag",
81
- "prepublish:branch": "npm run version:branch",
82
- "publish:branch": "npm publish --tag $(git rev-parse --short=8 HEAD^) --access public",
83
- "postpublish:branch": "npm run amendCommit",
84
- "version:beta": "npm version prerelease --preid beta --no-git-tag",
85
- "prepublish:beta": "npm run version:beta",
86
- "publish:beta": "npm publish --tag beta --access public",
87
- "postpublish:beta": "npm run amendCommit",
88
- "version:major": "npm version major --no-git-tag",
89
- "prepublish:major": "npm run version:major",
90
- "publish:major": "npm publish --access public",
91
- "postpublish:major": "npm run amendCommit",
92
- "version:minor": "npm version minor --no-git-tag",
93
- "prepublish:minor": "npm run version:minor",
94
- "publish:minor": "npm publish --access public",
95
- "postpublish:minor": "npm run amendCommit",
96
- "version:patch": "npm version patch --no-git-tag",
97
- "prepublish:patch": "npm run version:patch",
98
- "publish:patch": "npm publish --access public",
99
- "postpublish:patch": "npm run amendCommit",
100
- "buildAndPublishBranch": "npm run build && npm run publish:branch",
101
- "buildAndPublishBeta": "npm run build && npm run publish:beta && npm dist-tag add @herodevs/cli@$(node -e \"console.log(require('./package.json').version)\") latest",
102
- "buildAndPublishMajor": "npm run build && npm run publish:major",
103
- "buildAndPublishMinor": "npm run build && npm run publish:minor",
104
- "buildAndPublishPatch": "npm run build && npm run publish:patch"
105
- },
106
- "engines": {
107
- "node": ">=12.0.0"
6
+ "@apollo/client": "3.10.4",
7
+ "@inquirer/prompts": "5.0.4",
8
+ "date-fns": "3.6.0",
9
+ "get-json": "1.0.1",
10
+ "git-last-commit": "1.0.1",
11
+ "ora": "5.3.0",
12
+ "sloc": "0.3.2",
13
+ "tslib": "^2.3.0",
14
+ "yargs": "17.7.2"
108
15
  },
109
- "bugs": "https://github.com/herodevs/cli/issues",
110
- "keywords": [
111
- "oclif"
112
- ],
113
- "types": "dist/index.d.ts",
114
- "prettier": {
115
- "singleQuote": true,
116
- "trailingComma": "es5",
117
- "bracketSpacing": true,
118
- "printWidth": 100
119
- }
16
+ "type": "module",
17
+ "main": "./main.js",
18
+ "module": "./main.js"
120
19
  }
package/README.md DELETED
@@ -1,35 +0,0 @@
1
- # HeroDevs CLI -- `@herodevs/cli`
2
-
3
- ## Installation
4
-
5
- ```
6
- npm install -g @herodevs/cli
7
- ```
8
-
9
- ## Usage
10
-
11
- after global installation
12
-
13
- ```
14
- @herodevs/cli ____
15
- ```
16
-
17
- or
18
-
19
- ```
20
- hd ____
21
- ```
22
-
23
- without installation:
24
-
25
- ```
26
- npx @herodevs/cli ____
27
- ```
28
-
29
- ## Commands
30
-
31
- Get a list of committers within a git repository
32
-
33
- ```
34
- hd report committers
35
- ```
package/bin/dev DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- require('module-alias/register');
3
- const oclif = require('@oclif/core');
4
-
5
- const path = require('path');
6
- const project = path.join(__dirname, '..', 'tsconfig.json');
7
-
8
- // In dev mode -> use ts-node and dev plugins
9
- process.env.NODE_ENV = 'development';
10
-
11
- require('ts-node').register({project});
12
-
13
- // In dev mode, always show stack traces
14
- oclif.settings.debug = true;
15
-
16
- // Start the CLI
17
- oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
package/bin/dev.cmd DELETED
@@ -1,3 +0,0 @@
1
- @echo off
2
-
3
- node "%~dp0\dev" %*
package/bin/run DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- require('module-alias/register');
3
- const oclif = require('@oclif/core');
4
-
5
- oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));
package/bin/run.cmd DELETED
@@ -1,3 +0,0 @@
1
- @echo off
2
-
3
- node "%~dp0\run" %*
@@ -1,19 +0,0 @@
1
- import { BaseCommand } from '../../shared';
2
- export declare class ReportCommitters extends BaseCommand<typeof ReportCommitters> {
3
- static summary: string;
4
- static usage: string;
5
- static examples: string[];
6
- static flags: {
7
- startDate: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
- endDate: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
- exclude: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
- monthly: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
- };
12
- private _parseDateFlags;
13
- private _parseGitLogEntries;
14
- private _collapseAndSortCommitterInfo;
15
- private parseMonthly;
16
- private printCommitters;
17
- private printMonthly;
18
- run(): Promise<any>;
19
- }
@@ -1,190 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReportCommitters = void 0;
4
- const core_1 = require("@oclif/core");
5
- const shared_1 = require("../../shared");
6
- const date_fns_1 = require("date-fns");
7
- const gammaDelimiter = 'ΓΓΓΓ';
8
- const monthsToSubtract = 12;
9
- const dateFmt = 'yyyy-MM-dd';
10
- const defaultStartDate = (0, date_fns_1.format)(new Date(), dateFmt);
11
- const defaultEndDate = (0, date_fns_1.format)((0, date_fns_1.subMonths)(new Date(), monthsToSubtract), dateFmt);
12
- const gitOutputFormat = `"${['%h', '%an', '%ad'].join(gammaDelimiter)}"`;
13
- class ReportCommitters extends shared_1.BaseCommand {
14
- _parseDateFlags(startDate, endDate) {
15
- return [(0, date_fns_1.parse)(endDate, dateFmt, new Date()), (0, date_fns_1.parse)(startDate, dateFmt, new Date())];
16
- }
17
- _parseGitLogEntries(entries) {
18
- return entries.map((entry) => {
19
- const [commitHash, committer, date] = entry.split(gammaDelimiter);
20
- return { commitHash, committer, date };
21
- });
22
- }
23
- _collapseAndSortCommitterInfo(rawEntries) {
24
- const entries = this._parseGitLogEntries(rawEntries);
25
- const hash = {};
26
- for (let i = 0; i < entries.length; i++) {
27
- hash[entries[i].committer] = hash[entries[i].committer] || [];
28
- hash[entries[i].committer].push([entries[i].commitHash, entries[i].date].join(' '));
29
- }
30
- const sortable = [];
31
- Object.keys(hash).forEach((name) => {
32
- sortable.push({ name, commits: hash[name] });
33
- });
34
- const committers = sortable.sort((a, b) => {
35
- return b.commits.length - a.commits.length;
36
- });
37
- const monthly = this.parseMonthly(entries);
38
- return { committers, monthly };
39
- }
40
- parseMonthly(entries) {
41
- const monthly = [];
42
- const dates = [new Date(this.flags.startDate), new Date(this.flags.endDate)];
43
- const ival = {
44
- start: (0, date_fns_1.min)(dates),
45
- end: (0, date_fns_1.max)(dates)
46
- };
47
- const range = (0, date_fns_1.eachMonthOfInterval)(ival);
48
- for (const idxr in range) {
49
- const idx = parseInt(idxr);
50
- if (idx + 1 >= range.length) {
51
- continue;
52
- }
53
- const [start, end] = [range[idx], range[idx + 1]];
54
- const month = {
55
- name: (0, date_fns_1.format)(start, 'LLLL yyyy'),
56
- start, end,
57
- committers: {}
58
- };
59
- for (const rec of entries) {
60
- if ((0, date_fns_1.isWithinInterval)(new Date(rec.date), { start, end })) {
61
- month.committers[rec.committer] = month.committers[rec.committer] || [];
62
- month.committers[rec.committer].push({ hash: rec.commitHash, date: rec.date });
63
- }
64
- }
65
- if (Object.keys(month.committers).length > 0) {
66
- monthly.push(month);
67
- }
68
- }
69
- return monthly;
70
- }
71
- printCommitters(committers) {
72
- if (!Object.keys(committers).length) {
73
- this.log('NO COMMITTERS IN PERIOD');
74
- }
75
- this.log('\n--------------------COMMITTERS--------------------\n');
76
- committers.forEach((committerCommit, i) => {
77
- this.log(` ${i + 1}. ${committerCommit.name} (${committerCommit.commits.length})`);
78
- committerCommit.commits.forEach((commitInfo) => {
79
- this.log(` \t - ${commitInfo}`);
80
- });
81
- this.log('\n');
82
- });
83
- this.log('---------------------------------------------------\n');
84
- }
85
- printMonthly(md) {
86
- if (!Object.keys(md).length) {
87
- this.log('NO COMMITTERS IN PERIOD');
88
- return;
89
- }
90
- const rows = md
91
- .flatMap(r => {
92
- return Object
93
- .entries(r.committers)
94
- .flatMap(([committer, commits]) => commits.flatMap(commit => ({ month: r.name, committer, commit })));
95
- }).map(r => ({ ...r, flags: { newMonth: true, newCommitter: true } }));
96
- // ugly flag hack for now
97
- rows.forEach((r, idx) => {
98
- let newMonth = true;
99
- let newCommitter = true;
100
- if (idx == 0 || r.month !== rows[idx - 1].month) {
101
- // first row / new month? always show both
102
- }
103
- else if (r.committer !== rows[idx - 1].committer) {
104
- // month's same but new committer
105
- newMonth = false;
106
- }
107
- else {
108
- // show both
109
- newMonth = false;
110
- newCommitter = false;
111
- }
112
- r.flags = { newMonth, newCommitter };
113
- });
114
- const distinctCommitters = rows.reduce((arr, row) => arr.includes(row.committer) ? arr : [...arr, row.committer], []);
115
- this.log('\n');
116
- core_1.ux.table(rows, {
117
- month: {
118
- header: 'Month',
119
- minWidth: 20,
120
- get: row => row.flags.newMonth ? row.month : ''
121
- },
122
- committer: {
123
- header: 'Contributor',
124
- minWidth: 25,
125
- get: row => row.flags.newCommitter ? row.committer : ''
126
- },
127
- commit: {
128
- header: 'Commit SHA',
129
- get: row => row.commit.hash,
130
- minWidth: 15,
131
- },
132
- date: {
133
- header: 'Commit Date',
134
- get: row => row.commit.date,
135
- minWidth: 20
136
- },
137
- // flags: {}
138
- });
139
- const unique = distinctCommitters.sort();
140
- this.log(`\n\n\nThere were ${unique.length} contributors reported: ${unique.join(', ')}\n`);
141
- }
142
- // public async run(): Promise<flagType<typeof ReportCommitters>> {
143
- async run() {
144
- const { flags } = this;
145
- const dates = this._parseDateFlags(flags.startDate, flags.endDate);
146
- const ignores = flags.exclude && flags.exclude.length ? `-- . "!(${flags.exclude.join('|')})"` : '';
147
- const gitCommand = `git log --since "${dates[0]}" --until "${dates[1]}" --pretty=format:${gitOutputFormat} ${ignores}`;
148
- const result = await (0, shared_1.run)(gitCommand);
149
- const { committers, monthly } = this._collapseAndSortCommitterInfo(result.split('\n'));
150
- if (flags.monthly) {
151
- this.printMonthly(monthly);
152
- return monthly;
153
- }
154
- else {
155
- this.printCommitters(committers);
156
- return committers;
157
- }
158
- }
159
- }
160
- exports.ReportCommitters = ReportCommitters;
161
- ReportCommitters.summary = 'Get Committers Between Two Dates';
162
- ReportCommitters.usage = '<%= command.id %> [flags [-s][-e][-x]]';
163
- ReportCommitters.examples = [['<%= config.bin %> <%= command.id %>'].join('\n')];
164
- ReportCommitters.flags = {
165
- startDate: core_1.Flags.string({
166
- char: 's',
167
- summary: `Start Date (format: yyyy-MM-dd)`,
168
- required: false,
169
- default: () => defaultStartDate,
170
- }),
171
- endDate: core_1.Flags.string({
172
- char: 'e',
173
- summary: `End Date (format: yyyy-MM-dd)`,
174
- required: false,
175
- default: () => defaultEndDate,
176
- }),
177
- exclude: core_1.Flags.string({
178
- char: 'x',
179
- multiple: true,
180
- summary: 'Path Exclusions (eg -x="./src/bin" -x="./dist")',
181
- required: false,
182
- // default: () => "" as any
183
- }),
184
- monthly: core_1.Flags.boolean({
185
- char: 'm',
186
- summary: 'Break down by calendar month, rather than by committer. (eg -m)',
187
- required: false,
188
- default: false
189
- }),
190
- };
@@ -1,8 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export declare class TrackerInit extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {};
6
- static args: {};
7
- run(): Promise<void>;
8
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrackerInit = void 0;
4
- const core_1 = require("@oclif/core");
5
- const initialize_1 = require("../../shared/tracker/initialize");
6
- const util_1 = require("../../shared/tracker/util");
7
- class TrackerInit extends core_1.Command {
8
- async run() {
9
- (0, initialize_1.initialize)((0, util_1.getTheRootDirectory)(global.process.cwd()));
10
- }
11
- }
12
- exports.TrackerInit = TrackerInit;
13
- TrackerInit.description = 'Initialize the tracker configuration';
14
- TrackerInit.examples = ['<%= config.bin %> <%= command.id %>'];
15
- TrackerInit.flags = {};
16
- TrackerInit.args = {};
@@ -1,11 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export declare class TrackerRun extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- root: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
- config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
- };
9
- static args: {};
10
- run(): Promise<void>;
11
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrackerRun = void 0;
4
- const core_1 = require("@oclif/core");
5
- const path_1 = require("path");
6
- const util_1 = require("../../shared/tracker/util");
7
- const process_config_1 = require("../../shared/tracker/process-config");
8
- // import { ChartConfig } from '../../shared/tracker/models/chart-config';
9
- class TrackerRun extends core_1.Command {
10
- async run() {
11
- const { flags } = await this.parse(TrackerRun);
12
- const localRootDir = (0, util_1.getTheRootDirectory)(global.process.cwd());
13
- const rootDirectory = flags.root ? (0, path_1.resolve)(flags.root) : localRootDir;
14
- const config = (0, util_1.readConfig)(localRootDir, flags.config);
15
- const results = await (0, process_config_1.processConfig)(config, rootDirectory);
16
- (0, util_1.saveResults)(localRootDir, config.outputDir, results);
17
- const allData = (0, util_1.getData)(localRootDir, config.outputDir);
18
- const parentDir = (0, path_1.resolve)(localRootDir, config.outputDir);
19
- // const chartConfig = new ChartConfig(flags.chart);
20
- // try {
21
- // await createDataVizIn(chartConfig, parentDir, allData);
22
- // } catch (error) {
23
- // console.log('Error creating visualization');
24
- // }
25
- }
26
- }
27
- exports.TrackerRun = TrackerRun;
28
- TrackerRun.description = 'Run the tracker';
29
- TrackerRun.examples = ['<%= config.bin %> <%= command.id %>'];
30
- TrackerRun.flags = {
31
- root: core_1.Flags.string({ char: 'r', description: 'root dir of the project' }),
32
- config: core_1.Flags.string({ char: 'c', description: 'path to config file' }),
33
- // chart: Flags.custom<ChartConfig>({
34
- // description: 'chart configuration',
35
- // })(),
36
- };
37
- TrackerRun.args = {};
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { run } from '@oclif/core';
package/dist/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.run = void 0;
4
- var core_1 = require("@oclif/core");
5
- Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
package/dist/package.json DELETED
@@ -1,120 +0,0 @@
1
- {
2
- "name": "@herodevs/cli",
3
- "version": "0.2.2",
4
- "description": "HeroDevs CLI",
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
- ],
21
- "dependencies": {
22
- "@oclif/core": "^2",
23
- "@oclif/plugin-help": "^5",
24
- "@oclif/plugin-plugins": "^3.2.0",
25
- "date-fns": "^2.30.0",
26
- "get-json": "^1.0.1",
27
- "git-last-commit": "^1.0.1",
28
- "module-alias": "^2.2.3",
29
- "shelljs": "^0.8.5",
30
- "sloc": "^0.3.2"
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
- "tracker": {
61
- "description": "Track project progress based upon lines of code (commands: init, run)"
62
- }
63
- }
64
- },
65
- "scripts": {
66
- "generate:command": "oclif generate command",
67
- "start": "npm run dev",
68
- "predev": "npm run build",
69
- "dev": "./bin/dev",
70
- "preprod": "npm run build",
71
- "prod": "./bin/run",
72
- "build": "shx rm -rf dist && tsc -b && shx cp package.json dist/package.json",
73
- "lint": "eslint . --ext .ts --config .eslintrc",
74
- "postpack": "shx rm -f oclif.manifest.json",
75
- "posttestXXX": "npm run lint",
76
- "prepack": "npm run build && oclif manifest && oclif readme",
77
- "test": "mocha --forbid-only \"test/**/*.test.ts\"",
78
- "version": "oclif readme && git add README.md",
79
- "amendCommit": "git add . -A && git commit --amend --no-edit",
80
- "version:branch": "npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag",
81
- "prepublish:branch": "npm run version:branch",
82
- "publish:branch": "npm publish --tag $(git rev-parse --short=8 HEAD^) --access public",
83
- "postpublish:branch": "npm run amendCommit",
84
- "version:beta": "npm version prerelease --preid beta --no-git-tag",
85
- "prepublish:beta": "npm run version:beta",
86
- "publish:beta": "npm publish --tag beta --access public",
87
- "postpublish:beta": "npm run amendCommit",
88
- "version:major": "npm version major --no-git-tag",
89
- "prepublish:major": "npm run version:major",
90
- "publish:major": "npm publish --access public",
91
- "postpublish:major": "npm run amendCommit",
92
- "version:minor": "npm version minor --no-git-tag",
93
- "prepublish:minor": "npm run version:minor",
94
- "publish:minor": "npm publish --access public",
95
- "postpublish:minor": "npm run amendCommit",
96
- "version:patch": "npm version patch --no-git-tag",
97
- "prepublish:patch": "npm run version:patch",
98
- "publish:patch": "npm publish --access public",
99
- "postpublish:patch": "npm run amendCommit",
100
- "buildAndPublishBranch": "npm run build && npm run publish:branch",
101
- "buildAndPublishBeta": "npm run build && npm run publish:beta && npm dist-tag add @herodevs/cli@$(node -e \"console.log(require('./package.json').version)\") latest",
102
- "buildAndPublishMajor": "npm run build && npm run publish:major",
103
- "buildAndPublishMinor": "npm run build && npm run publish:minor",
104
- "buildAndPublishPatch": "npm run build && npm run publish:patch"
105
- },
106
- "engines": {
107
- "node": ">=12.0.0"
108
- },
109
- "bugs": "https://github.com/herodevs/cli/issues",
110
- "keywords": [
111
- "oclif"
112
- ],
113
- "types": "dist/index.d.ts",
114
- "prettier": {
115
- "singleQuote": true,
116
- "trailingComma": "es5",
117
- "bracketSpacing": true,
118
- "printWidth": 100
119
- }
120
- }
@@ -1,22 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- import { Flags as flagType, Args as argType } from '../types';
3
- declare enum LogLevel {
4
- debug = "debug",
5
- info = "info",
6
- warn = "warn",
7
- error = "error"
8
- }
9
- export declare abstract class BaseCommand<T extends typeof Command> extends Command {
10
- static enableJsonFlag: boolean;
11
- static baseFlags: {
12
- 'log-level': import("@oclif/core/lib/interfaces").OptionFlag<LogLevel, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
- };
14
- protected flags: flagType<T>;
15
- protected args: argType<T>;
16
- init(): Promise<void>;
17
- protected catch(err: Error & {
18
- exitCode?: number;
19
- }): Promise<any>;
20
- protected finally(_: Error | undefined): Promise<any>;
21
- }
22
- export {};