@walkeros/server-source-aws 2.0.1 → 2.1.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/server-source-aws",
4
- "version": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "type": "source",
6
6
  "platform": "server"
7
7
  },
@@ -119,6 +119,9 @@
119
119
  "error": {
120
120
  "$code": "()=>{}"
121
121
  },
122
+ "warn": {
123
+ "$code": "()=>{}"
124
+ },
122
125
  "info": {
123
126
  "$code": "()=>{}"
124
127
  },
@@ -128,278 +131,60 @@
128
131
  "throw": {
129
132
  "$code": "e=>{throw\"string\"==typeof e?new Error(e):e}"
130
133
  },
134
+ "json": {
135
+ "$code": "()=>{}"
136
+ },
131
137
  "scope": {
132
- "$code": "()=>m"
138
+ "$code": "()=>b"
133
139
  }
134
140
  }
135
141
  }
136
142
  },
137
- "events": {
138
- "buttonClickEvent": {
139
- "name": "button click",
140
- "data": {
141
- "id": "cta",
142
- "text": "Sign Up"
143
- }
144
- },
145
- "pageViewEvent": {
146
- "name": "page view",
147
- "data": {
148
- "title": "Home Page",
149
- "path": "/"
150
- },
151
- "user": {
152
- "id": "user-123"
153
- }
154
- },
155
- "productAddEvent": {
156
- "name": "product add",
157
- "data": {
158
- "id": "P123",
159
- "name": "Laptop",
160
- "price": 999
161
- }
162
- }
163
- },
164
- "inputs": {
165
- "apiGatewayV1PostEvent": {
166
- "httpMethod": "POST",
167
- "path": "/collect",
168
- "body": "{\"event\":\"product add\",\"data\":{\"id\":\"P123\",\"name\":\"Laptop\",\"price\":999}}",
169
- "headers": {
170
- "content-type": "application/json"
171
- },
172
- "multiValueHeaders": {},
173
- "isBase64Encoded": false,
174
- "pathParameters": null,
175
- "queryStringParameters": null,
176
- "multiValueQueryStringParameters": null,
177
- "stageVariables": null,
178
- "resource": "/collect",
179
- "requestContext": {
180
- "accountId": "123456789012",
181
- "apiId": "api-id",
182
- "protocol": "HTTP/1.1",
183
- "httpMethod": "POST",
184
- "path": "/collect",
185
- "stage": "prod",
186
- "requestId": "request-789",
187
- "requestTimeEpoch": 1704067202000,
188
- "resourceId": "resource-id",
189
- "resourcePath": "/collect",
190
- "identity": {
191
- "sourceIp": "1.2.3.4",
192
- "userAgent": "Mozilla/5.0",
193
- "accessKey": null,
194
- "accountId": null,
195
- "apiKey": null,
196
- "apiKeyId": null,
197
- "caller": null,
198
- "clientCert": null,
199
- "cognitoAuthenticationProvider": null,
200
- "cognitoAuthenticationType": null,
201
- "cognitoIdentityId": null,
202
- "cognitoIdentityPoolId": null,
203
- "principalOrgId": null,
204
- "user": null,
205
- "userArn": null
206
- },
207
- "authorizer": null
208
- }
209
- },
210
- "apiGatewayV2GetEvent": {
211
- "version": "2.0",
212
- "routeKey": "$default",
213
- "rawPath": "/collect",
214
- "rawQueryString": "event=button%20click&data[id]=cta&data[text]=Sign%20Up",
215
- "headers": {},
216
- "isBase64Encoded": false,
217
- "requestContext": {
218
- "accountId": "123456789012",
219
- "apiId": "api-id",
220
- "domainName": "api.example.com",
221
- "domainPrefix": "api",
222
- "http": {
223
- "method": "GET",
224
- "path": "/collect",
225
- "protocol": "HTTP/1.1",
226
- "sourceIp": "1.2.3.4",
227
- "userAgent": "Mozilla/5.0"
143
+ "step": {
144
+ "lambdaGet": {
145
+ "in": {
146
+ "version": "2.0",
147
+ "requestContext": {
148
+ "http": {
149
+ "method": "GET",
150
+ "path": "/collect"
151
+ },
152
+ "requestId": "req-456"
228
153
  },
229
- "requestId": "request-456",
230
- "routeKey": "$default",
231
- "stage": "prod",
232
- "time": "01/Jan/2024:00:00:01 +0000",
233
- "timeEpoch": 1704067201000
234
- }
235
- },
236
- "apiGatewayV2PostEvent": {
237
- "version": "2.0",
238
- "routeKey": "$default",
239
- "rawPath": "/collect",
240
- "rawQueryString": "",
241
- "headers": {
242
- "content-type": "application/json",
243
- "user-agent": "Mozilla/5.0"
154
+ "rawQueryString": "e=page+view&d=%7B%22title%22%3A%22Home%22%7D",
155
+ "isBase64Encoded": false
244
156
  },
245
- "body": "{\"event\":\"page view\",\"data\":{\"title\":\"Home Page\",\"path\":\"/\"},\"user\":{\"id\":\"user-123\"}}",
246
- "isBase64Encoded": false,
247
- "requestContext": {
248
- "accountId": "123456789012",
249
- "apiId": "api-id",
250
- "domainName": "api.example.com",
251
- "domainPrefix": "api",
252
- "http": {
253
- "method": "POST",
254
- "path": "/collect",
255
- "protocol": "HTTP/1.1",
256
- "sourceIp": "1.2.3.4",
257
- "userAgent": "Mozilla/5.0"
157
+ "out": {
158
+ "name": "page view",
159
+ "data": {
160
+ "title": "Home"
258
161
  },
259
- "requestId": "request-123",
260
- "routeKey": "$default",
261
- "stage": "prod",
262
- "time": "01/Jan/2024:00:00:00 +0000",
263
- "timeEpoch": 1704067200000
162
+ "entity": "page",
163
+ "action": "view"
264
164
  }
265
165
  },
266
- "healthCheckEvent": {
267
- "version": "2.0",
268
- "routeKey": "$default",
269
- "rawPath": "/health",
270
- "rawQueryString": "",
271
- "headers": {},
272
- "isBase64Encoded": false,
273
- "requestContext": {
274
- "accountId": "123456789012",
275
- "apiId": "api-id",
276
- "domainName": "api.example.com",
277
- "domainPrefix": "api",
278
- "http": {
279
- "method": "GET",
280
- "path": "/health",
281
- "protocol": "HTTP/1.1",
282
- "sourceIp": "1.2.3.4",
283
- "userAgent": "Mozilla/5.0"
284
- },
285
- "requestId": "request-456",
286
- "routeKey": "$default",
287
- "stage": "prod",
288
- "time": "01/Jan/2024:00:00:01 +0000",
289
- "timeEpoch": 1704067201000
290
- }
291
- },
292
- "invalidJsonEvent": {
293
- "version": "2.0",
294
- "routeKey": "$default",
295
- "rawPath": "/collect",
296
- "rawQueryString": "",
297
- "headers": {
298
- "content-type": "application/json",
299
- "user-agent": "Mozilla/5.0"
300
- },
301
- "body": "{invalid json",
302
- "isBase64Encoded": false,
303
- "requestContext": {
304
- "accountId": "123456789012",
305
- "apiId": "api-id",
306
- "domainName": "api.example.com",
307
- "domainPrefix": "api",
308
- "http": {
309
- "method": "POST",
310
- "path": "/collect",
311
- "protocol": "HTTP/1.1",
312
- "sourceIp": "1.2.3.4",
313
- "userAgent": "Mozilla/5.0"
166
+ "lambdaPost": {
167
+ "in": {
168
+ "version": "2.0",
169
+ "requestContext": {
170
+ "http": {
171
+ "method": "POST",
172
+ "path": "/collect"
173
+ },
174
+ "requestId": "req-123"
314
175
  },
315
- "requestId": "request-123",
316
- "routeKey": "$default",
317
- "stage": "prod",
318
- "time": "01/Jan/2024:00:00:00 +0000",
319
- "timeEpoch": 1704067200000
320
- }
321
- },
322
- "missingEventField": {
323
- "version": "2.0",
324
- "routeKey": "$default",
325
- "rawPath": "/collect",
326
- "rawQueryString": "",
327
- "headers": {
328
- "content-type": "application/json",
329
- "user-agent": "Mozilla/5.0"
176
+ "body": "{\"name\":\"page view\",\"data\":{\"title\":\"Home\"}}",
177
+ "isBase64Encoded": false
330
178
  },
331
- "body": "{\"data\":{\"foo\":\"bar\"}}",
332
- "isBase64Encoded": false,
333
- "requestContext": {
334
- "accountId": "123456789012",
335
- "apiId": "api-id",
336
- "domainName": "api.example.com",
337
- "domainPrefix": "api",
338
- "http": {
339
- "method": "POST",
340
- "path": "/collect",
341
- "protocol": "HTTP/1.1",
342
- "sourceIp": "1.2.3.4",
343
- "userAgent": "Mozilla/5.0"
179
+ "out": {
180
+ "name": "page view",
181
+ "data": {
182
+ "title": "Home"
344
183
  },
345
- "requestId": "request-123",
346
- "routeKey": "$default",
347
- "stage": "prod",
348
- "time": "01/Jan/2024:00:00:00 +0000",
349
- "timeEpoch": 1704067200000
184
+ "entity": "page",
185
+ "action": "view"
350
186
  }
351
187
  }
352
- },
353
- "outputs": {
354
- "healthResponse": {
355
- "statusCode": 200,
356
- "headers": {
357
- "Content-Type": "application/json",
358
- "Access-Control-Allow-Origin": "*",
359
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
360
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
361
- "Access-Control-Max-Age": "3600"
362
- },
363
- "body": "{\"status\":\"ok\"}",
364
- "isBase64Encoded": false
365
- },
366
- "invalidBodyResponse": {
367
- "statusCode": 400,
368
- "headers": {
369
- "Content-Type": "application/json",
370
- "Access-Control-Allow-Origin": "*",
371
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
372
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
373
- "Access-Control-Max-Age": "3600"
374
- },
375
- "body": "{\"success\":false,\"error\":\"Invalid request\"}",
376
- "isBase64Encoded": false
377
- },
378
- "pixelResponse": {
379
- "statusCode": 200,
380
- "headers": {
381
- "Content-Type": "image/gif",
382
- "Cache-Control": "no-cache, no-store, must-revalidate",
383
- "Access-Control-Allow-Origin": "*",
384
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
385
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
386
- "Access-Control-Max-Age": "3600"
387
- },
388
- "body": "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
389
- "isBase64Encoded": true
390
- },
391
- "successResponse": {
392
- "statusCode": 200,
393
- "headers": {
394
- "Content-Type": "application/json",
395
- "Access-Control-Allow-Origin": "*",
396
- "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
397
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
398
- "Access-Control-Max-Age": "3600"
399
- },
400
- "body": "{\"success\":true}",
401
- "isBase64Encoded": false
402
- }
403
188
  }
404
189
  }
405
190
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/server-source-aws",
3
3
  "description": "AWS server sources for walkerOS (Lambda, API Gateway, Function URLs)",
4
- "version": "2.0.1",
4
+ "version": "2.1.1",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -21,14 +21,14 @@
21
21
  "update": "npx npm-check-updates -u && npm update"
22
22
  },
23
23
  "dependencies": {
24
- "@walkeros/core": "^2.0.0"
24
+ "@walkeros/core": "^2.1.1"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@types/aws-lambda": "^8.10.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/aws-lambda": "^8.10.159",
31
- "@walkeros/collector": "^2.0.0"
31
+ "@walkeros/collector": "^2.1.1"
32
32
  },
33
33
  "repository": {
34
34
  "url": "git+https://github.com/elbwalker/walkerOS.git",