@spinajs/orm-http 2.0.12 → 2.0.19
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/package.json +10 -10
- package/lib/api.d.ts +0 -21
- package/lib/api.js +0 -291
- package/lib/api.js.map +0 -1
- package/lib/orm-http.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinajs/orm-http",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.19",
|
|
4
4
|
"description": "Orm extensions for HTTP module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/spinajs/main#readme",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@spinajs/configuration": "^2.0.
|
|
42
|
-
"@spinajs/di": "^2.0.
|
|
41
|
+
"@spinajs/configuration": "^2.0.19",
|
|
42
|
+
"@spinajs/di": "^2.0.19",
|
|
43
43
|
"@spinajs/exceptions": "^2.0.12",
|
|
44
|
-
"@spinajs/http": "^2.0.
|
|
45
|
-
"@spinajs/intl-orm": "^2.0.
|
|
46
|
-
"@spinajs/log": "^2.0.
|
|
47
|
-
"@spinajs/orm": "^2.0.
|
|
48
|
-
"@spinajs/rbac-http": "^2.0.
|
|
44
|
+
"@spinajs/http": "^2.0.19",
|
|
45
|
+
"@spinajs/intl-orm": "^2.0.19",
|
|
46
|
+
"@spinajs/log": "^2.0.19",
|
|
47
|
+
"@spinajs/orm": "^2.0.19",
|
|
48
|
+
"@spinajs/rbac-http": "^2.0.19",
|
|
49
49
|
"lodash": "^4.17.21",
|
|
50
50
|
"luxon": "^2.4.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@spinajs/http": "1.2.119",
|
|
54
54
|
"@spinajs/orm": "1.2.125",
|
|
55
|
-
"@spinajs/orm-sqlite": "^2.0.
|
|
55
|
+
"@spinajs/orm-sqlite": "^2.0.19"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "51e801176ecec955cbf1eb2d91e9f4740cb2b471"
|
|
58
58
|
}
|
package/lib/api.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AccessControl } from '@spinajs/rbac';
|
|
2
|
-
import { Bootstrapper, Constructor, IContainer } from '@spinajs/di';
|
|
3
|
-
import { HttpServer } from '@spinajs/http';
|
|
4
|
-
import { Log } from '@spinajs/log';
|
|
5
|
-
import { ModelBase, Orm } from '@spinajs/orm';
|
|
6
|
-
import * as express from 'express';
|
|
7
|
-
export declare class OrmJsonApiBootsrapper extends Bootstrapper {
|
|
8
|
-
protected Log: Log;
|
|
9
|
-
protected Container: IContainer;
|
|
10
|
-
protected Server: HttpServer;
|
|
11
|
-
protected Orm: Orm;
|
|
12
|
-
protected Router: express.Router;
|
|
13
|
-
protected Ac: AccessControl;
|
|
14
|
-
constructor();
|
|
15
|
-
bootstrap(): void | Promise<void>;
|
|
16
|
-
protected addGet(model: Constructor<ModelBase>): void;
|
|
17
|
-
protected addGetAll(model: Constructor<ModelBase>): void;
|
|
18
|
-
protected addUpdate(model: Constructor<ModelBase>): void;
|
|
19
|
-
protected addInsert(model: Constructor<ModelBase>): void;
|
|
20
|
-
protected addDelete(model: Constructor<ModelBase>): void;
|
|
21
|
-
}
|
package/lib/api.js
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
-
if (mod && mod.__esModule) return mod;
|
|
26
|
-
var result = {};
|
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
-
__setModuleDefault(result, mod);
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
32
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
33
|
-
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.OrmJsonApiBootsrapper = void 0;
|
|
39
|
-
const exceptions_1 = require("@spinajs/exceptions");
|
|
40
|
-
const rbac_1 = require("@spinajs/rbac");
|
|
41
|
-
const di_1 = require("@spinajs/di");
|
|
42
|
-
const http_1 = require("@spinajs/http");
|
|
43
|
-
const log_1 = require("@spinajs/log");
|
|
44
|
-
const orm_1 = require("@spinajs/orm");
|
|
45
|
-
const express = __importStar(require("express"));
|
|
46
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
47
|
-
const rbac_http_1 = require("@spinajs/rbac-http");
|
|
48
|
-
function dehydrate(model, omit) {
|
|
49
|
-
const dObj = {
|
|
50
|
-
type: model.constructor.name,
|
|
51
|
-
id: model.PrimaryKeyValue,
|
|
52
|
-
attributes: model.dehydrate(false, omit),
|
|
53
|
-
relationships: lodash_1.default.mapValues(lodash_1.default.groupBy(model.getFlattenRelationModels(false), '__relationKey__'), (x) => {
|
|
54
|
-
return x.map((xx) => {
|
|
55
|
-
return {
|
|
56
|
-
type: xx.constructor.name,
|
|
57
|
-
id: xx.PrimaryKeyValue,
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
}),
|
|
61
|
-
};
|
|
62
|
-
return dObj;
|
|
63
|
-
}
|
|
64
|
-
function modelToJsonApi(model) {
|
|
65
|
-
return {
|
|
66
|
-
data: Array.isArray(model) ? model.map((m) => dehydrate(m)) : dehydrate(model),
|
|
67
|
-
included: Array.isArray(model) ? lodash_1.default.flatMap(model, extractIncluded) : extractIncluded(model),
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function extractIncluded(model) {
|
|
71
|
-
return model.getFlattenRelationModels(true).map((m) => dehydrate(m));
|
|
72
|
-
}
|
|
73
|
-
function extractRouteParameters(req) {
|
|
74
|
-
const id = req.params['id'];
|
|
75
|
-
const page = Number(req.query['page']);
|
|
76
|
-
const perPage = Number(req.query['perPage']);
|
|
77
|
-
const order = req.query['order'];
|
|
78
|
-
const orderDirection = req.query['orderDirection'];
|
|
79
|
-
const includes = req.query['include']
|
|
80
|
-
? req.query['include'].split(',').map((i) => {
|
|
81
|
-
return i.split('.');
|
|
82
|
-
})
|
|
83
|
-
: [];
|
|
84
|
-
const filters = req.query['filter'] ? JSON.parse(req.query['filter']) : [];
|
|
85
|
-
return {
|
|
86
|
-
id,
|
|
87
|
-
page,
|
|
88
|
-
perPage,
|
|
89
|
-
order,
|
|
90
|
-
orderDirection,
|
|
91
|
-
includes,
|
|
92
|
-
filters,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function _apiCheckPolicy(model, permission) {
|
|
96
|
-
return async (req, _res, next) => {
|
|
97
|
-
const p = (0, rbac_http_1.checkRoutePermission)(req, model.name.toLowerCase(), permission);
|
|
98
|
-
if (p.granted) {
|
|
99
|
-
next();
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
next(new exceptions_1.Forbidden(`current user does not have permission to access resource ${model.name} with ${permission} grant`));
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function _apiInsertAction(model) {
|
|
107
|
-
return async (req, res, next) => {
|
|
108
|
-
try {
|
|
109
|
-
const entity = new model(req.body);
|
|
110
|
-
await model['insert'](entity);
|
|
111
|
-
res.locals.response = new http_1.Ok(modelToJsonApi(entity));
|
|
112
|
-
next();
|
|
113
|
-
}
|
|
114
|
-
catch (err) {
|
|
115
|
-
res.locals.response = new http_1.ServerError({
|
|
116
|
-
error: {
|
|
117
|
-
message: err.message,
|
|
118
|
-
err: err,
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
next(err);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function _apiPatchAction(model) {
|
|
126
|
-
return async (req, res, next) => {
|
|
127
|
-
try {
|
|
128
|
-
const param = req.params['id'];
|
|
129
|
-
const entity = await model['getOrFail'](param);
|
|
130
|
-
entity.hydrate(req.body.data.attributes);
|
|
131
|
-
await entity.update();
|
|
132
|
-
res.locals.response = new http_1.Ok(modelToJsonApi(entity));
|
|
133
|
-
next();
|
|
134
|
-
}
|
|
135
|
-
catch (err) {
|
|
136
|
-
res.locals.response = new http_1.ServerError({
|
|
137
|
-
error: {
|
|
138
|
-
message: err.message,
|
|
139
|
-
err: err,
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
next(err);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function _apiDeleteAction(model) {
|
|
147
|
-
return async (req, res, next) => {
|
|
148
|
-
try {
|
|
149
|
-
const param = req.params['id'];
|
|
150
|
-
await model['destroy'](param);
|
|
151
|
-
res.locals.response = new http_1.Ok();
|
|
152
|
-
next();
|
|
153
|
-
}
|
|
154
|
-
catch (err) {
|
|
155
|
-
res.locals.response = new http_1.ServerError({
|
|
156
|
-
error: {
|
|
157
|
-
message: err.message,
|
|
158
|
-
err: err,
|
|
159
|
-
},
|
|
160
|
-
});
|
|
161
|
-
next(err);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function _apiGetAllAction(model) {
|
|
166
|
-
return async (req, res, next) => {
|
|
167
|
-
var _a, _b, _c;
|
|
168
|
-
try {
|
|
169
|
-
const params = extractRouteParameters(req);
|
|
170
|
-
const query = model['all']((_a = params.page) !== null && _a !== void 0 ? _a : 0, (_b = params.perPage) !== null && _b !== void 0 ? _b : 15);
|
|
171
|
-
if (params.order) {
|
|
172
|
-
query.order(params.order, (_c = params.orderDirection) !== null && _c !== void 0 ? _c : 'asc');
|
|
173
|
-
}
|
|
174
|
-
let currQuery = null;
|
|
175
|
-
params.includes.forEach((i) => {
|
|
176
|
-
currQuery = query;
|
|
177
|
-
i.forEach((ii) => {
|
|
178
|
-
currQuery.populate(ii, function () {
|
|
179
|
-
currQuery = this;
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
const result = await query;
|
|
184
|
-
res.locals.response = new http_1.Ok(modelToJsonApi(result));
|
|
185
|
-
next();
|
|
186
|
-
}
|
|
187
|
-
catch (err) {
|
|
188
|
-
res.locals.response = new http_1.ServerError({
|
|
189
|
-
error: {
|
|
190
|
-
message: err.message,
|
|
191
|
-
err: err,
|
|
192
|
-
},
|
|
193
|
-
});
|
|
194
|
-
next(err);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function _apiGetAction(model) {
|
|
199
|
-
return async (req, res, next) => {
|
|
200
|
-
try {
|
|
201
|
-
const params = extractRouteParameters(req);
|
|
202
|
-
const desc = (0, orm_1.extractModelDescriptor)(model);
|
|
203
|
-
const query = model['where'](desc.PrimaryKey, params.id);
|
|
204
|
-
let currQuery = null;
|
|
205
|
-
params.includes.forEach((i) => {
|
|
206
|
-
currQuery = query;
|
|
207
|
-
i.forEach((ii) => {
|
|
208
|
-
currQuery.populate(ii, function () {
|
|
209
|
-
currQuery = this;
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
const result = await query.firstOrFail();
|
|
214
|
-
res.locals.response = new http_1.Ok(modelToJsonApi(result));
|
|
215
|
-
next();
|
|
216
|
-
}
|
|
217
|
-
catch (err) {
|
|
218
|
-
res.locals.response = new http_1.ServerError({
|
|
219
|
-
error: {
|
|
220
|
-
message: err.message,
|
|
221
|
-
err: err,
|
|
222
|
-
},
|
|
223
|
-
});
|
|
224
|
-
next(err);
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
let OrmJsonApiBootsrapper = class OrmJsonApiBootsrapper extends di_1.Bootstrapper {
|
|
229
|
-
constructor() {
|
|
230
|
-
super();
|
|
231
|
-
this.Router = express.Router();
|
|
232
|
-
}
|
|
233
|
-
bootstrap() {
|
|
234
|
-
this.Orm.Models.forEach((model) => {
|
|
235
|
-
this.addGet(model.type);
|
|
236
|
-
this.addGetAll(model.type);
|
|
237
|
-
this.addUpdate(model.type);
|
|
238
|
-
this.addInsert(model.type);
|
|
239
|
-
this.addDelete(model.type);
|
|
240
|
-
});
|
|
241
|
-
this.Ac = di_1.DI.resolve(rbac_1.AccessControl);
|
|
242
|
-
this.Server.use(this.Router);
|
|
243
|
-
}
|
|
244
|
-
addGet(model) {
|
|
245
|
-
const path = `/repository/${model.name.toLowerCase()}/:id`;
|
|
246
|
-
this.Router.get(path, [_apiCheckPolicy(model, 'readAny'), _apiGetAction(model)]);
|
|
247
|
-
this.Log.trace(`API GET:${path}`);
|
|
248
|
-
}
|
|
249
|
-
addGetAll(model) {
|
|
250
|
-
const path = `/repository/${model.name.toLowerCase()}`;
|
|
251
|
-
this.Router.get(path, [_apiCheckPolicy(model, 'readAny'), _apiGetAllAction(model)]);
|
|
252
|
-
this.Log.trace(`API GET:${path}`);
|
|
253
|
-
}
|
|
254
|
-
addUpdate(model) {
|
|
255
|
-
const path = `/repository/${model.name.toLowerCase()}/:id`;
|
|
256
|
-
this.Router.patch(path, [_apiCheckPolicy(model, 'updateAny'), _apiPatchAction(model)]);
|
|
257
|
-
this.Log.trace(`API PUT:${path}`);
|
|
258
|
-
}
|
|
259
|
-
addInsert(model) {
|
|
260
|
-
const path = `/repository/${model.name.toLowerCase()}`;
|
|
261
|
-
this.Router.post(path, [_apiCheckPolicy(model, 'insertAny'), _apiInsertAction(model)]);
|
|
262
|
-
this.Log.trace(`API POST:${path}`);
|
|
263
|
-
}
|
|
264
|
-
addDelete(model) {
|
|
265
|
-
const path = `repository/${model.name.toLowerCase()}/:id`;
|
|
266
|
-
this.Router.delete(path, [_apiCheckPolicy(model, 'deleteAny'), _apiDeleteAction(model)]);
|
|
267
|
-
this.Log.trace(`API DEL:${path}`);
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
__decorate([
|
|
271
|
-
(0, log_1.Logger)('http'),
|
|
272
|
-
__metadata("design:type", log_1.Log)
|
|
273
|
-
], OrmJsonApiBootsrapper.prototype, "Log", void 0);
|
|
274
|
-
__decorate([
|
|
275
|
-
(0, di_1.Autoinject)(di_1.Container),
|
|
276
|
-
__metadata("design:type", Object)
|
|
277
|
-
], OrmJsonApiBootsrapper.prototype, "Container", void 0);
|
|
278
|
-
__decorate([
|
|
279
|
-
(0, di_1.Autoinject)(),
|
|
280
|
-
__metadata("design:type", http_1.HttpServer)
|
|
281
|
-
], OrmJsonApiBootsrapper.prototype, "Server", void 0);
|
|
282
|
-
__decorate([
|
|
283
|
-
(0, di_1.Autoinject)(),
|
|
284
|
-
__metadata("design:type", orm_1.Orm)
|
|
285
|
-
], OrmJsonApiBootsrapper.prototype, "Orm", void 0);
|
|
286
|
-
OrmJsonApiBootsrapper = __decorate([
|
|
287
|
-
(0, di_1.Injectable)(di_1.Bootstrapper),
|
|
288
|
-
__metadata("design:paramtypes", [])
|
|
289
|
-
], OrmJsonApiBootsrapper);
|
|
290
|
-
exports.OrmJsonApiBootsrapper = OrmJsonApiBootsrapper;
|
|
291
|
-
//# sourceMappingURL=api.js.map
|
package/lib/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAgD;AAChD,wCAA8C;AAC9C,oCAA2G;AAC3G,wCAA4D;AAC5D,sCAA2C;AAC3C,sCAA0F;AAC1F,iDAAmC;AACnC,oDAAuB;AACvB,kDAA0D;AAE1D,SAAS,SAAS,CAAC,KAAgB,EAAE,IAAe;IAClD,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI;QAC5B,EAAE,EAAE,KAAK,CAAC,eAAe;QACzB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC;QACxC,aAAa,EAAE,gBAAC,CAAC,SAAS,CAAC,gBAAC,CAAC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;YACpG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;gBAClB,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