@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.
Files changed (48) hide show
  1. package/.eslintrc.cjs +19 -0
  2. package/README.md +1 -11
  3. package/dist/index.d.ts +11 -6
  4. package/dist/index.js +11 -6
  5. package/dist/index.js.map +1 -1
  6. package/dist/package-lock.json +830 -223
  7. package/dist/package.json +3 -1
  8. package/dist/src/BaseEvent/DynamoTransaction.d.ts +70 -0
  9. package/dist/src/BaseEvent/DynamoTransaction.js +104 -0
  10. package/dist/src/BaseEvent/DynamoTransaction.js.map +1 -0
  11. package/dist/src/BaseEvent/EventProcessor.js.map +1 -1
  12. package/dist/src/BaseEvent/Transaction.d.ts +3 -3
  13. package/dist/src/BaseEvent/Transaction.js +1 -1
  14. package/dist/src/BaseEvent/Transaction.js.map +1 -1
  15. package/dist/src/Cache/Redis.js.map +1 -1
  16. package/dist/src/Database/integrations/dynamo/DynamoDatabase.js.map +1 -1
  17. package/dist/src/Database/integrations/knex/KnexDatabase.js.map +1 -1
  18. package/dist/src/Database/integrations/kysely/KyselyDatabase.js.map +1 -1
  19. package/dist/src/Database/integrations/pgsql/PostgresDatabase.js.map +1 -1
  20. package/dist/src/Logger/Logger.js.map +1 -1
  21. package/dist/src/Publisher/Publisher.js.map +1 -1
  22. package/dist/src/Server/RouteResolver.d.ts +0 -1
  23. package/dist/src/Server/RouteResolver.js +0 -1
  24. package/dist/src/Server/RouteResolver.js.map +1 -1
  25. package/dist/src/Server/lib/container/Proxy.js.map +1 -1
  26. package/dist/src/Util/Utils.d.ts +15 -0
  27. package/dist/src/Util/Utils.js +41 -0
  28. package/dist/src/Util/Utils.js.map +1 -1
  29. package/index.ts +11 -5
  30. package/package.json +3 -1
  31. package/src/BaseEvent/DynamoTransaction.ts +175 -0
  32. package/src/BaseEvent/EventProcessor.ts +1 -1
  33. package/src/BaseEvent/Transaction.ts +7 -3
  34. package/src/Cache/Redis.ts +1 -0
  35. package/src/Database/integrations/dynamo/DynamoDatabase.ts +1 -1
  36. package/src/Database/integrations/knex/KnexDatabase.ts +1 -1
  37. package/src/Database/integrations/kysely/KyselyDatabase.ts +3 -1
  38. package/src/Database/integrations/pgsql/PostgresDatabase.ts +2 -1
  39. package/src/Logger/Logger.ts +7 -7
  40. package/src/Publisher/Publisher.ts +5 -2
  41. package/src/Server/RouteResolver.ts +1 -1
  42. package/src/Server/lib/container/Proxy.ts +2 -2
  43. package/src/Util/AsyncSingleton.ts +1 -1
  44. package/src/Util/Utils.ts +38 -0
  45. package/tests/API/Utils.test.ts +100 -38
  46. package/tests/BaseEvent/DynamoTransaction.test.ts +272 -0
  47. package/tests/Logger/Logger.test.ts +1 -1
  48. 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-local
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, events, routing,
17
- * mailing, cryptography, JWT, configuration, Redis, responses, utilities, routes, response error types,
18
- * HTTP methods, and databases.
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
- * Database,
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, events, routing,
17
- * mailing, cryptography, JWT, configuration, Redis, responses, utilities, routes, response error types,
18
- * HTTP methods, and databases.
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
- * Database,
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,yBAAyB,CAAA;AACnD,OAAO,MAAM,MAAM,wBAAwB,CAAA;AAC3C,OAAO,MAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,cAAc,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,MAAM,qBAAqB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO;AACL,cAAc;AACd,WAAW,EACX,OAAO,EACP,cAAc,EACd,MAAM;AACN,iCAAiC;AACjC,MAAM,EACN,MAAM,EACN,GAAG,EACH,aAAa,EACb,KAAK;AACL,MAAM;AACN,QAAQ;AACR,UAAU;AACV,KAAK,EACL,cAAc,EAKd,UAAU,EACV,QAAQ,GACT,CAAA"}
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,iBAAiB,MAAM,sCAAsC,CAAA;AACpE,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAC9D,OAAO,OAAO,MAAM,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