bugfix: create app pointing to hardcoded standard-components version

This commit is contained in:
Michael Shanks 2020-08-03 15:28:45 +01:00
parent 71d0849b71
commit a39f99cf7c
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}`)