1
0
Fork 0
mirror of synced 2024-09-29 16:51:33 +13:00

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 284cceb9b7
commit 6f851ac489

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}`)