@grow-codes/aws-secrets-manager 0.1.0 → 0.1.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/lib/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BaseSecretsProvider, S as SecretsProvider, G as GetOptions, a as SecretValue, b as SignalOptions, c as SecretMetadata, d as SetOptions, D as DeleteOptions, W as WatchCallback, e as WatchOptions, f as WatchHandle, g as SecretInput, H as HealthStatus } from './base-DNzeOUhQ.cjs';
2
- export { h as GET_MANY_CONCURRENCY, L as LoadEnvOptions, i as encodeSecretInput, j as healthStatus, k as isHealthyWord, p as probeHealth } from './base-DNzeOUhQ.cjs';
1
+ import { B as BaseSecretsProvider, S as SecretsProvider, G as GetOptions, a as SecretValue, b as SignalOptions, c as SecretMetadata, d as SetOptions, D as DeleteOptions, W as WatchCallback, e as WatchOptions, f as WatchHandle, g as SecretInput, H as HealthStatus } from './base-ClUDmFU5.cjs';
2
+ export { h as GET_MANY_CONCURRENCY, L as LoadEnvOptions, i as encodeSecretInput, j as healthStatus, k as isHealthyWord, p as probeHealth } from './base-ClUDmFU5.cjs';
3
3
  import { Dispatcher } from 'undici';
4
4
  import { SecretsManagerClient, Tag, APIErrorType, SecretListEntry, DescribeSecretResponse, ValidationErrorsEntry, SecretValueEntry, SecretVersionsListEntry } from '@aws-sdk/client-secrets-manager';
5
5
  import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpRequest, HttpHandlerOptions, HttpResponse } from '@smithy/types';
@@ -556,6 +556,12 @@ declare class HttpTransport {
556
556
  constructor(options: TransportOptions);
557
557
  /** Whether {@link close} was called. */
558
558
  get closed(): boolean;
559
+ /**
560
+ * Throws `CancelledError` (`"<operation>: client is closed"`, not retryable) once {@link close}
561
+ * was called (SPEC §2.4). Requests check this themselves; service methods that send no request
562
+ * (cached reads, local helpers) call it first.
563
+ */
564
+ ensureOpen(operation: string): void;
559
565
  /** Builds the absolute URL for a path and query. */
560
566
  buildUrl(path: string, query?: Readonly<Record<string, QueryValue>>): URL;
561
567
  /** Redacts known secrets from a text (error messages, vendor text). */
@@ -586,13 +592,13 @@ declare class HttpTransport {
586
592
  declare function redactSecretsInText(text: string): string;
587
593
 
588
594
  /** Package version (kept in sync by release-please). */
589
- declare const SDK_VERSION = "0.1.0";
595
+ declare const SDK_VERSION = "0.1.1";
590
596
  /** Catalog key of the service (`aws-secrets-manager`). */
591
597
  declare const PACKAGE_KEY = "aws-secrets-manager";
592
598
  /** Language tag used in the User-Agent. */
593
599
  declare const LANGUAGE = "typescript";
594
600
  /** sdk-kit version this package was generated from. */
595
- declare const SDK_KIT_VERSION = "0.2.0";
601
+ declare const SDK_KIT_VERSION = "0.3.0";
596
602
 
597
603
  declare const INSPECT: unique symbol;
598
604
  /** Default recovery window of `deleteSecret` / `SecretsProvider.delete` in days (AWS default). */
@@ -1375,7 +1381,7 @@ declare function errorCodeFromBody(text: string): string | undefined;
1375
1381
  declare function mapAwsError(err: unknown, operation: string, options?: MapErrorOptions): AwsSecretsManagerError;
1376
1382
 
1377
1383
  /** Grow User-Agent product token: `grow-codes-aws-secrets-manager/<version> (typescript)`. */
1378
- declare const GROW_USER_AGENT = "grow-codes-aws-secrets-manager/0.1.0 (typescript)";
1384
+ declare const GROW_USER_AGENT = "grow-codes-aws-secrets-manager/0.1.1 (typescript)";
1379
1385
  /** Options of {@link GrowHttpHandler}. */
1380
1386
  interface GrowHttpHandlerOptions {
1381
1387
  /** Resolved common configuration (timeouts, TLS, proxy, headers, hooks, logger). */
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BaseSecretsProvider, S as SecretsProvider, G as GetOptions, a as SecretValue, b as SignalOptions, c as SecretMetadata, d as SetOptions, D as DeleteOptions, W as WatchCallback, e as WatchOptions, f as WatchHandle, g as SecretInput, H as HealthStatus } from './base-DNzeOUhQ.js';
2
- export { h as GET_MANY_CONCURRENCY, L as LoadEnvOptions, i as encodeSecretInput, j as healthStatus, k as isHealthyWord, p as probeHealth } from './base-DNzeOUhQ.js';
1
+ import { B as BaseSecretsProvider, S as SecretsProvider, G as GetOptions, a as SecretValue, b as SignalOptions, c as SecretMetadata, d as SetOptions, D as DeleteOptions, W as WatchCallback, e as WatchOptions, f as WatchHandle, g as SecretInput, H as HealthStatus } from './base-ClUDmFU5.js';
2
+ export { h as GET_MANY_CONCURRENCY, L as LoadEnvOptions, i as encodeSecretInput, j as healthStatus, k as isHealthyWord, p as probeHealth } from './base-ClUDmFU5.js';
3
3
  import { Dispatcher } from 'undici';
4
4
  import { SecretsManagerClient, Tag, APIErrorType, SecretListEntry, DescribeSecretResponse, ValidationErrorsEntry, SecretValueEntry, SecretVersionsListEntry } from '@aws-sdk/client-secrets-manager';
5
5
  import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpRequest, HttpHandlerOptions, HttpResponse } from '@smithy/types';
@@ -556,6 +556,12 @@ declare class HttpTransport {
556
556
  constructor(options: TransportOptions);
557
557
  /** Whether {@link close} was called. */
558
558
  get closed(): boolean;
559
+ /**
560
+ * Throws `CancelledError` (`"<operation>: client is closed"`, not retryable) once {@link close}
561
+ * was called (SPEC §2.4). Requests check this themselves; service methods that send no request
562
+ * (cached reads, local helpers) call it first.
563
+ */
564
+ ensureOpen(operation: string): void;
559
565
  /** Builds the absolute URL for a path and query. */
560
566
  buildUrl(path: string, query?: Readonly<Record<string, QueryValue>>): URL;
561
567
  /** Redacts known secrets from a text (error messages, vendor text). */
@@ -586,13 +592,13 @@ declare class HttpTransport {
586
592
  declare function redactSecretsInText(text: string): string;
587
593
 
588
594
  /** Package version (kept in sync by release-please). */
589
- declare const SDK_VERSION = "0.1.0";
595
+ declare const SDK_VERSION = "0.1.1";
590
596
  /** Catalog key of the service (`aws-secrets-manager`). */
591
597
  declare const PACKAGE_KEY = "aws-secrets-manager";
592
598
  /** Language tag used in the User-Agent. */
593
599
  declare const LANGUAGE = "typescript";
594
600
  /** sdk-kit version this package was generated from. */
595
- declare const SDK_KIT_VERSION = "0.2.0";
601
+ declare const SDK_KIT_VERSION = "0.3.0";
596
602
 
597
603
  declare const INSPECT: unique symbol;
598
604
  /** Default recovery window of `deleteSecret` / `SecretsProvider.delete` in days (AWS default). */
@@ -1375,7 +1381,7 @@ declare function errorCodeFromBody(text: string): string | undefined;
1375
1381
  declare function mapAwsError(err: unknown, operation: string, options?: MapErrorOptions): AwsSecretsManagerError;
1376
1382
 
1377
1383
  /** Grow User-Agent product token: `grow-codes-aws-secrets-manager/<version> (typescript)`. */
1378
- declare const GROW_USER_AGENT = "grow-codes-aws-secrets-manager/0.1.0 (typescript)";
1384
+ declare const GROW_USER_AGENT = "grow-codes-aws-secrets-manager/0.1.1 (typescript)";
1379
1385
  /** Options of {@link GrowHttpHandler}. */
1380
1386
  interface GrowHttpHandlerOptions {
1381
1387
  /** Resolved common configuration (timeouts, TLS, proxy, headers, hooks, logger). */
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ErrorCode, AwsSecretsManagerError, ConfigError, REDACTED, redactUrl, Secret, sleep, redactText, CancelledError, TimeoutError, redactHeaders, errorForStatus, UnavailableError, redactError, EnvReader, isAwsSecretsManagerError, errorForCode, codeForStatus, reasonForCode, BaseSecretsProvider, ValidationError, SecretValue, throwIfAborted, NotFoundError, UnsupportedError } from './chunk-SDDDS6RG.js';
2
- export { AuthenticationError, AwsSecretsManagerError, BaseSecretsProvider, CancelledError, ConfigError, ConflictError, EnvReader, ErrorCode, GET_MANY_CONCURRENCY, MIN_SECRET_LENGTH, NotFoundError, PermissionDeniedError, REDACTED, RateLimitError, SENSITIVE_FIELD_PARTS, Secret, SecretValue, TimeoutError, UnavailableError, UnsupportedError, ValidationError, applyEnv, codeForStatus, encodeSecretInput, envNameFor, errorForCode, errorForStatus, isAwsSecretsManagerError, isSensitiveField, isSensitiveHeader, parseBool, parseDuration, parseInteger, pollUntil, reasonForCode, redactError, redactFields, redactHeaders, redactText, redactUrl, relativeName, secretFingerprint, sleep, throwIfAborted, watchSecret } from './chunk-SDDDS6RG.js';
1
+ import { ErrorCode, AwsSecretsManagerError, ConfigError, REDACTED, redactUrl, Secret, sleep, CancelledError, redactText, TimeoutError, redactHeaders, errorForStatus, UnavailableError, redactError, EnvReader, isAwsSecretsManagerError, errorForCode, codeForStatus, reasonForCode, BaseSecretsProvider, ValidationError, SecretValue, throwIfAborted, NotFoundError, UnsupportedError } from './chunk-FGY6NSRU.js';
2
+ export { AuthenticationError, AwsSecretsManagerError, BaseSecretsProvider, CancelledError, ConfigError, ConflictError, EnvReader, ErrorCode, GET_MANY_CONCURRENCY, MIN_SECRET_LENGTH, NotFoundError, PermissionDeniedError, REDACTED, RateLimitError, SENSITIVE_FIELD_PARTS, Secret, SecretValue, TimeoutError, UnavailableError, UnsupportedError, ValidationError, applyEnv, codeForStatus, encodeSecretInput, envNameFor, errorForCode, errorForStatus, isAwsSecretsManagerError, isSensitiveField, isSensitiveHeader, parseBool, parseDuration, parseInteger, pollUntil, reasonForCode, redactError, redactFields, redactHeaders, redactText, redactUrl, relativeName, secretFingerprint, sleep, throwIfAborted, watchSecret } from './chunk-FGY6NSRU.js';
3
3
  import { readFileSync } from 'fs';
4
4
  import { ProxyAgent, Agent, fetch } from 'undici';
5
5
  import { SecretsManagerClient, ListSecretsCommand, GetSecretValueCommand, BatchGetSecretValueCommand, DescribeSecretCommand, ListSecretVersionIdsCommand, CreateSecretCommand, PutSecretValueCommand, UpdateSecretCommand, UpdateSecretVersionStageCommand, DeleteSecretCommand, RestoreSecretCommand, TagResourceCommand, UntagResourceCommand, PutResourcePolicyCommand, GetResourcePolicyCommand, DeleteResourcePolicyCommand, ValidateResourcePolicyCommand, RotateSecretCommand, CancelRotateSecretCommand, GetRandomPasswordCommand } from '@aws-sdk/client-secrets-manager';
@@ -308,10 +308,10 @@ function secretValues(...values) {
308
308
  }
309
309
 
310
310
  // src/core/version.ts
311
- var SDK_VERSION = "0.1.0";
311
+ var SDK_VERSION = "0.1.1";
312
312
  var PACKAGE_KEY = "aws-secrets-manager";
313
313
  var LANGUAGE = "typescript";
314
- var SDK_KIT_VERSION = "0.2.0";
314
+ var SDK_KIT_VERSION = "0.3.0";
315
315
 
316
316
  // src/core/transport.ts
317
317
  var DEFAULT_REQUEST_ID_HEADERS = [
@@ -412,6 +412,14 @@ var HttpTransport = class {
412
412
  get closed() {
413
413
  return this.#closed;
414
414
  }
415
+ /**
416
+ * Throws `CancelledError` (`"<operation>: client is closed"`, not retryable) once {@link close}
417
+ * was called (SPEC §2.4). Requests check this themselves; service methods that send no request
418
+ * (cached reads, local helpers) call it first.
419
+ */
420
+ ensureOpen(operation) {
421
+ if (this.#closed) throw new CancelledError(`${operation}: client is closed`);
422
+ }
415
423
  /** Builds the absolute URL for a path and query. */
416
424
  buildUrl(path, query) {
417
425
  let url;
@@ -474,7 +482,7 @@ var HttpTransport = class {
474
482
  async #request(options) {
475
483
  const method = (options.method ?? "GET").toUpperCase();
476
484
  const operation = options.operation ?? `${method} ${options.path.split("?")[0] ?? ""}`;
477
- if (this.#closed) throw new CancelledError(`${operation}: client is closed`);
485
+ this.ensureOpen(operation);
478
486
  const signal = options.signal;
479
487
  if (signal?.aborted === true) throw new CancelledError(`${operation}: cancelled`);
480
488
  const url = this.buildUrl(options.path, options.query);