@vibe-validate/config 0.9.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/README.md +235 -0
- package/dist/define-config.d.ts +49 -0
- package/dist/define-config.d.ts.map +1 -0
- package/dist/define-config.js +72 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/loader.d.ts +38 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +147 -0
- package/dist/presets/index.d.ts +27 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/index.js +36 -0
- package/dist/presets/typescript-library.d.ts +9 -0
- package/dist/presets/typescript-library.d.ts.map +1 -0
- package/dist/presets/typescript-library.js +66 -0
- package/dist/presets/typescript-nodejs.d.ts +9 -0
- package/dist/presets/typescript-nodejs.d.ts.map +1 -0
- package/dist/presets/typescript-nodejs.js +63 -0
- package/dist/presets/typescript-react.d.ts +9 -0
- package/dist/presets/typescript-react.d.ts.map +1 -0
- package/dist/presets/typescript-react.js +72 -0
- package/dist/schema.d.ts +580 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +148 -0
- package/package.json +48 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Framework Presets
|
|
3
|
+
*
|
|
4
|
+
* Pre-configured validation setups for common TypeScript project types.
|
|
5
|
+
*/
|
|
6
|
+
export { typescriptLibraryPreset } from './typescript-library.js';
|
|
7
|
+
export { typescriptNodejsPreset } from './typescript-nodejs.js';
|
|
8
|
+
export { typescriptReactPreset } from './typescript-react.js';
|
|
9
|
+
import { typescriptLibraryPreset } from './typescript-library.js';
|
|
10
|
+
import { typescriptNodejsPreset } from './typescript-nodejs.js';
|
|
11
|
+
import { typescriptReactPreset } from './typescript-react.js';
|
|
12
|
+
/**
|
|
13
|
+
* Map of preset name to configuration
|
|
14
|
+
*/
|
|
15
|
+
export const PRESETS = {
|
|
16
|
+
'typescript-library': typescriptLibraryPreset,
|
|
17
|
+
'typescript-nodejs': typescriptNodejsPreset,
|
|
18
|
+
'typescript-react': typescriptReactPreset,
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Get a preset by name
|
|
22
|
+
*
|
|
23
|
+
* @param name - Preset name
|
|
24
|
+
* @returns Preset configuration or undefined if not found
|
|
25
|
+
*/
|
|
26
|
+
export function getPreset(name) {
|
|
27
|
+
return PRESETS[name];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* List all available preset names
|
|
31
|
+
*
|
|
32
|
+
* @returns Array of preset names
|
|
33
|
+
*/
|
|
34
|
+
export function listPresets() {
|
|
35
|
+
return Object.keys(PRESETS);
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: TypeScript Library
|
|
3
|
+
*
|
|
4
|
+
* Default preset for TypeScript libraries (npm packages).
|
|
5
|
+
* Includes type checking, linting, testing, and build validation.
|
|
6
|
+
*/
|
|
7
|
+
import type { VibeValidateConfig } from '../schema.js';
|
|
8
|
+
export declare const typescriptLibraryPreset: VibeValidateConfig;
|
|
9
|
+
//# sourceMappingURL=typescript-library.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-library.d.ts","sourceRoot":"","sources":["../../src/presets/typescript-library.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,uBAAuB,EA8D/B,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: TypeScript Library
|
|
3
|
+
*
|
|
4
|
+
* Default preset for TypeScript libraries (npm packages).
|
|
5
|
+
* Includes type checking, linting, testing, and build validation.
|
|
6
|
+
*/
|
|
7
|
+
export const typescriptLibraryPreset = {
|
|
8
|
+
preset: 'typescript-library',
|
|
9
|
+
validation: {
|
|
10
|
+
phases: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Phase 1: Pre-Qualification',
|
|
13
|
+
parallel: true,
|
|
14
|
+
failFast: true,
|
|
15
|
+
steps: [
|
|
16
|
+
{
|
|
17
|
+
name: 'TypeScript type checking',
|
|
18
|
+
command: 'tsc --noEmit',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'ESLint code checking',
|
|
22
|
+
command: 'eslint .',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Phase 2: Testing',
|
|
28
|
+
parallel: true,
|
|
29
|
+
dependsOn: ['Phase 1: Pre-Qualification'],
|
|
30
|
+
steps: [
|
|
31
|
+
{
|
|
32
|
+
name: 'Unit tests',
|
|
33
|
+
command: 'npm test',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Phase 3: Build',
|
|
39
|
+
parallel: false,
|
|
40
|
+
dependsOn: ['Phase 2: Testing'],
|
|
41
|
+
steps: [
|
|
42
|
+
{
|
|
43
|
+
name: 'Build package',
|
|
44
|
+
command: 'npm run build',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
caching: {
|
|
50
|
+
strategy: 'git-tree-hash',
|
|
51
|
+
enabled: true,
|
|
52
|
+
statePath: '.vibe-validate-state.yaml',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
git: {
|
|
56
|
+
mainBranch: 'main',
|
|
57
|
+
autoSync: false,
|
|
58
|
+
warnIfBehind: true,
|
|
59
|
+
},
|
|
60
|
+
output: {
|
|
61
|
+
format: 'auto',
|
|
62
|
+
showProgress: true,
|
|
63
|
+
verbose: false,
|
|
64
|
+
noColor: false,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: TypeScript Node.js Application
|
|
3
|
+
*
|
|
4
|
+
* Preset for Node.js applications with TypeScript.
|
|
5
|
+
* Includes type checking, linting, unit/integration tests, and build validation.
|
|
6
|
+
*/
|
|
7
|
+
import type { VibeValidateConfig } from '../schema.js';
|
|
8
|
+
export declare const typescriptNodejsPreset: VibeValidateConfig;
|
|
9
|
+
//# sourceMappingURL=typescript-nodejs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-nodejs.d.ts","sourceRoot":"","sources":["../../src/presets/typescript-nodejs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,sBAAsB,EA2D9B,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: TypeScript Node.js Application
|
|
3
|
+
*
|
|
4
|
+
* Preset for Node.js applications with TypeScript.
|
|
5
|
+
* Includes type checking, linting, unit/integration tests, and build validation.
|
|
6
|
+
*/
|
|
7
|
+
export const typescriptNodejsPreset = {
|
|
8
|
+
preset: 'typescript-nodejs',
|
|
9
|
+
validation: {
|
|
10
|
+
phases: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Phase 1: Pre-Qualification + Build',
|
|
13
|
+
parallel: true,
|
|
14
|
+
failFast: true,
|
|
15
|
+
steps: [
|
|
16
|
+
{
|
|
17
|
+
name: 'TypeScript type checking',
|
|
18
|
+
command: 'tsc --noEmit',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'ESLint code checking',
|
|
22
|
+
command: 'eslint .',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'Build',
|
|
26
|
+
command: 'npm run build',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Phase 2: Testing',
|
|
32
|
+
parallel: true,
|
|
33
|
+
dependsOn: ['Phase 1: Pre-Qualification + Build'],
|
|
34
|
+
steps: [
|
|
35
|
+
{
|
|
36
|
+
name: 'Unit tests',
|
|
37
|
+
command: 'npm run test:unit',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Integration tests',
|
|
41
|
+
command: 'npm run test:integration',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
caching: {
|
|
47
|
+
strategy: 'git-tree-hash',
|
|
48
|
+
enabled: true,
|
|
49
|
+
statePath: '.vibe-validate-state.yaml',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
git: {
|
|
53
|
+
mainBranch: 'main',
|
|
54
|
+
autoSync: false,
|
|
55
|
+
warnIfBehind: true,
|
|
56
|
+
},
|
|
57
|
+
output: {
|
|
58
|
+
format: 'auto',
|
|
59
|
+
showProgress: true,
|
|
60
|
+
verbose: false,
|
|
61
|
+
noColor: false,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: TypeScript React Application
|
|
3
|
+
*
|
|
4
|
+
* Preset for React applications with TypeScript.
|
|
5
|
+
* Includes type checking, linting, component tests, and build validation.
|
|
6
|
+
*/
|
|
7
|
+
import type { VibeValidateConfig } from '../schema.js';
|
|
8
|
+
export declare const typescriptReactPreset: VibeValidateConfig;
|
|
9
|
+
//# sourceMappingURL=typescript-react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-react.d.ts","sourceRoot":"","sources":["../../src/presets/typescript-react.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,qBAAqB,EAoE7B,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preset: TypeScript React Application
|
|
3
|
+
*
|
|
4
|
+
* Preset for React applications with TypeScript.
|
|
5
|
+
* Includes type checking, linting, component tests, and build validation.
|
|
6
|
+
*/
|
|
7
|
+
export const typescriptReactPreset = {
|
|
8
|
+
preset: 'typescript-react',
|
|
9
|
+
validation: {
|
|
10
|
+
phases: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Phase 1: Pre-Qualification',
|
|
13
|
+
parallel: true,
|
|
14
|
+
failFast: true,
|
|
15
|
+
steps: [
|
|
16
|
+
{
|
|
17
|
+
name: 'TypeScript type checking',
|
|
18
|
+
command: 'tsc --noEmit',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'ESLint code checking',
|
|
22
|
+
command: 'eslint .',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Phase 2: Testing',
|
|
28
|
+
parallel: true,
|
|
29
|
+
dependsOn: ['Phase 1: Pre-Qualification'],
|
|
30
|
+
steps: [
|
|
31
|
+
{
|
|
32
|
+
name: 'Unit tests',
|
|
33
|
+
command: 'npm run test:unit',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'Component tests',
|
|
37
|
+
command: 'npm run test:components',
|
|
38
|
+
continueOnError: true, // Optional if component tests are in progress
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Phase 3: Build',
|
|
44
|
+
parallel: false,
|
|
45
|
+
dependsOn: ['Phase 2: Testing'],
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
name: 'Production build',
|
|
49
|
+
command: 'npm run build',
|
|
50
|
+
timeout: 600000, // 10 minutes for React builds
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
caching: {
|
|
56
|
+
strategy: 'git-tree-hash',
|
|
57
|
+
enabled: true,
|
|
58
|
+
statePath: '.vibe-validate-state.yaml',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
git: {
|
|
62
|
+
mainBranch: 'main',
|
|
63
|
+
autoSync: false,
|
|
64
|
+
warnIfBehind: true,
|
|
65
|
+
},
|
|
66
|
+
output: {
|
|
67
|
+
format: 'auto',
|
|
68
|
+
showProgress: true,
|
|
69
|
+
verbose: false,
|
|
70
|
+
noColor: false,
|
|
71
|
+
},
|
|
72
|
+
};
|