@awsless/awsless 0.0.193 → 0.0.194
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/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -2667,7 +2667,15 @@ var buildTypeScriptResolver = async (input, { minify = true } = {}) => {
|
|
|
2667
2667
|
};
|
|
2668
2668
|
|
|
2669
2669
|
// src/feature/graphql/index.ts
|
|
2670
|
+
import { createHash as createHash5 } from "crypto";
|
|
2671
|
+
|
|
2672
|
+
// src/util/id.ts
|
|
2670
2673
|
import { createHash as createHash4 } from "crypto";
|
|
2674
|
+
var shortId = (ns) => {
|
|
2675
|
+
return createHash4("md5").update(ns).digest("hex").substring(0, 10);
|
|
2676
|
+
};
|
|
2677
|
+
|
|
2678
|
+
// src/feature/graphql/index.ts
|
|
2671
2679
|
var defaultResolver = `
|
|
2672
2680
|
export function request(ctx) {
|
|
2673
2681
|
return {
|
|
@@ -2773,12 +2781,12 @@ var graphqlFeature = defineFeature({
|
|
|
2773
2781
|
const file = stack.graphql?.[id]?.schema;
|
|
2774
2782
|
if (file) {
|
|
2775
2783
|
const source = await readFile5(file, "utf8");
|
|
2776
|
-
const finger2 =
|
|
2784
|
+
const finger2 = createHash5("sha1").update(source).digest("hex");
|
|
2777
2785
|
sources.push(source);
|
|
2778
2786
|
fingers.push(finger2);
|
|
2779
2787
|
}
|
|
2780
2788
|
}
|
|
2781
|
-
const finger =
|
|
2789
|
+
const finger = createHash5("sha1").update(sources.sort().join(" ")).digest("hex");
|
|
2782
2790
|
return build3(finger, async (write) => {
|
|
2783
2791
|
const defs = mergeTypeDefs([scalarSchema, baseSchema, ...sources]);
|
|
2784
2792
|
const output = print(defs);
|
|
@@ -2847,7 +2855,7 @@ var graphqlFeature = defineFeature({
|
|
|
2847
2855
|
for (const [fieldName, props2] of Object.entries(fields ?? {})) {
|
|
2848
2856
|
const name = `${typeName}__${fieldName}`;
|
|
2849
2857
|
const resolverGroup = new Node6(group, "resolver", name);
|
|
2850
|
-
const entryId = paramCase5(`${id}-${typeName}-${fieldName}`);
|
|
2858
|
+
const entryId = paramCase5(`${id}-${shortId(`${typeName}-${fieldName}`)}`);
|
|
2851
2859
|
const { lambda } = createLambdaFunction(resolverGroup, ctx, `graphql`, entryId, {
|
|
2852
2860
|
...props2.consumer,
|
|
2853
2861
|
description: `${id} ${typeName}.${fieldName}`
|
|
@@ -3428,14 +3436,6 @@ var authFeature = defineFeature({
|
|
|
3428
3436
|
import { Node as Node15, aws as aws15 } from "@awsless/formation";
|
|
3429
3437
|
import { camelCase as camelCase5 } from "change-case";
|
|
3430
3438
|
import { relative as relative3 } from "path";
|
|
3431
|
-
|
|
3432
|
-
// src/util/id.ts
|
|
3433
|
-
import { createHash as createHash5 } from "crypto";
|
|
3434
|
-
var shortId = (ns) => {
|
|
3435
|
-
return createHash5("md5").update(ns).digest("hex").substring(0, 10);
|
|
3436
|
-
};
|
|
3437
|
-
|
|
3438
|
-
// src/feature/http/index.ts
|
|
3439
3439
|
var parseRoute = (route) => {
|
|
3440
3440
|
const [method, ...paths] = route.split(" ");
|
|
3441
3441
|
const path = paths.join(" ");
|
|
@@ -4695,7 +4695,7 @@ var test = (program2) => {
|
|
|
4695
4695
|
return "No tests found.";
|
|
4696
4696
|
}
|
|
4697
4697
|
await runTests(tests, options?.filters);
|
|
4698
|
-
return;
|
|
4698
|
+
return "All tests finished.";
|
|
4699
4699
|
});
|
|
4700
4700
|
});
|
|
4701
4701
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.194",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@awsless/s3": "^0.0.10",
|
|
34
34
|
"@awsless/sns": "^0.0.7",
|
|
35
35
|
"@awsless/sqs": "^0.0.7",
|
|
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": {
|