@nattyjs/common 0.0.1-beta.51 → 0.0.1-beta.53
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/dist/index.cjs +4 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +4 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -100,6 +100,7 @@ const typeContainer = new class {
|
|
|
100
100
|
this.controllerInfo = /* @__PURE__ */ new Map();
|
|
101
101
|
this.files = /* @__PURE__ */ new Map();
|
|
102
102
|
this.routes = {};
|
|
103
|
+
this.modelSchemas = /* @__PURE__ */ new Map();
|
|
103
104
|
}
|
|
104
105
|
setControllerJsonSchema(classInfo) {
|
|
105
106
|
const className = this.files.get(classInfo.filePath);
|
|
@@ -121,6 +122,9 @@ const typeContainer = new class {
|
|
|
121
122
|
}
|
|
122
123
|
return controllerName.substr(0, controllerName.length - 10).toLowerCase();
|
|
123
124
|
}
|
|
125
|
+
setClassMetaInfo(typeMeta) {
|
|
126
|
+
this.modelSchemas.set(typeMeta.name, typeMeta);
|
|
127
|
+
}
|
|
124
128
|
getRoutes() {
|
|
125
129
|
const routes = {};
|
|
126
130
|
for (const key of this.controllerInfo.keys()) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestRouteInfo, IHttpResult, Cookie, IModelBindingContext, ProblemDetail, IExceptionContext, HttpResponseInit, NattyTestModule, ModelBinding, BuildOptions, TypesInfo, ClassTypeInfo } from '@nattyjs/types';
|
|
1
|
+
import { RequestRouteInfo, IHttpResult, Cookie, IModelBindingContext, ProblemDetail, IExceptionContext, HttpResponseInit, NattyTestModule, ModelBinding, BuildOptions, TypesInfo, ClassTypeInfo, TypeMeta } from '@nattyjs/types';
|
|
2
2
|
import { ChildProcess } from 'child_process';
|
|
3
3
|
|
|
4
4
|
interface ClassType<T> extends Function {
|
|
@@ -174,6 +174,7 @@ declare const commonContainer: {
|
|
|
174
174
|
declare const typeContainer: {
|
|
175
175
|
setControllerJsonSchema(classInfo: ClassTypeInfo): void;
|
|
176
176
|
getControllersJsonSchema(): ClassTypeInfo[];
|
|
177
|
+
setClassMetaInfo(typeMeta: TypeMeta): void;
|
|
177
178
|
getRoutes(): any;
|
|
178
179
|
getControllerJsonSchema(name: string): ClassTypeInfo;
|
|
179
180
|
removeControllerInfo(path: string): void;
|
package/dist/index.mjs
CHANGED
|
@@ -83,6 +83,7 @@ const typeContainer = new class {
|
|
|
83
83
|
this.controllerInfo = /* @__PURE__ */ new Map();
|
|
84
84
|
this.files = /* @__PURE__ */ new Map();
|
|
85
85
|
this.routes = {};
|
|
86
|
+
this.modelSchemas = /* @__PURE__ */ new Map();
|
|
86
87
|
}
|
|
87
88
|
setControllerJsonSchema(classInfo) {
|
|
88
89
|
const className = this.files.get(classInfo.filePath);
|
|
@@ -104,6 +105,9 @@ const typeContainer = new class {
|
|
|
104
105
|
}
|
|
105
106
|
return controllerName.substr(0, controllerName.length - 10).toLowerCase();
|
|
106
107
|
}
|
|
108
|
+
setClassMetaInfo(typeMeta) {
|
|
109
|
+
this.modelSchemas.set(typeMeta.name, typeMeta);
|
|
110
|
+
}
|
|
107
111
|
getRoutes() {
|
|
108
112
|
const routes = {};
|
|
109
113
|
for (const key of this.controllerInfo.keys()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nattyjs/common",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.53",
|
|
4
4
|
"description": "Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "ajayojha <ojhaajay@outlook.com>",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "20.3.1",
|
|
24
|
-
"@nattyjs/types": "0.0.1-beta.
|
|
24
|
+
"@nattyjs/types": "0.0.1-beta.53",
|
|
25
25
|
"unbuild": "1.2.1"
|
|
26
26
|
}
|
|
27
27
|
}
|