generated from azures04/Base-REST-API
Added installers configs
This commit is contained in:
@@ -144,6 +144,18 @@ async function getInstallerResources(productName) {
|
||||
return config["installerResources"]
|
||||
}
|
||||
|
||||
async function getInstallerConfig(productName, productPlatform) {
|
||||
const fixedPath = path.join(productsDataPath, productName, "files", ".brikcfg")
|
||||
if (!(await fs.promises.exists(fixedPath))) return []
|
||||
|
||||
const config = JSON.parse(await fs.promises.readFile(fixedPath, "utf8"))
|
||||
|
||||
const globalReqs = config.configurations?.global || []
|
||||
const platformReqs = config.configurations?.[productPlatform] || []
|
||||
|
||||
return { ...globalReqs, ...platformReqs }
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getFile,
|
||||
canAccess,
|
||||
@@ -151,6 +163,7 @@ module.exports = {
|
||||
getFileSha1,
|
||||
getProducts,
|
||||
getProductFiles,
|
||||
getInstallerConfig,
|
||||
getInstallerResources,
|
||||
getRequirementsForPlatform
|
||||
}
|
||||
Reference in New Issue
Block a user