@firestartr/cli 2.6.0 → 2.6.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.
Files changed (2) hide show
  1. package/build/index.js +43 -13
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -291143,6 +291143,7 @@ class RepoGithubDecanter extends GithubDecanter {
291143
291143
  defaultBranch: this.data.repoDetails.default_branch,
291144
291144
  },
291145
291145
  topics: this.data.repoDetails.topics,
291146
+ hasWiki: this.data.repoDetails.has_wiki,
291146
291147
  },
291147
291148
  },
291148
291149
  path: '/providers',
@@ -293107,17 +293108,46 @@ async function updateSyncTransition(itemPath, reason, lastSyncTime, nextSyncTime
293107
293108
  }
293108
293109
  async function updateRetryStatusInCR(pluralKind, namespace, name, retryCount, nextRetryTime) {
293109
293110
  const itemPath = `${namespace}/${pluralKind}/${name}`;
293110
- const item = await getItemByItemPath(itemPath);
293111
- if (!('status' in item) || item.status === null)
293112
- item.status = {};
293113
- item.status.retryCount = retryCount;
293114
- if (nextRetryTime) {
293115
- item.status.nextRetryTime = nextRetryTime;
293111
+ try {
293112
+ const item = await getItemByItemPath(itemPath);
293113
+ if (!('status' in item) || item.status === null)
293114
+ item.status = {};
293115
+ item.status.retryCount = retryCount;
293116
+ if (nextRetryTime) {
293117
+ item.status.nextRetryTime = nextRetryTime;
293118
+ }
293119
+ else {
293120
+ delete item.status.nextRetryTime;
293121
+ }
293122
+ await writePrioritizedStatus(pluralKind, namespace, item);
293116
293123
  }
293117
- else {
293118
- delete item.status.nextRetryTime;
293124
+ catch (e) {
293125
+ if (isKubernetesNotFoundError(e)) {
293126
+ operator_src_logger.info(`Skipping retry status update for '${itemPath}' because the custom resource was not found.`);
293127
+ return;
293128
+ }
293129
+ throw e;
293119
293130
  }
293120
- await writePrioritizedStatus(pluralKind, namespace, item);
293131
+ }
293132
+ function isKubernetesNotFoundError(error) {
293133
+ if (typeof error === 'string') {
293134
+ return isNotFoundMessage(error);
293135
+ }
293136
+ if (!error || typeof error !== 'object') {
293137
+ return false;
293138
+ }
293139
+ const k8sError = error;
293140
+ return (k8sError.code === 404 ||
293141
+ k8sError.status === 404 ||
293142
+ k8sError.statusCode === 404 ||
293143
+ k8sError.response?.status === 404 ||
293144
+ k8sError.response?.statusCode === 404 ||
293145
+ k8sError.body?.code === 404 ||
293146
+ k8sError.body?.reason === 'NotFound' ||
293147
+ isNotFoundMessage(k8sError.message));
293148
+ }
293149
+ function isNotFoundMessage(message) {
293150
+ return typeof message === 'string' && /\bnot\s*found\b/i.test(message);
293121
293151
  }
293122
293152
  async function writePrioritizedStatus(kind, namespace, item) {
293123
293153
  setHighPriorityStatus(item);
@@ -299774,8 +299804,8 @@ const MODULES = {
299774
299804
  },
299775
299805
  FirestartrGithubRepository: {
299776
299806
  module: 'git::https://github.com/prefapp/tfm.git//modules/github-repo',
299777
- // github-repo-v0.5.1
299778
- ref: '67c7afaec38c1fdc9f1928090c181ef310fb81ec',
299807
+ // github-repo-v0.6.0
299808
+ ref: '7eaa88e8a55c85bc8b7270a7d72055d8a53d6df1',
299779
299809
  },
299780
299810
  FirestartrGithubRepositoryFeature: {
299781
299811
  module: 'git::https://github.com/prefapp/tfm.git//modules/github-files-set',
@@ -303528,9 +303558,9 @@ const crs_analyzerSubcommand = {
303528
303558
  };
303529
303559
 
303530
303560
  ;// CONCATENATED MODULE: ./package.json
303531
- const package_namespaceObject = {"i8":"2.6.0"};
303561
+ const package_namespaceObject = {"i8":"2.6.2"};
303532
303562
  ;// CONCATENATED MODULE: ../../package.json
303533
- const package_namespaceObject_1 = {"i8":"2.6.0"};
303563
+ const package_namespaceObject_1 = {"i8":"2.6.2"};
303534
303564
  ;// CONCATENATED MODULE: ./src/subcommands/index.ts
303535
303565
 
303536
303566
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",