@tobi-or-not/docpress 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/cli.js +878 -691
- package/dist/cli.js.map +1 -1
- package/package.json +41 -47
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/types/cli.d.ts +0 -3
- package/types/commands/build.d.ts +0 -3
- package/types/commands/fetch.d.ts +0 -4
- package/types/commands/global.d.ts +0 -1
- package/types/commands/prepare.d.ts +0 -4
- package/types/lib/fetch.d.ts +0 -120
- package/types/lib/git.d.ts +0 -515
- package/types/lib/prepare.d.ts +0 -62
- package/types/lib/vitepress.d.ts +0 -3
- package/types/public/templates/theme/index.d.ts +0 -8
- package/types/schemas/build.d.ts +0 -20
- package/types/schemas/fetch.d.ts +0 -52
- package/types/schemas/global.d.ts +0 -150
- package/types/schemas/prepare.d.ts +0 -61
- package/types/src/cli.d.ts +0 -12
- package/types/src/commands/build.d.ts +0 -20
- package/types/src/commands/fetch.d.ts +0 -15
- package/types/src/commands/global.d.ts +0 -4
- package/types/src/commands/prepare.d.ts +0 -15
- package/types/src/lib/fetch.d.ts +0 -179
- package/types/src/lib/git.d.ts +0 -568
- package/types/src/lib/prepare.d.ts +0 -214
- package/types/src/lib/vitepress.d.ts +0 -11
- package/types/src/schemas/build.d.ts +0 -7
- package/types/src/schemas/fetch.d.ts +0 -25
- package/types/src/schemas/global.d.ts +0 -100
- package/types/src/schemas/prepare.d.ts +0 -22
- package/types/src/templates/index.d.ts +0 -1
- package/types/src/templates/theme/index.d.ts +0 -8
- package/types/src/utils/commands.d.ts +0 -95
- package/types/src/utils/const.d.ts +0 -40
- package/types/src/utils/functions.d.ts +0 -130
- package/types/src/utils/logger.d.ts +0 -14
- package/types/src/utils/regex.d.ts +0 -4
- package/types/src/utils/resolver.d.ts +0 -1
- package/types/src/utils/templates.d.ts +0 -7
- package/types/templates/index.d.ts +0 -5
- package/types/templates/theme/index.d.ts +0 -8
- package/types/utils/commands.d.ts +0 -207
- package/types/utils/const.d.ts +0 -10
- package/types/utils/functions.d.ts +0 -24
- package/types/utils/logger.d.ts +0 -4
- package/types/utils/regex.d.ts +0 -2
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ColorName } from 'chalk';
|
|
2
|
-
/**
|
|
3
|
-
* Log message types
|
|
4
|
-
*/
|
|
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
|
-
*/
|
|
13
|
-
export declare function log(msg: string, type?: LogType, color?: ColorName): void;
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resolvePath(aliasPath: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
enhanceApp({ app }: import("vitepress").EnhanceAppContext): void;
|
|
3
|
-
extends: {
|
|
4
|
-
Layout: import("@vue/runtime-core").DefineComponent;
|
|
5
|
-
enhanceApp: (ctx: import("vitepress").EnhanceAppContext) => void;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import type { Command, Option } from 'commander';
|
|
2
|
-
import type { GlobalOpts } from '../schemas/global.js';
|
|
3
|
-
import type { BuildOpts } from '../schemas/build.js';
|
|
4
|
-
import type { FetchOpts } from '../schemas/fetch.js';
|
|
5
|
-
import type { PrepareOpts } from '../schemas/prepare.js';
|
|
6
|
-
type Cmd = 'fetch' | 'build' | 'prepare' | 'global';
|
|
7
|
-
interface Options {
|
|
8
|
-
build: BuildOpts;
|
|
9
|
-
fetch: FetchOpts;
|
|
10
|
-
prepare: PrepareOpts;
|
|
11
|
-
global: GlobalOpts;
|
|
12
|
-
}
|
|
13
|
-
export declare const options: {
|
|
14
|
-
build: import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
15
|
-
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
-
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
17
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
18
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
19
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
20
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
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
|
-
}, {
|
|
25
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
|
-
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
28
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
29
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
30
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
31
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
-
}>, never>, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
33
|
-
fetch: import("zod").ZodEffects<import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
34
|
-
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
|
-
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
36
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
37
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
38
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
39
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
40
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
41
|
-
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
42
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
43
|
-
}, {
|
|
44
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
45
|
-
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
47
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
48
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
49
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
50
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
-
}>, "username" | "branch" | "gitProvider" | "reposFilter" | "config" | "token">, "strip", import("zod").ZodTypeAny, {
|
|
52
|
-
username?: string | undefined;
|
|
53
|
-
branch?: string | undefined;
|
|
54
|
-
gitProvider?: "github" | undefined;
|
|
55
|
-
reposFilter?: string[] | undefined;
|
|
56
|
-
config?: string | undefined;
|
|
57
|
-
token?: string | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
username?: string | undefined;
|
|
60
|
-
branch?: string | undefined;
|
|
61
|
-
gitProvider?: "github" | undefined;
|
|
62
|
-
reposFilter?: string | undefined;
|
|
63
|
-
config?: string | undefined;
|
|
64
|
-
token?: string | undefined;
|
|
65
|
-
}>, {
|
|
66
|
-
token: string | undefined;
|
|
67
|
-
username: string;
|
|
68
|
-
branch?: string | undefined;
|
|
69
|
-
gitProvider?: "github" | undefined;
|
|
70
|
-
reposFilter?: string[] | undefined;
|
|
71
|
-
extraHeaderPages?: string[] | undefined;
|
|
72
|
-
extraPublicContent?: string[] | undefined;
|
|
73
|
-
extraTheme?: string[] | undefined;
|
|
74
|
-
forks?: boolean | undefined;
|
|
75
|
-
vitepressConfig?: any;
|
|
76
|
-
}, {
|
|
77
|
-
username?: string | undefined;
|
|
78
|
-
branch?: string | undefined;
|
|
79
|
-
gitProvider?: "github" | undefined;
|
|
80
|
-
reposFilter?: string | undefined;
|
|
81
|
-
config?: string | undefined;
|
|
82
|
-
token?: string | undefined;
|
|
83
|
-
}>;
|
|
84
|
-
prepare: import("zod").ZodEffects<import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
85
|
-
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
-
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
87
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
88
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
89
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
90
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
91
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
92
|
-
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
93
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
94
|
-
}, {
|
|
95
|
-
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
-
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
98
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
99
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
100
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
101
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
|
-
}>, "username" | "gitProvider" | "reposFilter" | "extraHeaderPages" | "extraPublicContent" | "extraTheme" | "vitepressConfig" | "config" | "token">, "strip", import("zod").ZodTypeAny, {
|
|
103
|
-
username?: string | undefined;
|
|
104
|
-
gitProvider?: "github" | undefined;
|
|
105
|
-
reposFilter?: string[] | undefined;
|
|
106
|
-
extraHeaderPages?: string[] | undefined;
|
|
107
|
-
extraPublicContent?: string[] | undefined;
|
|
108
|
-
extraTheme?: string[] | undefined;
|
|
109
|
-
vitepressConfig?: string | undefined;
|
|
110
|
-
config?: string | undefined;
|
|
111
|
-
token?: string | undefined;
|
|
112
|
-
}, {
|
|
113
|
-
username?: string | undefined;
|
|
114
|
-
gitProvider?: "github" | undefined;
|
|
115
|
-
reposFilter?: string | undefined;
|
|
116
|
-
extraHeaderPages?: string | undefined;
|
|
117
|
-
extraPublicContent?: string | undefined;
|
|
118
|
-
extraTheme?: string | undefined;
|
|
119
|
-
vitepressConfig?: string | undefined;
|
|
120
|
-
config?: string | undefined;
|
|
121
|
-
token?: string | undefined;
|
|
122
|
-
}>, {
|
|
123
|
-
token: string | undefined;
|
|
124
|
-
username: string;
|
|
125
|
-
branch?: string | undefined;
|
|
126
|
-
gitProvider?: "github" | undefined;
|
|
127
|
-
reposFilter?: string[] | undefined;
|
|
128
|
-
extraHeaderPages?: string[] | undefined;
|
|
129
|
-
extraPublicContent?: string[] | undefined;
|
|
130
|
-
extraTheme?: string[] | undefined;
|
|
131
|
-
forks?: boolean | undefined;
|
|
132
|
-
vitepressConfig?: any;
|
|
133
|
-
}, {
|
|
134
|
-
username?: string | undefined;
|
|
135
|
-
gitProvider?: "github" | undefined;
|
|
136
|
-
reposFilter?: string | undefined;
|
|
137
|
-
extraHeaderPages?: string | undefined;
|
|
138
|
-
extraPublicContent?: string | undefined;
|
|
139
|
-
extraTheme?: string | undefined;
|
|
140
|
-
vitepressConfig?: string | undefined;
|
|
141
|
-
config?: string | undefined;
|
|
142
|
-
token?: string | undefined;
|
|
143
|
-
}>;
|
|
144
|
-
global: import("zod").ZodEffects<import("zod").ZodObject<{
|
|
145
|
-
username: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
146
|
-
branch: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>>;
|
|
147
|
-
gitProvider: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>>;
|
|
148
|
-
forks: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>>;
|
|
149
|
-
config: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
150
|
-
token: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
151
|
-
reposFilter: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>>;
|
|
152
|
-
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>>;
|
|
153
|
-
extraPublicContent: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>>;
|
|
154
|
-
extraTheme: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>>;
|
|
155
|
-
vitepressConfig: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
156
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
157
|
-
username?: string | undefined;
|
|
158
|
-
branch?: string | undefined;
|
|
159
|
-
gitProvider?: "github" | undefined;
|
|
160
|
-
reposFilter?: string[] | undefined;
|
|
161
|
-
extraHeaderPages?: string[] | undefined;
|
|
162
|
-
extraPublicContent?: string[] | undefined;
|
|
163
|
-
extraTheme?: string[] | undefined;
|
|
164
|
-
forks?: boolean | undefined;
|
|
165
|
-
vitepressConfig?: string | undefined;
|
|
166
|
-
config?: string | undefined;
|
|
167
|
-
token?: string | undefined;
|
|
168
|
-
}, {
|
|
169
|
-
username?: string | undefined;
|
|
170
|
-
branch?: string | undefined;
|
|
171
|
-
gitProvider?: "github" | undefined;
|
|
172
|
-
reposFilter?: string | undefined;
|
|
173
|
-
extraHeaderPages?: string | undefined;
|
|
174
|
-
extraPublicContent?: string | undefined;
|
|
175
|
-
extraTheme?: string | undefined;
|
|
176
|
-
forks?: boolean | undefined;
|
|
177
|
-
vitepressConfig?: string | undefined;
|
|
178
|
-
config?: string | undefined;
|
|
179
|
-
token?: string | undefined;
|
|
180
|
-
}>, {
|
|
181
|
-
token: string | undefined;
|
|
182
|
-
username: string;
|
|
183
|
-
branch?: string | undefined;
|
|
184
|
-
gitProvider?: "github" | undefined;
|
|
185
|
-
reposFilter?: string[] | undefined;
|
|
186
|
-
extraHeaderPages?: string[] | undefined;
|
|
187
|
-
extraPublicContent?: string[] | undefined;
|
|
188
|
-
extraTheme?: string[] | undefined;
|
|
189
|
-
forks?: boolean | undefined;
|
|
190
|
-
vitepressConfig?: any;
|
|
191
|
-
}, {
|
|
192
|
-
username?: string | undefined;
|
|
193
|
-
branch?: string | undefined;
|
|
194
|
-
gitProvider?: "github" | undefined;
|
|
195
|
-
reposFilter?: string | undefined;
|
|
196
|
-
extraHeaderPages?: string | undefined;
|
|
197
|
-
extraPublicContent?: string | undefined;
|
|
198
|
-
extraTheme?: string | undefined;
|
|
199
|
-
forks?: boolean | undefined;
|
|
200
|
-
vitepressConfig?: string | undefined;
|
|
201
|
-
config?: string | undefined;
|
|
202
|
-
token?: string | undefined;
|
|
203
|
-
}>;
|
|
204
|
-
};
|
|
205
|
-
export declare function parseOptions<T extends Cmd>(cmd: T, opts: Options[T]): Options[T];
|
|
206
|
-
export declare function addOptions(cmd: Command, opts: Option[]): Command;
|
|
207
|
-
export {};
|
package/types/utils/const.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const DOCPRESS_DIR: string;
|
|
2
|
-
export declare const USER_REPOS_INFOS: string;
|
|
3
|
-
export declare const USER_INFOS: string;
|
|
4
|
-
export declare const DOCS_DIR: string;
|
|
5
|
-
export declare const INDEX_FILE: string;
|
|
6
|
-
export declare const FORKS_FILE: string;
|
|
7
|
-
export declare const VITEPRESS_CONFIG: string;
|
|
8
|
-
export declare const VITEPRESS_THEME: string;
|
|
9
|
-
export declare const VITEPRESS_USER_THEME: string;
|
|
10
|
-
export declare const TEMPLATE_THEME: string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { EnhancedRepository } from '../lib/fetch.js';
|
|
2
|
-
import type { getInfos } from '../lib/git.js';
|
|
3
|
-
export declare function checkHttpStatus(url: string): Promise<number>;
|
|
4
|
-
interface PrettifyOpts {
|
|
5
|
-
mode?: 'capitalize' | 'uppercase' | 'lowercase';
|
|
6
|
-
replaceDash?: boolean;
|
|
7
|
-
removeIdx?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function prettify(s: string, opts: PrettifyOpts): string;
|
|
10
|
-
export declare function createDir(directory: string, { clean }?: {
|
|
11
|
-
clean?: boolean;
|
|
12
|
-
}): void;
|
|
13
|
-
export declare function isDir(path: string): boolean;
|
|
14
|
-
export declare function isFile(path: string): boolean;
|
|
15
|
-
export declare function extractFiles(paths: string[] | string): string[];
|
|
16
|
-
export declare function getMdFiles(path: string[]): string[];
|
|
17
|
-
export declare function prettifyEnum(arr: readonly string[]): string;
|
|
18
|
-
export declare function getUserInfos(): Awaited<ReturnType<typeof getInfos>>["user"];
|
|
19
|
-
export declare function getUserRepos(): EnhancedRepository[];
|
|
20
|
-
export declare function deepMerge<T extends Record<string, any> | null>(...objects: T[]): T;
|
|
21
|
-
export declare function isObject(val: any): val is object;
|
|
22
|
-
export declare function loadConfigFile(configPath?: string): any;
|
|
23
|
-
export declare function splitByComma(s: string): string[];
|
|
24
|
-
export {};
|
package/types/utils/logger.d.ts
DELETED
package/types/utils/regex.d.ts
DELETED