@webda/aws 2.0.0-beta.0 → 2.0.0-beta.3

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 (55) hide show
  1. package/lib/deployers/cloudformation.d.ts +4 -5
  2. package/lib/deployers/cloudformation.js +5 -5
  3. package/lib/deployers/cloudformation.js.map +1 -1
  4. package/lib/deployers/cloudformation.spec.js +11 -11
  5. package/lib/deployers/cloudformation.spec.js.map +1 -1
  6. package/lib/deployers/index.d.ts +3 -3
  7. package/lib/deployers/index.js +6 -6
  8. package/lib/deployers/index.js.map +1 -1
  9. package/lib/deployers/index.spec.js +9 -8
  10. package/lib/deployers/index.spec.js.map +1 -1
  11. package/lib/deployers/lambdapackager.spec.js +1 -1
  12. package/lib/deployers/lambdapackager.spec.js.map +1 -1
  13. package/lib/services/cloudwatchlogger.d.ts +1 -1
  14. package/lib/services/cloudwatchlogger.js +2 -1
  15. package/lib/services/cloudwatchlogger.js.map +1 -1
  16. package/lib/services/cloudwatchlogger.spec.js +2 -2
  17. package/lib/services/cloudwatchlogger.spec.js.map +1 -1
  18. package/lib/services/dynamodb.d.ts +4 -4
  19. package/lib/services/dynamodb.js +3 -2
  20. package/lib/services/dynamodb.js.map +1 -1
  21. package/lib/services/dynamodb.spec.js +6 -6
  22. package/lib/services/dynamodb.spec.js.map +1 -1
  23. package/lib/services/index.d.ts +1 -1
  24. package/lib/services/index.js +1 -1
  25. package/lib/services/index.js.map +1 -1
  26. package/lib/services/lambdacaller.d.ts +9 -3
  27. package/lib/services/lambdacaller.js +2 -1
  28. package/lib/services/lambdacaller.js.map +1 -1
  29. package/lib/services/lambdacaller.spec.js +4 -4
  30. package/lib/services/lambdacaller.spec.js.map +1 -1
  31. package/lib/services/lambdaserver.d.ts +3 -9
  32. package/lib/services/lambdaserver.js +27 -50
  33. package/lib/services/lambdaserver.js.map +1 -1
  34. package/lib/services/lambdaserver.spec.js +7 -13
  35. package/lib/services/lambdaserver.spec.js.map +1 -1
  36. package/lib/services/route53.spec.js +4 -4
  37. package/lib/services/route53.spec.js.map +1 -1
  38. package/lib/services/s3binary.d.ts +3 -3
  39. package/lib/services/s3binary.js +4 -4
  40. package/lib/services/s3binary.js.map +1 -1
  41. package/lib/services/s3binary.spec.js +7 -7
  42. package/lib/services/s3binary.spec.js.map +1 -1
  43. package/lib/services/secretsmanager.d.ts +1 -1
  44. package/lib/services/secretsmanager.js +1 -1
  45. package/lib/services/secretsmanager.js.map +1 -1
  46. package/lib/services/secretsmanager.spec.js +1 -1
  47. package/lib/services/secretsmanager.spec.js.map +1 -1
  48. package/lib/services/sqsqueue.d.ts +4 -5
  49. package/lib/services/sqsqueue.js +10 -4
  50. package/lib/services/sqsqueue.js.map +1 -1
  51. package/lib/services/sqsqueue.spec.js +4 -4
  52. package/lib/services/sqsqueue.spec.js.map +1 -1
  53. package/lib/shell.d.ts +1 -1
  54. package/package.json +7 -6
  55. package/webda.module.json +275 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webda/aws",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "Webda AWS Services implementation",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -45,7 +45,7 @@
45
45
  "@aws-sdk/client-sts": "^3.58.0",
46
46
  "@aws-sdk/lib-dynamodb": "^3.58.0",
47
47
  "@aws-sdk/s3-request-presigner": "^3.58.0",
48
- "@webda/core": "^2.0.0-beta.0",
48
+ "@webda/core": "^2.0.0-beta.3",
49
49
  "bluebird": "^3.7.2",
50
50
  "glob": "^8.0.1",
51
51
  "iam-policy-optimizer": "^1.1.2",
@@ -71,11 +71,12 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@testdeck/mocha": "^0.2.0",
74
+ "@types/aws-lambda": "^8.10.97",
74
75
  "@types/node": "14.0.0",
75
- "@webda/async": "^2.0.0-beta.0",
76
- "@webda/shell": "^2.0.0-beta.0",
76
+ "@webda/async": "^2.0.0-beta.3",
77
+ "@webda/shell": "^2.0.0-beta.3",
77
78
  "aws-sdk-client-mock": "^0.6.2",
78
- "sinon": "^13.0.1"
79
+ "sinon": "^14.0.0"
79
80
  },
80
- "gitHead": "5a559bca55832e9a6526794117e2f78188eba3d0"
81
+ "gitHead": "f95827566d42d22c32aed524b74d0446fff66ed4"
81
82
  }
package/webda.module.json CHANGED
@@ -13,5 +13,279 @@
13
13
  "webda/cloudformationdeployer": "lib/deployers/cloudformation:default",
14
14
  "webda/lambdapackager": "lib/deployers/lambdapackager:default"
15
15
  },
16
- "schemas": {}
16
+ "schemas": {
17
+ "webda/lambdapackager": {
18
+ "type": "object",
19
+ "properties": {
20
+ "name": {
21
+ "type": "string"
22
+ },
23
+ "type": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "$schema": "http://json-schema.org/draft-07/schema#",
28
+ "title": "CloudFormationDeployer"
29
+ },
30
+ "webda/cloudformationdeployer": {
31
+ "type": "object",
32
+ "properties": {
33
+ "name": {
34
+ "type": "string"
35
+ },
36
+ "type": {
37
+ "type": "string"
38
+ }
39
+ },
40
+ "$schema": "http://json-schema.org/draft-07/schema#",
41
+ "title": "CloudFormationDeployer"
42
+ },
43
+ "webda/cloudwatchlogger": {
44
+ "type": "object",
45
+ "properties": {
46
+ "type": {
47
+ "type": "string",
48
+ "description": "Type of the service"
49
+ }
50
+ },
51
+ "required": [
52
+ "type"
53
+ ],
54
+ "description": "Interface to specify the Service parameters",
55
+ "$schema": "http://json-schema.org/draft-07/schema#",
56
+ "title": "AWSSecretsManager"
57
+ },
58
+ "webda/dynamostore": {
59
+ "type": "object",
60
+ "properties": {
61
+ "type": {
62
+ "type": "string",
63
+ "description": "Type of the service"
64
+ },
65
+ "model": {
66
+ "type": "string",
67
+ "description": "Webda model to use within the Store",
68
+ "default": "Webda/CoreModel"
69
+ },
70
+ "asyncDelete": {
71
+ "type": "boolean",
72
+ "description": "async delete"
73
+ },
74
+ "expose": {
75
+ "$ref": "#/definitions/ExposeParameters",
76
+ "description": "Expose the service to an urls"
77
+ },
78
+ "strict": {
79
+ "type": "boolean",
80
+ "description": "Allow to load object that does not have the type data",
81
+ "default": true
82
+ },
83
+ "slowQueryThreshold": {
84
+ "type": "number",
85
+ "description": "Slow query threshold",
86
+ "default": 30000
87
+ }
88
+ },
89
+ "required": [
90
+ "asyncDelete",
91
+ "slowQueryThreshold",
92
+ "type"
93
+ ],
94
+ "description": "Store parameter",
95
+ "$schema": "http://json-schema.org/draft-07/schema#",
96
+ "definitions": {
97
+ "ExposeParameters": {
98
+ "type": "object",
99
+ "properties": {
100
+ "url": {
101
+ "type": "string",
102
+ "description": "URL endpoint to use to expose REST Resources API",
103
+ "default": "service.getName().toLowerCase()"
104
+ },
105
+ "restrict": {
106
+ "type": "object",
107
+ "properties": {
108
+ "create": {
109
+ "type": "boolean",
110
+ "description": "Do not expose the POST"
111
+ },
112
+ "update": {
113
+ "type": "boolean",
114
+ "description": "Do not expose the PUT and PATCH"
115
+ },
116
+ "get": {
117
+ "type": "boolean",
118
+ "description": "Do not expose the GET"
119
+ },
120
+ "delete": {
121
+ "type": "boolean",
122
+ "description": "Do not expose the DELETE"
123
+ },
124
+ "query": {
125
+ "type": "boolean",
126
+ "description": "Do not expose the query endpoint"
127
+ }
128
+ },
129
+ "description": "You can restrict any part of the CRUD",
130
+ "default": {}
131
+ },
132
+ "queryMethod": {
133
+ "type": "string",
134
+ "enum": [
135
+ "PUT",
136
+ "GET"
137
+ ],
138
+ "description": "For confidentiality sometimes you might prefer to expose query through PUT To avoid GET logging",
139
+ "default": "GET"
140
+ }
141
+ }
142
+ }
143
+ },
144
+ "title": "DynamoStore"
145
+ },
146
+ "webda/lambdacaller": {
147
+ "type": "object",
148
+ "properties": {
149
+ "type": {
150
+ "type": "string",
151
+ "description": "Type of the service"
152
+ },
153
+ "actions": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "string"
157
+ },
158
+ "description": "Actions managed by the runner",
159
+ "default": []
160
+ }
161
+ },
162
+ "required": [
163
+ "type"
164
+ ],
165
+ "$schema": "http://json-schema.org/draft-07/schema#",
166
+ "title": "LambdaCaller"
167
+ },
168
+ "webda/s3binary": {
169
+ "type": "object",
170
+ "properties": {
171
+ "type": {
172
+ "type": "string",
173
+ "description": "Type of the service"
174
+ },
175
+ "map": {
176
+ "type": "object",
177
+ "additionalProperties": {
178
+ "type": "array",
179
+ "items": {
180
+ "type": "string"
181
+ }
182
+ },
183
+ "description": "Define the map to Object collection\n\nkey is a Store name the string[] represent all valids attributes to store files in"
184
+ },
185
+ "expose": {
186
+ "type": "object",
187
+ "properties": {
188
+ "url": {
189
+ "type": "string",
190
+ "description": "URL to expose the service to"
191
+ },
192
+ "restrict": {
193
+ "type": "object",
194
+ "properties": {
195
+ "get": {
196
+ "type": "boolean",
197
+ "description": "Restrict GET"
198
+ },
199
+ "create": {
200
+ "type": "boolean",
201
+ "description": "Restrict POST"
202
+ },
203
+ "delete": {
204
+ "type": "boolean",
205
+ "description": "Restrict DELETE"
206
+ },
207
+ "metadata": {
208
+ "type": "boolean",
209
+ "description": "Restrict update of metadata"
210
+ }
211
+ },
212
+ "description": "Restrict some APIs"
213
+ }
214
+ },
215
+ "required": [
216
+ "url"
217
+ ],
218
+ "description": "Expose the service to http"
219
+ },
220
+ "prefix": {
221
+ "type": "string"
222
+ }
223
+ },
224
+ "required": [
225
+ "map",
226
+ "type"
227
+ ],
228
+ "description": "Default binary parameters",
229
+ "$schema": "http://json-schema.org/draft-07/schema#",
230
+ "title": "S3Binary"
231
+ },
232
+ "webda/awssecretsmanager": {
233
+ "type": "object",
234
+ "properties": {
235
+ "type": {
236
+ "type": "string",
237
+ "description": "Type of the service"
238
+ }
239
+ },
240
+ "required": [
241
+ "type"
242
+ ],
243
+ "description": "Interface to specify the Service parameters",
244
+ "$schema": "http://json-schema.org/draft-07/schema#",
245
+ "title": "AWSSecretsManager"
246
+ },
247
+ "webda/sqsqueue": {
248
+ "type": "object",
249
+ "properties": {
250
+ "type": {
251
+ "type": "string",
252
+ "description": "Type of the service"
253
+ },
254
+ "workerDelayer": {
255
+ "type": "object",
256
+ "properties": {
257
+ "interval": {
258
+ "type": "number",
259
+ "description": "Interval"
260
+ },
261
+ "type": {
262
+ "type": "string",
263
+ "description": "Type of delayer registered in WaitDelayerFactoryRegistry"
264
+ }
265
+ },
266
+ "required": [
267
+ "interval",
268
+ "type"
269
+ ],
270
+ "description": "Delayer between two failed attempts to process messages"
271
+ },
272
+ "workerParallelism": {
273
+ "type": "boolean",
274
+ "description": "Define if worker should process multi message received in //",
275
+ "default": true
276
+ },
277
+ "maxConsumers": {
278
+ "type": "number",
279
+ "description": "Max number of queue consumers Queue will auto increase to this max number if queue is loaded and it will decrease to just one consumer if no messages are available",
280
+ "default": 10
281
+ }
282
+ },
283
+ "required": [
284
+ "maxConsumers",
285
+ "type"
286
+ ],
287
+ "$schema": "http://json-schema.org/draft-07/schema#",
288
+ "title": "SQSQueue"
289
+ }
290
+ }
17
291
  }