@funish/basis 0.0.1 → 0.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/README.md +120 -31
- package/dist/chunks/config.cjs +1 -1
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/git.cjs +1 -0
- package/dist/chunks/git.mjs +1 -0
- package/dist/chunks/init.cjs +1 -1
- package/dist/chunks/init.mjs +1 -1
- package/dist/chunks/lint.cjs +1 -1
- package/dist/chunks/lint.mjs +1 -1
- package/dist/chunks/publish.cjs +1 -1
- package/dist/chunks/publish.mjs +1 -1
- package/dist/chunks/version.cjs +1 -1
- package/dist/chunks/version.mjs +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +188 -25
- package/dist/index.d.mts +188 -25
- package/dist/index.d.ts +188 -25
- package/dist/index.mjs +1 -1
- package/dist/shared/basis.0WCUjjhy.mjs +1 -0
- package/dist/shared/basis.1ZgFrMJb.mjs +7 -0
- package/dist/shared/basis.B4p52ive.cjs +1 -0
- package/dist/shared/basis.BEOfVK6U.cjs +3 -0
- package/dist/shared/basis.BJhSbOyA.cjs +1 -0
- package/dist/shared/basis.BvLeB_5F.d.cts +253 -0
- package/dist/shared/basis.BvLeB_5F.d.mts +253 -0
- package/dist/shared/basis.BvLeB_5F.d.ts +253 -0
- package/dist/shared/basis.C8S2dWvt.cjs +7 -0
- package/dist/shared/basis.CHVACS4W.cjs +1 -0
- package/dist/shared/basis.CkZpidFZ.mjs +1 -0
- package/dist/shared/basis.DcC8NBqt.mjs +3 -0
- package/dist/shared/basis.DzMHJtq5.mjs +10 -0
- package/dist/shared/basis.plLH3j3N.mjs +1 -0
- package/dist/shared/basis.sOTOmfHG.cjs +10 -0
- package/package.json +7 -3
- package/dist/chunks/githooks.cjs +0 -1
- package/dist/chunks/githooks.mjs +0 -1
- package/dist/shared/basis.ByJ8R9TE.cjs +0 -1
- package/dist/shared/basis.C0E7mwQ6.mjs +0 -1
- package/dist/shared/basis.C5wlo6IO.mjs +0 -1
- package/dist/shared/basis.CBZIV3-V.mjs +0 -19
- package/dist/shared/basis.CSSuyvpq.cjs +0 -1
- package/dist/shared/basis.CgpyxNW3.cjs +0 -1
- package/dist/shared/basis.D57HxVvD.cjs +0 -4
- package/dist/shared/basis.DeKfEQsQ.cjs +0 -5
- package/dist/shared/basis.DweCjqFb.cjs +0 -19
- package/dist/shared/basis.O4so-uuj.mjs +0 -5
- package/dist/shared/basis.dc3ybBoz.mjs +0 -1
- package/dist/shared/basis.iRZ1Ylu8.d.cts +0 -127
- package/dist/shared/basis.iRZ1Ylu8.d.mts +0 -127
- package/dist/shared/basis.iRZ1Ylu8.d.ts +0 -127
- package/dist/shared/basis.rDVxD7qf.mjs +0 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BasisConfig, I as InitOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { B as BasisConfig, I as InitOptions, V as VersionOptions, a as VersionUpdateResult, P as PublishOptions, b as PublishResult, C as CommitMessage, G as GitConfig, c as GitConfigData, L as LintConfig } from './shared/basis.BvLeB_5F.cjs';
|
|
2
|
+
export { f as CommitMsgConfig, j as GitConfigSection, i as GitConfigValue, k as PackageManagerConfig, m as PublishConfig, g as VALID_GIT_HOOKS, h as ValidGitHook, l as VersionConfig, e as defaultConfig, d as defineBasisConfig } from './shared/basis.BvLeB_5F.cjs';
|
|
3
3
|
import * as c12 from 'c12';
|
|
4
4
|
import { LoadConfigOptions } from 'c12';
|
|
5
5
|
|
|
@@ -20,59 +20,211 @@ declare class Basis {
|
|
|
20
20
|
*/
|
|
21
21
|
lintStaged(): Promise<boolean>;
|
|
22
22
|
/**
|
|
23
|
-
* Run
|
|
23
|
+
* Run linting for entire project
|
|
24
|
+
*/
|
|
25
|
+
lintProject(): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Check project dependencies
|
|
28
|
+
*/
|
|
29
|
+
lintDependencies(): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Check project structure
|
|
32
|
+
*/
|
|
33
|
+
lintStructure(): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Check project documentation
|
|
36
|
+
*/
|
|
37
|
+
lintDocs(): Promise<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Run all lint checks
|
|
40
|
+
*/
|
|
41
|
+
lintAll(): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Validate commit message
|
|
24
44
|
*/
|
|
25
45
|
lintCommitMessage(): Promise<boolean>;
|
|
26
46
|
/**
|
|
27
|
-
*
|
|
47
|
+
* Setup Git hooks
|
|
48
|
+
*/
|
|
49
|
+
setupGitHooks(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Setup Git configuration
|
|
52
|
+
*/
|
|
53
|
+
setupGitConfig(): Promise<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Setup complete Git configuration (hooks + config)
|
|
56
|
+
*/
|
|
57
|
+
setupGit(): Promise<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Initialize Git repository with basis configuration
|
|
60
|
+
*/
|
|
61
|
+
initGitRepo(): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Remove Git hooks
|
|
64
|
+
*/
|
|
65
|
+
removeGitHooks(updateConfig?: boolean): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Reset Git configuration
|
|
68
|
+
*/
|
|
69
|
+
resetGitConfig(keepUser?: boolean, updateConfig?: boolean): Promise<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Update package version
|
|
72
|
+
*/
|
|
73
|
+
updateVersion(options?: VersionOptions): Promise<VersionUpdateResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Update to specific version
|
|
76
|
+
*/
|
|
77
|
+
setVersion(version: string): Promise<VersionUpdateResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Increment patch version
|
|
80
|
+
*/
|
|
81
|
+
patchVersion(): Promise<VersionUpdateResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Increment minor version
|
|
84
|
+
*/
|
|
85
|
+
minorVersion(): Promise<VersionUpdateResult>;
|
|
86
|
+
/**
|
|
87
|
+
* Increment major version
|
|
88
|
+
*/
|
|
89
|
+
majorVersion(): Promise<VersionUpdateResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Create prerelease version
|
|
92
|
+
*/
|
|
93
|
+
prereleaseVersion(preid?: string): Promise<VersionUpdateResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Publish package to registry
|
|
96
|
+
*/
|
|
97
|
+
publish(options?: PublishOptions): Promise<PublishResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Publish with dry run
|
|
100
|
+
*/
|
|
101
|
+
publishDryRun(options?: PublishOptions): Promise<PublishResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Publish to specific tag
|
|
104
|
+
*/
|
|
105
|
+
publishToTag(tag: string, options?: PublishOptions): Promise<PublishResult>;
|
|
106
|
+
/**
|
|
107
|
+
* Publish as stable release (latest tag)
|
|
108
|
+
*/
|
|
109
|
+
publishStable(options?: PublishOptions): Promise<PublishResult>;
|
|
110
|
+
/**
|
|
111
|
+
* Get current working directory
|
|
112
|
+
*/
|
|
113
|
+
getCwd(): string;
|
|
114
|
+
/**
|
|
115
|
+
* Set working directory
|
|
116
|
+
*/
|
|
117
|
+
setCwd(cwd: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* Reload configuration from file
|
|
28
120
|
*/
|
|
29
|
-
|
|
121
|
+
reloadConfig(): Promise<BasisConfig>;
|
|
30
122
|
/**
|
|
31
|
-
*
|
|
123
|
+
* Run complete project setup (init + git setup)
|
|
32
124
|
*/
|
|
33
|
-
|
|
125
|
+
setup(options?: InitOptions): Promise<boolean>;
|
|
34
126
|
/**
|
|
35
|
-
*
|
|
127
|
+
* Run complete release workflow (lint + version + publish)
|
|
36
128
|
*/
|
|
37
|
-
|
|
129
|
+
release(versionOptions?: VersionOptions, publishOptions?: PublishOptions): Promise<{
|
|
130
|
+
version: VersionUpdateResult;
|
|
131
|
+
publish: PublishResult;
|
|
132
|
+
}>;
|
|
38
133
|
}
|
|
39
134
|
/**
|
|
40
135
|
* Create a new Basis instance
|
|
41
136
|
*/
|
|
42
137
|
declare function createBasis(cwd?: string): Basis;
|
|
43
138
|
|
|
44
|
-
declare function installHooks(cwd?: string, config?: GitHooksConfig): Promise<void>;
|
|
45
|
-
declare function uninstallHooks(cwd?: string, config?: GitHooksConfig): Promise<void>;
|
|
46
|
-
declare function listHooks(cwd?: string, config?: GitHooksConfig): Promise<void>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Initialize basis configuration in the current project
|
|
50
|
-
*/
|
|
51
|
-
declare function init(cwd?: string, options?: InitOptions): Promise<boolean>;
|
|
52
|
-
|
|
53
139
|
/**
|
|
54
|
-
* Parse commit message
|
|
140
|
+
* Parse commit message into structured format
|
|
55
141
|
*/
|
|
56
142
|
declare function parseCommitMessage(message: string): CommitMessage | null;
|
|
57
143
|
/**
|
|
58
|
-
* Validate commit message
|
|
144
|
+
* Validate commit message against rules
|
|
59
145
|
*/
|
|
60
|
-
declare function validateCommitMessage(message: string, config?:
|
|
146
|
+
declare function validateCommitMessage(message: string, config?: GitConfig["commitMsg"]): {
|
|
61
147
|
valid: boolean;
|
|
62
148
|
errors: string[];
|
|
63
149
|
};
|
|
64
150
|
/**
|
|
65
|
-
*
|
|
151
|
+
* Lint commit message from Git
|
|
152
|
+
*/
|
|
153
|
+
declare function lintCommitMessage(cwd?: string, config?: GitConfig["commitMsg"]): Promise<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Read Git configuration from .git/config using ini parser
|
|
156
|
+
*/
|
|
157
|
+
declare function readGitConfig(cwd?: string): Promise<GitConfigData>;
|
|
158
|
+
/**
|
|
159
|
+
* Write Git configuration to .git/config using ini format
|
|
160
|
+
*/
|
|
161
|
+
declare function writeGitConfig(config: GitConfigData, cwd?: string): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Setup Git configuration with backup and safe merging
|
|
164
|
+
*/
|
|
165
|
+
declare function setupGitConfig(cwd?: string, config?: GitConfig["config"]): Promise<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* Reset Git configuration with backup
|
|
168
|
+
*/
|
|
169
|
+
declare function resetGitConfig(cwd?: string, keepUser?: boolean, options?: {
|
|
170
|
+
updateConfig?: boolean;
|
|
171
|
+
}): Promise<boolean>;
|
|
172
|
+
/**
|
|
173
|
+
* Setup Git hooks
|
|
174
|
+
*/
|
|
175
|
+
declare function setupGitHooks(cwd?: string, config?: GitConfig["hooks"]): Promise<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* Initialize Git repository with basis configuration
|
|
178
|
+
*/
|
|
179
|
+
declare function initGitRepo(cwd?: string): Promise<boolean>;
|
|
180
|
+
/**
|
|
181
|
+
* Run comprehensive Git setup
|
|
182
|
+
*/
|
|
183
|
+
declare function setupGit(cwd?: string): Promise<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* Remove Git hooks
|
|
186
|
+
*/
|
|
187
|
+
declare function removeGitHooks(cwd?: string, hooksToRemove?: string[], options?: {
|
|
188
|
+
updateConfig?: boolean;
|
|
189
|
+
}): Promise<boolean>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Initialize basis configuration in the current project
|
|
193
|
+
*/
|
|
194
|
+
declare function init(cwd?: string, options?: InitOptions): Promise<boolean>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Get staged files (only existing files, not deleted ones)
|
|
66
198
|
*/
|
|
67
199
|
declare function getStagedFiles(): string[];
|
|
200
|
+
/**
|
|
201
|
+
* Get all project files based on patterns using fast-glob
|
|
202
|
+
*/
|
|
203
|
+
declare function getProjectFiles(cwd: string, patterns?: string[], exclude?: string[]): Promise<string[]>;
|
|
68
204
|
/**
|
|
69
205
|
* Lint staged files
|
|
70
206
|
*/
|
|
71
207
|
declare function lintStaged(cwd?: string, config?: LintConfig["staged"]): Promise<boolean>;
|
|
72
208
|
/**
|
|
73
|
-
* Lint
|
|
209
|
+
* Lint entire project using commands (similar to staged but for all project files)
|
|
210
|
+
*/
|
|
211
|
+
declare function lintProject(cwd?: string, config?: LintConfig["project"]): Promise<boolean>;
|
|
212
|
+
/**
|
|
213
|
+
* Check dependencies
|
|
74
214
|
*/
|
|
75
|
-
declare function
|
|
215
|
+
declare function lintDependencies(cwd?: string, config?: LintConfig["dependencies"]): Promise<boolean>;
|
|
216
|
+
/**
|
|
217
|
+
* Check project structure
|
|
218
|
+
*/
|
|
219
|
+
declare function lintStructure(cwd?: string, config?: LintConfig["structure"]): Promise<boolean>;
|
|
220
|
+
/**
|
|
221
|
+
* Check documentation
|
|
222
|
+
*/
|
|
223
|
+
declare function lintDocs(cwd?: string, config?: LintConfig["docs"]): Promise<boolean>;
|
|
224
|
+
/**
|
|
225
|
+
* Run all lint checks
|
|
226
|
+
*/
|
|
227
|
+
declare function lintAll(cwd?: string): Promise<boolean>;
|
|
76
228
|
|
|
77
229
|
/**
|
|
78
230
|
* Publish package to npm registry
|
|
@@ -85,5 +237,16 @@ declare function publishPackage(cwd: string, options?: PublishOptions): Promise<
|
|
|
85
237
|
declare function updatePackageVersion(cwd: string, options?: VersionOptions): Promise<VersionUpdateResult>;
|
|
86
238
|
|
|
87
239
|
declare function loadConfig(options?: LoadConfigOptions<BasisConfig>): Promise<c12.ResolvedConfig<BasisConfig, c12.ConfigLayerMeta>>;
|
|
240
|
+
/**
|
|
241
|
+
* Check if file or directory exists
|
|
242
|
+
*/
|
|
243
|
+
declare function fileExists(path: string): Promise<boolean>;
|
|
244
|
+
/**
|
|
245
|
+
* Get package manager specific commands
|
|
246
|
+
*/
|
|
247
|
+
declare function getPackageManagerCommands(packageManager: string): {
|
|
248
|
+
outdated: string;
|
|
249
|
+
audit: string;
|
|
250
|
+
};
|
|
88
251
|
|
|
89
|
-
export { Basis, BasisConfig, CommitMessage,
|
|
252
|
+
export { Basis, BasisConfig, CommitMessage, GitConfig, GitConfigData, InitOptions, LintConfig, PublishOptions, PublishResult, VersionOptions, VersionUpdateResult, createBasis, fileExists, getPackageManagerCommands, getProjectFiles, getStagedFiles, init, initGitRepo, lintAll, lintCommitMessage, lintDependencies, lintDocs, lintProject, lintStaged, lintStructure, loadConfig, parseCommitMessage, publishPackage, readGitConfig, removeGitHooks, resetGitConfig, setupGit, setupGitConfig, setupGitHooks, updatePackageVersion, validateCommitMessage, writeGitConfig };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BasisConfig, I as InitOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { B as BasisConfig, I as InitOptions, V as VersionOptions, a as VersionUpdateResult, P as PublishOptions, b as PublishResult, C as CommitMessage, G as GitConfig, c as GitConfigData, L as LintConfig } from './shared/basis.BvLeB_5F.mjs';
|
|
2
|
+
export { f as CommitMsgConfig, j as GitConfigSection, i as GitConfigValue, k as PackageManagerConfig, m as PublishConfig, g as VALID_GIT_HOOKS, h as ValidGitHook, l as VersionConfig, e as defaultConfig, d as defineBasisConfig } from './shared/basis.BvLeB_5F.mjs';
|
|
3
3
|
import * as c12 from 'c12';
|
|
4
4
|
import { LoadConfigOptions } from 'c12';
|
|
5
5
|
|
|
@@ -20,59 +20,211 @@ declare class Basis {
|
|
|
20
20
|
*/
|
|
21
21
|
lintStaged(): Promise<boolean>;
|
|
22
22
|
/**
|
|
23
|
-
* Run
|
|
23
|
+
* Run linting for entire project
|
|
24
|
+
*/
|
|
25
|
+
lintProject(): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Check project dependencies
|
|
28
|
+
*/
|
|
29
|
+
lintDependencies(): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Check project structure
|
|
32
|
+
*/
|
|
33
|
+
lintStructure(): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Check project documentation
|
|
36
|
+
*/
|
|
37
|
+
lintDocs(): Promise<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Run all lint checks
|
|
40
|
+
*/
|
|
41
|
+
lintAll(): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Validate commit message
|
|
24
44
|
*/
|
|
25
45
|
lintCommitMessage(): Promise<boolean>;
|
|
26
46
|
/**
|
|
27
|
-
*
|
|
47
|
+
* Setup Git hooks
|
|
48
|
+
*/
|
|
49
|
+
setupGitHooks(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Setup Git configuration
|
|
52
|
+
*/
|
|
53
|
+
setupGitConfig(): Promise<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Setup complete Git configuration (hooks + config)
|
|
56
|
+
*/
|
|
57
|
+
setupGit(): Promise<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Initialize Git repository with basis configuration
|
|
60
|
+
*/
|
|
61
|
+
initGitRepo(): Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Remove Git hooks
|
|
64
|
+
*/
|
|
65
|
+
removeGitHooks(updateConfig?: boolean): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Reset Git configuration
|
|
68
|
+
*/
|
|
69
|
+
resetGitConfig(keepUser?: boolean, updateConfig?: boolean): Promise<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Update package version
|
|
72
|
+
*/
|
|
73
|
+
updateVersion(options?: VersionOptions): Promise<VersionUpdateResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Update to specific version
|
|
76
|
+
*/
|
|
77
|
+
setVersion(version: string): Promise<VersionUpdateResult>;
|
|
78
|
+
/**
|
|
79
|
+
* Increment patch version
|
|
80
|
+
*/
|
|
81
|
+
patchVersion(): Promise<VersionUpdateResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Increment minor version
|
|
84
|
+
*/
|
|
85
|
+
minorVersion(): Promise<VersionUpdateResult>;
|
|
86
|
+
/**
|
|
87
|
+
* Increment major version
|
|
88
|
+
*/
|
|
89
|
+
majorVersion(): Promise<VersionUpdateResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Create prerelease version
|
|
92
|
+
*/
|
|
93
|
+
prereleaseVersion(preid?: string): Promise<VersionUpdateResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Publish package to registry
|
|
96
|
+
*/
|
|
97
|
+
publish(options?: PublishOptions): Promise<PublishResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Publish with dry run
|
|
100
|
+
*/
|
|
101
|
+
publishDryRun(options?: PublishOptions): Promise<PublishResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Publish to specific tag
|
|
104
|
+
*/
|
|
105
|
+
publishToTag(tag: string, options?: PublishOptions): Promise<PublishResult>;
|
|
106
|
+
/**
|
|
107
|
+
* Publish as stable release (latest tag)
|
|
108
|
+
*/
|
|
109
|
+
publishStable(options?: PublishOptions): Promise<PublishResult>;
|
|
110
|
+
/**
|
|
111
|
+
* Get current working directory
|
|
112
|
+
*/
|
|
113
|
+
getCwd(): string;
|
|
114
|
+
/**
|
|
115
|
+
* Set working directory
|
|
116
|
+
*/
|
|
117
|
+
setCwd(cwd: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* Reload configuration from file
|
|
28
120
|
*/
|
|
29
|
-
|
|
121
|
+
reloadConfig(): Promise<BasisConfig>;
|
|
30
122
|
/**
|
|
31
|
-
*
|
|
123
|
+
* Run complete project setup (init + git setup)
|
|
32
124
|
*/
|
|
33
|
-
|
|
125
|
+
setup(options?: InitOptions): Promise<boolean>;
|
|
34
126
|
/**
|
|
35
|
-
*
|
|
127
|
+
* Run complete release workflow (lint + version + publish)
|
|
36
128
|
*/
|
|
37
|
-
|
|
129
|
+
release(versionOptions?: VersionOptions, publishOptions?: PublishOptions): Promise<{
|
|
130
|
+
version: VersionUpdateResult;
|
|
131
|
+
publish: PublishResult;
|
|
132
|
+
}>;
|
|
38
133
|
}
|
|
39
134
|
/**
|
|
40
135
|
* Create a new Basis instance
|
|
41
136
|
*/
|
|
42
137
|
declare function createBasis(cwd?: string): Basis;
|
|
43
138
|
|
|
44
|
-
declare function installHooks(cwd?: string, config?: GitHooksConfig): Promise<void>;
|
|
45
|
-
declare function uninstallHooks(cwd?: string, config?: GitHooksConfig): Promise<void>;
|
|
46
|
-
declare function listHooks(cwd?: string, config?: GitHooksConfig): Promise<void>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Initialize basis configuration in the current project
|
|
50
|
-
*/
|
|
51
|
-
declare function init(cwd?: string, options?: InitOptions): Promise<boolean>;
|
|
52
|
-
|
|
53
139
|
/**
|
|
54
|
-
* Parse commit message
|
|
140
|
+
* Parse commit message into structured format
|
|
55
141
|
*/
|
|
56
142
|
declare function parseCommitMessage(message: string): CommitMessage | null;
|
|
57
143
|
/**
|
|
58
|
-
* Validate commit message
|
|
144
|
+
* Validate commit message against rules
|
|
59
145
|
*/
|
|
60
|
-
declare function validateCommitMessage(message: string, config?:
|
|
146
|
+
declare function validateCommitMessage(message: string, config?: GitConfig["commitMsg"]): {
|
|
61
147
|
valid: boolean;
|
|
62
148
|
errors: string[];
|
|
63
149
|
};
|
|
64
150
|
/**
|
|
65
|
-
*
|
|
151
|
+
* Lint commit message from Git
|
|
152
|
+
*/
|
|
153
|
+
declare function lintCommitMessage(cwd?: string, config?: GitConfig["commitMsg"]): Promise<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Read Git configuration from .git/config using ini parser
|
|
156
|
+
*/
|
|
157
|
+
declare function readGitConfig(cwd?: string): Promise<GitConfigData>;
|
|
158
|
+
/**
|
|
159
|
+
* Write Git configuration to .git/config using ini format
|
|
160
|
+
*/
|
|
161
|
+
declare function writeGitConfig(config: GitConfigData, cwd?: string): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Setup Git configuration with backup and safe merging
|
|
164
|
+
*/
|
|
165
|
+
declare function setupGitConfig(cwd?: string, config?: GitConfig["config"]): Promise<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* Reset Git configuration with backup
|
|
168
|
+
*/
|
|
169
|
+
declare function resetGitConfig(cwd?: string, keepUser?: boolean, options?: {
|
|
170
|
+
updateConfig?: boolean;
|
|
171
|
+
}): Promise<boolean>;
|
|
172
|
+
/**
|
|
173
|
+
* Setup Git hooks
|
|
174
|
+
*/
|
|
175
|
+
declare function setupGitHooks(cwd?: string, config?: GitConfig["hooks"]): Promise<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* Initialize Git repository with basis configuration
|
|
178
|
+
*/
|
|
179
|
+
declare function initGitRepo(cwd?: string): Promise<boolean>;
|
|
180
|
+
/**
|
|
181
|
+
* Run comprehensive Git setup
|
|
182
|
+
*/
|
|
183
|
+
declare function setupGit(cwd?: string): Promise<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* Remove Git hooks
|
|
186
|
+
*/
|
|
187
|
+
declare function removeGitHooks(cwd?: string, hooksToRemove?: string[], options?: {
|
|
188
|
+
updateConfig?: boolean;
|
|
189
|
+
}): Promise<boolean>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Initialize basis configuration in the current project
|
|
193
|
+
*/
|
|
194
|
+
declare function init(cwd?: string, options?: InitOptions): Promise<boolean>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Get staged files (only existing files, not deleted ones)
|
|
66
198
|
*/
|
|
67
199
|
declare function getStagedFiles(): string[];
|
|
200
|
+
/**
|
|
201
|
+
* Get all project files based on patterns using fast-glob
|
|
202
|
+
*/
|
|
203
|
+
declare function getProjectFiles(cwd: string, patterns?: string[], exclude?: string[]): Promise<string[]>;
|
|
68
204
|
/**
|
|
69
205
|
* Lint staged files
|
|
70
206
|
*/
|
|
71
207
|
declare function lintStaged(cwd?: string, config?: LintConfig["staged"]): Promise<boolean>;
|
|
72
208
|
/**
|
|
73
|
-
* Lint
|
|
209
|
+
* Lint entire project using commands (similar to staged but for all project files)
|
|
210
|
+
*/
|
|
211
|
+
declare function lintProject(cwd?: string, config?: LintConfig["project"]): Promise<boolean>;
|
|
212
|
+
/**
|
|
213
|
+
* Check dependencies
|
|
74
214
|
*/
|
|
75
|
-
declare function
|
|
215
|
+
declare function lintDependencies(cwd?: string, config?: LintConfig["dependencies"]): Promise<boolean>;
|
|
216
|
+
/**
|
|
217
|
+
* Check project structure
|
|
218
|
+
*/
|
|
219
|
+
declare function lintStructure(cwd?: string, config?: LintConfig["structure"]): Promise<boolean>;
|
|
220
|
+
/**
|
|
221
|
+
* Check documentation
|
|
222
|
+
*/
|
|
223
|
+
declare function lintDocs(cwd?: string, config?: LintConfig["docs"]): Promise<boolean>;
|
|
224
|
+
/**
|
|
225
|
+
* Run all lint checks
|
|
226
|
+
*/
|
|
227
|
+
declare function lintAll(cwd?: string): Promise<boolean>;
|
|
76
228
|
|
|
77
229
|
/**
|
|
78
230
|
* Publish package to npm registry
|
|
@@ -85,5 +237,16 @@ declare function publishPackage(cwd: string, options?: PublishOptions): Promise<
|
|
|
85
237
|
declare function updatePackageVersion(cwd: string, options?: VersionOptions): Promise<VersionUpdateResult>;
|
|
86
238
|
|
|
87
239
|
declare function loadConfig(options?: LoadConfigOptions<BasisConfig>): Promise<c12.ResolvedConfig<BasisConfig, c12.ConfigLayerMeta>>;
|
|
240
|
+
/**
|
|
241
|
+
* Check if file or directory exists
|
|
242
|
+
*/
|
|
243
|
+
declare function fileExists(path: string): Promise<boolean>;
|
|
244
|
+
/**
|
|
245
|
+
* Get package manager specific commands
|
|
246
|
+
*/
|
|
247
|
+
declare function getPackageManagerCommands(packageManager: string): {
|
|
248
|
+
outdated: string;
|
|
249
|
+
audit: string;
|
|
250
|
+
};
|
|
88
251
|
|
|
89
|
-
export { Basis, BasisConfig, CommitMessage,
|
|
252
|
+
export { Basis, BasisConfig, CommitMessage, GitConfig, GitConfigData, InitOptions, LintConfig, PublishOptions, PublishResult, VersionOptions, VersionUpdateResult, createBasis, fileExists, getPackageManagerCommands, getProjectFiles, getStagedFiles, init, initGitRepo, lintAll, lintCommitMessage, lintDependencies, lintDocs, lintProject, lintStaged, lintStructure, loadConfig, parseCommitMessage, publishPackage, readGitConfig, removeGitHooks, resetGitConfig, setupGit, setupGitConfig, setupGitHooks, updatePackageVersion, validateCommitMessage, writeGitConfig };
|