@awsless/awsless 0.0.428 → 0.0.430
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/app.json +1 -1
- package/dist/bin.js +15 -17
- package/dist/build-json-schema.js +2 -4
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/stack.json +1 -1
- package/package.json +9 -9
package/dist/bin.js
CHANGED
|
@@ -7733,7 +7733,7 @@ var LogSchema = z7.union([
|
|
|
7733
7733
|
).optional()
|
|
7734
7734
|
})
|
|
7735
7735
|
]).describe("Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time.");
|
|
7736
|
-
var LayersSchema =
|
|
7736
|
+
var LayersSchema = z7.string().array().describe(
|
|
7737
7737
|
`A list of function layers to add to the function's execution environment.`
|
|
7738
7738
|
// `A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.`
|
|
7739
7739
|
);
|
|
@@ -8013,7 +8013,6 @@ var InstancesSchema = z13.record(
|
|
|
8013
8013
|
).optional().describe("Define the instances in your stack.");
|
|
8014
8014
|
|
|
8015
8015
|
// src/feature/layer/schema.ts
|
|
8016
|
-
import { paramCase as paramCase3 } from "change-case";
|
|
8017
8016
|
import { z as z15 } from "zod";
|
|
8018
8017
|
|
|
8019
8018
|
// src/config/schema/lambda.ts
|
|
@@ -8031,9 +8030,8 @@ var Schema = z15.object({
|
|
|
8031
8030
|
"Define the package names that are available bundled in the layer. Those packages are not bundled while bundling the lambda."
|
|
8032
8031
|
)
|
|
8033
8032
|
});
|
|
8034
|
-
var LayerIdSchema = z15.string().min(2).max(214).regex(/^[a-z0-9\-@.]+$/i, "Invalid layer ID").transform((value) => paramCase3(value));
|
|
8035
8033
|
var LayerSchema = z15.record(
|
|
8036
|
-
|
|
8034
|
+
z15.string(),
|
|
8037
8035
|
z15.union([
|
|
8038
8036
|
LocalFileSchema.transform((file) => ({
|
|
8039
8037
|
file,
|
|
@@ -8751,9 +8749,9 @@ import { z as z35 } from "zod";
|
|
|
8751
8749
|
var TestsSchema = z35.union([LocalDirectorySchema.transform((v) => [v]), LocalDirectorySchema.array()]).describe("Define the location of your tests for your stack.").optional();
|
|
8752
8750
|
|
|
8753
8751
|
// src/feature/topic/schema.ts
|
|
8754
|
-
import { paramCase as
|
|
8752
|
+
import { paramCase as paramCase3 } from "change-case";
|
|
8755
8753
|
import { z as z36 } from "zod";
|
|
8756
|
-
var TopicNameSchema = z36.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) =>
|
|
8754
|
+
var TopicNameSchema = z36.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) => paramCase3(value)).describe("Define event topic name.");
|
|
8757
8755
|
var TopicsSchema = z36.array(TopicNameSchema).refine((topics) => {
|
|
8758
8756
|
return topics.length === new Set(topics).size;
|
|
8759
8757
|
}, "Must be a list of unique topic names").optional().describe("Define the event topics to publish too in your stack.");
|
|
@@ -9000,7 +8998,7 @@ var TypeObject = class {
|
|
|
9000
8998
|
};
|
|
9001
8999
|
|
|
9002
9000
|
// src/util/name.ts
|
|
9003
|
-
import { paramCase as
|
|
9001
|
+
import { paramCase as paramCase4 } from "change-case";
|
|
9004
9002
|
import { createHmac } from "crypto";
|
|
9005
9003
|
var formatGlobalResourceName = (opt) => {
|
|
9006
9004
|
return [
|
|
@@ -9010,7 +9008,7 @@ var formatGlobalResourceName = (opt) => {
|
|
|
9010
9008
|
opt.resourceType,
|
|
9011
9009
|
opt.resourceName,
|
|
9012
9010
|
opt.postfix
|
|
9013
|
-
].filter((v) => typeof v === "string").map((v) =>
|
|
9011
|
+
].filter((v) => typeof v === "string").map((v) => paramCase4(v) || v).join(opt.seperator ?? "--");
|
|
9014
9012
|
};
|
|
9015
9013
|
var formatLocalResourceName = (opt) => {
|
|
9016
9014
|
return [
|
|
@@ -9021,7 +9019,7 @@ var formatLocalResourceName = (opt) => {
|
|
|
9021
9019
|
opt.resourceType,
|
|
9022
9020
|
opt.resourceName,
|
|
9023
9021
|
opt.postfix
|
|
9024
|
-
].filter((v) => typeof v === "string").map((v) =>
|
|
9022
|
+
].filter((v) => typeof v === "string").map((v) => paramCase4(v) || v).join(opt.seperator ?? "--");
|
|
9025
9023
|
};
|
|
9026
9024
|
var generateGlobalAppId = (opt) => {
|
|
9027
9025
|
return createHmac("sha1", "awsless").update(opt.accountId).update(opt.region).update(opt.appName).digest("hex").substring(0, 8);
|
|
@@ -11097,7 +11095,7 @@ var commandFeature = defineFeature({
|
|
|
11097
11095
|
});
|
|
11098
11096
|
|
|
11099
11097
|
// src/feature/config/index.ts
|
|
11100
|
-
import { paramCase as
|
|
11098
|
+
import { paramCase as paramCase5 } from "change-case";
|
|
11101
11099
|
|
|
11102
11100
|
// src/util/ssm.ts
|
|
11103
11101
|
import {
|
|
@@ -11258,7 +11256,7 @@ var configFeature = defineFeature({
|
|
|
11258
11256
|
resources: configs.map(
|
|
11259
11257
|
(name) => `arn:aws:ssm:${ctx.appConfig.region}:${ctx.accountId}:parameter${configParameterPrefix(
|
|
11260
11258
|
ctx.app.name
|
|
11261
|
-
)}/${
|
|
11259
|
+
)}/${paramCase5(name)}`
|
|
11262
11260
|
)
|
|
11263
11261
|
});
|
|
11264
11262
|
});
|
|
@@ -11533,7 +11531,7 @@ var functionFeature = defineFeature({
|
|
|
11533
11531
|
});
|
|
11534
11532
|
|
|
11535
11533
|
// src/feature/graphql/index.ts
|
|
11536
|
-
import { constantCase as constantCase5, paramCase as
|
|
11534
|
+
import { constantCase as constantCase5, paramCase as paramCase6 } from "change-case";
|
|
11537
11535
|
import { generate } from "@awsless/graphql";
|
|
11538
11536
|
import { mergeTypeDefs } from "@graphql-tools/merge";
|
|
11539
11537
|
import { readFile as readFile5 } from "fs/promises";
|
|
@@ -11826,7 +11824,7 @@ var graphqlFeature = defineFeature({
|
|
|
11826
11824
|
for (const [fieldName, props2] of Object.entries(fields ?? {})) {
|
|
11827
11825
|
const name = `${typeName}__${fieldName}`;
|
|
11828
11826
|
const resolverGroup = new Node7(group, "resolver", name);
|
|
11829
|
-
const entryId =
|
|
11827
|
+
const entryId = paramCase6(`${id}-${shortId(`${typeName}-${fieldName}`)}`);
|
|
11830
11828
|
const { lambda } = createLambdaFunction(resolverGroup, ctx, `graphql`, entryId, {
|
|
11831
11829
|
...props2.consumer,
|
|
11832
11830
|
description: `${id} ${typeName}.${fieldName}`
|
|
@@ -12602,7 +12600,7 @@ var restFeature = defineFeature({
|
|
|
12602
12600
|
});
|
|
12603
12601
|
|
|
12604
12602
|
// src/feature/rpc/index.ts
|
|
12605
|
-
import { camelCase as camelCase6, constantCase as constantCase10, paramCase as
|
|
12603
|
+
import { camelCase as camelCase6, constantCase as constantCase10, paramCase as paramCase7 } from "change-case";
|
|
12606
12604
|
import { Asset as Asset5, aws as aws17, Node as Node16 } from "@awsless/formation";
|
|
12607
12605
|
import { mebibytes as mebibytes2 } from "@awsless/size";
|
|
12608
12606
|
import { dirname as dirname10, join as join9, relative as relative5 } from "path";
|
|
@@ -12904,7 +12902,7 @@ var rpcFeature = defineFeature({
|
|
|
12904
12902
|
const group = new Node16(ctx.stack, "rpc", id);
|
|
12905
12903
|
for (const [name, props] of Object.entries(queries ?? {})) {
|
|
12906
12904
|
const queryGroup = new Node16(group, "query", name);
|
|
12907
|
-
const entryId =
|
|
12905
|
+
const entryId = paramCase7(`${id}-${shortId(name)}`);
|
|
12908
12906
|
createLambdaFunction(queryGroup, ctx, `rpc`, entryId, {
|
|
12909
12907
|
...props,
|
|
12910
12908
|
description: `${id} ${name}`
|
|
@@ -13223,7 +13221,7 @@ var siteFeature = defineFeature({
|
|
|
13223
13221
|
|
|
13224
13222
|
// src/feature/store/index.ts
|
|
13225
13223
|
import { aws as aws20, Node as Node19 } from "@awsless/formation";
|
|
13226
|
-
import { paramCase as
|
|
13224
|
+
import { paramCase as paramCase8 } from "change-case";
|
|
13227
13225
|
var typeGenCode5 = `
|
|
13228
13226
|
import { Body, PutObjectProps, BodyStream } from '@awsless/s3'
|
|
13229
13227
|
|
|
@@ -13307,7 +13305,7 @@ var storeFeature = defineFeature({
|
|
|
13307
13305
|
};
|
|
13308
13306
|
for (const [event, funcProps] of Object.entries(props.events ?? {})) {
|
|
13309
13307
|
const eventGroup = new Node19(group, "event", event);
|
|
13310
|
-
const eventId =
|
|
13308
|
+
const eventId = paramCase8(`${id}-${shortId(event)}`);
|
|
13311
13309
|
const { lambda } = createAsyncLambdaFunction(eventGroup, ctx, `store`, eventId, {
|
|
13312
13310
|
...funcProps,
|
|
13313
13311
|
description: `${id} event "${event}"`
|
|
@@ -180,7 +180,7 @@ var LogSchema = z5.union([
|
|
|
180
180
|
).optional()
|
|
181
181
|
})
|
|
182
182
|
]).describe("Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time.");
|
|
183
|
-
var LayersSchema =
|
|
183
|
+
var LayersSchema = z5.string().array().describe(
|
|
184
184
|
`A list of function layers to add to the function's execution environment.`
|
|
185
185
|
// `A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.`
|
|
186
186
|
);
|
|
@@ -1143,7 +1143,6 @@ var DomainsDefaultSchema = z32.record(
|
|
|
1143
1143
|
).optional().describe("Define the domains for your application.");
|
|
1144
1144
|
|
|
1145
1145
|
// src/feature/layer/schema.ts
|
|
1146
|
-
import { paramCase as paramCase4 } from "change-case";
|
|
1147
1146
|
import { z as z34 } from "zod";
|
|
1148
1147
|
|
|
1149
1148
|
// src/config/schema/lambda.ts
|
|
@@ -1161,9 +1160,8 @@ var Schema = z34.object({
|
|
|
1161
1160
|
"Define the package names that are available bundled in the layer. Those packages are not bundled while bundling the lambda."
|
|
1162
1161
|
)
|
|
1163
1162
|
});
|
|
1164
|
-
var LayerIdSchema = z34.string().min(2).max(214).regex(/^[a-z0-9\-@.]+$/i, "Invalid layer ID").transform((value) => paramCase4(value));
|
|
1165
1163
|
var LayerSchema = z34.record(
|
|
1166
|
-
|
|
1164
|
+
z34.string(),
|
|
1167
1165
|
z34.union([
|
|
1168
1166
|
LocalFileSchema.transform((file) => ({
|
|
1169
1167
|
file,
|
|
Binary file
|