@awsless/awsless 0.0.382 → 0.0.385
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 +367 -283
- package/dist/build-json-schema.js +27 -17
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/stack.json +1 -1
- package/package.json +10 -10
|
@@ -560,11 +560,6 @@ var InstancesSchema = z16.record(
|
|
|
560
560
|
})
|
|
561
561
|
).optional().describe("Define the instances in your stack.");
|
|
562
562
|
|
|
563
|
-
// src/feature/on-failure/schema.ts
|
|
564
|
-
var OnFailureSchema = FunctionSchema.optional().describe(
|
|
565
|
-
"Defining a onFailure handler will add a global onFailure handler for the following resources:\n- Async lambda functions\n- SQS queues\n- DynamoDB streams"
|
|
566
|
-
);
|
|
567
|
-
|
|
568
563
|
// src/feature/pubsub/schema.ts
|
|
569
564
|
import { z as z17 } from "zod";
|
|
570
565
|
var DomainSchema = ResourceIdSchema.describe("The domain id to link your Pubsub API with.");
|
|
@@ -1078,7 +1073,7 @@ var StackSchema = z30.object({
|
|
|
1078
1073
|
name: NameSchema,
|
|
1079
1074
|
depends: DependsSchema,
|
|
1080
1075
|
commands: CommandsSchema,
|
|
1081
|
-
onFailure: OnFailureSchema,
|
|
1076
|
+
// onFailure: OnFailureSchema,
|
|
1082
1077
|
auth: AuthSchema,
|
|
1083
1078
|
graphql: GraphQLSchema,
|
|
1084
1079
|
http: HttpSchema,
|
|
@@ -1103,7 +1098,7 @@ var StackSchema = z30.object({
|
|
|
1103
1098
|
});
|
|
1104
1099
|
|
|
1105
1100
|
// src/config/app.ts
|
|
1106
|
-
import { z as
|
|
1101
|
+
import { z as z34 } from "zod";
|
|
1107
1102
|
|
|
1108
1103
|
// src/feature/domain/schema.ts
|
|
1109
1104
|
import { z as z31 } from "zod";
|
|
@@ -1126,13 +1121,27 @@ var DomainsDefaultSchema = z31.record(
|
|
|
1126
1121
|
})
|
|
1127
1122
|
).optional().describe("Define the domains for your application.");
|
|
1128
1123
|
|
|
1129
|
-
// src/feature/
|
|
1130
|
-
var
|
|
1131
|
-
"
|
|
1124
|
+
// src/feature/on-failure/schema.ts
|
|
1125
|
+
var OnFailureDefaultSchema = FunctionSchema.optional().describe(
|
|
1126
|
+
"Defining a onFailure handler will add a global onFailure handler for the following resources:\n- Async lambda functions\n- SQS queues\n- DynamoDB streams"
|
|
1132
1127
|
);
|
|
1133
1128
|
|
|
1134
|
-
// src/
|
|
1129
|
+
// src/feature/on-log/schema.ts
|
|
1135
1130
|
import { z as z32 } from "zod";
|
|
1131
|
+
var FilterSchema = z32.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
|
|
1132
|
+
var OnLogDefaultSchema = z32.union([
|
|
1133
|
+
FunctionSchema.transform((consumer) => ({
|
|
1134
|
+
consumer,
|
|
1135
|
+
filter: ["error", "fatal"]
|
|
1136
|
+
})),
|
|
1137
|
+
z32.object({
|
|
1138
|
+
consumer: FunctionSchema,
|
|
1139
|
+
filter: FilterSchema
|
|
1140
|
+
})
|
|
1141
|
+
]).optional().describe("Define a subscription on all Lambda functions logs.");
|
|
1142
|
+
|
|
1143
|
+
// src/config/schema/region.ts
|
|
1144
|
+
import { z as z33 } from "zod";
|
|
1136
1145
|
var US = ["us-east-2", "us-east-1", "us-west-1", "us-west-2"];
|
|
1137
1146
|
var AF = ["af-south-1"];
|
|
1138
1147
|
var AP = [
|
|
@@ -1161,22 +1170,23 @@ var EU = [
|
|
|
1161
1170
|
var ME = ["me-south-1", "me-central-1"];
|
|
1162
1171
|
var SA = ["sa-east-1"];
|
|
1163
1172
|
var regions = [...US, ...AF, ...AP, ...CA, ...EU, ...ME, ...SA];
|
|
1164
|
-
var RegionSchema =
|
|
1173
|
+
var RegionSchema = z33.enum(regions);
|
|
1165
1174
|
|
|
1166
1175
|
// src/config/app.ts
|
|
1167
|
-
var AppSchema =
|
|
1168
|
-
$schema:
|
|
1176
|
+
var AppSchema = z34.object({
|
|
1177
|
+
$schema: z34.string().optional(),
|
|
1169
1178
|
name: ResourceIdSchema.describe("App name."),
|
|
1170
1179
|
region: RegionSchema.describe("The AWS region to deploy to."),
|
|
1171
|
-
profile:
|
|
1180
|
+
profile: z34.string().describe("The AWS profile to deploy to."),
|
|
1172
1181
|
// stage: z
|
|
1173
1182
|
// .string()
|
|
1174
1183
|
// .regex(/^[a-z]+$/)
|
|
1175
1184
|
// .default('prod')
|
|
1176
1185
|
// .describe('The deployment stage.'),
|
|
1177
1186
|
// onFailure: OnFailureSchema,
|
|
1178
|
-
|
|
1179
|
-
|
|
1187
|
+
defaults: z34.object({
|
|
1188
|
+
onFailure: OnFailureDefaultSchema,
|
|
1189
|
+
onLog: OnLogDefaultSchema,
|
|
1180
1190
|
auth: AuthDefaultSchema,
|
|
1181
1191
|
domains: DomainsDefaultSchema,
|
|
1182
1192
|
function: FunctionDefaultSchema,
|
|
Binary file
|