@tobi-or-not/docpress 0.7.0 → 0.7.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/dist/cli.js +305 -257
- package/dist/cli.js.map +1 -1
- package/dist/templates/theme/index.ts +2 -0
- package/dist/templates/theme/layouts/ForkPage.vue +3 -2
- package/package.json +26 -23
- package/types/public/templates/theme/index.d.ts +1 -1
- package/types/src/cli.d.ts +9 -0
- package/types/src/commands/build.d.ts +17 -0
- package/types/src/commands/fetch.d.ts +11 -0
- package/types/src/commands/global.d.ts +3 -0
- package/types/src/commands/prepare.d.ts +11 -0
- package/types/src/lib/fetch.d.ts +57 -0
- package/types/src/lib/git.d.ts +38 -1
- package/types/src/lib/prepare.d.ts +139 -0
- package/types/src/lib/vitepress.d.ts +8 -0
- package/types/src/schemas/build.d.ts +7 -23
- package/types/src/schemas/fetch.d.ts +19 -54
- package/types/src/schemas/global.d.ts +54 -180
- package/types/src/schemas/prepare.d.ts +20 -64
- package/types/src/utils/commands.d.ts +54 -189
- package/types/src/utils/const.d.ts +30 -0
- package/types/src/utils/functions.d.ts +89 -0
- package/types/src/utils/logger.d.ts +10 -0
- package/types/src/utils/regex.d.ts +12 -0
- package/types/src/utils/templates.d.ts +6 -0
|
@@ -3,228 +3,93 @@ import type { GlobalOpts } from '../schemas/global.js';
|
|
|
3
3
|
import type { BuildOpts } from '../schemas/build.js';
|
|
4
4
|
import type { FetchOpts } from '../schemas/fetch.js';
|
|
5
5
|
import type { PrepareOpts } from '../schemas/prepare.js';
|
|
6
|
+
/**
|
|
7
|
+
* Type definition for command names
|
|
8
|
+
*/
|
|
6
9
|
type Cmd = 'fetch' | 'build' | 'prepare' | 'global';
|
|
10
|
+
/**
|
|
11
|
+
* Interface mapping command names to their option types
|
|
12
|
+
*/
|
|
7
13
|
interface Options {
|
|
8
14
|
build: BuildOpts;
|
|
9
15
|
fetch: FetchOpts;
|
|
10
16
|
prepare: PrepareOpts;
|
|
11
17
|
global: GlobalOpts;
|
|
12
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Mapping of command names to their schema validators
|
|
21
|
+
*/
|
|
13
22
|
export declare const options: {
|
|
14
|
-
build: import("zod").ZodObject<
|
|
15
|
-
|
|
23
|
+
build: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
24
|
+
fetch: import("zod").ZodObject<{
|
|
25
|
+
usernames: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
16
26
|
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
17
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
22
|
-
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
23
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
24
|
-
websiteTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
|
-
websiteTagline: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
|
-
}, {
|
|
27
|
+
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
28
|
+
github: "github";
|
|
29
|
+
}>>>;
|
|
30
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
27
31
|
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
32
|
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
}, import("zod/v4/core").$strip>;
|
|
34
|
+
prepare: import("zod").ZodObject<{
|
|
35
|
+
usernames: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
36
|
+
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
37
|
+
github: "github";
|
|
38
|
+
}>>>;
|
|
39
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
40
|
+
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
41
|
+
extraPublicContent: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
42
|
+
extraTheme: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>;
|
|
34
43
|
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
|
-
}>, never>, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
36
|
-
fetch: import("zod").ZodEffects<import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
37
|
-
usernames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
38
|
-
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
39
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
40
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
41
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
42
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
43
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
44
|
-
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
45
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
46
|
-
websiteTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
-
websiteTagline: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
-
}, {
|
|
49
44
|
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
45
|
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
54
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
55
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
56
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
-
}>, "usernames" | "branch" | "gitProvider" | "reposFilter" | "config" | "token">, "strip", import("zod").ZodTypeAny, {
|
|
58
|
-
usernames?: string[] | undefined;
|
|
59
|
-
branch?: string | undefined;
|
|
60
|
-
gitProvider?: "github" | undefined;
|
|
61
|
-
reposFilter?: string[] | undefined;
|
|
62
|
-
config?: string | undefined;
|
|
63
|
-
token?: string | undefined;
|
|
64
|
-
}, {
|
|
65
|
-
usernames?: string | undefined;
|
|
66
|
-
branch?: string | undefined;
|
|
67
|
-
gitProvider?: "github" | undefined;
|
|
68
|
-
reposFilter?: string | undefined;
|
|
69
|
-
config?: string | undefined;
|
|
70
|
-
token?: string | undefined;
|
|
71
|
-
}>, {
|
|
72
|
-
token: string | undefined;
|
|
73
|
-
usernames: string[];
|
|
74
|
-
branch?: string | undefined;
|
|
75
|
-
gitProvider?: "github" | undefined;
|
|
76
|
-
reposFilter?: string[] | undefined;
|
|
77
|
-
extraHeaderPages?: string[] | undefined;
|
|
78
|
-
extraPublicContent?: string[] | undefined;
|
|
79
|
-
extraTheme?: string[] | undefined;
|
|
80
|
-
forks?: boolean | undefined;
|
|
81
|
-
vitepressConfig?: any;
|
|
82
|
-
websiteTitle?: string | undefined;
|
|
83
|
-
websiteTagline?: string | undefined;
|
|
84
|
-
}, {
|
|
85
|
-
usernames?: string | undefined;
|
|
86
|
-
branch?: string | undefined;
|
|
87
|
-
gitProvider?: "github" | undefined;
|
|
88
|
-
reposFilter?: string | undefined;
|
|
89
|
-
config?: string | undefined;
|
|
90
|
-
token?: string | undefined;
|
|
91
|
-
}>;
|
|
92
|
-
prepare: import("zod").ZodEffects<import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
93
|
-
usernames: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
94
|
-
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
95
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
96
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
97
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
98
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
99
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
100
|
-
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
101
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
102
|
-
websiteTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
103
|
-
websiteTagline: import("zod").ZodOptional<import("zod").ZodString>;
|
|
104
|
-
}, {
|
|
105
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
|
-
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
-
usernames: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
108
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
109
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
110
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
111
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
112
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
113
|
-
}>, "usernames" | "gitProvider" | "reposFilter" | "extraHeaderPages" | "extraPublicContent" | "extraTheme" | "vitepressConfig" | "config" | "token">, "strip", import("zod").ZodTypeAny, {
|
|
114
|
-
usernames?: string[] | undefined;
|
|
115
|
-
gitProvider?: "github" | undefined;
|
|
116
|
-
reposFilter?: string[] | undefined;
|
|
117
|
-
extraHeaderPages?: string[] | undefined;
|
|
118
|
-
extraPublicContent?: string[] | undefined;
|
|
119
|
-
extraTheme?: string[] | undefined;
|
|
120
|
-
vitepressConfig?: string | undefined;
|
|
121
|
-
config?: string | undefined;
|
|
122
|
-
token?: string | undefined;
|
|
123
|
-
}, {
|
|
124
|
-
usernames?: string | undefined;
|
|
125
|
-
gitProvider?: "github" | undefined;
|
|
126
|
-
reposFilter?: string | undefined;
|
|
127
|
-
extraHeaderPages?: string | undefined;
|
|
128
|
-
extraPublicContent?: string | undefined;
|
|
129
|
-
extraTheme?: string | undefined;
|
|
130
|
-
vitepressConfig?: string | undefined;
|
|
131
|
-
config?: string | undefined;
|
|
132
|
-
token?: string | undefined;
|
|
133
|
-
}>, {
|
|
134
|
-
token: string | undefined;
|
|
135
|
-
usernames: string[];
|
|
136
|
-
branch?: string | undefined;
|
|
137
|
-
gitProvider?: "github" | undefined;
|
|
138
|
-
reposFilter?: string[] | undefined;
|
|
139
|
-
extraHeaderPages?: string[] | undefined;
|
|
140
|
-
extraPublicContent?: string[] | undefined;
|
|
141
|
-
extraTheme?: string[] | undefined;
|
|
142
|
-
forks?: boolean | undefined;
|
|
143
|
-
vitepressConfig?: any;
|
|
144
|
-
websiteTitle?: string | undefined;
|
|
145
|
-
websiteTagline?: string | undefined;
|
|
146
|
-
}, {
|
|
147
|
-
usernames?: string | undefined;
|
|
148
|
-
gitProvider?: "github" | undefined;
|
|
149
|
-
reposFilter?: string | undefined;
|
|
150
|
-
extraHeaderPages?: string | undefined;
|
|
151
|
-
extraPublicContent?: string | undefined;
|
|
152
|
-
extraTheme?: string | undefined;
|
|
153
|
-
vitepressConfig?: string | undefined;
|
|
154
|
-
config?: string | undefined;
|
|
155
|
-
token?: string | undefined;
|
|
156
|
-
}>;
|
|
157
|
-
global: import("zod").ZodEffects<import("zod").ZodObject<{
|
|
46
|
+
}, import("zod/v4/core").$strip>;
|
|
47
|
+
global: import("zod").ZodPipe<import("zod").ZodObject<{
|
|
158
48
|
branch: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>>;
|
|
159
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<
|
|
49
|
+
gitProvider: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
50
|
+
github: "github";
|
|
51
|
+
}>>>>;
|
|
160
52
|
forks: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>>;
|
|
161
53
|
websiteTitle: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
162
54
|
websiteTagline: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
163
55
|
config: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
164
56
|
token: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
165
|
-
usernames: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").
|
|
166
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").
|
|
167
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").
|
|
168
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").
|
|
169
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").
|
|
57
|
+
usernames: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>>;
|
|
58
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>>;
|
|
59
|
+
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>>;
|
|
60
|
+
extraPublicContent: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>>;
|
|
61
|
+
extraTheme: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string[], string>>>>;
|
|
170
62
|
vitepressConfig: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
171
|
-
}, "strip
|
|
172
|
-
usernames?: string[] | undefined;
|
|
63
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodTransform<any, {
|
|
173
64
|
branch?: string | undefined;
|
|
174
65
|
gitProvider?: "github" | undefined;
|
|
175
|
-
reposFilter?: string[] | undefined;
|
|
176
|
-
extraHeaderPages?: string[] | undefined;
|
|
177
|
-
extraPublicContent?: string[] | undefined;
|
|
178
|
-
extraTheme?: string[] | undefined;
|
|
179
66
|
forks?: boolean | undefined;
|
|
180
|
-
vitepressConfig?: string | undefined;
|
|
181
67
|
websiteTitle?: string | undefined;
|
|
182
68
|
websiteTagline?: string | undefined;
|
|
183
69
|
config?: string | undefined;
|
|
184
70
|
token?: string | undefined;
|
|
185
|
-
|
|
186
|
-
usernames?: string | undefined;
|
|
187
|
-
branch?: string | undefined;
|
|
188
|
-
gitProvider?: "github" | undefined;
|
|
189
|
-
reposFilter?: string | undefined;
|
|
190
|
-
extraHeaderPages?: string | undefined;
|
|
191
|
-
extraPublicContent?: string | undefined;
|
|
192
|
-
extraTheme?: string | undefined;
|
|
193
|
-
forks?: boolean | undefined;
|
|
194
|
-
vitepressConfig?: string | undefined;
|
|
195
|
-
websiteTitle?: string | undefined;
|
|
196
|
-
websiteTagline?: string | undefined;
|
|
197
|
-
config?: string | undefined;
|
|
198
|
-
token?: string | undefined;
|
|
199
|
-
}>, {
|
|
200
|
-
token: string | undefined;
|
|
201
|
-
usernames: string[];
|
|
202
|
-
branch?: string | undefined;
|
|
203
|
-
gitProvider?: "github" | undefined;
|
|
71
|
+
usernames?: string[] | undefined;
|
|
204
72
|
reposFilter?: string[] | undefined;
|
|
205
73
|
extraHeaderPages?: string[] | undefined;
|
|
206
74
|
extraPublicContent?: string[] | undefined;
|
|
207
75
|
extraTheme?: string[] | undefined;
|
|
208
|
-
forks?: boolean | undefined;
|
|
209
|
-
vitepressConfig?: any;
|
|
210
|
-
websiteTitle?: string | undefined;
|
|
211
|
-
websiteTagline?: string | undefined;
|
|
212
|
-
}, {
|
|
213
|
-
usernames?: string | undefined;
|
|
214
|
-
branch?: string | undefined;
|
|
215
|
-
gitProvider?: "github" | undefined;
|
|
216
|
-
reposFilter?: string | undefined;
|
|
217
|
-
extraHeaderPages?: string | undefined;
|
|
218
|
-
extraPublicContent?: string | undefined;
|
|
219
|
-
extraTheme?: string | undefined;
|
|
220
|
-
forks?: boolean | undefined;
|
|
221
76
|
vitepressConfig?: string | undefined;
|
|
222
|
-
|
|
223
|
-
websiteTagline?: string | undefined;
|
|
224
|
-
config?: string | undefined;
|
|
225
|
-
token?: string | undefined;
|
|
226
|
-
}>;
|
|
77
|
+
}>>;
|
|
227
78
|
};
|
|
228
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Parses and validates command options based on the command type
|
|
81
|
+
*
|
|
82
|
+
* @param cmd - The command name ('fetch', 'build', 'prepare', or 'global')
|
|
83
|
+
* @param opts - Raw options from the command line
|
|
84
|
+
* @returns Validated and processed options for the specified command
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseOptions<T extends Cmd>(cmd: T, opts: Record<string, unknown>): Options[T];
|
|
87
|
+
/**
|
|
88
|
+
* Adds option definitions to a Command instance
|
|
89
|
+
*
|
|
90
|
+
* @param cmd - The Commander Command instance
|
|
91
|
+
* @param opts - Array of option definitions to add
|
|
92
|
+
* @returns The Command instance with options added
|
|
93
|
+
*/
|
|
229
94
|
export declare function addOptions(cmd: Command, opts: Option[]): Command;
|
|
230
95
|
export {};
|
|
@@ -1,10 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main directory for DocPress files
|
|
3
|
+
*/
|
|
1
4
|
export declare const DOCPRESS_DIR: string;
|
|
5
|
+
/**
|
|
6
|
+
* Path to repositories information JSON file
|
|
7
|
+
*/
|
|
2
8
|
export declare const USER_REPOS_INFOS: string;
|
|
9
|
+
/**
|
|
10
|
+
* Path to user information JSON file
|
|
11
|
+
*/
|
|
3
12
|
export declare const USER_INFOS: string;
|
|
13
|
+
/**
|
|
14
|
+
* Directory for documentation files
|
|
15
|
+
*/
|
|
4
16
|
export declare const DOCS_DIR: string;
|
|
17
|
+
/**
|
|
18
|
+
* Path to the main index file
|
|
19
|
+
*/
|
|
5
20
|
export declare const INDEX_FILE: string;
|
|
21
|
+
/**
|
|
22
|
+
* Path to the forks documentation file
|
|
23
|
+
*/
|
|
6
24
|
export declare const FORKS_FILE: string;
|
|
25
|
+
/**
|
|
26
|
+
* Path to VitePress configuration file
|
|
27
|
+
*/
|
|
7
28
|
export declare const VITEPRESS_CONFIG: string;
|
|
29
|
+
/**
|
|
30
|
+
* Directory for VitePress theme
|
|
31
|
+
*/
|
|
8
32
|
export declare const VITEPRESS_THEME: string;
|
|
33
|
+
/**
|
|
34
|
+
* Directory for user custom theme files
|
|
35
|
+
*/
|
|
9
36
|
export declare const VITEPRESS_USER_THEME: string;
|
|
37
|
+
/**
|
|
38
|
+
* Path to template theme files
|
|
39
|
+
*/
|
|
10
40
|
export declare const TEMPLATE_THEME: string;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import type { GlobalOpts } from '../schemas/global.js';
|
|
2
2
|
import type { EnhancedRepository } from '../lib/fetch.js';
|
|
3
3
|
import type { getInfos } from '../lib/git.js';
|
|
4
|
+
/**
|
|
5
|
+
* Checks the HTTP status code of a URL
|
|
6
|
+
*
|
|
7
|
+
* @param url - URL to check
|
|
8
|
+
* @returns HTTP status code (404 if not found, 500 for errors)
|
|
9
|
+
*/
|
|
4
10
|
export declare function checkHttpStatus(url: string): Promise<number>;
|
|
11
|
+
/**
|
|
12
|
+
* Options for prettifying strings
|
|
13
|
+
*/
|
|
5
14
|
interface PrettifyOpts {
|
|
6
15
|
mode?: 'capitalize' | 'uppercase' | 'lowercase';
|
|
7
16
|
replaceDash?: boolean;
|
|
@@ -9,19 +18,99 @@ interface PrettifyOpts {
|
|
|
9
18
|
removeDot?: boolean;
|
|
10
19
|
removeExt?: boolean;
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Formats a string based on specified options
|
|
23
|
+
*
|
|
24
|
+
* @param s - Input string to format
|
|
25
|
+
* @param opts - Formatting options
|
|
26
|
+
* @returns Formatted string
|
|
27
|
+
*/
|
|
12
28
|
export declare function prettify(s: string, opts: PrettifyOpts): string;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a directory, optionally cleaning it first
|
|
31
|
+
*
|
|
32
|
+
* @param directory - Path to the directory to create
|
|
33
|
+
* @param options - Options object
|
|
34
|
+
* @param options.clean - Whether to clean the directory before creating it
|
|
35
|
+
*/
|
|
13
36
|
export declare function createDir(directory: string, { clean }?: {
|
|
14
37
|
clean?: boolean;
|
|
15
38
|
}): void;
|
|
39
|
+
/**
|
|
40
|
+
* Checks if a path is a directory
|
|
41
|
+
*
|
|
42
|
+
* @param path - Path to check
|
|
43
|
+
* @returns True if path is a directory, false otherwise
|
|
44
|
+
*/
|
|
16
45
|
export declare function isDir(path: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if a path is a file
|
|
48
|
+
*
|
|
49
|
+
* @param path - Path to check
|
|
50
|
+
* @returns True if path is a file, false otherwise
|
|
51
|
+
*/
|
|
17
52
|
export declare function isFile(path: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Extracts a list of file paths from directories and files
|
|
55
|
+
*
|
|
56
|
+
* @param paths - Path or array of paths to extract files from
|
|
57
|
+
* @returns Array of file paths
|
|
58
|
+
*/
|
|
18
59
|
export declare function extractFiles(paths: string[] | string): string[];
|
|
60
|
+
/**
|
|
61
|
+
* Gets all markdown files from specified paths
|
|
62
|
+
*
|
|
63
|
+
* @param path - Array of paths to search for markdown files
|
|
64
|
+
* @returns Array of markdown file paths
|
|
65
|
+
*/
|
|
19
66
|
export declare function getMdFiles(path: string[]): string[];
|
|
67
|
+
/**
|
|
68
|
+
* Formats an array of strings into a readable comma-separated list
|
|
69
|
+
*
|
|
70
|
+
* @param arr - Array of strings to format
|
|
71
|
+
* @returns Formatted string (e.g., "a", "b" or "c")
|
|
72
|
+
*/
|
|
20
73
|
export declare function prettifyEnum(arr: readonly string[]): string;
|
|
74
|
+
/**
|
|
75
|
+
* Gets user information from cached JSON file
|
|
76
|
+
*
|
|
77
|
+
* @param username - GitHub username
|
|
78
|
+
* @returns User information object
|
|
79
|
+
*/
|
|
21
80
|
export declare function getUserInfos(username: GlobalOpts['usernames'][number]): Awaited<ReturnType<typeof getInfos>>["user"];
|
|
81
|
+
/**
|
|
82
|
+
* Gets repository information from cached JSON file
|
|
83
|
+
*
|
|
84
|
+
* @param username - GitHub username
|
|
85
|
+
* @returns Array of enhanced repository objects
|
|
86
|
+
*/
|
|
22
87
|
export declare function getUserRepos(username: GlobalOpts['usernames'][number]): EnhancedRepository[];
|
|
88
|
+
/**
|
|
89
|
+
* Deep merges multiple objects
|
|
90
|
+
*
|
|
91
|
+
* @param objects - Objects to merge
|
|
92
|
+
* @returns Merged object
|
|
93
|
+
*/
|
|
23
94
|
export declare function deepMerge<T extends Record<string, any> | null>(...objects: T[]): T;
|
|
95
|
+
/**
|
|
96
|
+
* Checks if a value is an object (not an array or null)
|
|
97
|
+
*
|
|
98
|
+
* @param val - Value to check
|
|
99
|
+
* @returns True if value is an object, false otherwise
|
|
100
|
+
*/
|
|
24
101
|
export declare function isObject(val: any): val is object;
|
|
102
|
+
/**
|
|
103
|
+
* Loads and parses a JSON configuration file
|
|
104
|
+
*
|
|
105
|
+
* @param configPath - Path to the configuration file
|
|
106
|
+
* @returns Parsed configuration object or empty object if file doesn't exist
|
|
107
|
+
*/
|
|
25
108
|
export declare function loadConfigFile(configPath?: string): any;
|
|
109
|
+
/**
|
|
110
|
+
* Splits a comma-separated string into an array of strings
|
|
111
|
+
*
|
|
112
|
+
* @param s - Comma-separated string
|
|
113
|
+
* @returns Array of strings
|
|
114
|
+
*/
|
|
26
115
|
export declare function splitByComma(s: string): string[];
|
|
27
116
|
export {};
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { ColorName } from 'chalk';
|
|
2
|
+
/**
|
|
3
|
+
* Log message types
|
|
4
|
+
*/
|
|
2
5
|
type LogType = keyof Pick<Console, 'info' | 'warn' | 'error' | 'debug' | 'trace'> | 'success';
|
|
6
|
+
/**
|
|
7
|
+
* Logs a message with color formatting based on type and level
|
|
8
|
+
*
|
|
9
|
+
* @param msg - Message to log
|
|
10
|
+
* @param type - Type of log message (info, warn, error, debug, trace, success)
|
|
11
|
+
* @param color - Optional specific color to use instead of the default for the type
|
|
12
|
+
*/
|
|
3
13
|
export declare function log(msg: string, type?: LogType, color?: ColorName): void;
|
|
4
14
|
export {};
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replaces relative paths in markdown links with absolute URLs
|
|
3
|
+
*
|
|
4
|
+
* @param file - Path to the markdown file to process
|
|
5
|
+
* @param url - Base URL to use for absolute links
|
|
6
|
+
*/
|
|
1
7
|
export declare function replaceRelativePath(file: string, url: string): void;
|
|
8
|
+
/**
|
|
9
|
+
* Processes README files to fix various link formats
|
|
10
|
+
*
|
|
11
|
+
* @param file - Path to the README file to process
|
|
12
|
+
* @param url - Base URL to use for absolute links
|
|
13
|
+
*/
|
|
2
14
|
export declare function replaceReadmePath(file: string, url: string): void;
|