@awsless/awsless 0.0.605 → 0.0.607

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
@@ -4087,10 +4087,10 @@ var functionFeature = defineFeature({
4087
4087
  actions: [
4088
4088
  // Allow all lambda's to invoke any lambda inside your app.
4089
4089
  "lambda:InvokeFunction",
4090
- "lambda:InvokeAsync",
4090
+ "lambda:InvokeAsync"
4091
4091
  // Allow listing and getting lambda info.
4092
- "lambda:ListFunctions",
4093
- "lambda:GetFunction"
4092
+ // 'lambda:ListFunctions',
4093
+ // 'lambda:GetFunction',
4094
4094
  ],
4095
4095
  resources: [`arn:aws:lambda:*:*:function:${ctx.appConfig.name}--*`]
4096
4096
  });
@@ -9487,14 +9487,14 @@ var auth = (program2) => {
9487
9487
 
9488
9488
  // src/cli/command/bind.ts
9489
9489
  import { log as log22 } from "@awsless/clui";
9490
+ import chalk4 from "chalk";
9490
9491
  import { constantCase as constantCase15 } from "change-case";
9491
- import { spawn } from "child_process";
9492
9492
  var bind = (program2) => {
9493
9493
  program2.command("bind").argument("[command...]", "The command to execute").option("--config <string...>", "List of config values that will be accessable", (v) => v.split(",")).description(`Bind your site environment variables to a command`).action(async (commands9 = [], opts) => {
9494
9494
  await layout("bind", async ({ appConfig, stackConfigs }) => {
9495
9495
  const region = appConfig.region;
9496
9496
  const profile = appConfig.profile;
9497
- const credentials = await getCredentials(appConfig.profile);
9497
+ const credentials = await getCredentials(profile);
9498
9498
  const accountId = await getAccountId(credentials, region);
9499
9499
  const { app, binds } = createApp({ appConfig, stackConfigs, accountId });
9500
9500
  const { workspace } = await createWorkSpace({
@@ -9523,9 +9523,12 @@ var bind = (program2) => {
9523
9523
  if (commands9.length === 0) {
9524
9524
  return "No command to execute.";
9525
9525
  }
9526
- const command = commands9.join(" ");
9527
9526
  const freshCred = await credentials();
9528
- spawn(command, {
9527
+ console.log(chalk4.black(`\u2502`));
9528
+ console.log(chalk4.black(`\u2514 ${commands9.join(" ")}`));
9529
+ console.log("");
9530
+ const instance = Bun.spawn(commands9, {
9531
+ // cwd: process.cwd(),
9529
9532
  env: {
9530
9533
  // Pass the process env vars
9531
9534
  ...process.env,
@@ -9543,10 +9546,11 @@ var bind = (program2) => {
9543
9546
  AWS_SECRET_ACCESS_KEY: freshCred.secretAccessKey,
9544
9547
  AWS_SESSION_TOKEN: freshCred.sessionToken
9545
9548
  },
9546
- stdio: "inherit",
9547
- shell: true
9549
+ stdout: "inherit",
9550
+ stderr: "inherit"
9548
9551
  });
9549
- return;
9552
+ await instance.exited;
9553
+ process.exit(0);
9550
9554
  });
9551
9555
  });
9552
9556
  };
@@ -9638,7 +9642,7 @@ var dev = (program2) => {
9638
9642
 
9639
9643
  // src/cli/command/resources.ts
9640
9644
  import { log as log24 } from "@awsless/clui";
9641
- import chalk4 from "chalk";
9645
+ import chalk5 from "chalk";
9642
9646
  import wildstring5 from "wildstring";
9643
9647
  var resources = (program2) => {
9644
9648
  program2.command("resources").argument("[stacks...]", "Optionally filter stack resources to list").description(`List all defined resources in your app`).action(async (filters) => {
@@ -9679,7 +9683,7 @@ var resources = (program2) => {
9679
9683
  continue;
9680
9684
  }
9681
9685
  }
9682
- log24.step(chalk4.magenta(stack.name));
9686
+ log24.step(chalk5.magenta(stack.name));
9683
9687
  if (stack.resources.length) {
9684
9688
  log24.message(
9685
9689
  stack.resources.map((r) => {
@@ -9955,7 +9959,7 @@ var domain = (program2) => {
9955
9959
  import { CloudWatchLogsClient, StartLiveTailCommand } from "@aws-sdk/client-cloudwatch-logs";
9956
9960
  import { log as log27 } from "@awsless/clui";
9957
9961
  import { aws as aws30 } from "@terraforge/aws";
9958
- import chalk5 from "chalk";
9962
+ import chalk6 from "chalk";
9959
9963
  import chunk2 from "chunk";
9960
9964
  import { formatDate } from "date-fns";
9961
9965
  import wildstring6 from "wildstring";
@@ -10042,15 +10046,15 @@ var plural = (count) => {
10042
10046
  };
10043
10047
  var formatLog = (level, date, group, message) => {
10044
10048
  const levels = {
10045
- INFO: chalk5.cyan,
10046
- DEBUG: chalk5.cyan,
10047
- TRACE: chalk5.cyan,
10048
- WARN: chalk5.yellow,
10049
- ERROR: chalk5.red,
10050
- FATAL: chalk5.magenta,
10051
- SYSTEM: chalk5.blue
10049
+ INFO: chalk6.cyan,
10050
+ DEBUG: chalk6.cyan,
10051
+ TRACE: chalk6.cyan,
10052
+ WARN: chalk6.yellow,
10053
+ ERROR: chalk6.red,
10054
+ FATAL: chalk6.magenta,
10055
+ SYSTEM: chalk6.blue
10052
10056
  };
10053
- const levelColor = levels[level] ?? chalk5.cyan;
10057
+ const levelColor = levels[level] ?? chalk6.cyan;
10054
10058
  log27.message(
10055
10059
  [
10056
10060
  [
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.605",
3
+ "version": "0.0.607",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -35,18 +35,18 @@
35
35
  "peerDependencies": {
36
36
  "@awsless/big-float": "^0.1.5",
37
37
  "@awsless/cloudwatch": "^0.0.1",
38
- "@awsless/duration": "^0.0.4",
39
- "@awsless/dynamodb": "^0.3.8",
38
+ "@awsless/json": "^0.0.10",
40
39
  "@awsless/clui": "^0.0.8",
40
+ "@awsless/dynamodb": "^0.3.8",
41
41
  "@awsless/iot": "^0.0.3",
42
- "@awsless/json": "^0.0.10",
43
- "@awsless/lambda": "^0.0.35",
44
- "@awsless/open-search": "^0.0.21",
45
42
  "@awsless/mqtt": "^0.0.2",
46
- "@awsless/redis": "^0.0.14",
43
+ "@awsless/open-search": "^0.0.21",
47
44
  "@awsless/s3": "^0.0.21",
48
- "@awsless/sns": "^0.0.10",
45
+ "@awsless/redis": "^0.0.14",
49
46
  "@awsless/sqs": "^0.0.16",
47
+ "@awsless/sns": "^0.0.10",
48
+ "@awsless/lambda": "^0.0.35",
49
+ "@awsless/duration": "^0.0.4",
50
50
  "@awsless/validate": "^0.1.3",
51
51
  "@awsless/ssm": "^0.0.7",
52
52
  "@awsless/weak-cache": "^0.0.1"
@@ -140,11 +140,11 @@
140
140
  "zod": "^3.24.2",
141
141
  "zod-to-json-schema": "^3.24.3",
142
142
  "@awsless/big-float": "^0.1.5",
143
- "@awsless/clui": "^0.0.8",
144
143
  "@awsless/cloudwatch": "^0.0.1",
144
+ "@awsless/json": "^0.0.10",
145
145
  "@awsless/duration": "^0.0.4",
146
146
  "@awsless/graphql": "^0.0.9",
147
- "@awsless/json": "^0.0.10",
147
+ "@awsless/clui": "^0.0.8",
148
148
  "@awsless/size": "^0.0.2",
149
149
  "@awsless/scheduler": "^0.0.4",
150
150
  "@awsless/ts-file-cache": "^0.0.12",