@vibe-validate/config 0.9.8 → 0.9.9
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/constants.d.ts +40 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +38 -0
- package/dist/git-helpers.d.ts +64 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +71 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/presets/typescript-library.d.ts.map +1 -1
- package/dist/presets/typescript-library.js +5 -4
- package/dist/presets/typescript-nodejs.d.ts.map +1 -1
- package/dist/presets/typescript-nodejs.js +5 -4
- package/dist/presets/typescript-react.d.ts.map +1 -1
- package/dist/presets/typescript-react.js +5 -4
- package/dist/schema.d.ts +10 -15
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +10 -18
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Configuration Constants
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for all git-related default values.
|
|
5
|
+
* These constants are used throughout the application to ensure consistency.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Default git configuration values
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { GIT_DEFAULTS } from '@vibe-validate/config';
|
|
15
|
+
*
|
|
16
|
+
* const mainBranch = config.git?.mainBranch ?? GIT_DEFAULTS.MAIN_BRANCH;
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const GIT_DEFAULTS: {
|
|
20
|
+
/**
|
|
21
|
+
* Default main branch name
|
|
22
|
+
* Common alternatives: 'master', 'develop'
|
|
23
|
+
*/
|
|
24
|
+
readonly MAIN_BRANCH: "main";
|
|
25
|
+
/**
|
|
26
|
+
* Default remote name
|
|
27
|
+
* Common alternatives: 'upstream' (for forked repositories)
|
|
28
|
+
*/
|
|
29
|
+
readonly REMOTE_ORIGIN: "origin";
|
|
30
|
+
/**
|
|
31
|
+
* Auto-sync with remote (disabled by default for safety)
|
|
32
|
+
*/
|
|
33
|
+
readonly AUTO_SYNC: false;
|
|
34
|
+
/**
|
|
35
|
+
* Warn if branch is behind remote
|
|
36
|
+
*/
|
|
37
|
+
readonly WARN_IF_BEHIND: true;
|
|
38
|
+
};
|
|
39
|
+
export type GitDefaults = typeof GIT_DEFAULTS;
|
|
40
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY;IACvB;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEK,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Configuration Constants
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for all git-related default values.
|
|
5
|
+
* These constants are used throughout the application to ensure consistency.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Default git configuration values
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { GIT_DEFAULTS } from '@vibe-validate/config';
|
|
15
|
+
*
|
|
16
|
+
* const mainBranch = config.git?.mainBranch ?? GIT_DEFAULTS.MAIN_BRANCH;
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const GIT_DEFAULTS = {
|
|
20
|
+
/**
|
|
21
|
+
* Default main branch name
|
|
22
|
+
* Common alternatives: 'master', 'develop'
|
|
23
|
+
*/
|
|
24
|
+
MAIN_BRANCH: 'main',
|
|
25
|
+
/**
|
|
26
|
+
* Default remote name
|
|
27
|
+
* Common alternatives: 'upstream' (for forked repositories)
|
|
28
|
+
*/
|
|
29
|
+
REMOTE_ORIGIN: 'origin',
|
|
30
|
+
/**
|
|
31
|
+
* Auto-sync with remote (disabled by default for safety)
|
|
32
|
+
*/
|
|
33
|
+
AUTO_SYNC: false,
|
|
34
|
+
/**
|
|
35
|
+
* Warn if branch is behind remote
|
|
36
|
+
*/
|
|
37
|
+
WARN_IF_BEHIND: true,
|
|
38
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Configuration Helper Functions
|
|
3
|
+
*
|
|
4
|
+
* Centralized utilities for working with git configuration.
|
|
5
|
+
* These functions provide defaults and construct git references consistently.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import type { GitConfig } from './schema.js';
|
|
10
|
+
/**
|
|
11
|
+
* Construct remote branch reference from git config
|
|
12
|
+
*
|
|
13
|
+
* @param config - Git configuration (optional)
|
|
14
|
+
* @returns Remote branch reference (e.g., "origin/main", "upstream/develop")
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // Uses defaults
|
|
19
|
+
* getRemoteBranch()
|
|
20
|
+
* // Returns: "origin/main"
|
|
21
|
+
*
|
|
22
|
+
* // Custom configuration
|
|
23
|
+
* getRemoteBranch({ mainBranch: 'develop', remoteOrigin: 'upstream' })
|
|
24
|
+
* // Returns: "upstream/develop"
|
|
25
|
+
*
|
|
26
|
+
* // Partial configuration (uses defaults for missing values)
|
|
27
|
+
* getRemoteBranch({ mainBranch: 'master' })
|
|
28
|
+
* // Returns: "origin/master"
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function getRemoteBranch(config?: Partial<GitConfig>): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get main branch name with fallback to default
|
|
34
|
+
*
|
|
35
|
+
* @param config - Git configuration (optional)
|
|
36
|
+
* @returns Main branch name
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* getMainBranch({ mainBranch: 'develop' })
|
|
41
|
+
* // Returns: "develop"
|
|
42
|
+
*
|
|
43
|
+
* getMainBranch()
|
|
44
|
+
* // Returns: "main"
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function getMainBranch(config?: Partial<GitConfig>): string;
|
|
48
|
+
/**
|
|
49
|
+
* Get remote origin name with fallback to default
|
|
50
|
+
*
|
|
51
|
+
* @param config - Git configuration (optional)
|
|
52
|
+
* @returns Remote origin name
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* getRemoteOrigin({ remoteOrigin: 'upstream' })
|
|
57
|
+
* // Returns: "upstream"
|
|
58
|
+
*
|
|
59
|
+
* getRemoteOrigin()
|
|
60
|
+
* // Returns: "origin"
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function getRemoteOrigin(config?: Partial<GitConfig>): string;
|
|
64
|
+
//# sourceMappingURL=git-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-helpers.d.ts","sourceRoot":"","sources":["../src/git-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAInE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAEjE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAEnE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Configuration Helper Functions
|
|
3
|
+
*
|
|
4
|
+
* Centralized utilities for working with git configuration.
|
|
5
|
+
* These functions provide defaults and construct git references consistently.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { GIT_DEFAULTS } from './constants.js';
|
|
10
|
+
/**
|
|
11
|
+
* Construct remote branch reference from git config
|
|
12
|
+
*
|
|
13
|
+
* @param config - Git configuration (optional)
|
|
14
|
+
* @returns Remote branch reference (e.g., "origin/main", "upstream/develop")
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // Uses defaults
|
|
19
|
+
* getRemoteBranch()
|
|
20
|
+
* // Returns: "origin/main"
|
|
21
|
+
*
|
|
22
|
+
* // Custom configuration
|
|
23
|
+
* getRemoteBranch({ mainBranch: 'develop', remoteOrigin: 'upstream' })
|
|
24
|
+
* // Returns: "upstream/develop"
|
|
25
|
+
*
|
|
26
|
+
* // Partial configuration (uses defaults for missing values)
|
|
27
|
+
* getRemoteBranch({ mainBranch: 'master' })
|
|
28
|
+
* // Returns: "origin/master"
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export function getRemoteBranch(config) {
|
|
32
|
+
const mainBranch = config?.mainBranch ?? GIT_DEFAULTS.MAIN_BRANCH;
|
|
33
|
+
const remoteOrigin = config?.remoteOrigin ?? GIT_DEFAULTS.REMOTE_ORIGIN;
|
|
34
|
+
return `${remoteOrigin}/${mainBranch}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get main branch name with fallback to default
|
|
38
|
+
*
|
|
39
|
+
* @param config - Git configuration (optional)
|
|
40
|
+
* @returns Main branch name
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* getMainBranch({ mainBranch: 'develop' })
|
|
45
|
+
* // Returns: "develop"
|
|
46
|
+
*
|
|
47
|
+
* getMainBranch()
|
|
48
|
+
* // Returns: "main"
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export function getMainBranch(config) {
|
|
52
|
+
return config?.mainBranch ?? GIT_DEFAULTS.MAIN_BRANCH;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get remote origin name with fallback to default
|
|
56
|
+
*
|
|
57
|
+
* @param config - Git configuration (optional)
|
|
58
|
+
* @returns Remote origin name
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* getRemoteOrigin({ remoteOrigin: 'upstream' })
|
|
63
|
+
* // Returns: "upstream"
|
|
64
|
+
*
|
|
65
|
+
* getRemoteOrigin()
|
|
66
|
+
* // Returns: "origin"
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export function getRemoteOrigin(config) {
|
|
70
|
+
return config?.remoteOrigin ?? GIT_DEFAULTS.REMOTE_ORIGIN;
|
|
71
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -37,8 +37,10 @@
|
|
|
37
37
|
* });
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
export { type ValidationStep, type ValidationPhase, type ValidationConfig, type CachingStrategy, type
|
|
40
|
+
export { type ValidationStep, type ValidationPhase, type ValidationConfig, type CachingStrategy, type GitConfig, type OutputConfig, type CIConfig, type HooksConfig, type VibeValidateConfig, ValidationStepSchema, ValidationPhaseSchema, ValidationConfigSchema, CachingStrategySchema, GitConfigSchema, OutputConfigSchema, CIConfigSchema, HooksConfigSchema, VibeValidateConfigSchema, validateConfig, safeValidateConfig, } from './schema.js';
|
|
41
41
|
export { defineConfig, mergeConfig } from './define-config.js';
|
|
42
42
|
export { typescriptLibraryPreset, typescriptNodejsPreset, typescriptReactPreset, PRESETS, getPreset, listPresets, } from './presets/index.js';
|
|
43
43
|
export { CONFIG_FILE_NAMES, loadConfigFromFile, findAndLoadConfig, loadConfigWithFallback, } from './loader.js';
|
|
44
|
+
export { GIT_DEFAULTS } from './constants.js';
|
|
45
|
+
export { getRemoteBranch, getMainBranch, getRemoteOrigin } from './git-helpers.js';
|
|
44
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAG/D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,OAAO,EACP,SAAS,EACT,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -38,10 +38,13 @@
|
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
// Core schema types and validation
|
|
41
|
-
export { ValidationStepSchema, ValidationPhaseSchema, ValidationConfigSchema, CachingStrategySchema,
|
|
41
|
+
export { ValidationStepSchema, ValidationPhaseSchema, ValidationConfigSchema, CachingStrategySchema, GitConfigSchema, OutputConfigSchema, CIConfigSchema, HooksConfigSchema, VibeValidateConfigSchema, validateConfig, safeValidateConfig, } from './schema.js';
|
|
42
42
|
// Config definition helper
|
|
43
43
|
export { defineConfig, mergeConfig } from './define-config.js';
|
|
44
44
|
// Presets
|
|
45
45
|
export { typescriptLibraryPreset, typescriptNodejsPreset, typescriptReactPreset, PRESETS, getPreset, listPresets, } from './presets/index.js';
|
|
46
46
|
// Config loading
|
|
47
47
|
export { CONFIG_FILE_NAMES, loadConfigFromFile, findAndLoadConfig, loadConfigWithFallback, } from './loader.js';
|
|
48
|
+
// Git configuration constants and helpers
|
|
49
|
+
export { GIT_DEFAULTS } from './constants.js';
|
|
50
|
+
export { getRemoteBranch, getMainBranch, getRemoteOrigin } from './git-helpers.js';
|
|
@@ -1 +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;
|
|
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;AAGvD,eAAO,MAAM,uBAAuB,EA8D/B,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Default preset for TypeScript libraries (npm packages).
|
|
5
5
|
* Includes type checking, linting, testing, and build validation.
|
|
6
6
|
*/
|
|
7
|
+
import { GIT_DEFAULTS } from '../constants.js';
|
|
7
8
|
export const typescriptLibraryPreset = {
|
|
8
9
|
preset: 'typescript-library',
|
|
9
10
|
validation: {
|
|
@@ -53,12 +54,12 @@ export const typescriptLibraryPreset = {
|
|
|
53
54
|
},
|
|
54
55
|
},
|
|
55
56
|
git: {
|
|
56
|
-
mainBranch:
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
mainBranch: GIT_DEFAULTS.MAIN_BRANCH,
|
|
58
|
+
remoteOrigin: GIT_DEFAULTS.REMOTE_ORIGIN,
|
|
59
|
+
autoSync: GIT_DEFAULTS.AUTO_SYNC,
|
|
60
|
+
warnIfBehind: GIT_DEFAULTS.WARN_IF_BEHIND,
|
|
59
61
|
},
|
|
60
62
|
output: {
|
|
61
|
-
format: 'auto',
|
|
62
63
|
showProgress: true,
|
|
63
64
|
verbose: false,
|
|
64
65
|
noColor: false,
|
|
@@ -1 +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;
|
|
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;AAGvD,eAAO,MAAM,sBAAsB,EA2D9B,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Preset for Node.js applications with TypeScript.
|
|
5
5
|
* Includes type checking, linting, unit/integration tests, and build validation.
|
|
6
6
|
*/
|
|
7
|
+
import { GIT_DEFAULTS } from '../constants.js';
|
|
7
8
|
export const typescriptNodejsPreset = {
|
|
8
9
|
preset: 'typescript-nodejs',
|
|
9
10
|
validation: {
|
|
@@ -50,12 +51,12 @@ export const typescriptNodejsPreset = {
|
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
git: {
|
|
53
|
-
mainBranch:
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
mainBranch: GIT_DEFAULTS.MAIN_BRANCH,
|
|
55
|
+
remoteOrigin: GIT_DEFAULTS.REMOTE_ORIGIN,
|
|
56
|
+
autoSync: GIT_DEFAULTS.AUTO_SYNC,
|
|
57
|
+
warnIfBehind: GIT_DEFAULTS.WARN_IF_BEHIND,
|
|
56
58
|
},
|
|
57
59
|
output: {
|
|
58
|
-
format: 'auto',
|
|
59
60
|
showProgress: true,
|
|
60
61
|
verbose: false,
|
|
61
62
|
noColor: false,
|
|
@@ -1 +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;
|
|
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;AAGvD,eAAO,MAAM,qBAAqB,EAoE7B,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Preset for React applications with TypeScript.
|
|
5
5
|
* Includes type checking, linting, component tests, and build validation.
|
|
6
6
|
*/
|
|
7
|
+
import { GIT_DEFAULTS } from '../constants.js';
|
|
7
8
|
export const typescriptReactPreset = {
|
|
8
9
|
preset: 'typescript-react',
|
|
9
10
|
validation: {
|
|
@@ -59,12 +60,12 @@ export const typescriptReactPreset = {
|
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
62
|
git: {
|
|
62
|
-
mainBranch:
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
mainBranch: GIT_DEFAULTS.MAIN_BRANCH,
|
|
64
|
+
remoteOrigin: GIT_DEFAULTS.REMOTE_ORIGIN,
|
|
65
|
+
autoSync: GIT_DEFAULTS.AUTO_SYNC,
|
|
66
|
+
warnIfBehind: GIT_DEFAULTS.WARN_IF_BEHIND,
|
|
65
67
|
},
|
|
66
68
|
output: {
|
|
67
|
-
format: 'auto',
|
|
68
69
|
showProgress: true,
|
|
69
70
|
verbose: false,
|
|
70
71
|
noColor: false,
|
package/dist/schema.d.ts
CHANGED
|
@@ -255,27 +255,26 @@ export declare const ValidationConfigSchema: z.ZodObject<{
|
|
|
255
255
|
} | undefined;
|
|
256
256
|
}>;
|
|
257
257
|
export type ValidationConfig = z.infer<typeof ValidationConfigSchema>;
|
|
258
|
-
/**
|
|
259
|
-
* Output Format Schema
|
|
260
|
-
*/
|
|
261
|
-
export declare const OutputFormatSchema: z.ZodEnum<["human", "yaml", "json", "auto"]>;
|
|
262
|
-
export type OutputFormat = z.infer<typeof OutputFormatSchema>;
|
|
263
258
|
/**
|
|
264
259
|
* Git Config Schema
|
|
265
260
|
*/
|
|
266
261
|
export declare const GitConfigSchema: z.ZodObject<{
|
|
267
262
|
/** Main branch name (default: main) */
|
|
268
263
|
mainBranch: z.ZodDefault<z.ZodString>;
|
|
264
|
+
/** Remote name (default: origin) */
|
|
265
|
+
remoteOrigin: z.ZodDefault<z.ZodString>;
|
|
269
266
|
/** Auto-sync with remote (default: false) */
|
|
270
267
|
autoSync: z.ZodDefault<z.ZodBoolean>;
|
|
271
268
|
/** Warn if branch is behind remote (default: true) */
|
|
272
269
|
warnIfBehind: z.ZodDefault<z.ZodBoolean>;
|
|
273
270
|
}, "strip", z.ZodTypeAny, {
|
|
274
271
|
mainBranch: string;
|
|
272
|
+
remoteOrigin: string;
|
|
275
273
|
autoSync: boolean;
|
|
276
274
|
warnIfBehind: boolean;
|
|
277
275
|
}, {
|
|
278
276
|
mainBranch?: string | undefined;
|
|
277
|
+
remoteOrigin?: string | undefined;
|
|
279
278
|
autoSync?: boolean | undefined;
|
|
280
279
|
warnIfBehind?: boolean | undefined;
|
|
281
280
|
}>;
|
|
@@ -284,8 +283,6 @@ export type GitConfig = z.infer<typeof GitConfigSchema>;
|
|
|
284
283
|
* Output Config Schema
|
|
285
284
|
*/
|
|
286
285
|
export declare const OutputConfigSchema: z.ZodObject<{
|
|
287
|
-
/** Output format (default: auto) */
|
|
288
|
-
format: z.ZodDefault<z.ZodEnum<["human", "yaml", "json", "auto"]>>;
|
|
289
286
|
/** Show progress indicators (default: true) */
|
|
290
287
|
showProgress: z.ZodDefault<z.ZodBoolean>;
|
|
291
288
|
/** Verbose logging (default: false) */
|
|
@@ -293,12 +290,10 @@ export declare const OutputConfigSchema: z.ZodObject<{
|
|
|
293
290
|
/** Suppress ANSI colors (default: false) */
|
|
294
291
|
noColor: z.ZodDefault<z.ZodBoolean>;
|
|
295
292
|
}, "strip", z.ZodTypeAny, {
|
|
296
|
-
format: "human" | "yaml" | "json" | "auto";
|
|
297
293
|
showProgress: boolean;
|
|
298
294
|
verbose: boolean;
|
|
299
295
|
noColor: boolean;
|
|
300
296
|
}, {
|
|
301
|
-
format?: "human" | "yaml" | "json" | "auto" | undefined;
|
|
302
297
|
showProgress?: boolean | undefined;
|
|
303
298
|
verbose?: boolean | undefined;
|
|
304
299
|
noColor?: boolean | undefined;
|
|
@@ -499,23 +494,25 @@ export declare const VibeValidateConfigSchema: z.ZodObject<{
|
|
|
499
494
|
git: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
500
495
|
/** Main branch name (default: main) */
|
|
501
496
|
mainBranch: z.ZodDefault<z.ZodString>;
|
|
497
|
+
/** Remote name (default: origin) */
|
|
498
|
+
remoteOrigin: z.ZodDefault<z.ZodString>;
|
|
502
499
|
/** Auto-sync with remote (default: false) */
|
|
503
500
|
autoSync: z.ZodDefault<z.ZodBoolean>;
|
|
504
501
|
/** Warn if branch is behind remote (default: true) */
|
|
505
502
|
warnIfBehind: z.ZodDefault<z.ZodBoolean>;
|
|
506
503
|
}, "strip", z.ZodTypeAny, {
|
|
507
504
|
mainBranch: string;
|
|
505
|
+
remoteOrigin: string;
|
|
508
506
|
autoSync: boolean;
|
|
509
507
|
warnIfBehind: boolean;
|
|
510
508
|
}, {
|
|
511
509
|
mainBranch?: string | undefined;
|
|
510
|
+
remoteOrigin?: string | undefined;
|
|
512
511
|
autoSync?: boolean | undefined;
|
|
513
512
|
warnIfBehind?: boolean | undefined;
|
|
514
513
|
}>>>;
|
|
515
514
|
/** Output formatting configuration */
|
|
516
515
|
output: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
517
|
-
/** Output format (default: auto) */
|
|
518
|
-
format: z.ZodDefault<z.ZodEnum<["human", "yaml", "json", "auto"]>>;
|
|
519
516
|
/** Show progress indicators (default: true) */
|
|
520
517
|
showProgress: z.ZodDefault<z.ZodBoolean>;
|
|
521
518
|
/** Verbose logging (default: false) */
|
|
@@ -523,12 +520,10 @@ export declare const VibeValidateConfigSchema: z.ZodObject<{
|
|
|
523
520
|
/** Suppress ANSI colors (default: false) */
|
|
524
521
|
noColor: z.ZodDefault<z.ZodBoolean>;
|
|
525
522
|
}, "strip", z.ZodTypeAny, {
|
|
526
|
-
format: "human" | "yaml" | "json" | "auto";
|
|
527
523
|
showProgress: boolean;
|
|
528
524
|
verbose: boolean;
|
|
529
525
|
noColor: boolean;
|
|
530
526
|
}, {
|
|
531
|
-
format?: "human" | "yaml" | "json" | "auto" | undefined;
|
|
532
527
|
showProgress?: boolean | undefined;
|
|
533
528
|
verbose?: boolean | undefined;
|
|
534
529
|
noColor?: boolean | undefined;
|
|
@@ -609,11 +604,11 @@ export declare const VibeValidateConfigSchema: z.ZodObject<{
|
|
|
609
604
|
};
|
|
610
605
|
git: {
|
|
611
606
|
mainBranch: string;
|
|
607
|
+
remoteOrigin: string;
|
|
612
608
|
autoSync: boolean;
|
|
613
609
|
warnIfBehind: boolean;
|
|
614
610
|
};
|
|
615
611
|
output: {
|
|
616
|
-
format: "human" | "yaml" | "json" | "auto";
|
|
617
612
|
showProgress: boolean;
|
|
618
613
|
verbose: boolean;
|
|
619
614
|
noColor: boolean;
|
|
@@ -657,11 +652,11 @@ export declare const VibeValidateConfigSchema: z.ZodObject<{
|
|
|
657
652
|
};
|
|
658
653
|
git?: {
|
|
659
654
|
mainBranch?: string | undefined;
|
|
655
|
+
remoteOrigin?: string | undefined;
|
|
660
656
|
autoSync?: boolean | undefined;
|
|
661
657
|
warnIfBehind?: boolean | undefined;
|
|
662
658
|
} | undefined;
|
|
663
659
|
output?: {
|
|
664
|
-
format?: "human" | "yaml" | "json" | "auto" | undefined;
|
|
665
660
|
showProgress?: boolean | undefined;
|
|
666
661
|
verbose?: boolean | undefined;
|
|
667
662
|
noColor?: boolean | undefined;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;IAC/B,kEAAkE;;IAGlE,qDAAqD;;IAGrD,+EAA+E;;IAG/E,qDAAqD;;IAGrD,oDAAoD;;IAGpD,wEAAwE;;;;;;;;;;;;;;;;EAExE,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;IAChC,wDAAwD;;IAGxD,iDAAiD;;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E;;QA1DnE,6DAA6D;;QAG7D,mEAAmE;;QAGnE,oDAAoD;;QAGpD,iDAAiD;;;;;;;;;;;;;IAoDjD,6CAA6C;;QA1C7C,oCAAoC;;YAElC,sDAAsD;;YAGtD,0EAA0E;;;;;;;;;;;;;;;;;;;;IA6C5E,0EAA0E;;IAG1E,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3C,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAcA"}
|
package/dist/schema.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Provides runtime validation and type safety for all configuration options.
|
|
6
6
|
*/
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
+
import { GIT_DEFAULTS } from './constants.js';
|
|
8
9
|
/**
|
|
9
10
|
* Validation Step Schema
|
|
10
11
|
*
|
|
@@ -72,32 +73,23 @@ export const ValidationConfigSchema = z.object({
|
|
|
72
73
|
statePath: '.vibe-validate-state.yaml',
|
|
73
74
|
}),
|
|
74
75
|
});
|
|
75
|
-
/**
|
|
76
|
-
* Output Format Schema
|
|
77
|
-
*/
|
|
78
|
-
export const OutputFormatSchema = z.enum([
|
|
79
|
-
'human', // Colorful, verbose output for humans
|
|
80
|
-
'yaml', // Structured YAML for agents
|
|
81
|
-
'json', // Machine-readable JSON
|
|
82
|
-
'auto', // Auto-detect context (default)
|
|
83
|
-
]);
|
|
84
76
|
/**
|
|
85
77
|
* Git Config Schema
|
|
86
78
|
*/
|
|
87
79
|
export const GitConfigSchema = z.object({
|
|
88
80
|
/** Main branch name (default: main) */
|
|
89
|
-
mainBranch: z.string().default(
|
|
81
|
+
mainBranch: z.string().default(GIT_DEFAULTS.MAIN_BRANCH),
|
|
82
|
+
/** Remote name (default: origin) */
|
|
83
|
+
remoteOrigin: z.string().default(GIT_DEFAULTS.REMOTE_ORIGIN),
|
|
90
84
|
/** Auto-sync with remote (default: false) */
|
|
91
|
-
autoSync: z.boolean().default(
|
|
85
|
+
autoSync: z.boolean().default(GIT_DEFAULTS.AUTO_SYNC),
|
|
92
86
|
/** Warn if branch is behind remote (default: true) */
|
|
93
|
-
warnIfBehind: z.boolean().default(
|
|
87
|
+
warnIfBehind: z.boolean().default(GIT_DEFAULTS.WARN_IF_BEHIND),
|
|
94
88
|
});
|
|
95
89
|
/**
|
|
96
90
|
* Output Config Schema
|
|
97
91
|
*/
|
|
98
92
|
export const OutputConfigSchema = z.object({
|
|
99
|
-
/** Output format (default: auto) */
|
|
100
|
-
format: OutputFormatSchema.default('auto'),
|
|
101
93
|
/** Show progress indicators (default: true) */
|
|
102
94
|
showProgress: z.boolean().default(true),
|
|
103
95
|
/** Verbose logging (default: false) */
|
|
@@ -143,13 +135,13 @@ export const VibeValidateConfigSchema = z.object({
|
|
|
143
135
|
validation: ValidationConfigSchema,
|
|
144
136
|
/** Git integration configuration */
|
|
145
137
|
git: GitConfigSchema.optional().default({
|
|
146
|
-
mainBranch:
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
mainBranch: GIT_DEFAULTS.MAIN_BRANCH,
|
|
139
|
+
remoteOrigin: GIT_DEFAULTS.REMOTE_ORIGIN,
|
|
140
|
+
autoSync: GIT_DEFAULTS.AUTO_SYNC,
|
|
141
|
+
warnIfBehind: GIT_DEFAULTS.WARN_IF_BEHIND,
|
|
149
142
|
}),
|
|
150
143
|
/** Output formatting configuration */
|
|
151
144
|
output: OutputConfigSchema.optional().default({
|
|
152
|
-
format: 'auto',
|
|
153
145
|
showProgress: true,
|
|
154
146
|
verbose: false,
|
|
155
147
|
noColor: false,
|
package/package.json
CHANGED