padavan 1.0.1 → 1.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/main.mjs +2 -2
- package/package.json +1 -1
package/main.mjs
CHANGED
|
@@ -202,12 +202,12 @@ export class Padavan {
|
|
|
202
202
|
if (to_id.length > 7)
|
|
203
203
|
to_id = to_id.slice(0, 7);
|
|
204
204
|
if (from_id != to_id)
|
|
205
|
-
return this.github('contents/
|
|
205
|
+
return this.github('contents/build.conf', undefined, undefined, {
|
|
206
206
|
accept: 'application/vnd.github.raw+json'
|
|
207
207
|
}).then(res => res.text()).then(text => {
|
|
208
208
|
let [ padavan_repo ] = text.match(new RegExp('^PADAVAN_REPO="(.*?)"$', 'm'))?.slice(1) || [];
|
|
209
209
|
if (!padavan_repo)
|
|
210
|
-
throw new Error('PADAVAN_REPO not found in
|
|
210
|
+
throw new Error('PADAVAN_REPO not found in build.conf');
|
|
211
211
|
const firstSlashIndex = padavan_repo.indexOf('/', padavan_repo.indexOf('//') + 2);
|
|
212
212
|
const host = padavan_repo.substring(padavan_repo.indexOf('//') + 2, firstSlashIndex);
|
|
213
213
|
if (host !== 'gitlab.com')
|