@aligent/aws-wrappers 0.5.6 → 0.5.7
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/README.md +3 -2
- package/cjs/index.cjs +130 -144
- package/cjs/package.json +1 -1
- package/cjs/src/dynamodb/dynamodb.d.ts.map +1 -1
- package/cjs/src/s3/s3.d.ts.map +1 -1
- package/cjs/src/scheduler/scheduler.d.ts.map +1 -1
- package/cjs/src/sns/sns.d.ts +7 -0
- package/cjs/src/sns/sns.d.ts.map +1 -1
- package/cjs/src/sqs/sqs.d.ts +0 -7
- package/cjs/src/sqs/sqs.d.ts.map +1 -1
- package/cjs/src/util/batch-operation-error.d.ts +20 -3
- package/cjs/src/util/batch-operation-error.d.ts.map +1 -1
- package/cjs/src/util/redact.d.ts +17 -18
- package/cjs/src/util/redact.d.ts.map +1 -1
- package/docs/index/classes/APIGatewayService.md +6 -6
- package/docs/index/classes/APIGatewayV2Service.md +5 -5
- package/docs/index/classes/BatchOperationError.md +5 -5
- package/docs/index/classes/DynamoDBService.md +12 -12
- package/docs/index/classes/S3Service.md +15 -15
- package/docs/index/classes/SNSService.md +10 -4
- package/docs/index/classes/SQSService.md +7 -7
- package/docs/index/classes/SSMService.md +7 -7
- package/docs/index/classes/SchedulerService.md +11 -11
- package/docs/index/classes/SecretsManagerService.md +8 -8
- package/docs/index/classes/StepFunctionsService.md +6 -6
- package/docs/index/interfaces/BatchFailedEntry.md +4 -4
- package/docs/testing/testing/functions/createMockService.md +1 -1
- package/esm/index.mjs +130 -144
- package/esm/package.json +1 -1
- package/esm/src/dynamodb/dynamodb.d.ts.map +1 -1
- package/esm/src/s3/s3.d.ts.map +1 -1
- package/esm/src/scheduler/scheduler.d.ts.map +1 -1
- package/esm/src/sns/sns.d.ts +7 -0
- package/esm/src/sns/sns.d.ts.map +1 -1
- package/esm/src/sqs/sqs.d.ts +0 -7
- package/esm/src/sqs/sqs.d.ts.map +1 -1
- package/esm/src/util/batch-operation-error.d.ts +20 -3
- package/esm/src/util/batch-operation-error.d.ts.map +1 -1
- package/esm/src/util/redact.d.ts +17 -18
- package/esm/src/util/redact.d.ts.map +1 -1
- package/package.json +1 -1
package/esm/src/util/redact.d.ts
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
|
|
2
|
-
/**
|
|
3
|
-
* Whether the logger is verbose enough that full SDK inputs — payloads, secret
|
|
4
|
-
* material and PII — may be written to the log.
|
|
5
|
-
*
|
|
6
|
-
* **This is the only place in the package that reads the log level.** Never
|
|
7
|
-
* compare `logger.getLevelName()` yourself: Powertools orders `TRACE` as *more*
|
|
8
|
-
* verbose than `DEBUG` (thresholds 6 and 8), so the obvious
|
|
9
|
-
* `getLevelName() === 'DEBUG'` check silently redacts at the most verbose level
|
|
10
|
-
* available. Route every disclosure decision through this predicate instead.
|
|
11
|
-
*/
|
|
12
|
-
export declare function shouldLogFullInput(logger: LoggerInterface): boolean;
|
|
13
2
|
/**
|
|
14
3
|
* Return a log-safe projection of `input` based on the logger's configured level.
|
|
15
4
|
*
|
|
16
|
-
* At the verbose levels
|
|
17
|
-
*
|
|
18
|
-
*
|
|
5
|
+
* At the verbose levels (`TRACE` and `DEBUG`) the full input is returned
|
|
6
|
+
* unchanged: operators who asked for that verbosity have explicitly opted into
|
|
7
|
+
* seeing everything, including payloads, secret material and PII. At any other
|
|
8
|
+
* level the projection is returned instead.
|
|
9
|
+
*
|
|
10
|
+
* **This module is the only place in the package that reads the log level.**
|
|
11
|
+
* Never compare `logger.getLevelName()` yourself: Powertools orders `TRACE` as
|
|
12
|
+
* *more* verbose than `DEBUG` (thresholds 6 and 8), so the obvious
|
|
13
|
+
* `getLevelName() === 'DEBUG'` check silently redacts at the most verbose level
|
|
14
|
+
* available. Route every disclosure decision through this function instead.
|
|
19
15
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
16
|
+
* `project` is either a list of top-level keys to keep (absent keys are
|
|
17
|
+
* silently skipped, so the result narrows to `Pick<T, K>`) or a function from
|
|
18
|
+
* the input to a safe shape. Prefer the key list: it is safe by default, since
|
|
19
|
+
* a new SDK field is not logged until someone allowlists it. Use a function
|
|
20
|
+
* only for computed shapes such as counts, and keep it small.
|
|
23
21
|
*
|
|
24
22
|
* Used across the package so that the "what's safe to log at INFO" decision
|
|
25
23
|
* lives in one place. See `packages/aws-wrappers/CLAUDE.md` ("Logging") for
|
|
26
24
|
* the design rationale and conventions on building the safe-field lists.
|
|
27
25
|
*/
|
|
28
|
-
export declare function
|
|
26
|
+
export declare function redactInput<T extends object, K extends keyof T>(logger: LoggerInterface, input: T, project: readonly K[]): T | Pick<T, K>;
|
|
27
|
+
export declare function redactInput<T extends object, R>(logger: LoggerInterface, input: T, project: (input: T) => R): T | R;
|
|
29
28
|
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../../../src/util/redact.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../../../src/util/redact.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAU3E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAC3D,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,SAAS,CAAC,EAAE,GACtB,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClB,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAC3C,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GACzB,CAAC,GAAG,CAAC,CAAC"}
|