@funish/basis 0.0.1 → 0.0.2
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 +70 -24
- 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 +193 -24
- package/dist/index.d.mts +193 -24
- package/dist/index.d.ts +193 -24
- package/dist/index.mjs +1 -1
- package/dist/shared/{basis.dc3ybBoz.mjs → basis.BglwV-us.mjs} +1 -1
- package/dist/shared/{basis.CgpyxNW3.cjs → basis.Bhi6kSAJ.cjs} +1 -1
- package/dist/shared/basis.BjS41bTE.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.C7U9rUSl.mjs +1 -0
- package/dist/shared/basis.CASkqgVR.mjs +1 -0
- package/dist/shared/basis.D2srGCU3.cjs +1 -0
- package/dist/shared/basis.D3bv4yUV.mjs +3 -0
- package/dist/shared/basis.DHqql56x.mjs +10 -0
- package/dist/shared/basis.DXBdQ4nF.mjs +1 -0
- package/dist/shared/basis.DcyVtmjR.cjs +1 -0
- package/dist/shared/basis.FJWRn1Ix.cjs +3 -0
- package/dist/shared/basis.QoGvLLsN.cjs +10 -0
- package/package.json +5 -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.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.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
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
interface BasisConfig {
|
|
2
|
+
lint?: LintConfig;
|
|
3
|
+
git?: GitConfig;
|
|
4
|
+
packageManager?: PackageManagerConfig;
|
|
5
|
+
version?: VersionConfig;
|
|
6
|
+
publish?: PublishConfig;
|
|
7
|
+
}
|
|
8
|
+
interface LintConfig {
|
|
9
|
+
staged?: Record<string, string>;
|
|
10
|
+
project?: Record<string, string>;
|
|
11
|
+
dependencies?: {
|
|
12
|
+
checkOutdated?: boolean;
|
|
13
|
+
checkSecurity?: boolean;
|
|
14
|
+
allowedLicenses?: string[];
|
|
15
|
+
blockedPackages?: string[];
|
|
16
|
+
};
|
|
17
|
+
structure?: {
|
|
18
|
+
requiredFiles?: string[];
|
|
19
|
+
requiredDirs?: string[];
|
|
20
|
+
naming?: Array<{
|
|
21
|
+
path: string;
|
|
22
|
+
files?: string;
|
|
23
|
+
directories?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
docs?: {
|
|
28
|
+
checkReadme?: boolean;
|
|
29
|
+
checkChangelog?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface GitConfig {
|
|
33
|
+
hooks?: Partial<Record<ValidGitHook, string>>;
|
|
34
|
+
config?: {
|
|
35
|
+
core?: {
|
|
36
|
+
editor?: string;
|
|
37
|
+
autocrlf?: boolean | "input";
|
|
38
|
+
eol?: "lf" | "crlf" | "native";
|
|
39
|
+
ignorecase?: boolean;
|
|
40
|
+
filemode?: boolean;
|
|
41
|
+
bare?: boolean;
|
|
42
|
+
logallrefupdates?: boolean;
|
|
43
|
+
repositoryformatversion?: number;
|
|
44
|
+
sharedrepository?: boolean | "group" | "all" | "world" | "everybody";
|
|
45
|
+
worktree?: string;
|
|
46
|
+
precomposeunicode?: boolean;
|
|
47
|
+
protecthfs?: boolean;
|
|
48
|
+
protectntfs?: boolean;
|
|
49
|
+
};
|
|
50
|
+
user?: {
|
|
51
|
+
name?: string;
|
|
52
|
+
email?: string;
|
|
53
|
+
signingkey?: string;
|
|
54
|
+
};
|
|
55
|
+
init?: {
|
|
56
|
+
defaultBranch?: string;
|
|
57
|
+
};
|
|
58
|
+
branch?: {
|
|
59
|
+
autosetupmerge?: boolean | "always";
|
|
60
|
+
autosetuprebase?: "never" | "local" | "remote" | "always";
|
|
61
|
+
};
|
|
62
|
+
push?: {
|
|
63
|
+
default?: "nothing" | "current" | "upstream" | "simple" | "matching";
|
|
64
|
+
followTags?: boolean;
|
|
65
|
+
autoSetupRemote?: boolean;
|
|
66
|
+
};
|
|
67
|
+
pull?: {
|
|
68
|
+
rebase?: boolean | "preserve" | "merges" | "interactive";
|
|
69
|
+
ff?: boolean | "only";
|
|
70
|
+
};
|
|
71
|
+
merge?: {
|
|
72
|
+
tool?: string;
|
|
73
|
+
conflictstyle?: "merge" | "diff3";
|
|
74
|
+
ff?: boolean | "only";
|
|
75
|
+
log?: boolean | number;
|
|
76
|
+
};
|
|
77
|
+
rebase?: {
|
|
78
|
+
autoSquash?: boolean;
|
|
79
|
+
autoStash?: boolean;
|
|
80
|
+
updateRefs?: boolean;
|
|
81
|
+
};
|
|
82
|
+
fetch?: {
|
|
83
|
+
prune?: boolean;
|
|
84
|
+
pruneTags?: boolean;
|
|
85
|
+
fsckobjects?: boolean;
|
|
86
|
+
};
|
|
87
|
+
remote?: {
|
|
88
|
+
[remoteName: string]: {
|
|
89
|
+
url?: string;
|
|
90
|
+
fetch?: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
diff?: {
|
|
94
|
+
tool?: string;
|
|
95
|
+
algorithm?: "myers" | "minimal" | "patience" | "histogram";
|
|
96
|
+
renames?: boolean | "copy" | "copies";
|
|
97
|
+
mnemonicprefix?: boolean;
|
|
98
|
+
};
|
|
99
|
+
status?: {
|
|
100
|
+
showUntrackedFiles?: "no" | "normal" | "all";
|
|
101
|
+
branch?: boolean;
|
|
102
|
+
short?: boolean;
|
|
103
|
+
};
|
|
104
|
+
commit?: {
|
|
105
|
+
cleanup?: "strip" | "whitespace" | "verbatim" | "scissors" | "default";
|
|
106
|
+
gpgsign?: boolean;
|
|
107
|
+
template?: string;
|
|
108
|
+
verbose?: boolean;
|
|
109
|
+
};
|
|
110
|
+
log?: {
|
|
111
|
+
abbrevCommit?: boolean;
|
|
112
|
+
decorate?: boolean | "short" | "full" | "auto" | "no";
|
|
113
|
+
showSignature?: boolean;
|
|
114
|
+
};
|
|
115
|
+
transfer?: {
|
|
116
|
+
fsckobjects?: boolean;
|
|
117
|
+
};
|
|
118
|
+
receive?: {
|
|
119
|
+
fsckObjects?: boolean;
|
|
120
|
+
};
|
|
121
|
+
gc?: {
|
|
122
|
+
auto?: number;
|
|
123
|
+
autopacklimit?: number;
|
|
124
|
+
autodetach?: boolean;
|
|
125
|
+
};
|
|
126
|
+
alias?: {
|
|
127
|
+
[aliasName: string]: string;
|
|
128
|
+
};
|
|
129
|
+
url?: {
|
|
130
|
+
[pattern: string]: {
|
|
131
|
+
insteadOf?: string;
|
|
132
|
+
pushInsteadOf?: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
commitMsg?: CommitMsgConfig;
|
|
137
|
+
autoSetup?: boolean;
|
|
138
|
+
autoInitGit?: boolean;
|
|
139
|
+
skipGitCheck?: boolean;
|
|
140
|
+
force?: boolean;
|
|
141
|
+
}
|
|
142
|
+
interface CommitMsgConfig {
|
|
143
|
+
types?: string[];
|
|
144
|
+
maxLength?: number;
|
|
145
|
+
minLength?: number;
|
|
146
|
+
scopeRequired?: boolean;
|
|
147
|
+
allowedScopes?: string[];
|
|
148
|
+
}
|
|
149
|
+
interface CommitMessage {
|
|
150
|
+
type: string;
|
|
151
|
+
scope?: string;
|
|
152
|
+
description: string;
|
|
153
|
+
body?: string;
|
|
154
|
+
footer?: string;
|
|
155
|
+
isBreaking: boolean;
|
|
156
|
+
}
|
|
157
|
+
declare const VALID_GIT_HOOKS: readonly ["applypatch-msg", "pre-applypatch", "post-applypatch", "pre-commit", "pre-merge-commit", "prepare-commit-msg", "commit-msg", "post-commit", "pre-rebase", "post-checkout", "post-merge", "pre-push", "pre-receive", "update", "proc-receive", "post-receive", "post-update", "reference-transaction", "push-to-checkout", "pre-auto-gc", "post-rewrite", "sendemail-validate", "fsmonitor-watchman", "p4-changelist", "p4-prepare-changelist", "p4-post-changelist", "p4-pre-submit", "post-index-change"];
|
|
158
|
+
type ValidGitHook = (typeof VALID_GIT_HOOKS)[number];
|
|
159
|
+
type GitConfigValue = string | number | boolean;
|
|
160
|
+
type GitConfigSection = Record<string, GitConfigValue>;
|
|
161
|
+
type GitConfigData = Record<string, GitConfigSection>;
|
|
162
|
+
interface PackageManagerConfig {
|
|
163
|
+
/** Preferred package manager (aligned with nypm support) */
|
|
164
|
+
preferred?: "npm" | "yarn" | "pnpm" | "bun" | "deno";
|
|
165
|
+
/** Auto-detect package manager from project */
|
|
166
|
+
autoDetect?: boolean;
|
|
167
|
+
/** NPM registry URL */
|
|
168
|
+
registry?: string;
|
|
169
|
+
}
|
|
170
|
+
interface VersionConfig {
|
|
171
|
+
/** Git tag prefix */
|
|
172
|
+
tagPrefix?: string;
|
|
173
|
+
/** Auto commit version changes */
|
|
174
|
+
autoCommit?: boolean;
|
|
175
|
+
/** Auto create git tag */
|
|
176
|
+
autoTag?: boolean;
|
|
177
|
+
/** Auto push changes to remote */
|
|
178
|
+
autoPush?: boolean;
|
|
179
|
+
/** Prerelease identifier (alpha, beta, rc) */
|
|
180
|
+
prereleaseId?: string;
|
|
181
|
+
/** Commit message template */
|
|
182
|
+
commitMessage?: string;
|
|
183
|
+
}
|
|
184
|
+
interface PublishConfig {
|
|
185
|
+
/** NPM registry URL */
|
|
186
|
+
registry?: string;
|
|
187
|
+
/** Package access level */
|
|
188
|
+
access?: "public" | "private";
|
|
189
|
+
/** Default publish tag (for non-stable releases) */
|
|
190
|
+
defaultTag?: string;
|
|
191
|
+
/** Stable release tag */
|
|
192
|
+
stableTag?: string;
|
|
193
|
+
/** Build command before publish */
|
|
194
|
+
buildCommand?: string;
|
|
195
|
+
/** Test command before publish */
|
|
196
|
+
testCommand?: string;
|
|
197
|
+
/** Check git working directory is clean */
|
|
198
|
+
checkGitClean?: boolean;
|
|
199
|
+
/** Run tests before publish */
|
|
200
|
+
checkTests?: boolean;
|
|
201
|
+
/** Auto push git changes after publish */
|
|
202
|
+
autoGitPush?: boolean;
|
|
203
|
+
/** Create git tag after publish */
|
|
204
|
+
createGitTag?: boolean;
|
|
205
|
+
}
|
|
206
|
+
interface InitOptions {
|
|
207
|
+
force?: boolean;
|
|
208
|
+
skipGitCheck?: boolean;
|
|
209
|
+
skipInstall?: boolean;
|
|
210
|
+
}
|
|
211
|
+
interface VersionOptions {
|
|
212
|
+
version?: string;
|
|
213
|
+
preid?: string;
|
|
214
|
+
prerelease?: boolean;
|
|
215
|
+
major?: boolean;
|
|
216
|
+
minor?: boolean;
|
|
217
|
+
patch?: boolean;
|
|
218
|
+
tag?: string;
|
|
219
|
+
message?: string;
|
|
220
|
+
}
|
|
221
|
+
interface PublishOptions {
|
|
222
|
+
tag?: string;
|
|
223
|
+
stable?: boolean;
|
|
224
|
+
latest?: boolean;
|
|
225
|
+
dryRun?: boolean;
|
|
226
|
+
access?: "public" | "private";
|
|
227
|
+
registry?: string;
|
|
228
|
+
skipBuild?: boolean;
|
|
229
|
+
skipTests?: boolean;
|
|
230
|
+
}
|
|
231
|
+
interface VersionUpdateResult {
|
|
232
|
+
oldVersion: string;
|
|
233
|
+
newVersion: string;
|
|
234
|
+
tagName?: string;
|
|
235
|
+
}
|
|
236
|
+
interface PublishResult {
|
|
237
|
+
packageName: string;
|
|
238
|
+
version: string;
|
|
239
|
+
publishTag: string;
|
|
240
|
+
dryRun: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Define a Basis configuration
|
|
245
|
+
*/
|
|
246
|
+
declare function defineBasisConfig(config: BasisConfig): BasisConfig;
|
|
247
|
+
/**
|
|
248
|
+
* Default configuration
|
|
249
|
+
*/
|
|
250
|
+
declare const defaultConfig: BasisConfig;
|
|
251
|
+
|
|
252
|
+
export { defineBasisConfig as d, defaultConfig as e, VALID_GIT_HOOKS as g };
|
|
253
|
+
export type { BasisConfig as B, CommitMessage as C, GitConfig as G, InitOptions as I, LintConfig as L, PublishOptions as P, VersionOptions as V, VersionUpdateResult as a, PublishResult as b, GitConfigData as c, CommitMsgConfig as f, ValidGitHook as h, GitConfigValue as i, GitConfigSection as j, PackageManagerConfig as k, VersionConfig as l, PublishConfig as m };
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
interface BasisConfig {
|
|
2
|
+
lint?: LintConfig;
|
|
3
|
+
git?: GitConfig;
|
|
4
|
+
packageManager?: PackageManagerConfig;
|
|
5
|
+
version?: VersionConfig;
|
|
6
|
+
publish?: PublishConfig;
|
|
7
|
+
}
|
|
8
|
+
interface LintConfig {
|
|
9
|
+
staged?: Record<string, string>;
|
|
10
|
+
project?: Record<string, string>;
|
|
11
|
+
dependencies?: {
|
|
12
|
+
checkOutdated?: boolean;
|
|
13
|
+
checkSecurity?: boolean;
|
|
14
|
+
allowedLicenses?: string[];
|
|
15
|
+
blockedPackages?: string[];
|
|
16
|
+
};
|
|
17
|
+
structure?: {
|
|
18
|
+
requiredFiles?: string[];
|
|
19
|
+
requiredDirs?: string[];
|
|
20
|
+
naming?: Array<{
|
|
21
|
+
path: string;
|
|
22
|
+
files?: string;
|
|
23
|
+
directories?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
docs?: {
|
|
28
|
+
checkReadme?: boolean;
|
|
29
|
+
checkChangelog?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface GitConfig {
|
|
33
|
+
hooks?: Partial<Record<ValidGitHook, string>>;
|
|
34
|
+
config?: {
|
|
35
|
+
core?: {
|
|
36
|
+
editor?: string;
|
|
37
|
+
autocrlf?: boolean | "input";
|
|
38
|
+
eol?: "lf" | "crlf" | "native";
|
|
39
|
+
ignorecase?: boolean;
|
|
40
|
+
filemode?: boolean;
|
|
41
|
+
bare?: boolean;
|
|
42
|
+
logallrefupdates?: boolean;
|
|
43
|
+
repositoryformatversion?: number;
|
|
44
|
+
sharedrepository?: boolean | "group" | "all" | "world" | "everybody";
|
|
45
|
+
worktree?: string;
|
|
46
|
+
precomposeunicode?: boolean;
|
|
47
|
+
protecthfs?: boolean;
|
|
48
|
+
protectntfs?: boolean;
|
|
49
|
+
};
|
|
50
|
+
user?: {
|
|
51
|
+
name?: string;
|
|
52
|
+
email?: string;
|
|
53
|
+
signingkey?: string;
|
|
54
|
+
};
|
|
55
|
+
init?: {
|
|
56
|
+
defaultBranch?: string;
|
|
57
|
+
};
|
|
58
|
+
branch?: {
|
|
59
|
+
autosetupmerge?: boolean | "always";
|
|
60
|
+
autosetuprebase?: "never" | "local" | "remote" | "always";
|
|
61
|
+
};
|
|
62
|
+
push?: {
|
|
63
|
+
default?: "nothing" | "current" | "upstream" | "simple" | "matching";
|
|
64
|
+
followTags?: boolean;
|
|
65
|
+
autoSetupRemote?: boolean;
|
|
66
|
+
};
|
|
67
|
+
pull?: {
|
|
68
|
+
rebase?: boolean | "preserve" | "merges" | "interactive";
|
|
69
|
+
ff?: boolean | "only";
|
|
70
|
+
};
|
|
71
|
+
merge?: {
|
|
72
|
+
tool?: string;
|
|
73
|
+
conflictstyle?: "merge" | "diff3";
|
|
74
|
+
ff?: boolean | "only";
|
|
75
|
+
log?: boolean | number;
|
|
76
|
+
};
|
|
77
|
+
rebase?: {
|
|
78
|
+
autoSquash?: boolean;
|
|
79
|
+
autoStash?: boolean;
|
|
80
|
+
updateRefs?: boolean;
|
|
81
|
+
};
|
|
82
|
+
fetch?: {
|
|
83
|
+
prune?: boolean;
|
|
84
|
+
pruneTags?: boolean;
|
|
85
|
+
fsckobjects?: boolean;
|
|
86
|
+
};
|
|
87
|
+
remote?: {
|
|
88
|
+
[remoteName: string]: {
|
|
89
|
+
url?: string;
|
|
90
|
+
fetch?: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
diff?: {
|
|
94
|
+
tool?: string;
|
|
95
|
+
algorithm?: "myers" | "minimal" | "patience" | "histogram";
|
|
96
|
+
renames?: boolean | "copy" | "copies";
|
|
97
|
+
mnemonicprefix?: boolean;
|
|
98
|
+
};
|
|
99
|
+
status?: {
|
|
100
|
+
showUntrackedFiles?: "no" | "normal" | "all";
|
|
101
|
+
branch?: boolean;
|
|
102
|
+
short?: boolean;
|
|
103
|
+
};
|
|
104
|
+
commit?: {
|
|
105
|
+
cleanup?: "strip" | "whitespace" | "verbatim" | "scissors" | "default";
|
|
106
|
+
gpgsign?: boolean;
|
|
107
|
+
template?: string;
|
|
108
|
+
verbose?: boolean;
|
|
109
|
+
};
|
|
110
|
+
log?: {
|
|
111
|
+
abbrevCommit?: boolean;
|
|
112
|
+
decorate?: boolean | "short" | "full" | "auto" | "no";
|
|
113
|
+
showSignature?: boolean;
|
|
114
|
+
};
|
|
115
|
+
transfer?: {
|
|
116
|
+
fsckobjects?: boolean;
|
|
117
|
+
};
|
|
118
|
+
receive?: {
|
|
119
|
+
fsckObjects?: boolean;
|
|
120
|
+
};
|
|
121
|
+
gc?: {
|
|
122
|
+
auto?: number;
|
|
123
|
+
autopacklimit?: number;
|
|
124
|
+
autodetach?: boolean;
|
|
125
|
+
};
|
|
126
|
+
alias?: {
|
|
127
|
+
[aliasName: string]: string;
|
|
128
|
+
};
|
|
129
|
+
url?: {
|
|
130
|
+
[pattern: string]: {
|
|
131
|
+
insteadOf?: string;
|
|
132
|
+
pushInsteadOf?: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
commitMsg?: CommitMsgConfig;
|
|
137
|
+
autoSetup?: boolean;
|
|
138
|
+
autoInitGit?: boolean;
|
|
139
|
+
skipGitCheck?: boolean;
|
|
140
|
+
force?: boolean;
|
|
141
|
+
}
|
|
142
|
+
interface CommitMsgConfig {
|
|
143
|
+
types?: string[];
|
|
144
|
+
maxLength?: number;
|
|
145
|
+
minLength?: number;
|
|
146
|
+
scopeRequired?: boolean;
|
|
147
|
+
allowedScopes?: string[];
|
|
148
|
+
}
|
|
149
|
+
interface CommitMessage {
|
|
150
|
+
type: string;
|
|
151
|
+
scope?: string;
|
|
152
|
+
description: string;
|
|
153
|
+
body?: string;
|
|
154
|
+
footer?: string;
|
|
155
|
+
isBreaking: boolean;
|
|
156
|
+
}
|
|
157
|
+
declare const VALID_GIT_HOOKS: readonly ["applypatch-msg", "pre-applypatch", "post-applypatch", "pre-commit", "pre-merge-commit", "prepare-commit-msg", "commit-msg", "post-commit", "pre-rebase", "post-checkout", "post-merge", "pre-push", "pre-receive", "update", "proc-receive", "post-receive", "post-update", "reference-transaction", "push-to-checkout", "pre-auto-gc", "post-rewrite", "sendemail-validate", "fsmonitor-watchman", "p4-changelist", "p4-prepare-changelist", "p4-post-changelist", "p4-pre-submit", "post-index-change"];
|
|
158
|
+
type ValidGitHook = (typeof VALID_GIT_HOOKS)[number];
|
|
159
|
+
type GitConfigValue = string | number | boolean;
|
|
160
|
+
type GitConfigSection = Record<string, GitConfigValue>;
|
|
161
|
+
type GitConfigData = Record<string, GitConfigSection>;
|
|
162
|
+
interface PackageManagerConfig {
|
|
163
|
+
/** Preferred package manager (aligned with nypm support) */
|
|
164
|
+
preferred?: "npm" | "yarn" | "pnpm" | "bun" | "deno";
|
|
165
|
+
/** Auto-detect package manager from project */
|
|
166
|
+
autoDetect?: boolean;
|
|
167
|
+
/** NPM registry URL */
|
|
168
|
+
registry?: string;
|
|
169
|
+
}
|
|
170
|
+
interface VersionConfig {
|
|
171
|
+
/** Git tag prefix */
|
|
172
|
+
tagPrefix?: string;
|
|
173
|
+
/** Auto commit version changes */
|
|
174
|
+
autoCommit?: boolean;
|
|
175
|
+
/** Auto create git tag */
|
|
176
|
+
autoTag?: boolean;
|
|
177
|
+
/** Auto push changes to remote */
|
|
178
|
+
autoPush?: boolean;
|
|
179
|
+
/** Prerelease identifier (alpha, beta, rc) */
|
|
180
|
+
prereleaseId?: string;
|
|
181
|
+
/** Commit message template */
|
|
182
|
+
commitMessage?: string;
|
|
183
|
+
}
|
|
184
|
+
interface PublishConfig {
|
|
185
|
+
/** NPM registry URL */
|
|
186
|
+
registry?: string;
|
|
187
|
+
/** Package access level */
|
|
188
|
+
access?: "public" | "private";
|
|
189
|
+
/** Default publish tag (for non-stable releases) */
|
|
190
|
+
defaultTag?: string;
|
|
191
|
+
/** Stable release tag */
|
|
192
|
+
stableTag?: string;
|
|
193
|
+
/** Build command before publish */
|
|
194
|
+
buildCommand?: string;
|
|
195
|
+
/** Test command before publish */
|
|
196
|
+
testCommand?: string;
|
|
197
|
+
/** Check git working directory is clean */
|
|
198
|
+
checkGitClean?: boolean;
|
|
199
|
+
/** Run tests before publish */
|
|
200
|
+
checkTests?: boolean;
|
|
201
|
+
/** Auto push git changes after publish */
|
|
202
|
+
autoGitPush?: boolean;
|
|
203
|
+
/** Create git tag after publish */
|
|
204
|
+
createGitTag?: boolean;
|
|
205
|
+
}
|
|
206
|
+
interface InitOptions {
|
|
207
|
+
force?: boolean;
|
|
208
|
+
skipGitCheck?: boolean;
|
|
209
|
+
skipInstall?: boolean;
|
|
210
|
+
}
|
|
211
|
+
interface VersionOptions {
|
|
212
|
+
version?: string;
|
|
213
|
+
preid?: string;
|
|
214
|
+
prerelease?: boolean;
|
|
215
|
+
major?: boolean;
|
|
216
|
+
minor?: boolean;
|
|
217
|
+
patch?: boolean;
|
|
218
|
+
tag?: string;
|
|
219
|
+
message?: string;
|
|
220
|
+
}
|
|
221
|
+
interface PublishOptions {
|
|
222
|
+
tag?: string;
|
|
223
|
+
stable?: boolean;
|
|
224
|
+
latest?: boolean;
|
|
225
|
+
dryRun?: boolean;
|
|
226
|
+
access?: "public" | "private";
|
|
227
|
+
registry?: string;
|
|
228
|
+
skipBuild?: boolean;
|
|
229
|
+
skipTests?: boolean;
|
|
230
|
+
}
|
|
231
|
+
interface VersionUpdateResult {
|
|
232
|
+
oldVersion: string;
|
|
233
|
+
newVersion: string;
|
|
234
|
+
tagName?: string;
|
|
235
|
+
}
|
|
236
|
+
interface PublishResult {
|
|
237
|
+
packageName: string;
|
|
238
|
+
version: string;
|
|
239
|
+
publishTag: string;
|
|
240
|
+
dryRun: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Define a Basis configuration
|
|
245
|
+
*/
|
|
246
|
+
declare function defineBasisConfig(config: BasisConfig): BasisConfig;
|
|
247
|
+
/**
|
|
248
|
+
* Default configuration
|
|
249
|
+
*/
|
|
250
|
+
declare const defaultConfig: BasisConfig;
|
|
251
|
+
|
|
252
|
+
export { defineBasisConfig as d, defaultConfig as e, VALID_GIT_HOOKS as g };
|
|
253
|
+
export type { BasisConfig as B, CommitMessage as C, GitConfig as G, InitOptions as I, LintConfig as L, PublishOptions as P, VersionOptions as V, VersionUpdateResult as a, PublishResult as b, GitConfigData as c, CommitMsgConfig as f, ValidGitHook as h, GitConfigValue as i, GitConfigSection as j, PackageManagerConfig as k, VersionConfig as l, PublishConfig as m };
|