repository-provider 35.6.2 → 35.7.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.
@@ -1,380 +0,0 @@
1
- /**
2
- * Abstract repository
3
- *
4
- * @property {RepositoryOwner} owner
5
- * @property {string} name without (#branch)
6
- * @property {string} [description] from options.description
7
- * @property {string} [id] from options.id
8
- * @property {Map<string,Branch>} branches
9
- * @property {Map<string,Tag>} tags
10
- * @property {Map<string,PullRequest>} pullRequests
11
- * @property {Map<string,Milestone>} milestones
12
- */
13
- export class Repository extends OwnedObject {
14
- static defaultBranchName: string;
15
- /**
16
- * options
17
- */
18
- static attributes: {
19
- url: import("pacc").AttributeDefinition;
20
- /**
21
- * The name of the default branch
22
- * @return {string}
23
- */
24
- defaultBranchName: {
25
- default: string;
26
- externalName: string;
27
- type: object;
28
- isKey: boolean;
29
- writable: boolean;
30
- mandatory: boolean;
31
- collection: boolean;
32
- private?: boolean;
33
- depends?: string;
34
- description?: string;
35
- set?: Function;
36
- get?: Function;
37
- prepareValue?: Function;
38
- values?: Set<any>;
39
- env?: string[] | string;
40
- additionalValues?: object;
41
- };
42
- cloneURL: import("pacc").AttributeDefinition;
43
- isArchived: {
44
- externalName: string;
45
- type: object;
46
- isKey: boolean;
47
- writable: boolean;
48
- mandatory: boolean;
49
- collection: boolean;
50
- private?: boolean;
51
- depends?: string;
52
- description?: string;
53
- default?: any;
54
- set?: Function;
55
- get?: Function;
56
- prepareValue?: Function;
57
- values?: Set<any>;
58
- env?: string[] | string;
59
- additionalValues?: object;
60
- };
61
- isLocked: {
62
- externalName: string;
63
- type: object;
64
- isKey: boolean;
65
- writable: boolean;
66
- mandatory: boolean;
67
- collection: boolean;
68
- private?: boolean;
69
- depends?: string;
70
- description?: string;
71
- default?: any;
72
- set?: Function;
73
- get?: Function;
74
- prepareValue?: Function;
75
- values?: Set<any>;
76
- env?: string[] | string;
77
- additionalValues?: object;
78
- };
79
- isDisabled: {
80
- externalName: string;
81
- type: object;
82
- isKey: boolean;
83
- writable: boolean;
84
- mandatory: boolean;
85
- collection: boolean;
86
- private?: boolean;
87
- depends?: string;
88
- description?: string;
89
- default?: any;
90
- set?: Function;
91
- get?: Function;
92
- prepareValue?: Function;
93
- values?: Set<any>;
94
- env?: string[] | string;
95
- additionalValues?: object;
96
- };
97
- isTemplate: {
98
- externalName: string;
99
- type: object;
100
- isKey: boolean;
101
- writable: boolean;
102
- mandatory: boolean;
103
- collection: boolean;
104
- private?: boolean;
105
- depends?: string;
106
- description?: string;
107
- default?: any;
108
- set?: Function;
109
- get?: Function;
110
- prepareValue?: Function;
111
- values?: Set<any>;
112
- env?: string[] | string;
113
- additionalValues?: object;
114
- };
115
- isFork: {
116
- externalName: string;
117
- type: object;
118
- isKey: boolean;
119
- writable: boolean;
120
- mandatory: boolean;
121
- collection: boolean;
122
- private?: boolean;
123
- depends?: string;
124
- description?: string;
125
- default?: any;
126
- set?: Function;
127
- get?: Function;
128
- prepareValue?: Function;
129
- values?: Set<any>;
130
- env?: string[] | string;
131
- additionalValues?: object;
132
- };
133
- isPrivate: {
134
- externalName: string;
135
- type: object;
136
- isKey: boolean;
137
- writable: boolean;
138
- mandatory: boolean;
139
- collection: boolean;
140
- private?: boolean;
141
- depends?: string;
142
- description?: string;
143
- default?: any;
144
- set?: Function;
145
- get?: Function;
146
- prepareValue?: Function;
147
- values?: Set<any>;
148
- env?: string[] | string;
149
- additionalValues?: object;
150
- };
151
- name: import("pacc").AttributeDefinition;
152
- id: import("pacc").AttributeDefinition;
153
- description: import("pacc").AttributeDefinition;
154
- };
155
- /**
156
- * @param {RepositoryOwner} owner
157
- * @param {string} name (#branch) will be removed
158
- * @param {Object} [options]
159
- * @param {string} [options.description] human readable description
160
- * @param {string} [options.id] internal id
161
- * @param {Object} [options]
162
- * @param {string} [options.id]
163
- * @param {string} [options.description]
164
- */
165
- constructor(owner: typeof RepositoryOwner, name: string, options?: {
166
- description?: string;
167
- id?: string;
168
- });
169
- get defaultBranchName(): any;
170
- /**
171
- * Lookup entries form the head of the default branch.
172
- * {@link Branch#entry}
173
- * @return {Promise<ContentEntry>}
174
- */
175
- entry(name: any): Promise<ContentEntry>;
176
- /**
177
- * List entries of the default branch.
178
- * @param {string[]|string} [patterns]
179
- * @return {AsyncIterable<ContentEntry>} all matching entries in the branch
180
- */
181
- entries(patterns?: string[] | string): AsyncIterable<ContentEntry>;
182
- /**
183
- * Get exactly one matching entry by name or undefined if no such entry is found.
184
- * @param {string} name
185
- * @return {Promise<ContentEntry|undefined>}
186
- */
187
- maybeEntry(name: string): Promise<ContentEntry | undefined>;
188
- /**
189
- * List commits of the default branch.
190
- * @param {Object} [options]
191
- * @return {AsyncIterable<Commit>} all matching commits in the repository
192
- */
193
- commits(options?: any): AsyncIterable<Commit>;
194
- /**
195
- * The url used for cloning the repo.
196
- * @return {string}
197
- */
198
- get cloneURL(): string;
199
- /**
200
- * By default we are not a template.
201
- * @return {boolean} false
202
- */
203
- get isTemplate(): boolean;
204
- /**
205
- * Delete the repository from the {@link Provider}.
206
- * {@link Provider#deleteRepository}
207
- * @return {Promise<any>}
208
- */
209
- delete(): Promise<any>;
210
- /**
211
- * Lookup the default branch.
212
- * @return {Promise<Branch|undefined>} branch named after defaultBranchName
213
- */
214
- get defaultBranch(): Promise<Branch | undefined>;
215
- /**
216
- * Lookup branch by name.
217
- * @param {string} name
218
- * @return {Promise<Branch|undefined>}
219
- */
220
- branch(name: string): Promise<Branch | undefined>;
221
- /**
222
- * @return {boolean} true if there is at least one branch
223
- */
224
- get hasBranches(): boolean;
225
- /**
226
- * @param {string[]|string} [patterns]
227
- * @return {AsyncGenerator<Branch>} of all branches
228
- */
229
- branches(patterns?: string[] | string): AsyncGenerator<Branch>;
230
- /**
231
- * Create a new {@link Branch} by cloning a given source branch.
232
- * @param {string} name of the new branch
233
- * @param {Branch} source branch defaults to the defaultBranch
234
- * @param {Object} [options]
235
- * @return {Promise<Branch>} newly created branch (or already present old one with the same name)
236
- */
237
- createBranch(name: string, source: Branch, options?: any): Promise<Branch>;
238
- /**
239
- * Add a new {@link Branch}.
240
- * Internal branch creation does not call repository.initialize()
241
- * @param {string} name of the new branch
242
- * @param {Object} [options] to be passed to the branch
243
- * @return {Branch} newly created branch or already present one for the given name
244
- */
245
- addBranch(name: string, options?: any): Branch;
246
- _addBranch(branch: any): void;
247
- /**
248
- * Delete a {@link Branch}.
249
- * @param {string} name of the branch
250
- * @return {Promise<any>}
251
- */
252
- deleteBranch(name: string): Promise<any>;
253
- /**
254
- * Get a Tag.
255
- * @param {string} name
256
- * @return {Promise<Tag>}
257
- */
258
- tag(name: string): Promise<Tag>;
259
- /**
260
- * @param {string[]|string} [patterns]
261
- * @return {AsyncGenerator<Tag>} of all tags
262
- */
263
- tags(patterns?: string[] | string): AsyncGenerator<Tag>;
264
- /**
265
- * Add a new {@link Tag}.
266
- * Internal tag creation does not call repository.initialize()
267
- * @param {string} name of the new tag
268
- * @param {Object} [options]
269
- * @return {Tag} newly created tag
270
- */
271
- addTag(name: string, options?: any): Tag;
272
- _addTag(tag: any): void;
273
- /**
274
- * Create a pull request (or deliver an already present for the given name).
275
- * @param {string} name of the pr
276
- * @param {Branch} source branch
277
- * @param {Object} [options]
278
- * @return {Promise<PullRequest>}
279
- */
280
- createPullRequest(name: string, source: Branch, options?: any): Promise<PullRequest>;
281
- /**
282
- * Add a pull request.
283
- * @param {string} name
284
- * @param {Branch} source
285
- * @param {Object} [options]
286
- * @return {PullRequest}
287
- */
288
- addPullRequest(name: string, source: Branch, options?: any): PullRequest;
289
- _addPullRequest(pr: any): void;
290
- /**
291
- * Deliver all {@link PullRequest}s.
292
- * @return {AsyncGenerator<PullRequest>} of all pull requests
293
- */
294
- pullRequests(): AsyncGenerator<PullRequest>;
295
- /**
296
- * The @see {@link PullRequest} for a given name.
297
- * @param {string} name
298
- * @return {Promise<PullRequest|undefined>}
299
- */
300
- pullRequest(name: string): Promise<PullRequest | undefined>;
301
- /**
302
- * Delete a {@link PullRequest}.
303
- * @param {string} name
304
- * @return {Promise<any>}
305
- */
306
- deletePullRequest(name: string): Promise<any>;
307
- /**
308
- * Add a new {@link Hook}.
309
- * @param {string} name of the new hoook name
310
- * @param {Object} [options]
311
- * @return {Hook} newly created hook
312
- */
313
- addHook(name: string, options?: any): Hook;
314
- _addHook(hook: any): void;
315
- /**
316
- * Add a new Hook.
317
- * @param {Hook} hook
318
- */
319
- createHook(hook: Hook): Promise<void>;
320
- /**
321
- * List hooks.
322
- * @return {AsyncGenerator<Hook>} all hooks of the repository
323
- */
324
- hooks(): AsyncGenerator<Hook>;
325
- /**
326
- * Get a Hook.
327
- * @param {string|number} id
328
- * @return {Promise<Hook|undefined>} for the given id
329
- */
330
- hook(id: string | number): Promise<Hook | undefined>;
331
- _addMilestone(milestone: any): void;
332
- /**
333
- * Get a Milestone.
334
- * @param {string} name
335
- * @return {Promise<Milestone|undefined>} for the given name
336
- */
337
- milestone(name: string): Promise<Milestone | undefined>;
338
- _addProject(project: any): void;
339
- /**
340
- * Get a Project.
341
- * @param {string} name
342
- * @return {Promise<Project|undefined>} for the given name
343
- */
344
- project(name: string): Promise<Project | undefined>;
345
- _addApplication(application: any): void;
346
- /**
347
- * Get an Application.
348
- * @param {string} name
349
- * @return {Promise<Application|undefined>} for the given name
350
- */
351
- application(name: string): Promise<Application | undefined>;
352
- /**
353
- * Get type of the repository.
354
- * @return {string} 'git'
355
- */
356
- get type(): string;
357
- /**
358
- * Get sha of a ref.
359
- * @param {string} ref
360
- * @return {Promise<string|undefined>} sha of the ref
361
- */
362
- refId(ref: string): Promise<string | undefined>;
363
- initialize(): void;
364
- initializeHooks(): void;
365
- initializeBranches(): void;
366
- initializeTags(): void;
367
- initializePullRequests(): Promise<void>;
368
- #private;
369
- }
370
- import { OwnedObject } from "./owned-object.mjs";
371
- import { ContentEntry } from "content-entry";
372
- import { Commit } from "./commit.mjs";
373
- import { Branch } from "./branch.mjs";
374
- import { Tag } from "./tag.mjs";
375
- import { PullRequest } from "./pull-request.mjs";
376
- import { Hook } from "./hook.mjs";
377
- import { Milestone } from "./milestone.mjs";
378
- import { Project } from "./project.mjs";
379
- import { Application } from "./application.mjs";
380
- import { RepositoryOwner } from "./repository-owner.mjs";
@@ -1,6 +0,0 @@
1
- /**
2
- *
3
- */
4
- export class Review extends OwnedObject {
5
- }
6
- import { OwnedObject } from "./owned-object.mjs";
@@ -1,57 +0,0 @@
1
- declare const SingleGroupProvider_base: {
2
- new (): {
3
- [x: string]: any;
4
- #repositories: Map<any, any>;
5
- normalizeRepositoryName(name: string, forLookup: boolean): string;
6
- repository(name?: string): Promise<Repository | undefined>;
7
- repositories(patterns?: string[] | string): AsyncIterable<Repository>;
8
- lookup(type: string, name?: string, split?: Function, defaultItem?: any): Promise<import("./owned-object.mjs").OwnedObject | undefined>;
9
- list(type: string, patterns?: string[] | string, split?: Function, defaultItem?: any): AsyncIterable<import("./owned-object.mjs").OwnedObject>;
10
- createRepository(name: string, options?: any): Promise<Repository>;
11
- addRepository(name: string, options?: any): Promise<Repository>;
12
- _addRepository(repository: any): void;
13
- deleteRepository(name: string): Promise<any>;
14
- initializeRepositories(): void;
15
- branch(name: string): Promise<import("./branch.mjs").Branch | undefined>;
16
- branches(patterns?: string[] | string): AsyncIterable<import("./branch.mjs").Branch>;
17
- tag(name: any): Promise<import("./owned-object.mjs").OwnedObject>;
18
- tags(patterns: any): AsyncGenerator<import("./owned-object.mjs").OwnedObject, void, any>;
19
- pullRequest(name: any): Promise<import("./owned-object.mjs").OwnedObject>;
20
- pullRequests(patterns: any): AsyncGenerator<import("./owned-object.mjs").OwnedObject, void, any>;
21
- project(name: any): Promise<import("./owned-object.mjs").OwnedObject>;
22
- projects(patterns: any): AsyncGenerator<import("./owned-object.mjs").OwnedObject, void, any>;
23
- application(name: any): Promise<import("./owned-object.mjs").OwnedObject>;
24
- applications(patterns: any): AsyncGenerator<import("./owned-object.mjs").OwnedObject, void, any>;
25
- milestone(name: any): Promise<import("./owned-object.mjs").OwnedObject>;
26
- milestones(patterns: any): AsyncGenerator<import("./owned-object.mjs").OwnedObject, void, any>;
27
- hook(name: any): Promise<import("./owned-object.mjs").OwnedObject>;
28
- hooks(patterns: any): AsyncGenerator<import("./owned-object.mjs").OwnedObject, void, any>;
29
- };
30
- [x: string]: any;
31
- };
32
- /**
33
- * Provider holding a single set of repositories (no repository groups).
34
- */
35
- export class SingleGroupProvider extends SingleGroupProvider_base {
36
- /**
37
- * Lookup a repository in the provider and all of its repository groups.
38
- * @param {string} name of the repository
39
- * @return {Promise<Repository|undefined>}
40
- */
41
- repository(name: string): Promise<Repository | undefined>;
42
- /**
43
- * Get a single group.
44
- * @param {string} name
45
- * @return {Promise<RepositoryGroup|undefined>} deliver the one and only present group
46
- */
47
- repositoryGroup(name: string): Promise<RepositoryGroup | undefined>;
48
- /**
49
- * List groups.
50
- * @param {string[]|string|undefined} patterns
51
- * @return {AsyncIterable<RepositoryGroup>} always deliver the one and only present group
52
- */
53
- repositoryGroups(patterns: string[] | string | undefined): AsyncIterable<RepositoryGroup>;
54
- }
55
- import { Repository } from "./repository.mjs";
56
- import { RepositoryGroup } from "./repository-group.mjs";
57
- export {};
package/types/tag.d.mts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * Tag refs
3
- */
4
- export class Tag extends Ref {
5
- }
6
- import { Ref } from "./ref.mjs";
package/types/util.d.mts DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- * Convert scalar into an array.
3
- * The value undefined will be represented as an empty array.
4
- * @param {Array|any} value
5
- * @return {Array} value encapsulated in an array
6
- */
7
- export function asArray(value: any[] | any): any[];
8
- /**
9
- * Strip repository base name away.
10
- * A URL auth component will be removed to.
11
- * @param {string|undefined} name
12
- * @param {string[]} repositoryBases all possible bases
13
- * @param {function(string):void} [whenFound] to be called with the found base name
14
- * @return {string|undefined} name without base
15
- */
16
- export function stripBaseName(name: string | undefined, repositoryBases: string[], whenFound?: (arg0: string) => void): string | undefined;
17
- /**
18
- * Loops over names and executes stripBaseName.
19
- * @param {string[]|string|undefined} names
20
- * @param {string[]} repositoryBases all possible bases
21
- * @param {function(string):void} [whenFound] to be called with the found base name
22
- * @return {string[]|string|undefined} names without base
23
- */
24
- export function stripBaseNames(names: string[] | string | undefined, repositoryBases: string[], whenFound?: (arg0: string) => void): string[] | string | undefined;
25
- /**
26
- * Find a new branch name for a given pattern.
27
- * '*' will be replaced by a number.
28
- * 'something/*' will get to something/1 something/2 ...
29
- * @param {Repository} repository
30
- * @param {string} pattern
31
- * @return {Promise<string>}
32
- */
33
- export function generateBranchName(repository: Repository, pattern: string): Promise<string>;
34
- import { Repository } from "./repository.mjs";