1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const tslib_1 = require("tslib");
|
4 | const t = tslib_1.__importStar(require("io-ts"));
|
5 | const release_1 = require("./release");
|
6 | const author = t.partial({
|
7 |
|
8 | name: t.string,
|
9 |
|
10 | email: t.string,
|
11 | });
|
12 | const githubInformation = t.partial({
|
13 |
|
14 | githubApi: t.string,
|
15 |
|
16 | githubGraphqlApi: t.string,
|
17 |
|
18 | baseBranch: t.string,
|
19 | });
|
20 | const repoInformation = t.partial({
|
21 |
|
22 | repo: t.string,
|
23 |
|
24 | owner: t.string,
|
25 | });
|
26 | const releaseCalculationOptions = t.partial({
|
27 |
|
28 | onlyPublishWithReleaseLabel: t.boolean,
|
29 | });
|
30 | const logOptions = t.partial({
|
31 |
|
32 | verbose: t.union([t.boolean, t.tuple([t.boolean, t.boolean])]),
|
33 | });
|
34 | const globalOptions = t.partial({
|
35 |
|
36 | extends: t.string,
|
37 |
|
38 | labels: t.array(release_1.labelDefinition),
|
39 |
|
40 | prereleaseBranches: t.array(t.string),
|
41 |
|
42 | plugins: t.array(t.union([t.string, t.tuple([t.string, t.any])])),
|
43 |
|
44 | noVersionPrefix: t.boolean,
|
45 | |
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | versionBranches: t.union([t.boolean, t.string]),
|
52 |
|
53 | comment: t.partial({
|
54 | delete: t.boolean,
|
55 | edit: t.boolean,
|
56 | }),
|
57 |
|
58 | changelog: t.partial({
|
59 | message: t.string,
|
60 | }),
|
61 |
|
62 | release: t.partial({
|
63 | prerelease: t.boolean,
|
64 | }),
|
65 |
|
66 | shipit: t.partial({
|
67 | onlyGraduateWithReleaseLabel: t.boolean,
|
68 | }),
|
69 |
|
70 | canary: t.partial({
|
71 | force: t.boolean,
|
72 | message: t.union([t.literal(false), t.string]),
|
73 | }),
|
74 |
|
75 | next: t.partial({
|
76 | message: t.string,
|
77 | }),
|
78 | });
|
79 | exports.autoRc = t.intersection([
|
80 | globalOptions,
|
81 | t.intersection([
|
82 | repoInformation,
|
83 | githubInformation,
|
84 | author,
|
85 | releaseCalculationOptions,
|
86 | logOptions,
|
87 | ]),
|
88 | ]);
|
89 | exports.loadedAutoRc = t.intersection([
|
90 | exports.autoRc,
|
91 | t.type({
|
92 |
|
93 | labels: t.array(release_1.labelDefinition),
|
94 |
|
95 | prereleaseBranches: t.array(t.string),
|
96 |
|
97 | baseBranch: t.string,
|
98 | }),
|
99 | ]);
|
100 |
|
\ | No newline at end of file |