@tobi-or-not/docpress 0.2.3 → 0.3.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 +20 -204
- package/dist/cli.js +389 -269
- package/dist/cli.js.map +1 -1
- package/package.json +17 -14
- package/types/commands/fetch.d.ts +2 -2
- package/types/lib/fetch.d.ts +2 -1
- package/types/lib/git.d.ts +299 -3
- package/types/lib/prepare.d.ts +7 -0
- package/types/schemas/build.d.ts +19 -2
- package/types/schemas/fetch.d.ts +43 -12
- package/types/schemas/global.d.ts +128 -42
- package/types/schemas/prepare.d.ts +51 -8
- package/types/templates/theme/index.d.ts +8 -0
- package/types/utils/commands.d.ts +166 -42
- package/types/utils/const.d.ts +4 -0
- package/types/utils/functions.d.ts +3 -0
package/types/lib/git.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { GlobalOpts } from '../schemas/global.js';
|
|
1
2
|
import type { FetchOpts } from '../schemas/fetch.js';
|
|
2
|
-
|
|
3
|
+
import type { EnhancedRepository } from './fetch.js';
|
|
4
|
+
export declare function getInfos({ username, token, branch }: Pick<FetchOpts, 'branch'> & Pick<GlobalOpts, 'token'> & Required<Pick<GlobalOpts, 'username'>>): Promise<{
|
|
3
5
|
user: {
|
|
4
6
|
login: string;
|
|
5
7
|
id: number;
|
|
@@ -236,6 +238,300 @@ export declare function getInfos({ username, token, branch }: Pick<FetchOpts, 'u
|
|
|
236
238
|
};
|
|
237
239
|
} | null;
|
|
238
240
|
}[];
|
|
239
|
-
branch: string;
|
|
241
|
+
branch: string | undefined;
|
|
240
242
|
}>;
|
|
241
|
-
export declare function
|
|
243
|
+
export declare function getContributors({ repository, token }: {
|
|
244
|
+
repository: EnhancedRepository;
|
|
245
|
+
token: GlobalOpts['token'];
|
|
246
|
+
}): Promise<{
|
|
247
|
+
source: {
|
|
248
|
+
id: number;
|
|
249
|
+
node_id: string;
|
|
250
|
+
name: string;
|
|
251
|
+
full_name: string;
|
|
252
|
+
license: {
|
|
253
|
+
key: string;
|
|
254
|
+
name: string;
|
|
255
|
+
url: string | null;
|
|
256
|
+
spdx_id: string | null;
|
|
257
|
+
node_id: string;
|
|
258
|
+
html_url?: string;
|
|
259
|
+
} | null;
|
|
260
|
+
forks: number;
|
|
261
|
+
permissions?: {
|
|
262
|
+
admin: boolean;
|
|
263
|
+
pull: boolean;
|
|
264
|
+
triage?: boolean;
|
|
265
|
+
push: boolean;
|
|
266
|
+
maintain?: boolean;
|
|
267
|
+
};
|
|
268
|
+
owner: {
|
|
269
|
+
name?: string | null;
|
|
270
|
+
email?: string | null;
|
|
271
|
+
login: string;
|
|
272
|
+
id: number;
|
|
273
|
+
node_id: string;
|
|
274
|
+
avatar_url: string;
|
|
275
|
+
gravatar_id: string | null;
|
|
276
|
+
url: string;
|
|
277
|
+
html_url: string;
|
|
278
|
+
followers_url: string;
|
|
279
|
+
following_url: string;
|
|
280
|
+
gists_url: string;
|
|
281
|
+
starred_url: string;
|
|
282
|
+
subscriptions_url: string;
|
|
283
|
+
organizations_url: string;
|
|
284
|
+
repos_url: string;
|
|
285
|
+
events_url: string;
|
|
286
|
+
received_events_url: string;
|
|
287
|
+
type: string;
|
|
288
|
+
site_admin: boolean;
|
|
289
|
+
starred_at?: string;
|
|
290
|
+
};
|
|
291
|
+
private: boolean;
|
|
292
|
+
html_url: string;
|
|
293
|
+
description: string | null;
|
|
294
|
+
fork: boolean;
|
|
295
|
+
url: string;
|
|
296
|
+
archive_url: string;
|
|
297
|
+
assignees_url: string;
|
|
298
|
+
blobs_url: string;
|
|
299
|
+
branches_url: string;
|
|
300
|
+
collaborators_url: string;
|
|
301
|
+
comments_url: string;
|
|
302
|
+
commits_url: string;
|
|
303
|
+
compare_url: string;
|
|
304
|
+
contents_url: string;
|
|
305
|
+
contributors_url: string;
|
|
306
|
+
deployments_url: string;
|
|
307
|
+
downloads_url: string;
|
|
308
|
+
events_url: string;
|
|
309
|
+
forks_url: string;
|
|
310
|
+
git_commits_url: string;
|
|
311
|
+
git_refs_url: string;
|
|
312
|
+
git_tags_url: string;
|
|
313
|
+
git_url: string;
|
|
314
|
+
issue_comment_url: string;
|
|
315
|
+
issue_events_url: string;
|
|
316
|
+
issues_url: string;
|
|
317
|
+
keys_url: string;
|
|
318
|
+
labels_url: string;
|
|
319
|
+
languages_url: string;
|
|
320
|
+
merges_url: string;
|
|
321
|
+
milestones_url: string;
|
|
322
|
+
notifications_url: string;
|
|
323
|
+
pulls_url: string;
|
|
324
|
+
releases_url: string;
|
|
325
|
+
ssh_url: string;
|
|
326
|
+
stargazers_url: string;
|
|
327
|
+
statuses_url: string;
|
|
328
|
+
subscribers_url: string;
|
|
329
|
+
subscription_url: string;
|
|
330
|
+
tags_url: string;
|
|
331
|
+
teams_url: string;
|
|
332
|
+
trees_url: string;
|
|
333
|
+
clone_url: string;
|
|
334
|
+
mirror_url: string | null;
|
|
335
|
+
hooks_url: string;
|
|
336
|
+
svn_url: string;
|
|
337
|
+
homepage: string | null;
|
|
338
|
+
language: string | null;
|
|
339
|
+
forks_count: number;
|
|
340
|
+
stargazers_count: number;
|
|
341
|
+
watchers_count: number;
|
|
342
|
+
size: number;
|
|
343
|
+
default_branch: string;
|
|
344
|
+
open_issues_count: number;
|
|
345
|
+
is_template?: boolean;
|
|
346
|
+
topics?: string[];
|
|
347
|
+
has_issues: boolean;
|
|
348
|
+
has_projects: boolean;
|
|
349
|
+
has_wiki: boolean;
|
|
350
|
+
has_pages: boolean;
|
|
351
|
+
has_downloads: boolean;
|
|
352
|
+
has_discussions?: boolean;
|
|
353
|
+
archived: boolean;
|
|
354
|
+
disabled: boolean;
|
|
355
|
+
visibility?: string;
|
|
356
|
+
pushed_at: string | null;
|
|
357
|
+
created_at: string | null;
|
|
358
|
+
updated_at: string | null;
|
|
359
|
+
allow_rebase_merge?: boolean;
|
|
360
|
+
temp_clone_token?: string;
|
|
361
|
+
allow_squash_merge?: boolean;
|
|
362
|
+
allow_auto_merge?: boolean;
|
|
363
|
+
delete_branch_on_merge?: boolean;
|
|
364
|
+
allow_update_branch?: boolean;
|
|
365
|
+
use_squash_pr_title_as_default?: boolean;
|
|
366
|
+
squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE";
|
|
367
|
+
squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK";
|
|
368
|
+
merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE";
|
|
369
|
+
merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK";
|
|
370
|
+
allow_merge_commit?: boolean;
|
|
371
|
+
allow_forking?: boolean;
|
|
372
|
+
web_commit_signoff_required?: boolean;
|
|
373
|
+
open_issues: number;
|
|
374
|
+
watchers: number;
|
|
375
|
+
master_branch?: string;
|
|
376
|
+
starred_at?: string;
|
|
377
|
+
anonymous_access_enabled?: boolean;
|
|
378
|
+
} | undefined;
|
|
379
|
+
contributors: never[];
|
|
380
|
+
} | {
|
|
381
|
+
source: {
|
|
382
|
+
id: number;
|
|
383
|
+
node_id: string;
|
|
384
|
+
name: string;
|
|
385
|
+
full_name: string;
|
|
386
|
+
license: {
|
|
387
|
+
key: string;
|
|
388
|
+
name: string;
|
|
389
|
+
url: string | null;
|
|
390
|
+
spdx_id: string | null;
|
|
391
|
+
node_id: string;
|
|
392
|
+
html_url?: string;
|
|
393
|
+
} | null;
|
|
394
|
+
forks: number;
|
|
395
|
+
permissions?: {
|
|
396
|
+
admin: boolean;
|
|
397
|
+
pull: boolean;
|
|
398
|
+
triage?: boolean;
|
|
399
|
+
push: boolean;
|
|
400
|
+
maintain?: boolean;
|
|
401
|
+
};
|
|
402
|
+
owner: {
|
|
403
|
+
name?: string | null;
|
|
404
|
+
email?: string | null;
|
|
405
|
+
login: string;
|
|
406
|
+
id: number;
|
|
407
|
+
node_id: string;
|
|
408
|
+
avatar_url: string;
|
|
409
|
+
gravatar_id: string | null;
|
|
410
|
+
url: string;
|
|
411
|
+
html_url: string;
|
|
412
|
+
followers_url: string;
|
|
413
|
+
following_url: string;
|
|
414
|
+
gists_url: string;
|
|
415
|
+
starred_url: string;
|
|
416
|
+
subscriptions_url: string;
|
|
417
|
+
organizations_url: string;
|
|
418
|
+
repos_url: string;
|
|
419
|
+
events_url: string;
|
|
420
|
+
received_events_url: string;
|
|
421
|
+
type: string;
|
|
422
|
+
site_admin: boolean;
|
|
423
|
+
starred_at?: string;
|
|
424
|
+
};
|
|
425
|
+
private: boolean;
|
|
426
|
+
html_url: string;
|
|
427
|
+
description: string | null;
|
|
428
|
+
fork: boolean;
|
|
429
|
+
url: string;
|
|
430
|
+
archive_url: string;
|
|
431
|
+
assignees_url: string;
|
|
432
|
+
blobs_url: string;
|
|
433
|
+
branches_url: string;
|
|
434
|
+
collaborators_url: string;
|
|
435
|
+
comments_url: string;
|
|
436
|
+
commits_url: string;
|
|
437
|
+
compare_url: string;
|
|
438
|
+
contents_url: string;
|
|
439
|
+
contributors_url: string;
|
|
440
|
+
deployments_url: string;
|
|
441
|
+
downloads_url: string;
|
|
442
|
+
events_url: string;
|
|
443
|
+
forks_url: string;
|
|
444
|
+
git_commits_url: string;
|
|
445
|
+
git_refs_url: string;
|
|
446
|
+
git_tags_url: string;
|
|
447
|
+
git_url: string;
|
|
448
|
+
issue_comment_url: string;
|
|
449
|
+
issue_events_url: string;
|
|
450
|
+
issues_url: string;
|
|
451
|
+
keys_url: string;
|
|
452
|
+
labels_url: string;
|
|
453
|
+
languages_url: string;
|
|
454
|
+
merges_url: string;
|
|
455
|
+
milestones_url: string;
|
|
456
|
+
notifications_url: string;
|
|
457
|
+
pulls_url: string;
|
|
458
|
+
releases_url: string;
|
|
459
|
+
ssh_url: string;
|
|
460
|
+
stargazers_url: string;
|
|
461
|
+
statuses_url: string;
|
|
462
|
+
subscribers_url: string;
|
|
463
|
+
subscription_url: string;
|
|
464
|
+
tags_url: string;
|
|
465
|
+
teams_url: string;
|
|
466
|
+
trees_url: string;
|
|
467
|
+
clone_url: string;
|
|
468
|
+
mirror_url: string | null;
|
|
469
|
+
hooks_url: string;
|
|
470
|
+
svn_url: string;
|
|
471
|
+
homepage: string | null;
|
|
472
|
+
language: string | null;
|
|
473
|
+
forks_count: number;
|
|
474
|
+
stargazers_count: number;
|
|
475
|
+
watchers_count: number;
|
|
476
|
+
size: number;
|
|
477
|
+
default_branch: string;
|
|
478
|
+
open_issues_count: number;
|
|
479
|
+
is_template?: boolean;
|
|
480
|
+
topics?: string[];
|
|
481
|
+
has_issues: boolean;
|
|
482
|
+
has_projects: boolean;
|
|
483
|
+
has_wiki: boolean;
|
|
484
|
+
has_pages: boolean;
|
|
485
|
+
has_downloads: boolean;
|
|
486
|
+
has_discussions?: boolean;
|
|
487
|
+
archived: boolean;
|
|
488
|
+
disabled: boolean;
|
|
489
|
+
visibility?: string;
|
|
490
|
+
pushed_at: string | null;
|
|
491
|
+
created_at: string | null;
|
|
492
|
+
updated_at: string | null;
|
|
493
|
+
allow_rebase_merge?: boolean;
|
|
494
|
+
temp_clone_token?: string;
|
|
495
|
+
allow_squash_merge?: boolean;
|
|
496
|
+
allow_auto_merge?: boolean;
|
|
497
|
+
delete_branch_on_merge?: boolean;
|
|
498
|
+
allow_update_branch?: boolean;
|
|
499
|
+
use_squash_pr_title_as_default?: boolean;
|
|
500
|
+
squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE";
|
|
501
|
+
squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK";
|
|
502
|
+
merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE";
|
|
503
|
+
merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK";
|
|
504
|
+
allow_merge_commit?: boolean;
|
|
505
|
+
allow_forking?: boolean;
|
|
506
|
+
web_commit_signoff_required?: boolean;
|
|
507
|
+
open_issues: number;
|
|
508
|
+
watchers: number;
|
|
509
|
+
master_branch?: string;
|
|
510
|
+
starred_at?: string;
|
|
511
|
+
anonymous_access_enabled?: boolean;
|
|
512
|
+
};
|
|
513
|
+
contributors: {
|
|
514
|
+
login?: string;
|
|
515
|
+
id?: number;
|
|
516
|
+
node_id?: string;
|
|
517
|
+
avatar_url?: string;
|
|
518
|
+
gravatar_id?: string | null;
|
|
519
|
+
url?: string;
|
|
520
|
+
html_url?: string;
|
|
521
|
+
followers_url?: string;
|
|
522
|
+
following_url?: string;
|
|
523
|
+
gists_url?: string;
|
|
524
|
+
starred_url?: string;
|
|
525
|
+
subscriptions_url?: string;
|
|
526
|
+
organizations_url?: string;
|
|
527
|
+
repos_url?: string;
|
|
528
|
+
events_url?: string;
|
|
529
|
+
received_events_url?: string;
|
|
530
|
+
type: string;
|
|
531
|
+
site_admin?: boolean;
|
|
532
|
+
contributions: number;
|
|
533
|
+
email?: string;
|
|
534
|
+
name?: string;
|
|
535
|
+
}[];
|
|
536
|
+
}>;
|
|
537
|
+
export declare function cloneRepo(name: string, url: string, projectDir: string, branch: string, includes: string[]): Promise<void>;
|
package/types/lib/prepare.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { defineConfig } from 'vitepress';
|
|
2
|
+
import type { GlobalOpts } from '../schemas/global.js';
|
|
2
3
|
import type { getUserInfos } from '../utils/functions.js';
|
|
3
4
|
import type { EnhancedRepository } from './fetch.js';
|
|
5
|
+
import type { getInfos } from './git.js';
|
|
4
6
|
export interface Page {
|
|
5
7
|
text: string;
|
|
6
8
|
link: string;
|
|
@@ -51,5 +53,10 @@ export declare function transformDoc(repositories: EnhancedRepository[], user: R
|
|
|
51
53
|
};
|
|
52
54
|
export declare function addExtraPages(paths: string[]): Page[];
|
|
53
55
|
export declare function addContent(paths: string | string[], dir: string, fn?: () => void): void;
|
|
56
|
+
export declare function addForkPage(forks: {
|
|
57
|
+
repository: Awaited<ReturnType<typeof getInfos>>['repos'][number];
|
|
58
|
+
contributions: number;
|
|
59
|
+
}[]): void;
|
|
60
|
+
export declare function processForks(repositories: EnhancedRepository[], username: GlobalOpts['username'], token?: GlobalOpts['token']): Promise<void>;
|
|
54
61
|
export declare function parseVitepressConfig(path: string): any;
|
|
55
62
|
export declare function generateVitepressFiles(vitepressConfig: Partial<ReturnType<typeof defineConfig>>, index: Index): void;
|
package/types/schemas/build.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const buildOptsSchema: import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
2
|
+
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3
|
+
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
4
|
+
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
5
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
6
|
+
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
7
|
+
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
8
|
+
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
9
|
+
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
10
|
+
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
11
|
+
}, {
|
|
12
|
+
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
15
|
+
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
16
|
+
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
17
|
+
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
18
|
+
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
}>, never>, "strip", import("zod").ZodTypeAny, {}, {}>;
|
|
3
20
|
export type BuildOpts = Zod.infer<typeof buildOptsSchema>;
|
package/types/schemas/fetch.d.ts
CHANGED
|
@@ -1,21 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
branch:
|
|
4
|
-
gitProvider:
|
|
5
|
-
reposFilter:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export declare const fetchOptsSchema: import("zod").ZodEffects<import("zod").ZodObject<Pick<import("zod").objectUtil.extendShape<{
|
|
2
|
+
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3
|
+
branch: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodString>>;
|
|
4
|
+
gitProvider: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEnum<["github"]>>>;
|
|
5
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
6
|
+
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
7
|
+
extraPublicContent: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
8
|
+
extraTheme: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
9
|
+
forks: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
10
|
+
vitepressConfig: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
11
|
+
}, {
|
|
12
|
+
config: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
reposFilter: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
15
|
+
extraHeaderPages: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
16
|
+
extraPublicContent: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
17
|
+
extraTheme: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string[], string>>;
|
|
18
|
+
vitepressConfig: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
}>, "username" | "branch" | "gitProvider" | "reposFilter" | "config" | "token">, "strip", import("zod").ZodTypeAny, {
|
|
20
|
+
username?: string | undefined;
|
|
21
|
+
branch?: string | undefined;
|
|
22
|
+
gitProvider?: "github" | undefined;
|
|
12
23
|
reposFilter?: string[] | undefined;
|
|
24
|
+
config?: string | undefined;
|
|
13
25
|
token?: string | undefined;
|
|
14
26
|
}, {
|
|
27
|
+
username?: string | undefined;
|
|
28
|
+
branch?: string | undefined;
|
|
29
|
+
gitProvider?: "github" | undefined;
|
|
30
|
+
reposFilter?: string | undefined;
|
|
31
|
+
config?: string | undefined;
|
|
32
|
+
token?: string | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
token: string | undefined;
|
|
15
35
|
username: string;
|
|
16
36
|
branch?: string | undefined;
|
|
17
37
|
gitProvider?: "github" | undefined;
|
|
18
|
-
reposFilter?: string
|
|
38
|
+
reposFilter?: string[] | undefined;
|
|
39
|
+
extraHeaderPages?: string[] | undefined;
|
|
40
|
+
extraPublicContent?: string[] | undefined;
|
|
41
|
+
extraTheme?: string[] | undefined;
|
|
42
|
+
forks?: boolean | undefined;
|
|
43
|
+
vitepressConfig?: any;
|
|
44
|
+
}, {
|
|
45
|
+
username?: string | undefined;
|
|
46
|
+
branch?: string | undefined;
|
|
47
|
+
gitProvider?: "github" | undefined;
|
|
48
|
+
reposFilter?: string | undefined;
|
|
49
|
+
config?: string | undefined;
|
|
19
50
|
token?: string | undefined;
|
|
20
51
|
}>;
|
|
21
52
|
export type FetchOpts = Zod.infer<typeof fetchOptsSchema>;
|
|
@@ -1,64 +1,150 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
extraTheme?: string[] | undefined;
|
|
13
|
-
vitepressConfig?: import("vitepress").UserConfig<import("vitepress").DefaultTheme.Config> | undefined;
|
|
14
|
-
}, string>>;
|
|
2
|
+
export declare const configSchema: z.ZodObject<{
|
|
3
|
+
username: z.ZodString;
|
|
4
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
5
|
+
gitProvider: z.ZodDefault<z.ZodEnum<["github"]>>;
|
|
6
|
+
reposFilter: z.ZodArray<z.ZodString, "many">;
|
|
7
|
+
extraHeaderPages: z.ZodArray<z.ZodString, "many">;
|
|
8
|
+
extraPublicContent: z.ZodArray<z.ZodString, "many">;
|
|
9
|
+
extraTheme: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
forks: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
vitepressConfig: z.ZodAny;
|
|
15
12
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
extraTheme?: string[] | undefined;
|
|
26
|
-
vitepressConfig?: import("vitepress").UserConfig<import("vitepress").DefaultTheme.Config> | undefined;
|
|
27
|
-
}) | undefined;
|
|
13
|
+
username: string;
|
|
14
|
+
branch: string;
|
|
15
|
+
gitProvider: "github";
|
|
16
|
+
reposFilter: string[];
|
|
17
|
+
extraHeaderPages: string[];
|
|
18
|
+
extraPublicContent: string[];
|
|
19
|
+
extraTheme: string[];
|
|
20
|
+
forks: boolean;
|
|
21
|
+
vitepressConfig?: any;
|
|
28
22
|
}, {
|
|
29
|
-
|
|
23
|
+
username: string;
|
|
24
|
+
reposFilter: string[];
|
|
25
|
+
extraHeaderPages: string[];
|
|
26
|
+
extraPublicContent: string[];
|
|
27
|
+
extraTheme: string[];
|
|
28
|
+
branch?: string | undefined;
|
|
29
|
+
gitProvider?: "github" | undefined;
|
|
30
|
+
forks?: boolean | undefined;
|
|
31
|
+
vitepressConfig?: any;
|
|
30
32
|
}>;
|
|
31
|
-
export type
|
|
32
|
-
export declare
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
export type Config = Zod.infer<typeof configSchema>;
|
|
34
|
+
export declare function applyGlobalOptsTransform(data: Cli): {
|
|
35
|
+
token: string | undefined;
|
|
36
|
+
username: string;
|
|
37
|
+
branch?: string | undefined;
|
|
38
|
+
gitProvider?: "github" | undefined;
|
|
39
|
+
reposFilter?: string[] | undefined;
|
|
40
|
+
extraHeaderPages?: string[] | undefined;
|
|
41
|
+
extraPublicContent?: string[] | undefined;
|
|
42
|
+
extraTheme?: string[] | undefined;
|
|
43
|
+
forks?: boolean | undefined;
|
|
44
|
+
vitepressConfig?: any;
|
|
45
|
+
};
|
|
46
|
+
export declare const cliSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
47
|
+
username: z.ZodOptional<z.ZodString>;
|
|
48
|
+
branch: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
49
|
+
gitProvider: z.ZodOptional<z.ZodDefault<z.ZodEnum<["github"]>>>;
|
|
50
|
+
reposFilter: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
51
|
+
extraHeaderPages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
+
extraPublicContent: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
extraTheme: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
54
|
+
forks: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
55
|
+
vitepressConfig: z.ZodOptional<z.ZodAny>;
|
|
38
56
|
}, {
|
|
57
|
+
config: z.ZodOptional<z.ZodString>;
|
|
58
|
+
token: z.ZodOptional<z.ZodString>;
|
|
59
|
+
reposFilter: z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>;
|
|
39
60
|
extraHeaderPages: z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>;
|
|
40
61
|
extraPublicContent: z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>;
|
|
41
62
|
extraTheme: z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>;
|
|
42
|
-
vitepressConfig: z.ZodOptional<z.
|
|
43
|
-
}>,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
vitepressConfig: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}>, "strip", z.ZodTypeAny, {
|
|
65
|
+
username?: string | undefined;
|
|
66
|
+
branch?: string | undefined;
|
|
67
|
+
gitProvider?: "github" | undefined;
|
|
47
68
|
reposFilter?: string[] | undefined;
|
|
69
|
+
extraHeaderPages?: string[] | undefined;
|
|
70
|
+
extraPublicContent?: string[] | undefined;
|
|
71
|
+
extraTheme?: string[] | undefined;
|
|
72
|
+
forks?: boolean | undefined;
|
|
73
|
+
vitepressConfig?: string | undefined;
|
|
74
|
+
config?: string | undefined;
|
|
48
75
|
token?: string | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
username?: string | undefined;
|
|
78
|
+
branch?: string | undefined;
|
|
79
|
+
gitProvider?: "github" | undefined;
|
|
80
|
+
reposFilter?: string | undefined;
|
|
81
|
+
extraHeaderPages?: string | undefined;
|
|
82
|
+
extraPublicContent?: string | undefined;
|
|
83
|
+
extraTheme?: string | undefined;
|
|
84
|
+
forks?: boolean | undefined;
|
|
85
|
+
vitepressConfig?: string | undefined;
|
|
86
|
+
config?: string | undefined;
|
|
87
|
+
token?: string | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export type Cli = Zod.infer<typeof cliSchema>;
|
|
90
|
+
export declare const globalOptsSchema: z.ZodEffects<z.ZodObject<{
|
|
91
|
+
username: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
92
|
+
branch: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
|
|
93
|
+
gitProvider: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodEnum<["github"]>>>>;
|
|
94
|
+
forks: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
|
|
95
|
+
config: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
96
|
+
token: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
97
|
+
reposFilter: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>>;
|
|
98
|
+
extraHeaderPages: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>>;
|
|
99
|
+
extraPublicContent: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>>;
|
|
100
|
+
extraTheme: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string[], string>>>;
|
|
101
|
+
vitepressConfig: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
username?: string | undefined;
|
|
104
|
+
branch?: string | undefined;
|
|
105
|
+
gitProvider?: "github" | undefined;
|
|
106
|
+
reposFilter?: string[] | undefined;
|
|
49
107
|
extraHeaderPages?: string[] | undefined;
|
|
50
108
|
extraPublicContent?: string[] | undefined;
|
|
51
109
|
extraTheme?: string[] | undefined;
|
|
52
|
-
|
|
110
|
+
forks?: boolean | undefined;
|
|
111
|
+
vitepressConfig?: string | undefined;
|
|
112
|
+
config?: string | undefined;
|
|
113
|
+
token?: string | undefined;
|
|
53
114
|
}, {
|
|
54
|
-
username
|
|
115
|
+
username?: string | undefined;
|
|
55
116
|
branch?: string | undefined;
|
|
56
117
|
gitProvider?: "github" | undefined;
|
|
57
|
-
reposFilter?: string |
|
|
118
|
+
reposFilter?: string | undefined;
|
|
119
|
+
extraHeaderPages?: string | undefined;
|
|
120
|
+
extraPublicContent?: string | undefined;
|
|
121
|
+
extraTheme?: string | undefined;
|
|
122
|
+
forks?: boolean | undefined;
|
|
123
|
+
vitepressConfig?: string | undefined;
|
|
124
|
+
config?: string | undefined;
|
|
58
125
|
token?: string | undefined;
|
|
126
|
+
}>, {
|
|
127
|
+
token: string | undefined;
|
|
128
|
+
username: string;
|
|
129
|
+
branch?: string | undefined;
|
|
130
|
+
gitProvider?: "github" | undefined;
|
|
131
|
+
reposFilter?: string[] | undefined;
|
|
132
|
+
extraHeaderPages?: string[] | undefined;
|
|
133
|
+
extraPublicContent?: string[] | undefined;
|
|
134
|
+
extraTheme?: string[] | undefined;
|
|
135
|
+
forks?: boolean | undefined;
|
|
136
|
+
vitepressConfig?: any;
|
|
137
|
+
}, {
|
|
138
|
+
username?: string | undefined;
|
|
139
|
+
branch?: string | undefined;
|
|
140
|
+
gitProvider?: "github" | undefined;
|
|
141
|
+
reposFilter?: string | undefined;
|
|
59
142
|
extraHeaderPages?: string | undefined;
|
|
60
143
|
extraPublicContent?: string | undefined;
|
|
61
144
|
extraTheme?: string | undefined;
|
|
145
|
+
forks?: boolean | undefined;
|
|
62
146
|
vitepressConfig?: string | undefined;
|
|
147
|
+
config?: string | undefined;
|
|
148
|
+
token?: string | undefined;
|
|
63
149
|
}>;
|
|
64
|
-
export type
|
|
150
|
+
export type GlobalOpts = Required<Pick<Zod.infer<typeof globalOptsSchema>, 'branch' | 'gitProvider'>> & Omit<Zod.infer<typeof globalOptsSchema>, 'branch' | 'gitProvider'>;
|