repository-provider 35.2.15 → 35.2.17

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.
package/README.md CHANGED
@@ -894,7 +894,7 @@ Returns **[BaseProvider](#baseprovider)** this
894
894
 
895
895
  List all defined entries from attributes.
896
896
 
897
- Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
897
+ Returns **{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}** 
898
898
 
899
899
  ### instanceIdentifier
900
900
 
@@ -1145,7 +1145,7 @@ Returns **[BaseProvider](#baseprovider)** this
1145
1145
 
1146
1146
  List all defined entries from attributes.
1147
1147
 
1148
- Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
1148
+ Returns **{name: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}** 
1149
1149
 
1150
1150
  ### instanceIdentifier
1151
1151
 
@@ -1197,11 +1197,11 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
1197
1197
 
1198
1198
  ### Properties
1199
1199
 
1200
- * `info` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
1201
- * `debug` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
1202
- * `warn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
1203
- * `error` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
1204
- * `trace` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
1200
+ * `info` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void** 
1201
+ * `debug` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void** 
1202
+ * `warn` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void** 
1203
+ * `error` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void** 
1204
+ * `trace` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void** 
1205
1205
 
1206
1206
  ## name
1207
1207
 
@@ -2608,7 +2608,7 @@ A URL auth component will be removed to.
2608
2608
 
2609
2609
  * `name` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** 
2610
2610
  * `repositoryBases` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** all possible bases
2611
- * `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
2611
+ * `whenFound` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void?** to be called with the found base name
2612
2612
 
2613
2613
  Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** name without base
2614
2614
 
@@ -2620,7 +2620,7 @@ Loops over names and executes stripBaseName.
2620
2620
 
2621
2621
  * `names` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))**&#x20;
2622
2622
  * `repositoryBases` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** all possible bases
2623
- * `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
2623
+ * `whenFound` **function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)): void?** to be called with the found base name
2624
2624
 
2625
2625
  Returns **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** names without base
2626
2626
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "35.2.15",
3
+ "version": "35.2.17",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -25,32 +25,33 @@
25
25
  ],
26
26
  "license": "BSD-2-Clause",
27
27
  "scripts": {
28
- "prepare": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs",
28
+ "prepare": "npm run prepare:typescript",
29
+ "prepare:typescript": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types --resolveJsonModule -t esnext -m esnext --module nodenext --moduleResolution nodenext --rootDir src ./src**/*.mjs",
29
30
  "test": "npm run test:browser-ava && npm run test:ava",
30
31
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
31
32
  "test:browser-ava": "browser-ava --headless --no-keep-open tests/*-ava.mjs tests/*-ava-browser.mjs",
32
33
  "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
33
34
  "docs": "documentation readme --section=API ./src/**/*.mjs",
34
- "lint": "npm run lint:docs && npm run lint:tsc",
35
+ "lint": "npm run lint:docs && npm run lint:typescript",
35
36
  "lint:docs": "documentation lint ./src/**/*.mjs",
36
- "lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
37
+ "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
37
38
  },
38
39
  "dependencies": {
39
- "content-entry": "^9.0.1",
40
+ "content-entry": "^11.0.0",
40
41
  "matching-iterator": "^2.1.3",
41
- "pacc": "^3.1.5"
42
+ "pacc": "^3.1.7"
42
43
  },
43
44
  "devDependencies": {
44
- "ava": "^6.1.2",
45
- "browser-ava": "^2.2.2",
45
+ "ava": "^6.1.3",
46
+ "browser-ava": "^2.2.14",
46
47
  "c8": "^9.1.0",
47
48
  "documentation": "^14.0.3",
48
49
  "repository-provider-test-support": "^3.1.4",
49
- "semantic-release": "^23.0.2",
50
- "typescript": "^5.3.3"
50
+ "semantic-release": "^24.0.0",
51
+ "typescript": "^5.4.5"
51
52
  },
52
53
  "engines": {
53
- "node": ">=20.11.1"
54
+ "node": ">=20.12.2"
54
55
  },
55
56
  "repository": {
56
57
  "type": "git",
@@ -62,13 +62,16 @@ export class BaseObject {
62
62
  return {};
63
63
  }
64
64
 
65
+ /** @type {string} */ id;
66
+ /** @type {string} */ description;
67
+
65
68
  /**
66
- * Creates an instance of BaseObject.
67
- * @param {Object} [options]
68
- * @param {string} [options.id]
69
- * @param {string} [options.description]
70
- * @param {Object} [additionalProperties]
71
- */
69
+ * Creates an instance of BaseObject.
70
+ * @param {Object} [options]
71
+ * @param {string} [options.id]
72
+ * @param {string} [options.description]
73
+ * @param {Object} [additionalProperties]
74
+ */
72
75
  constructor(options, additionalProperties) {
73
76
  this.updateAttributes(options, additionalProperties);
74
77
  }
@@ -23,11 +23,11 @@ import {
23
23
  /**
24
24
  * @typedef {Object} MessageDestination
25
25
  * Endpoint to deliver log messages to.
26
- * @property {Function} info
27
- * @property {Function} debug
28
- * @property {Function} warn
29
- * @property {Function} error
30
- * @property {Function} trace
26
+ * @property {function(string):void} info
27
+ * @property {function(string):void} debug
28
+ * @property {function(string):void} warn
29
+ * @property {function(string):void} error
30
+ * @property {function(string):void} trace
31
31
  */
32
32
 
33
33
  /**
@@ -436,7 +436,7 @@ export class BaseProvider extends BaseObject {
436
436
 
437
437
  /**
438
438
  * List all defined entries from attributes.
439
- * @return {object}
439
+ * @return {{name: string}}
440
440
  */
441
441
  toJSON() {
442
442
  const json = { name: this.name };
@@ -33,7 +33,7 @@ export class NamedObject extends BaseObject {
33
33
  });
34
34
  }
35
35
 
36
- #name;
36
+ /** @type {string} */ #name;
37
37
 
38
38
  get name() {
39
39
  return this.#name;
package/src/util.mjs CHANGED
@@ -15,7 +15,7 @@ export function asArray(value) {
15
15
  * A URL auth component will be removed to.
16
16
  * @param {string|undefined} name
17
17
  * @param {string[]} repositoryBases all possible bases
18
- * @param {Function} [whenFound] to be called with the found base name
18
+ * @param {function(string):void} [whenFound] to be called with the found base name
19
19
  * @return {string|undefined} name without base
20
20
  */
21
21
  export function stripBaseName(name, repositoryBases, whenFound) {
@@ -39,7 +39,7 @@ export function stripBaseName(name, repositoryBases, whenFound) {
39
39
  * Loops over names and executes stripBaseName.
40
40
  * @param {string[]|string|undefined} names
41
41
  * @param {string[]} repositoryBases all possible bases
42
- * @param {Function} [whenFound] to be called with the found base name
42
+ * @param {function(string):void} [whenFound] to be called with the found base name
43
43
  * @return {string[]|string|undefined} names without base
44
44
  */
45
45
  export function stripBaseNames(names, repositoryBases, whenFound) {
@@ -37,16 +37,18 @@ export class BaseObject {
37
37
  */
38
38
  static get attributeMapping(): any;
39
39
  /**
40
- * Creates an instance of BaseObject.
41
- * @param {Object} [options]
42
- * @param {string} [options.id]
43
- * @param {string} [options.description]
44
- * @param {Object} [additionalProperties]
45
- */
40
+ * Creates an instance of BaseObject.
41
+ * @param {Object} [options]
42
+ * @param {string} [options.id]
43
+ * @param {string} [options.description]
44
+ * @param {Object} [additionalProperties]
45
+ */
46
46
  constructor(options?: {
47
47
  id?: string;
48
48
  description?: string;
49
49
  }, additionalProperties?: any);
50
+ /** @type {string} */ id: string;
51
+ /** @type {string} */ description: string;
50
52
  /**
51
53
  * Takes values from options.
52
54
  * @param {Object} [options]
@@ -5,11 +5,11 @@
5
5
  /**
6
6
  * @typedef {Object} MessageDestination
7
7
  * Endpoint to deliver log messages to.
8
- * @property {Function} info
9
- * @property {Function} debug
10
- * @property {Function} warn
11
- * @property {Function} error
12
- * @property {Function} trace
8
+ * @property {function(string):void} info
9
+ * @property {function(string):void} debug
10
+ * @property {function(string):void} warn
11
+ * @property {function(string):void} error
12
+ * @property {function(string):void} trace
13
13
  */
14
14
  /**
15
15
  * @param {Object} [options]
@@ -57,14 +57,6 @@ export class BaseProvider extends BaseObject {
57
57
  description?: string;
58
58
  default?: any;
59
59
  set?: Function;
60
- /**
61
- * Extract options suitable for the constructor.
62
- * Form the given set of environment variables.
63
- * Object with the detected key value pairs is delivered.
64
- * @param {Object} [env] as from process.env
65
- * @param {string} instanceIdentifier part of variable name.
66
- * @return {Object|undefined} undefined if no suitable environment variables have been found
67
- */
68
60
  get?: Function;
69
61
  };
70
62
  url: import("pacc").AttributeDefinition;
@@ -84,14 +76,6 @@ export class BaseProvider extends BaseObject {
84
76
  additionalAttributes: string[];
85
77
  description?: string;
86
78
  set?: Function;
87
- /**
88
- * Extract options suitable for the constructor.
89
- * Form the given set of environment variables.
90
- * Object with the detected key value pairs is delivered.
91
- * @param {Object} [env] as from process.env
92
- * @param {string} instanceIdentifier part of variable name.
93
- * @return {Object|undefined} undefined if no suitable environment variables have been found
94
- */
95
79
  get?: Function;
96
80
  env?: string | string[];
97
81
  };
@@ -246,9 +230,11 @@ export class BaseProvider extends BaseObject {
246
230
  get provider(): BaseProvider;
247
231
  /**
248
232
  * List all defined entries from attributes.
249
- * @return {object}
233
+ * @return {{name: string}}
250
234
  */
251
- toJSON(): object;
235
+ toJSON(): {
236
+ name: string;
237
+ };
252
238
  initializeRepositories(): void;
253
239
  trace(...args: any[]): any;
254
240
  debug(...args: any[]): any;
@@ -269,11 +255,11 @@ export type Milestone = import('./milestone.mjs').Milestone;
269
255
  * Endpoint to deliver log messages to.
270
256
  */
271
257
  export type MessageDestination = {
272
- info: Function;
273
- debug: Function;
274
- warn: Function;
275
- error: Function;
276
- trace: Function;
258
+ info: (arg0: string) => void;
259
+ debug: (arg0: string) => void;
260
+ warn: (arg0: string) => void;
261
+ error: (arg0: string) => void;
262
+ trace: (arg0: string) => void;
277
263
  };
278
264
  import { BaseObject } from "./base-object.mjs";
279
265
  import { Repository } from "./repository.mjs";
@@ -16,8 +16,8 @@ export class NamedObject extends BaseObject {
16
16
  description: import("pacc").AttributeDefinition;
17
17
  };
18
18
  constructor(name: any, options: any, additionalProperties: any);
19
- set name(name: any);
20
- get name(): any;
19
+ set name(name: string);
20
+ get name(): string;
21
21
  /**
22
22
  * Beautified name use for human displaying only.
23
23
  * @return {string} human readable name
@@ -108,7 +108,7 @@ export class PullRequest extends OwnedObject {
108
108
  };
109
109
  source: any;
110
110
  get destination(): any;
111
- get number(): any;
111
+ get number(): string;
112
112
  get dry(): boolean;
113
113
  /**
114
114
  * @return {Repository} destination repository
package/types/util.d.mts CHANGED
@@ -10,18 +10,18 @@ export function asArray(value: any[] | any): any[];
10
10
  * A URL auth component will be removed to.
11
11
  * @param {string|undefined} name
12
12
  * @param {string[]} repositoryBases all possible bases
13
- * @param {Function} [whenFound] to be called with the found base name
13
+ * @param {function(string):void} [whenFound] to be called with the found base name
14
14
  * @return {string|undefined} name without base
15
15
  */
16
- export function stripBaseName(name: string | undefined, repositoryBases: string[], whenFound?: Function): string | undefined;
16
+ export function stripBaseName(name: string | undefined, repositoryBases: string[], whenFound?: (arg0: string) => void): string | undefined;
17
17
  /**
18
18
  * Loops over names and executes stripBaseName.
19
19
  * @param {string[]|string|undefined} names
20
20
  * @param {string[]} repositoryBases all possible bases
21
- * @param {Function} [whenFound] to be called with the found base name
21
+ * @param {function(string):void} [whenFound] to be called with the found base name
22
22
  * @return {string[]|string|undefined} names without base
23
23
  */
24
- export function stripBaseNames(names: string[] | string | undefined, repositoryBases: string[], whenFound?: Function): string[] | string | undefined;
24
+ export function stripBaseNames(names: string[] | string | undefined, repositoryBases: string[], whenFound?: (arg0: string) => void): string[] | string | undefined;
25
25
  /**
26
26
  * Find a new branch name for a given pattern.
27
27
  * '*' will be replaced by a number.