1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00

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 9b47b2e31d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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