@walkeros/server-source-aws 1.0.4 → 1.0.6-next-1771252576264

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.
@@ -0,0 +1,405 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-source-aws",
4
+ "version": "1.0.5",
5
+ "type": "source",
6
+ "platform": "server"
7
+ },
8
+ "schemas": {
9
+ "settings": {
10
+ "$schema": "http://json-schema.org/draft-07/schema#",
11
+ "type": "object",
12
+ "properties": {
13
+ "cors": {
14
+ "default": true,
15
+ "anyOf": [
16
+ {
17
+ "type": "boolean"
18
+ },
19
+ {
20
+ "type": "object",
21
+ "properties": {
22
+ "origin": {
23
+ "anyOf": [
24
+ {
25
+ "type": "string"
26
+ },
27
+ {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ {
34
+ "type": "string",
35
+ "const": "*"
36
+ }
37
+ ],
38
+ "description": "Allowed origins (* for all, URL string, or array of URLs)"
39
+ },
40
+ "methods": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "enum": [
45
+ "GET",
46
+ "POST",
47
+ "PUT",
48
+ "PATCH",
49
+ "DELETE",
50
+ "OPTIONS",
51
+ "HEAD"
52
+ ]
53
+ },
54
+ "description": "Allowed HTTP methods"
55
+ },
56
+ "headers": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ },
61
+ "description": "Allowed request headers"
62
+ },
63
+ "credentials": {
64
+ "type": "boolean",
65
+ "description": "Allow credentials (cookies, authorization headers)"
66
+ },
67
+ "maxAge": {
68
+ "type": "integer",
69
+ "exclusiveMinimum": 0,
70
+ "maximum": 9007199254740991,
71
+ "description": "Preflight cache duration in seconds"
72
+ }
73
+ },
74
+ "additionalProperties": false
75
+ }
76
+ ],
77
+ "description": "CORS configuration: false = disabled, true = allow all origins, object = custom configuration"
78
+ },
79
+ "timeout": {
80
+ "default": 30000,
81
+ "type": "integer",
82
+ "exclusiveMinimum": 0,
83
+ "maximum": 900000,
84
+ "description": "Request timeout in milliseconds (max: 900000 for Lambda)"
85
+ },
86
+ "enablePixelTracking": {
87
+ "default": true,
88
+ "type": "boolean",
89
+ "description": "Enable GET requests with 1x1 transparent GIF response for pixel tracking"
90
+ },
91
+ "healthPath": {
92
+ "default": "/health",
93
+ "type": "string",
94
+ "description": "Health check endpoint path (e.g., /health)"
95
+ }
96
+ },
97
+ "required": [
98
+ "cors",
99
+ "timeout",
100
+ "enablePixelTracking",
101
+ "healthPath"
102
+ ],
103
+ "additionalProperties": false
104
+ }
105
+ },
106
+ "examples": {
107
+ "env": {
108
+ "push": {
109
+ "push": {
110
+ "$code": "()=>Promise.resolve({ok:!0})"
111
+ },
112
+ "command": {
113
+ "$code": "()=>Promise.resolve({ok:!0})"
114
+ },
115
+ "elb": {
116
+ "$code": "()=>Promise.resolve({ok:!0})"
117
+ },
118
+ "logger": {
119
+ "error": {
120
+ "$code": "()=>{}"
121
+ },
122
+ "info": {
123
+ "$code": "()=>{}"
124
+ },
125
+ "debug": {
126
+ "$code": "()=>{}"
127
+ },
128
+ "throw": {
129
+ "$code": "e=>{throw\"string\"==typeof e?new Error(e):e}"
130
+ },
131
+ "scope": {
132
+ "$code": "()=>m"
133
+ }
134
+ }
135
+ }
136
+ },
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"
228
+ },
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"
244
+ },
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"
258
+ },
259
+ "requestId": "request-123",
260
+ "routeKey": "$default",
261
+ "stage": "prod",
262
+ "time": "01/Jan/2024:00:00:00 +0000",
263
+ "timeEpoch": 1704067200000
264
+ }
265
+ },
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"
314
+ },
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"
330
+ },
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"
344
+ },
345
+ "requestId": "request-123",
346
+ "routeKey": "$default",
347
+ "stage": "prod",
348
+ "time": "01/Jan/2024:00:00:00 +0000",
349
+ "timeEpoch": 1704067200000
350
+ }
351
+ }
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
+ }
404
+ }
405
+ }
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": "1.0.4",
4
+ "version": "1.0.6-next-1771252576264",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -15,18 +15,20 @@
15
15
  "build": "tsup --silent",
16
16
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
17
17
  "dev": "jest --watchAll --colors",
18
- "lint": "tsc && eslint \"**/*.ts*\"",
18
+ "typecheck": "tsc --noEmit",
19
+ "lint": "eslint \"**/*.ts*\"",
19
20
  "test": "jest",
20
21
  "update": "npx npm-check-updates -u && npm update"
21
22
  },
22
23
  "dependencies": {
23
- "@walkeros/core": "1.2.2"
24
+ "@walkeros/core": "1.4.0-next-1771252576264"
24
25
  },
25
26
  "peerDependencies": {
26
27
  "@types/aws-lambda": "^8.10.0"
27
28
  },
28
29
  "devDependencies": {
29
- "@types/aws-lambda": "^8.10.159"
30
+ "@types/aws-lambda": "^8.10.159",
31
+ "@walkeros/collector": "1.3.0-next-1771252576264"
30
32
  },
31
33
  "repository": {
32
34
  "url": "git+https://github.com/elbwalker/walkerOS.git",
@@ -37,14 +39,19 @@
37
39
  "bugs": {
38
40
  "url": "https://github.com/elbwalker/walkerOS/issues"
39
41
  },
42
+ "walkerOS": {
43
+ "type": "source",
44
+ "platform": "server"
45
+ },
40
46
  "keywords": [
41
- "walker",
42
47
  "walkerOS",
48
+ "walkerOS-source",
43
49
  "source",
44
50
  "server",
45
51
  "aws",
46
52
  "lambda",
47
- "api gateway"
53
+ "api gateway",
54
+ "analytics"
48
55
  ],
49
56
  "funding": [
50
57
  {