pr-checkmate 1.0.1 → 1.0.3
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/cli.js +17 -0
- package/dist/config.js +7 -0
- package/dist/index.js +15 -58
- package/dist/init.js +31 -0
- package/dist/scripts/dependency-check.js +19 -28
- package/dist/scripts/index.js +15 -17
- package/dist/scripts/lint.js +19 -33
- package/dist/scripts/prettier-autoformat.js +17 -33
- package/dist/scripts/spellcheck.js +13 -24
- package/dist/utils/index.js +1 -17
- package/dist/utils/logger.js +1 -4
- package/package.json +11 -9
package/dist/cli.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { runJob } from './scripts/index.js';
|
|
3
|
+
import { init } from './init.js';
|
|
4
|
+
const cmd = process.argv[2];
|
|
5
|
+
(async () => {
|
|
6
|
+
try {
|
|
7
|
+
if (cmd === 'init') {
|
|
8
|
+
await init();
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
await runJob(cmd || 'all');
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
console.error('❌ CLI failed:', err);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
})();
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
export const CONFIG_FILE = path.resolve(process.cwd(), 'pr-checkmate.json');
|
|
4
|
+
export const config = fs.existsSync(CONFIG_FILE)
|
|
5
|
+
? JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf-8'))
|
|
6
|
+
: { sourcePath: 'src' };
|
|
7
|
+
export const SOURCE_PATH = config.sourcePath;
|
package/dist/index.js
CHANGED
|
@@ -1,65 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* PR CheckMate - Automated PR quality checks
|
|
4
3
|
*
|
|
5
4
|
* @module pr-checkmate
|
|
6
5
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
-
}) : function(o, v) {
|
|
21
|
-
o["default"] = v;
|
|
22
|
-
});
|
|
23
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
-
var ownKeys = function(o) {
|
|
25
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
-
var ar = [];
|
|
27
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
-
return ar;
|
|
29
|
-
};
|
|
30
|
-
return ownKeys(o);
|
|
31
|
-
};
|
|
32
|
-
return function (mod) {
|
|
33
|
-
if (mod && mod.__esModule) return mod;
|
|
34
|
-
var result = {};
|
|
35
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
-
__setModuleDefault(result, mod);
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
})();
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.logger = exports.runSpellcheck = exports.runPrettier = exports.runDependencyCheck = exports.runLint = void 0;
|
|
42
|
-
exports.runAllChecks = runAllChecks;
|
|
43
|
-
exports.runChecks = runChecks;
|
|
44
|
-
var lint_1 = require("./scripts/lint");
|
|
45
|
-
Object.defineProperty(exports, "runLint", { enumerable: true, get: function () { return lint_1.runLint; } });
|
|
46
|
-
var dependency_check_1 = require("./scripts/dependency-check");
|
|
47
|
-
Object.defineProperty(exports, "runDependencyCheck", { enumerable: true, get: function () { return dependency_check_1.runDependencyCheck; } });
|
|
48
|
-
var prettier_autoformat_1 = require("./scripts/prettier-autoformat");
|
|
49
|
-
Object.defineProperty(exports, "runPrettier", { enumerable: true, get: function () { return prettier_autoformat_1.runPrettier; } });
|
|
50
|
-
var spellcheck_1 = require("./scripts/spellcheck");
|
|
51
|
-
Object.defineProperty(exports, "runSpellcheck", { enumerable: true, get: function () { return spellcheck_1.runSpellcheck; } });
|
|
52
|
-
var utils_1 = require("./utils");
|
|
53
|
-
Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return utils_1.logger; } });
|
|
6
|
+
export { runLint } from './scripts/lint';
|
|
7
|
+
export { runDependencyCheck } from './scripts/dependency-check';
|
|
8
|
+
export { runPrettier } from './scripts/prettier-autoformat';
|
|
9
|
+
export { runSpellcheck } from './scripts/spellcheck';
|
|
10
|
+
export { logger } from './utils';
|
|
54
11
|
/**
|
|
55
12
|
* Run all checks sequentially
|
|
56
13
|
* @returns Promise that resolves when all checks complete
|
|
57
14
|
*/
|
|
58
|
-
async function runAllChecks() {
|
|
59
|
-
const { runLint } = await
|
|
60
|
-
const { runDependencyCheck } = await
|
|
61
|
-
const { runPrettier } = await
|
|
62
|
-
const { runSpellcheck } = await
|
|
15
|
+
export async function runAllChecks() {
|
|
16
|
+
const { runLint } = await import('./scripts/lint');
|
|
17
|
+
const { runDependencyCheck } = await import('./scripts/dependency-check');
|
|
18
|
+
const { runPrettier } = await import('./scripts/prettier-autoformat');
|
|
19
|
+
const { runSpellcheck } = await import('./scripts/spellcheck');
|
|
63
20
|
await runLint();
|
|
64
21
|
await runDependencyCheck();
|
|
65
22
|
await runSpellcheck();
|
|
@@ -68,11 +25,11 @@ async function runAllChecks() {
|
|
|
68
25
|
/**
|
|
69
26
|
* Run checks based on configuration
|
|
70
27
|
*/
|
|
71
|
-
async function runChecks(config = {}) {
|
|
72
|
-
const { runLint } = await
|
|
73
|
-
const { runDependencyCheck } = await
|
|
74
|
-
const { runPrettier } = await
|
|
75
|
-
const { runSpellcheck } = await
|
|
28
|
+
export async function runChecks(config = {}) {
|
|
29
|
+
const { runLint } = await import('./scripts/lint');
|
|
30
|
+
const { runDependencyCheck } = await import('./scripts/dependency-check');
|
|
31
|
+
const { runPrettier } = await import('./scripts/prettier-autoformat');
|
|
32
|
+
const { runSpellcheck } = await import('./scripts/spellcheck');
|
|
76
33
|
if (!config.skipLint)
|
|
77
34
|
await runLint();
|
|
78
35
|
if (!config.skipDeps)
|
package/dist/init.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import inquirer from 'inquirer';
|
|
4
|
+
import { logger } from './utils';
|
|
5
|
+
export const CONFIG_FILE = path.resolve(process.cwd(), 'pr-checkmate.json');
|
|
6
|
+
export async function init() {
|
|
7
|
+
if (fs.existsSync(CONFIG_FILE)) {
|
|
8
|
+
logger.info('⚡ pr-checkmate.json already exists.');
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const answers = await inquirer.prompt([
|
|
12
|
+
{
|
|
13
|
+
type: 'list',
|
|
14
|
+
name: 'sourcePath',
|
|
15
|
+
message: 'Where is your project source code?',
|
|
16
|
+
choices: ['src', 'app', 'Enter manually'],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: 'input',
|
|
20
|
+
name: 'manualPath',
|
|
21
|
+
message: 'Enter path:',
|
|
22
|
+
when: a => a.sourcePath === 'Enter manually',
|
|
23
|
+
validate: input => input.trim().length > 0 || 'Cannot be empty',
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
26
|
+
const config = {
|
|
27
|
+
sourcePath: answers.sourcePath === 'Enter manually' ? answers.manualPath : answers.sourcePath,
|
|
28
|
+
};
|
|
29
|
+
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
|
|
30
|
+
logger.info('✅ Created checkmatec.json');
|
|
31
|
+
}
|
|
@@ -1,33 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.runDependencyCheck = runDependencyCheck;
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
1
|
+
import { logger } from '../utils';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { SOURCE_PATH } from '../config';
|
|
9
5
|
/**
|
|
10
|
-
* Check for
|
|
6
|
+
* Check for the presence of package.json and source folder.
|
|
7
|
+
* Currently, only validates existence; can be extended for dependency checks.
|
|
8
|
+
*
|
|
9
|
+
* @throws Will throw an error if deeper checks are added and fail.
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// } else {
|
|
18
|
-
// logger.log('[runDependencyCheck]: ✅ No dependency changes detected.');
|
|
19
|
-
// }
|
|
20
|
-
// } catch (err: unknown) {
|
|
21
|
-
// const errorMessage = err instanceof Error ? err.message : String(err);
|
|
22
|
-
// logger.error('[runDependencyCheck]: ❌ Dependency check failed:', errorMessage);
|
|
23
|
-
// throw err;
|
|
24
|
-
// }
|
|
25
|
-
// }
|
|
26
|
-
async function runDependencyCheck() {
|
|
27
|
-
utils_1.logger.info('Checking dependencies...');
|
|
28
|
-
if (!node_fs_1.default.existsSync('package.json')) {
|
|
29
|
-
utils_1.logger.warn('No package.json — skipping');
|
|
11
|
+
export async function runDependencyCheck() {
|
|
12
|
+
logger.info('Checking dependencies...');
|
|
13
|
+
const packageJsonPath = path.resolve(process.cwd(), 'package.json');
|
|
14
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
15
|
+
logger.warn('No package.json — skipping dependency check');
|
|
30
16
|
return;
|
|
31
17
|
}
|
|
32
|
-
|
|
18
|
+
const sourceFolder = path.resolve(process.cwd(), SOURCE_PATH);
|
|
19
|
+
if (!fs.existsSync(sourceFolder)) {
|
|
20
|
+
logger.warn(`Source folder "${SOURCE_PATH}" not found — skipping deeper checks`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
logger.info('Dependencies OK');
|
|
33
24
|
}
|
package/dist/scripts/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const spellcheck_1 = require("./spellcheck");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
1
|
+
import { runLint } from './lint';
|
|
2
|
+
import { runDependencyCheck } from './dependency-check';
|
|
3
|
+
import { runPrettier } from './prettier-autoformat';
|
|
4
|
+
import { runSpellcheck } from './spellcheck';
|
|
5
|
+
import { logger } from '../utils';
|
|
8
6
|
/**
|
|
9
7
|
* CLI entry point for PR CheckMate.
|
|
10
8
|
*
|
|
@@ -19,28 +17,28 @@ const utils_1 = require("../utils");
|
|
|
19
17
|
* spellcheck - Run cspell spellcheck
|
|
20
18
|
*/
|
|
21
19
|
const job = process.argv[2];
|
|
22
|
-
async function runJob(jobName) {
|
|
20
|
+
export async function runJob(jobName) {
|
|
23
21
|
switch (jobName) {
|
|
24
22
|
case 'all':
|
|
25
|
-
await
|
|
26
|
-
await
|
|
27
|
-
await
|
|
28
|
-
await
|
|
23
|
+
await runLint();
|
|
24
|
+
await runDependencyCheck();
|
|
25
|
+
await runPrettier();
|
|
26
|
+
await runSpellcheck();
|
|
29
27
|
break;
|
|
30
28
|
case 'lint':
|
|
31
|
-
await
|
|
29
|
+
await runLint();
|
|
32
30
|
break;
|
|
33
31
|
case 'deps':
|
|
34
|
-
await
|
|
32
|
+
await runDependencyCheck();
|
|
35
33
|
break;
|
|
36
34
|
case 'prettier':
|
|
37
|
-
await
|
|
35
|
+
await runPrettier();
|
|
38
36
|
break;
|
|
39
37
|
case 'spellcheck':
|
|
40
|
-
await
|
|
38
|
+
await runSpellcheck();
|
|
41
39
|
break;
|
|
42
40
|
default:
|
|
43
|
-
|
|
41
|
+
logger.log('[runJob]: Available jobs: lint, deps, prettier, spellcheck');
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
runJob(job).catch(err => {
|
package/dist/scripts/lint.js
CHANGED
|
@@ -1,41 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// // Run ESLint
|
|
17
|
-
// await execa('npm', ['run', 'lint'], { stdio: 'inherit' });
|
|
18
|
-
// logger.log('[runLint]: ✅ ESLint passed successfully.');
|
|
19
|
-
// } catch (err: unknown) {
|
|
20
|
-
// const errorMessage = err instanceof Error ? err.message : String(err);
|
|
21
|
-
// logger.warn(`[runLint]: ⚠️ ESLint found issues: ${errorMessage}`);
|
|
22
|
-
// // Don't throw - allow process to continue
|
|
23
|
-
// }
|
|
24
|
-
// }
|
|
25
|
-
async function runLint() {
|
|
26
|
-
utils_1.logger.info('Running ESLint...');
|
|
27
|
-
const hasLocalConfig = node_fs_1.default.existsSync('eslint.config.mjs') ||
|
|
28
|
-
node_fs_1.default.existsSync('.eslintrc.js') ||
|
|
29
|
-
node_fs_1.default.existsSync('.eslintrc.json');
|
|
1
|
+
import { execa } from 'execa';
|
|
2
|
+
import { logger } from '../utils';
|
|
3
|
+
import { SOURCE_PATH } from '../config';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
/**
|
|
6
|
+
* Run ESLint on the project.
|
|
7
|
+
* Uses local ESLint configuration if available; otherwise defaults to SOURCE_PATH.
|
|
8
|
+
*
|
|
9
|
+
* @throws Will throw an error if ESLint detects issues that cannot be fixed automatically.
|
|
10
|
+
*/
|
|
11
|
+
export async function runLint() {
|
|
12
|
+
logger.info('Running ESLint...');
|
|
13
|
+
const hasLocalConfig = fs.existsSync('eslint.config.mjs') ||
|
|
14
|
+
fs.existsSync('.eslintrc.js') ||
|
|
15
|
+
fs.existsSync('.eslintrc.json');
|
|
30
16
|
const args = hasLocalConfig
|
|
31
17
|
? ['eslint', '.', '--ext', '.ts,.tsx', '--fix']
|
|
32
|
-
: ['eslint',
|
|
18
|
+
: ['eslint', SOURCE_PATH, '--ext', '.ts,.tsx', '--fix'];
|
|
33
19
|
try {
|
|
34
|
-
await
|
|
35
|
-
|
|
20
|
+
await execa('npx', args, { stdio: 'inherit' });
|
|
21
|
+
logger.info('ESLint passed');
|
|
36
22
|
}
|
|
37
23
|
catch (err) {
|
|
38
|
-
|
|
24
|
+
logger.warn('ESLint issues found');
|
|
39
25
|
throw err;
|
|
40
26
|
}
|
|
41
27
|
}
|
|
@@ -1,43 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.runPrettier = runPrettier;
|
|
7
|
-
const execa_1 = require("execa");
|
|
8
|
-
const utils_1 = require("../utils");
|
|
9
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
1
|
+
import { execa } from 'execa';
|
|
2
|
+
import { logger } from '../utils';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import { SOURCE_PATH } from '../config';
|
|
10
5
|
/**
|
|
11
|
-
* Run Prettier
|
|
12
|
-
*
|
|
6
|
+
* Run Prettier to auto-format project files.
|
|
7
|
+
* If a Prettier config file exists, it runs on the whole project; otherwise on SOURCE_PATH.
|
|
8
|
+
*
|
|
9
|
+
* @throws Will throw an error if Prettier fails.
|
|
13
10
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// );
|
|
21
|
-
// } catch (err: unknown) {
|
|
22
|
-
// const errorMessage = err instanceof Error ? err.message : String(err);
|
|
23
|
-
// logger.error('[runPrettier]: ❌ Prettier failed:', errorMessage);
|
|
24
|
-
// throw err;
|
|
25
|
-
// }
|
|
26
|
-
// }
|
|
27
|
-
async function runPrettier() {
|
|
28
|
-
utils_1.logger.info('Running Prettier...');
|
|
29
|
-
const hasConfig = node_fs_1.default.existsSync('.prettierrc') ||
|
|
30
|
-
node_fs_1.default.existsSync('.prettierrc.json') ||
|
|
31
|
-
node_fs_1.default.existsSync('prettier.config.js');
|
|
32
|
-
const pattern = hasConfig ? '.' : 'src';
|
|
11
|
+
export async function runPrettier() {
|
|
12
|
+
logger.info('Running Prettier...');
|
|
13
|
+
const hasConfig = fs.existsSync('.prettierrc') ||
|
|
14
|
+
fs.existsSync('.prettierrc.json') ||
|
|
15
|
+
fs.existsSync('prettier.config.js');
|
|
16
|
+
const pattern = hasConfig ? '.' : SOURCE_PATH;
|
|
33
17
|
try {
|
|
34
|
-
await
|
|
18
|
+
await execa('npx', ['prettier', '--write', `${pattern}/**/*`], {
|
|
35
19
|
stdio: 'inherit',
|
|
36
20
|
});
|
|
37
|
-
|
|
21
|
+
logger.info('Prettier completed');
|
|
38
22
|
}
|
|
39
23
|
catch (err) {
|
|
40
|
-
|
|
24
|
+
logger.error('Prettier failed');
|
|
41
25
|
throw err;
|
|
42
26
|
}
|
|
43
27
|
}
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const execa_1 = require("execa");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
1
|
+
import { execa } from 'execa';
|
|
2
|
+
import { logger } from '../utils';
|
|
3
|
+
import { SOURCE_PATH } from '../config';
|
|
6
4
|
/**
|
|
7
|
-
* Run spellcheck on the project
|
|
5
|
+
* Run spellcheck using cspell on the project source files.
|
|
6
|
+
* Only runs on SOURCE_PATH.
|
|
7
|
+
*
|
|
8
|
+
* @throws Will throw an error if cspell detects spelling issues.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// await execa('npx', ['cspell', '**/*.{ts,tsx,js,jsx,md,json}', '--no-progress'], {
|
|
13
|
-
// stdio: 'inherit',
|
|
14
|
-
// });
|
|
15
|
-
// logger.log('[runSpellcheck]: ✅ Spellcheck passed successfully.');
|
|
16
|
-
// } catch (err: unknown) {
|
|
17
|
-
// const errorMessage = err instanceof Error ? err.message : String(err);
|
|
18
|
-
// logger.warn(`[runSpellcheck]: ⚠️ Spellcheck found errors: ${errorMessage}`);
|
|
19
|
-
// // Don't throw - allow process to continue
|
|
20
|
-
// }
|
|
21
|
-
// }
|
|
22
|
-
async function runSpellcheck() {
|
|
23
|
-
utils_1.logger.info('Running spellcheck...');
|
|
10
|
+
export async function runSpellcheck() {
|
|
11
|
+
logger.info('Running spellcheck...');
|
|
12
|
+
const pattern = `${SOURCE_PATH}/**/*`;
|
|
24
13
|
try {
|
|
25
|
-
await
|
|
26
|
-
|
|
14
|
+
await execa('npx', ['cspell', pattern], { stdio: 'inherit' });
|
|
15
|
+
logger.info('Spellcheck passed');
|
|
27
16
|
}
|
|
28
17
|
catch (err) {
|
|
29
|
-
|
|
18
|
+
logger.warn('Spellcheck found issues');
|
|
30
19
|
throw err;
|
|
31
20
|
}
|
|
32
21
|
}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./logger"), exports);
|
|
1
|
+
export * from './logger';
|
package/dist/utils/logger.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logger = void 0;
|
|
4
1
|
class Logger {
|
|
5
2
|
constructor() {
|
|
6
3
|
this.logs = [];
|
|
@@ -62,4 +59,4 @@ class Logger {
|
|
|
62
59
|
this.logs = [];
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
|
-
|
|
62
|
+
export const logger = new Logger();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-checkmate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-actions",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"code-quality",
|
|
12
12
|
"automation"
|
|
13
13
|
],
|
|
14
|
-
"main": "dist/
|
|
14
|
+
"main": "./dist/cli.js",
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
16
|
"bin": {
|
|
17
|
-
"pr-checkmate": "./dist/
|
|
17
|
+
"pr-checkmate": "./dist/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -46,15 +46,17 @@
|
|
|
46
46
|
"author": "Your Name <your.email@example.com>",
|
|
47
47
|
"license": "LicenseRef-Proprietary",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
49
|
+
"cspell": "^9.3.2",
|
|
50
|
+
"dotenv": "^17.2.3",
|
|
51
|
+
"eslint": ">=8.0.0",
|
|
52
|
+
"execa": "^9.6.0",
|
|
53
|
+
"inquirer": "^13.0.1",
|
|
54
|
+
"prettier": ">=3.0.0",
|
|
54
55
|
"ts-node": "^10.9.1",
|
|
55
|
-
"
|
|
56
|
+
"typescript": "^5.9.3"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
59
|
+
"@types/inquirer": "^9.0.9",
|
|
58
60
|
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
59
61
|
"@typescript-eslint/parser": "^8.47.0",
|
|
60
62
|
"eslint-config-prettier": "^9.1.2",
|