@aligent/aws-wrappers 0.5.4 → 0.5.6
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 +57 -2
- package/cjs/index.cjs +226 -48
- package/cjs/package.json +3 -1
- package/cjs/src/api-gateway/api-gateway.d.ts +45 -0
- package/cjs/src/api-gateway/api-gateway.d.ts.map +1 -0
- package/cjs/src/api-gateway-v2/api-gateway-v2.d.ts +39 -0
- package/cjs/src/api-gateway-v2/api-gateway-v2.d.ts.map +1 -0
- package/cjs/src/index.d.ts +4 -0
- package/cjs/src/index.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/sfn/sfn.d.ts.map +1 -1
- package/cjs/src/sns/sns.d.ts.map +1 -1
- package/cjs/src/sqs/sqs.d.ts +20 -0
- package/cjs/src/sqs/sqs.d.ts.map +1 -1
- package/cjs/src/ssm/ssm.d.ts.map +1 -1
- package/cjs/src/util/batch-operation-error.d.ts +33 -0
- package/cjs/src/util/batch-operation-error.d.ts.map +1 -0
- package/cjs/src/util/chunk.d.ts +6 -0
- package/cjs/src/util/chunk.d.ts.map +1 -0
- package/cjs/src/util/pagination.d.ts +12 -0
- package/cjs/src/util/pagination.d.ts.map +1 -0
- package/docs/index/classes/APIGatewayService.md +143 -0
- package/docs/index/classes/APIGatewayV2Service.md +119 -0
- package/docs/index/classes/BatchOperationError.md +261 -0
- package/docs/index/classes/DynamoDBService.md +12 -12
- package/docs/index/classes/S3Service.md +15 -15
- package/docs/index/classes/SNSService.md +4 -4
- package/docs/index/classes/SQSService.md +20 -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 +43 -0
- package/docs/index/modules.md +7 -0
- package/docs/testing/testing/functions/createMockService.md +1 -1
- package/esm/index.mjs +225 -50
- package/esm/package.json +3 -1
- package/esm/src/api-gateway/api-gateway.d.ts +45 -0
- package/esm/src/api-gateway/api-gateway.d.ts.map +1 -0
- package/esm/src/api-gateway-v2/api-gateway-v2.d.ts +39 -0
- package/esm/src/api-gateway-v2/api-gateway-v2.d.ts.map +1 -0
- package/esm/src/index.d.ts +4 -0
- package/esm/src/index.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/sfn/sfn.d.ts.map +1 -1
- package/esm/src/sns/sns.d.ts.map +1 -1
- package/esm/src/sqs/sqs.d.ts +20 -0
- package/esm/src/sqs/sqs.d.ts.map +1 -1
- package/esm/src/ssm/ssm.d.ts.map +1 -1
- package/esm/src/util/batch-operation-error.d.ts +33 -0
- package/esm/src/util/batch-operation-error.d.ts.map +1 -0
- package/esm/src/util/chunk.d.ts +6 -0
- package/esm/src/util/chunk.d.ts.map +1 -0
- package/esm/src/util/pagination.d.ts +12 -0
- package/esm/src/util/pagination.d.ts.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -25,6 +25,34 @@ new XService({ logger?, client? })
|
|
|
25
25
|
|
|
26
26
|
Every wrapper emits one `logger.info` line per SDK call with a per-method safe-field allowlist (omitting payloads, secret material, and PII recipient identifiers). Set `POWERTOOLS_LOG_LEVEL` to either `DEBUG` or `TRACE` to unlock the full SDK input in those log lines — useful for local development and incident triage. Both levels unlock because Powertools orders `TRACE` as more verbose than `DEBUG`; every level from `INFO` upwards redacts. See `packages/aws-wrappers/CLAUDE.md` for the per-method allowlists currently in force.
|
|
27
27
|
|
|
28
|
+
### Batch semantics
|
|
29
|
+
|
|
30
|
+
Batch methods split your entries into chunks of the size the AWS API allows and send one request per chunk. AWS reports rejected entries inside an otherwise successful response, so a resolved request does not mean every entry was accepted. Currently covered: `SQSService.sendMessageBatch` and `SQSService.deleteMessageBatch`.
|
|
31
|
+
|
|
32
|
+
Every chunk is sent first. If any entry was rejected, the method then throws a single `BatchOperationError`. A call where nothing was rejected returns the per-chunk SDK outputs exactly as before.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { BatchOperationError } from '@aligent/aws-wrappers';
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
await sqs.sendMessageBatch({ QueueUrl, Entries: entries });
|
|
39
|
+
} catch (error) {
|
|
40
|
+
if (error instanceof BatchOperationError) {
|
|
41
|
+
// error.results — the raw SDK output of every chunk, including what succeeded
|
|
42
|
+
// error.failed — [{ id, code, message }] for every rejected entry
|
|
43
|
+
const failedIds = new Set(error.failed.map(entry => entry.id));
|
|
44
|
+
await retry(entries.filter(entry => failedIds.has(entry.Id)));
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `failed` carries only the entry identifier, error code and message — never message bodies, attributes or any other payload.
|
|
52
|
+
- The error has a stable `name` of `'BatchOperationError'`. If both the CJS and ESM builds of this package can be loaded in one process, check `error.name` instead of `instanceof`.
|
|
53
|
+
- A warning is logged with the failure count and error codes, and no payload, at every log level.
|
|
54
|
+
- Request-level SDK exceptions (throttling, access denied, network errors) are **not** wrapped. They propagate unchanged and immediately, so earlier chunks may already have been sent and the caller cannot tell which. Treat those as "outcome unknown" and make the operation safe to repeat.
|
|
55
|
+
|
|
28
56
|
### X-Ray outside Lambda
|
|
29
57
|
|
|
30
58
|
X-Ray's middleware throws by default when no active segment exists, which is the case for CLI scripts and local development. Set the environment variable to silence the noise:
|
|
@@ -318,7 +346,8 @@ for (const message of messages) {
|
|
|
318
346
|
}
|
|
319
347
|
}
|
|
320
348
|
|
|
321
|
-
// Batch methods auto-chunk Entries to the SQS-enforced 10-entry limit
|
|
349
|
+
// Batch methods auto-chunk Entries to the SQS-enforced 10-entry limit and throw
|
|
350
|
+
// a BatchOperationError if SQS rejects any entry — see "Batch semantics".
|
|
322
351
|
await sqs.sendMessageBatch({ QueueUrl, Entries: bigEntryList });
|
|
323
352
|
await sqs.deleteMessageBatch({ QueueUrl, Entries: receiptEntries });
|
|
324
353
|
```
|
|
@@ -353,6 +382,32 @@ await truncSns.publish({ TopicArn, Message: huge, Subject: long });
|
|
|
353
382
|
await truncSns.publish({ TopicArn, Message: huge }, { truncate: false });
|
|
354
383
|
```
|
|
355
384
|
|
|
385
|
+
## API Gateway
|
|
386
|
+
|
|
387
|
+
Read-only lookups against the control plane. `APIGatewayService` wraps REST APIs (v1); `APIGatewayV2Service` wraps HTTP and WebSocket APIs (v2). List methods are auto-paginated and return flat arrays.
|
|
388
|
+
|
|
389
|
+
```ts
|
|
390
|
+
import { APIGatewayService, APIGatewayV2Service } from '@aligent/aws-wrappers';
|
|
391
|
+
|
|
392
|
+
const apiGateway = new APIGatewayService();
|
|
393
|
+
|
|
394
|
+
const restApis = await apiGateway.getRestApis();
|
|
395
|
+
// REST APIs expose their routes as resources; embed methods to see the verbs.
|
|
396
|
+
const resources = await apiGateway.getResources({ restApiId, embed: ['methods'] });
|
|
397
|
+
|
|
398
|
+
// API key values are always returned (includeValue(s) is baked in, no opt-out).
|
|
399
|
+
const keys = await apiGateway.getApiKeys({ nameQuery: 'partner' });
|
|
400
|
+
const key = await apiGateway.getApiKey({ apiKey: keyId }); // throws NotFoundException if missing
|
|
401
|
+
|
|
402
|
+
const apiGatewayV2 = new APIGatewayV2Service();
|
|
403
|
+
|
|
404
|
+
const apis = await apiGatewayV2.getApis();
|
|
405
|
+
const routes = await apiGatewayV2.getRoutes({ ApiId });
|
|
406
|
+
const route = await apiGatewayV2.getRoute({ ApiId, RouteId }); // throws NotFoundException if missing
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
API key values only ever appear in method output, which the wrappers never log.
|
|
410
|
+
|
|
356
411
|
## Testing
|
|
357
412
|
|
|
358
413
|
When you unit-test code that takes a wrapper as a dependency, you usually want to assert that *your* code called the right method with the right arguments — not to exercise the wrapper's chunking, pagination or JSON round-tripping, which this package already covers with its own tests against a mocked SDK client.
|
|
@@ -413,7 +468,7 @@ const getJsonObject = async <T>() => ({ total: 42 }) as T;
|
|
|
413
468
|
|
|
414
469
|
Note that the typed-spy form does **not** work here: `vi.fn<S3Service['getJsonObject']>()` produces a `Mock` that erases the type parameter and is no longer assignable to the generic signature. Reach for a typed spy on non-generic methods only.
|
|
415
470
|
|
|
416
|
-
The helper is generic over any class, so it works for all
|
|
471
|
+
The helper is generic over any class, so it works for all wrappers and for your own service classes too.
|
|
417
472
|
|
|
418
473
|
## Build / test
|
|
419
474
|
|
package/cjs/index.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var logger = require('@aws-lambda-powertools/logger');
|
|
4
|
+
var clientApigatewayv2 = require('@aws-sdk/client-apigatewayv2');
|
|
5
|
+
var xray = require('aws-xray-sdk-core');
|
|
6
|
+
var clientApiGateway = require('@aws-sdk/client-api-gateway');
|
|
4
7
|
var clientDynamodb = require('@aws-sdk/client-dynamodb');
|
|
5
8
|
var libDynamodb = require('@aws-sdk/lib-dynamodb');
|
|
6
|
-
var xray = require('aws-xray-sdk-core');
|
|
7
9
|
var clientS3 = require('@aws-sdk/client-s3');
|
|
8
10
|
var s3RequestPresigner = require('@aws-sdk/s3-request-presigner');
|
|
9
11
|
var clientScheduler = require('@aws-sdk/client-scheduler');
|
|
@@ -13,6 +15,134 @@ var clientSns = require('@aws-sdk/client-sns');
|
|
|
13
15
|
var clientSqs = require('@aws-sdk/client-sqs');
|
|
14
16
|
var clientSsm = require('@aws-sdk/client-ssm');
|
|
15
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Flatten the items of every page of an SDK paginator (`paginateXxx`).
|
|
20
|
+
* `getItems` picks the data-bearing field, which differs per operation.
|
|
21
|
+
*/
|
|
22
|
+
async function collectItems(pages, getItems) {
|
|
23
|
+
const items = [];
|
|
24
|
+
for await (const page of pages) {
|
|
25
|
+
items.push(...(getItems(page) ?? []));
|
|
26
|
+
}
|
|
27
|
+
return items;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Flatten the items of every page of an operation the SDK ships no paginator
|
|
31
|
+
* for, following its continuation token until the response stops returning one.
|
|
32
|
+
* `fetchPage` receives `undefined` on the first call.
|
|
33
|
+
*/
|
|
34
|
+
async function collectPages(fetchPage, getItems, getNextToken) {
|
|
35
|
+
const items = [];
|
|
36
|
+
let token;
|
|
37
|
+
do {
|
|
38
|
+
const page = await fetchPage(token);
|
|
39
|
+
items.push(...(getItems(page) ?? []));
|
|
40
|
+
token = getNextToken(page);
|
|
41
|
+
} while (token);
|
|
42
|
+
return items;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Read-only wrapper around the API Gateway v2 (HTTP and WebSocket APIs)
|
|
47
|
+
* control-plane client providing structured Powertools logging and X-Ray
|
|
48
|
+
* tracing by default.
|
|
49
|
+
*
|
|
50
|
+
* The v2 SDK ships no paginators for `GetApis` or `GetRoutes`, so list methods
|
|
51
|
+
* follow `NextToken` manually.
|
|
52
|
+
*/
|
|
53
|
+
class APIGatewayV2Service {
|
|
54
|
+
client;
|
|
55
|
+
logger;
|
|
56
|
+
/**
|
|
57
|
+
* @param opts.logger - Optional Powertools logger. Defaults to `new Logger()`,
|
|
58
|
+
* which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
|
|
59
|
+
* @param opts.client - Optional pre-configured `ApiGatewayV2Client`. When
|
|
60
|
+
* supplied, the wrapper does not apply X-Ray instrumentation.
|
|
61
|
+
*/
|
|
62
|
+
constructor(opts) {
|
|
63
|
+
this.client = opts?.client ?? xray.captureAWSv3Client(new clientApigatewayv2.ApiGatewayV2Client());
|
|
64
|
+
this.logger = opts?.logger ?? new logger.Logger();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* List every HTTP and WebSocket API in the account and region.
|
|
68
|
+
* Auto-paginated.
|
|
69
|
+
*/
|
|
70
|
+
async getApis(input = {}) {
|
|
71
|
+
this.logger.info('Fetching APIs', { input });
|
|
72
|
+
return collectPages(NextToken => this.client.send(new clientApigatewayv2.GetApisCommand({ ...input, NextToken })), page => page.Items, page => page.NextToken);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Fetch a single route of an HTTP or WebSocket API.
|
|
76
|
+
* @throws NotFoundException when the route does not exist.
|
|
77
|
+
*/
|
|
78
|
+
async getRoute(input) {
|
|
79
|
+
this.logger.info('Fetching API route', { input });
|
|
80
|
+
return this.client.send(new clientApigatewayv2.GetRouteCommand(input));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* List every route of an HTTP or WebSocket API. Auto-paginated.
|
|
84
|
+
*/
|
|
85
|
+
async getRoutes(input) {
|
|
86
|
+
this.logger.info('Fetching API routes', { input });
|
|
87
|
+
return collectPages(NextToken => this.client.send(new clientApigatewayv2.GetRoutesCommand({ ...input, NextToken })), page => page.Items, page => page.NextToken);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Read-only wrapper around the API Gateway (REST API, v1) control-plane client
|
|
93
|
+
* providing structured Powertools logging and X-Ray tracing by default.
|
|
94
|
+
*
|
|
95
|
+
* `getApiKeys` and `getApiKey` always request key values (`includeValues` /
|
|
96
|
+
* `includeValue` is `true`, with no opt-out) — callers needing metadata only
|
|
97
|
+
* should use `APIGatewayClient` directly. Key values appear only in method
|
|
98
|
+
* output; the wrapper never logs output, and no input carries secrets.
|
|
99
|
+
*/
|
|
100
|
+
class APIGatewayService {
|
|
101
|
+
client;
|
|
102
|
+
logger;
|
|
103
|
+
/**
|
|
104
|
+
* @param opts.logger - Optional Powertools logger. Defaults to `new Logger()`,
|
|
105
|
+
* which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
|
|
106
|
+
* @param opts.client - Optional pre-configured `APIGatewayClient`. When
|
|
107
|
+
* supplied, the wrapper does not apply X-Ray instrumentation.
|
|
108
|
+
*/
|
|
109
|
+
constructor(opts) {
|
|
110
|
+
this.client = opts?.client ?? xray.captureAWSv3Client(new clientApiGateway.APIGatewayClient());
|
|
111
|
+
this.logger = opts?.logger ?? new logger.Logger();
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* List every REST API in the account and region. Auto-paginated.
|
|
115
|
+
*/
|
|
116
|
+
async getRestApis(input = {}) {
|
|
117
|
+
this.logger.info('Fetching REST APIs', { input });
|
|
118
|
+
return collectItems(clientApiGateway.paginateGetRestApis({ client: this.client }, input), page => page.items);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* List API keys, including their secret values. Auto-paginated.
|
|
122
|
+
*/
|
|
123
|
+
async getApiKeys(input = {}) {
|
|
124
|
+
this.logger.info('Fetching API keys', { input });
|
|
125
|
+
return collectItems(clientApiGateway.paginateGetApiKeys({ client: this.client }, { ...input, includeValues: true }), page => page.items);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Fetch a single API key, including its secret value.
|
|
129
|
+
* @throws NotFoundException when the key does not exist.
|
|
130
|
+
*/
|
|
131
|
+
async getApiKey(input) {
|
|
132
|
+
this.logger.info('Fetching API key', { input });
|
|
133
|
+
return this.client.send(new clientApiGateway.GetApiKeyCommand({ ...input, includeValue: true }));
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* List every resource (path) of a REST API, which is how REST APIs expose
|
|
137
|
+
* their routes. Pass `embed: ['methods']` to include each resource's
|
|
138
|
+
* methods. Auto-paginated.
|
|
139
|
+
*/
|
|
140
|
+
async getResources(input) {
|
|
141
|
+
this.logger.info('Fetching REST API resources', { input });
|
|
142
|
+
return collectItems(clientApiGateway.paginateGetResources({ client: this.client }, input), page => page.items);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
16
146
|
/**
|
|
17
147
|
* Whether the logger is verbose enough that full SDK inputs — payloads, secret
|
|
18
148
|
* material and PII — may be written to the log.
|
|
@@ -401,6 +531,18 @@ class DynamoDBService {
|
|
|
401
531
|
}
|
|
402
532
|
}
|
|
403
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Split a list into consecutive chunks of at most `size` items, mirroring the
|
|
536
|
+
* per-request caps the AWS APIs enforce on batch operations.
|
|
537
|
+
*/
|
|
538
|
+
function chunk(items, size) {
|
|
539
|
+
const chunks = [];
|
|
540
|
+
for (let i = 0; i < items.length; i += size) {
|
|
541
|
+
chunks.push(items.slice(i, i + size));
|
|
542
|
+
}
|
|
543
|
+
return chunks;
|
|
544
|
+
}
|
|
545
|
+
|
|
404
546
|
const DEFAULT_PRESIGNED_URL_EXPIRES_IN_SECONDS = 3600;
|
|
405
547
|
const DELETE_OBJECTS_BATCH_LIMIT = 1000;
|
|
406
548
|
/**
|
|
@@ -526,14 +668,8 @@ class S3Service {
|
|
|
526
668
|
async listObjects(bucket, prefix) {
|
|
527
669
|
this.logger.info('Listing S3 objects', { input: { bucket, prefix } });
|
|
528
670
|
const paginator = clientS3.paginateListObjectsV2({ client: this.client }, { Bucket: bucket, Prefix: prefix });
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
for (const object of page.Contents ?? []) {
|
|
532
|
-
if (object.Key)
|
|
533
|
-
keys.push(object.Key);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
return keys;
|
|
671
|
+
const objects = await collectItems(paginator, page => page.Contents);
|
|
672
|
+
return objects.flatMap(object => (object.Key ? [object.Key] : []));
|
|
537
673
|
}
|
|
538
674
|
/**
|
|
539
675
|
* List and JSON-parse every object under a bucket and optional prefix.
|
|
@@ -609,8 +745,7 @@ class S3Service {
|
|
|
609
745
|
input: logFullInput ? { bucket, keys } : { bucket, keyCount: keys.length },
|
|
610
746
|
});
|
|
611
747
|
const results = [];
|
|
612
|
-
for (
|
|
613
|
-
const batch = keys.slice(i, i + DELETE_OBJECTS_BATCH_LIMIT);
|
|
748
|
+
for (const batch of chunk(keys, DELETE_OBJECTS_BATCH_LIMIT)) {
|
|
614
749
|
results.push(await this.client.send(new clientS3.DeleteObjectsCommand({
|
|
615
750
|
Bucket: bucket,
|
|
616
751
|
Delete: { Objects: batch.map(Key => ({ Key })) },
|
|
@@ -752,12 +887,7 @@ class SchedulerService {
|
|
|
752
887
|
async listSchedules(input) {
|
|
753
888
|
this.logger.info('Listing schedules', { input });
|
|
754
889
|
const paginator = clientScheduler.paginateListSchedules({ client: this.client }, input ?? {});
|
|
755
|
-
|
|
756
|
-
for await (const page of paginator) {
|
|
757
|
-
if (page.Schedules)
|
|
758
|
-
schedules.push(...page.Schedules);
|
|
759
|
-
}
|
|
760
|
-
return schedules;
|
|
890
|
+
return collectItems(paginator, page => page.Schedules);
|
|
761
891
|
}
|
|
762
892
|
/**
|
|
763
893
|
* Create a new schedule group. Groups are containers for schedules and are
|
|
@@ -790,12 +920,7 @@ class SchedulerService {
|
|
|
790
920
|
async listScheduleGroups(input) {
|
|
791
921
|
this.logger.info('Listing schedule groups', { input });
|
|
792
922
|
const paginator = clientScheduler.paginateListScheduleGroups({ client: this.client }, input ?? {});
|
|
793
|
-
|
|
794
|
-
for await (const page of paginator) {
|
|
795
|
-
if (page.ScheduleGroups)
|
|
796
|
-
groups.push(...page.ScheduleGroups);
|
|
797
|
-
}
|
|
798
|
-
return groups;
|
|
923
|
+
return collectItems(paginator, page => page.ScheduleGroups);
|
|
799
924
|
}
|
|
800
925
|
}
|
|
801
926
|
|
|
@@ -983,12 +1108,7 @@ class StepFunctionsService {
|
|
|
983
1108
|
async listExecutions(input) {
|
|
984
1109
|
this.logger.info('Listing Step Functions executions', { input });
|
|
985
1110
|
const paginator = clientSfn.paginateListExecutions({ client: this.client }, input);
|
|
986
|
-
|
|
987
|
-
for await (const page of paginator) {
|
|
988
|
-
if (page.executions)
|
|
989
|
-
executions.push(...page.executions);
|
|
990
|
-
}
|
|
991
|
-
return executions;
|
|
1111
|
+
return collectItems(paginator, page => page.executions);
|
|
992
1112
|
}
|
|
993
1113
|
/**
|
|
994
1114
|
* Start a new Step Functions execution.
|
|
@@ -1154,17 +1274,46 @@ class SNSService {
|
|
|
1154
1274
|
input: logFullInput ? input : { TopicArn: input.TopicArn, entryCount: entries.length },
|
|
1155
1275
|
});
|
|
1156
1276
|
const results = [];
|
|
1157
|
-
for (
|
|
1158
|
-
const chunk = entries.slice(i, i + PUBLISH_BATCH_LIMIT);
|
|
1277
|
+
for (const batch of chunk(entries, PUBLISH_BATCH_LIMIT)) {
|
|
1159
1278
|
results.push(await this.client.send(new clientSns.PublishBatchCommand({
|
|
1160
1279
|
...input,
|
|
1161
|
-
PublishBatchRequestEntries:
|
|
1280
|
+
PublishBatchRequestEntries: batch,
|
|
1162
1281
|
})));
|
|
1163
1282
|
}
|
|
1164
1283
|
return results;
|
|
1165
1284
|
}
|
|
1166
1285
|
}
|
|
1167
1286
|
|
|
1287
|
+
/**
|
|
1288
|
+
* Thrown by the batch methods once every chunk has been sent and at least one
|
|
1289
|
+
* entry was rejected.
|
|
1290
|
+
*
|
|
1291
|
+
* `results` holds the raw SDK output of every chunk, so the outputs of the
|
|
1292
|
+
* entries that succeeded (message ids, sequence numbers) stay readable.
|
|
1293
|
+
* `failed` is the normalised list of rejected entries across all chunks.
|
|
1294
|
+
*
|
|
1295
|
+
* Match on `name` rather than `instanceof` if both the CJS and ESM builds of
|
|
1296
|
+
* this package may be loaded in one process.
|
|
1297
|
+
*/
|
|
1298
|
+
class BatchOperationError extends Error {
|
|
1299
|
+
results;
|
|
1300
|
+
failed;
|
|
1301
|
+
name = 'BatchOperationError';
|
|
1302
|
+
constructor(results, failed) {
|
|
1303
|
+
super(`Batch operation failed for ${failed.length} entries (${distinctCodes(failed).join(', ')})`);
|
|
1304
|
+
this.results = results;
|
|
1305
|
+
this.failed = failed;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Distinct error codes in first-seen order, for the error message and the
|
|
1310
|
+
* warning log line.
|
|
1311
|
+
*/
|
|
1312
|
+
function distinctCodes(failed) {
|
|
1313
|
+
const codes = failed.flatMap(entry => (entry.code === undefined ? [] : [entry.code]));
|
|
1314
|
+
return [...new Set(codes)];
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1168
1317
|
const SQS_BATCH_LIMIT = 10;
|
|
1169
1318
|
const SQS_MESSAGE_BODY_MAX_BYTES = 256 * 1024;
|
|
1170
1319
|
/**
|
|
@@ -1258,10 +1407,36 @@ class SQSService {
|
|
|
1258
1407
|
this.logger.info('Deleting SQS message', { input });
|
|
1259
1408
|
return this.client.send(new clientSqs.DeleteMessageCommand(input));
|
|
1260
1409
|
}
|
|
1410
|
+
/**
|
|
1411
|
+
* SQS reports rejected entries under `Failed` on an otherwise successful
|
|
1412
|
+
* response, so a resolved chunk does not mean every entry was accepted.
|
|
1413
|
+
* Only id, code and message are copied out — never the entry itself — so
|
|
1414
|
+
* neither the error nor the warning can leak a payload.
|
|
1415
|
+
*/
|
|
1416
|
+
throwIfAnyFailed(operation, results) {
|
|
1417
|
+
const failed = results.flatMap(result => (result.Failed ?? []).map(({ Id, Code, Message }) => ({
|
|
1418
|
+
id: Id,
|
|
1419
|
+
code: Code,
|
|
1420
|
+
message: Message,
|
|
1421
|
+
})));
|
|
1422
|
+
if (failed.length === 0)
|
|
1423
|
+
return results;
|
|
1424
|
+
this.logger.warn(`${operation} had rejected entries`, {
|
|
1425
|
+
failedCount: failed.length,
|
|
1426
|
+
codes: distinctCodes(failed),
|
|
1427
|
+
});
|
|
1428
|
+
throw new BatchOperationError(results, failed);
|
|
1429
|
+
}
|
|
1261
1430
|
/**
|
|
1262
1431
|
* Send a batch of messages to an SQS queue. The SQS API caps
|
|
1263
1432
|
* SendMessageBatch at 10 entries per request, so this method auto-chunks
|
|
1264
1433
|
* the caller's entries and sends one request per chunk.
|
|
1434
|
+
*
|
|
1435
|
+
* Every chunk is sent before the outcome is judged. If SQS rejected any
|
|
1436
|
+
* entry, a {@link BatchOperationError} is then thrown carrying the
|
|
1437
|
+
* per-chunk results and the failed entries. Request-level SDK exceptions
|
|
1438
|
+
* (throttling, access denied) propagate unchanged and immediately, so
|
|
1439
|
+
* earlier chunks may already have been sent.
|
|
1265
1440
|
*/
|
|
1266
1441
|
async sendMessageBatch(input) {
|
|
1267
1442
|
const entries = input.Entries ?? [];
|
|
@@ -1273,16 +1448,22 @@ class SQSService {
|
|
|
1273
1448
|
input: logFullInput ? input : { QueueUrl: input.QueueUrl, entryCount: entries.length },
|
|
1274
1449
|
});
|
|
1275
1450
|
const results = [];
|
|
1276
|
-
for (
|
|
1277
|
-
|
|
1278
|
-
results.push(await this.client.send(new clientSqs.SendMessageBatchCommand({ ...input, Entries: chunk })));
|
|
1451
|
+
for (const batch of chunk(entries, SQS_BATCH_LIMIT)) {
|
|
1452
|
+
results.push(await this.client.send(new clientSqs.SendMessageBatchCommand({ ...input, Entries: batch })));
|
|
1279
1453
|
}
|
|
1280
|
-
return results;
|
|
1454
|
+
return this.throwIfAnyFailed('SQS sendMessageBatch', results);
|
|
1281
1455
|
}
|
|
1282
1456
|
/**
|
|
1283
1457
|
* Delete a batch of messages from an SQS queue. The SQS API caps
|
|
1284
1458
|
* DeleteMessageBatch at 10 entries per request, so this method auto-chunks
|
|
1285
1459
|
* the caller's entries and sends one request per chunk.
|
|
1460
|
+
*
|
|
1461
|
+
* Every chunk is sent before the outcome is judged. If SQS failed to
|
|
1462
|
+
* delete any message, a {@link BatchOperationError} is then thrown carrying
|
|
1463
|
+
* the per-chunk results and the failed entries; those messages will be
|
|
1464
|
+
* redelivered. Request-level SDK exceptions (throttling, access denied)
|
|
1465
|
+
* propagate unchanged and immediately, so earlier chunks may already have
|
|
1466
|
+
* been deleted.
|
|
1286
1467
|
*/
|
|
1287
1468
|
async deleteMessageBatch(input) {
|
|
1288
1469
|
const entries = input.Entries ?? [];
|
|
@@ -1294,11 +1475,10 @@ class SQSService {
|
|
|
1294
1475
|
input: logFullInput ? input : { QueueUrl: input.QueueUrl, entryCount: entries.length },
|
|
1295
1476
|
});
|
|
1296
1477
|
const results = [];
|
|
1297
|
-
for (
|
|
1298
|
-
|
|
1299
|
-
results.push(await this.client.send(new clientSqs.DeleteMessageBatchCommand({ ...input, Entries: chunk })));
|
|
1478
|
+
for (const batch of chunk(entries, SQS_BATCH_LIMIT)) {
|
|
1479
|
+
results.push(await this.client.send(new clientSqs.DeleteMessageBatchCommand({ ...input, Entries: batch })));
|
|
1300
1480
|
}
|
|
1301
|
-
return results;
|
|
1481
|
+
return this.throwIfAnyFailed('SQS deleteMessageBatch', results);
|
|
1302
1482
|
}
|
|
1303
1483
|
}
|
|
1304
1484
|
|
|
@@ -1387,10 +1567,9 @@ class SSMService {
|
|
|
1387
1567
|
this.logger.info('Fetching SSM parameters', { input: { aliases } });
|
|
1388
1568
|
const names = Object.values(aliases);
|
|
1389
1569
|
const byPath = new Map();
|
|
1390
|
-
for (
|
|
1391
|
-
const chunk = names.slice(i, i + GET_PARAMETERS_LIMIT);
|
|
1570
|
+
for (const batch of chunk(names, GET_PARAMETERS_LIMIT)) {
|
|
1392
1571
|
const response = await this.client.send(new clientSsm.GetParametersCommand({
|
|
1393
|
-
Names:
|
|
1572
|
+
Names: batch,
|
|
1394
1573
|
WithDecryption: true,
|
|
1395
1574
|
}));
|
|
1396
1575
|
for (const parameter of response.Parameters ?? []) {
|
|
@@ -1444,14 +1623,13 @@ class SSMService {
|
|
|
1444
1623
|
input: { path, recursive },
|
|
1445
1624
|
});
|
|
1446
1625
|
const paginator = clientSsm.paginateGetParametersByPath({ client: this.client }, { Path: path, Recursive: recursive, WithDecryption: true });
|
|
1447
|
-
|
|
1448
|
-
for await (const page of paginator) {
|
|
1449
|
-
parameters.push(...(page.Parameters ?? []));
|
|
1450
|
-
}
|
|
1451
|
-
return parameters;
|
|
1626
|
+
return collectItems(paginator, page => page.Parameters);
|
|
1452
1627
|
}
|
|
1453
1628
|
}
|
|
1454
1629
|
|
|
1630
|
+
exports.APIGatewayService = APIGatewayService;
|
|
1631
|
+
exports.APIGatewayV2Service = APIGatewayV2Service;
|
|
1632
|
+
exports.BatchOperationError = BatchOperationError;
|
|
1455
1633
|
exports.DynamoDBService = DynamoDBService;
|
|
1456
1634
|
exports.S3Service = S3Service;
|
|
1457
1635
|
exports.SNSService = SNSService;
|
package/cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aligent/aws-wrappers",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"description": "Opinionated AWS SDK wrappers with Powertools logging and X-Ray tracing",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18"
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@aws-lambda-powertools/logger": "^2.33.1",
|
|
47
|
+
"@aws-sdk/client-api-gateway": "^3.1127.0",
|
|
48
|
+
"@aws-sdk/client-apigatewayv2": "^3.1127.0",
|
|
47
49
|
"@aws-sdk/client-dynamodb": "^3.1127.0",
|
|
48
50
|
"@aws-sdk/client-s3": "^3.1127.0",
|
|
49
51
|
"@aws-sdk/client-scheduler": "^3.1127.0",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
|
|
2
|
+
import { APIGatewayClient, ApiKey, GetApiKeyCommandInput, GetApiKeyCommandOutput, GetApiKeysCommandInput, GetResourcesCommandInput, GetRestApisCommandInput, Resource, RestApi } from '@aws-sdk/client-api-gateway';
|
|
3
|
+
/**
|
|
4
|
+
* Read-only wrapper around the API Gateway (REST API, v1) control-plane client
|
|
5
|
+
* providing structured Powertools logging and X-Ray tracing by default.
|
|
6
|
+
*
|
|
7
|
+
* `getApiKeys` and `getApiKey` always request key values (`includeValues` /
|
|
8
|
+
* `includeValue` is `true`, with no opt-out) — callers needing metadata only
|
|
9
|
+
* should use `APIGatewayClient` directly. Key values appear only in method
|
|
10
|
+
* output; the wrapper never logs output, and no input carries secrets.
|
|
11
|
+
*/
|
|
12
|
+
export declare class APIGatewayService {
|
|
13
|
+
private readonly client;
|
|
14
|
+
private readonly logger;
|
|
15
|
+
/**
|
|
16
|
+
* @param opts.logger - Optional Powertools logger. Defaults to `new Logger()`,
|
|
17
|
+
* which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
|
|
18
|
+
* @param opts.client - Optional pre-configured `APIGatewayClient`. When
|
|
19
|
+
* supplied, the wrapper does not apply X-Ray instrumentation.
|
|
20
|
+
*/
|
|
21
|
+
constructor(opts?: {
|
|
22
|
+
logger?: LoggerInterface;
|
|
23
|
+
client?: APIGatewayClient;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* List every REST API in the account and region. Auto-paginated.
|
|
27
|
+
*/
|
|
28
|
+
getRestApis(input?: GetRestApisCommandInput): Promise<RestApi[]>;
|
|
29
|
+
/**
|
|
30
|
+
* List API keys, including their secret values. Auto-paginated.
|
|
31
|
+
*/
|
|
32
|
+
getApiKeys(input?: Omit<GetApiKeysCommandInput, 'includeValues'>): Promise<ApiKey[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Fetch a single API key, including its secret value.
|
|
35
|
+
* @throws NotFoundException when the key does not exist.
|
|
36
|
+
*/
|
|
37
|
+
getApiKey(input: Omit<GetApiKeyCommandInput, 'includeValue'>): Promise<GetApiKeyCommandOutput>;
|
|
38
|
+
/**
|
|
39
|
+
* List every resource (path) of a REST API, which is how REST APIs expose
|
|
40
|
+
* their routes. Pass `embed: ['methods']` to include each resource's
|
|
41
|
+
* methods. Auto-paginated.
|
|
42
|
+
*/
|
|
43
|
+
getResources(input: GetResourcesCommandInput): Promise<Resource[]>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=api-gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-gateway.d.ts","sourceRoot":"","sources":["../../../../src/api-gateway/api-gateway.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACH,gBAAgB,EAChB,MAAM,EAEN,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EAIvB,QAAQ,EACR,OAAO,EACV,MAAM,6BAA6B,CAAC;AAIrC;;;;;;;;GAQG;AACH,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;KAAE;IAK1E;;OAEG;IACG,WAAW,CAAC,KAAK,GAAE,uBAA4B,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQ1E;;OAEG;IACG,UAAU,CAAC,KAAK,GAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,CAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQ9F;;;OAGG;IACG,SAAS,CACX,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,GACnD,OAAO,CAAC,sBAAsB,CAAC;IAKlC;;;;OAIG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAO3E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
|
|
2
|
+
import { Api, ApiGatewayV2Client, GetApisCommandInput, GetRouteCommandInput, GetRouteCommandOutput, GetRoutesCommandInput, Route } from '@aws-sdk/client-apigatewayv2';
|
|
3
|
+
/**
|
|
4
|
+
* Read-only wrapper around the API Gateway v2 (HTTP and WebSocket APIs)
|
|
5
|
+
* control-plane client providing structured Powertools logging and X-Ray
|
|
6
|
+
* tracing by default.
|
|
7
|
+
*
|
|
8
|
+
* The v2 SDK ships no paginators for `GetApis` or `GetRoutes`, so list methods
|
|
9
|
+
* follow `NextToken` manually.
|
|
10
|
+
*/
|
|
11
|
+
export declare class APIGatewayV2Service {
|
|
12
|
+
private readonly client;
|
|
13
|
+
private readonly logger;
|
|
14
|
+
/**
|
|
15
|
+
* @param opts.logger - Optional Powertools logger. Defaults to `new Logger()`,
|
|
16
|
+
* which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
|
|
17
|
+
* @param opts.client - Optional pre-configured `ApiGatewayV2Client`. When
|
|
18
|
+
* supplied, the wrapper does not apply X-Ray instrumentation.
|
|
19
|
+
*/
|
|
20
|
+
constructor(opts?: {
|
|
21
|
+
logger?: LoggerInterface;
|
|
22
|
+
client?: ApiGatewayV2Client;
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* List every HTTP and WebSocket API in the account and region.
|
|
26
|
+
* Auto-paginated.
|
|
27
|
+
*/
|
|
28
|
+
getApis(input?: Omit<GetApisCommandInput, 'NextToken'>): Promise<Api[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Fetch a single route of an HTTP or WebSocket API.
|
|
31
|
+
* @throws NotFoundException when the route does not exist.
|
|
32
|
+
*/
|
|
33
|
+
getRoute(input: GetRouteCommandInput): Promise<GetRouteCommandOutput>;
|
|
34
|
+
/**
|
|
35
|
+
* List every route of an HTTP or WebSocket API. Auto-paginated.
|
|
36
|
+
*/
|
|
37
|
+
getRoutes(input: Omit<GetRoutesCommandInput, 'NextToken'>): Promise<Route[]>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=api-gateway-v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-gateway-v2.d.ts","sourceRoot":"","sources":["../../../../src/api-gateway-v2/api-gateway-v2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACH,GAAG,EACH,kBAAkB,EAElB,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,EAErB,qBAAqB,EACrB,KAAK,EACR,MAAM,8BAA8B,CAAC;AAItC;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,kBAAkB,CAAA;KAAE;IAK5E;;;OAGG;IACG,OAAO,CAAC,KAAK,GAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IASjF;;;OAGG;IACG,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAK3E;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;CAQrF"}
|
package/cjs/src/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { APIGatewayV2Service } from './api-gateway-v2/api-gateway-v2.js';
|
|
2
|
+
export { APIGatewayService } from './api-gateway/api-gateway.js';
|
|
1
3
|
export { DynamoDBService } from './dynamodb/dynamodb.js';
|
|
2
4
|
export { S3Service } from './s3/s3.js';
|
|
3
5
|
export { SchedulerService } from './scheduler/scheduler.js';
|
|
@@ -6,4 +8,6 @@ export { StepFunctionsService } from './sfn/sfn.js';
|
|
|
6
8
|
export { SNSService } from './sns/sns.js';
|
|
7
9
|
export { SQSService } from './sqs/sqs.js';
|
|
8
10
|
export { SSMService } from './ssm/ssm.js';
|
|
11
|
+
export { BatchOperationError } from './util/batch-operation-error.js';
|
|
12
|
+
export type { BatchFailedEntry } from './util/batch-operation-error.js';
|
|
9
13
|
//# sourceMappingURL=index.d.ts.map
|
package/cjs/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC"}
|
package/cjs/src/s3/s3.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../../../src/s3/s3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,sBAAsB,EACtB,uBAAuB,EAEvB,wBAAwB,EACxB,yBAAyB,EAEzB,0BAA0B,EAE1B,qBAAqB,EACrB,sBAAsB,EAEtB,sBAAsB,EACtB,uBAAuB,EAGvB,qBAAqB,EACrB,sBAAsB,EACtB,QAAQ,EACX,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../../../src/s3/s3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,sBAAsB,EACtB,uBAAuB,EAEvB,wBAAwB,EACxB,yBAAyB,EAEzB,0BAA0B,EAE1B,qBAAqB,EACrB,sBAAsB,EAEtB,sBAAsB,EACtB,uBAAuB,EAGvB,qBAAqB,EACrB,sBAAsB,EACtB,QAAQ,EACX,MAAM,oBAAoB,CAAC;AAW5B,gDAAgD;AAChD,KAAK,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;AAEvF,oDAAoD;AACpD,KAAK,kBAAkB,CAAC,CAAC,IAAI;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAiBF;;;;;;;;;;;GAWG;AACH,qBAAa,SAAS;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEz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AA+B,GACvC,OAAO,CAAC,gCAAgC,CAAC;IAK5C;;OAEG;IACG,gBAAgB,CAClB,KAAK,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;IAKzC;;;;OAIG;IACG,mBAAmB,CACrB,KAAK,EAAE,+BAA+B,GACvC,OAAO,CAAC,gCAAgC,CAAC;IAK5C;;;OAGG;IACG,kBAAkB,CACpB,KAAK,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAKrC"}
|
package/cjs/src/sfn/sfn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sfn.d.ts","sourceRoot":"","sources":["../../../../src/sfn/sfn.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,6BAA6B,EAC7B,8BAA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAE1B,SAAS,EAET,0BAA0B,EAC1B,2BAA2B,EAE3B,yBAAyB,EACzB,0BAA0B,EAC7B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"sfn.d.ts","sourceRoot":"","sources":["../../../../src/sfn/sfn.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,6BAA6B,EAC7B,8BAA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAE1B,SAAS,EAET,0BAA0B,EAC1B,2BAA2B,EAE3B,yBAAyB,EACzB,0BAA0B,EAC7B,MAAM,qBAAqB,CAAC;AAgB7B;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAKnE;;;;OAIG;IACG,cAAc,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAMrF;;OAEG;IACG,cAAc,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAO7F;;OAEG;IACG,iBAAiB,CACnB,KAAK,EAAE,6BAA6B,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAK1C;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC;CAI7F"}
|
package/cjs/src/sns/sns.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sns.d.ts","sourceRoot":"","sources":["../../../../src/sns/sns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,wBAAwB,EACxB,yBAAyB,EAGzB,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACZ,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"sns.d.ts","sourceRoot":"","sources":["../../../../src/sns/sns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,wBAAwB,EACxB,yBAAyB,EAGzB,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAwB7B;;;;;;;GAOG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;;;;;;;;OAUG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE;IAMvF;;;;;;;OAOG;IACG,OAAO,CACT,KAAK,EAAE,mBAAmB,EAC1B,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9B,OAAO,CAAC,oBAAoB,CAAC;IAShC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IA0BvB;;;;;;OAMG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAsB5F"}
|