@ido_kawaz/server-framework 2.0.0 → 2.2.0
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 +6 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -12,7 +12,10 @@ npm i @ido_kawaz/server-framework
|
|
|
12
12
|
|
|
13
13
|
- `startServer`
|
|
14
14
|
- `createServerConfig`
|
|
15
|
+
- `ServerConfig`
|
|
15
16
|
- `createRequestHandlerDecorator`
|
|
17
|
+
- `fileMiddleware`
|
|
18
|
+
- `RequestFile`
|
|
16
19
|
- Error classes:
|
|
17
20
|
- `ApiError`
|
|
18
21
|
- `BadRequestError`
|
|
@@ -21,6 +24,7 @@ npm i @ido_kawaz/server-framework
|
|
|
21
24
|
- `InternalServerError`
|
|
22
25
|
- Express types re-exported:
|
|
23
26
|
- `Application`
|
|
27
|
+
- `Router`
|
|
24
28
|
- `Request`
|
|
25
29
|
- `Response`
|
|
26
30
|
- `NextFunction`
|
|
@@ -75,7 +79,9 @@ void startServer(config, registerRoutes);
|
|
|
75
79
|
|
|
76
80
|
- `npm run build` - Compile TypeScript to `dist`.
|
|
77
81
|
- `npm run build:watch` - Compile in watch mode.
|
|
82
|
+
- `npm run build:advanced` - Remove `dist`, `node_modules`, and `package-lock.json`, reinstall, then compile.
|
|
78
83
|
- `npm run clean` - Remove `dist`.
|
|
84
|
+
- `npm run clean:advanced` - Remove `dist`, `node_modules`, and `package-lock.json`.
|
|
79
85
|
- `npm test` - Build and run Jest test suite.
|
|
80
86
|
- `npm run test:advanced` - Clean install, build, and run tests.
|
|
81
87
|
- `npm run package` - Run advanced tests and publish.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { Express as Application, Request, Response, NextFunction } from "express";
|
|
1
|
+
export { Express as Application, Router, Request, Response, NextFunction } from "express";
|
|
2
|
+
export { default as multer } from "multer";
|
|
2
3
|
export { startServer } from "./server";
|
|
3
4
|
export { createServerConfig, ServerConfig } from "./config";
|
|
4
5
|
export { createRequestHandlerDecorator } from "./decorators";
|
|
6
|
+
export { RequestFile } from "./types";
|
|
5
7
|
export * from "./errors";
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,cAAc,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,8 +13,15 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createRequestHandlerDecorator = exports.createServerConfig = exports.startServer = void 0;
|
|
20
|
+
exports.createRequestHandlerDecorator = exports.createServerConfig = exports.startServer = exports.multer = exports.Router = void 0;
|
|
21
|
+
var express_1 = require("express");
|
|
22
|
+
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return express_1.Router; } });
|
|
23
|
+
var multer_1 = require("multer");
|
|
24
|
+
Object.defineProperty(exports, "multer", { enumerable: true, get: function () { return __importDefault(multer_1).default; } });
|
|
18
25
|
var server_1 = require("./server");
|
|
19
26
|
Object.defineProperty(exports, "startServer", { enumerable: true, get: function () { return server_1.startServer; } });
|
|
20
27
|
var config_1 = require("./config");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mCAA0F;AAAzD,iGAAA,MAAM,OAAA;AACvC,iCAA2C;AAAlC,iHAAA,OAAO,OAAU;AAC1B,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AACpB,mCAA4D;AAAnD,4GAAA,kBAAkB,OAAA;AAC3B,2CAA6D;AAApD,2HAAA,6BAA6B,OAAA;AAEtC,2CAAyB"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,MAAM,CAAC,IAAI;CACvD"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ido_kawaz/server-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Server framework library for Kawaz Plus services",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,11 +27,13 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@types/cors": "^2.8.19",
|
|
29
29
|
"@types/express": "^5.0.6",
|
|
30
|
+
"@types/multer": "^2.0.0",
|
|
30
31
|
"@types/ramda": "^0.31.1",
|
|
31
32
|
"body-parser": "^2.2.2",
|
|
32
33
|
"cors": "^2.8.6",
|
|
33
34
|
"express": "^5.2.1",
|
|
34
35
|
"http-status-codes": "^2.3.0",
|
|
36
|
+
"multer": "^2.1.0",
|
|
35
37
|
"pino": "^10.3.1",
|
|
36
38
|
"ramda": "^0.32.0",
|
|
37
39
|
"zod": "^3.24.2"
|