@firestartr/cli 1.43.2-snapshot-1 → 1.43.2-snapshot-2

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
@@ -284116,10 +284116,12 @@ 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-]+)*))?$/);
284119
284121
  async function getFeatureConfig(featureName, version, featureOwner, // -> cr
284120
284122
  featureArgs = {}, repo = 'features', owner = 'prefapp') {
284121
284123
  await downloadFeatureZip(repo, featureName, version, owner);
284122
- const ref = `${featureName}-v${version}`;
284124
+ const ref = buildRef(featureName, version);
284123
284125
  featureArgs['traceability'] = {
284124
284126
  version,
284125
284127
  owner,
@@ -284135,7 +284137,7 @@ async function prepareFeature(featureName, version, repo = 'features', owner = '
284135
284137
  }
284136
284138
  async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp') {
284137
284139
  try {
284138
- const ref = `${featureName}-v${version}`;
284140
+ const ref = buildRef(featureName, version);
284139
284141
  const octokit = await github_0.getOctokitForOrg(owner);
284140
284142
  const zipballExtractPath = catalog_common.features.tarballs.getFeaturesExtractPath(featureName, version, { createIfNotExists: true });
284141
284143
  console.log(`Zipball extract path: ${zipballExtractPath}`);
@@ -284177,6 +284179,14 @@ async function downloadFeatureZip(repo, featureName, version, owner = 'prefapp')
284177
284179
  throw new Error(`Error for feature with tag ${featureName}-v${version}: ${error}. GitHub response: ${error}`);
284178
284180
  }
284179
284181
  }
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
+ }
284180
284190
 
284181
284191
  ;// CONCATENATED MODULE: ../features_preparer/src/index.ts
284182
284192
 
@@ -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: Record<string, never> | {
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
- } | Record<string, never>;
455
- committer: {
454
+ };
455
+ committer: Record<string, never> | {
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
- } | Record<string, never>;
478
+ };
479
479
  parents: {
480
480
  sha: string;
481
481
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.43.2-snapshot-1",
3
+ "version": "1.43.2-snapshot-2",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",