@awsless/awsless 0.0.418 → 0.0.420

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/dist/bin.js CHANGED
@@ -7670,7 +7670,7 @@ var ArchitectureSchema = z7.enum(["x86_64", "arm64"]).describe("The instruction
7670
7670
  var RetryAttemptsSchema = z7.number().int().min(0).max(2).describe(
7671
7671
  "The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
7672
7672
  );
7673
- var NodeRuntimeSchema = z7.enum(["nodejs18.x", "nodejs20.x"]).describe("The identifier of the function's runtime.");
7673
+ var NodeRuntimeSchema = z7.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]).describe("The identifier of the function's runtime.");
7674
7674
  var ContainerRuntimeSchema = z7.literal("container").describe("The identifier of the function's runtime.");
7675
7675
  var RuntimeSchema = NodeRuntimeSchema.or(ContainerRuntimeSchema);
7676
7676
  var ActionSchema = z7.string();
@@ -15247,6 +15247,12 @@ var resource = (program2) => {
15247
15247
  };
15248
15248
 
15249
15249
  // src/cli/command/run.ts
15250
+ import { DynamoDBClient, dynamoDBClient } from "@awsless/dynamodb";
15251
+ import { iotClient, IoTDataPlaneClient } from "@awsless/iot";
15252
+ import { LambdaClient, lambdaClient } from "@awsless/lambda";
15253
+ import { S3Client as S3Client2, s3Client } from "@awsless/s3";
15254
+ import { SNSClient, snsClient } from "@awsless/sns";
15255
+ import { SQSClient, sqsClient } from "@awsless/sqs";
15250
15256
  import { isCancel as isCancel7, select as select2 } from "@clack/prompts";
15251
15257
  import { tsImport } from "tsx/esm/api";
15252
15258
  var run = (program2) => {
@@ -15280,6 +15286,8 @@ var run = (program2) => {
15280
15286
  throw new ExpectedError(`The provided command doesn't exist.`);
15281
15287
  }
15282
15288
  process.env.APP = appConfig.name;
15289
+ process.env.AWS_REGION = region;
15290
+ process.env.AWS_ACCOUNT_ID = accountId;
15283
15291
  const module = await tsImport(command.file, {
15284
15292
  parentURL: import.meta.url
15285
15293
  });
@@ -15287,6 +15295,12 @@ var run = (program2) => {
15287
15295
  if (!handler) {
15288
15296
  throw new ExpectedError(`No "${command.handler}" handler found.`);
15289
15297
  }
15298
+ dynamoDBClient.set(new DynamoDBClient({ region, credentials }));
15299
+ lambdaClient.set(new LambdaClient({ region, credentials }));
15300
+ snsClient.set(new SNSClient({ region, credentials }));
15301
+ iotClient.set(new IoTDataPlaneClient({ region, credentials }));
15302
+ sqsClient.set(new SQSClient({ region, credentials }));
15303
+ s3Client.set(new S3Client2({ region, credentials }));
15290
15304
  const result = await task("Running", (update) => {
15291
15305
  const options = new CommandOptions(program2.args);
15292
15306
  return handler(options, {
@@ -117,7 +117,7 @@ var ArchitectureSchema = z5.enum(["x86_64", "arm64"]).describe("The instruction
117
117
  var RetryAttemptsSchema = z5.number().int().min(0).max(2).describe(
118
118
  "The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
119
119
  );
120
- var NodeRuntimeSchema = z5.enum(["nodejs18.x", "nodejs20.x"]).describe("The identifier of the function's runtime.");
120
+ var NodeRuntimeSchema = z5.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]).describe("The identifier of the function's runtime.");
121
121
  var ContainerRuntimeSchema = z5.literal("container").describe("The identifier of the function's runtime.");
122
122
  var RuntimeSchema = NodeRuntimeSchema.or(ContainerRuntimeSchema);
123
123
  var ActionSchema = z5.string();
Binary file