@firestartr/cli 1.43.2-snapshot-2 → 1.43.2-snapshot-4
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
CHANGED
@@ -284161,8 +284161,8 @@ async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp')
|
|
284161
284161
|
}
|
284162
284162
|
const randomExtractPath = `/tmp/${catalog_common.generic.randomString(20)}`;
|
284163
284163
|
console.log(`Extracting feature ${featureName} version ${version} to ${randomExtractPath}`);
|
284164
|
-
|
284165
|
-
|
284164
|
+
external_fs_.rmSync(randomExtractPath, { recursive: true, force: true });
|
284165
|
+
await downloadZipBall(response.url, randomZipTmpPath);
|
284166
284166
|
const zip = new (adm_zip_default())(randomZipTmpPath);
|
284167
284167
|
const mainEntry = zip.getEntries()[0].entryName;
|
284168
284168
|
console.log(`Main entry in zip: ${mainEntry}`);
|
@@ -284179,6 +284179,19 @@ async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp')
|
|
284179
284179
|
throw new Error(`Error for feature with tag ${featureName}-v${version}: ${error}. GitHub response: ${error}`);
|
284180
284180
|
}
|
284181
284181
|
}
|
284182
|
+
async function downloadZipBall(url, filePath) {
|
284183
|
+
try {
|
284184
|
+
const zipResponse = await fetch(url);
|
284185
|
+
if (!zipResponse.ok) {
|
284186
|
+
throw new Error(`Failed to download ZIP: ${zipResponse.statusText}`);
|
284187
|
+
}
|
284188
|
+
const zipBuffer = await zipResponse.text();
|
284189
|
+
external_fs_.writeFileSync(filePath, zipBuffer);
|
284190
|
+
}
|
284191
|
+
catch (err) {
|
284192
|
+
throw new Error(`Downloading feature's zip: ${err.message}`);
|
284193
|
+
}
|
284194
|
+
}
|
284182
284195
|
function buildRef(featureName, version) {
|
284183
284196
|
if (IS_SEMVER_REF.test(version)) {
|
284184
284197
|
return `${featureName}-v${version}`;
|
@@ -428,7 +428,7 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
|
|
428
428
|
verified_at: string;
|
429
429
|
};
|
430
430
|
};
|
431
|
-
author:
|
431
|
+
author: {
|
432
432
|
name?: string;
|
433
433
|
email?: string;
|
434
434
|
login: string;
|
@@ -451,8 +451,8 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
|
|
451
451
|
site_admin: boolean;
|
452
452
|
starred_at?: string;
|
453
453
|
user_view_type?: string;
|
454
|
-
}
|
455
|
-
committer:
|
454
|
+
} | Record<string, never>;
|
455
|
+
committer: {
|
456
456
|
name?: string;
|
457
457
|
email?: string;
|
458
458
|
login: string;
|
@@ -475,7 +475,7 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
|
|
475
475
|
site_admin: boolean;
|
476
476
|
starred_at?: string;
|
477
477
|
user_view_type?: string;
|
478
|
-
}
|
478
|
+
} | Record<string, never>;
|
479
479
|
parents: {
|
480
480
|
sha: string;
|
481
481
|
url: string;
|