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,51 +0,0 @@
1
- /**
2
- * Provider supporting serveral repository groups.
3
- *
4
- */
5
- export class MultiGroupProvider extends BaseProvider {
6
- /**
7
- * Lookup a repository in the provider and all of its repository groups.
8
- * @param {string} name of the repository
9
- * @return {Promise<Repository|undefined>}
10
- */
11
- repository(name: string): Promise<Repository | undefined>;
12
- /**
13
- * Lookup a branch.
14
- * @param {string} name of the branch
15
- * @return {Promise<Branch|undefined>}
16
- */
17
- branch(name: string): Promise<Branch | undefined>;
18
- /**
19
- * Lookup a repository group.
20
- * @param {string} name of the group
21
- * @return {Promise<RepositoryGroup|undefined>}
22
- */
23
- repositoryGroup(name: string): Promise<RepositoryGroup | undefined>;
24
- /**
25
- * List groups.
26
- * @param {string[]|string} [patterns]
27
- * @return {AsyncIterable<RepositoryGroup>} all matching repositories groups of the provider
28
- */
29
- repositoryGroups(patterns?: string[] | string): AsyncIterable<RepositoryGroup>;
30
- /**
31
- * Create a new repository group.
32
- * If there is already a group for the given name it will be returend instead
33
- * @param {string} name of the group
34
- * @param {Object} [options]
35
- * @return {Promise<RepositoryGroup>}
36
- */
37
- createRepositoryGroup(name: string, options?: any): Promise<RepositoryGroup>;
38
- /**
39
- * Add a new repository group (not provider specific actions are executed).
40
- * @param {string} name of the group
41
- * @param {Object} [options]
42
- * @return {RepositoryGroup}
43
- */
44
- addRepositoryGroup(name: string, options?: any): RepositoryGroup;
45
- _addRepositoryGroup(repositoryGroup: any): void;
46
- #private;
47
- }
48
- import { BaseProvider } from "./base-provider.mjs";
49
- import { Repository } from "./repository.mjs";
50
- import { Branch } from "./branch.mjs";
51
- import { RepositoryGroup } from "./repository-group.mjs";
@@ -1,46 +0,0 @@
1
- /**
2
- * Object with a name.
3
- * @param {string} name
4
- * @param {Object} [options]
5
- * @param {string} [options.id]
6
- * @param {string} [options.name]
7
- * @param {string} [options.description]
8
- * @param {Object} [additionalProperties]
9
- *
10
- * @property {string} name
11
- */
12
- export class NamedObject extends BaseObject {
13
- static attributes: {
14
- name: import("pacc").AttributeDefinition;
15
- id: import("pacc").AttributeDefinition;
16
- description: import("pacc").AttributeDefinition;
17
- };
18
- constructor(name: any, options: any);
19
- name: any;
20
- /**
21
- * Beautified name use for human displaying only.
22
- * @return {string} human readable name
23
- */
24
- get displayName(): string;
25
- /**
26
- * Name with default parts removed
27
- * @return {string}
28
- */
29
- get condensedName(): string;
30
- /**
31
- * Complete name in the hierachy.
32
- * @return {string}
33
- */
34
- get fullCondensedName(): string;
35
- /**
36
- * Check for equality.
37
- * @param {NamedObject} other
38
- * @return {boolean} true if names are equal and have the same provider
39
- */
40
- equals(other: NamedObject): boolean;
41
- /**
42
- * Provided name and all defined attributes.
43
- */
44
- toJSON(filter: any): any;
45
- }
46
- import { BaseObject } from "./base-object.mjs";
@@ -1,113 +0,0 @@
1
- /**
2
- * @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
3
- * @typedef {import('./repository.mjs').Repository} Repository
4
- */
5
- /**
6
- * Named Object registering itself in the owner.
7
- */
8
- export class OwnedObject extends NamedObject {
9
- /**
10
- * Method name to be called to register one instance in the owner.
11
- * sample: Application => _addApplication
12
- * @return {string}
13
- */
14
- static get addMethodName(): string;
15
- /**
16
- * Method name to be called to unregister one instance in the owner.
17
- * sample: Application => _deleteApplication
18
- * @return {string}
19
- */
20
- static get deleteMethodName(): string;
21
- constructor(owner: any, name: any, options: any);
22
- owner: any;
23
- /**
24
- * Removes the receiver from the owner.
25
- */
26
- delete(): void;
27
- /**
28
- * Check for equality.
29
- * @param {OwnedObject} other
30
- * @return {boolean} true if receiver and owner are equal
31
- */
32
- equals(other: OwnedObject): boolean;
33
- /**
34
- * Url of home page.
35
- * @see {@link Repository#homePageURL}
36
- * @return {string|undefined} as provided from the owner
37
- */
38
- get homePageURL(): string | undefined;
39
- /**
40
- * Url of issue tracking system.
41
- * @see {@link Repository#issuesURL}
42
- * @return {string|undefined} as provided from the repository
43
- */
44
- get issuesURL(): string | undefined;
45
- /**
46
- * Forwarded from the owner.
47
- * @return {boolean}
48
- */
49
- get isLocked(): boolean;
50
- /**
51
- * Forwarded from the owner.
52
- * @return {boolean}
53
- */
54
- get isArchived(): boolean;
55
- /**
56
- * Forwarded from the owner.
57
- * @return {boolean}
58
- */
59
- get isDisabled(): boolean;
60
- /**
61
- * API as given by the owner.
62
- * @return {string} url
63
- */
64
- get api(): string;
65
- /**
66
- * API as given by the owner.
67
- * @return {string} url
68
- */
69
- get slug(): string;
70
- /**
71
- * URL as given by the owner.
72
- * @return {string} url
73
- */
74
- get url(): string;
75
- /**
76
- * The provider we live in.
77
- * @return {BaseProvider}
78
- */
79
- get provider(): BaseProvider;
80
- /**
81
- * Forwarded to the owner.
82
- * @param {...any} args
83
- */
84
- trace(...args: any[]): any;
85
- /**
86
- * Forwarded to the owner.
87
- * @param {...any} args
88
- */
89
- info(...args: any[]): any;
90
- /**
91
- * Forwarded to the owner.
92
- * @param {...any} args
93
- */
94
- warn(...args: any[]): any;
95
- /**
96
- * Forwarded to the owner.
97
- * @param {...any} args
98
- */
99
- error(...args: any[]): any;
100
- /**
101
- * Forwarded to the owner.
102
- * @param {...any} args
103
- */
104
- debug(...args: any[]): any;
105
- get repositoryClass(): any;
106
- get pullRequestClass(): any;
107
- get branchClass(): any;
108
- get tagClass(): any;
109
- get hookClass(): any;
110
- }
111
- export type BaseProvider = import("./base-provider.mjs").BaseProvider;
112
- export type Repository = import("./repository.mjs").Repository;
113
- import { NamedObject } from "./named-object.mjs";
@@ -1,6 +0,0 @@
1
- /**
2
- *
3
- */
4
- export class Project extends OwnedObject {
5
- }
6
- import { OwnedObject } from "./owned-object.mjs";
@@ -1,149 +0,0 @@
1
- /**
2
- * Abstract pull request.
3
- * {@link Repository#addPullRequest}
4
- * @param {Branch} source merge source
5
- * @param {Branch} owner merge target
6
- * @param {string} name
7
- * @param {Object} [options]
8
- * @param {string} [options.title]
9
- * @param {string} [options.state]
10
- * @param {boolean} [options.merged]
11
- * @param {boolean} [options.locked]
12
-
13
- * @property {string} name
14
- * @property {Branch} source
15
- * @property {Branch} destination
16
- * @property {string} [title]
17
- * @property {string} [state]
18
- * @property {boolean} [merged]
19
- * @property {boolean} [locked]
20
- * @property {string} url
21
- */
22
- export class PullRequest extends OwnedObject {
23
- /**
24
- * States to list pull request by default
25
- * @return {Set<string>} states to list by default
26
- */
27
- static defaultListStates: Set<string>;
28
- /**
29
- * possible states
30
- * @enum {string}
31
- */
32
- static states: Set<string>;
33
- /**
34
- * All valid merge methods
35
- * @return {Set<string>} valid merge methods.
36
- * @enum {string}
37
- */
38
- static validMergeMethods: Set<any>;
39
- /**
40
- * List all pull request for a given repo.
41
- * Result will be filtered by source branch, destination branch and states
42
- * @param {Repository} repository
43
- * @param {Object} [filter]
44
- * @param {Branch?} [filter.source]
45
- * @param {Branch?} [filter.destination]
46
- * @param {Set<string>} [filter.states]
47
- * @return {AsyncIterable<PullRequest>}
48
- */
49
- static list(repository: Repository, filter?: {
50
- source?: Branch | null;
51
- destination?: Branch | null;
52
- states?: Set<string>;
53
- }): AsyncIterable<PullRequest>;
54
- /**
55
- * Open a pull request
56
- *
57
- * @param {Branch} source
58
- * @param {Branch} destination
59
- * @param {Object} [options]
60
- */
61
- static open(source: Branch, destination: Branch, options?: any): Promise<PullRequest>;
62
- static attributes: {
63
- body: import("pacc").AttributeDefinition;
64
- title: import("pacc").AttributeDefinition;
65
- url: import("pacc").AttributeDefinition;
66
- /**
67
- * state of the pull request.
68
- * - OPEN
69
- * - MERGED
70
- * - CLOSED
71
- * @return {string}
72
- */
73
- state: {
74
- default: string;
75
- values: Set<string>;
76
- type: object;
77
- isKey: boolean;
78
- writable: boolean;
79
- mandatory: boolean;
80
- collection: boolean;
81
- private?: boolean;
82
- depends?: string;
83
- description?: string;
84
- set?: Function;
85
- get?: Function;
86
- prepareValue?: Function;
87
- externalName?: string;
88
- env?: string[] | string;
89
- additionalValues?: object;
90
- };
91
- /**
92
- * Locked state of the pull request.
93
- * @return {boolean}
94
- */
95
- locked: import("pacc").AttributeDefinition;
96
- /**
97
- * Merged state of the pull request.
98
- * @return {boolean}
99
- */
100
- merged: import("pacc").AttributeDefinition;
101
- /**
102
- * Draft state of the pull request.
103
- * @return {boolean}
104
- */
105
- draft: import("pacc").AttributeDefinition;
106
- dry: import("pacc").AttributeDefinition;
107
- empty: import("pacc").AttributeDefinition;
108
- name: import("pacc").AttributeDefinition;
109
- id: import("pacc").AttributeDefinition;
110
- description: import("pacc").AttributeDefinition;
111
- };
112
- constructor(source: any, owner: any, name: any, options: any);
113
- /** @type {Branch} */ source: Branch;
114
- _state: string;
115
- set state(value: string);
116
- get state(): string;
117
- set merged(value: boolean);
118
- get merged(): boolean;
119
- get destination(): any;
120
- get number(): any;
121
- get dry(): boolean;
122
- /**
123
- * @return {Repository} destination repository
124
- */
125
- get repository(): Repository;
126
- /**
127
- * Delete the pull request from the {@link Repository}.
128
- * @see {@link Repository#deletePullRequest}
129
- * @return {Promise}
130
- */
131
- delete(): Promise<any>;
132
- /**
133
- * Merge the pull request.
134
- * @param {string} method
135
- */
136
- merge(method?: string): Promise<void>;
137
- /**
138
- * Decline the pull request.
139
- */
140
- decline(): Promise<void>;
141
- /**
142
- * @return {AsyncIterable<Review>}
143
- */
144
- reviews(): AsyncIterable<Review>;
145
- }
146
- import { OwnedObject } from "./owned-object.mjs";
147
- import { Branch } from "./branch.mjs";
148
- import { Repository } from "./repository.mjs";
149
- import { Review } from "./review.mjs";
package/types/ref.d.mts DELETED
@@ -1,68 +0,0 @@
1
- /**
2
- * @typedef {import('./repository.mjs').Repository} Repository
3
- */
4
- /**
5
- * Base for Branch and Tag
6
- */
7
- export class Ref extends OwnedObject {
8
- /**
9
- * Attributes
10
- * @type {Object}
11
- */
12
- static attributes: any;
13
- get refType(): string;
14
- /**
15
- * Full ref path.
16
- * @return {string} git ref of the Ref
17
- */
18
- get ref(): string;
19
- /**
20
- * Get sha of our ref.
21
- * @return {Promise<string>} sha of the ref
22
- */
23
- get refId(): Promise<string>;
24
- /**
25
- * List entries of the branch.
26
- * @param {string[]|string} [matchingPatterns]
27
- * @return {AsyncGenerator<ContentEntry>} all matching entries in the branch
28
- */
29
- entries(matchingPatterns?: string[] | string): AsyncGenerator<ContentEntry>;
30
- /**
31
- * Get exactly one matching entry by name or undefine if no such entry is found.
32
- * @param {string} name
33
- * @return {Promise<ContentEntry|undefined>}
34
- */
35
- maybeEntry(name: string): Promise<ContentEntry | undefined>;
36
- /**
37
- * Get exactly one matching entry by name (throws if entry is not found).
38
- * @param {string} name
39
- * @return {Promise<ContentEntry>}
40
- */
41
- entry(name: string): Promise<ContentEntry>;
42
- /**
43
- * Ref owner.
44
- * By default we provide the repository owner
45
- * @see {@link Repository#owner}
46
- * @return {Repository}
47
- */
48
- get repository(): Repository;
49
- get identifier(): any;
50
- /**
51
- *
52
- * @return false
53
- */
54
- get isProtected(): boolean;
55
- /**
56
- * Are we the default ref.
57
- * @return {boolean} false
58
- */
59
- get isDefault(): boolean;
60
- /**
61
- * List all entries of the branch.
62
- * @return {AsyncGenerator<ContentEntry>} all entries in the branch
63
- */
64
- [Symbol.asyncIterator](): AsyncGenerator<ContentEntry>;
65
- }
66
- export type Repository = import("./repository.mjs").Repository;
67
- import { OwnedObject } from "./owned-object.mjs";
68
- import { ContentEntry } from "content-entry";
@@ -1,55 +0,0 @@
1
- declare const RepositoryGroup_base: {
2
- new (): {
3
- [x: string]: any;
4
- #repositories: Map<any, any>;
5
- normalizeRepositoryName(name: string, forLookup: boolean): string;
6
- repository(name?: string): Promise<import("./repository.mjs").Repository | undefined>;
7
- repositories(patterns?: string[] | string): AsyncIterable<import("./repository.mjs").Repository>;
8
- lookup(type: string, name?: string, split?: Function, defaultItem?: any): Promise<OwnedObject | undefined>;
9
- list(type: string, patterns?: string[] | string, split?: Function, defaultItem?: any): AsyncIterable<OwnedObject>;
10
- createRepository(name: string, options?: any): Promise<import("./repository.mjs").Repository>;
11
- addRepository(name: string, options?: any): Promise<import("./repository.mjs").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<OwnedObject>;
18
- tags(patterns: any): AsyncGenerator<OwnedObject, void, any>;
19
- pullRequest(name: any): Promise<OwnedObject>;
20
- pullRequests(patterns: any): AsyncGenerator<OwnedObject, void, any>;
21
- project(name: any): Promise<OwnedObject>;
22
- projects(patterns: any): AsyncGenerator<OwnedObject, void, any>;
23
- application(name: any): Promise<OwnedObject>;
24
- applications(patterns: any): AsyncGenerator<OwnedObject, void, any>;
25
- milestone(name: any): Promise<OwnedObject>;
26
- milestones(patterns: any): AsyncGenerator<OwnedObject, void, any>;
27
- hook(name: any): Promise<OwnedObject>;
28
- hooks(patterns: any): AsyncGenerator<OwnedObject, void, any>;
29
- };
30
- [x: string]: any;
31
- };
32
- /**
33
- * Abstract repository collection.
34
- * @param {BaseProvider} provider
35
- * @param {string} name of the group
36
- * @param {Object} [options]
37
- * @param {string} [options.description] human readable description
38
- * @param {string} [options.id] internal id
39
- * @param {string} [options.url] home
40
- *
41
- * @property {BaseProvider} provider
42
- * @property {string} name
43
- */
44
- export class RepositoryGroup extends RepositoryGroup_base {
45
- static get addMethodName(): string;
46
- static get deleteMethodName(): string;
47
- static get type(): string;
48
- static get collectionName(): string;
49
- static attributes: any;
50
- get isAdmin(): boolean;
51
- get areRepositoryNamesCaseSensitive(): any;
52
- get areRepositoryGroupNamesCaseSensitive(): any;
53
- }
54
- import { OwnedObject } from "./owned-object.mjs";
55
- export {};
@@ -1,103 +0,0 @@
1
- /**
2
- * Mixin to define a class able to handle a collection of repositories.
3
- * @param {Object} base to be extendet
4
- */
5
- export function RepositoryOwner(base: any): {
6
- new (): {
7
- [x: string]: any;
8
- #repositories: Map<any, any>;
9
- /**
10
- * Normalizes a repository name.
11
- * Strips branch away.
12
- * @param {string} name
13
- * @param {boolean} forLookup
14
- * @return {string} normalized name
15
- */
16
- normalizeRepositoryName(name: string, forLookup: boolean): string;
17
- /**
18
- * Lookup a repository.
19
- * @param {string} [name] of the repository may contain a #branch
20
- * @return {Promise<Repository|undefined>}
21
- */
22
- repository(name?: string): Promise<Repository | undefined>;
23
- /**
24
- * List repositories for the owner.
25
- * @param {string[]|string} [patterns]
26
- * @return {AsyncIterable<Repository>} all matching repositories of the owner
27
- */
28
- repositories(patterns?: string[] | string): AsyncIterable<Repository>;
29
- /**
30
- * Lookup entity of a given type and name.
31
- * @param {string} type
32
- * @param {string} [name]
33
- * @param {function} [split]
34
- * @param {Object} [defaultItem]
35
- * @returns {Promise<OwnedObject|undefined>} from a repository
36
- */
37
- lookup(type: string, name?: string, split?: Function, defaultItem?: any): Promise<OwnedObject | undefined>;
38
- /**
39
- * List entities for a given type and pattern.
40
- * @param {string} type
41
- * @param {string[]|string} [patterns]
42
- * @param {function} [split]
43
- * @param {Object} [defaultItem]
44
- * @return {AsyncIterable<OwnedObject>} matching type and pattern
45
- */
46
- list(type: string, patterns?: string[] | string, split?: Function, defaultItem?: any): AsyncIterable<OwnedObject>;
47
- /**
48
- * Create a new {@link Repository} in the provider.
49
- * If there is already if repository for the given name it will be returned.
50
- * @param {string} name
51
- * @param {Object} [options]
52
- * @return {Promise<Repository>} newly created repository (if not already present)
53
- */
54
- createRepository(name: string, options?: any): Promise<Repository>;
55
- /**
56
- * Add a {@link Repository} to the group.
57
- * Only adds the repository to the in memory representation (does not execute any provider actions).
58
- * @param {string} name
59
- * @param {Object} [options]
60
- * @return {Promise<Repository>} newly created repository
61
- */
62
- addRepository(name: string, options?: any): Promise<Repository>;
63
- _addRepository(repository: any): void;
64
- /**
65
- * Delete a repository.
66
- * @param {string} name
67
- * @return {Promise<any>}
68
- */
69
- deleteRepository(name: string): Promise<any>;
70
- initializeRepositories(): void;
71
- /**
72
- * Lookup a branch.
73
- * First lookup repository then the branch.
74
- * If no branch was specified then the default branch will be delivered.
75
- * @see {@link Repository#defaultBranch}
76
- * @param {string} name with optional branch name as '#myBranchName'
77
- * @return {Promise<Branch|undefined>}
78
- */
79
- branch(name: string): Promise<Branch | undefined>;
80
- /**
81
- * List branches for the owner.
82
- * @param {string[]|string} [patterns]
83
- * @return {AsyncIterable<Branch>} all matching branches of the owner
84
- */
85
- branches(patterns?: string[] | string): AsyncIterable<Branch>;
86
- tag(name: any): Promise<OwnedObject>;
87
- tags(patterns: any): AsyncGenerator<OwnedObject, void, any>;
88
- pullRequest(name: any): Promise<OwnedObject>;
89
- pullRequests(patterns: any): AsyncGenerator<OwnedObject, void, any>;
90
- project(name: any): Promise<OwnedObject>;
91
- projects(patterns: any): AsyncGenerator<OwnedObject, void, any>;
92
- application(name: any): Promise<OwnedObject>;
93
- applications(patterns: any): AsyncGenerator<OwnedObject, void, any>;
94
- milestone(name: any): Promise<OwnedObject>;
95
- milestones(patterns: any): AsyncGenerator<OwnedObject, void, any>;
96
- hook(name: any): Promise<OwnedObject>;
97
- hooks(patterns: any): AsyncGenerator<OwnedObject, void, any>;
98
- };
99
- [x: string]: any;
100
- };
101
- import { Repository } from "./repository.mjs";
102
- import { OwnedObject } from "./owned-object.mjs";
103
- import { Branch } from "./branch.mjs";