@creator.co/wapi 1.7.10-alpha.1 → 1.7.10
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 +2 -0
- package/dist/index.d.ts +11 -6
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/index.ts +11 -5
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**WAPI** is a powerful API wrapper designed to streamline web application development. It offers opinionated abstractions, simplifying common web development tasks. At its core, WAPI revolves around the concept of **transactions**, which can be applied in diverse scenarios, including handling async events, managing message queues, running AWS Lambda functions, and creating hybrid HTTP servers that seamlessly blend serverless and container-based approaches.
|
|
4
4
|
|
|
5
|
+
[Documentation available here](https://creator-co.github.io/Wapi)
|
|
6
|
+
|
|
5
7
|
-    
|
|
6
8
|
- 
|
|
7
9
|
- 
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpMethod } from './src/API/Request.js';
|
|
2
2
|
import Response, { ResponseErrorType } from './src/API/Response.js';
|
|
3
|
+
import DynamoTransaction from './src/BaseEvent/DynamoTransaction.js';
|
|
3
4
|
import EventProcessor from './src/BaseEvent/EventProcessor.js';
|
|
4
5
|
import Process from './src/BaseEvent/Process.js';
|
|
5
6
|
import Transaction, { TransactionConfig } from './src/BaseEvent/Transaction.js';
|
|
@@ -13,13 +14,16 @@ import Router, { Route } from './src/Server/Router.js';
|
|
|
13
14
|
import AsyncSingleton from './src/Util/AsyncSingleton.js';
|
|
14
15
|
import Utils from './src/Util/Utils.js';
|
|
15
16
|
/**
|
|
16
|
-
* This module exports various classes and utilities for handling transactions, processes,
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* This module exports various classes and utilities for handling transactions, processes,
|
|
18
|
+
* event processing, DynamoDB transactions, routing, mailing, cryptography, JWT handling,
|
|
19
|
+
* configuration management, Redis operations, response handling, utility functions,
|
|
20
|
+
* asynchronous singleton pattern, route definitions, transaction configurations,
|
|
21
|
+
* response error types, HTTP methods, and database operations.
|
|
19
22
|
* @exports {
|
|
20
23
|
* Transaction,
|
|
21
24
|
* Process,
|
|
22
25
|
* EventProcessor,
|
|
26
|
+
* DynamoTransaction,
|
|
23
27
|
* Router,
|
|
24
28
|
* Mailer,
|
|
25
29
|
* Crypto,
|
|
@@ -28,10 +32,11 @@ import Utils from './src/Util/Utils.js';
|
|
|
28
32
|
* Redis,
|
|
29
33
|
* Response,
|
|
30
34
|
* Utils,
|
|
35
|
+
* AsyncSingleton,
|
|
31
36
|
* Route,
|
|
37
|
+
* TransactionConfig,
|
|
32
38
|
* ResponseErrorType,
|
|
33
39
|
* HttpMethod,
|
|
34
|
-
*
|
|
35
|
-
* }
|
|
40
|
+
*
|
|
36
41
|
*/
|
|
37
|
-
export { Transaction, Process, EventProcessor, Router, Mailer, Crypto, JWT, Configuration, Redis, Response, Utils, AsyncSingleton, Route, TransactionConfig, ResponseErrorType, HttpMethod, Database, };
|
|
42
|
+
export { Transaction, Process, EventProcessor, DynamoTransaction, Router, Mailer, Crypto, JWT, Configuration, Redis, Response, Utils, AsyncSingleton, Route, TransactionConfig, ResponseErrorType, HttpMethod, Database, };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpMethod } from './src/API/Request.js';
|
|
2
2
|
import Response from './src/API/Response.js';
|
|
3
|
+
import DynamoTransaction from './src/BaseEvent/DynamoTransaction.js';
|
|
3
4
|
import EventProcessor from './src/BaseEvent/EventProcessor.js';
|
|
4
5
|
import Process from './src/BaseEvent/Process.js';
|
|
5
6
|
import Transaction from './src/BaseEvent/Transaction.js';
|
|
@@ -13,13 +14,16 @@ import Router from './src/Server/Router.js';
|
|
|
13
14
|
import AsyncSingleton from './src/Util/AsyncSingleton.js';
|
|
14
15
|
import Utils from './src/Util/Utils.js';
|
|
15
16
|
/**
|
|
16
|
-
* This module exports various classes and utilities for handling transactions, processes,
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* This module exports various classes and utilities for handling transactions, processes,
|
|
18
|
+
* event processing, DynamoDB transactions, routing, mailing, cryptography, JWT handling,
|
|
19
|
+
* configuration management, Redis operations, response handling, utility functions,
|
|
20
|
+
* asynchronous singleton pattern, route definitions, transaction configurations,
|
|
21
|
+
* response error types, HTTP methods, and database operations.
|
|
19
22
|
* @exports {
|
|
20
23
|
* Transaction,
|
|
21
24
|
* Process,
|
|
22
25
|
* EventProcessor,
|
|
26
|
+
* DynamoTransaction,
|
|
23
27
|
* Router,
|
|
24
28
|
* Mailer,
|
|
25
29
|
* Crypto,
|
|
@@ -28,15 +32,16 @@ import Utils from './src/Util/Utils.js';
|
|
|
28
32
|
* Redis,
|
|
29
33
|
* Response,
|
|
30
34
|
* Utils,
|
|
35
|
+
* AsyncSingleton,
|
|
31
36
|
* Route,
|
|
37
|
+
* TransactionConfig,
|
|
32
38
|
* ResponseErrorType,
|
|
33
39
|
* HttpMethod,
|
|
34
|
-
*
|
|
35
|
-
* }
|
|
40
|
+
*
|
|
36
41
|
*/
|
|
37
42
|
export {
|
|
38
43
|
// Base Events
|
|
39
|
-
Transaction, Process, EventProcessor, Router,
|
|
44
|
+
Transaction, Process, EventProcessor, DynamoTransaction, Router,
|
|
40
45
|
// Externally initialized clients
|
|
41
46
|
Mailer, Crypto, JWT, Configuration, Redis,
|
|
42
47
|
// API
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,QAA+B,MAAM,uBAAuB,CAAA;AACnE,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAC9D,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAChD,OAAO,WAAkC,MAAM,gCAA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b,KAAK;AACL,MAAM;AACN,QAAQ;AACR,UAAU;AACV,KAAK,EACL,cAAc,EAKd,UAAU,EACV,QAAQ,GACT,CAAA"}
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@creator.co/wapi",
|
|
3
|
-
"version": "1.7.10-alpha.
|
|
3
|
+
"version": "1.7.10-alpha.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@creator.co/wapi",
|
|
9
|
-
"version": "1.7.10-alpha.
|
|
9
|
+
"version": "1.7.10-alpha.2",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-dynamodb": "^3.574.0",
|
package/dist/package.json
CHANGED
package/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpMethod } from './src/API/Request.js'
|
|
2
2
|
import Response, { ResponseErrorType } from './src/API/Response.js'
|
|
3
|
+
import DynamoTransaction from './src/BaseEvent/DynamoTransaction.js'
|
|
3
4
|
import EventProcessor from './src/BaseEvent/EventProcessor.js'
|
|
4
5
|
import Process from './src/BaseEvent/Process.js'
|
|
5
6
|
import Transaction, { TransactionConfig } from './src/BaseEvent/Transaction.js'
|
|
@@ -14,13 +15,16 @@ import AsyncSingleton from './src/Util/AsyncSingleton.js'
|
|
|
14
15
|
import Utils from './src/Util/Utils.js'
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
* This module exports various classes and utilities for handling transactions, processes,
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* This module exports various classes and utilities for handling transactions, processes,
|
|
19
|
+
* event processing, DynamoDB transactions, routing, mailing, cryptography, JWT handling,
|
|
20
|
+
* configuration management, Redis operations, response handling, utility functions,
|
|
21
|
+
* asynchronous singleton pattern, route definitions, transaction configurations,
|
|
22
|
+
* response error types, HTTP methods, and database operations.
|
|
20
23
|
* @exports {
|
|
21
24
|
* Transaction,
|
|
22
25
|
* Process,
|
|
23
26
|
* EventProcessor,
|
|
27
|
+
* DynamoTransaction,
|
|
24
28
|
* Router,
|
|
25
29
|
* Mailer,
|
|
26
30
|
* Crypto,
|
|
@@ -29,17 +33,19 @@ import Utils from './src/Util/Utils.js'
|
|
|
29
33
|
* Redis,
|
|
30
34
|
* Response,
|
|
31
35
|
* Utils,
|
|
36
|
+
* AsyncSingleton,
|
|
32
37
|
* Route,
|
|
38
|
+
* TransactionConfig,
|
|
33
39
|
* ResponseErrorType,
|
|
34
40
|
* HttpMethod,
|
|
35
|
-
*
|
|
36
|
-
* }
|
|
41
|
+
*
|
|
37
42
|
*/
|
|
38
43
|
export {
|
|
39
44
|
// Base Events
|
|
40
45
|
Transaction,
|
|
41
46
|
Process,
|
|
42
47
|
EventProcessor,
|
|
48
|
+
DynamoTransaction,
|
|
43
49
|
Router,
|
|
44
50
|
// Externally initialized clients
|
|
45
51
|
Mailer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@creator.co/wapi",
|
|
3
|
-
"version": "1.7.10
|
|
3
|
+
"version": "1.7.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-sdk/client-dynamodb": "^3.574.0",
|
|
23
|
-
"@aws-sdk/client-kms": "^3.
|
|
24
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
25
|
-
"@aws-sdk/client-ses": "^3.
|
|
26
|
-
"@aws-sdk/client-sns": "^3.
|
|
27
|
-
"@aws-sdk/client-ssm": "^3.
|
|
28
|
-
"@aws-sdk/credential-provider-node": "^3.
|
|
23
|
+
"@aws-sdk/client-kms": "^3.637.0",
|
|
24
|
+
"@aws-sdk/client-secrets-manager": "^3.637.0",
|
|
25
|
+
"@aws-sdk/client-ses": "^3.637.0",
|
|
26
|
+
"@aws-sdk/client-sns": "^3.637.0",
|
|
27
|
+
"@aws-sdk/client-ssm": "^3.637.0",
|
|
28
|
+
"@aws-sdk/credential-provider-node": "^3.637.0",
|
|
29
29
|
"@aws-sdk/util-dynamodb": "^3.637.0",
|
|
30
30
|
"@smithy/node-http-handler": "^3.0.0",
|
|
31
31
|
"@types/email-templates": "^10.0.1",
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
"parse-duration": "^1.1.0",
|
|
48
48
|
"path-to-regexp": "^6.2.2",
|
|
49
49
|
"pg": "^8.11.3",
|
|
50
|
-
"redis": "^4.
|
|
50
|
+
"redis": "^4.7.0",
|
|
51
51
|
"sha1": "^1.1.1",
|
|
52
52
|
"stack-trace": "0.0.10",
|
|
53
53
|
"zod": "^3.23.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@jest/globals": "^29.7.0",
|
|
57
|
-
"@types/aws-lambda": "^8.10.
|
|
58
|
-
"@types/chai": "^4.3.
|
|
57
|
+
"@types/aws-lambda": "^8.10.145",
|
|
58
|
+
"@types/chai": "^4.3.19",
|
|
59
59
|
"@types/cors": "^2.8.15",
|
|
60
60
|
"@types/express": "^4.17.19",
|
|
61
61
|
"@types/jest": "^29.5.12",
|
|
62
62
|
"@types/jsonwebtoken": "^9.0.3",
|
|
63
63
|
"@types/node": "^20.12.7",
|
|
64
64
|
"@types/path-to-regexp": "^1.7.0",
|
|
65
|
-
"@types/pg": "^8.11.
|
|
65
|
+
"@types/pg": "^8.11.7",
|
|
66
66
|
"@types/supertest": "^6.0.2",
|
|
67
67
|
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
68
68
|
"@typescript-eslint/parser": "^7.7.1",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"eslint": "^8.48.0",
|
|
73
73
|
"eslint-config-prettier": "^9.0.0",
|
|
74
74
|
"eslint-plugin-import": "^2.28.1",
|
|
75
|
-
"eslint-plugin-prettier": "^5.
|
|
75
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
76
76
|
"eslint-plugin-require-extensions": "^0.1.3",
|
|
77
77
|
"jest": "^29.7.0",
|
|
78
78
|
"jest-junit": "^16.0.0",
|
|
79
|
-
"prettier": "^3.
|
|
79
|
+
"prettier": "^3.3.3",
|
|
80
80
|
"supertest": "^6.3.3",
|
|
81
|
-
"ts-jest": "^29.
|
|
81
|
+
"ts-jest": "^29.2.5",
|
|
82
82
|
"ts-node": "^10.9.1",
|
|
83
|
-
"typescript": "^5.4
|
|
83
|
+
"typescript": "^5.5.4"
|
|
84
84
|
}
|
|
85
85
|
}
|