@awsless/awsless 0.0.255 → 0.0.257

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
@@ -3891,6 +3891,7 @@ var siteFeature = defineFeature({
3891
3891
 
3892
3892
  // src/feature/store/index.ts
3893
3893
  import { aws as aws15, Node as Node15 } from "@awsless/formation";
3894
+ import { paramCase as paramCase6 } from "change-case";
3894
3895
  var typeGenCode5 = `
3895
3896
  import { Body, PutObjectProps, BodyStream, createPresignedPost } from '@awsless/s3'
3896
3897
  import { Size } from '@awsless/size'
@@ -3939,7 +3940,8 @@ var storeFeature = defineFeature({
3939
3940
  };
3940
3941
  for (const [event, funcProps] of Object.entries(props.events ?? {})) {
3941
3942
  const eventGroup = new Node15(group, "event", event);
3942
- const { lambda } = createAsyncLambdaFunction(eventGroup, ctx, `store`, id, funcProps);
3943
+ const eventId = paramCase6(`${id}-${shortId(event)}`);
3944
+ const { lambda } = createAsyncLambdaFunction(eventGroup, ctx, `store`, eventId, funcProps);
3943
3945
  new aws15.lambda.Permission(eventGroup, "permission", {
3944
3946
  action: "lambda:InvokeFunction",
3945
3947
  principal: "s3.amazonaws.com",
package/dist/client.d.ts CHANGED
@@ -12,7 +12,7 @@ interface GraphQLResources {
12
12
  }
13
13
  declare const GraphQL: GraphQLResources;
14
14
  declare const getGraphQLProps: (name: string) => {
15
- readonly endpoint: string;
15
+ endpoint: string;
16
16
  };
17
17
 
18
18
  interface HTTP {
package/dist/client.js CHANGED
@@ -6,7 +6,9 @@ import {
6
6
  import { constantCase } from "change-case";
7
7
 
8
8
  // src/lib/client/util.ts
9
- var env = import.meta.env;
9
+ var getBindEnv = (name) => {
10
+ return import.meta.env[name];
11
+ };
10
12
 
11
13
  // src/lib/client/auth.ts
12
14
  var Auth = /* @__PURE__ */ createProxy((name) => {
@@ -15,8 +17,8 @@ var Auth = /* @__PURE__ */ createProxy((name) => {
15
17
  var getAuthProps = (name) => {
16
18
  const id = constantCase(name);
17
19
  return {
18
- userPoolId: env[`AUTH_${id}_USER_POOL_ID`],
19
- clientId: env[`AUTH_${id}_CLIENT_ID`]
20
+ userPoolId: getBindEnv(`AUTH_${id}_USER_POOL_ID`),
21
+ clientId: getBindEnv(`AUTH_${id}_CLIENT_ID`)
20
22
  };
21
23
  };
22
24
 
@@ -28,7 +30,7 @@ var GraphQL = /* @__PURE__ */ createProxy((name) => {
28
30
  var getGraphQLProps = (name) => {
29
31
  const id = constantCase2(name);
30
32
  return {
31
- endpoint: env[`AUTH_${id}_USER_POOL_ID`]
33
+ endpoint: getBindEnv(`GRAPHQL_${id}_ENDPOINT`)
32
34
  };
33
35
  };
34
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.255",
3
+ "version": "0.0.257",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -35,8 +35,8 @@
35
35
  "@awsless/sns": "^0.0.7",
36
36
  "@awsless/sqs": "^0.0.7",
37
37
  "@awsless/ssm": "^0.0.7",
38
- "@awsless/weak-cache": "^0.0.1",
39
- "@awsless/validate": "^0.0.14"
38
+ "@awsless/validate": "^0.0.14",
39
+ "@awsless/weak-cache": "^0.0.1"
40
40
  },
41
41
  "dependencies": {
42
42
  "@aws-appsync/utils": "^1.5.0",
@@ -98,10 +98,10 @@
98
98
  "wrap-ansi": "^8.1.0",
99
99
  "zod": "^3.21.4",
100
100
  "zod-to-json-schema": "^3.22.3",
101
+ "@awsless/duration": "^0.0.1",
101
102
  "@awsless/formation": "^0.0.28",
102
- "@awsless/size": "^0.0.1",
103
103
  "@awsless/graphql": "^0.0.9",
104
- "@awsless/duration": "^0.0.1",
104
+ "@awsless/size": "^0.0.1",
105
105
  "@awsless/validate": "^0.0.14",
106
106
  "@awsless/code": "^0.0.10"
107
107
  },