@@ -54,6 +54,13 @@ export type DeleteSecretResult = ApiV3SecretsRawSecretNamePost200Response;
54
54
55
55
const convertBool = ( value ?: boolean ) => ( value ? "true" : "false" ) ;
56
56
57
+ const defaultBoolean = ( value ?: boolean , defaultValue : boolean = false ) => {
58
+ if ( value === undefined ) {
59
+ return defaultValue ;
60
+ }
61
+ return value ;
62
+ } ;
63
+
57
64
export default class SecretsClient {
58
65
#apiInstance: InfisicalApi ;
59
66
#requestOptions: RawAxiosRequestConfig | undefined ;
@@ -68,7 +75,7 @@ export default class SecretsClient {
68
75
{
69
76
environment : options . environment ,
70
77
workspaceId : options . projectId ,
71
- expandSecretReferences : convertBool ( options . expandSecretReferences ) ,
78
+ expandSecretReferences : convertBool ( defaultBoolean ( options . expandSecretReferences , true ) ) ,
72
79
includeImports : convertBool ( options . includeImports ) ,
73
80
recursive : convertBool ( options . recursive ) ,
74
81
secretPath : options . secretPath ,
@@ -125,7 +132,7 @@ export default class SecretsClient {
125
132
environment : options . environment ,
126
133
secretName : options . secretName ,
127
134
workspaceId : options . projectId ,
128
- expandSecretReferences : convertBool ( options . expandSecretReferences ) ,
135
+ expandSecretReferences : convertBool ( defaultBoolean ( options . expandSecretReferences , true ) ) ,
129
136
includeImports : convertBool ( options . includeImports ) ,
130
137
secretPath : options . secretPath ,
131
138
type : options . type ,
0 commit comments