@awsless/awsless 0.0.424 → 0.0.426

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
@@ -10699,10 +10699,9 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
10699
10699
  const version = await generateFileHash(workspace, local2.file);
10700
10700
  return build3(version, async (write) => {
10701
10701
  const temp = await createTempFolder(`function--${name}`);
10702
- const external = [...props.build.external ?? [], ...props.layers.map((id2) => id2)];
10703
10702
  const bundle = await bundleTypeScript({
10704
10703
  file: local2.file,
10705
- external,
10704
+ external: [...props.build.external ?? [], ...props.layers ?? []],
10706
10705
  minify: props.build.minify,
10707
10706
  nativeDir: temp.path
10708
10707
  });
@@ -10755,7 +10754,7 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
10755
10754
  role: role.arn,
10756
10755
  code,
10757
10756
  runtime: props.runtime === "container" ? void 0 : props.runtime,
10758
- layers: props.layers.map((id2) => ctx.shared.get(`layer-${id2}-arn`)),
10757
+ layers: (props.layers ?? []).map((id2) => ctx.shared.get(`layer-${id2}-arn`)),
10759
10758
  // Remove conflicting props.
10760
10759
  vpc: void 0,
10761
10760
  log: props.log
@@ -13824,7 +13823,6 @@ var layerFeature = defineFeature({
13824
13823
  return;
13825
13824
  }
13826
13825
  for (const [id, props] of layers) {
13827
- console.log(id, props);
13828
13826
  const group = new Node26(ctx.base, "lambda-layer", id);
13829
13827
  const item = new aws26.s3.BucketObject(group, "code", {
13830
13828
  bucket: ctx.shared.get("layer-bucket-name"),
@@ -13833,7 +13831,11 @@ var layerFeature = defineFeature({
13833
13831
  contentType: "application/zip"
13834
13832
  });
13835
13833
  const layer = new aws26.lambda.Layer(group, "layer", {
13836
- name: id,
13834
+ name: formatGlobalResourceName({
13835
+ appName: ctx.appConfig.name,
13836
+ resourceType: "layer",
13837
+ resourceName: id
13838
+ }),
13837
13839
  description: props.description,
13838
13840
  architectures: props.architectures,
13839
13841
  runtimes: props.runtimes,
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.424",
3
+ "version": "0.0.426",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -29,17 +29,17 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@awsless/dynamodb": "^0.1.5",
32
- "@awsless/json": "^0.0.6",
33
32
  "@awsless/iot": "^0.0.3",
33
+ "@awsless/json": "^0.0.6",
34
34
  "@awsless/lambda": "^0.0.30",
35
- "@awsless/redis": "^0.0.13",
36
35
  "@awsless/open-search": "^0.0.17",
37
36
  "@awsless/s3": "^0.0.20",
37
+ "@awsless/redis": "^0.0.13",
38
38
  "@awsless/validate": "^0.0.17",
39
- "@awsless/sqs": "^0.0.8",
40
- "@awsless/mqtt": "^0.0.2",
41
39
  "@awsless/weak-cache": "^0.0.1",
42
40
  "@awsless/ssm": "^0.0.7",
41
+ "@awsless/sqs": "^0.0.8",
42
+ "@awsless/mqtt": "^0.0.2",
43
43
  "@awsless/sns": "^0.0.10"
44
44
  },
45
45
  "dependencies": {
@@ -117,10 +117,10 @@
117
117
  "zod": "^3.21.4",
118
118
  "zod-to-json-schema": "^3.22.3",
119
119
  "@awsless/code": "^0.0.10",
120
+ "@awsless/graphql": "^0.0.9",
120
121
  "@awsless/duration": "^0.0.1",
121
- "@awsless/json": "^0.0.6",
122
122
  "@awsless/formation": "^0.0.59",
123
- "@awsless/graphql": "^0.0.9",
123
+ "@awsless/json": "^0.0.6",
124
124
  "@awsless/size": "^0.0.1",
125
125
  "@awsless/ts-file-cache": "^0.0.10",
126
126
  "@awsless/validate": "^0.0.17"