gg-express 1.0.41 → 1.0.43
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/GGExpress.d.ts +4 -4
- package/dist/test.js +2 -2
- package/package.json +1 -1
- package/src/GGExpress.ts +4 -4
- package/src/test.ts +2 -2
package/dist/GGExpress.d.ts
CHANGED
|
@@ -64,19 +64,19 @@ export default class GGExpress {
|
|
|
64
64
|
private outputPath;
|
|
65
65
|
constructor(app: Express.Express, outputPath: string[]);
|
|
66
66
|
private rootMethod;
|
|
67
|
-
get<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/${string}`, options: {
|
|
67
|
+
get<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/gg/${string}`, options: {
|
|
68
68
|
requireParams: M;
|
|
69
69
|
responseStructure: R;
|
|
70
70
|
}, ...middlewares: Array<(req: MyRequest<M["dataType"], T, K, P, J>, res: MyResponse<R["dataType"], RS, KR, PP, J>, next: NextFunction) => any>): Express.Express;
|
|
71
|
-
post<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/${string}`, options: {
|
|
71
|
+
post<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/gg/${string}`, options: {
|
|
72
72
|
requireParams: M;
|
|
73
73
|
responseStructure: R;
|
|
74
74
|
}, ...middlewares: Array<(req: MyRequest<M["dataType"], T, K, P, J>, res: MyResponse<R["dataType"], RS, KR, PP, J>, next: NextFunction) => any>): Express.Express;
|
|
75
|
-
put<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/${string}`, options: {
|
|
75
|
+
put<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/gg/${string}`, options: {
|
|
76
76
|
requireParams: M;
|
|
77
77
|
responseStructure: R;
|
|
78
78
|
}, ...middlewares: Array<(req: MyRequest<M["dataType"], T, K, P, J>, res: MyResponse<R["dataType"], RS, KR, PP, J>, next: NextFunction) => any>): Express.Express;
|
|
79
|
-
delete<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/${string}`, options: {
|
|
79
|
+
delete<M extends requireParamsStructure, T extends M["structure"], K extends keyof T, R extends responseStructure, RS extends R["structure"], KR extends keyof RS, P extends M["parameter"], PP extends R["parameter"], J extends M["isPartialStructure"]>(url: `/api/gg/${string}`, options: {
|
|
80
80
|
requireParams: M;
|
|
81
81
|
responseStructure: R;
|
|
82
82
|
}, ...middlewares: Array<(req: MyRequest<M["dataType"], T, K, P, J>, res: MyResponse<R["dataType"], RS, KR, PP, J>, next: NextFunction) => any>): Express.Express;
|
package/dist/test.js
CHANGED
|
@@ -8,7 +8,7 @@ const express_1 = __importDefault(require("express"));
|
|
|
8
8
|
function run() {
|
|
9
9
|
const app = (0, express_1.default)();
|
|
10
10
|
const ggapp = new GGExpress_1.default(app, ["./"]);
|
|
11
|
-
ggapp.get("/api/users/id", {
|
|
11
|
+
ggapp.get("/api/gg/users/id", {
|
|
12
12
|
requireParams: {
|
|
13
13
|
parameter: {},
|
|
14
14
|
dataType: "arrayObject",
|
|
@@ -35,7 +35,7 @@ function run() {
|
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
ggapp.post("/api/item", {
|
|
38
|
+
ggapp.post("/api/gg/item", {
|
|
39
39
|
requireParams: {
|
|
40
40
|
parameter: {
|
|
41
41
|
lotNumber: "number",
|
package/package.json
CHANGED
package/src/GGExpress.ts
CHANGED
|
@@ -165,7 +165,7 @@ export default class GGExpress {
|
|
|
165
165
|
PP extends R["parameter"],
|
|
166
166
|
J extends M["isPartialStructure"]
|
|
167
167
|
>(
|
|
168
|
-
url: `/api/${string}`,
|
|
168
|
+
url: `/api/gg/${string}`,
|
|
169
169
|
options: {
|
|
170
170
|
requireParams: M
|
|
171
171
|
responseStructure: R
|
|
@@ -192,7 +192,7 @@ export default class GGExpress {
|
|
|
192
192
|
PP extends R["parameter"],
|
|
193
193
|
J extends M["isPartialStructure"]
|
|
194
194
|
>(
|
|
195
|
-
url: `/api/${string}`,
|
|
195
|
+
url: `/api/gg/${string}`,
|
|
196
196
|
options: {
|
|
197
197
|
requireParams: M
|
|
198
198
|
responseStructure: R
|
|
@@ -218,7 +218,7 @@ export default class GGExpress {
|
|
|
218
218
|
PP extends R["parameter"],
|
|
219
219
|
J extends M["isPartialStructure"]
|
|
220
220
|
>(
|
|
221
|
-
url: `/api/${string}`,
|
|
221
|
+
url: `/api/gg/${string}`,
|
|
222
222
|
options: {
|
|
223
223
|
requireParams: M
|
|
224
224
|
responseStructure: R
|
|
@@ -244,7 +244,7 @@ export default class GGExpress {
|
|
|
244
244
|
PP extends R["parameter"],
|
|
245
245
|
J extends M["isPartialStructure"]
|
|
246
246
|
>(
|
|
247
|
-
url: `/api/${string}`,
|
|
247
|
+
url: `/api/gg/${string}`,
|
|
248
248
|
options: {
|
|
249
249
|
requireParams: M
|
|
250
250
|
responseStructure: R
|
package/src/test.ts
CHANGED
|
@@ -4,7 +4,7 @@ function run() {
|
|
|
4
4
|
const app = express()
|
|
5
5
|
const ggapp = new GGExpress(app, ["./"])
|
|
6
6
|
ggapp.get(
|
|
7
|
-
"/api/users/id",
|
|
7
|
+
"/api/gg/users/id",
|
|
8
8
|
{
|
|
9
9
|
requireParams: {
|
|
10
10
|
parameter: {},
|
|
@@ -36,7 +36,7 @@ function run() {
|
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
ggapp.post(
|
|
39
|
-
"/api/item",
|
|
39
|
+
"/api/gg/item",
|
|
40
40
|
{
|
|
41
41
|
requireParams: {
|
|
42
42
|
parameter: {
|