repository-provider-cli-support 3.0.0 → 3.0.2

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
@@ -8,7 +8,6 @@
8
8
  [![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
9
9
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
10
10
  [![Known Vulnerabilities](https://snyk.io/test/github/arlac77/repository-provider-cli-support/badge.svg)](https://snyk.io/test/github/arlac77/repository-provider-cli-support)
11
- [![Coverage Status](https://coveralls.io/repos/arlac77/repository-provider-cli-support/badge.svg)](https://coveralls.io/github/arlac77/repository-provider-cli-support)
12
11
 
13
12
  # repository-provider-cli-support
14
13
  helper functions for repository-provider cli apps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider-cli-support",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -41,12 +41,13 @@
41
41
  "levelup": "^5.1.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@types/node": "^24.10.1",
44
+ "@types/node": "^25.0.2",
45
45
  "ava": "^6.4.1",
46
46
  "c8": "^10.1.3",
47
47
  "commander": "^14.0.2",
48
48
  "documentation": "^14.0.3",
49
- "github-repository-provider": "^10.0.4",
49
+ "gitea-repository-provider": "^5.0.4",
50
+ "github-repository-provider": "^10.0.6",
50
51
  "semantic-release": "^25.0.2",
51
52
  "typescript": "^5.9.3"
52
53
  },
@@ -17,7 +17,7 @@ async function createCache() {
17
17
  return new ETagCacheLevelDB(db);
18
18
  }
19
19
 
20
- const httpsAgent = new Agent({ keepAlive: true });
20
+ const httpsAgent = new Agent({ keepAlive: true, noDelay: true });
21
21
 
22
22
  /**
23
23
  *
@@ -43,10 +43,12 @@ export async function initializeRepositoryProvider(program, properties) {
43
43
  let cache;
44
44
  if (options.cache) {
45
45
  cache = await createCache();
46
- provider._providers.forEach(p => (p.cache = cache));
47
46
  }
48
47
 
49
- provider._providers.forEach(p => (p.agent = url => httpsAgent));
48
+ provider._providers.forEach(p => {
49
+ p.agent = url => httpsAgent;
50
+ p.cache = cache;
51
+ });
50
52
 
51
53
  return { provider, options, cache };
52
54
  }
@@ -63,8 +65,8 @@ export function initializeCommandLine(program) {
63
65
 
64
66
  /**
65
67
  * Retrieve repository url from a directory.
66
- * @param {string} dir
67
- * @returns {string?}
68
+ * @param {string} dir
69
+ * @returns {Promise<string|undefined>}
68
70
  */
69
71
  export async function repositoryUrl(dir) {
70
72
  const cfg = await readFile(join(dir, ".git", "config"), "utf8");
@@ -17,7 +17,7 @@ export function initializeCommandLine(program: any): void;
17
17
  /**
18
18
  * Retrieve repository url from a directory.
19
19
  * @param {string} dir
20
- * @returns {string?}
20
+ * @returns {Promise<string|undefined>}
21
21
  */
22
- export function repositoryUrl(dir: string): string | null;
22
+ export function repositoryUrl(dir: string): Promise<string | undefined>;
23
23
  import { ETagCacheLevelDB } from "etag-cache-leveldb";