test-gen-js 0.1.3 โ 0.2.0
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/CHANGELOG.md +26 -2
- package/README.md +76 -3
- package/dist/cli.js +10 -7
- package/dist/cli.js.map +1 -1
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +9 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +232 -0
- package/dist/commands/init.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,9 +9,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Planned
|
|
11
11
|
- Directory scanning (`scan` command)
|
|
12
|
-
- Configuration file support (`.testgenrc.js`)
|
|
13
12
|
- Node.js backend support
|
|
14
13
|
- Custom templates
|
|
14
|
+
- Watch mode
|
|
15
|
+
- Prettier/ESLint integration
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [0.2.0] - 2024-01-07
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- ๐ `init` command - Initialize test-gen-js configuration
|
|
23
|
+
- Creates `.testgenrc.js` configuration file
|
|
24
|
+
- Sets up Git hooks with husky and lint-staged
|
|
25
|
+
- Pre-commit hook runs tests automatically before each commit
|
|
26
|
+
- Configuration file support (`.testgenrc.js`)
|
|
27
|
+
|
|
28
|
+
### Commands
|
|
29
|
+
- `test-gen-js init` - Initialize configuration and Git hooks
|
|
30
|
+
- `--no-hooks` - Skip Git hooks setup
|
|
31
|
+
- `--force` - Overwrite existing configuration
|
|
32
|
+
|
|
33
|
+
### How Pre-commit Testing Works
|
|
34
|
+
1. Run `npx test-gen-js init` in your project
|
|
35
|
+
2. Husky and lint-staged are automatically installed
|
|
36
|
+
3. When you run `git commit`, tests run for staged files
|
|
37
|
+
4. If tests pass, commit proceeds; if tests fail, commit is blocked
|
|
15
38
|
|
|
16
39
|
---
|
|
17
40
|
|
|
@@ -65,7 +88,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
65
88
|
|
|
66
89
|
---
|
|
67
90
|
|
|
68
|
-
[Unreleased]: https://github.com/liveforownhappiness/test-gen-js/compare/v0.
|
|
91
|
+
[Unreleased]: https://github.com/liveforownhappiness/test-gen-js/compare/v0.2.0...HEAD
|
|
92
|
+
[0.2.0]: https://github.com/liveforownhappiness/test-gen-js/compare/v0.1.0...v0.2.0
|
|
69
93
|
[0.1.0]: https://github.com/liveforownhappiness/test-gen-js/releases/tag/v0.1.0
|
|
70
94
|
[0.0.1]: https://github.com/liveforownhappiness/test-gen-js/releases/tag/v0.0.1
|
|
71
95
|
|
package/README.md
CHANGED
|
@@ -47,6 +47,44 @@ npm install -D test-gen-js
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
+
## ๐ ๏ธ Setup with Git Hooks (Recommended)
|
|
51
|
+
|
|
52
|
+
Set up automatic testing before each commit:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 1. Install as dev dependency
|
|
56
|
+
npm install -D test-gen-js
|
|
57
|
+
|
|
58
|
+
# 2. Initialize (creates config + sets up Git hooks)
|
|
59
|
+
npx test-gen-js init
|
|
60
|
+
|
|
61
|
+
# 3. Generate tests for your components
|
|
62
|
+
npx test-gen-js generate src/components/Button.tsx
|
|
63
|
+
|
|
64
|
+
# 4. Now when you commit, tests run automatically!
|
|
65
|
+
git add .
|
|
66
|
+
git commit -m "feat: add Button component"
|
|
67
|
+
# ๐งช Running tests before commit...
|
|
68
|
+
# โ
Tests passed!
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### What `init` Does
|
|
72
|
+
|
|
73
|
+
| Item | Description |
|
|
74
|
+
|------|-------------|
|
|
75
|
+
| `.testgenrc.js` | Creates configuration file |
|
|
76
|
+
| `husky` | Installs Git hooks manager |
|
|
77
|
+
| `lint-staged` | Runs tests on staged files only |
|
|
78
|
+
| `pre-commit` | Tests run before each commit |
|
|
79
|
+
|
|
80
|
+
### Pre-commit Behavior
|
|
81
|
+
|
|
82
|
+
- โ
Tests pass โ Commit proceeds
|
|
83
|
+
- โ Tests fail โ Commit is **blocked**
|
|
84
|
+
- โญ๏ธ Skip with `git commit --no-verify` (not recommended)
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
50
88
|
## ๐ Quick Start
|
|
51
89
|
|
|
52
90
|
### 1. Generate React Component Tests
|
|
@@ -328,14 +366,48 @@ test-gen-js scan <directory>
|
|
|
328
366
|
--exclude <patterns> # Patterns to exclude
|
|
329
367
|
```
|
|
330
368
|
|
|
331
|
-
### `init`
|
|
369
|
+
### `init`
|
|
332
370
|
|
|
333
|
-
Initialize configuration
|
|
371
|
+
Initialize test-gen-js configuration and set up Git hooks for pre-commit testing.
|
|
334
372
|
|
|
335
373
|
```bash
|
|
374
|
+
# Basic usage - creates config and sets up Git hooks
|
|
336
375
|
test-gen-js init
|
|
376
|
+
|
|
377
|
+
# Options
|
|
378
|
+
--no-hooks # Skip Git hooks setup
|
|
379
|
+
--force # Overwrite existing configuration
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**What it does:**
|
|
383
|
+
|
|
384
|
+
1. Creates `.testgenrc.js` configuration file
|
|
385
|
+
2. Installs `husky` and `lint-staged` (if not present)
|
|
386
|
+
3. Sets up pre-commit hook to run tests before each commit
|
|
387
|
+
|
|
388
|
+
**Example:**
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
# Install test-gen-js as dev dependency
|
|
392
|
+
npm install -D test-gen-js
|
|
393
|
+
|
|
394
|
+
# Initialize (sets up Git hooks)
|
|
395
|
+
npx test-gen-js init
|
|
396
|
+
|
|
397
|
+
# Now when you commit, tests will run automatically!
|
|
398
|
+
git add .
|
|
399
|
+
git commit -m "feat: add new component"
|
|
400
|
+
# ๐งช Running tests before commit...
|
|
401
|
+
# โ
Tests passed, commit successful!
|
|
337
402
|
```
|
|
338
403
|
|
|
404
|
+
**Pre-commit behavior:**
|
|
405
|
+
|
|
406
|
+
- Tests run only for **staged files** (files you're committing)
|
|
407
|
+
- If tests fail, commit is **blocked**
|
|
408
|
+
- If tests pass, commit proceeds normally
|
|
409
|
+
- Use `git commit --no-verify` to skip tests (not recommended)
|
|
410
|
+
|
|
339
411
|
---
|
|
340
412
|
|
|
341
413
|
## ๐ Supported Types
|
|
@@ -436,7 +508,8 @@ test-gen-js init
|
|
|
436
508
|
### ๐ Phase 2: Extended Features (v0.2.x)
|
|
437
509
|
|
|
438
510
|
- [ ] Directory scanning and batch generation (`scan` command)
|
|
439
|
-
- [
|
|
511
|
+
- [x] Configuration file support (`.testgenrc.js`)
|
|
512
|
+
- [x] Git hooks for pre-commit testing (`init` command)
|
|
440
513
|
- [ ] Node.js backend support
|
|
441
514
|
- [ ] Improved mock generation
|
|
442
515
|
- [ ] Prettier/ESLint integration
|
package/dist/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
9
9
|
const ora_1 = __importDefault(require("ora"));
|
|
10
10
|
const analyzer_1 = require("./analyzer");
|
|
11
11
|
const generator_1 = require("./generator");
|
|
12
|
+
const commands_1 = require("./commands");
|
|
12
13
|
const program = new commander_1.Command();
|
|
13
14
|
program
|
|
14
15
|
.name('test-gen-js')
|
|
@@ -94,17 +95,19 @@ program
|
|
|
94
95
|
// Init command
|
|
95
96
|
program
|
|
96
97
|
.command('init')
|
|
97
|
-
.description('Initialize test-gen-js configuration')
|
|
98
|
-
.
|
|
99
|
-
|
|
98
|
+
.description('Initialize test-gen-js configuration and Git hooks')
|
|
99
|
+
.option('--no-hooks', 'Skip Git hooks setup')
|
|
100
|
+
.option('--force', 'Overwrite existing configuration', false)
|
|
101
|
+
.action(async (options) => {
|
|
100
102
|
try {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
await (0, commands_1.initCommand)({
|
|
104
|
+
hooks: options.hooks,
|
|
105
|
+
force: options.force,
|
|
106
|
+
});
|
|
103
107
|
}
|
|
104
108
|
catch (error) {
|
|
105
|
-
spinner.fail(chalk_1.default.red('Failed to create configuration'));
|
|
106
109
|
if (error instanceof Error) {
|
|
107
|
-
console.error(chalk_1.default.red(error.message));
|
|
110
|
+
console.error(chalk_1.default.red('Error: ' + error.message));
|
|
108
111
|
}
|
|
109
112
|
process.exit(1);
|
|
110
113
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,8CAAsB;AACtB,yCAAyC;AACzC,2CAA2C;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,8CAAsB;AACtB,yCAAyC;AACzC,2CAA2C;AAC3C,yCAAyC;AAGzC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,aAAa,CAAC;KACnB,WAAW,CAAC,wEAAwE,CAAC;KACrF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,mBAAmB;AACnB,OAAO;KACJ,OAAO,CAAC,iBAAiB,CAAC;KAC1B,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,gDAAgD,CAAC;KAC7D,MAAM,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;KAC1D,MAAM,CAAC,uBAAuB,EAAE,4CAA4C,EAAE,MAAM,CAAC;KACrF,MAAM,CAAC,YAAY,EAAE,wBAAwB,EAAE,KAAK,CAAC;KACrD,MAAM,CAAC,QAAQ,EAAE,sCAAsC,EAAE,IAAI,CAAC;KAC9D,MAAM,CAAC,aAAa,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,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,oDAAoD,CAAC;KACjE,MAAM,CAAC,YAAY,EAAE,sBAAsB,CAAC;KAC5C,MAAM,CAAC,SAAS,EAAE,kCAAkC,EAAE,KAAK,CAAC;KAC5D,MAAM,CAAC,KAAK,EAAE,OAA2C,EAAE,EAAE;IAC5D,IAAI,CAAC;QACH,MAAM,IAAA,sBAAW,EAAC;YAChB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Commands module
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initCommand = void 0;
|
|
7
|
+
var init_1 = require("./init");
|
|
8
|
+
Object.defineProperty(exports, "initCommand", { enumerable: true, get: function () { return init_1.initCommand; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,+BAAqC;AAA5B,mGAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Init Command
|
|
3
|
+
* Sets up test-gen-js configuration and Git hooks for pre-commit testing
|
|
4
|
+
*/
|
|
5
|
+
interface InitOptions {
|
|
6
|
+
hooks?: boolean;
|
|
7
|
+
force?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Initialize test-gen-js in a project
|
|
11
|
+
*/
|
|
12
|
+
export declare function initCommand(options?: InitOptions): Promise<void>;
|
|
13
|
+
export default initCommand;
|
|
14
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B1E;AA8MD,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Init Command
|
|
4
|
+
* Sets up test-gen-js configuration and Git hooks for pre-commit testing
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.initCommand = initCommand;
|
|
11
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
13
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
14
|
+
const ora_1 = __importDefault(require("ora"));
|
|
15
|
+
const child_process_1 = require("child_process");
|
|
16
|
+
/**
|
|
17
|
+
* Initialize test-gen-js in a project
|
|
18
|
+
*/
|
|
19
|
+
async function initCommand(options = {}) {
|
|
20
|
+
const { hooks = true, force = false } = options;
|
|
21
|
+
const cwd = process.cwd();
|
|
22
|
+
console.log('');
|
|
23
|
+
console.log(chalk_1.default.cyan('๐งช Initializing test-gen-js...'));
|
|
24
|
+
console.log('');
|
|
25
|
+
// Check if package.json exists
|
|
26
|
+
const packageJsonPath = path_1.default.join(cwd, 'package.json');
|
|
27
|
+
if (!(await fs_extra_1.default.pathExists(packageJsonPath))) {
|
|
28
|
+
throw new Error('package.json not found. Please run this command in a Node.js project.');
|
|
29
|
+
}
|
|
30
|
+
// Create configuration file
|
|
31
|
+
await createConfigFile(cwd, force);
|
|
32
|
+
// Setup Git hooks if requested
|
|
33
|
+
if (hooks) {
|
|
34
|
+
await setupGitHooks(cwd);
|
|
35
|
+
}
|
|
36
|
+
console.log('');
|
|
37
|
+
console.log(chalk_1.default.green('โ
test-gen-js initialized successfully!'));
|
|
38
|
+
console.log('');
|
|
39
|
+
console.log(chalk_1.default.cyan('Next steps:'));
|
|
40
|
+
console.log(' 1. Generate tests: ' + chalk_1.default.yellow('npx test-gen-js generate src/components/Button.tsx'));
|
|
41
|
+
console.log(' 2. Run tests: ' + chalk_1.default.yellow('npm test'));
|
|
42
|
+
console.log(' 3. Commit your code - tests will run automatically!');
|
|
43
|
+
console.log('');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create .testgenrc.js configuration file
|
|
47
|
+
*/
|
|
48
|
+
async function createConfigFile(cwd, force) {
|
|
49
|
+
const spinner = (0, ora_1.default)('Creating configuration file...').start();
|
|
50
|
+
const configPath = path_1.default.join(cwd, '.testgenrc.js');
|
|
51
|
+
if ((await fs_extra_1.default.pathExists(configPath)) && !force) {
|
|
52
|
+
spinner.info(chalk_1.default.yellow('.testgenrc.js already exists. Use --force to overwrite.'));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const configContent = `/**
|
|
56
|
+
* test-gen-js configuration
|
|
57
|
+
* @see https://github.com/liveforownhappiness/test-gen-js
|
|
58
|
+
*/
|
|
59
|
+
module.exports = {
|
|
60
|
+
// File patterns to include
|
|
61
|
+
include: ['src/**/*.{ts,tsx,js,jsx}'],
|
|
62
|
+
|
|
63
|
+
// File patterns to exclude
|
|
64
|
+
exclude: [
|
|
65
|
+
'node_modules',
|
|
66
|
+
'dist',
|
|
67
|
+
'build',
|
|
68
|
+
'**/*.test.*',
|
|
69
|
+
'**/*.spec.*',
|
|
70
|
+
'**/__tests__/**',
|
|
71
|
+
'**/__mocks__/**',
|
|
72
|
+
],
|
|
73
|
+
|
|
74
|
+
// Generator options
|
|
75
|
+
generator: {
|
|
76
|
+
// Include snapshot tests
|
|
77
|
+
snapshot: false,
|
|
78
|
+
|
|
79
|
+
// Auto-generate mocks
|
|
80
|
+
mock: true,
|
|
81
|
+
|
|
82
|
+
// Test file suffix (.test or .spec)
|
|
83
|
+
testSuffix: '.test',
|
|
84
|
+
|
|
85
|
+
// Overwrite existing test files
|
|
86
|
+
overwrite: false,
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
// Template options
|
|
90
|
+
templates: {
|
|
91
|
+
// Custom templates directory (optional)
|
|
92
|
+
// dir: './templates',
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
`;
|
|
96
|
+
await fs_extra_1.default.writeFile(configPath, configContent);
|
|
97
|
+
spinner.succeed(chalk_1.default.green('Created .testgenrc.js'));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Setup Git hooks with husky and lint-staged
|
|
101
|
+
*/
|
|
102
|
+
async function setupGitHooks(cwd) {
|
|
103
|
+
const spinner = (0, ora_1.default)('Setting up Git hooks...').start();
|
|
104
|
+
const packageJsonPath = path_1.default.join(cwd, 'package.json');
|
|
105
|
+
try {
|
|
106
|
+
// Read package.json
|
|
107
|
+
const packageJson = await fs_extra_1.default.readJson(packageJsonPath);
|
|
108
|
+
// Check if husky is already installed
|
|
109
|
+
const hasHusky = packageJson.devDependencies?.husky || packageJson.dependencies?.husky;
|
|
110
|
+
const hasLintStaged = packageJson.devDependencies?.['lint-staged'] || packageJson.dependencies?.['lint-staged'];
|
|
111
|
+
// Install husky and lint-staged if not present
|
|
112
|
+
if (!hasHusky || !hasLintStaged) {
|
|
113
|
+
spinner.text = 'Installing husky and lint-staged...';
|
|
114
|
+
const packagesToInstall = [];
|
|
115
|
+
if (!hasHusky)
|
|
116
|
+
packagesToInstall.push('husky');
|
|
117
|
+
if (!hasLintStaged)
|
|
118
|
+
packagesToInstall.push('lint-staged');
|
|
119
|
+
try {
|
|
120
|
+
(0, child_process_1.execSync)(`npm install -D ${packagesToInstall.join(' ')}`, {
|
|
121
|
+
cwd,
|
|
122
|
+
stdio: 'pipe',
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
spinner.warn(chalk_1.default.yellow('Could not install packages automatically. Please run:'));
|
|
127
|
+
console.log(chalk_1.default.cyan(` npm install -D ${packagesToInstall.join(' ')}`));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Re-read package.json after potential install
|
|
131
|
+
const updatedPackageJson = await fs_extra_1.default.readJson(packageJsonPath);
|
|
132
|
+
// Add lint-staged configuration
|
|
133
|
+
if (!updatedPackageJson['lint-staged']) {
|
|
134
|
+
updatedPackageJson['lint-staged'] = {
|
|
135
|
+
'*.{ts,tsx,js,jsx}': ['npm test -- --bail --findRelatedTests --passWithNoTests'],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
// Add prepare script for husky
|
|
139
|
+
if (!updatedPackageJson.scripts) {
|
|
140
|
+
updatedPackageJson.scripts = {};
|
|
141
|
+
}
|
|
142
|
+
if (!updatedPackageJson.scripts.prepare) {
|
|
143
|
+
updatedPackageJson.scripts.prepare = 'husky install';
|
|
144
|
+
}
|
|
145
|
+
// Write updated package.json
|
|
146
|
+
await fs_extra_1.default.writeJson(packageJsonPath, updatedPackageJson, { spaces: 2 });
|
|
147
|
+
// Initialize husky
|
|
148
|
+
spinner.text = 'Initializing husky...';
|
|
149
|
+
const huskyDir = path_1.default.join(cwd, '.husky');
|
|
150
|
+
if (!(await fs_extra_1.default.pathExists(huskyDir))) {
|
|
151
|
+
try {
|
|
152
|
+
(0, child_process_1.execSync)('npx husky install', { cwd, stdio: 'pipe' });
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
// husky install might fail if .git doesn't exist, that's ok
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Create pre-commit hook
|
|
159
|
+
spinner.text = 'Creating pre-commit hook...';
|
|
160
|
+
await fs_extra_1.default.ensureDir(huskyDir);
|
|
161
|
+
const preCommitPath = path_1.default.join(huskyDir, 'pre-commit');
|
|
162
|
+
const preCommitContent = `#!/usr/bin/env sh
|
|
163
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
164
|
+
|
|
165
|
+
echo "๐งช Running tests before commit..."
|
|
166
|
+
npx lint-staged
|
|
167
|
+
`;
|
|
168
|
+
await fs_extra_1.default.writeFile(preCommitPath, preCommitContent);
|
|
169
|
+
await fs_extra_1.default.chmod(preCommitPath, '755');
|
|
170
|
+
// Create husky.sh helper if it doesn't exist
|
|
171
|
+
const huskyHelperDir = path_1.default.join(huskyDir, '_');
|
|
172
|
+
await fs_extra_1.default.ensureDir(huskyHelperDir);
|
|
173
|
+
const huskyShPath = path_1.default.join(huskyHelperDir, 'husky.sh');
|
|
174
|
+
if (!(await fs_extra_1.default.pathExists(huskyShPath))) {
|
|
175
|
+
const huskyShContent = `#!/usr/bin/env sh
|
|
176
|
+
if [ -z "$husky_skip_init" ]; then
|
|
177
|
+
debug () {
|
|
178
|
+
if [ "$HUSKY_DEBUG" = "1" ]; then
|
|
179
|
+
echo "husky (debug) - $1"
|
|
180
|
+
fi
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
readonly hook_name="$(basename -- "$0")"
|
|
184
|
+
debug "starting $hook_name..."
|
|
185
|
+
|
|
186
|
+
if [ "$HUSKY" = "0" ]; then
|
|
187
|
+
debug "HUSKY env variable is set to 0, skipping hook"
|
|
188
|
+
exit 0
|
|
189
|
+
fi
|
|
190
|
+
|
|
191
|
+
if [ -f ~/.huskyrc ]; then
|
|
192
|
+
debug "sourcing ~/.huskyrc"
|
|
193
|
+
. ~/.huskyrc
|
|
194
|
+
fi
|
|
195
|
+
|
|
196
|
+
readonly husky_skip_init=1
|
|
197
|
+
export husky_skip_init
|
|
198
|
+
sh -e "$0" "$@"
|
|
199
|
+
exitCode="$?"
|
|
200
|
+
|
|
201
|
+
if [ $exitCode != 0 ]; then
|
|
202
|
+
echo "husky - $hook_name hook exited with code $exitCode (error)"
|
|
203
|
+
fi
|
|
204
|
+
|
|
205
|
+
if [ $exitCode = 127 ]; then
|
|
206
|
+
echo "husky - command not found in PATH=$PATH"
|
|
207
|
+
fi
|
|
208
|
+
|
|
209
|
+
exit $exitCode
|
|
210
|
+
fi
|
|
211
|
+
`;
|
|
212
|
+
await fs_extra_1.default.writeFile(huskyShPath, huskyShContent);
|
|
213
|
+
await fs_extra_1.default.chmod(huskyShPath, '755');
|
|
214
|
+
}
|
|
215
|
+
spinner.succeed(chalk_1.default.green('Git hooks configured!'));
|
|
216
|
+
console.log('');
|
|
217
|
+
console.log(chalk_1.default.cyan('๐ What was set up:'));
|
|
218
|
+
console.log(' โข ' + chalk_1.default.yellow('husky') + ' - Git hooks manager');
|
|
219
|
+
console.log(' โข ' + chalk_1.default.yellow('lint-staged') + ' - Run tests on staged files');
|
|
220
|
+
console.log(' โข ' + chalk_1.default.yellow('pre-commit hook') + ' - Tests run before each commit');
|
|
221
|
+
console.log('');
|
|
222
|
+
console.log(chalk_1.default.cyan('๐ก How it works:'));
|
|
223
|
+
console.log(' When you run ' + chalk_1.default.yellow('git commit') + ', tests for changed files will run automatically.');
|
|
224
|
+
console.log(' If tests fail, the commit will be blocked.');
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
spinner.fail(chalk_1.default.red('Failed to setup Git hooks'));
|
|
228
|
+
throw error;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.default = initCommand;
|
|
232
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAgBH,kCA8BC;AA5CD,wDAA0B;AAC1B,gDAAwB;AACxB,kDAA0B;AAC1B,8CAAsB;AACtB,iDAAyC;AAOzC;;GAEG;AACI,KAAK,UAAU,WAAW,CAAC,UAAuB,EAAE;IACzD,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAChD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,+BAA+B;IAC/B,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IACvD,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IAED,4BAA4B;IAC5B,MAAM,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAEnC,+BAA+B;IAC/B,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IA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