@firestartr/cli 1.51.1-snapshot-05 → 1.51.1-snapshot-06

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 +19 -12
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -368180,21 +368180,28 @@ class Entity {
368180
368180
  throw new Error(ErrorMessage);
368181
368181
  }
368182
368182
  const { kind, name, needsSecret } = ref;
368183
- if (!needsSecret) {
368184
- const cr = this.deps[`${kind}-${name}`].cr;
368185
- return (cr.metadata?.annotations?.[EXTERNAL_NAME_ANNOTATION] || cr.metadata.name);
368186
- }
368187
- else {
368188
- if (!propertyRef) {
368189
- const ErrorMessage = `resolveRef:
368183
+ try {
368184
+ if (!needsSecret) {
368185
+ const cr = this.deps[`${kind}-${name}`].cr;
368186
+ return (cr.metadata?.annotations?.[EXTERNAL_NAME_ANNOTATION] ||
368187
+ cr.metadata.name);
368188
+ }
368189
+ else {
368190
+ if (!propertyRef) {
368191
+ const ErrorMessage = `resolveRef:
368190
368192
 
368191
- Entity with kind ${this.kind} ${this.metadata.name}
368193
+ Entity with kind ${this.kind} ${this.metadata.name}
368192
368194
 
368193
- needs a propertyRef to resolve the secret`;
368194
- provisioner_src_logger.error(ErrorMessage);
368195
- throw new Error(ErrorMessage);
368195
+ needs a propertyRef to resolve the secret`;
368196
+ provisioner_src_logger.error(ErrorMessage);
368197
+ throw new Error(ErrorMessage);
368198
+ }
368199
+ return Buffer.from(this.deps[`${kind}-${name}`].secret.data[propertyRef], 'base64').toString('utf8');
368196
368200
  }
368197
- return Buffer.from(this.deps[`${kind}-${name}`].secret.data[propertyRef], 'base64').toString('utf8');
368201
+ }
368202
+ catch (error) {
368203
+ const errorMsg = `Error resolving ref for ${kind}-${name}: ${error}`;
368204
+ throw new Error(errorMsg);
368198
368205
  }
368199
368206
  }
368200
368207
  resolveSecretRef(ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.51.1-snapshot-05",
3
+ "version": "1.51.1-snapshot-06",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",