quantum-flow 1.0.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.
Files changed (102) hide show
  1. package/.prettierrc.json +9 -0
  2. package/README.md +37 -0
  3. package/dist/app/aws/index.d.ts +1 -0
  4. package/dist/app/aws/index.js +17 -0
  5. package/dist/app/aws/lambda.d.ts +13 -0
  6. package/dist/app/aws/lambda.js +241 -0
  7. package/dist/app/http/Application.d.ts +23 -0
  8. package/dist/app/http/Application.js +208 -0
  9. package/dist/app/http/Socket.d.ts +16 -0
  10. package/dist/app/http/Socket.js +32 -0
  11. package/dist/app/http/decorators.d.ts +7 -0
  12. package/dist/app/http/decorators.js +81 -0
  13. package/dist/app/http/index.d.ts +3 -0
  14. package/dist/app/http/index.js +19 -0
  15. package/dist/app/http/websocket/WebsocetService.d.ts +20 -0
  16. package/dist/app/http/websocket/WebsocetService.js +41 -0
  17. package/dist/app/http/websocket/WebsocketServer.d.ts +30 -0
  18. package/dist/app/http/websocket/WebsocketServer.js +221 -0
  19. package/dist/constants.d.ts +16 -0
  20. package/dist/constants.js +24 -0
  21. package/dist/core/Controller.d.ts +43 -0
  22. package/dist/core/Controller.js +159 -0
  23. package/dist/core/Endpoint.d.ts +8 -0
  24. package/dist/core/Endpoint.js +43 -0
  25. package/dist/core/index.d.ts +4 -0
  26. package/dist/core/index.js +19 -0
  27. package/dist/core/utils/extractors.d.ts +15 -0
  28. package/dist/core/utils/extractors.js +29 -0
  29. package/dist/core/utils/helpers.d.ts +4 -0
  30. package/dist/core/utils/helpers.js +22 -0
  31. package/dist/core/utils/index.d.ts +3 -0
  32. package/dist/core/utils/index.js +19 -0
  33. package/dist/core/utils/websocket.d.ts +8 -0
  34. package/dist/core/utils/websocket.js +45 -0
  35. package/dist/types/common.d.ts +47 -0
  36. package/dist/types/common.js +2 -0
  37. package/dist/types/controller.d.ts +4 -0
  38. package/dist/types/controller.js +2 -0
  39. package/dist/types/http.d.ts +18 -0
  40. package/dist/types/http.js +2 -0
  41. package/dist/types/index.d.ts +5 -0
  42. package/dist/types/index.js +21 -0
  43. package/dist/types/lambda.d.ts +26 -0
  44. package/dist/types/lambda.js +2 -0
  45. package/dist/types/websocket.d.ts +55 -0
  46. package/dist/types/websocket.js +2 -0
  47. package/dist/utils/controller.d.ts +9 -0
  48. package/dist/utils/controller.js +111 -0
  49. package/dist/utils/helper.d.ts +1 -0
  50. package/dist/utils/helper.js +24 -0
  51. package/dist/utils/index.d.ts +7 -0
  52. package/dist/utils/index.js +23 -0
  53. package/dist/utils/multipart.d.ts +15 -0
  54. package/dist/utils/multipart.js +109 -0
  55. package/dist/utils/parsers.d.ts +4 -0
  56. package/dist/utils/parsers.js +76 -0
  57. package/dist/utils/server.d.ts +4 -0
  58. package/dist/utils/server.js +46 -0
  59. package/dist/utils/transform.d.ts +1 -0
  60. package/dist/utils/transform.js +23 -0
  61. package/dist/utils/validate.d.ts +1 -0
  62. package/dist/utils/validate.js +46 -0
  63. package/dist/validators/Validate.d.ts +3 -0
  64. package/dist/validators/Validate.js +40 -0
  65. package/dist/validators/index.d.ts +1 -0
  66. package/dist/validators/index.js +17 -0
  67. package/eslint.config.mjs +84 -0
  68. package/nodemon.json +5 -0
  69. package/package.json +70 -0
  70. package/src/app/aws/index.ts +1 -0
  71. package/src/app/aws/lambda.ts +283 -0
  72. package/src/app/http/Application.ts +250 -0
  73. package/src/app/http/Socket.ts +38 -0
  74. package/src/app/http/decorators.ts +115 -0
  75. package/src/app/http/index.ts +3 -0
  76. package/src/app/http/websocket/WebsocetService.ts +44 -0
  77. package/src/app/http/websocket/WebsocketServer.ts +262 -0
  78. package/src/constants.ts +25 -0
  79. package/src/core/Controller.ts +229 -0
  80. package/src/core/Endpoint.ts +39 -0
  81. package/src/core/index.ts +14 -0
  82. package/src/core/utils/extractors.ts +32 -0
  83. package/src/core/utils/helpers.ts +22 -0
  84. package/src/core/utils/index.ts +3 -0
  85. package/src/core/utils/websocket.ts +45 -0
  86. package/src/types/common.ts +60 -0
  87. package/src/types/controller.ts +2 -0
  88. package/src/types/http.ts +19 -0
  89. package/src/types/index.ts +5 -0
  90. package/src/types/lambda.ts +28 -0
  91. package/src/types/websocket.ts +57 -0
  92. package/src/utils/controller.ts +143 -0
  93. package/src/utils/helper.ts +24 -0
  94. package/src/utils/index.ts +7 -0
  95. package/src/utils/multipart.ts +93 -0
  96. package/src/utils/parsers.ts +87 -0
  97. package/src/utils/server.ts +49 -0
  98. package/src/utils/transform.ts +24 -0
  99. package/src/utils/validate.ts +53 -0
  100. package/src/validators/Validate.ts +48 -0
  101. package/src/validators/index.ts +1 -0
  102. package/tsconfig.json +51 -0
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.MultipartProcessor = void 0;
37
+ // utils/MultipartProcessor.ts
38
+ const multipart = __importStar(require("parse-multipart-data"));
39
+ class MultipartProcessor {
40
+ static parse(request) {
41
+ const { body, headers, isBase64Encoded } = request;
42
+ if (!body) {
43
+ return { fields: {}, files: {} };
44
+ }
45
+ let contentType = headers['content-type'] ?? headers['Content-Type'] ?? '';
46
+ if (Array.isArray(contentType)) {
47
+ contentType = contentType[0];
48
+ }
49
+ if (!contentType.startsWith('multipart/form-data')) {
50
+ throw new Error('Not a multipart request');
51
+ }
52
+ const boundaryMatch = multipart.getBoundary(contentType);
53
+ if (!boundaryMatch) {
54
+ throw new Error('Invalid multipart boundary');
55
+ }
56
+ let bodyBuffer;
57
+ if (Buffer.isBuffer(body)) {
58
+ bodyBuffer = body;
59
+ }
60
+ else if (typeof body === 'string') {
61
+ bodyBuffer = isBase64Encoded ? Buffer.from(body, 'base64') : Buffer.from(body, 'binary');
62
+ }
63
+ else {
64
+ bodyBuffer = Buffer.from(JSON.stringify(body));
65
+ }
66
+ const parts = multipart.parse(bodyBuffer, boundaryMatch);
67
+ const fields = {};
68
+ const files = {};
69
+ parts.forEach((part) => {
70
+ if (part.filename) {
71
+ const fieldName = part.name || 'file';
72
+ const fileData = {
73
+ fieldname: fieldName,
74
+ filename: part.filename,
75
+ contentType: part.type,
76
+ data: part.data,
77
+ size: part.data.length,
78
+ encoding: part.encoding,
79
+ };
80
+ if (files[fieldName]) {
81
+ if (Array.isArray(files[fieldName])) {
82
+ files[fieldName].push(fileData);
83
+ }
84
+ else {
85
+ files[fieldName] = [files[fieldName], fileData];
86
+ }
87
+ }
88
+ else {
89
+ files[fieldName] = fileData;
90
+ }
91
+ }
92
+ else if (part.name) {
93
+ const text = part.data.toString('utf-8').trim();
94
+ try {
95
+ fields[part.name] = JSON.parse(text);
96
+ }
97
+ catch {
98
+ fields[part.name] = text;
99
+ }
100
+ }
101
+ });
102
+ return { fields, files };
103
+ }
104
+ static isMultipart(request) {
105
+ const contentType = request.headers?.['content-type'] || request.headers?.['Content-Type'] || '';
106
+ return contentType.startsWith('multipart/form-data');
107
+ }
108
+ }
109
+ exports.MultipartProcessor = MultipartProcessor;
@@ -0,0 +1,4 @@
1
+ import http from 'http';
2
+ export declare const ParseQuery: (url: URL) => Record<string, string | string[]>;
3
+ export declare const ParseBody: (request: any) => any;
4
+ export declare const ParseCookies: (req: http.IncomingMessage) => Record<string, string>;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ParseCookies = exports.ParseBody = exports.ParseQuery = void 0;
4
+ const ParseQuery = (url) => {
5
+ const params = url.searchParams;
6
+ const query = {};
7
+ for (const key of params.keys()) {
8
+ const values = params.getAll(key);
9
+ query[key] = values.length > 1 ? values : values[0];
10
+ }
11
+ return query;
12
+ };
13
+ exports.ParseQuery = ParseQuery;
14
+ const ParseBody = (request) => {
15
+ if (request.body && typeof request.body === 'object' && !Buffer.isBuffer(request.body)) {
16
+ return request.body;
17
+ }
18
+ const { body, headers, isBase64Encoded } = request;
19
+ if (!body) {
20
+ return {};
21
+ }
22
+ let contentType = headers['content-type'] ?? headers['Content-Type'] ?? '';
23
+ if (Array.isArray(contentType)) {
24
+ contentType = contentType[0];
25
+ }
26
+ const cleanContentType = contentType.split(';')[0].trim().toLowerCase();
27
+ if (cleanContentType === 'application/json') {
28
+ try {
29
+ if (typeof body === 'string') {
30
+ return JSON.parse(body);
31
+ }
32
+ if (Buffer.isBuffer(body)) {
33
+ return JSON.parse(body.toString('utf8'));
34
+ }
35
+ }
36
+ catch (error) {
37
+ console.error(error);
38
+ throw error;
39
+ }
40
+ }
41
+ if (cleanContentType.startsWith('text/')) {
42
+ if (Buffer.isBuffer(body)) {
43
+ return { text: body.toString('utf8') };
44
+ }
45
+ return { text: body };
46
+ }
47
+ if (cleanContentType === 'application/x-www-form-urlencoded') {
48
+ if (Buffer.isBuffer(body)) {
49
+ const text = body.toString('utf8');
50
+ const params = new URLSearchParams(text);
51
+ const result = {};
52
+ params.forEach((value, key) => {
53
+ result[key] = value;
54
+ });
55
+ return result;
56
+ }
57
+ }
58
+ if (Buffer.isBuffer(body)) {
59
+ return { raw: body.toString('utf8') };
60
+ }
61
+ return body;
62
+ };
63
+ exports.ParseBody = ParseBody;
64
+ const ParseCookies = (req) => {
65
+ const cookieHeader = req.headers.cookie;
66
+ if (!cookieHeader)
67
+ return {};
68
+ return cookieHeader.split(';').reduce((cookies, cookie) => {
69
+ const [name, value] = cookie.trim().split('=');
70
+ if (name && value) {
71
+ cookies[name] = decodeURIComponent(value);
72
+ }
73
+ return cookies;
74
+ }, {});
75
+ };
76
+ exports.ParseCookies = ParseCookies;
@@ -0,0 +1,4 @@
1
+ import { ServerConfig } from '@types';
2
+ import http from 'http';
3
+ export declare const resolveConfig: (configOrClass?: any) => ServerConfig;
4
+ export declare const collectRawBody: (req: http.IncomingMessage) => Promise<Buffer>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectRawBody = exports.resolveConfig = void 0;
4
+ const _constants_1 = require("@constants");
5
+ const resolveConfig = (configOrClass) => {
6
+ let config = {};
7
+ if (configOrClass && typeof configOrClass === 'function') {
8
+ const decoratorConfig = Reflect.getMetadata(_constants_1.SERVER_CONFIG_KEY, configOrClass) || {};
9
+ const controllers = Reflect.getMetadata(_constants_1.SERVER_MODULES_KEY, configOrClass) || [];
10
+ config = {
11
+ port: 3000,
12
+ host: 'localhost',
13
+ ...decoratorConfig,
14
+ controllers: [...controllers, ...(decoratorConfig.controllers || [])],
15
+ };
16
+ }
17
+ else if (configOrClass && typeof configOrClass === 'object') {
18
+ config = { port: 3000, host: 'localhost', ...configOrClass };
19
+ }
20
+ else {
21
+ config = {
22
+ port: 3000,
23
+ host: 'localhost',
24
+ controllers: [],
25
+ };
26
+ console.log('⚙️ Using default configuration');
27
+ }
28
+ return config;
29
+ };
30
+ exports.resolveConfig = resolveConfig;
31
+ const collectRawBody = (req) => {
32
+ return new Promise((resolve) => {
33
+ const chunks = [];
34
+ req.on('data', (chunk) => {
35
+ chunks.push(Buffer.from(chunk));
36
+ });
37
+ req.on('end', () => {
38
+ const buffer = Buffer.concat(chunks);
39
+ resolve(buffer);
40
+ });
41
+ req.on('error', () => {
42
+ resolve(Buffer.from(''));
43
+ });
44
+ });
45
+ };
46
+ exports.collectRawBody = collectRawBody;
@@ -0,0 +1 @@
1
+ export declare function transformAndValidate(dtoClass: any, data: any): Promise<any>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformAndValidate = transformAndValidate;
4
+ async function transformAndValidate(dtoClass, data) {
5
+ if (!dtoClass)
6
+ return data;
7
+ if (typeof dtoClass.from === 'function') {
8
+ return dtoClass.from(data);
9
+ }
10
+ if (typeof dtoClass === 'function') {
11
+ const instance = new dtoClass();
12
+ Object.entries(data).forEach(([key, val]) => {
13
+ instance[key] = val;
14
+ });
15
+ Object.assign(instance, data);
16
+ if (typeof instance.validate === 'function') {
17
+ await instance.validate();
18
+ }
19
+ console.log('ppppppp', dtoClass, data);
20
+ return instance;
21
+ }
22
+ return data;
23
+ }
@@ -0,0 +1 @@
1
+ export declare function validate(dtoClass: any, data: any): Promise<any>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validate = validate;
4
+ const class_transformer_1 = require("class-transformer");
5
+ const class_validator_1 = require("class-validator");
6
+ async function validate(dtoClass, data) {
7
+ if (!dtoClass) {
8
+ return data;
9
+ }
10
+ try {
11
+ if (typeof dtoClass.from === 'function') {
12
+ return dtoClass.from(data);
13
+ }
14
+ if (typeof dtoClass === 'function') {
15
+ const instance = (0, class_transformer_1.plainToInstance)(dtoClass, data);
16
+ const errors = await (0, class_validator_1.validate)(instance);
17
+ if (errors.length > 0) {
18
+ const formattedErrors = formatValidationErrors(errors);
19
+ throw {
20
+ status: 400,
21
+ message: 'Validation failed',
22
+ errors: formattedErrors,
23
+ };
24
+ }
25
+ return instance;
26
+ }
27
+ return data;
28
+ }
29
+ catch (error) {
30
+ throw error;
31
+ }
32
+ }
33
+ function formatValidationErrors(errors) {
34
+ return errors.map((error) => {
35
+ const constraints = error.constraints || {};
36
+ const children = error.children && error.children.length > 0
37
+ ? formatValidationErrors(error.children)
38
+ : undefined;
39
+ return {
40
+ property: error.property,
41
+ value: error.value,
42
+ constraints: Object.values(constraints),
43
+ children,
44
+ };
45
+ });
46
+ }
@@ -0,0 +1,3 @@
1
+ type ToValidate = 'query' | 'body' | 'params' | 'headers';
2
+ export declare function Validate(param: ToValidate, dtoClass: any): (target: any, propertyKey?: string, descriptor?: PropertyDescriptor) => void;
3
+ export {};
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Validate = Validate;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+ const class_validator_1 = require("class-validator");
6
+ function Validate(param, dtoClass) {
7
+ return function (target, propertyKey, descriptor) {
8
+ // METHOD DECORATOR
9
+ if (descriptor) {
10
+ wrapMethod(descriptor, param, dtoClass);
11
+ return;
12
+ }
13
+ // CLASS DECORATOR
14
+ const prototype = target.prototype;
15
+ Object.getOwnPropertyNames(prototype).forEach((method) => {
16
+ if (method === 'constructor')
17
+ return;
18
+ const desc = Object.getOwnPropertyDescriptor(prototype, method);
19
+ if (!desc || typeof desc.value !== 'function')
20
+ return;
21
+ wrapMethod(desc, param, dtoClass);
22
+ Object.defineProperty(prototype, method, desc);
23
+ });
24
+ };
25
+ }
26
+ function wrapMethod(descriptor, param, dtoClass) {
27
+ const originalMethod = descriptor.value;
28
+ descriptor.value = async function (...args) {
29
+ const value = args[0][param];
30
+ const instance = new dtoClass();
31
+ Object.entries(value || {}).forEach(([key, val]) => {
32
+ instance[key] = val;
33
+ });
34
+ const errors = await (0, class_validator_1.validate)(instance, { whitelist: true });
35
+ if (errors.length) {
36
+ throw { status: 422, message: 'Validation failed', data: errors };
37
+ }
38
+ return originalMethod.apply(this, args);
39
+ };
40
+ }
@@ -0,0 +1 @@
1
+ export * from './Validate';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Validate"), exports);
@@ -0,0 +1,84 @@
1
+ import pluginJs from '@eslint/js';
2
+ import prettierConfig from 'eslint-config-prettier';
3
+ import importPlugin from 'eslint-plugin-import';
4
+ import prettierPlugin from 'eslint-plugin-prettier';
5
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
6
+ import unusedImports from 'eslint-plugin-unused-imports';
7
+ import tseslint from 'typescript-eslint';
8
+
9
+ export default tseslint.defineConfig(
10
+ {
11
+ ignores: [
12
+ 'dist/**',
13
+ 'node_modules/**',
14
+ 'bin/**',
15
+ 'build/**',
16
+ '.config/*',
17
+ 'cdk.out/**',
18
+ 'yarn.lock',
19
+ ],
20
+ },
21
+
22
+ pluginJs.configs.recommended,
23
+ ...tseslint.configs.recommended,
24
+
25
+ {
26
+ files: ['**/*.{ts,js,mts,mjs}'],
27
+ plugins: {
28
+ prettier: prettierPlugin,
29
+ 'unused-imports': unusedImports,
30
+ import: importPlugin,
31
+ 'simple-import-sort': simpleImportSort,
32
+ },
33
+ languageOptions: {
34
+ parserOptions: {
35
+ project: true,
36
+ },
37
+ },
38
+ rules: {
39
+ 'prettier/prettier': [
40
+ 'error',
41
+ {
42
+ singleQuote: true,
43
+ trailingComma: 'all',
44
+ printWidth: 100,
45
+ tabWidth: 2,
46
+ unusedImports: 'all',
47
+ },
48
+ ],
49
+
50
+ 'unused-imports/no-unused-imports': 'warn',
51
+ 'unused-imports/no-unused-vars': 'off',
52
+ 'simple-import-sort/imports': 'error',
53
+ 'simple-import-sort/exports': 'error',
54
+ 'import/first': 'error',
55
+ 'import/no-duplicates': 'error',
56
+
57
+ '@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
58
+ '@typescript-eslint/no-unused-vars': [
59
+ 'error',
60
+ {
61
+ argsIgnorePattern: '^_',
62
+ varsIgnorePattern: '^_',
63
+ caughtErrorsIgnorePattern: '^_',
64
+ },
65
+ ],
66
+
67
+ 'lines-between-class-members': [
68
+ 'error',
69
+ {
70
+ enforce: [
71
+ { blankLine: 'always', prev: '*', next: 'method' },
72
+ { blankLine: 'never', prev: 'field', next: 'field' },
73
+ ],
74
+ },
75
+ ],
76
+
77
+ 'max-len': 'off',
78
+ 'no-duplicate-imports': 'off',
79
+ 'brace-style': ['error', '1tbs', { allowSingleLine: true }],
80
+ },
81
+ },
82
+
83
+ prettierConfig,
84
+ );
package/nodemon.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "watch": ["src", "./server.ts", "./testing"],
3
+ "ext": "ts,tsx",
4
+ "exec": "ts-node --files -r tsconfig-paths/register ./testing/server.ts"
5
+ }
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "quantum-flow",
3
+ "version": "1.0.1",
4
+ "description": "Decorator-based API framework",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "dev": "nodemon --config ./nodemon.json",
10
+ "prepublishOnly": "yarn build"
11
+ },
12
+ "exports": {
13
+ "./core": {
14
+ "import": "./dist/core/index.js",
15
+ "require": "./dist/core/index.js",
16
+ "types": "./dist/core/index.d.ts"
17
+ },
18
+ "./http": {
19
+ "import": "./dist/app/http/index.js",
20
+ "require": "./dist/app/http/index.js",
21
+ "types": "./dist/app/http/index.d.ts"
22
+ },
23
+ "./aws": {
24
+ "import": "./dist/app/aws/index.js",
25
+ "require": "./dist/app/aws/index.js",
26
+ "types": "./dist/app/aws/index.d.ts"
27
+ }
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/yourusername/your-repo.git"
32
+ },
33
+ "keywords": [
34
+ "api",
35
+ "decorators",
36
+ "http",
37
+ "websocket",
38
+ "typescript",
39
+ "aws",
40
+ "rest"
41
+ ],
42
+ "author": "Naumov Oleh",
43
+ "dependencies": {
44
+ "aws-lambda": "^1.0.7",
45
+ "class-transformer": "^0.5.1",
46
+ "class-validator": "^0.15.1",
47
+ "parse-multipart-data": "^1.5.0",
48
+ "reflect-metadata": "^0.2.2",
49
+ "tsconfig-paths": "^4.2.0",
50
+ "uuid": "^13.0.0",
51
+ "ws": "^8.19.0"
52
+ },
53
+ "peerDependencies": {
54
+ "typescript": ">=4.0.0",
55
+ "ts-node": ">=10.9.2"
56
+ },
57
+ "devDependencies": {
58
+ "@eslint/js": "^10.0.1",
59
+ "@types/aws-lambda": "^8.10.161",
60
+ "@types/node": "^25.3.5",
61
+ "@types/ws": "^8.18.1",
62
+ "eslint-config-prettier": "^10.1.8",
63
+ "eslint-plugin-import": "^2.32.0",
64
+ "eslint-plugin-prettier": "^5.5.5",
65
+ "eslint-plugin-simple-import-sort": "^12.1.1",
66
+ "eslint-plugin-unused-imports": "^4.4.1",
67
+ "nodemon": "^3.1.14",
68
+ "typescript-eslint": "^8.56.1"
69
+ }
70
+ }
@@ -0,0 +1 @@
1
+ export * from './lambda';