@circlesac/aws-lambda-toolkit
Advanced tools
| import { SQSHandler } from "aws-lambda"; | ||
| export declare function Account(): Promise<string>; | ||
| export declare function QueueUrl(region: string, accountId: string, queueName: string): string; | ||
@@ -3,0 +4,0 @@ export declare class SQSProcessor { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"sqs.d.ts","sourceRoot":"","sources":["../../src/sqs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,UAAU,EAAE,MAAM,YAAY,CAAA;AAEjD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAK5E;AAED,qBAAa,YAAY;IACxB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA8B/D"} | ||
| {"version":3,"file":"sqs.d.ts","sourceRoot":"","sources":["../../src/sqs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,UAAU,EAAE,MAAM,YAAY,CAAA;AAEjD,wBAAsB,OAAO,oBAI5B;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAK5E;AAED,qBAAa,YAAY;IACxB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA8B/D"} |
+8
-0
@@ -11,3 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
| import { DeleteMessageCommand, SQSClient } from "@aws-sdk/client-sqs"; | ||
| import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts"; | ||
| import { $trycatch } from "@tszen/trycatch"; | ||
| export function Account() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const sts = new STSClient(); | ||
| const { Account } = yield sts.send(new GetCallerIdentityCommand({})); | ||
| return Account; | ||
| }); | ||
| } | ||
| export function QueueUrl(region, accountId, queueName) { | ||
@@ -14,0 +22,0 @@ if (accountId === "000000000000") { |
@@ -0,1 +1,2 @@ | ||
| export declare function Account(): Promise<any>; | ||
| export declare function QueueUrl(region: string, accountId: string, queueName: string): string; | ||
@@ -2,0 +3,0 @@ export declare class SQSProcessor { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"sqs.d.ts","sourceRoot":"","sources":["../../src/sqs.ts"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAK5E;AAED,qBAAa,YAAY;IACxB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA8B/D"} | ||
| {"version":3,"file":"sqs.d.ts","sourceRoot":"","sources":["../../src/sqs.ts"],"names":[],"mappings":"AAKA,wBAAsB,OAAO,iBAI5B;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAK5E;AAED,qBAAa,YAAY;IACxB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA8B/D"} |
+10
-0
@@ -29,3 +29,13 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) { | ||
| import { DeleteMessageCommand, SQSClient } from "@aws-sdk/client-sqs"; | ||
| import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts"; | ||
| import { $trycatch } from "@tszen/trycatch"; | ||
| export function Account() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| const sts = new STSClient(); | ||
| const { | ||
| Account | ||
| } = yield sts.send(new GetCallerIdentityCommand({})); | ||
| return Account; | ||
| }); | ||
| } | ||
| export function QueueUrl(region, accountId, queueName) { | ||
@@ -32,0 +42,0 @@ if (accountId === "000000000000") { |
+2
-1
| { | ||
| "name": "@circlesac/aws-lambda-toolkit", | ||
| "version": "0.0.3", | ||
| "version": "0.0.4", | ||
| "type": "module", | ||
@@ -16,2 +16,3 @@ "scripts": { | ||
| "@aws-sdk/client-sqs": "^3.777.0", | ||
| "@aws-sdk/client-sts": "^3.777.0", | ||
| "@tszen/trycatch": "^0.1.0" | ||
@@ -18,0 +19,0 @@ }, |
8615
10.26%155
14.81%3
50%+ Added
+ Added