@creator.co/wapi 1.7.9 โ 1.7.10-alpha.2
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/.eslintrc.cjs +19 -0
- package/README.md +1 -11
- 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 +830 -223
- package/dist/package.json +3 -1
- package/dist/src/BaseEvent/DynamoTransaction.d.ts +70 -0
- package/dist/src/BaseEvent/DynamoTransaction.js +104 -0
- package/dist/src/BaseEvent/DynamoTransaction.js.map +1 -0
- package/dist/src/BaseEvent/EventProcessor.js.map +1 -1
- package/dist/src/BaseEvent/Transaction.d.ts +3 -3
- package/dist/src/BaseEvent/Transaction.js +1 -1
- package/dist/src/BaseEvent/Transaction.js.map +1 -1
- package/dist/src/Cache/Redis.js.map +1 -1
- package/dist/src/Database/integrations/dynamo/DynamoDatabase.js.map +1 -1
- package/dist/src/Database/integrations/knex/KnexDatabase.js.map +1 -1
- package/dist/src/Database/integrations/kysely/KyselyDatabase.js.map +1 -1
- package/dist/src/Database/integrations/pgsql/PostgresDatabase.js.map +1 -1
- package/dist/src/Logger/Logger.js.map +1 -1
- package/dist/src/Publisher/Publisher.js.map +1 -1
- package/dist/src/Server/RouteResolver.d.ts +0 -1
- package/dist/src/Server/RouteResolver.js +0 -1
- package/dist/src/Server/RouteResolver.js.map +1 -1
- package/dist/src/Server/lib/container/Proxy.js.map +1 -1
- package/dist/src/Util/Utils.d.ts +15 -0
- package/dist/src/Util/Utils.js +41 -0
- package/dist/src/Util/Utils.js.map +1 -1
- package/index.ts +11 -5
- package/package.json +3 -1
- package/src/BaseEvent/DynamoTransaction.ts +175 -0
- package/src/BaseEvent/EventProcessor.ts +1 -1
- package/src/BaseEvent/Transaction.ts +7 -3
- package/src/Cache/Redis.ts +1 -0
- package/src/Database/integrations/dynamo/DynamoDatabase.ts +1 -1
- package/src/Database/integrations/knex/KnexDatabase.ts +1 -1
- package/src/Database/integrations/kysely/KyselyDatabase.ts +3 -1
- package/src/Database/integrations/pgsql/PostgresDatabase.ts +2 -1
- package/src/Logger/Logger.ts +7 -7
- package/src/Publisher/Publisher.ts +5 -2
- package/src/Server/RouteResolver.ts +1 -1
- package/src/Server/lib/container/Proxy.ts +2 -2
- package/src/Util/AsyncSingleton.ts +1 -1
- package/src/Util/Utils.ts +38 -0
- package/tests/API/Utils.test.ts +100 -38
- package/tests/BaseEvent/DynamoTransaction.test.ts +272 -0
- package/tests/Logger/Logger.test.ts +1 -1
- package/tests/Test.utils.ts +5 -1
package/.eslintrc.cjs
CHANGED
|
@@ -35,6 +35,25 @@ module.exports = {
|
|
|
35
35
|
],
|
|
36
36
|
'@typescript-eslint/ban-ts-comment': 0,
|
|
37
37
|
'@typescript-eslint/no-explicit-any': 0,
|
|
38
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
39
|
+
'error',
|
|
40
|
+
{
|
|
41
|
+
accessibility: 'explicit',
|
|
42
|
+
overrides: {
|
|
43
|
+
accessors: 'explicit',
|
|
44
|
+
constructors: 'no-public',
|
|
45
|
+
methods: 'explicit',
|
|
46
|
+
properties: 'explicit',
|
|
47
|
+
parameterProperties: 'explicit',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
'lines-between-class-members': [
|
|
52
|
+
'error',
|
|
53
|
+
{
|
|
54
|
+
enforce: [{ blankLine: 'always', prev: 'method', next: 'method' }],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
38
57
|
// turn on errors for missing imports
|
|
39
58
|
'import/no-unresolved': ['error', { ignore: ['\\.js$'] }],
|
|
40
59
|
// 'import/no-named-as-default-member': 'off',
|
package/README.md
CHANGED
|
@@ -191,16 +191,6 @@ Build the Project: Build the project using TypeScript.
|
|
|
191
191
|
npm run build
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
### ๐ค Running the Project
|
|
195
|
-
|
|
196
|
-
Run the Project Locally: You can run the project locally using the following command:
|
|
197
|
-
|
|
198
|
-
```
|
|
199
|
-
npm run start-local
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
This command starts the local development server.
|
|
203
|
-
|
|
204
194
|
### ๐งช Tests
|
|
205
195
|
|
|
206
196
|
Run Tests: The project includes a comprehensive set of tests. You can run the tests using:
|
|
@@ -212,7 +202,7 @@ npm test
|
|
|
212
202
|
Additionally, there are tests for running the project in a local environment:
|
|
213
203
|
|
|
214
204
|
```
|
|
215
|
-
npm run test-
|
|
205
|
+
npm run test-dev
|
|
216
206
|
```
|
|
217
207
|
|
|
218
208
|
Congratulations! You now have WAPI up and running, and you're ready to start developing your web applications.
|
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,gCAAgC,CAAA;AAC/E,OAAO,KAAK,MAAM,sBAAsB,CAAA;AACxC,OAAO,aAAa,MAAM,+BAA+B,CAAA;AACzD,OAAO,MAAM,MAAM,wBAAwB,CAAA;AAC3C,OAAO,GAAG,MAAM,qBAAqB,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,y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