@alwatr/nanotron 4.9.3 → 4.10.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/CHANGELOG.md +34 -0
- package/LICENSE +373 -661
- package/README.md +3 -9
- package/dist/main.cjs +3 -31
- package/dist/main.cjs.map +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.mjs +3 -8
- package/dist/main.mjs.map +2 -2
- package/package.json +39 -42
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install @alwatr/nanotron
|
|
|
21
21
|
## Getting Started
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
|
-
import {
|
|
24
|
+
import {NanotronApiServer} from '@alwatr/nanotron';
|
|
25
25
|
|
|
26
26
|
const apiServer = new NanotronApiServer({
|
|
27
27
|
host: '0.0.0.0',
|
|
@@ -37,7 +37,7 @@ apiServer.defineRoute({
|
|
|
37
37
|
ok: true,
|
|
38
38
|
message: 'Hello :)',
|
|
39
39
|
});
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
apiServer.defineRoute({
|
|
@@ -49,7 +49,7 @@ apiServer.defineRoute({
|
|
|
49
49
|
ok: true,
|
|
50
50
|
data: body.toString(),
|
|
51
51
|
});
|
|
52
|
-
}
|
|
52
|
+
},
|
|
53
53
|
});
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -57,12 +57,6 @@ apiServer.defineRoute({
|
|
|
57
57
|
|
|
58
58
|
The following companies, organizations, and individuals support Nanotron ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.
|
|
59
59
|
|
|
60
|
-
[](https://exirstudio.com)
|
|
61
|
-
|
|
62
60
|
### Contributing
|
|
63
61
|
|
|
64
62
|
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
|
|
65
|
-
|
|
66
|
-
### License
|
|
67
|
-
|
|
68
|
-
This project is licensed under the [AGPL-3.0 License](LICENSE).
|
package/dist/main.cjs
CHANGED
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
"
|
|
3
|
-
var __defProp = Object.
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
-
for (let key of __getOwnPropNames(from))
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
}
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
17
|
-
|
|
18
|
-
// src/main.ts
|
|
19
|
-
var main_exports = {};
|
|
20
|
-
module.exports = __toCommonJS(main_exports);
|
|
21
|
-
var import_nanolib = require("@alwatr/nanolib");
|
|
22
|
-
__reExport(main_exports, require("@alwatr/nanotron-api-server"), module.exports);
|
|
23
|
-
__reExport(main_exports, require("@alwatr/crypto"), module.exports);
|
|
24
|
-
__reExport(main_exports, require("@alwatr/pre-handlers"), module.exports);
|
|
25
|
-
__dev_mode__: import_nanolib.packageTracer.add("@alwatr/nanotron", "4.9.3");
|
|
26
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
-
0 && (module.exports = {
|
|
28
|
-
...require("@alwatr/nanotron-api-server"),
|
|
29
|
-
...require("@alwatr/crypto"),
|
|
30
|
-
...require("@alwatr/pre-handlers")
|
|
31
|
-
});
|
|
1
|
+
/** 📦 @alwatr/nanotron v4.10.0 */
|
|
2
|
+
__dev_mode__: console.debug("📦 @alwatr/nanotron v4.10.0");
|
|
3
|
+
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default"));var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var main_exports={};module.exports=__toCommonJS(main_exports);__reExport(main_exports,require("@alwatr/nanotron-api-server"),module.exports);__reExport(main_exports,require("@alwatr/crypto"),module.exports);__reExport(main_exports,require("@alwatr/pre-handlers"),module.exports);0&&(module.exports={...require("@alwatr/nanotron-api-server"),...require("@alwatr/crypto"),...require("@alwatr/pre-handlers")});
|
|
32
4
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from '@alwatr/nanotron-api-server';\nexport * from '@alwatr/crypto';\nexport * from '@alwatr/pre-handlers';\n"],
|
|
5
|
+
"mappings": ";;isBAAA,sFAAc,uCAAd,gBACA,wBAAc,0BADd,gBAEA,wBAAc,gCAFd",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
package/dist/main.mjs
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { packageTracer } from "@alwatr/nanolib";
|
|
5
|
-
export * from "@alwatr/nanotron-api-server";
|
|
6
|
-
export * from "@alwatr/crypto";
|
|
7
|
-
export * from "@alwatr/pre-handlers";
|
|
8
|
-
__dev_mode__: packageTracer.add("@alwatr/nanotron", "4.9.3");
|
|
1
|
+
/** 📦 @alwatr/nanotron v4.10.0 */
|
|
2
|
+
__dev_mode__: console.debug("📦 @alwatr/nanotron v4.10.0");
|
|
3
|
+
export*from"@alwatr/nanotron-api-server";export*from"@alwatr/crypto";export*from"@alwatr/pre-handlers";
|
|
9
4
|
//# sourceMappingURL=main.mjs.map
|
package/dist/main.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/main.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from '@alwatr/nanotron-api-server';\nexport * from '@alwatr/crypto';\nexport * from '@alwatr/pre-handlers';\n"],
|
|
5
|
+
"mappings": ";;AAAA,WAAc,8BACd,WAAc,iBACd,WAAc",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/nanotron",
|
|
3
|
-
"version": "4.9.3",
|
|
4
3
|
"description": "Nanotron: Your Lightweight, High-Performance Micro/Nano Service Framework. Nanotron is designed for building blazingly fast and efficient microservices and APIs. Its minimalist approach and focus on performance make it ideal for resource-constrained environments and scenarios where every millisecond counts.",
|
|
4
|
+
"version": "4.10.0",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"api",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
"bugs": "https://github.com/Alwatr/nanotron/issues",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@alwatr/crypto": "4.10.0",
|
|
9
|
+
"@alwatr/nanotron-api-server": "4.10.0",
|
|
10
|
+
"@alwatr/pre-handlers": "4.10.0"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@alwatr/nano-build": "^6.3.1",
|
|
14
|
+
"@alwatr/prettier-config": "^5.0.4",
|
|
15
|
+
"@alwatr/tsconfig-base": "^6.0.2",
|
|
16
|
+
"@alwatr/type-helper": "^6.1.1",
|
|
17
|
+
"@types/node": "^22.18.6",
|
|
18
|
+
"jest": "^30.1.3",
|
|
19
|
+
"typescript": "^5.9.2"
|
|
20
|
+
},
|
|
18
21
|
"exports": {
|
|
19
22
|
".": {
|
|
20
23
|
"types": "./dist/main.d.ts",
|
|
@@ -22,11 +25,23 @@
|
|
|
22
25
|
"require": "./dist/main.cjs"
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
|
-
"license": "AGPL-3.0-only",
|
|
26
28
|
"files": [
|
|
27
29
|
"**/*.{js,mjs,cjs,map,d.ts,html,md}",
|
|
28
30
|
"!demo/**/*"
|
|
29
31
|
],
|
|
32
|
+
"homepage": "https://github.com/Alwatr/nanotron#readme",
|
|
33
|
+
"keywords": [
|
|
34
|
+
"alwatr",
|
|
35
|
+
"api",
|
|
36
|
+
"esm",
|
|
37
|
+
"nanoservice",
|
|
38
|
+
"server",
|
|
39
|
+
"typescript"
|
|
40
|
+
],
|
|
41
|
+
"license": "MPL-2.0",
|
|
42
|
+
"main": "./dist/main.cjs",
|
|
43
|
+
"module": "./dist/main.mjs",
|
|
44
|
+
"prettier": "@alwatr/prettier-config",
|
|
30
45
|
"publishConfig": {
|
|
31
46
|
"access": "public"
|
|
32
47
|
},
|
|
@@ -35,41 +50,23 @@
|
|
|
35
50
|
"url": "https://github.com/Alwatr/nanotron",
|
|
36
51
|
"directory": "packages/nanotron"
|
|
37
52
|
},
|
|
38
|
-
"homepage": "https://github.com/Alwatr/nanotron#readme",
|
|
39
|
-
"bugs": {
|
|
40
|
-
"url": "https://github.com/Alwatr/nanotron/issues"
|
|
41
|
-
},
|
|
42
|
-
"prettier": "@alwatr/prettier-config",
|
|
43
53
|
"scripts": {
|
|
44
54
|
"b": "yarn run build",
|
|
45
|
-
"t": "yarn run test",
|
|
46
|
-
"w": "yarn run watch",
|
|
47
|
-
"c": "yarn run clean",
|
|
48
|
-
"cb": "yarn run clean && yarn run build",
|
|
49
|
-
"d": "yarn run build:es && yarn node --enable-source-maps --trace-warnings",
|
|
50
55
|
"build": "yarn run build:ts & yarn run build:es",
|
|
51
56
|
"build:es": "nano-build --preset=module",
|
|
52
57
|
"build:ts": "tsc --build",
|
|
58
|
+
"c": "yarn run clean",
|
|
59
|
+
"cb": "yarn run clean && yarn run build",
|
|
60
|
+
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
61
|
+
"d": "yarn run build:es && yarn node --enable-source-maps --trace-warnings",
|
|
62
|
+
"t": "yarn run test",
|
|
53
63
|
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --enable-source-maps --experimental-vm-modules\" jest",
|
|
64
|
+
"w": "yarn run watch",
|
|
54
65
|
"watch": "yarn run watch:ts & yarn run watch:es",
|
|
55
66
|
"watch:es": "yarn run build:es --watch",
|
|
56
|
-
"watch:ts": "yarn run build:ts --watch --preserveWatchOutput"
|
|
57
|
-
"clean": "rm -rfv dist *.tsbuildinfo"
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"@alwatr/crypto": "^4.9.3",
|
|
61
|
-
"@alwatr/nanolib": "^5.6.5",
|
|
62
|
-
"@alwatr/nanotron-api-server": "^4.9.3",
|
|
63
|
-
"@alwatr/pre-handlers": "^4.9.3"
|
|
64
|
-
},
|
|
65
|
-
"devDependencies": {
|
|
66
|
-
"@alwatr/nano-build": "^5.5.3",
|
|
67
|
-
"@alwatr/prettier-config": "^5.0.0",
|
|
68
|
-
"@alwatr/tsconfig-base": "^5.0.0",
|
|
69
|
-
"@alwatr/type-helper": "^5.4.1",
|
|
70
|
-
"@types/node": "^24.1.0",
|
|
71
|
-
"jest": "^30.0.5",
|
|
72
|
-
"typescript": "^5.8.3"
|
|
67
|
+
"watch:ts": "yarn run build:ts --watch --preserveWatchOutput"
|
|
73
68
|
},
|
|
74
|
-
"
|
|
69
|
+
"type": "module",
|
|
70
|
+
"types": "./dist/main.d.ts",
|
|
71
|
+
"gitHead": "234113e16cdec26d18c5687219d5f5c29829e045"
|
|
75
72
|
}
|