Merge pull request #16 from Infisical/daniel/expand-refs-default-true
fix: default expandSecretReferences to true
This commit is contained in:
@@ -54,6 +54,13 @@ export type DeleteSecretResult = ApiV3SecretsRawSecretNamePost200Response;
|
|||||||
|
|
||||||
const convertBool = (value?: boolean) => (value ? "true" : "false");
|
const convertBool = (value?: boolean) => (value ? "true" : "false");
|
||||||
|
|
||||||
|
const defaultBoolean = (value?: boolean, defaultValue: boolean = false) => {
|
||||||
|
if (value === undefined) {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
};
|
||||||
|
|
||||||
export default class SecretsClient {
|
export default class SecretsClient {
|
||||||
#apiInstance: InfisicalApi;
|
#apiInstance: InfisicalApi;
|
||||||
#requestOptions: RawAxiosRequestConfig | undefined;
|
#requestOptions: RawAxiosRequestConfig | undefined;
|
||||||
@@ -68,7 +75,7 @@ export default class SecretsClient {
|
|||||||
{
|
{
|
||||||
environment: options.environment,
|
environment: options.environment,
|
||||||
workspaceId: options.projectId,
|
workspaceId: options.projectId,
|
||||||
expandSecretReferences: convertBool(options.expandSecretReferences),
|
expandSecretReferences: convertBool(defaultBoolean(options.expandSecretReferences, true)),
|
||||||
includeImports: convertBool(options.includeImports),
|
includeImports: convertBool(options.includeImports),
|
||||||
recursive: convertBool(options.recursive),
|
recursive: convertBool(options.recursive),
|
||||||
secretPath: options.secretPath,
|
secretPath: options.secretPath,
|
||||||
@@ -125,7 +132,7 @@ export default class SecretsClient {
|
|||||||
environment: options.environment,
|
environment: options.environment,
|
||||||
secretName: options.secretName,
|
secretName: options.secretName,
|
||||||
workspaceId: options.projectId,
|
workspaceId: options.projectId,
|
||||||
expandSecretReferences: convertBool(options.expandSecretReferences),
|
expandSecretReferences: convertBool(defaultBoolean(options.expandSecretReferences, true)),
|
||||||
includeImports: convertBool(options.includeImports),
|
includeImports: convertBool(options.includeImports),
|
||||||
secretPath: options.secretPath,
|
secretPath: options.secretPath,
|
||||||
type: options.type,
|
type: options.type,
|
||||||
|
|||||||
Reference in New Issue
Block a user