Skip to content

Commit

Permalink
wrong url in the new code
Browse files Browse the repository at this point in the history
  • Loading branch information
willosof committed Dec 2, 2023
1 parent 8522d93 commit 1dc19d6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -125,20 +126,25 @@ 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])
}

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,
Expand Down

0 comments on commit 1dc19d6

Please sign in to comment.