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