github-repository-provider 9.0.9 → 9.0.11

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
@@ -42,13 +42,15 @@ console.log(entry.name);
42
42
  * [Parameters](#parameters-2)
43
43
  * [entry](#entry)
44
44
  * [Parameters](#parameters-3)
45
- * [removeEntries](#removeentries)
45
+ * [entries](#entries)
46
46
  * [Parameters](#parameters-4)
47
+ * [removeEntries](#removeentries)
48
+ * [Parameters](#parameters-5)
47
49
  * [GithubOwner](#githubowner)
48
50
  * [createRepository](#createrepository)
49
- * [Parameters](#parameters-5)
50
- * [deleteRepository](#deleterepository)
51
51
  * [Parameters](#parameters-6)
52
+ * [deleteRepository](#deleterepository)
53
+ * [Parameters](#parameters-7)
52
54
  * [attributeMapping](#attributemapping)
53
55
  * [GithubProvider](#githubprovider)
54
56
  * [Examples](#examples)
@@ -58,23 +60,23 @@ console.log(entry.name);
58
60
  * [instanceIdentifier](#instanceidentifier)
59
61
  * [GithubPullRequest](#githubpullrequest)
60
62
  * [\_merge](#_merge)
61
- * [Parameters](#parameters-7)
63
+ * [Parameters](#parameters-8)
62
64
  * [update](#update)
63
65
  * [validMergeMethods](#validmergemethods)
64
66
  * [list](#list)
65
- * [Parameters](#parameters-8)
66
- * [open](#open)
67
67
  * [Parameters](#parameters-9)
68
+ * [open](#open)
69
+ * [Parameters](#parameters-10)
68
70
  * [GithubRepository](#githubrepository)
69
71
  * [defaultBranchName](#defaultbranchname)
70
72
  * [commits](#commits)
71
- * [Parameters](#parameters-10)
72
- * [commitForSha](#commitforsha)
73
73
  * [Parameters](#parameters-11)
74
- * [tree](#tree)
74
+ * [commitForSha](#commitforsha)
75
75
  * [Parameters](#parameters-12)
76
- * [addTree](#addtree)
76
+ * [tree](#tree)
77
77
  * [Parameters](#parameters-13)
78
+ * [addTree](#addtree)
79
+ * [Parameters](#parameters-14)
78
80
  * [initializeBranches](#initializebranches)
79
81
  * [initializeTags](#initializetags)
80
82
  * [url](#url)
@@ -83,13 +85,13 @@ console.log(entry.name);
83
85
  * [api](#api)
84
86
  * [update](#update-1)
85
87
  * [refId](#refid)
86
- * [Parameters](#parameters-14)
87
- * [\_setRefId](#_setrefid)
88
88
  * [Parameters](#parameters-15)
89
- * [setRefId](#setrefid)
89
+ * [\_setRefId](#_setrefid)
90
90
  * [Parameters](#parameters-16)
91
- * [deletePullRequest](#deletepullrequest)
91
+ * [setRefId](#setrefid)
92
92
  * [Parameters](#parameters-17)
93
+ * [deletePullRequest](#deletepullrequest)
94
+ * [Parameters](#parameters-18)
93
95
  * [initializeHooks](#initializehooks)
94
96
 
95
97
  ## GithubBranch
@@ -135,13 +137,21 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
135
137
 
136
138
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
137
139
 
140
+ ### entries
141
+
142
+ #### Parameters
143
+
144
+ * `patterns` **([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))**&#x20;
145
+
146
+ Returns **AsyncGenerator\<ContentEntry>** all matching entries in the branch
147
+
138
148
  ### removeEntries
139
149
 
140
150
  <https://developer.github.com/v3/repos/contents/>
141
151
 
142
152
  #### Parameters
143
153
 
144
- * `entries` **AsyncIterator\<ContentEntry>**&#x20;
154
+ * `entries` **AsyncIterable\<ContentEntry>**&#x20;
145
155
 
146
156
  ## GithubOwner
147
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-repository-provider",
3
- "version": "9.0.9",
3
+ "version": "9.0.11",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -35,27 +35,27 @@
35
35
  "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
36
36
  },
37
37
  "dependencies": {
38
- "content-entry": "^10.0.1",
38
+ "content-entry": "^11.0.0",
39
39
  "fetch-link-util": "^1.1.1",
40
- "fetch-rate-limit-util": "^4.2.2",
40
+ "fetch-rate-limit-util": "^4.3.1",
41
41
  "matching-iterator": "^2.1.3",
42
42
  "one-time-execution-method": "^3.1.1",
43
43
  "repository-provider": "^35.2.15"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/node": "^20.11.25",
47
- "ava": "^6.1.2",
46
+ "@types/node": "^20.12.11",
47
+ "ava": "^6.1.3",
48
48
  "c8": "^9.1.0",
49
49
  "documentation": "^14.0.3",
50
50
  "etag-cache-leveldb": "^2.1.1",
51
51
  "leveldown": "^6.1.1",
52
52
  "levelup": "^5.1.1",
53
53
  "repository-provider-test-support": "^3.1.4",
54
- "semantic-release": "^23.0.2",
55
- "typescript": "^5.4.2"
54
+ "semantic-release": "^23.1.1",
55
+ "typescript": "^5.4.5"
56
56
  },
57
57
  "engines": {
58
- "node": ">=20.11.1"
58
+ "node": ">=20.12.2"
59
59
  },
60
60
  "repository": {
61
61
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  import { matcher } from "matching-iterator";
2
2
  import { Branch } from "repository-provider";
3
3
  import {
4
- BaseCollectionEntry,
4
+ CollectionEntry,
5
5
  BufferContentEntryMixin,
6
6
  ContentEntry
7
7
  } from "content-entry";
@@ -102,6 +102,11 @@ export class GithubBranch extends Branch {
102
102
  return p;
103
103
  }
104
104
 
105
+ /**
106
+ *
107
+ * @param {string[]|string} patterns
108
+ * @return {AsyncGenerator<ContentEntry>} all matching entries in the branch
109
+ */
105
110
  async *entries(patterns) {
106
111
  const commit = await this.owner.commitForSha(await this.refId);
107
112
 
@@ -115,7 +120,7 @@ export class GithubBranch extends Branch {
115
120
  switch (entry.type) {
116
121
  case "tree":
117
122
  {
118
- const e = new BaseCollectionEntry(entry.path);
123
+ const e = new CollectionEntry(entry.path);
119
124
  this.#entries.set(e.path, e);
120
125
  yield e;
121
126
  }
@@ -139,7 +144,7 @@ export class GithubBranch extends Branch {
139
144
 
140
145
  /**
141
146
  * https://developer.github.com/v3/repos/contents/
142
- * @param {AsyncIterator<ContentEntry>} entries
147
+ * @param {AsyncIterable<ContentEntry>} entries
143
148
  */
144
149
  async removeEntries(entries) {
145
150
  for await (const entry of entries) {
@@ -24,50 +24,18 @@ export class GithubBranch extends Branch {
24
24
  * @param {string} name
25
25
  */
26
26
  entry(name: string): Promise<any>;
27
- entries(patterns: any): AsyncGenerator<{
28
- [x: string]: any;
29
- readonly isCollection: boolean;
30
- readonly types: string[];
31
- readonly mode: number;
32
- } | LazyBufferContentEntry, void, unknown>;
27
+ /**
28
+ *
29
+ * @param {string[]|string} patterns
30
+ * @return {AsyncGenerator<ContentEntry>} all matching entries in the branch
31
+ */
32
+ entries(patterns: string[] | string): AsyncGenerator<ContentEntry>;
33
33
  /**
34
34
  * https://developer.github.com/v3/repos/contents/
35
- * @param {AsyncIterator<ContentEntry>} entries
35
+ * @param {AsyncIterable<ContentEntry>} entries
36
36
  */
37
- removeEntries(entries: AsyncIterator<ContentEntry>): Promise<void>;
37
+ removeEntries(entries: AsyncIterable<ContentEntry>): Promise<void>;
38
38
  #private;
39
39
  }
40
40
  import { Branch } from "repository-provider";
41
41
  import { ContentEntry } from "content-entry";
42
- declare const LazyBufferContentEntry_base: new (name: string) => {
43
- readonly string: string;
44
- readonly readStream: ReadableStream<any>;
45
- readonly isEmpty: boolean;
46
- readonly size: number;
47
- getReadStream(): Promise<ReadableStream<any>>;
48
- readonly isBlob: boolean;
49
- readonly types: string[];
50
- readonly buffer: Uint8Array;
51
- readonly encoding: string;
52
- equalsContent(other: ContentEntry): Promise<boolean>;
53
- name: string;
54
- readonly isCollection: boolean;
55
- readonly mode: number;
56
- readonly mtime: Date;
57
- readonly isDeleted: boolean;
58
- readonly isExistent: boolean;
59
- toJSON(): {
60
- name: string;
61
- isBlob: boolean;
62
- isCollection: boolean;
63
- };
64
- equals(other: import("content-entry").BaseEntry): Promise<boolean>;
65
- };
66
- declare class LazyBufferContentEntry extends LazyBufferContentEntry_base {
67
- constructor(name: any, mode: any, branch: any);
68
- branch: any;
69
- get buffer(): Promise<any>;
70
- getBuffer(): Promise<any>;
71
- #private;
72
- }
73
- export {};
@@ -152,8 +152,8 @@ export class GithubProvider extends MultiGroupProvider {
152
152
  env?: string | string[];
153
153
  };
154
154
  };
155
- fetch(url: any, options?: {}): any;
156
- fetchJSON(url: any, options?: {}): any;
155
+ fetch(url: any, options?: {}): Promise<Response>;
156
+ fetchJSON(url: any, options?: {}): Promise<Response>;
157
157
  /**
158
158
  * {@link https://developer.github.com/v3/repos/#list-repositories-for-the-authenticated-user}
159
159
  */