-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
143 lines (135 loc) · 4.15 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
declare module AzpBump {
export type BumpType = 'major' | 'minor' | 'patch';
/**
* The options to use for bumping Tasks.
*
* @export
* @interface Opts
*/
export interface Opts {
/**
* Specifies the type of spacing indent to use when updating the task manifest files.
* Numbers between 1 and 10 can be specified to apply that amount of space characters, or
* alternatively a tab can be specified via a 't', 'tab', or '\t' character.
*
* @type {(number|string)}
* @memberof Opts
*/
indent?: number|string,
/**
* Specifies whether or not the bump process should be quiet. If true, log output will
* be suppressed.
*
* @type {boolean}
* @memberof Opts
*/
quiet?: boolean,
/**
* Specifies what type to use for the version properties (Major, Minor, Patch) in the
* updated task manifest files, as Azure Pipelines will accept versions as either strings or numbers.
* Allowed options are: 'number' or 'string'.
*
* @type {string)}
* @memberof Opts
*/
versionPropertyType?: string,
/**
* Specifies the type of bump to perform. Valid options are: 'major', 'minor', or 'patch'.
*
* @type {BumpType}
* @memberof Opts
*/
type?: BumpType
}
/**
* Represents the result of a bumped task manifest file.
*
* @export
* @interface BumpedFileResult
*/
export interface BumpedFileResult {
/**
* The path to the task manifest file that was bumped.
*
* @type {string}
* @memberof BumpedFileResult
*/
filePath: string,
/**
* The original version the task manifest file contained before the bump was executed.
*
* @type {string}
* @memberof BumpedFileResult
*/
initialVersion: string,
/**
* The new/updated version in the task manifest file after the bump executed successfully.
*
* @type {string}
* @memberof BumpedFileResult
*/
bumpedVersion: string
}
/**
* Represents the result of the requested bump operation.
*
* @export
* @interface BumpResult
*/
export interface BumpResult {
/**
* The type of bump (major, minor, or patch) that was performed.
*
* @type {string}
* @memberof BumpResult
*/
bumpType: string,
/**
* The collection of results for each individual task manifest file that was bumped.
*
* @type {BumpedFileResult[]}
* @memberof BumpResult
*/
bumpedFiles: BumpedFileResult[]
}
/**
* Represents a Azure Pipelines Task Manifest
*
* @export
* @interface AzpTask
*/
export interface AzpTask {
version: {
Major: number|string,
Minor: number|string,
Patch: number|string
}
}
/**
* Bumps the provided task object with the specified bump type.
*
* @export
* @param {AzpTask} task - The Azure Pipelines Task to bump.
* @param {BumpType} [bumpType] - The type of bump to perform.
*/
export function bumpTask(task: AzpTask, bumpType?: BumpType): void;
/**
* Bumps the provided task objects with the specified bump type.
*
* @export
* @param {AzpTask[]} tasks - The Azure Pipelines Tasks to bump.
* @param {BumpType} [bumpType] - The type of bump to perform.
*/
export function bumpTasks(tasks: AzpTask[], bumpType?: BumpType): void;
/**
* Bumps all of the task manifest files in the specified globs using the provided bump options.
*
* @export
* @param {string[]} fileGlobs - The globs containing the task manifest files to be bumped.
* @param {Opts} [opts] - The bump options to use.
*
* @returns {Promise<BumpResult>}
*/
export function bumpTaskManifestFiles(fileGlobs: string[], opts?: Opts): Promise<BumpResult>;
}
export = AzpBump