hfs 0.53.0-alpha2.2 → 0.53.0-alpha3
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/package.json +1 -1
- package/src/const.js +1 -1
- package/src/github.js +14 -8
package/package.json
CHANGED
package/src/const.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.DEV = process.env.DEV || exports.argv.dev ? 'DEV' : '';
|
|
|
45
45
|
exports.ORIGINAL_CWD = process.cwd();
|
|
46
46
|
exports.HFS_STARTED = new Date();
|
|
47
47
|
const PKG_PATH = (0, path_1.join)(__dirname, '..', 'package.json');
|
|
48
|
-
exports.BUILD_TIMESTAMP = "2024-05-
|
|
48
|
+
exports.BUILD_TIMESTAMP = "2024-05-15T10:18:26.357Z";
|
|
49
49
|
const pkg = JSON.parse(fs.readFileSync(PKG_PATH, 'utf8'));
|
|
50
50
|
exports.VERSION = pkg.version;
|
|
51
51
|
exports.RUNNING_BETA = exports.VERSION.includes('-');
|
package/src/github.js
CHANGED
|
@@ -165,14 +165,20 @@ async function* apiGithubPaginated(uri) {
|
|
|
165
165
|
const PAGE_SIZE = 100;
|
|
166
166
|
let page = 1;
|
|
167
167
|
let n = 0;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
try {
|
|
169
|
+
while (1) {
|
|
170
|
+
const res = await apiGithub(uri + `&page=${page++}&per_page=${PAGE_SIZE}`);
|
|
171
|
+
for (const x of res.items)
|
|
172
|
+
yield x;
|
|
173
|
+
const now = res.items.length;
|
|
174
|
+
n += now;
|
|
175
|
+
if (!now || n >= res.total_count)
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (e) {
|
|
180
|
+
if (e.message !== '422') // for some strange reason github api is returning this error if we search repos for a missing user, instead of empty set
|
|
181
|
+
throw e;
|
|
176
182
|
}
|
|
177
183
|
}
|
|
178
184
|
async function searchPlugins(text = '', { skipRepos = [''] } = {}) {
|