@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.
- package/build/index.js +19 -12
- 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
|
-
|
|
368184
|
-
|
|
368185
|
-
|
|
368186
|
-
|
|
368187
|
-
|
|
368188
|
-
|
|
368189
|
-
|
|
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
|
-
|
|
368193
|
+
Entity with kind ${this.kind} ${this.metadata.name}
|
|
368192
368194
|
|
|
368193
|
-
|
|
368194
|
-
|
|
368195
|
-
|
|
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
|
-
|
|
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) {
|