sim 2.2.26-preview.296.1 → 2.2.26-preview.297.1
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/dist/index.js +6 -3
- package/dist/runtime.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23345,7 +23345,7 @@ async function credentialValues(provider, raw) {
|
|
|
23345
23345
|
throw new SimApiError(`--credentials.${id} must be one of: ${field.options.map((option) => option.value).join(", ")}.`, 0);
|
|
23346
23346
|
}
|
|
23347
23347
|
}
|
|
23348
|
-
if (
|
|
23348
|
+
if (values.serviceAccountJson !== undefined && (provider.keyless !== undefined || offersConfigurationAlternative(provider))) {
|
|
23349
23349
|
return values;
|
|
23350
23350
|
}
|
|
23351
23351
|
const authMethod = typeof values.authMethod === "string" ? values.authMethod : undefined;
|
|
@@ -23355,9 +23355,12 @@ async function credentialValues(provider, raw) {
|
|
|
23355
23355
|
}
|
|
23356
23356
|
return values;
|
|
23357
23357
|
}
|
|
23358
|
+
function offersConfigurationAlternative(provider) {
|
|
23359
|
+
return provider.fields.some((field) => field.id === "serviceAccountJson" && !field.required);
|
|
23360
|
+
}
|
|
23358
23361
|
function asServiceAccountJson(values, provider) {
|
|
23359
|
-
const
|
|
23360
|
-
return
|
|
23362
|
+
const configuration = values.subject !== undefined && values.subjectProof !== undefined || provider.keyless !== undefined && values.authType === provider.keyless.authType || values.authType !== undefined && values.serviceAccountJson === undefined && !provider.fields.some((field) => field.id === "authType") && offersConfigurationAlternative(provider);
|
|
23363
|
+
return configuration ? { serviceAccountJson: JSON.stringify(values) } : values;
|
|
23361
23364
|
}
|
|
23362
23365
|
function withKeylessRetryHint(error, providerId) {
|
|
23363
23366
|
if (!(error instanceof SimApiError))
|
package/dist/runtime.js
CHANGED
|
@@ -23394,7 +23394,7 @@ async function credentialValues(provider, raw) {
|
|
|
23394
23394
|
throw new SimApiError(`--credentials.${id} must be one of: ${field.options.map((option) => option.value).join(", ")}.`, 0);
|
|
23395
23395
|
}
|
|
23396
23396
|
}
|
|
23397
|
-
if (
|
|
23397
|
+
if (values.serviceAccountJson !== undefined && (provider.keyless !== undefined || offersConfigurationAlternative(provider))) {
|
|
23398
23398
|
return values;
|
|
23399
23399
|
}
|
|
23400
23400
|
const authMethod = typeof values.authMethod === "string" ? values.authMethod : undefined;
|
|
@@ -23404,9 +23404,12 @@ async function credentialValues(provider, raw) {
|
|
|
23404
23404
|
}
|
|
23405
23405
|
return values;
|
|
23406
23406
|
}
|
|
23407
|
+
function offersConfigurationAlternative(provider) {
|
|
23408
|
+
return provider.fields.some((field) => field.id === "serviceAccountJson" && !field.required);
|
|
23409
|
+
}
|
|
23407
23410
|
function asServiceAccountJson(values, provider) {
|
|
23408
|
-
const
|
|
23409
|
-
return
|
|
23411
|
+
const configuration = values.subject !== undefined && values.subjectProof !== undefined || provider.keyless !== undefined && values.authType === provider.keyless.authType || values.authType !== undefined && values.serviceAccountJson === undefined && !provider.fields.some((field) => field.id === "authType") && offersConfigurationAlternative(provider);
|
|
23412
|
+
return configuration ? { serviceAccountJson: JSON.stringify(values) } : values;
|
|
23410
23413
|
}
|
|
23411
23414
|
function withKeylessRetryHint(error, providerId) {
|
|
23412
23415
|
if (!(error instanceof SimApiError))
|