@awsless/awsless 0.0.133 → 0.0.135
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 +12 -12
- package/dist/features/cognito-client-secret/bundle.zip +0 -0
- package/dist/features/delete-bucket/bundle.zip +0 -0
- package/dist/features/delete-hosted-zone/bundle.zip +0 -0
- package/dist/features/global-exports/bundle.zip +0 -0
- package/dist/features/invalidate-cache/bundle.zip +0 -0
- package/dist/features/upload-bucket-asset/bundle.zip +0 -0
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -3034,6 +3034,14 @@ import { mergeTypeDefs as mergeTypeDefs2 } from "@graphql-tools/merge";
|
|
|
3034
3034
|
import { generate } from "@awsless/graphql";
|
|
3035
3035
|
import { buildSchema, print as print2 } from "graphql";
|
|
3036
3036
|
import { readFile as readFile4 } from "fs/promises";
|
|
3037
|
+
|
|
3038
|
+
// src/util/id.ts
|
|
3039
|
+
import { createHash as createHash3 } from "crypto";
|
|
3040
|
+
var shortId = (ns) => {
|
|
3041
|
+
return createHash3("md5").update(ns).digest("hex").substring(0, 10);
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3044
|
+
// src/plugins/graphql/index.ts
|
|
3037
3045
|
var defaultResolver = Code2.fromInline(
|
|
3038
3046
|
"graphql-default-resolver",
|
|
3039
3047
|
`
|
|
@@ -3178,7 +3186,7 @@ var graphqlPlugin = definePlugin({
|
|
|
3178
3186
|
for (const [typeName, fields] of Object.entries(props.resolvers || {})) {
|
|
3179
3187
|
for (const [fieldName, resolverProps] of Object.entries(fields || {})) {
|
|
3180
3188
|
const props2 = isFunctionProps(resolverProps) ? { consumer: resolverProps } : resolverProps;
|
|
3181
|
-
const entryId = paramCase4(`${id}-${typeName}-${fieldName}`);
|
|
3189
|
+
const entryId = paramCase4(`${id}-${shortId(`${typeName}-${fieldName}`)}`);
|
|
3182
3190
|
const lambda = toLambdaFunction(ctx, `graphql-${entryId}`, props2.consumer);
|
|
3183
3191
|
const resolver = props2.resolver ?? defaultProps?.resolver;
|
|
3184
3192
|
let code = defaultResolver;
|
|
@@ -3450,14 +3458,6 @@ var ElbEventSource = class extends Group {
|
|
|
3450
3458
|
// src/plugins/http/index.ts
|
|
3451
3459
|
import { relative as relative3 } from "path";
|
|
3452
3460
|
import { camelCase as camelCase3 } from "change-case";
|
|
3453
|
-
|
|
3454
|
-
// src/util/id.ts
|
|
3455
|
-
import { createHash as createHash3 } from "crypto";
|
|
3456
|
-
var shortId = (ns) => {
|
|
3457
|
-
return createHash3("md5").update(ns).digest("hex").substring(0, 10);
|
|
3458
|
-
};
|
|
3459
|
-
|
|
3460
|
-
// src/plugins/http/index.ts
|
|
3461
3461
|
var parseRoute = (route) => {
|
|
3462
3462
|
const [method, ...paths] = route.split(" ");
|
|
3463
3463
|
const path = paths.join(" ");
|
|
@@ -4965,7 +4965,7 @@ var DynamoDBEventSource = class extends Group {
|
|
|
4965
4965
|
constructor(id, lambda, props) {
|
|
4966
4966
|
const source = new EventSourceMapping(id, {
|
|
4967
4967
|
functionArn: lambda.arn,
|
|
4968
|
-
sourceArn: props.
|
|
4968
|
+
sourceArn: props.streamArn,
|
|
4969
4969
|
batchSize: props.batchSize ?? 100,
|
|
4970
4970
|
bisectBatchOnError: props.bisectBatchOnError ?? true,
|
|
4971
4971
|
maxBatchingWindow: props.maxBatchingWindow,
|
|
@@ -4984,7 +4984,7 @@ var DynamoDBEventSource = class extends Group {
|
|
|
4984
4984
|
"dynamodb:GetRecords",
|
|
4985
4985
|
"dynamodb:GetShardIterator"
|
|
4986
4986
|
],
|
|
4987
|
-
resources: [props.
|
|
4987
|
+
resources: [props.streamArn]
|
|
4988
4988
|
});
|
|
4989
4989
|
super([source]);
|
|
4990
4990
|
}
|
|
@@ -5019,7 +5019,7 @@ var tablePlugin = definePlugin({
|
|
|
5019
5019
|
if (props.stream) {
|
|
5020
5020
|
const lambda = toLambdaFunction(ctx, `stream-${id}`, props.stream.consumer);
|
|
5021
5021
|
const source = new DynamoDBEventSource(id, lambda, {
|
|
5022
|
-
|
|
5022
|
+
streamArn: table.streamArn,
|
|
5023
5023
|
onFailure: getGlobalOnFailure(ctx),
|
|
5024
5024
|
...props.stream
|
|
5025
5025
|
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.135",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@awsless/lambda": "^0.0.15",
|
|
32
|
-
"@awsless/redis": "^0.0.10",
|
|
33
32
|
"@awsless/sns": "^0.0.7",
|
|
33
|
+
"@awsless/redis": "^0.0.10",
|
|
34
34
|
"@awsless/sqs": "^0.0.7",
|
|
35
35
|
"@awsless/ssm": "^0.0.7",
|
|
36
36
|
"@awsless/validate": "^0.0.10",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"wrap-ansi": "^8.1.0",
|
|
88
88
|
"zod": "^3.21.4",
|
|
89
89
|
"zod-to-json-schema": "^3.22.3",
|
|
90
|
-
"@awsless/
|
|
91
|
-
"@awsless/
|
|
90
|
+
"@awsless/graphql": "^0.0.6",
|
|
91
|
+
"@awsless/code": "^0.0.10"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
94
94
|
"test": "pnpm code test",
|