requested changes

This commit is contained in:
Daniel Hougaard
2025-03-14 04:30:38 +04:00
parent 7fcf6b4a92
commit 52b959a010
2 changed files with 5 additions and 6 deletions

View File

@@ -121,7 +121,7 @@ const allSecrets = await client.secrets().listSecrets({
- `environment` (string): The environment in which to list secrets (e.g., "dev"). - `environment` (string): The environment in which to list secrets (e.g., "dev").
- `secretPath` (str): The path to the secrets. - `secretPath` (str): The path to the secrets.
- `expandSecretReferences` (bool, optional): Whether to expand secret references. - `expandSecretReferences` (bool, optional): Whether to expand secret references.
- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with `<hidden-by-infisical>`. Defaults to `true. - `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with `<hidden-by-infisical>`. Defaults to `true`.
- `recursive` (bool, optional): Whether to list secrets recursively. - `recursive` (bool, optional): Whether to list secrets recursively.
- `includeImports` (bool, optional): Whether to include imported secrets. - `includeImports` (bool, optional): Whether to include imported secrets.
- `tagFilters` (string[], optional): Tags to filter secrets. - `tagFilters` (string[], optional): Tags to filter secrets.
@@ -149,7 +149,7 @@ const allSecrets = await client.secrets().listSecretsWithImports({
- `environment` (string): The environment in which to list secrets (e.g., "dev"). - `environment` (string): The environment in which to list secrets (e.g., "dev").
- `secretPath` (str): The path to the secrets. - `secretPath` (str): The path to the secrets.
- `expandSecretReferences` (bool, optional): Whether to expand secret references. - `expandSecretReferences` (bool, optional): Whether to expand secret references.
- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with `<hidden-by-infisical>`. Defaults to `true. - `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secrets. If set to `false`, the `secretValue` is masked with `<hidden-by-infisical>`. Defaults to `true`.
- `recursive` (bool, optional): Whether to list secrets recursively. - `recursive` (bool, optional): Whether to list secrets recursively.
- `tagFilters` (string[], optional): Tags to filter secrets. - `tagFilters` (string[], optional): Tags to filter secrets.
@@ -254,7 +254,7 @@ const updatedSecret = await client.secrets().updateSecret("SECRET_TO_UPDATE", {
- `secretName` (str): The name of the secret. - `secretName` (str): The name of the secret.
- `secretPath` (str, optional): The path to the secret. - `secretPath` (str, optional): The path to the secret.
- `expandSecretReferences` (bool, optional): Whether to expand secret references. - `expandSecretReferences` (bool, optional): Whether to expand secret references.
- `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secret. If set to `false`, the `secretValue` is masked with `<hidden-by-infisical>`. Defaults to `true. - `viewSecretValue` (bool, optional): Whether or not to reveal the secret value of the secret. If set to `false`, the `secretValue` is masked with `<hidden-by-infisical>`. Defaults to `true`.
- `includeImports` (bool): Whether to include imported secrets. - `includeImports` (bool): Whether to include imported secrets.
- `version` (str, optional): The version of the secret to retrieve. Fetches the latest by default. - `version` (str, optional): The version of the secret to retrieve. Fetches the latest by default.
- `type` (personal | shared, optional): The type of secret to fetch. - `type` (personal | shared, optional): The type of secret to fetch.

View File

@@ -68,7 +68,7 @@ export default class SecretsClient {
try { try {
const res = await this.#apiInstance.apiV3SecretsRawGet( const res = await this.#apiInstance.apiV3SecretsRawGet(
{ {
viewSecretValue: convertBool(options.viewSecretValue), viewSecretValue: options.viewSecretValue ? convertBool(options.viewSecretValue) : undefined,
environment: options.environment, environment: options.environment,
workspaceId: options.projectId, workspaceId: options.projectId,
expandSecretReferences: convertBool(options.expandSecretReferences), expandSecretReferences: convertBool(options.expandSecretReferences),
@@ -107,7 +107,6 @@ export default class SecretsClient {
if (!secrets.find(s => s.secretKey === importedSecret.secretKey)) { if (!secrets.find(s => s.secretKey === importedSecret.secretKey)) {
secrets.push({ secrets.push({
...importedSecret, ...importedSecret,
secretValueHidden: false,
secretPath: imp.secretPath, secretPath: imp.secretPath,
// These fields are not returned by the API // These fields are not returned by the API
updatedAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
@@ -126,7 +125,7 @@ export default class SecretsClient {
try { try {
const res = await this.#apiInstance.apiV3SecretsRawSecretNameGet( const res = await this.#apiInstance.apiV3SecretsRawSecretNameGet(
{ {
viewSecretValue: convertBool(options.viewSecretValue), viewSecretValue: options.viewSecretValue ? convertBool(options.viewSecretValue) : undefined,
environment: options.environment, environment: options.environment,
secretName: options.secretName, secretName: options.secretName,
workspaceId: options.projectId, workspaceId: options.projectId,