From 1dc19d63aeb6d2fd4c4b279dd456c5953bff9a45 Mon Sep 17 00:00:00 2001 From: William Viker Date: Sat, 2 Dec 2023 16:56:02 +0100 Subject: [PATCH] wrong url in the new code --- src/main.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 665b02a..1def25c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,7 +34,8 @@ export interface CompanionModule { // path: string name: string url: string - help_url: string // New + help_url: string // Newer + help_link: string // New api_version: string keywords: string[] manufacturer: string[] | string @@ -125,12 +126,12 @@ const main = async () => { let sub_package_json: any = {} try { sub_package_json = JSON.parse( - fs.readFileSync('./tmp/companion/module-legacy/node_modules/' + key + '/package.json', 'utf8') + fs.readFileSync('./tmp/companion/module-legacy/node_modules/' + key + '/package.json', 'utf8'), ) } catch (err) { console.log( '[5] Error reading sub package.json', - './tmp/companion/module-legacy/node_modules/' + key + '/package.json' + './tmp/companion/module-legacy/node_modules/' + key + '/package.json', ) console.log(err) errors.push(['sub-package.json', err]) @@ -138,7 +139,12 @@ const main = async () => { packages.push({ version: package_json.dependencies[key].split(/#v?/)[1], - help_url: `https://github.com/bitfocus/${key}/blob/${package_json.dependencies[key].split(/#/)[1]}/HELP.md`, + help_link: `https://github.com/bitfocus/${key}/blob/${ + package_json.dependencies[key].split(/#/)[1] + }/HELP.md`, + help_url: `https://raw.githubusercontent.com/bitfocus/${key}/${ + package_json.dependencies[key].split(/#/)[1] + }/HELP.md`, name: key.replace('companion-module-', ''), url: package_json.dependencies[key], api_version: sub_package_json.api_version,