@awsless/awsless 0.0.164 → 0.0.166
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/README.MD +77 -101
- package/dist/bin.js +4136 -8340
- package/dist/client.js +2 -2
- package/dist/server.d.ts +121 -0
- package/dist/{index.js → server.js} +48 -55
- package/package.json +23 -11
- package/dist/app.json +0 -1
- package/dist/chunk-PFTL6L4F.js +0 -6
- package/dist/features/cognito-client-secret/HASH +0 -1
- package/dist/features/cognito-client-secret/bundle.zip +0 -0
- package/dist/features/cognito-client-secret/index.js +0 -60
- package/dist/features/cognito-client-secret/index.mjs +0 -58
- package/dist/features/delete-bucket/HASH +0 -1
- package/dist/features/delete-bucket/bundle.zip +0 -0
- package/dist/features/delete-bucket/index.js +0 -88
- package/dist/features/delete-bucket/index.mjs +0 -86
- package/dist/features/delete-hosted-zone/HASH +0 -1
- package/dist/features/delete-hosted-zone/bundle.zip +0 -0
- package/dist/features/delete-hosted-zone/index.js +0 -130
- package/dist/features/delete-hosted-zone/index.mjs +0 -128
- package/dist/features/global-exports/HASH +0 -1
- package/dist/features/global-exports/bundle.zip +0 -0
- package/dist/features/global-exports/index.js +0 -63
- package/dist/features/global-exports/index.mjs +0 -61
- package/dist/features/invalidate-cache/HASH +0 -1
- package/dist/features/invalidate-cache/bundle.zip +0 -0
- package/dist/features/invalidate-cache/index.js +0 -63
- package/dist/features/invalidate-cache/index.mjs +0 -61
- package/dist/features/upload-bucket-asset/HASH +0 -1
- package/dist/features/upload-bucket-asset/bundle.zip +0 -0
- package/dist/features/upload-bucket-asset/index.js +0 -22015
- package/dist/features/upload-bucket-asset/index.mjs +0 -22013
- package/dist/index.d.ts +0 -11536
- package/dist/json.js +0 -961
- package/dist/stack.json +0 -1
package/README.MD
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
# TODO:
|
|
4
|
-
- onFailure for lambda, sqs, dynamodb streams
|
|
5
|
-
- add cache plugin & think about VPC lambda solutions
|
|
6
4
|
- add fargate container stuff for long lived services
|
|
7
5
|
- add check for existing graphql resolver field in schema
|
|
8
6
|
- add check for conflicting types inside graphql (Like duplicate type names)
|
|
9
7
|
- Types should probably only allowed to defined once. And should be extended after that.
|
|
10
8
|
|
|
9
|
+
-
|
|
10
|
+
|
|
11
11
|
---
|
|
12
12
|
---
|
|
13
13
|
---
|
|
@@ -35,15 +35,18 @@
|
|
|
35
35
|
|
|
36
36
|
We use AWS Route53 to provide domain management.
|
|
37
37
|
|
|
38
|
-
```
|
|
38
|
+
```json
|
|
39
39
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
"domains": {
|
|
41
|
+
"main": {
|
|
42
|
+
"domain": "example.com",
|
|
43
|
+
"dns": [{
|
|
44
|
+
"name": "sub",
|
|
45
|
+
"type": "A",
|
|
46
|
+
"records": [ ... ],
|
|
47
|
+
}]
|
|
48
|
+
},
|
|
49
|
+
}
|
|
47
50
|
}
|
|
48
51
|
```
|
|
49
52
|
|
|
@@ -51,18 +54,11 @@ We use AWS Route53 to provide domain management.
|
|
|
51
54
|
|
|
52
55
|
We use AWS Lambda to provide serverless functions.
|
|
53
56
|
|
|
54
|
-
```
|
|
57
|
+
```json
|
|
55
58
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
stacks: [{
|
|
62
|
-
functions: {
|
|
63
|
-
FUNCTION_NAME: 'function.ts'
|
|
64
|
-
}
|
|
65
|
-
}]
|
|
59
|
+
"functions": {
|
|
60
|
+
"FUNCTION_NAME": "function.ts"
|
|
61
|
+
}
|
|
66
62
|
}
|
|
67
63
|
```
|
|
68
64
|
|
|
@@ -70,18 +66,16 @@ We use AWS Lambda to provide serverless functions.
|
|
|
70
66
|
|
|
71
67
|
We use AWS DynamoDB to provide serverless tables.
|
|
72
68
|
|
|
73
|
-
```
|
|
69
|
+
```json
|
|
74
70
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
}]
|
|
71
|
+
"tables": {
|
|
72
|
+
"TABLE_NAME": {
|
|
73
|
+
"hash": "id",
|
|
74
|
+
"fields": {
|
|
75
|
+
"id": "number",
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
85
79
|
}
|
|
86
80
|
```
|
|
87
81
|
|
|
@@ -89,11 +83,9 @@ We use AWS DynamoDB to provide serverless tables.
|
|
|
89
83
|
|
|
90
84
|
We use AWS S3 to provide serverless key-value storage.
|
|
91
85
|
|
|
92
|
-
```
|
|
86
|
+
```json
|
|
93
87
|
{
|
|
94
|
-
|
|
95
|
-
stores: [ 'STORE_NAME' ]
|
|
96
|
-
}]
|
|
88
|
+
"stores": [ "STORE_NAME" ]
|
|
97
89
|
}
|
|
98
90
|
```
|
|
99
91
|
|
|
@@ -107,11 +99,9 @@ _WORK IN PROGRESS..._
|
|
|
107
99
|
|
|
108
100
|
We use AWS Open Search Serverless to provide serverless search api.
|
|
109
101
|
|
|
110
|
-
```
|
|
102
|
+
```json
|
|
111
103
|
{
|
|
112
|
-
|
|
113
|
-
searchs: [ 'SEARCH_NAME' ]
|
|
114
|
-
}]
|
|
104
|
+
"searchs": [ "SEARCH_NAME" ]
|
|
115
105
|
}
|
|
116
106
|
```
|
|
117
107
|
|
|
@@ -119,13 +109,11 @@ We use AWS Open Search Serverless to provide serverless search api.
|
|
|
119
109
|
|
|
120
110
|
We use AWS SQS to provide serverless queues.
|
|
121
111
|
|
|
122
|
-
```
|
|
112
|
+
```json
|
|
123
113
|
{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
}]
|
|
114
|
+
"queues": {
|
|
115
|
+
"QUEUE_NAME": "queue-consumer.ts"
|
|
116
|
+
}
|
|
129
117
|
}
|
|
130
118
|
```
|
|
131
119
|
|
|
@@ -133,14 +121,12 @@ We use AWS SQS to provide serverless queues.
|
|
|
133
121
|
|
|
134
122
|
We use AWS SNS to provide serverless pubsub topics.
|
|
135
123
|
|
|
136
|
-
```
|
|
124
|
+
```json
|
|
137
125
|
{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
}]
|
|
126
|
+
"topics": [ "TOPIC_NAME" ],
|
|
127
|
+
"subscribers": {
|
|
128
|
+
"TOPIC_NAME": "topic-consumer.ts",
|
|
129
|
+
}
|
|
144
130
|
}
|
|
145
131
|
```
|
|
146
132
|
|
|
@@ -148,16 +134,14 @@ We use AWS SNS to provide serverless pubsub topics.
|
|
|
148
134
|
|
|
149
135
|
We use AWS IoT to provide a serverless mqtt pubsub channel.
|
|
150
136
|
|
|
151
|
-
```
|
|
137
|
+
```json
|
|
152
138
|
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
}]
|
|
139
|
+
"pubsub": {
|
|
140
|
+
"PUBSUB_NAME": {
|
|
141
|
+
"sql": "SELECT * FROM '$aws/events/presence/connected/+'",
|
|
142
|
+
"consumer": "pubsub-consumer.ts",
|
|
143
|
+
}
|
|
144
|
+
}
|
|
161
145
|
}
|
|
162
146
|
```
|
|
163
147
|
|
|
@@ -165,16 +149,14 @@ We use AWS IoT to provide a serverless mqtt pubsub channel.
|
|
|
165
149
|
|
|
166
150
|
We use AWS Event Bridge to provide serverless cron jobs.
|
|
167
151
|
|
|
168
|
-
```
|
|
152
|
+
```json
|
|
169
153
|
{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
}]
|
|
154
|
+
"crons": {
|
|
155
|
+
"CRON_NAME": {
|
|
156
|
+
"schedule": "1 day",
|
|
157
|
+
"consumer": "cron-consumer.ts",
|
|
158
|
+
}
|
|
159
|
+
}
|
|
178
160
|
}
|
|
179
161
|
```
|
|
180
162
|
|
|
@@ -182,16 +164,14 @@ We use AWS Event Bridge to provide serverless cron jobs.
|
|
|
182
164
|
|
|
183
165
|
We use AWS ELB to provide a HTTP API.
|
|
184
166
|
|
|
185
|
-
```
|
|
167
|
+
```json
|
|
186
168
|
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
}]
|
|
169
|
+
http: {
|
|
170
|
+
HTTP_API_NAME: {
|
|
171
|
+
'GET /posts': 'list-posts.ts',
|
|
172
|
+
'POST /posts': 'create-post.ts',
|
|
173
|
+
}
|
|
174
|
+
}
|
|
195
175
|
}
|
|
196
176
|
```
|
|
197
177
|
|
|
@@ -199,16 +179,14 @@ We use AWS ELB to provide a HTTP API.
|
|
|
199
179
|
|
|
200
180
|
We use AWS ApiGatewayV2 to provide a serverless REST API.
|
|
201
181
|
|
|
202
|
-
```
|
|
182
|
+
```json
|
|
203
183
|
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
}]
|
|
184
|
+
rest: {
|
|
185
|
+
REST_API_NAME: {
|
|
186
|
+
'GET /posts/{id}': 'get-posts.ts',
|
|
187
|
+
'DELETE /posts/{id}': 'delete-post.ts',
|
|
188
|
+
}
|
|
189
|
+
}
|
|
212
190
|
}
|
|
213
191
|
```
|
|
214
192
|
|
|
@@ -216,18 +194,16 @@ We use AWS ApiGatewayV2 to provide a serverless REST API.
|
|
|
216
194
|
|
|
217
195
|
We use AWS AppSync to provide a serverless GraphQL API.
|
|
218
196
|
|
|
219
|
-
```
|
|
197
|
+
```json
|
|
220
198
|
{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
}]
|
|
199
|
+
graphql: {
|
|
200
|
+
GRAPHQL_API_NAME: {
|
|
201
|
+
schema: 'schema.gql',
|
|
202
|
+
resolvers: {
|
|
203
|
+
'Query posts': 'list-posts.ts',
|
|
204
|
+
'Mutation createPost': 'create-post.ts',
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
232
208
|
}
|
|
233
209
|
```
|