@awsless/awsless 0.0.91 → 0.0.92
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 +10 -8
- 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 +2 -2
package/dist/bin.js
CHANGED
|
@@ -2477,6 +2477,8 @@ var isEmail = (value) => {
|
|
|
2477
2477
|
};
|
|
2478
2478
|
|
|
2479
2479
|
// src/plugins/topic.ts
|
|
2480
|
+
import { paramCase as paramCase4 } from "change-case";
|
|
2481
|
+
var TopicNameSchema = z12.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) => paramCase4(value));
|
|
2480
2482
|
var typeGenCode3 = `
|
|
2481
2483
|
import { PublishOptions } from '@awsless/sns'
|
|
2482
2484
|
|
|
@@ -2494,7 +2496,7 @@ var topicPlugin = definePlugin({
|
|
|
2494
2496
|
* topics: [ 'TOPIC_NAME' ]
|
|
2495
2497
|
* }
|
|
2496
2498
|
*/
|
|
2497
|
-
topics: z12.array(
|
|
2499
|
+
topics: z12.array(TopicNameSchema).refine((topics) => {
|
|
2498
2500
|
return topics.length === new Set(topics).size;
|
|
2499
2501
|
}, "Must be a list of unique topic names").optional(),
|
|
2500
2502
|
/** Define the events to subscribe too in your stack.
|
|
@@ -2509,7 +2511,7 @@ var topicPlugin = definePlugin({
|
|
|
2509
2511
|
* }
|
|
2510
2512
|
* }
|
|
2511
2513
|
*/
|
|
2512
|
-
subscribers: z12.record(
|
|
2514
|
+
subscribers: z12.record(TopicNameSchema, z12.union([EmailSchema, FunctionSchema])).optional()
|
|
2513
2515
|
}).array().superRefine((stacks, ctx) => {
|
|
2514
2516
|
const topics = [];
|
|
2515
2517
|
for (const stack of stacks) {
|
|
@@ -2717,7 +2719,7 @@ var toArray = (value) => {
|
|
|
2717
2719
|
};
|
|
2718
2720
|
|
|
2719
2721
|
// src/plugins/graphql.ts
|
|
2720
|
-
import { paramCase as
|
|
2722
|
+
import { paramCase as paramCase5 } from "change-case";
|
|
2721
2723
|
|
|
2722
2724
|
// src/formation/resource/appsync/graphql-api.ts
|
|
2723
2725
|
var GraphQLApi = class extends Resource {
|
|
@@ -3279,7 +3281,7 @@ var graphqlPlugin = definePlugin({
|
|
|
3279
3281
|
for (const [typeName, fields] of Object.entries(props.resolvers || {})) {
|
|
3280
3282
|
for (const [fieldName, resolverProps] of Object.entries(fields || {})) {
|
|
3281
3283
|
const props2 = isFunctionProps(resolverProps) ? { consumer: resolverProps } : resolverProps;
|
|
3282
|
-
const entryId =
|
|
3284
|
+
const entryId = paramCase5(`${id}-${typeName}-${fieldName}`);
|
|
3283
3285
|
const lambda = toLambdaFunction(ctx, `graphql-${entryId}`, props2.consumer);
|
|
3284
3286
|
const resolver = props2.resolver ?? defaultProps?.resolver;
|
|
3285
3287
|
let code = defaultResolver;
|
|
@@ -4967,7 +4969,7 @@ var Params = class {
|
|
|
4967
4969
|
};
|
|
4968
4970
|
|
|
4969
4971
|
// src/plugins/config.ts
|
|
4970
|
-
import { paramCase as
|
|
4972
|
+
import { paramCase as paramCase6 } from "change-case";
|
|
4971
4973
|
var ConfigNameSchema = z23.string().regex(/[a-z0-9\-]/g, "Invalid config name");
|
|
4972
4974
|
var configPlugin = definePlugin({
|
|
4973
4975
|
name: "config",
|
|
@@ -5012,7 +5014,7 @@ var configPlugin = definePlugin({
|
|
|
5012
5014
|
return formatArn({
|
|
5013
5015
|
service: "ssm",
|
|
5014
5016
|
resource: "parameter",
|
|
5015
|
-
resourceName: configParameterPrefix(config) + "/" +
|
|
5017
|
+
resourceName: configParameterPrefix(config) + "/" + paramCase6(name),
|
|
5016
5018
|
seperator: ""
|
|
5017
5019
|
});
|
|
5018
5020
|
})
|
|
@@ -7490,7 +7492,7 @@ var shouldDeployBootstrap = async (client, stack) => {
|
|
|
7490
7492
|
// src/formation/client.ts
|
|
7491
7493
|
import { CloudFormationClient, CreateStackCommand, DeleteStackCommand, DescribeStackEventsCommand, DescribeStacksCommand, GetTemplateCommand, OnFailure, TemplateStage, UpdateStackCommand, ValidateTemplateCommand, waitUntilStackCreateComplete, waitUntilStackDeleteComplete, waitUntilStackUpdateComplete } from "@aws-sdk/client-cloudformation";
|
|
7492
7494
|
import { S3Client, PutObjectCommand, ObjectCannedACL, StorageClass } from "@aws-sdk/client-s3";
|
|
7493
|
-
import { paramCase as
|
|
7495
|
+
import { paramCase as paramCase7 } from "change-case";
|
|
7494
7496
|
var StackClient = class {
|
|
7495
7497
|
constructor(app, account, region, credentials) {
|
|
7496
7498
|
this.app = app;
|
|
@@ -7523,7 +7525,7 @@ var StackClient = class {
|
|
|
7523
7525
|
};
|
|
7524
7526
|
}
|
|
7525
7527
|
stackName(stackName) {
|
|
7526
|
-
return
|
|
7528
|
+
return paramCase7(`${this.app.name}-${stackName}`);
|
|
7527
7529
|
}
|
|
7528
7530
|
tags(stack) {
|
|
7529
7531
|
const tags = [];
|
|
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.92",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@awsless/validate": "^0.0.6",
|
|
28
|
-
"@awsless/lambda": "^0.0.13",
|
|
29
28
|
"@awsless/redis": "^0.0.8",
|
|
29
|
+
"@awsless/lambda": "^0.0.13",
|
|
30
30
|
"@awsless/sns": "^0.0.7",
|
|
31
31
|
"@awsless/sqs": "^0.0.7",
|
|
32
32
|
"@awsless/ssm": "^0.0.7"
|