Merge pull request #522 from mjashanks/master

bugfix: create app pointing to hardcoded standard-components version
This commit is contained in:
Michael Shanks 2020-08-03 15:37:31 +01:00 committed by GitHub
commit 9e251a688f
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ const fetch = require("node-fetch")
const tar = require("tar-fs")
const zlib = require("zlib")
const { promisify } = require("util")
const packageJson = require("../../package.json")
const streamPipeline = promisify(stream.pipeline)
exports.appPackageFolder = (config, appname) =>
@ -17,7 +19,7 @@ exports.downloadExtractComponentLibraries = async appFolder => {
for (let lib of LIBRARIES) {
// download tarball
// TODO: make sure the latest version is always downloaded
const registryUrl = `https://registry.npmjs.org/@budibase/${lib}/-/${lib}-0.1.2.tgz`
const registryUrl = `https://registry.npmjs.org/@budibase/${lib}/-/${lib}-${packageJson.version}.tgz`
const response = await fetch(registryUrl)
if (!response.ok)
throw new Error(`unexpected response ${response.statusText}`)