@iobroker/repochecker 4.0.0-alpha.2 → 4.0.0-alpha.4

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
@@ -33,7 +33,7 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
33
33
  -->
34
34
 
35
35
  ## Changelog
36
- ### 4.0.0-alpha.2 (2025-05-31)
36
+ ### 4.0.0-alpha.4 (2025-05-31)
37
37
 
38
38
  - (mcm1957) use jsdelivr.com to retrive files from github.
39
39
 
package/lib/common.js CHANGED
@@ -130,6 +130,20 @@ async function getFilesList(context) {
130
130
  }
131
131
  } catch (e) {
132
132
  error(`Cannot download ${url} ${e}`);
133
+ info(`will retry using github api`);
134
+
135
+ const url2 = `https://api.github.com/repos/${context.repository}/git/trees/${context.lastCommitSha}?recursive=1`;
136
+ debug(`Download ${url} [RETRY]`);
137
+ try {
138
+ const response = await axios(url2);
139
+ debug(`download succeded [RETRY]`);
140
+ if (response.data?.tree) {
141
+ response.data.tree.forEach(fileInfo => filesList.push(fileInfo.path));
142
+ }
143
+ } catch (e) {
144
+ error(`Cannot download ${url} ${e}`);
145
+ throw 'Cannot download files listing.'; // ABORT
146
+ }
133
147
  }
134
148
 
135
149
  debug('Files detected at repository:');
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.0.0-alpha.2",
2
+ "version": "4.0.0-alpha.4",
3
3
  "name": "@iobroker/repochecker",
4
4
  "dependencies": {
5
5
  "axios": "^1.8.4",