UNPKG

3.23 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const tslib_1 = require("tslib");
4const t = tslib_1.__importStar(require("io-ts"));
5const release_1 = require("./release");
6const author = t.partial({
7 /** The name of the author to make commits with */
8 name: t.string,
9 /** The email of the author to make commits with */
10 email: t.string,
11});
12const githubInformation = t.partial({
13 /** The github api to interact with */
14 githubApi: t.string,
15 /** The github graphql api to interact with */
16 githubGraphqlApi: t.string,
17 /** The branch that is used as the base. defaults to master */
18 baseBranch: t.string,
19});
20const repoInformation = t.partial({
21 /** The repo of to publish, might be set in package manager file. */
22 repo: t.string,
23 /** The owner of the repo to publish, might be set in package manager file. */
24 owner: t.string,
25});
26const releaseCalculationOptions = t.partial({
27 /** Instead of publishing every PR only publish when "release" label is present */
28 onlyPublishWithReleaseLabel: t.boolean,
29});
30const logOptions = t.partial({
31 /** Show more logs */
32 verbose: t.union([t.boolean, t.tuple([t.boolean, t.boolean])]),
33});
34const globalOptions = t.partial({
35 /** Another auto configuration to extend */
36 extends: t.string,
37 /** Labels that power auto */
38 labels: t.array(release_1.labelDefinition),
39 /** Branches to create pre-releases from */
40 prereleaseBranches: t.array(t.string),
41 /** Configured auto plugins */
42 plugins: t.array(t.union([t.string, t.tuple([t.string, t.any])])),
43 /** Whether to prefix the version with a "v" */
44 noVersionPrefix: t.boolean,
45 /**
46 * Manage old version branches.
47 * Can be a true or a custom version branch prefix.
48 *
49 * @default 'version-'
50 */
51 versionBranches: t.union([t.boolean, t.string]),
52 /** Options to pass to "auto comment" */
53 comment: t.partial({
54 delete: t.boolean,
55 edit: t.boolean,
56 }),
57 /** Options to pass to "auto changelog" */
58 changelog: t.partial({
59 message: t.string,
60 }),
61 /** Options to pass to "auto release" */
62 release: t.partial({
63 prerelease: t.boolean,
64 }),
65 /** Options to pass to "auto shipit" */
66 shipit: t.partial({
67 onlyGraduateWithReleaseLabel: t.boolean,
68 }),
69 /** Options to pass to "auto canary" */
70 canary: t.partial({
71 force: t.boolean,
72 message: t.union([t.literal(false), t.string]),
73 }),
74 /** Options to pass to "auto next" */
75 next: t.partial({
76 message: t.string,
77 }),
78});
79exports.autoRc = t.intersection([
80 globalOptions,
81 t.intersection([
82 repoInformation,
83 githubInformation,
84 author,
85 releaseCalculationOptions,
86 logOptions,
87 ]),
88]);
89exports.loadedAutoRc = t.intersection([
90 exports.autoRc,
91 t.type({
92 /** Labels that power auto */
93 labels: t.array(release_1.labelDefinition),
94 /** Branches to create pre-releases from */
95 prereleaseBranches: t.array(t.string),
96 /** The branch that is used as the base. defaults to master */
97 baseBranch: t.string,
98 }),
99]);
100//# sourceMappingURL=types.js.map
\No newline at end of file