@awsless/awsless 0.0.165 → 0.0.167

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.
Files changed (35) hide show
  1. package/README.MD +77 -101
  2. package/dist/bin.js +4137 -8341
  3. package/dist/client.js +2 -2
  4. package/dist/server.d.ts +121 -0
  5. package/dist/{index.js → server.js} +48 -55
  6. package/package.json +27 -15
  7. package/dist/app.json +0 -1
  8. package/dist/chunk-PFTL6L4F.js +0 -6
  9. package/dist/features/cognito-client-secret/HASH +0 -1
  10. package/dist/features/cognito-client-secret/bundle.zip +0 -0
  11. package/dist/features/cognito-client-secret/index.js +0 -60
  12. package/dist/features/cognito-client-secret/index.mjs +0 -58
  13. package/dist/features/delete-bucket/HASH +0 -1
  14. package/dist/features/delete-bucket/bundle.zip +0 -0
  15. package/dist/features/delete-bucket/index.js +0 -88
  16. package/dist/features/delete-bucket/index.mjs +0 -86
  17. package/dist/features/delete-hosted-zone/HASH +0 -1
  18. package/dist/features/delete-hosted-zone/bundle.zip +0 -0
  19. package/dist/features/delete-hosted-zone/index.js +0 -130
  20. package/dist/features/delete-hosted-zone/index.mjs +0 -128
  21. package/dist/features/global-exports/HASH +0 -1
  22. package/dist/features/global-exports/bundle.zip +0 -0
  23. package/dist/features/global-exports/index.js +0 -63
  24. package/dist/features/global-exports/index.mjs +0 -61
  25. package/dist/features/invalidate-cache/HASH +0 -1
  26. package/dist/features/invalidate-cache/bundle.zip +0 -0
  27. package/dist/features/invalidate-cache/index.js +0 -63
  28. package/dist/features/invalidate-cache/index.mjs +0 -61
  29. package/dist/features/upload-bucket-asset/HASH +0 -1
  30. package/dist/features/upload-bucket-asset/bundle.zip +0 -0
  31. package/dist/features/upload-bucket-asset/index.js +0 -22015
  32. package/dist/features/upload-bucket-asset/index.mjs +0 -22013
  33. package/dist/index.d.ts +0 -11541
  34. package/dist/json.js +0 -958
  35. 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
- ```js
38
+ ```json
39
39
  {
40
- domains: {
41
- 'example.com': [{
42
- name: 'sub',
43
- type: 'A',
44
- records: [ ... ],
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
- ```js
57
+ ```json
55
58
  {
56
- defaults: {
57
- function: {
58
- // Setting default values for all functions...
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
- ```js
69
+ ```json
74
70
  {
75
- stacks: [{
76
- tables: {
77
- TABLE_NAME: {
78
- hash: 'id',
79
- fields: {
80
- id: 'string',
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
- ```js
86
+ ```json
93
87
  {
94
- stacks: [{
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
- ```js
102
+ ```json
111
103
  {
112
- stacks: [{
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
- ```js
112
+ ```json
123
113
  {
124
- stacks: [{
125
- queues: {
126
- QUEUE_NAME: 'queue-consumer.ts',
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
- ```js
124
+ ```json
137
125
  {
138
- stacks: [{
139
- topics: [ 'TOPIC_NAME' ],
140
- subscribers: {
141
- TOPIC_NAME: 'topic-consumer.ts',
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
- ```js
137
+ ```json
152
138
  {
153
- stacks: [{
154
- pubsub: {
155
- PUBSUB_NAME: {
156
- sql: `SELECT * FROM '$aws/events/presence/connected/+'`,
157
- consumer: 'pubsub-consumer.ts',
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
- ```js
152
+ ```json
169
153
  {
170
- stacks: [{
171
- crons: {
172
- CRON_NAME: {
173
- schedule: 'rate(1 day)',
174
- consumer: 'cron-consumer.ts',
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
- ```js
167
+ ```json
186
168
  {
187
- stacks: [{
188
- http: {
189
- HTTP_API_NAME: {
190
- 'GET /posts': 'list-posts.ts',
191
- 'POST /posts': 'create-post.ts',
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
- ```js
182
+ ```json
203
183
  {
204
- stacks: [{
205
- rest: {
206
- REST_API_NAME: {
207
- 'GET /posts/{id}': 'get-posts.ts',
208
- 'DELETE /posts/{id}': 'delete-post.ts',
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
- ```js
197
+ ```json
220
198
  {
221
- stacks: [{
222
- graphql: {
223
- GRAPHQL_API_NAME: {
224
- schema: 'schema.gql',
225
- resolvers: {
226
- 'Query posts': 'list-posts.ts',
227
- 'Mutation createPost': 'create-post.ts',
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
  ```