corecdtl 0.1.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/LICENSE.md +21 -0
- package/README.md +202 -0
- package/build/Release/hypernode.node +0 -0
- package/dist/http/chunker/ChunkParser.d.ts +8 -0
- package/dist/http/chunker/ChunkParser.js +2 -0
- package/dist/http/chunker/ChunkProgression.d.ts +25 -0
- package/dist/http/chunker/ChunkProgression.js +55 -0
- package/dist/http/chunker/FixedChunkedParser.d.ts +14 -0
- package/dist/http/chunker/FixedChunkedParser.js +49 -0
- package/dist/http/chunker/StreamingChunkedParser.d.ts +19 -0
- package/dist/http/chunker/StreamingChunkedParser.js +94 -0
- package/dist/http/chunker/UntilEndChunkerParser.d.ts +37 -0
- package/dist/http/chunker/UntilEndChunkerParser.js +64 -0
- package/dist/http/content/encoding.d.ts +3 -0
- package/dist/http/content/encoding.js +38 -0
- package/dist/http/content/parser.d.ts +1 -0
- package/dist/http/content/parser.js +64 -0
- package/dist/http/context/ApiContext.d.ts +14 -0
- package/dist/http/context/ApiContext.js +151 -0
- package/dist/http/context/HttpContext.d.ts +42 -0
- package/dist/http/context/HttpContext.js +231 -0
- package/dist/http/context/WebContext.d.ts +31 -0
- package/dist/http/context/WebContext.js +320 -0
- package/dist/http/factory/accumulator.d.ts +13 -0
- package/dist/http/factory/accumulator.js +221 -0
- package/dist/http/factory/factory.d.ts +5 -0
- package/dist/http/factory/factory.js +97 -0
- package/dist/http/factory/pipeline.d.ts +3 -0
- package/dist/http/factory/pipeline.js +102 -0
- package/dist/http/response/HttpResponseBase.d.ts +10 -0
- package/dist/http/response/HttpResponseBase.js +2 -0
- package/dist/http/response/PipeResponseBase.d.ts +31 -0
- package/dist/http/response/PipeResponseBase.js +115 -0
- package/dist/http.d.ts +567 -0
- package/dist/http.js +59 -0
- package/dist/hypernode.d.ts +31 -0
- package/dist/hypernode.js +8 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +39 -0
- package/package.json +63 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.createServer = createServer;
|
|
21
|
+
const WebContext_1 = __importDefault(require("./http/context/WebContext"));
|
|
22
|
+
const ApiContext_1 = __importDefault(require("./http/context/ApiContext"));
|
|
23
|
+
function createServer(opts) {
|
|
24
|
+
return {
|
|
25
|
+
Web(webCtxOpts, mainRoute) {
|
|
26
|
+
const ctx = new WebContext_1.default(webCtxOpts, opts);
|
|
27
|
+
ctx.setHttpCore();
|
|
28
|
+
ctx.registerRouters(mainRoute);
|
|
29
|
+
return ctx;
|
|
30
|
+
},
|
|
31
|
+
Api(mainRoute) {
|
|
32
|
+
const ctx = new ApiContext_1.default(opts);
|
|
33
|
+
ctx.setHttpCore();
|
|
34
|
+
ctx.registerRouters(mainRoute);
|
|
35
|
+
return ctx;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
__exportStar(require("./http"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "corecdtl",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "High-performance customizable HTTP engine",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
|
|
10
|
+
"keywords": [
|
|
11
|
+
"http",
|
|
12
|
+
"server",
|
|
13
|
+
"parser",
|
|
14
|
+
"engine",
|
|
15
|
+
"native",
|
|
16
|
+
"addon",
|
|
17
|
+
"low-level"
|
|
18
|
+
],
|
|
19
|
+
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "cmake-js compile && rm -rf dist && tsc",
|
|
22
|
+
"rebuild": "cmake-js rebuild && tsc",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"benchmark": "node benchmark/e2e/run.js",
|
|
25
|
+
"prepublishOnly": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"build/Release/*.node",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"node-addon-api": "^8.5.0"
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^24.8.1",
|
|
41
|
+
"@types/bindings": "^1.5.5",
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"ts-node": "^10.9.2",
|
|
44
|
+
"vitest": "^3.2.4",
|
|
45
|
+
"cmake-js": "^7.3.1",
|
|
46
|
+
"autocannon": "^8.0.0",
|
|
47
|
+
"bindings": "^1.5.0",
|
|
48
|
+
"express": "^5.2.1",
|
|
49
|
+
"fastify": "^5.6.2",
|
|
50
|
+
"@fastify/express": "^4.0.4"
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/DirikTi/corecdtl.git"
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/DirikTi/corecdtl/issues"
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
"homepage": "https://github.com/DirikTi/corecdtl#readme"
|
|
63
|
+
}
|