@awsless/awsless 0.0.187 → 0.0.188

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 (2) hide show
  1. package/dist/bin.js +8 -7
  2. package/package.json +5 -5
package/dist/bin.js CHANGED
@@ -2785,8 +2785,9 @@ var graphqlFeature = defineFeature({
2785
2785
  );
2786
2786
  }
2787
2787
  const group = new Node6(ctx.stack, "graphql", id);
2788
+ const name = formatLocalResourceName(ctx.app.name, ctx.stack.name, "graphql", id);
2788
2789
  const api = new aws6.appsync.GraphQLApi(group, "api", {
2789
- name: formatLocalResourceName(ctx.app.name, ctx.stack.name, "graphql", id),
2790
+ name,
2790
2791
  // visibility: false,
2791
2792
  auth: {
2792
2793
  default: {
@@ -2794,7 +2795,7 @@ var graphqlFeature = defineFeature({
2794
2795
  }
2795
2796
  }
2796
2797
  });
2797
- ctx.registerBuild("graphql-schema", id, async (build3) => {
2798
+ ctx.registerBuild("graphql-schema", name, async (build3) => {
2798
2799
  const source = await readFile5(props.schema, "utf8");
2799
2800
  const finger = createHash4("sha1").update(source).digest("hex");
2800
2801
  return build3(finger, async (write) => {
@@ -2824,7 +2825,7 @@ var graphqlFeature = defineFeature({
2824
2825
  });
2825
2826
  const schema = new aws6.appsync.GraphQLSchema(group, "schema", {
2826
2827
  apiId: api.id,
2827
- definition: Asset2.fromFile(getBuildPath("graphql-schema", id, "schema.gql"))
2828
+ definition: Asset2.fromFile(getBuildPath("graphql-schema", name, "schema.gql"))
2828
2829
  });
2829
2830
  const association = new aws6.appsync.SourceApiAssociation(group, "association", {
2830
2831
  mergedApiId: ctx.shared.get(`graphql-${id}-id`),
@@ -2833,8 +2834,8 @@ var graphqlFeature = defineFeature({
2833
2834
  association.dependsOn(schema);
2834
2835
  for (const [typeName, fields] of Object.entries(props.resolvers ?? {})) {
2835
2836
  for (const [fieldName, props2] of Object.entries(fields ?? {})) {
2836
- const name = `${typeName}__${fieldName}`;
2837
- const resolverGroup = new Node6(group, "resolver", name);
2837
+ const name2 = `${typeName}__${fieldName}`;
2838
+ const resolverGroup = new Node6(group, "resolver", name2);
2838
2839
  const entryId = paramCase5(`${id}-${typeName}-${fieldName}`);
2839
2840
  const { lambda } = createLambdaFunction(resolverGroup, ctx, `graphql`, entryId, {
2840
2841
  ...props2.consumer,
@@ -2857,7 +2858,7 @@ var graphqlFeature = defineFeature({
2857
2858
  const source = new aws6.appsync.DataSource(resolverGroup, "source", {
2858
2859
  apiId: api.id,
2859
2860
  type: "lambda",
2860
- name,
2861
+ name: name2,
2861
2862
  role: role.arn,
2862
2863
  functionArn: lambda.arn
2863
2864
  });
@@ -2869,7 +2870,7 @@ var graphqlFeature = defineFeature({
2869
2870
  }
2870
2871
  const config2 = new aws6.appsync.FunctionConfiguration(resolverGroup, "config", {
2871
2872
  apiId: api.id,
2872
- name,
2873
+ name: name2,
2873
2874
  code,
2874
2875
  dataSourceName: source.name
2875
2876
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.187",
3
+ "version": "0.0.188",
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.18",
32
31
  "@awsless/redis": "^0.0.12",
32
+ "@awsless/s3": "^0.0.10",
33
33
  "@awsless/sns": "^0.0.7",
34
+ "@awsless/lambda": "^0.0.18",
34
35
  "@awsless/sqs": "^0.0.7",
35
- "@awsless/s3": "^0.0.10",
36
- "@awsless/validate": "^0.0.13",
37
36
  "@awsless/ssm": "^0.0.7",
37
+ "@awsless/validate": "^0.0.13",
38
38
  "@awsless/weak-cache": "^0.0.1"
39
39
  },
40
40
  "dependencies": {
@@ -98,9 +98,9 @@
98
98
  "zod-to-json-schema": "^3.22.3",
99
99
  "@awsless/duration": "^0.0.1",
100
100
  "@awsless/size": "^0.0.1",
101
+ "@awsless/formation": "^0.0.12",
101
102
  "@awsless/graphql": "^0.0.9",
102
103
  "@awsless/validate": "^0.0.13",
103
- "@awsless/formation": "^0.0.12",
104
104
  "@awsless/code": "^0.0.10"
105
105
  },
106
106
  "scripts": {