@awsless/awsless 0.0.300 → 0.0.302

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.
Files changed (3) hide show
  1. package/README.MD +8 -0
  2. package/dist/bin.js +29 -15
  3. package/package.json +8 -8
package/README.MD CHANGED
@@ -6,6 +6,14 @@
6
6
  - add check for conflicting types inside graphql (Like duplicate type names)
7
7
  - Types should probably only allowed to defined once. And should be extended after that.
8
8
 
9
+
10
+ # BUGS
11
+ - Container Lambda's don't update the lambda correctly when ever the container code updates.
12
+ - GraphQL resolver code doesn't update correctly.
13
+ - S3 bucket doesn't delete propertly when files are inside.
14
+ - Cleanup unused network interfaces on VPC delete.
15
+ - ECR Repo doesn't delete propertly when images are inside.
16
+
9
17
  ---
10
18
  ---
11
19
  ---
package/dist/bin.js CHANGED
@@ -3058,13 +3058,13 @@ var formatFullDomainName = (config2, id, subDomain) => {
3058
3058
  };
3059
3059
 
3060
3060
  // src/feature/graphql/build/typescript/resolver.ts
3061
- import { rollup as rollup2 } from "rollup";
3062
- import { swc as swc2, minify as swcMinify2 } from "rollup-plugin-swc3";
3063
- import json2 from "@rollup/plugin-json";
3064
3061
  import commonjs2 from "@rollup/plugin-commonjs";
3062
+ import json2 from "@rollup/plugin-json";
3065
3063
  import nodeResolve2 from "@rollup/plugin-node-resolve";
3066
3064
  import { dirname as dirname9 } from "path";
3067
- var buildTypeScriptResolver = async (input, { minify = true } = {}) => {
3065
+ import { rollup as rollup2 } from "rollup";
3066
+ import { minify as swcMinify2, swc as swc2 } from "rollup-plugin-swc3";
3067
+ var buildTypeScriptResolver = async (input, { minify = false } = {}) => {
3068
3068
  const bundle = await rollup2({
3069
3069
  input,
3070
3070
  external: (importee) => {
@@ -3122,7 +3122,7 @@ var defaultResolver = `
3122
3122
  export function request(ctx) {
3123
3123
  return {
3124
3124
  operation: 'Invoke',
3125
- payload: ctx,
3125
+ payload: ctx.arguments,
3126
3126
  };
3127
3127
  }
3128
3128
 
@@ -3342,22 +3342,35 @@ var graphqlFeature = defineFeature({
3342
3342
  });
3343
3343
  let code = Asset2.fromString(defaultResolver);
3344
3344
  if ("resolver" in props2 && props2.resolver) {
3345
- code = Asset2.fromFile(props2.resolver);
3345
+ ctx.registerBuild("graphql-resolver", entryId, async (build3) => {
3346
+ const resolver = props2.resolver;
3347
+ const version = await fingerprintFromFile2(resolver);
3348
+ return build3(version, async (write) => {
3349
+ const file = await buildTypeScriptResolver(resolver);
3350
+ if (!file) {
3351
+ throw new FileError(resolver, `Failed to build a graphql resolver.`);
3352
+ }
3353
+ await write("resolver.js", file);
3354
+ return {
3355
+ size: formatByteSize(file.byteLength)
3356
+ };
3357
+ });
3358
+ });
3359
+ code = Asset2.fromFile(getBuildPath("graphql-resolver", entryId, "resolver.js"));
3346
3360
  } else if (defaultProps.resolver) {
3347
3361
  code = Asset2.fromFile(getBuildPath("graphql-resolver", id, "resolver.js"));
3348
3362
  }
3349
- const config2 = new aws8.appsync.FunctionConfiguration(resolverGroup, "config", {
3350
- apiId,
3351
- name,
3352
- code,
3353
- dataSourceName: source.name
3354
- });
3355
- new aws8.appsync.Resolver(resolverGroup, "resolver", {
3363
+ new aws8.appsync.Resolver(resolverGroup, "resolver-unit", {
3356
3364
  apiId,
3357
3365
  typeName,
3358
3366
  fieldName,
3359
- functions: [config2.id],
3360
- code
3367
+ code,
3368
+ kind: "unit",
3369
+ dataSourceName: source.name,
3370
+ runtime: {
3371
+ name: "appsync-js",
3372
+ version: "1.0.0"
3373
+ }
3361
3374
  });
3362
3375
  }
3363
3376
  }
@@ -4291,6 +4304,7 @@ var storeFeature = defineFeature({
4291
4304
  const bucket = new aws17.s3.Bucket(group, "store", {
4292
4305
  name: bucketName,
4293
4306
  versioning: props.versioning,
4307
+ forceDelete: true,
4294
4308
  lambdaConfigs,
4295
4309
  cors: [
4296
4310
  // ---------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.300",
3
+ "version": "0.0.302",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -31,12 +31,12 @@
31
31
  "@awsless/lambda": "^0.0.25",
32
32
  "@awsless/open-search": "^0.0.15",
33
33
  "@awsless/sns": "^0.0.7",
34
- "@awsless/s3": "^0.0.15",
35
34
  "@awsless/validate": "^0.0.14",
36
35
  "@awsless/redis": "^0.0.12",
36
+ "@awsless/s3": "^0.0.15",
37
37
  "@awsless/sqs": "^0.0.7",
38
- "@awsless/weak-cache": "^0.0.1",
39
- "@awsless/ssm": "^0.0.7"
38
+ "@awsless/ssm": "^0.0.7",
39
+ "@awsless/weak-cache": "^0.0.1"
40
40
  },
41
41
  "dependencies": {
42
42
  "@arcanyx/cidr-slicer": "^0.3.0",
@@ -105,12 +105,12 @@
105
105
  "zip-a-folder": "^3.1.6",
106
106
  "zod": "^3.21.4",
107
107
  "zod-to-json-schema": "^3.22.3",
108
- "@awsless/code": "^0.0.10",
109
108
  "@awsless/duration": "^0.0.1",
110
- "@awsless/size": "^0.0.1",
111
109
  "@awsless/graphql": "^0.0.9",
112
- "@awsless/formation": "^0.0.39",
113
- "@awsless/validate": "^0.0.14"
110
+ "@awsless/size": "^0.0.1",
111
+ "@awsless/formation": "^0.0.41",
112
+ "@awsless/validate": "^0.0.14",
113
+ "@awsless/code": "^0.0.10"
114
114
  },
115
115
  "scripts": {
116
116
  "test": "pnpm code test",