@firestartr/cli 1.43.1-snapshot-3 → 1.43.2-snapshot-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +3 -13
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -284116,12 +284116,10 @@ var adm_zip_default = /*#__PURE__*/__nccwpck_require__.n(adm_zip);
|
|
284116
284116
|
|
284117
284117
|
|
284118
284118
|
|
284119
|
-
//const IS_COMMIT_REF = new RegExp(/\b[0-9a-f]{40}/g);
|
284120
|
-
const IS_SEMVER_REF = new RegExp(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([\da-zA-Z-]+(?:\.[\da-zA-Z-]+)*))?(?:\+([\da-zA-Z-]+(?:\.[\da-zA-Z-]+)*))?$/);
|
284121
284119
|
async function getFeatureConfig(featureName, version, featureOwner, // -> cr
|
284122
284120
|
featureArgs = {}, repo = 'features', owner = 'prefapp') {
|
284123
284121
|
await downloadFeatureZip(repo, featureName, version, owner);
|
284124
|
-
const ref =
|
284122
|
+
const ref = `${featureName}-v${version}`;
|
284125
284123
|
featureArgs['traceability'] = {
|
284126
284124
|
version,
|
284127
284125
|
owner,
|
@@ -284137,7 +284135,7 @@ async function prepareFeature(featureName, version, repo = 'features', owner = '
|
|
284137
284135
|
}
|
284138
284136
|
async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp') {
|
284139
284137
|
try {
|
284140
|
-
const ref =
|
284138
|
+
const ref = `${featureName}-v${version}`;
|
284141
284139
|
const octokit = await github_0.getOctokitForOrg(owner);
|
284142
284140
|
const zipballExtractPath = catalog_common.features.tarballs.getFeaturesExtractPath(featureName, version, { createIfNotExists: true });
|
284143
284141
|
console.log(`Zipball extract path: ${zipballExtractPath}`);
|
@@ -284162,7 +284160,7 @@ async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp')
|
|
284162
284160
|
const randomExtractPath = `/tmp/${catalog_common.generic.randomString(20)}`;
|
284163
284161
|
console.log(`Extracting feature ${featureName} version ${version} to ${randomExtractPath}`);
|
284164
284162
|
await response.data;
|
284165
|
-
external_fs_.rmSync(
|
284163
|
+
external_fs_.rmSync(randomZipTmpPath, { recursive: true, force: true });
|
284166
284164
|
const zip = new (adm_zip_default())(randomZipTmpPath);
|
284167
284165
|
const mainEntry = zip.getEntries()[0].entryName;
|
284168
284166
|
console.log(`Main entry in zip: ${mainEntry}`);
|
@@ -284179,14 +284177,6 @@ async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp')
|
|
284179
284177
|
throw new Error(`Error for feature with tag ${featureName}-v${version}: ${error}. GitHub response: ${error}`);
|
284180
284178
|
}
|
284181
284179
|
}
|
284182
|
-
function buildRef(featureName, version) {
|
284183
|
-
if (IS_SEMVER_REF.test(version)) {
|
284184
|
-
return `${featureName}-v${version}`;
|
284185
|
-
}
|
284186
|
-
else {
|
284187
|
-
return `${version}`;
|
284188
|
-
}
|
284189
|
-
}
|
284190
284180
|
|
284191
284181
|
;// CONCATENATED MODULE: ../features_preparer/src/index.ts
|
284192
284182
|
|