@awsless/awsless 0.0.234 → 0.0.236

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
@@ -674,7 +674,7 @@ import { z as z18 } from "zod";
674
674
  var StoresSchema = z18.union([
675
675
  z18.array(ResourceIdSchema).transform((list4) => {
676
676
  const stores = {};
677
- for (const key in list4) {
677
+ for (const key of list4) {
678
678
  stores[key] = {};
679
679
  }
680
680
  return stores;
@@ -1433,7 +1433,7 @@ var formatOperation = (operation) => {
1433
1433
  };
1434
1434
  var logStackError = (error) => {
1435
1435
  log2.message(
1436
- wrap([color.error(error.message), color.dim(`Stack: ${error.stack}`)].join("\n"), {
1436
+ wrap([color.error(error.message), `Stack: ${error.stack}`].join("\n"), {
1437
1437
  hard: true
1438
1438
  }),
1439
1439
  { symbol: color.error(icon.error) }
@@ -1477,7 +1477,7 @@ import { StackError as StackError2 } from "@awsless/formation";
1477
1477
  import { log as log4 } from "@clack/prompts";
1478
1478
  var logAppError = (error) => {
1479
1479
  log4.message(
1480
- wrap([color.error(error.message), color.dim(`App: ${error.app}`)].join("\n"), {
1480
+ wrap([color.error(error.message), `App: ${error.app}`].join("\n"), {
1481
1481
  hard: true
1482
1482
  }),
1483
1483
  { symbol: color.error(icon.error) }
@@ -2156,11 +2156,10 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
2156
2156
  key: `/lambda/${name}.zip`,
2157
2157
  body: Asset.fromFile(getBuildPath("function", name, "bundle.zip"))
2158
2158
  });
2159
- const inlinePolicies = [];
2160
2159
  const role = new aws2.iam.Role(group, "role", {
2161
2160
  name,
2162
- assumedBy: "lambda.amazonaws.com",
2163
- policies: inlinePolicies
2161
+ assumedBy: "lambda.amazonaws.com"
2162
+ // policies: inlinePolicies,
2164
2163
  });
2165
2164
  const policy = new aws2.iam.RolePolicy(group, "policy", {
2166
2165
  role: role.name,
@@ -2241,8 +2240,10 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
2241
2240
  ctx.shared.get(`vpc-public-subnet-id-2`)
2242
2241
  ]
2243
2242
  });
2244
- inlinePolicies.push({
2245
- name: "vpc",
2243
+ new aws2.iam.RolePolicy(group, "vpc-policy", {
2244
+ role: role.name,
2245
+ name: "lambda-policy",
2246
+ version: "2012-10-17",
2246
2247
  statements: [
2247
2248
  {
2248
2249
  actions: [
@@ -4664,8 +4665,8 @@ var CustomReporter = class {
4664
4665
  this.cache = cache;
4665
4666
  }
4666
4667
  }
4667
- onUserConsoleLog(log9) {
4668
- this.logs.push(log9.content.trimEnd());
4668
+ onUserConsoleLog(log10) {
4669
+ this.logs.push(log10.content.trimEnd());
4669
4670
  }
4670
4671
  runningTask(tasks) {
4671
4672
  return tasks.find((t) => t.result?.state === "run");
@@ -4764,7 +4765,7 @@ var logTestLogs = (event) => {
4764
4765
  log8.message(color.info.bold.inverse(" LOGS "), {
4765
4766
  symbol: color.dim(icon.dot)
4766
4767
  });
4767
- log8.message(event.logs.map((log9) => wrap(log9, { hard: true })).join("\n"));
4768
+ log8.message(event.logs.map((log10) => wrap(log10, { hard: true })).join("\n"));
4768
4769
  }
4769
4770
  };
4770
4771
  var logTestErrors = (event) => {
@@ -4977,6 +4978,9 @@ var diff = (program2) => {
4977
4978
  });
4978
4979
  };
4979
4980
 
4981
+ // src/cli/ui/complex/build-types.ts
4982
+ import { log as log9 } from "@clack/prompts";
4983
+
4980
4984
  // src/type-gen/generate.ts
4981
4985
  import { mkdir as mkdir4, writeFile as writeFile4 } from "fs/promises";
4982
4986
  import { dirname as dirname10, join as join12, relative as relative5 } from "path";
@@ -5008,10 +5012,8 @@ var generateTypes = async (props) => {
5008
5012
 
5009
5013
  // src/cli/ui/complex/build-types.ts
5010
5014
  var buildTypes = async (props) => {
5011
- await task("Generate type definition files", async (update) => {
5012
- await generateTypes(props);
5013
- update("Done generating type definition files.");
5014
- });
5015
+ await generateTypes(props);
5016
+ log9.step("Done generating type definition files.");
5015
5017
  };
5016
5018
 
5017
5019
  // src/cli/command/types.ts
@@ -312,7 +312,7 @@ import { z as z9 } from "zod";
312
312
  var StoresSchema = z9.union([
313
313
  z9.array(ResourceIdSchema).transform((list) => {
314
314
  const stores = {};
315
- for (const key in list) {
315
+ for (const key of list) {
316
316
  stores[key] = {};
317
317
  }
318
318
  return stores;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.234",
3
+ "version": "0.0.236",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -28,13 +28,13 @@
28
28
  }
29
29
  },
30
30
  "peerDependencies": {
31
- "@awsless/lambda": "^0.0.19",
32
- "@awsless/open-search": "^0.0.12",
33
31
  "@awsless/redis": "^0.0.12",
32
+ "@awsless/open-search": "^0.0.12",
34
33
  "@awsless/s3": "^0.0.10",
35
34
  "@awsless/sns": "^0.0.7",
36
35
  "@awsless/sqs": "^0.0.7",
37
36
  "@awsless/ssm": "^0.0.7",
37
+ "@awsless/lambda": "^0.0.19",
38
38
  "@awsless/validate": "^0.0.14",
39
39
  "@awsless/weak-cache": "^0.0.1"
40
40
  },