@awsless/awsless 0.0.600 → 0.0.601

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
@@ -1085,11 +1085,11 @@ var FunctionDefaultSchema = z15.object({
1085
1085
  // container
1086
1086
  warm: WarmSchema.default(0),
1087
1087
  vpc: VPCSchema.default(false),
1088
- log: LogSchema.default(true).transform((log28) => ({
1089
- retention: log28.retention ?? days(7),
1090
- level: "level" in log28 ? log28.level : "error",
1091
- system: "system" in log28 ? log28.system : "warn",
1092
- format: "format" in log28 ? log28.format : "json"
1088
+ log: LogSchema.default(true).transform((log29) => ({
1089
+ retention: log29.retention ?? days(7),
1090
+ level: "level" in log29 ? log29.level : "error",
1091
+ system: "system" in log29 ? log29.system : "warn",
1092
+ format: "format" in log29 ? log29.format : "json"
1093
1093
  })),
1094
1094
  timeout: TimeoutSchema.default("10 seconds"),
1095
1095
  memorySize: MemorySizeSchema.default("128 MB"),
@@ -1617,8 +1617,8 @@ var InstanceDefaultSchema = z25.object({
1617
1617
  permissions: PermissionsSchema2.optional(),
1618
1618
  healthCheck: HealthCheckSchema.optional(),
1619
1619
  // restartPolicy: RestartPolicySchema.default({ enabled: true }),
1620
- log: LogSchema2.default(true).transform((log28) => ({
1621
- retention: log28.retention ?? days4(7)
1620
+ log: LogSchema2.default(true).transform((log29) => ({
1621
+ retention: log29.retention ?? days4(7)
1622
1622
  }))
1623
1623
  }).default({});
1624
1624
 
@@ -6535,7 +6535,7 @@ var buildExecutable = async (input, outputPath, architecture) => {
6535
6535
  }
6536
6536
  if (!result.success) {
6537
6537
  throw new ExpectedError(`Executable build failed:
6538
- ${result.logs?.map((log28) => log28.message).join("\n")}`);
6538
+ ${result.logs?.map((log29) => log29.message).join("\n")}`);
6539
6539
  }
6540
6540
  const file = await readFile4(filePath);
6541
6541
  return {
@@ -8634,12 +8634,12 @@ var del2 = (program2) => {
8634
8634
  profile,
8635
8635
  region
8636
8636
  });
8637
- await task("Deleting the stacks to AWS", async (update) => {
8637
+ await task("Deleting the stacks to AWS", async (update2) => {
8638
8638
  await workspace.delete(app, {
8639
8639
  filters: stackNames
8640
8640
  });
8641
8641
  await pullRemoteState(app, state2);
8642
- update("Done deleting the stacks to AWS.");
8642
+ update2("Done deleting the stacks to AWS.");
8643
8643
  });
8644
8644
  playSuccessSound();
8645
8645
  return "Your app has been deleted!";
@@ -8828,10 +8828,10 @@ var startTest = async (props) => {
8828
8828
  tests.push(entry);
8829
8829
  if ("task" in test2) {
8830
8830
  const task2 = test2.task;
8831
- for (const log28 of task2.logs ?? []) {
8831
+ for (const log29 of task2.logs ?? []) {
8832
8832
  entry.logs.push({
8833
- time: log28.time,
8834
- text: log28.content
8833
+ time: log29.time,
8834
+ text: log29.content
8835
8835
  });
8836
8836
  }
8837
8837
  }
@@ -8899,7 +8899,7 @@ var logTestLogs = (event) => {
8899
8899
  ].join(" "),
8900
8900
  color.line(icon.dot)
8901
8901
  );
8902
- log16.message(test2.logs.map((log28) => log28.text).join("\n"));
8902
+ log16.message(test2.logs.map((log29) => log29.text).join("\n"));
8903
8903
  }
8904
8904
  }
8905
8905
  };
@@ -9124,7 +9124,7 @@ import {
9124
9124
  } from "@aws-sdk/client-cognito-identity-provider";
9125
9125
  import { log as log19, prompt as prompt8 } from "@awsless/clui";
9126
9126
  var create = (program2) => {
9127
- program2.command("create").argument("[name]", "The name of the auth instance").description("Create an user for your userpool").action(async (name) => {
9127
+ program2.command("create").argument("[name]", "The name of the auth instance").description("Create an user in your userpool").action(async (name) => {
9128
9128
  await layout("auth user create", async ({ appConfig, stackConfigs }) => {
9129
9129
  const region = appConfig.region;
9130
9130
  const profile = appConfig.profile;
@@ -9258,8 +9258,195 @@ var create = (program2) => {
9258
9258
  });
9259
9259
  };
9260
9260
 
9261
+ // src/cli/command/auth/user/update.ts
9262
+ import {
9263
+ AdminAddUserToGroupCommand as AdminAddUserToGroupCommand2,
9264
+ AdminGetUserCommand,
9265
+ AdminListGroupsForUserCommand,
9266
+ AdminRemoveUserFromGroupCommand,
9267
+ AdminSetUserPasswordCommand as AdminSetUserPasswordCommand2,
9268
+ CognitoIdentityProviderClient as CognitoIdentityProviderClient2,
9269
+ UserNotFoundException
9270
+ } from "@aws-sdk/client-cognito-identity-provider";
9271
+ import { log as log20, prompt as prompt9 } from "@awsless/clui";
9272
+ var update = (program2) => {
9273
+ program2.command("update").argument("[name]", "The name of the auth instance").description("Update an user in your userpool").action(async (name) => {
9274
+ await layout("auth user update", async ({ appConfig, stackConfigs }) => {
9275
+ const region = appConfig.region;
9276
+ const profile = appConfig.profile;
9277
+ const credentials = await getCredentials(profile);
9278
+ const accountId = await getAccountId(credentials, region);
9279
+ if (Object.keys(appConfig.defaults.auth ?? {}).length === 0) {
9280
+ throw new ExpectedError("No auth resources are defined.");
9281
+ }
9282
+ if (!name) {
9283
+ name = await prompt9.select({
9284
+ message: "Select the auth userpool:",
9285
+ initialValue: Object.keys(appConfig.defaults.auth).at(0),
9286
+ options: Object.keys(appConfig.defaults.auth).map((name2) => ({
9287
+ label: name2,
9288
+ value: name2
9289
+ }))
9290
+ });
9291
+ }
9292
+ const props = appConfig.defaults.auth[name];
9293
+ if (!props) {
9294
+ throw new ExpectedError(`Provided auth name doesn't exist inside your app config.`);
9295
+ }
9296
+ const userPoolId = await log20.task({
9297
+ initialMessage: "Loading auth userpool...",
9298
+ successMessage: "Done loading auth userpool.",
9299
+ errorMessage: "Failed loading auth userpool.",
9300
+ async task() {
9301
+ const { shared, app } = createApp({ appConfig, stackConfigs, accountId });
9302
+ const { workspace } = await createWorkSpace({
9303
+ credentials,
9304
+ accountId,
9305
+ profile,
9306
+ region
9307
+ });
9308
+ await workspace.hydrate(app);
9309
+ try {
9310
+ return await shared.entry("auth", `user-pool-id`, name);
9311
+ } catch (_) {
9312
+ throw new ExpectedError(`The auth userpool hasn't been deployed yet.`);
9313
+ }
9314
+ }
9315
+ });
9316
+ const username = await prompt9.text({
9317
+ message: "Username:",
9318
+ validate(value) {
9319
+ if (!value) {
9320
+ return "Required";
9321
+ }
9322
+ return;
9323
+ }
9324
+ });
9325
+ const client = new CognitoIdentityProviderClient2({
9326
+ region,
9327
+ credentials
9328
+ });
9329
+ const oldGroups = await log20.task({
9330
+ initialMessage: "Fetching user info...",
9331
+ successMessage: "Done fetching user info.",
9332
+ errorMessage: `Failed fetching user info.`,
9333
+ async task() {
9334
+ try {
9335
+ await client.send(
9336
+ new AdminGetUserCommand({
9337
+ UserPoolId: userPoolId,
9338
+ Username: username
9339
+ })
9340
+ );
9341
+ } catch (error) {
9342
+ if (error instanceof UserNotFoundException) {
9343
+ throw new ExpectedError("User does not exist");
9344
+ }
9345
+ throw error;
9346
+ }
9347
+ const groups = [];
9348
+ let token;
9349
+ do {
9350
+ const result = await client.send(
9351
+ new AdminListGroupsForUserCommand({
9352
+ UserPoolId: userPoolId,
9353
+ Username: username,
9354
+ NextToken: token
9355
+ })
9356
+ );
9357
+ groups.push(...result.Groups?.map((g) => g.GroupName) ?? []);
9358
+ token = result.NextToken;
9359
+ } while (token);
9360
+ return groups;
9361
+ }
9362
+ });
9363
+ const changePass = await prompt9.confirm({
9364
+ message: `Do you wanna change the user's password`,
9365
+ initialValue: false
9366
+ });
9367
+ let password;
9368
+ if (changePass) {
9369
+ password = await prompt9.password({
9370
+ message: "New Password:",
9371
+ validate(value) {
9372
+ if (!value) {
9373
+ return "Required";
9374
+ }
9375
+ if (value.length < props.password.minLength) {
9376
+ return `Min length is ${props.password.minLength}`;
9377
+ }
9378
+ if (props.password.lowercase && value.toUpperCase() === value) {
9379
+ return `Should include lowercase characters`;
9380
+ }
9381
+ if (props.password.uppercase && value.toLowerCase() === value) {
9382
+ return `Should include uppercase characters`;
9383
+ }
9384
+ if (props.password.numbers && !/\d/.test(value)) {
9385
+ return `Should include numbers`;
9386
+ }
9387
+ if (props.password.symbols && !/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(value)) {
9388
+ return `Should include symbols`;
9389
+ }
9390
+ return;
9391
+ }
9392
+ });
9393
+ }
9394
+ let newGroups = [];
9395
+ if (props.groups.length > 0) {
9396
+ newGroups = await prompt9.multiSelect({
9397
+ message: "Groups:",
9398
+ required: false,
9399
+ initialValues: oldGroups,
9400
+ options: props.groups.map((g) => ({
9401
+ value: g
9402
+ }))
9403
+ });
9404
+ }
9405
+ await log20.task({
9406
+ initialMessage: "Updating user...",
9407
+ successMessage: "User updated.",
9408
+ errorMessage: "Failed updating user.",
9409
+ async task() {
9410
+ if (changePass && password) {
9411
+ await client.send(
9412
+ new AdminSetUserPasswordCommand2({
9413
+ UserPoolId: userPoolId,
9414
+ Username: username,
9415
+ Password: password,
9416
+ Permanent: true
9417
+ })
9418
+ );
9419
+ }
9420
+ const oldGroupSet = new Set(oldGroups);
9421
+ const newGroupSet = new Set(newGroups);
9422
+ const removedGroups = oldGroupSet.difference(newGroupSet);
9423
+ const addedGroups = newGroupSet.difference(oldGroupSet);
9424
+ for (const group of removedGroups) {
9425
+ await client.send(
9426
+ new AdminRemoveUserFromGroupCommand({
9427
+ UserPoolId: userPoolId,
9428
+ Username: username,
9429
+ GroupName: group
9430
+ })
9431
+ );
9432
+ }
9433
+ for (const group of addedGroups) {
9434
+ await client.send(
9435
+ new AdminAddUserToGroupCommand2({
9436
+ UserPoolId: userPoolId,
9437
+ Username: username,
9438
+ GroupName: group
9439
+ })
9440
+ );
9441
+ }
9442
+ }
9443
+ });
9444
+ });
9445
+ });
9446
+ };
9447
+
9261
9448
  // src/cli/command/auth/user/index.ts
9262
- var commands2 = [create];
9449
+ var commands2 = [create, update];
9263
9450
  var user = (program2) => {
9264
9451
  const command = program2.command("user").description(`Manage auth users`);
9265
9452
  commands2.forEach((cb) => cb(command));
@@ -9273,7 +9460,7 @@ var auth = (program2) => {
9273
9460
  };
9274
9461
 
9275
9462
  // src/cli/command/bind.ts
9276
- import { log as log20 } from "@awsless/clui";
9463
+ import { log as log21 } from "@awsless/clui";
9277
9464
  import { constantCase as constantCase15 } from "change-case";
9278
9465
  import { spawn } from "child_process";
9279
9466
  var bind = (program2) => {
@@ -9296,9 +9483,9 @@ var bind = (program2) => {
9296
9483
  env[name] = await value;
9297
9484
  }
9298
9485
  if (Object.keys(env).length > 0) {
9299
- log20.list("Bind Env", env);
9486
+ log21.list("Bind Env", env);
9300
9487
  } else {
9301
- log20.warning("No bindings available.");
9488
+ log21.warning("No bindings available.");
9302
9489
  }
9303
9490
  const configList = opts.config ?? [];
9304
9491
  const configs = {};
@@ -9306,7 +9493,7 @@ var bind = (program2) => {
9306
9493
  configs[`CONFIG_${constantCase15(name)}`] = name;
9307
9494
  }
9308
9495
  if (configList.length ?? 0 > 0) {
9309
- log20.note("Bind Config", configList.map((v) => color.label(constantCase15(v))).join("\n"));
9496
+ log21.note("Bind Config", configList.map((v) => color.label(constantCase15(v))).join("\n"));
9310
9497
  }
9311
9498
  if (commands9.length === 0) {
9312
9499
  return "No command to execute.";
@@ -9365,7 +9552,7 @@ var watchConfig = async (options, resolve, reject) => {
9365
9552
  };
9366
9553
 
9367
9554
  // src/cli/ui/complex/build-types.ts
9368
- import { log as log21 } from "@awsless/clui";
9555
+ import { log as log22 } from "@awsless/clui";
9369
9556
 
9370
9557
  // src/type-gen/generate.ts
9371
9558
  import { mkdir as mkdir5, writeFile as writeFile4 } from "fs/promises";
@@ -9399,7 +9586,7 @@ var generateTypes = async (props) => {
9399
9586
  // src/cli/ui/complex/build-types.ts
9400
9587
  var buildTypes = async (props) => {
9401
9588
  await generateTypes(props);
9402
- log21.step("Done generating type definition files.");
9589
+ log22.step("Done generating type definition files.");
9403
9590
  };
9404
9591
 
9405
9592
  // src/cli/command/dev.ts
@@ -9423,7 +9610,7 @@ var dev = (program2) => {
9423
9610
  };
9424
9611
 
9425
9612
  // src/cli/command/resources.ts
9426
- import { log as log22 } from "@awsless/clui";
9613
+ import { log as log23 } from "@awsless/clui";
9427
9614
  import chalk4 from "chalk";
9428
9615
  import wildstring5 from "wildstring";
9429
9616
  var resources = (program2) => {
@@ -9466,9 +9653,9 @@ var resources = (program2) => {
9466
9653
  continue;
9467
9654
  }
9468
9655
  }
9469
- log22.step(chalk4.magenta(stack.name));
9656
+ log23.step(chalk4.magenta(stack.name));
9470
9657
  if (stack.resources.length) {
9471
- log22.message(
9658
+ log23.message(
9472
9659
  stack.resources.map((r) => {
9473
9660
  return [
9474
9661
  //
@@ -9479,7 +9666,7 @@ var resources = (program2) => {
9479
9666
  }).join("\n")
9480
9667
  );
9481
9668
  } else {
9482
- log22.message(color.line(`(empty)`));
9669
+ log23.message(color.line(`(empty)`));
9483
9670
  }
9484
9671
  }
9485
9672
  });
@@ -9487,7 +9674,7 @@ var resources = (program2) => {
9487
9674
  };
9488
9675
 
9489
9676
  // src/cli/command/run.ts
9490
- import { prompt as prompt9 } from "@awsless/clui";
9677
+ import { prompt as prompt10 } from "@awsless/clui";
9491
9678
  import { DynamoDBClient, dynamoDBClient } from "@awsless/dynamodb";
9492
9679
  import { iotClient, IoTDataPlaneClient } from "@awsless/iot";
9493
9680
  import { LambdaClient as LambdaClient3, lambdaClient } from "@awsless/lambda";
@@ -9507,7 +9694,7 @@ var run = (program2) => {
9507
9694
  return cmd.name === selected;
9508
9695
  });
9509
9696
  } else {
9510
- command = await prompt9.select({
9697
+ command = await prompt10.select({
9511
9698
  message: "Pick the command you want to run:",
9512
9699
  initialValue: commands9[0],
9513
9700
  options: commands9.map((cmd) => ({
@@ -9562,7 +9749,7 @@ var pull = (program2) => {
9562
9749
  };
9563
9750
 
9564
9751
  // src/cli/command/state/push.ts
9565
- import { prompt as prompt10 } from "@awsless/clui";
9752
+ import { prompt as prompt11 } from "@awsless/clui";
9566
9753
  var push = (program2) => {
9567
9754
  program2.command("push").description("Push the local state to the remote server").action(async () => {
9568
9755
  await layout("state pull", async ({ appConfig, stackConfigs }) => {
@@ -9572,7 +9759,7 @@ var push = (program2) => {
9572
9759
  const accountId = await getAccountId(credentials, region);
9573
9760
  const { app } = createApp({ appConfig, stackConfigs, accountId });
9574
9761
  const { state: state2 } = await createWorkSpace({ credentials, region, accountId, profile });
9575
- const ok = await prompt10.confirm({
9762
+ const ok = await prompt11.confirm({
9576
9763
  message: "Pushing up the local state might corrupt your remote state. Are you sure?",
9577
9764
  initialValue: false
9578
9765
  });
@@ -9586,7 +9773,7 @@ var push = (program2) => {
9586
9773
  };
9587
9774
 
9588
9775
  // src/cli/command/state/unlock.ts
9589
- import { prompt as prompt11 } from "@awsless/clui";
9776
+ import { prompt as prompt12 } from "@awsless/clui";
9590
9777
  var unlock = (program2) => {
9591
9778
  program2.command("unlock").description("Release the lock that ensures sequential deployments").action(async () => {
9592
9779
  await layout("state unlock", async ({ appConfig, stackConfigs }) => {
@@ -9600,7 +9787,7 @@ var unlock = (program2) => {
9600
9787
  if (!isLocked) {
9601
9788
  return "No lock is exists.";
9602
9789
  }
9603
- const ok = await prompt11.confirm({
9790
+ const ok = await prompt12.confirm({
9604
9791
  message: "Releasing the lock that ensures sequential deployments might result in corrupt state if a deployment is still running. Are you sure?",
9605
9792
  initialValue: false
9606
9793
  });
@@ -9650,7 +9837,7 @@ var types = (program2) => {
9650
9837
  };
9651
9838
 
9652
9839
  // src/cli/command/domain/list.ts
9653
- import { log as log23 } from "@awsless/clui";
9840
+ import { log as log24 } from "@awsless/clui";
9654
9841
  var list2 = (program2) => {
9655
9842
  program2.command("list").description("List all domains").action(async () => {
9656
9843
  await layout("domain list", async ({ appConfig, stackConfigs }) => {
@@ -9672,7 +9859,7 @@ var list2 = (program2) => {
9672
9859
  });
9673
9860
  await workspace.hydrate(app);
9674
9861
  for (const zone of domainZones) {
9675
- log23.step(
9862
+ log24.step(
9676
9863
  [
9677
9864
  //
9678
9865
  color.label.green(await zone.name),
@@ -9680,14 +9867,14 @@ var list2 = (program2) => {
9680
9867
  color.dim(await zone.id)
9681
9868
  ].join(" ")
9682
9869
  );
9683
- log23.message((await zone.nameServers).join("\n"));
9870
+ log24.message((await zone.nameServers).join("\n"));
9684
9871
  }
9685
9872
  });
9686
9873
  });
9687
9874
  };
9688
9875
 
9689
9876
  // src/cli/command/domain/deploy.ts
9690
- import { log as log24 } from "@awsless/clui";
9877
+ import { log as log25 } from "@awsless/clui";
9691
9878
  var deploy2 = (program2) => {
9692
9879
  program2.command("deploy").description("Deploy the domain zones to AWS").action(async () => {
9693
9880
  await layout("domain deploy", async ({ appConfig, stackConfigs }) => {
@@ -9707,7 +9894,7 @@ var deploy2 = (program2) => {
9707
9894
  profile,
9708
9895
  region
9709
9896
  });
9710
- await log24.task({
9897
+ await log25.task({
9711
9898
  initialMessage: "Deploying the domain zones to AWS...",
9712
9899
  successMessage: "Done deploying the domain zones to AWS.",
9713
9900
  errorMessage: "Failed deploying the domain zones to AWS.",
@@ -9716,7 +9903,7 @@ var deploy2 = (program2) => {
9716
9903
  }
9717
9904
  });
9718
9905
  for (const zone of domainZones) {
9719
- log24.step(
9906
+ log25.step(
9720
9907
  [
9721
9908
  //
9722
9909
  color.label.green(await zone.name),
@@ -9724,7 +9911,7 @@ var deploy2 = (program2) => {
9724
9911
  color.dim(await zone.id)
9725
9912
  ].join(" ")
9726
9913
  );
9727
- log24.message((await zone.nameServers).join("\n"));
9914
+ log25.message((await zone.nameServers).join("\n"));
9728
9915
  }
9729
9916
  });
9730
9917
  });
@@ -9743,7 +9930,7 @@ var domain = (program2) => {
9743
9930
 
9744
9931
  // src/cli/command/logs.ts
9745
9932
  import { CloudWatchLogsClient, StartLiveTailCommand } from "@aws-sdk/client-cloudwatch-logs";
9746
- import { log as log25 } from "@awsless/clui";
9933
+ import { log as log26 } from "@awsless/clui";
9747
9934
  import { aws as aws30 } from "@terraforge/aws";
9748
9935
  import chalk5 from "chalk";
9749
9936
  import chunk2 from "chunk";
@@ -9785,7 +9972,7 @@ var logs = (program2) => {
9785
9972
  process.once("SIGINT", () => {
9786
9973
  abort.abort();
9787
9974
  });
9788
- const streams = await log25.task({
9975
+ const streams = await log26.task({
9789
9976
  initialMessage: "Connecting to the log stream...",
9790
9977
  errorMessage: "Failed to connect to the log stream.",
9791
9978
  async task(ctx) {
@@ -9842,7 +10029,7 @@ var formatLog = (level, date, group, message) => {
9842
10029
  SYSTEM: chalk5.blue
9843
10030
  };
9844
10031
  const levelColor = levels[level] ?? chalk5.cyan;
9845
- log25.message(
10032
+ log26.message(
9846
10033
  [
9847
10034
  [
9848
10035
  //
@@ -9884,7 +10071,7 @@ var parseJsonLog = (message) => {
9884
10071
  // src/cli/command/image/clear-cache.ts
9885
10072
  import { CloudFrontClient as CloudFrontClient2, CreateInvalidationCommand as CreateInvalidationCommand2 } from "@aws-sdk/client-cloudfront";
9886
10073
  import { DeleteObjectsCommand, ListObjectsV2Command, S3Client as S3Client3 } from "@aws-sdk/client-s3";
9887
- import { Cancelled as Cancelled2, log as log26, prompt as prompt12 } from "@awsless/clui";
10074
+ import { Cancelled as Cancelled2, log as log27, prompt as prompt13 } from "@awsless/clui";
9888
10075
  import { randomUUID } from "crypto";
9889
10076
  var clearCache = (program2) => {
9890
10077
  program2.command("clear-cache").argument("[stack]", "The stack name of the image proxy").argument("[name]", "The name of the image proxy").description("Clears the cache of the image proxy").action(async (stack, name) => {
@@ -9900,7 +10087,7 @@ var clearCache = (program2) => {
9900
10087
  }
9901
10088
  return;
9902
10089
  });
9903
- stack = await prompt12.select({
10090
+ stack = await prompt13.select({
9904
10091
  message: "Select the stack:",
9905
10092
  options: imageStacks.map((stack2) => ({
9906
10093
  label: stack2.name,
@@ -9917,7 +10104,7 @@ var clearCache = (program2) => {
9917
10104
  if (!names) {
9918
10105
  throw new ExpectedError(`No image resources are defined in stack "${stack}".`);
9919
10106
  }
9920
- name = await prompt12.select({
10107
+ name = await prompt13.select({
9921
10108
  message: "Select the image resource:",
9922
10109
  options: names.map((name2) => ({
9923
10110
  label: name2,
@@ -9925,7 +10112,7 @@ var clearCache = (program2) => {
9925
10112
  }))
9926
10113
  });
9927
10114
  }
9928
- const ok = await prompt12.confirm({
10115
+ const ok = await prompt13.confirm({
9929
10116
  message: `Are you sure you want to clear the cache`
9930
10117
  });
9931
10118
  if (!ok) {
@@ -9956,7 +10143,7 @@ var clearCache = (program2) => {
9956
10143
  region: "us-east-1"
9957
10144
  });
9958
10145
  let totalDeleted = 0;
9959
- await log26.task({
10146
+ await log27.task({
9960
10147
  initialMessage: "Clearing cache...",
9961
10148
  successMessage: "Cache successfully cleared.",
9962
10149
  task: async () => {
@@ -10018,7 +10205,7 @@ var image = (program2) => {
10018
10205
  // src/cli/command/icon/clear-cache.ts
10019
10206
  import { CloudFrontClient as CloudFrontClient3, CreateInvalidationCommand as CreateInvalidationCommand3 } from "@aws-sdk/client-cloudfront";
10020
10207
  import { DeleteObjectsCommand as DeleteObjectsCommand2, ListObjectsV2Command as ListObjectsV2Command2, S3Client as S3Client4 } from "@aws-sdk/client-s3";
10021
- import { Cancelled as Cancelled3, log as log27, prompt as prompt13 } from "@awsless/clui";
10208
+ import { Cancelled as Cancelled3, log as log28, prompt as prompt14 } from "@awsless/clui";
10022
10209
  import { randomUUID as randomUUID2 } from "crypto";
10023
10210
  var clearCache2 = (program2) => {
10024
10211
  program2.command("clear-cache").argument("[stack]", "The stack name of the icon proxy").argument("[name]", "The name of the icon proxy").description("Clears the cache of the icon proxy").action(async (stack, name) => {
@@ -10034,7 +10221,7 @@ var clearCache2 = (program2) => {
10034
10221
  }
10035
10222
  return;
10036
10223
  });
10037
- stack = await prompt13.select({
10224
+ stack = await prompt14.select({
10038
10225
  message: "Select the stack:",
10039
10226
  options: iconStacks.map((stack2) => ({
10040
10227
  label: stack2.name,
@@ -10051,7 +10238,7 @@ var clearCache2 = (program2) => {
10051
10238
  if (!names) {
10052
10239
  throw new ExpectedError(`No icon resources are defined in stack "${stack}".`);
10053
10240
  }
10054
- name = await prompt13.select({
10241
+ name = await prompt14.select({
10055
10242
  message: "Select the icon resource:",
10056
10243
  options: names.map((name2) => ({
10057
10244
  label: name2,
@@ -10059,7 +10246,7 @@ var clearCache2 = (program2) => {
10059
10246
  }))
10060
10247
  });
10061
10248
  }
10062
- const ok = await prompt13.confirm({
10249
+ const ok = await prompt14.confirm({
10063
10250
  message: `Are you sure you want to clear the cache`
10064
10251
  });
10065
10252
  if (!ok) {
@@ -10090,7 +10277,7 @@ var clearCache2 = (program2) => {
10090
10277
  region: "us-east-1"
10091
10278
  });
10092
10279
  let totalDeleted = 0;
10093
- await log27.task({
10280
+ await log28.task({
10094
10281
  initialMessage: "Clearing cache...",
10095
10282
  successMessage: "Cache successfully cleared.",
10096
10283
  task: async () => {
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.600",
3
+ "version": "0.0.601",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -33,23 +33,23 @@
33
33
  ]
34
34
  },
35
35
  "peerDependencies": {
36
- "@awsless/big-float": "^0.1.5",
37
36
  "@awsless/cloudwatch": "^0.0.1",
38
- "@awsless/clui": "^0.0.8",
39
- "@awsless/dynamodb": "^0.3.8",
37
+ "@awsless/big-float": "^0.1.5",
40
38
  "@awsless/duration": "^0.0.4",
41
39
  "@awsless/json": "^0.0.10",
40
+ "@awsless/clui": "^0.0.8",
41
+ "@awsless/dynamodb": "^0.3.8",
42
42
  "@awsless/iot": "^0.0.3",
43
+ "@awsless/mqtt": "^0.0.2",
43
44
  "@awsless/open-search": "^0.0.21",
44
45
  "@awsless/lambda": "^0.0.35",
45
46
  "@awsless/redis": "^0.0.14",
46
47
  "@awsless/s3": "^0.0.21",
47
- "@awsless/sns": "^0.0.10",
48
- "@awsless/sqs": "^0.0.16",
49
48
  "@awsless/ssm": "^0.0.7",
50
- "@awsless/weak-cache": "^0.0.1",
49
+ "@awsless/sqs": "^0.0.16",
50
+ "@awsless/sns": "^0.0.10",
51
51
  "@awsless/validate": "^0.1.3",
52
- "@awsless/mqtt": "^0.0.2"
52
+ "@awsless/weak-cache": "^0.0.1"
53
53
  },
54
54
  "dependencies": {
55
55
  "@arcanyx/cidr-slicer": "^0.3.0",
@@ -141,14 +141,14 @@
141
141
  "zod-to-json-schema": "^3.24.3",
142
142
  "@awsless/big-float": "^0.1.5",
143
143
  "@awsless/cloudwatch": "^0.0.1",
144
- "@awsless/duration": "^0.0.4",
144
+ "@awsless/clui": "^0.0.8",
145
145
  "@awsless/graphql": "^0.0.9",
146
+ "@awsless/scheduler": "^0.0.4",
146
147
  "@awsless/json": "^0.0.10",
147
148
  "@awsless/size": "^0.0.2",
148
- "@awsless/validate": "^0.1.3",
149
- "@awsless/scheduler": "^0.0.4",
150
- "@awsless/clui": "^0.0.8",
151
- "@awsless/ts-file-cache": "^0.0.12"
149
+ "@awsless/ts-file-cache": "^0.0.12",
150
+ "@awsless/duration": "^0.0.4",
151
+ "@awsless/validate": "^0.1.3"
152
152
  },
153
153
  "devDependencies": {
154
154
  "@hono/node-server": "1.19.9",