@awsless/awsless 0.0.138 → 0.0.140
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 +25 -15
- 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/dist/index.d.ts +1 -0
- package/package.json +5 -5
package/dist/bin.js
CHANGED
|
@@ -572,6 +572,9 @@ var Stack = class {
|
|
|
572
572
|
find(resourceType) {
|
|
573
573
|
return [...this.resources].filter((resource) => resource instanceof resourceType);
|
|
574
574
|
}
|
|
575
|
+
findByLogicalId(id) {
|
|
576
|
+
return [...this.resources].find((resource) => resource.logicalId === id);
|
|
577
|
+
}
|
|
575
578
|
[Symbol.iterator]() {
|
|
576
579
|
return this.resources.values();
|
|
577
580
|
}
|
|
@@ -3547,21 +3550,27 @@ var httpPlugin = definePlugin({
|
|
|
3547
3550
|
if (Object.keys(config2.app.defaults?.http || {}).length === 0) {
|
|
3548
3551
|
return;
|
|
3549
3552
|
}
|
|
3550
|
-
const
|
|
3553
|
+
const vpc = bootstrap2.findByLogicalId("MainEc2Vpc");
|
|
3554
|
+
const subnet1 = bootstrap2.findByLogicalId("Public0Ec2Subnet");
|
|
3555
|
+
const subnet2 = bootstrap2.findByLogicalId("Public1Ec2Subnet");
|
|
3556
|
+
if (!vpc || !subnet1 || !subnet2) {
|
|
3557
|
+
throw new TypeError("The HTTP plugin needs a global vpc to be defined.");
|
|
3558
|
+
}
|
|
3551
3559
|
const securityGroup = new SecurityGroup("http", {
|
|
3552
3560
|
description: "http security group",
|
|
3553
|
-
vpcId
|
|
3554
|
-
});
|
|
3555
|
-
|
|
3556
|
-
securityGroup.addIngressRule(Peer.
|
|
3561
|
+
vpcId: vpc.id
|
|
3562
|
+
}).dependsOn(vpc);
|
|
3563
|
+
const port = Port.tcp(443);
|
|
3564
|
+
securityGroup.addIngressRule(Peer.anyIpv4(), port);
|
|
3565
|
+
securityGroup.addIngressRule(Peer.anyIpv6(), port);
|
|
3557
3566
|
bootstrap2.add(securityGroup);
|
|
3558
3567
|
for (const [id, props] of Object.entries(config2.app.defaults?.http || {})) {
|
|
3559
3568
|
const loadBalancer = new LoadBalancer(id, {
|
|
3560
3569
|
name: `${config2.app.name}-${id}`,
|
|
3561
3570
|
type: "application",
|
|
3562
3571
|
securityGroups: [securityGroup.id],
|
|
3563
|
-
subnets: [
|
|
3564
|
-
}).dependsOn(securityGroup);
|
|
3572
|
+
subnets: [subnet1.id, subnet2.id]
|
|
3573
|
+
}).dependsOn(securityGroup, subnet1, subnet2);
|
|
3565
3574
|
const listener = new Listener(id, {
|
|
3566
3575
|
loadBalancerArn: loadBalancer.arn,
|
|
3567
3576
|
port: 443,
|
|
@@ -3813,7 +3822,7 @@ var IotEventSource = class extends Group {
|
|
|
3813
3822
|
}
|
|
3814
3823
|
};
|
|
3815
3824
|
|
|
3816
|
-
// src/plugins/pubsub/
|
|
3825
|
+
// src/plugins/pubsub/index.ts
|
|
3817
3826
|
var pubsubPlugin = definePlugin({
|
|
3818
3827
|
name: "pubsub",
|
|
3819
3828
|
onApp({ bind }) {
|
|
@@ -3838,7 +3847,7 @@ var pubsubPlugin = definePlugin({
|
|
|
3838
3847
|
}
|
|
3839
3848
|
});
|
|
3840
3849
|
|
|
3841
|
-
// src/plugins/queue/
|
|
3850
|
+
// src/plugins/queue/index.ts
|
|
3842
3851
|
import { camelCase as camelCase4, constantCase as constantCase10 } from "change-case";
|
|
3843
3852
|
import { relative as relative4 } from "path";
|
|
3844
3853
|
var typeGenCode3 = `
|
|
@@ -4074,7 +4083,7 @@ var ApiMapping = class extends Resource {
|
|
|
4074
4083
|
}
|
|
4075
4084
|
};
|
|
4076
4085
|
|
|
4077
|
-
// src/plugins/rest/
|
|
4086
|
+
// src/plugins/rest/index.ts
|
|
4078
4087
|
var restPlugin = definePlugin({
|
|
4079
4088
|
name: "rest",
|
|
4080
4089
|
onApp({ config: config2, app, bootstrap: bootstrap2 }) {
|
|
@@ -4169,7 +4178,7 @@ var Collection = class extends Resource {
|
|
|
4169
4178
|
}
|
|
4170
4179
|
};
|
|
4171
4180
|
|
|
4172
|
-
// src/plugins/search/
|
|
4181
|
+
// src/plugins/search/index.ts
|
|
4173
4182
|
var searchPlugin = definePlugin({
|
|
4174
4183
|
name: "search",
|
|
4175
4184
|
async onTypeGen({ config: config2, write }) {
|
|
@@ -4820,7 +4829,7 @@ var sitePlugin = definePlugin({
|
|
|
4820
4829
|
}
|
|
4821
4830
|
});
|
|
4822
4831
|
|
|
4823
|
-
// src/plugins/store/
|
|
4832
|
+
// src/plugins/store/index.ts
|
|
4824
4833
|
var storePlugin = definePlugin({
|
|
4825
4834
|
name: "store",
|
|
4826
4835
|
async onTypeGen({ config: config2, write }) {
|
|
@@ -5009,7 +5018,7 @@ var DynamoDBEventSource = class extends Group {
|
|
|
5009
5018
|
}
|
|
5010
5019
|
};
|
|
5011
5020
|
|
|
5012
|
-
// src/plugins/table/
|
|
5021
|
+
// src/plugins/table/index.ts
|
|
5013
5022
|
var tablePlugin = definePlugin({
|
|
5014
5023
|
name: "table",
|
|
5015
5024
|
async onTypeGen({ config: config2, write }) {
|
|
@@ -5386,6 +5395,8 @@ var vpcPlugin = definePlugin({
|
|
|
5386
5395
|
|
|
5387
5396
|
// src/plugins/index.ts
|
|
5388
5397
|
var plugins = [
|
|
5398
|
+
// The VPC needs to be defined.
|
|
5399
|
+
vpcPlugin,
|
|
5389
5400
|
authPlugin,
|
|
5390
5401
|
cachePlugin,
|
|
5391
5402
|
configPlugin,
|
|
@@ -5404,8 +5415,7 @@ var plugins = [
|
|
|
5404
5415
|
storePlugin,
|
|
5405
5416
|
tablePlugin,
|
|
5406
5417
|
testPlugin,
|
|
5407
|
-
topicPlugin
|
|
5408
|
-
vpcPlugin
|
|
5418
|
+
topicPlugin
|
|
5409
5419
|
];
|
|
5410
5420
|
|
|
5411
5421
|
// src/formation/app.ts
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -9155,6 +9155,7 @@ declare class Stack {
|
|
|
9155
9155
|
import(name: string): string;
|
|
9156
9156
|
tag(name: string, value: string): this;
|
|
9157
9157
|
find<T>(resourceType: ConstructorOf<T>): T[];
|
|
9158
|
+
findByLogicalId<T = Resource>(id: string): T | undefined;
|
|
9158
9159
|
[Symbol.iterator](): IterableIterator<Resource>;
|
|
9159
9160
|
get size(): number;
|
|
9160
9161
|
toJSON(): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.140",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,10 +29,10 @@
|
|
|
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",
|
|
34
|
-
"@awsless/
|
|
33
|
+
"@awsless/redis": "^0.0.10",
|
|
35
34
|
"@awsless/ssm": "^0.0.7",
|
|
35
|
+
"@awsless/sqs": "^0.0.7",
|
|
36
36
|
"@awsless/validate": "^0.0.10",
|
|
37
37
|
"@awsless/weak-cache": "^0.0.1"
|
|
38
38
|
},
|
|
@@ -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",
|