@stemy/backend 2.5.1 → 2.6.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/bundles/stemy-backend.umd.js +239 -140
- package/bundles/stemy-backend.umd.js.map +1 -1
- package/bundles/stemy-backend.umd.min.js +1 -1
- package/bundles/stemy-backend.umd.min.js.map +1 -1
- package/common-types.d.ts +10 -8
- package/esm2015/common-types.js +1 -1
- package/esm2015/public_api.js +11 -6
- package/esm2015/services/endpoint-provider.js +29 -0
- package/esm2015/static.js +33 -0
- package/fesm2015/stemy-backend.js +201 -144
- package/fesm2015/stemy-backend.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/services/endpoint-provider.d.ts +4 -0
- package/static.d.ts +2 -0
- package/stemy-backend.metadata.json +1 -1
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
return t;
|
|
93
93
|
}
|
|
94
|
-
function __decorate$
|
|
94
|
+
function __decorate$y(decorators, target, key, desc) {
|
|
95
95
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
96
96
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
97
97
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
109
109
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
110
110
|
}
|
|
111
|
-
function __awaiter$
|
|
111
|
+
function __awaiter$v(thisArg, _arguments, P, generator) {
|
|
112
112
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
113
113
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
114
114
|
function fulfilled(value) { try {
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
var __awaiter$
|
|
358
|
+
var __awaiter$u = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
359
359
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
360
360
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
361
361
|
function fulfilled(value) { try {
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
}
|
|
570
570
|
function paginateAggregations(model, aggregations, params, metaProjection) {
|
|
571
571
|
if (metaProjection === void 0) { metaProjection = {}; }
|
|
572
|
-
return __awaiter$
|
|
572
|
+
return __awaiter$u(this, void 0, void 0, function () {
|
|
573
573
|
var sortField, sortAggregation, result, pagination;
|
|
574
574
|
var _a;
|
|
575
575
|
return __generator(this, function (_b) {
|
|
@@ -680,7 +680,7 @@
|
|
|
680
680
|
}
|
|
681
681
|
function readAndDeleteFile(path, timeout) {
|
|
682
682
|
if (timeout === void 0) { timeout = 5000; }
|
|
683
|
-
return __awaiter$
|
|
683
|
+
return __awaiter$u(this, void 0, void 0, function () {
|
|
684
684
|
var data;
|
|
685
685
|
return __generator(this, function (_a) {
|
|
686
686
|
switch (_a.label) {
|
|
@@ -697,7 +697,7 @@
|
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
699
|
function writeFile(path$1, data) {
|
|
700
|
-
return __awaiter$
|
|
700
|
+
return __awaiter$u(this, void 0, void 0, function () {
|
|
701
701
|
return __generator(this, function (_a) {
|
|
702
702
|
switch (_a.label) {
|
|
703
703
|
case 0: return [4 /*yield*/, mkdirRecursive(path.dirname(path$1))];
|
|
@@ -785,7 +785,7 @@
|
|
|
785
785
|
var paramName = modelName.toLowerCase();
|
|
786
786
|
return routingControllers.createParamDecorator({
|
|
787
787
|
required: false,
|
|
788
|
-
value: function (action) { return __awaiter$
|
|
788
|
+
value: function (action) { return __awaiter$u(_this, void 0, void 0, function () {
|
|
789
789
|
var req, token, id, query, doc, _a, _b, e_2;
|
|
790
790
|
return __generator(this, function (_c) {
|
|
791
791
|
switch (_c.label) {
|
|
@@ -1035,7 +1035,7 @@
|
|
|
1035
1035
|
});
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
|
-
var __decorate$
|
|
1038
|
+
var __decorate$x = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1039
1039
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1040
1040
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1041
1041
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1076,7 +1076,7 @@
|
|
|
1076
1076
|
};
|
|
1077
1077
|
return IsFile;
|
|
1078
1078
|
}());
|
|
1079
|
-
exports.IsFile = __decorate$
|
|
1079
|
+
exports.IsFile = __decorate$x([
|
|
1080
1080
|
classValidator.ValidatorConstraint()
|
|
1081
1081
|
], exports.IsFile);
|
|
1082
1082
|
exports.IsObjectId = /** @class */ (function () {
|
|
@@ -1088,7 +1088,7 @@
|
|
|
1088
1088
|
};
|
|
1089
1089
|
return IsObjectId;
|
|
1090
1090
|
}());
|
|
1091
|
-
exports.IsObjectId = __decorate$
|
|
1091
|
+
exports.IsObjectId = __decorate$x([
|
|
1092
1092
|
classValidator.ValidatorConstraint()
|
|
1093
1093
|
], exports.IsObjectId);
|
|
1094
1094
|
|
|
@@ -1150,7 +1150,7 @@
|
|
|
1150
1150
|
return Parameter;
|
|
1151
1151
|
}());
|
|
1152
1152
|
|
|
1153
|
-
var __decorate$
|
|
1153
|
+
var __decorate$w = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1154
1154
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1155
1155
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1156
1156
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1160,7 +1160,7 @@
|
|
|
1160
1160
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1161
1161
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1162
1162
|
};
|
|
1163
|
-
var __awaiter$
|
|
1163
|
+
var __awaiter$t = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1164
1164
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1165
1165
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1166
1166
|
function fulfilled(value) { try {
|
|
@@ -1197,7 +1197,7 @@
|
|
|
1197
1197
|
function AssetProcessor() {
|
|
1198
1198
|
}
|
|
1199
1199
|
AssetProcessor.getMimeType = function (buffer, mimeType) {
|
|
1200
|
-
return __awaiter$
|
|
1200
|
+
return __awaiter$t(this, void 0, void 0, function () {
|
|
1201
1201
|
var e_1;
|
|
1202
1202
|
return __generator(this, function (_a) {
|
|
1203
1203
|
switch (_a.label) {
|
|
@@ -1238,7 +1238,7 @@
|
|
|
1238
1238
|
return imageTypes.indexOf(contentType) >= 0;
|
|
1239
1239
|
};
|
|
1240
1240
|
AssetProcessor.copyImageMeta = function (buffer, metadata) {
|
|
1241
|
-
return __awaiter$
|
|
1241
|
+
return __awaiter$t(this, void 0, void 0, function () {
|
|
1242
1242
|
var output;
|
|
1243
1243
|
return __generator(this, function (_a) {
|
|
1244
1244
|
switch (_a.label) {
|
|
@@ -1262,7 +1262,7 @@
|
|
|
1262
1262
|
});
|
|
1263
1263
|
};
|
|
1264
1264
|
AssetProcessor.prototype.process = function (buffer, metadata, contentType) {
|
|
1265
|
-
return __awaiter$
|
|
1265
|
+
return __awaiter$t(this, void 0, void 0, function () {
|
|
1266
1266
|
return __generator(this, function (_a) {
|
|
1267
1267
|
switch (_a.label) {
|
|
1268
1268
|
case 0:
|
|
@@ -1282,12 +1282,12 @@
|
|
|
1282
1282
|
};
|
|
1283
1283
|
return AssetProcessor;
|
|
1284
1284
|
}());
|
|
1285
|
-
exports.AssetProcessor = AssetProcessor_1 = __decorate$
|
|
1285
|
+
exports.AssetProcessor = AssetProcessor_1 = __decorate$w([
|
|
1286
1286
|
tsyringe.injectable(),
|
|
1287
1287
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped)
|
|
1288
1288
|
], exports.AssetProcessor);
|
|
1289
1289
|
|
|
1290
|
-
var __decorate$
|
|
1290
|
+
var __decorate$v = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1291
1291
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1292
1292
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1293
1293
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1337,14 +1337,14 @@
|
|
|
1337
1337
|
};
|
|
1338
1338
|
return Configuration;
|
|
1339
1339
|
}());
|
|
1340
|
-
exports.Configuration = __decorate$
|
|
1340
|
+
exports.Configuration = __decorate$v([
|
|
1341
1341
|
tsyringe.injectable(),
|
|
1342
1342
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped),
|
|
1343
1343
|
__param$8(0, tsyringe.injectAll(PARAMETER)),
|
|
1344
1344
|
__metadata$p("design:paramtypes", [Array])
|
|
1345
1345
|
], exports.Configuration);
|
|
1346
1346
|
|
|
1347
|
-
var __decorate$
|
|
1347
|
+
var __decorate$u = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1348
1348
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1349
1349
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1350
1350
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1358,7 +1358,7 @@
|
|
|
1358
1358
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1359
1359
|
return Reflect.metadata(k, v);
|
|
1360
1360
|
};
|
|
1361
|
-
var __awaiter$
|
|
1361
|
+
var __awaiter$s = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1362
1362
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1363
1363
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1364
1364
|
function fulfilled(value) { try {
|
|
@@ -1406,7 +1406,7 @@
|
|
|
1406
1406
|
configurable: true
|
|
1407
1407
|
});
|
|
1408
1408
|
MongoConnector.prototype.connect = function () {
|
|
1409
|
-
return __awaiter$
|
|
1409
|
+
return __awaiter$s(this, void 0, void 0, function () {
|
|
1410
1410
|
var _a;
|
|
1411
1411
|
return __generator(this, function (_b) {
|
|
1412
1412
|
switch (_b.label) {
|
|
@@ -1432,13 +1432,13 @@
|
|
|
1432
1432
|
};
|
|
1433
1433
|
return MongoConnector;
|
|
1434
1434
|
}());
|
|
1435
|
-
exports.MongoConnector = __decorate$
|
|
1435
|
+
exports.MongoConnector = __decorate$u([
|
|
1436
1436
|
tsyringe.injectable(),
|
|
1437
1437
|
tsyringe.singleton(),
|
|
1438
1438
|
__metadata$o("design:paramtypes", [exports.Configuration])
|
|
1439
1439
|
], exports.MongoConnector);
|
|
1440
1440
|
|
|
1441
|
-
var __awaiter$
|
|
1441
|
+
var __awaiter$r = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1442
1442
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1443
1443
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1444
1444
|
function fulfilled(value) { try {
|
|
@@ -1468,7 +1468,7 @@
|
|
|
1468
1468
|
this.collection = collection;
|
|
1469
1469
|
}
|
|
1470
1470
|
Asset.toImage = function (stream, params) {
|
|
1471
|
-
return __awaiter$
|
|
1471
|
+
return __awaiter$r(this, void 0, void 0, function () {
|
|
1472
1472
|
var buffer, meta, width, height, e_1;
|
|
1473
1473
|
return __generator(this, function (_a) {
|
|
1474
1474
|
switch (_a.label) {
|
|
@@ -1542,7 +1542,7 @@
|
|
|
1542
1542
|
configurable: true
|
|
1543
1543
|
});
|
|
1544
1544
|
Asset.prototype.unlink = function () {
|
|
1545
|
-
return __awaiter$
|
|
1545
|
+
return __awaiter$r(this, void 0, void 0, function () {
|
|
1546
1546
|
return __generator(this, function (_a) {
|
|
1547
1547
|
return [2 /*return*/, deleteFromBucket(this.bucket, this.fileId)];
|
|
1548
1548
|
});
|
|
@@ -1552,7 +1552,7 @@
|
|
|
1552
1552
|
return streamToBuffer(this.stream);
|
|
1553
1553
|
};
|
|
1554
1554
|
Asset.prototype.download = function (metadata) {
|
|
1555
|
-
return __awaiter$
|
|
1555
|
+
return __awaiter$r(this, void 0, void 0, function () {
|
|
1556
1556
|
return __generator(this, function (_a) {
|
|
1557
1557
|
switch (_a.label) {
|
|
1558
1558
|
case 0:
|
|
@@ -1572,14 +1572,14 @@
|
|
|
1572
1572
|
};
|
|
1573
1573
|
Asset.prototype.getImage = function (params) {
|
|
1574
1574
|
if (params === void 0) { params = null; }
|
|
1575
|
-
return __awaiter$
|
|
1575
|
+
return __awaiter$r(this, void 0, void 0, function () {
|
|
1576
1576
|
return __generator(this, function (_a) {
|
|
1577
1577
|
return [2 /*return*/, Asset.toImage(this.stream, params)];
|
|
1578
1578
|
});
|
|
1579
1579
|
});
|
|
1580
1580
|
};
|
|
1581
1581
|
Asset.prototype.downloadImage = function (params, metadata) {
|
|
1582
|
-
return __awaiter$
|
|
1582
|
+
return __awaiter$r(this, void 0, void 0, function () {
|
|
1583
1583
|
var _a, _b;
|
|
1584
1584
|
return __generator(this, function (_c) {
|
|
1585
1585
|
switch (_c.label) {
|
|
@@ -1602,7 +1602,7 @@
|
|
|
1602
1602
|
return Asset;
|
|
1603
1603
|
}());
|
|
1604
1604
|
|
|
1605
|
-
var __decorate$
|
|
1605
|
+
var __decorate$t = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1606
1606
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1607
1607
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1608
1608
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1616,7 +1616,7 @@
|
|
|
1616
1616
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1617
1617
|
return Reflect.metadata(k, v);
|
|
1618
1618
|
};
|
|
1619
|
-
var __awaiter$
|
|
1619
|
+
var __awaiter$q = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1620
1620
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1621
1621
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1622
1622
|
function fulfilled(value) { try {
|
|
@@ -1645,7 +1645,7 @@
|
|
|
1645
1645
|
Assets.prototype.write = function (stream, contentType, metadata) {
|
|
1646
1646
|
if (contentType === void 0) { contentType = null; }
|
|
1647
1647
|
if (metadata === void 0) { metadata = null; }
|
|
1648
|
-
return __awaiter$
|
|
1648
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1649
1649
|
var extension, fileTypeStream, uploadStream, fileType$1, e_1;
|
|
1650
1650
|
var _this = this;
|
|
1651
1651
|
return __generator(this, function (_a) {
|
|
@@ -1702,7 +1702,7 @@
|
|
|
1702
1702
|
Assets.prototype.writeBuffer = function (buffer, metadata, contentType) {
|
|
1703
1703
|
if (metadata === void 0) { metadata = null; }
|
|
1704
1704
|
if (contentType === void 0) { contentType = null; }
|
|
1705
|
-
return __awaiter$
|
|
1705
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1706
1706
|
return __generator(this, function (_a) {
|
|
1707
1707
|
switch (_a.label) {
|
|
1708
1708
|
case 0: return [4 /*yield*/, exports.AssetProcessor.getMimeType(buffer, contentType)];
|
|
@@ -1718,14 +1718,14 @@
|
|
|
1718
1718
|
});
|
|
1719
1719
|
};
|
|
1720
1720
|
Assets.prototype.read = function (id) {
|
|
1721
|
-
return __awaiter$
|
|
1721
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1722
1722
|
return __generator(this, function (_a) {
|
|
1723
1723
|
return [2 /*return*/, this.find({ _id: new bson.ObjectId(id) })];
|
|
1724
1724
|
});
|
|
1725
1725
|
});
|
|
1726
1726
|
};
|
|
1727
1727
|
Assets.prototype.find = function (where) {
|
|
1728
|
-
return __awaiter$
|
|
1728
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1729
1729
|
var data;
|
|
1730
1730
|
return __generator(this, function (_a) {
|
|
1731
1731
|
switch (_a.label) {
|
|
@@ -1738,7 +1738,7 @@
|
|
|
1738
1738
|
});
|
|
1739
1739
|
};
|
|
1740
1740
|
Assets.prototype.unlink = function (id) {
|
|
1741
|
-
return __awaiter$
|
|
1741
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1742
1742
|
var asset;
|
|
1743
1743
|
return __generator(this, function (_a) {
|
|
1744
1744
|
switch (_a.label) {
|
|
@@ -1754,13 +1754,13 @@
|
|
|
1754
1754
|
};
|
|
1755
1755
|
return Assets;
|
|
1756
1756
|
}());
|
|
1757
|
-
exports.Assets = __decorate$
|
|
1757
|
+
exports.Assets = __decorate$t([
|
|
1758
1758
|
tsyringe.injectable(),
|
|
1759
1759
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped),
|
|
1760
1760
|
__metadata$n("design:paramtypes", [exports.MongoConnector, exports.AssetProcessor])
|
|
1761
1761
|
], exports.Assets);
|
|
1762
1762
|
|
|
1763
|
-
var __awaiter$
|
|
1763
|
+
var __awaiter$p = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1764
1764
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1765
1765
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1766
1766
|
function fulfilled(value) { try {
|
|
@@ -1814,7 +1814,7 @@
|
|
|
1814
1814
|
configurable: true
|
|
1815
1815
|
});
|
|
1816
1816
|
LazyAsset.prototype.unlink = function () {
|
|
1817
|
-
return __awaiter$
|
|
1817
|
+
return __awaiter$p(this, void 0, void 0, function () {
|
|
1818
1818
|
return __generator(this, function (_a) {
|
|
1819
1819
|
switch (_a.label) {
|
|
1820
1820
|
case 0: return [4 /*yield*/, this.collection.deleteOne({ _id: this.lazyId })];
|
|
@@ -1836,7 +1836,7 @@
|
|
|
1836
1836
|
});
|
|
1837
1837
|
};
|
|
1838
1838
|
LazyAsset.prototype.loadAsset = function () {
|
|
1839
|
-
return __awaiter$
|
|
1839
|
+
return __awaiter$p(this, void 0, void 0, function () {
|
|
1840
1840
|
var data;
|
|
1841
1841
|
return __generator(this, function (_a) {
|
|
1842
1842
|
switch (_a.label) {
|
|
@@ -1862,7 +1862,7 @@
|
|
|
1862
1862
|
});
|
|
1863
1863
|
};
|
|
1864
1864
|
LazyAsset.prototype.writeAsset = function (asset) {
|
|
1865
|
-
return __awaiter$
|
|
1865
|
+
return __awaiter$p(this, void 0, void 0, function () {
|
|
1866
1866
|
return __generator(this, function (_a) {
|
|
1867
1867
|
switch (_a.label) {
|
|
1868
1868
|
case 0:
|
|
@@ -1889,7 +1889,7 @@
|
|
|
1889
1889
|
};
|
|
1890
1890
|
};
|
|
1891
1891
|
LazyAsset.prototype.startWorkingOnAsset = function () {
|
|
1892
|
-
return __awaiter$
|
|
1892
|
+
return __awaiter$p(this, void 0, void 0, function () {
|
|
1893
1893
|
var progress;
|
|
1894
1894
|
return __generator(this, function (_a) {
|
|
1895
1895
|
switch (_a.label) {
|
|
@@ -1911,7 +1911,7 @@
|
|
|
1911
1911
|
return LazyAsset;
|
|
1912
1912
|
}());
|
|
1913
1913
|
|
|
1914
|
-
var __decorate$
|
|
1914
|
+
var __decorate$s = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
1915
1915
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1916
1916
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1917
1917
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1928,7 +1928,7 @@
|
|
|
1928
1928
|
var __param$7 = (this && this.__param) || function (paramIndex, decorator) {
|
|
1929
1929
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
1930
1930
|
};
|
|
1931
|
-
var __awaiter$
|
|
1931
|
+
var __awaiter$o = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1932
1932
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1933
1933
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1934
1934
|
function fulfilled(value) { try {
|
|
@@ -1963,7 +1963,7 @@
|
|
|
1963
1963
|
}
|
|
1964
1964
|
JobManager.prototype.process = function (jobType, params) {
|
|
1965
1965
|
if (params === void 0) { params = {}; }
|
|
1966
|
-
return __awaiter$
|
|
1966
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
1967
1967
|
var instance, jobName;
|
|
1968
1968
|
return __generator(this, function (_a) {
|
|
1969
1969
|
instance = null;
|
|
@@ -1981,7 +1981,7 @@
|
|
|
1981
1981
|
JobManager.prototype.enqueueWithName = function (name, params, que) {
|
|
1982
1982
|
if (params === void 0) { params = {}; }
|
|
1983
1983
|
if (que === void 0) { que = "main"; }
|
|
1984
|
-
return __awaiter$
|
|
1984
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
1985
1985
|
var jobName;
|
|
1986
1986
|
return __generator(this, function (_a) {
|
|
1987
1987
|
switch (_a.label) {
|
|
@@ -1999,7 +1999,7 @@
|
|
|
1999
1999
|
JobManager.prototype.enqueue = function (jobType, params, que) {
|
|
2000
2000
|
if (params === void 0) { params = {}; }
|
|
2001
2001
|
if (que === void 0) { que = "main"; }
|
|
2002
|
-
return __awaiter$
|
|
2002
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
2003
2003
|
var jobName;
|
|
2004
2004
|
return __generator(this, function (_a) {
|
|
2005
2005
|
switch (_a.label) {
|
|
@@ -2017,7 +2017,7 @@
|
|
|
2017
2017
|
JobManager.prototype.enqueueAt = function (timestamp, jobType, params, que) {
|
|
2018
2018
|
if (params === void 0) { params = {}; }
|
|
2019
2019
|
if (que === void 0) { que = "main"; }
|
|
2020
|
-
return __awaiter$
|
|
2020
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
2021
2021
|
var jobName;
|
|
2022
2022
|
return __generator(this, function (_a) {
|
|
2023
2023
|
switch (_a.label) {
|
|
@@ -2035,7 +2035,7 @@
|
|
|
2035
2035
|
JobManager.prototype.enqueueIn = function (time, jobType, params, que) {
|
|
2036
2036
|
if (params === void 0) { params = {}; }
|
|
2037
2037
|
if (que === void 0) { que = "main"; }
|
|
2038
|
-
return __awaiter$
|
|
2038
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
2039
2039
|
var jobName;
|
|
2040
2040
|
return __generator(this, function (_a) {
|
|
2041
2041
|
switch (_a.label) {
|
|
@@ -2076,7 +2076,7 @@
|
|
|
2076
2076
|
});
|
|
2077
2077
|
};
|
|
2078
2078
|
JobManager.prototype.startProcessing = function () {
|
|
2079
|
-
return __awaiter$
|
|
2079
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
2080
2080
|
return __generator(this, function (_a) {
|
|
2081
2081
|
switch (_a.label) {
|
|
2082
2082
|
case 0:
|
|
@@ -2162,7 +2162,7 @@
|
|
|
2162
2162
|
return this.tryResolveAndConnect(jobType, params);
|
|
2163
2163
|
};
|
|
2164
2164
|
JobManager.prototype.tryResolveAndConnect = function (jobType, params) {
|
|
2165
|
-
return __awaiter$
|
|
2165
|
+
return __awaiter$o(this, void 0, void 0, function () {
|
|
2166
2166
|
var jobName;
|
|
2167
2167
|
return __generator(this, function (_a) {
|
|
2168
2168
|
switch (_a.label) {
|
|
@@ -2194,14 +2194,14 @@
|
|
|
2194
2194
|
};
|
|
2195
2195
|
return JobManager;
|
|
2196
2196
|
}());
|
|
2197
|
-
exports.JobManager = __decorate$
|
|
2197
|
+
exports.JobManager = __decorate$s([
|
|
2198
2198
|
tsyringe.injectable(),
|
|
2199
2199
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped),
|
|
2200
2200
|
__param$7(1, tsyringe.inject(DI_CONTAINER)), __param$7(2, tsyringe.injectAll(JOB)),
|
|
2201
2201
|
__metadata$m("design:paramtypes", [exports.Configuration, Object, Array])
|
|
2202
2202
|
], exports.JobManager);
|
|
2203
2203
|
|
|
2204
|
-
var __awaiter$
|
|
2204
|
+
var __awaiter$n = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2205
2205
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2206
2206
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2207
2207
|
function fulfilled(value) { try {
|
|
@@ -2280,7 +2280,7 @@
|
|
|
2280
2280
|
configurable: true
|
|
2281
2281
|
});
|
|
2282
2282
|
Progress.prototype.createSubProgress = function (progressValue, max, message) {
|
|
2283
|
-
return __awaiter$
|
|
2283
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2284
2284
|
return __generator(this, function (_a) {
|
|
2285
2285
|
switch (_a.label) {
|
|
2286
2286
|
case 0:
|
|
@@ -2302,7 +2302,7 @@
|
|
|
2302
2302
|
});
|
|
2303
2303
|
};
|
|
2304
2304
|
Progress.prototype.setMax = function (max) {
|
|
2305
|
-
return __awaiter$
|
|
2305
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2306
2306
|
return __generator(this, function (_a) {
|
|
2307
2307
|
switch (_a.label) {
|
|
2308
2308
|
case 0:
|
|
@@ -2319,7 +2319,7 @@
|
|
|
2319
2319
|
});
|
|
2320
2320
|
};
|
|
2321
2321
|
Progress.prototype.setError = function (error) {
|
|
2322
|
-
return __awaiter$
|
|
2322
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2323
2323
|
return __generator(this, function (_a) {
|
|
2324
2324
|
switch (_a.label) {
|
|
2325
2325
|
case 0:
|
|
@@ -2334,7 +2334,7 @@
|
|
|
2334
2334
|
};
|
|
2335
2335
|
Progress.prototype.advance = function (value) {
|
|
2336
2336
|
if (value === void 0) { value = 1; }
|
|
2337
|
-
return __awaiter$
|
|
2337
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2338
2338
|
return __generator(this, function (_a) {
|
|
2339
2339
|
switch (_a.label) {
|
|
2340
2340
|
case 0:
|
|
@@ -2431,7 +2431,7 @@
|
|
|
2431
2431
|
configurable: true
|
|
2432
2432
|
});
|
|
2433
2433
|
SubProgress.prototype.createSubProgress = function (progressValue, max, message) {
|
|
2434
|
-
return __awaiter$
|
|
2434
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2435
2435
|
return __generator(this, function (_a) {
|
|
2436
2436
|
switch (_a.label) {
|
|
2437
2437
|
case 0:
|
|
@@ -2453,7 +2453,7 @@
|
|
|
2453
2453
|
});
|
|
2454
2454
|
};
|
|
2455
2455
|
SubProgress.prototype.setMax = function (max) {
|
|
2456
|
-
return __awaiter$
|
|
2456
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2457
2457
|
return __generator(this, function (_a) {
|
|
2458
2458
|
switch (_a.label) {
|
|
2459
2459
|
case 0:
|
|
@@ -2470,7 +2470,7 @@
|
|
|
2470
2470
|
});
|
|
2471
2471
|
};
|
|
2472
2472
|
SubProgress.prototype.setError = function (error) {
|
|
2473
|
-
return __awaiter$
|
|
2473
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2474
2474
|
return __generator(this, function (_a) {
|
|
2475
2475
|
switch (_a.label) {
|
|
2476
2476
|
case 0:
|
|
@@ -2485,7 +2485,7 @@
|
|
|
2485
2485
|
};
|
|
2486
2486
|
SubProgress.prototype.advance = function (value) {
|
|
2487
2487
|
if (value === void 0) { value = 1; }
|
|
2488
|
-
return __awaiter$
|
|
2488
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2489
2489
|
return __generator(this, function (_a) {
|
|
2490
2490
|
switch (_a.label) {
|
|
2491
2491
|
case 0:
|
|
@@ -2502,7 +2502,7 @@
|
|
|
2502
2502
|
});
|
|
2503
2503
|
};
|
|
2504
2504
|
SubProgress.prototype.save = function () {
|
|
2505
|
-
return __awaiter$
|
|
2505
|
+
return __awaiter$n(this, void 0, void 0, function () {
|
|
2506
2506
|
var ratio, newProgress, current;
|
|
2507
2507
|
return __generator(this, function (_a) {
|
|
2508
2508
|
switch (_a.label) {
|
|
@@ -2526,7 +2526,7 @@
|
|
|
2526
2526
|
return SubProgress;
|
|
2527
2527
|
}());
|
|
2528
2528
|
|
|
2529
|
-
var __decorate$
|
|
2529
|
+
var __decorate$r = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2530
2530
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2531
2531
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2532
2532
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2540,7 +2540,7 @@
|
|
|
2540
2540
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2541
2541
|
return Reflect.metadata(k, v);
|
|
2542
2542
|
};
|
|
2543
|
-
var __awaiter$
|
|
2543
|
+
var __awaiter$m = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2544
2544
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2545
2545
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2546
2546
|
function fulfilled(value) { try {
|
|
@@ -2569,7 +2569,7 @@
|
|
|
2569
2569
|
this.collection = connector.database.collection("progresses");
|
|
2570
2570
|
}
|
|
2571
2571
|
Progresses.prototype.waitToFinish = function (id) {
|
|
2572
|
-
return __awaiter$
|
|
2572
|
+
return __awaiter$m(this, void 0, void 0, function () {
|
|
2573
2573
|
var isFinished, progress;
|
|
2574
2574
|
return __generator(this, function (_a) {
|
|
2575
2575
|
switch (_a.label) {
|
|
@@ -2601,14 +2601,14 @@
|
|
|
2601
2601
|
});
|
|
2602
2602
|
};
|
|
2603
2603
|
Progresses.prototype.get = function (id) {
|
|
2604
|
-
return __awaiter$
|
|
2604
|
+
return __awaiter$m(this, void 0, void 0, function () {
|
|
2605
2605
|
return __generator(this, function (_a) {
|
|
2606
2606
|
return [2 /*return*/, this.find({ _id: new bson.ObjectId(id) })];
|
|
2607
2607
|
});
|
|
2608
2608
|
});
|
|
2609
2609
|
};
|
|
2610
2610
|
Progresses.prototype.find = function (where) {
|
|
2611
|
-
return __awaiter$
|
|
2611
|
+
return __awaiter$m(this, void 0, void 0, function () {
|
|
2612
2612
|
var data;
|
|
2613
2613
|
return __generator(this, function (_a) {
|
|
2614
2614
|
switch (_a.label) {
|
|
@@ -2622,7 +2622,7 @@
|
|
|
2622
2622
|
};
|
|
2623
2623
|
Progresses.prototype.create = function (max) {
|
|
2624
2624
|
if (max === void 0) { max = 100; }
|
|
2625
|
-
return __awaiter$
|
|
2625
|
+
return __awaiter$m(this, void 0, void 0, function () {
|
|
2626
2626
|
var res;
|
|
2627
2627
|
return __generator(this, function (_a) {
|
|
2628
2628
|
switch (_a.label) {
|
|
@@ -2642,7 +2642,7 @@
|
|
|
2642
2642
|
});
|
|
2643
2643
|
};
|
|
2644
2644
|
Progresses.prototype.remove = function (id) {
|
|
2645
|
-
return __awaiter$
|
|
2645
|
+
return __awaiter$m(this, void 0, void 0, function () {
|
|
2646
2646
|
return __generator(this, function (_a) {
|
|
2647
2647
|
switch (_a.label) {
|
|
2648
2648
|
case 0: return [4 /*yield*/, this.collection.deleteOne({ _id: new bson.ObjectId(id) })];
|
|
@@ -2655,13 +2655,13 @@
|
|
|
2655
2655
|
};
|
|
2656
2656
|
return Progresses;
|
|
2657
2657
|
}());
|
|
2658
|
-
exports.Progresses = __decorate$
|
|
2658
|
+
exports.Progresses = __decorate$r([
|
|
2659
2659
|
tsyringe.injectable(),
|
|
2660
2660
|
tsyringe.singleton(),
|
|
2661
2661
|
__metadata$l("design:paramtypes", [exports.MongoConnector, exports.Configuration])
|
|
2662
2662
|
], exports.Progresses);
|
|
2663
2663
|
|
|
2664
|
-
var __decorate$
|
|
2664
|
+
var __decorate$q = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2665
2665
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2666
2666
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2667
2667
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2675,7 +2675,7 @@
|
|
|
2675
2675
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2676
2676
|
return Reflect.metadata(k, v);
|
|
2677
2677
|
};
|
|
2678
|
-
var __awaiter$
|
|
2678
|
+
var __awaiter$l = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2679
2679
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2680
2680
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2681
2681
|
function fulfilled(value) { try {
|
|
@@ -2705,7 +2705,7 @@
|
|
|
2705
2705
|
LazyAssets.prototype.create = function (jobType, jobParams, jobQue) {
|
|
2706
2706
|
if (jobParams === void 0) { jobParams = {}; }
|
|
2707
2707
|
if (jobQue === void 0) { jobQue = "main"; }
|
|
2708
|
-
return __awaiter$
|
|
2708
|
+
return __awaiter$l(this, void 0, void 0, function () {
|
|
2709
2709
|
var jobName, res;
|
|
2710
2710
|
return __generator(this, function (_a) {
|
|
2711
2711
|
switch (_a.label) {
|
|
@@ -2724,14 +2724,14 @@
|
|
|
2724
2724
|
});
|
|
2725
2725
|
};
|
|
2726
2726
|
LazyAssets.prototype.read = function (id) {
|
|
2727
|
-
return __awaiter$
|
|
2727
|
+
return __awaiter$l(this, void 0, void 0, function () {
|
|
2728
2728
|
return __generator(this, function (_a) {
|
|
2729
2729
|
return [2 /*return*/, this.find({ _id: new bson.ObjectId(id) })];
|
|
2730
2730
|
});
|
|
2731
2731
|
});
|
|
2732
2732
|
};
|
|
2733
2733
|
LazyAssets.prototype.find = function (where) {
|
|
2734
|
-
return __awaiter$
|
|
2734
|
+
return __awaiter$l(this, void 0, void 0, function () {
|
|
2735
2735
|
var data;
|
|
2736
2736
|
return __generator(this, function (_a) {
|
|
2737
2737
|
switch (_a.label) {
|
|
@@ -2746,7 +2746,7 @@
|
|
|
2746
2746
|
});
|
|
2747
2747
|
};
|
|
2748
2748
|
LazyAssets.prototype.unlink = function (id) {
|
|
2749
|
-
return __awaiter$
|
|
2749
|
+
return __awaiter$l(this, void 0, void 0, function () {
|
|
2750
2750
|
var asset;
|
|
2751
2751
|
return __generator(this, function (_a) {
|
|
2752
2752
|
switch (_a.label) {
|
|
@@ -2762,14 +2762,14 @@
|
|
|
2762
2762
|
};
|
|
2763
2763
|
return LazyAssets;
|
|
2764
2764
|
}());
|
|
2765
|
-
exports.LazyAssets = __decorate$
|
|
2765
|
+
exports.LazyAssets = __decorate$q([
|
|
2766
2766
|
tsyringe.injectable(),
|
|
2767
2767
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped),
|
|
2768
2768
|
__metadata$k("design:paramtypes", [exports.MongoConnector, exports.Assets,
|
|
2769
2769
|
exports.Progresses, exports.JobManager])
|
|
2770
2770
|
], exports.LazyAssets);
|
|
2771
2771
|
|
|
2772
|
-
var __decorate$
|
|
2772
|
+
var __decorate$p = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2773
2773
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2774
2774
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2775
2775
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2783,7 +2783,7 @@
|
|
|
2783
2783
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2784
2784
|
return Reflect.metadata(k, v);
|
|
2785
2785
|
};
|
|
2786
|
-
var __awaiter$
|
|
2786
|
+
var __awaiter$k = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2787
2787
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2788
2788
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2789
2789
|
function fulfilled(value) { try {
|
|
@@ -2809,7 +2809,7 @@
|
|
|
2809
2809
|
}
|
|
2810
2810
|
AssetResolver.prototype.resolve = function (id, lazy) {
|
|
2811
2811
|
if (lazy === void 0) { lazy = false; }
|
|
2812
|
-
return __awaiter$
|
|
2812
|
+
return __awaiter$k(this, void 0, void 0, function () {
|
|
2813
2813
|
var asset, lazyAsset, lazyAsset;
|
|
2814
2814
|
return __generator(this, function (_a) {
|
|
2815
2815
|
switch (_a.label) {
|
|
@@ -2839,13 +2839,13 @@
|
|
|
2839
2839
|
};
|
|
2840
2840
|
return AssetResolver;
|
|
2841
2841
|
}());
|
|
2842
|
-
exports.AssetResolver = __decorate$
|
|
2842
|
+
exports.AssetResolver = __decorate$p([
|
|
2843
2843
|
tsyringe.injectable(),
|
|
2844
2844
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped),
|
|
2845
2845
|
__metadata$j("design:paramtypes", [exports.Assets, exports.LazyAssets])
|
|
2846
2846
|
], exports.AssetResolver);
|
|
2847
2847
|
|
|
2848
|
-
var __decorate$
|
|
2848
|
+
var __decorate$o = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2849
2849
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2850
2850
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2851
2851
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2876,13 +2876,13 @@
|
|
|
2876
2876
|
});
|
|
2877
2877
|
return BackendProvider;
|
|
2878
2878
|
}());
|
|
2879
|
-
exports.BackendProvider = __decorate$
|
|
2879
|
+
exports.BackendProvider = __decorate$o([
|
|
2880
2880
|
tsyringe.injectable(),
|
|
2881
2881
|
tsyringe.singleton(),
|
|
2882
2882
|
__metadata$i("design:paramtypes", [])
|
|
2883
2883
|
], exports.BackendProvider);
|
|
2884
2884
|
|
|
2885
|
-
var __decorate$
|
|
2885
|
+
var __decorate$n = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2886
2886
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2887
2887
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2888
2888
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2892,7 +2892,7 @@
|
|
|
2892
2892
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2893
2893
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2894
2894
|
};
|
|
2895
|
-
var __awaiter$
|
|
2895
|
+
var __awaiter$j = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2896
2896
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2897
2897
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2898
2898
|
function fulfilled(value) { try {
|
|
@@ -2915,14 +2915,14 @@
|
|
|
2915
2915
|
function CacheProcessor() {
|
|
2916
2916
|
}
|
|
2917
2917
|
CacheProcessor.prototype.serialize = function (data) {
|
|
2918
|
-
return __awaiter$
|
|
2918
|
+
return __awaiter$j(this, void 0, void 0, function () {
|
|
2919
2919
|
return __generator(this, function (_a) {
|
|
2920
2920
|
return [2 /*return*/, data];
|
|
2921
2921
|
});
|
|
2922
2922
|
});
|
|
2923
2923
|
};
|
|
2924
2924
|
CacheProcessor.prototype.deserialize = function (data) {
|
|
2925
|
-
return __awaiter$
|
|
2925
|
+
return __awaiter$j(this, void 0, void 0, function () {
|
|
2926
2926
|
return __generator(this, function (_a) {
|
|
2927
2927
|
return [2 /*return*/, data];
|
|
2928
2928
|
});
|
|
@@ -2930,12 +2930,12 @@
|
|
|
2930
2930
|
};
|
|
2931
2931
|
return CacheProcessor;
|
|
2932
2932
|
}());
|
|
2933
|
-
exports.CacheProcessor = __decorate$
|
|
2933
|
+
exports.CacheProcessor = __decorate$n([
|
|
2934
2934
|
tsyringe.injectable(),
|
|
2935
2935
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped)
|
|
2936
2936
|
], exports.CacheProcessor);
|
|
2937
2937
|
|
|
2938
|
-
var __decorate$
|
|
2938
|
+
var __decorate$m = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2939
2939
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2940
2940
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2941
2941
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2949,7 +2949,7 @@
|
|
|
2949
2949
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2950
2950
|
return Reflect.metadata(k, v);
|
|
2951
2951
|
};
|
|
2952
|
-
var __awaiter$
|
|
2952
|
+
var __awaiter$i = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2953
2953
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2954
2954
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2955
2955
|
function fulfilled(value) { try {
|
|
@@ -2975,7 +2975,7 @@
|
|
|
2975
2975
|
this.cacheProcessor = cacheProcessor;
|
|
2976
2976
|
}
|
|
2977
2977
|
Cache.prototype.prepare = function () {
|
|
2978
|
-
return __awaiter$
|
|
2978
|
+
return __awaiter$i(this, void 0, void 0, function () {
|
|
2979
2979
|
return __generator(this, function (_a) {
|
|
2980
2980
|
switch (_a.label) {
|
|
2981
2981
|
case 0:
|
|
@@ -2996,7 +2996,7 @@
|
|
|
2996
2996
|
Cache.prototype.set = function (key, value, ttl, expirationTimestamp, tags) {
|
|
2997
2997
|
if (expirationTimestamp === void 0) { expirationTimestamp = null; }
|
|
2998
2998
|
if (tags === void 0) { tags = {}; }
|
|
2999
|
-
return __awaiter$
|
|
2999
|
+
return __awaiter$i(this, void 0, void 0, function () {
|
|
3000
3000
|
var item, _a, now;
|
|
3001
3001
|
return __generator(this, function (_b) {
|
|
3002
3002
|
switch (_b.label) {
|
|
@@ -3027,7 +3027,7 @@
|
|
|
3027
3027
|
});
|
|
3028
3028
|
};
|
|
3029
3029
|
Cache.prototype.get = function (key) {
|
|
3030
|
-
return __awaiter$
|
|
3030
|
+
return __awaiter$i(this, void 0, void 0, function () {
|
|
3031
3031
|
var item, now;
|
|
3032
3032
|
return __generator(this, function (_a) {
|
|
3033
3033
|
switch (_a.label) {
|
|
@@ -3053,7 +3053,7 @@
|
|
|
3053
3053
|
Cache.prototype.getOrSet = function (key, valueCb, ttl, expirationTimestamp, tags) {
|
|
3054
3054
|
if (expirationTimestamp === void 0) { expirationTimestamp = null; }
|
|
3055
3055
|
if (tags === void 0) { tags = {}; }
|
|
3056
|
-
return __awaiter$
|
|
3056
|
+
return __awaiter$i(this, void 0, void 0, function () {
|
|
3057
3057
|
var e_1, _a, _b;
|
|
3058
3058
|
return __generator(this, function (_c) {
|
|
3059
3059
|
switch (_c.label) {
|
|
@@ -3074,7 +3074,7 @@
|
|
|
3074
3074
|
});
|
|
3075
3075
|
};
|
|
3076
3076
|
Cache.prototype.delete = function (key) {
|
|
3077
|
-
return __awaiter$
|
|
3077
|
+
return __awaiter$i(this, void 0, void 0, function () {
|
|
3078
3078
|
return __generator(this, function (_a) {
|
|
3079
3079
|
switch (_a.label) {
|
|
3080
3080
|
case 0: return [4 /*yield*/, this.prepare()];
|
|
@@ -3090,12 +3090,59 @@
|
|
|
3090
3090
|
};
|
|
3091
3091
|
return Cache;
|
|
3092
3092
|
}());
|
|
3093
|
-
exports.Cache = __decorate$
|
|
3093
|
+
exports.Cache = __decorate$m([
|
|
3094
3094
|
tsyringe.injectable(),
|
|
3095
3095
|
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped),
|
|
3096
3096
|
__metadata$h("design:paramtypes", [exports.MongoConnector, exports.Configuration, exports.CacheProcessor])
|
|
3097
3097
|
], exports.Cache);
|
|
3098
3098
|
|
|
3099
|
+
var __decorate$l = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3100
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3101
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3102
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
3103
|
+
else
|
|
3104
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
3105
|
+
if (d = decorators[i])
|
|
3106
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3107
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3108
|
+
};
|
|
3109
|
+
var __awaiter$h = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3110
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3111
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3112
|
+
function fulfilled(value) { try {
|
|
3113
|
+
step(generator.next(value));
|
|
3114
|
+
}
|
|
3115
|
+
catch (e) {
|
|
3116
|
+
reject(e);
|
|
3117
|
+
} }
|
|
3118
|
+
function rejected(value) { try {
|
|
3119
|
+
step(generator["throw"](value));
|
|
3120
|
+
}
|
|
3121
|
+
catch (e) {
|
|
3122
|
+
reject(e);
|
|
3123
|
+
} }
|
|
3124
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3125
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3126
|
+
});
|
|
3127
|
+
};
|
|
3128
|
+
exports.EndpointProvider = /** @class */ (function () {
|
|
3129
|
+
function EndpointProvider() {
|
|
3130
|
+
}
|
|
3131
|
+
EndpointProvider.prototype.configure = function (app) {
|
|
3132
|
+
return __awaiter$h(this, void 0, void 0, function () {
|
|
3133
|
+
return __generator(this, function (_a) {
|
|
3134
|
+
console.log("Express app is mounted to: " + app.mountpath);
|
|
3135
|
+
return [2 /*return*/];
|
|
3136
|
+
});
|
|
3137
|
+
});
|
|
3138
|
+
};
|
|
3139
|
+
return EndpointProvider;
|
|
3140
|
+
}());
|
|
3141
|
+
exports.EndpointProvider = __decorate$l([
|
|
3142
|
+
tsyringe.injectable(),
|
|
3143
|
+
tsyringe.scoped(tsyringe.Lifecycle.ContainerScoped)
|
|
3144
|
+
], exports.EndpointProvider);
|
|
3145
|
+
|
|
3099
3146
|
var __decorate$k = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3100
3147
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3101
3148
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -3113,7 +3160,7 @@
|
|
|
3113
3160
|
var __param$6 = (this && this.__param) || function (paramIndex, decorator) {
|
|
3114
3161
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
3115
3162
|
};
|
|
3116
|
-
var __awaiter$
|
|
3163
|
+
var __awaiter$g = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3117
3164
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3118
3165
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3119
3166
|
function fulfilled(value) { try {
|
|
@@ -3137,7 +3184,7 @@
|
|
|
3137
3184
|
this.fixtures = fixtures;
|
|
3138
3185
|
}
|
|
3139
3186
|
Fixtures.prototype.load = function () {
|
|
3140
|
-
return __awaiter$
|
|
3187
|
+
return __awaiter$g(this, void 0, void 0, function () {
|
|
3141
3188
|
var _a, _b, fixture, e_1_1;
|
|
3142
3189
|
var e_1, _c;
|
|
3143
3190
|
return __generator(this, function (_d) {
|
|
@@ -3185,7 +3232,7 @@
|
|
|
3185
3232
|
__metadata$g("design:paramtypes", [Array])
|
|
3186
3233
|
], exports.Fixtures);
|
|
3187
3234
|
|
|
3188
|
-
var __awaiter$
|
|
3235
|
+
var __awaiter$f = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3189
3236
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3190
3237
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3191
3238
|
function fulfilled(value) { try {
|
|
@@ -3216,7 +3263,7 @@
|
|
|
3216
3263
|
this.targetSize = !size ? { width: thumbSize, height: thumbSize } : size;
|
|
3217
3264
|
}
|
|
3218
3265
|
GalleryImage.prototype.serve = function (id) {
|
|
3219
|
-
return __awaiter$
|
|
3266
|
+
return __awaiter$f(this, void 0, void 0, function () {
|
|
3220
3267
|
var isThumb, original, _a, meta, ratio, sizeRatio, size, targetHeight, targetWidth, resized, buffer;
|
|
3221
3268
|
return __generator(this, function (_b) {
|
|
3222
3269
|
switch (_b.label) {
|
|
@@ -3312,7 +3359,7 @@
|
|
|
3312
3359
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3313
3360
|
return Reflect.metadata(k, v);
|
|
3314
3361
|
};
|
|
3315
|
-
var __awaiter$
|
|
3362
|
+
var __awaiter$e = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3316
3363
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3317
3364
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3318
3365
|
function fulfilled(value) { try {
|
|
@@ -3342,7 +3389,7 @@
|
|
|
3342
3389
|
}
|
|
3343
3390
|
Gallery.prototype.getFolder = function (folder, size) {
|
|
3344
3391
|
if (size === void 0) { size = null; }
|
|
3345
|
-
return __awaiter$
|
|
3392
|
+
return __awaiter$e(this, void 0, void 0, function () {
|
|
3346
3393
|
var _this = this;
|
|
3347
3394
|
return __generator(this, function (_a) {
|
|
3348
3395
|
this.cache[folder] = this.cache[folder] || new Promise(function (resolve) {
|
|
@@ -3367,7 +3414,7 @@
|
|
|
3367
3414
|
return;
|
|
3368
3415
|
}
|
|
3369
3416
|
var promises = files.map(function (file) {
|
|
3370
|
-
return new Promise(function (resolve) { return __awaiter$
|
|
3417
|
+
return new Promise(function (resolve) { return __awaiter$e(_this, void 0, void 0, function () {
|
|
3371
3418
|
var filePath, absoluteFilePath;
|
|
3372
3419
|
var _this = this;
|
|
3373
3420
|
return __generator(this, function (_a) {
|
|
@@ -3403,7 +3450,7 @@
|
|
|
3403
3450
|
});
|
|
3404
3451
|
},
|
|
3405
3452
|
writeResult: function (isThumb, buffer) {
|
|
3406
|
-
return new Promise(function (res, rej) { return __awaiter$
|
|
3453
|
+
return new Promise(function (res, rej) { return __awaiter$e(_this, void 0, void 0, function () {
|
|
3407
3454
|
var resultPath;
|
|
3408
3455
|
return __generator(this, function (_a) {
|
|
3409
3456
|
switch (_a.label) {
|
|
@@ -3477,7 +3524,7 @@
|
|
|
3477
3524
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3478
3525
|
return Reflect.metadata(k, v);
|
|
3479
3526
|
};
|
|
3480
|
-
var __awaiter$
|
|
3527
|
+
var __awaiter$d = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3481
3528
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3482
3529
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3483
3530
|
function fulfilled(value) { try {
|
|
@@ -3505,7 +3552,7 @@
|
|
|
3505
3552
|
this.parts = config.resolve("idParts");
|
|
3506
3553
|
}
|
|
3507
3554
|
IdGenerator.prototype.generate = function (checkCb) {
|
|
3508
|
-
return __awaiter$
|
|
3555
|
+
return __awaiter$d(this, void 0, void 0, function () {
|
|
3509
3556
|
var id, tries, notGood;
|
|
3510
3557
|
return __generator(this, function (_a) {
|
|
3511
3558
|
switch (_a.label) {
|
|
@@ -3597,7 +3644,7 @@
|
|
|
3597
3644
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3598
3645
|
return Reflect.metadata(k, v);
|
|
3599
3646
|
};
|
|
3600
|
-
var __awaiter$
|
|
3647
|
+
var __awaiter$c = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3601
3648
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3602
3649
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3603
3650
|
function fulfilled(value) { try {
|
|
@@ -3622,7 +3669,7 @@
|
|
|
3622
3669
|
this.cache = {};
|
|
3623
3670
|
}
|
|
3624
3671
|
Translator.prototype.getDictionary = function (language) {
|
|
3625
|
-
return __awaiter$
|
|
3672
|
+
return __awaiter$c(this, void 0, void 0, function () {
|
|
3626
3673
|
var dictionary;
|
|
3627
3674
|
return __generator(this, function (_a) {
|
|
3628
3675
|
switch (_a.label) {
|
|
@@ -3707,7 +3754,7 @@
|
|
|
3707
3754
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3708
3755
|
return Reflect.metadata(k, v);
|
|
3709
3756
|
};
|
|
3710
|
-
var __awaiter$
|
|
3757
|
+
var __awaiter$b = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3711
3758
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3712
3759
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3713
3760
|
function fulfilled(value) { try {
|
|
@@ -3750,11 +3797,11 @@
|
|
|
3750
3797
|
return this.initPromise;
|
|
3751
3798
|
};
|
|
3752
3799
|
TemplateRenderer.prototype.parseTemplates = function (dir, dirPath) {
|
|
3753
|
-
return __awaiter$
|
|
3800
|
+
return __awaiter$b(this, void 0, void 0, function () {
|
|
3754
3801
|
var _this = this;
|
|
3755
3802
|
return __generator(this, function (_a) {
|
|
3756
3803
|
return [2 /*return*/, new Promise(function (resolve) {
|
|
3757
|
-
fs.readdir(dir, function (err, files) { return __awaiter$
|
|
3804
|
+
fs.readdir(dir, function (err, files) { return __awaiter$b(_this, void 0, void 0, function () {
|
|
3758
3805
|
var files_1, files_1_1, file, path$1, parts, name, fullName, content, e_1_1;
|
|
3759
3806
|
var e_1, _a;
|
|
3760
3807
|
return __generator(this, function (_b) {
|
|
@@ -3806,7 +3853,7 @@
|
|
|
3806
3853
|
});
|
|
3807
3854
|
};
|
|
3808
3855
|
TemplateRenderer.prototype.render = function (template, language, context) {
|
|
3809
|
-
return __awaiter$
|
|
3856
|
+
return __awaiter$b(this, void 0, void 0, function () {
|
|
3810
3857
|
var res, _a;
|
|
3811
3858
|
return __generator(this, function (_b) {
|
|
3812
3859
|
switch (_b.label) {
|
|
@@ -3856,7 +3903,7 @@
|
|
|
3856
3903
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3857
3904
|
return Reflect.metadata(k, v);
|
|
3858
3905
|
};
|
|
3859
|
-
var __awaiter$
|
|
3906
|
+
var __awaiter$a = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3860
3907
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3861
3908
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3862
3909
|
function fulfilled(value) { try {
|
|
@@ -3896,7 +3943,7 @@
|
|
|
3896
3943
|
configurable: true
|
|
3897
3944
|
});
|
|
3898
3945
|
MailSender.prototype.sendMail = function (language, options) {
|
|
3899
|
-
return __awaiter$
|
|
3946
|
+
return __awaiter$a(this, void 0, void 0, function () {
|
|
3900
3947
|
var subject, html;
|
|
3901
3948
|
return __generator(this, function (_a) {
|
|
3902
3949
|
switch (_a.label) {
|
|
@@ -3939,7 +3986,7 @@
|
|
|
3939
3986
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
3940
3987
|
return Reflect.metadata(k, v);
|
|
3941
3988
|
};
|
|
3942
|
-
var __awaiter$
|
|
3989
|
+
var __awaiter$9 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3943
3990
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3944
3991
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3945
3992
|
function fulfilled(value) { try {
|
|
@@ -3966,7 +4013,7 @@
|
|
|
3966
4013
|
MemoryCache.prototype.set = function (key, value, ttl, expirationTimestamp, tags) {
|
|
3967
4014
|
if (expirationTimestamp === void 0) { expirationTimestamp = null; }
|
|
3968
4015
|
if (tags === void 0) { tags = {}; }
|
|
3969
|
-
return __awaiter$
|
|
4016
|
+
return __awaiter$9(this, void 0, void 0, function () {
|
|
3970
4017
|
var now, expTimestamp;
|
|
3971
4018
|
return __generator(this, function (_a) {
|
|
3972
4019
|
now = Math.round(new Date().getTime() / 1000);
|
|
@@ -3982,7 +4029,7 @@
|
|
|
3982
4029
|
});
|
|
3983
4030
|
};
|
|
3984
4031
|
MemoryCache.prototype.get = function (key) {
|
|
3985
|
-
return __awaiter$
|
|
4032
|
+
return __awaiter$9(this, void 0, void 0, function () {
|
|
3986
4033
|
var item, now, expTimestamp, value;
|
|
3987
4034
|
return __generator(this, function (_a) {
|
|
3988
4035
|
switch (_a.label) {
|
|
@@ -4013,7 +4060,7 @@
|
|
|
4013
4060
|
MemoryCache.prototype.getOrSet = function (key, valueCb, ttl, expirationTimestamp, tags) {
|
|
4014
4061
|
if (expirationTimestamp === void 0) { expirationTimestamp = null; }
|
|
4015
4062
|
if (tags === void 0) { tags = {}; }
|
|
4016
|
-
return __awaiter$
|
|
4063
|
+
return __awaiter$9(this, void 0, void 0, function () {
|
|
4017
4064
|
var e_1, _a, _b;
|
|
4018
4065
|
return __generator(this, function (_c) {
|
|
4019
4066
|
switch (_c.label) {
|
|
@@ -4034,7 +4081,7 @@
|
|
|
4034
4081
|
});
|
|
4035
4082
|
};
|
|
4036
4083
|
MemoryCache.prototype.delete = function (key) {
|
|
4037
|
-
return __awaiter$
|
|
4084
|
+
return __awaiter$9(this, void 0, void 0, function () {
|
|
4038
4085
|
return __generator(this, function (_a) {
|
|
4039
4086
|
switch (_a.label) {
|
|
4040
4087
|
case 0:
|
|
@@ -4065,7 +4112,7 @@
|
|
|
4065
4112
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4066
4113
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4067
4114
|
};
|
|
4068
|
-
var __awaiter$
|
|
4115
|
+
var __awaiter$8 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4069
4116
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4070
4117
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4071
4118
|
function fulfilled(value) { try {
|
|
@@ -4094,7 +4141,7 @@
|
|
|
4094
4141
|
function UserManager() {
|
|
4095
4142
|
}
|
|
4096
4143
|
UserManager.prototype.getByCredentials = function (credentials) {
|
|
4097
|
-
return __awaiter$
|
|
4144
|
+
return __awaiter$8(this, void 0, void 0, function () {
|
|
4098
4145
|
var _a;
|
|
4099
4146
|
return __generator(this, function (_b) {
|
|
4100
4147
|
switch (_b.label) {
|
|
@@ -4112,14 +4159,14 @@
|
|
|
4112
4159
|
});
|
|
4113
4160
|
};
|
|
4114
4161
|
UserManager.prototype.getById = function (id) {
|
|
4115
|
-
return __awaiter$
|
|
4162
|
+
return __awaiter$8(this, void 0, void 0, function () {
|
|
4116
4163
|
return __generator(this, function (_a) {
|
|
4117
4164
|
return [2 /*return*/, (sampleUser.id == id) ? sampleUser : null];
|
|
4118
4165
|
});
|
|
4119
4166
|
});
|
|
4120
4167
|
};
|
|
4121
4168
|
UserManager.prototype.serialize = function (user) {
|
|
4122
|
-
return __awaiter$
|
|
4169
|
+
return __awaiter$8(this, void 0, void 0, function () {
|
|
4123
4170
|
var res;
|
|
4124
4171
|
return __generator(this, function (_a) {
|
|
4125
4172
|
res = Object.assign({}, user);
|
|
@@ -4152,7 +4199,7 @@
|
|
|
4152
4199
|
var __param$5 = (this && this.__param) || function (paramIndex, decorator) {
|
|
4153
4200
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
4154
4201
|
};
|
|
4155
|
-
var __awaiter$
|
|
4202
|
+
var __awaiter$7 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4156
4203
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4157
4204
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4158
4205
|
function fulfilled(value) { try {
|
|
@@ -4177,7 +4224,7 @@
|
|
|
4177
4224
|
this.assetResolver = assetResolver;
|
|
4178
4225
|
}
|
|
4179
4226
|
AssetsController.prototype.upload = function (file) {
|
|
4180
|
-
return __awaiter$
|
|
4227
|
+
return __awaiter$7(this, void 0, void 0, function () {
|
|
4181
4228
|
var contentType, asset, e_1, msg;
|
|
4182
4229
|
return __generator(this, function (_c) {
|
|
4183
4230
|
switch (_c.label) {
|
|
@@ -4200,7 +4247,7 @@
|
|
|
4200
4247
|
AssetsController.prototype.getImageRotation = function (id, params, rotation) {
|
|
4201
4248
|
if (rotation === void 0) { rotation = 0; }
|
|
4202
4249
|
var _a;
|
|
4203
|
-
return __awaiter$
|
|
4250
|
+
return __awaiter$7(this, void 0, void 0, function () {
|
|
4204
4251
|
var asset;
|
|
4205
4252
|
return __generator(this, function (_c) {
|
|
4206
4253
|
switch (_c.label) {
|
|
@@ -4220,7 +4267,7 @@
|
|
|
4220
4267
|
});
|
|
4221
4268
|
};
|
|
4222
4269
|
AssetsController.prototype.getImage = function (id, params) {
|
|
4223
|
-
return __awaiter$
|
|
4270
|
+
return __awaiter$7(this, void 0, void 0, function () {
|
|
4224
4271
|
return __generator(this, function (_c) {
|
|
4225
4272
|
return [2 /*return*/, this.getImageRotation(id, params)];
|
|
4226
4273
|
});
|
|
@@ -4228,7 +4275,7 @@
|
|
|
4228
4275
|
};
|
|
4229
4276
|
AssetsController.prototype.getFile = function (id, lazy, res) {
|
|
4230
4277
|
var _a, _b;
|
|
4231
|
-
return __awaiter$
|
|
4278
|
+
return __awaiter$7(this, void 0, void 0, function () {
|
|
4232
4279
|
var asset, ext;
|
|
4233
4280
|
return __generator(this, function (_c) {
|
|
4234
4281
|
switch (_c.label) {
|
|
@@ -4304,7 +4351,7 @@
|
|
|
4304
4351
|
var __param$4 = (this && this.__param) || function (paramIndex, decorator) {
|
|
4305
4352
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
4306
4353
|
};
|
|
4307
|
-
var __awaiter$
|
|
4354
|
+
var __awaiter$6 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4308
4355
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4309
4356
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4310
4357
|
function fulfilled(value) { try {
|
|
@@ -4329,7 +4376,7 @@
|
|
|
4329
4376
|
this.userManager = userManager;
|
|
4330
4377
|
}
|
|
4331
4378
|
AuthController.prototype.login = function (credentials, res) {
|
|
4332
|
-
return __awaiter$
|
|
4379
|
+
return __awaiter$6(this, void 0, void 0, function () {
|
|
4333
4380
|
var user, valid, _a, reason_1;
|
|
4334
4381
|
return __generator(this, function (_b) {
|
|
4335
4382
|
switch (_b.label) {
|
|
@@ -4439,7 +4486,7 @@
|
|
|
4439
4486
|
var __param$2 = (this && this.__param) || function (paramIndex, decorator) {
|
|
4440
4487
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
4441
4488
|
};
|
|
4442
|
-
var __awaiter$
|
|
4489
|
+
var __awaiter$5 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4443
4490
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4444
4491
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4445
4492
|
function fulfilled(value) { try {
|
|
@@ -4466,7 +4513,7 @@
|
|
|
4466
4513
|
this.connectionType = !mainEndpoint ? "polling" : "socket";
|
|
4467
4514
|
}
|
|
4468
4515
|
ProgressesController.prototype.getProgress = function (id) {
|
|
4469
|
-
return __awaiter$
|
|
4516
|
+
return __awaiter$5(this, void 0, void 0, function () {
|
|
4470
4517
|
var progress, json;
|
|
4471
4518
|
return __generator(this, function (_a) {
|
|
4472
4519
|
switch (_a.label) {
|
|
@@ -4511,7 +4558,7 @@
|
|
|
4511
4558
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
4512
4559
|
return Reflect.metadata(k, v);
|
|
4513
4560
|
};
|
|
4514
|
-
var __awaiter$
|
|
4561
|
+
var __awaiter$4 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4515
4562
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4516
4563
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4517
4564
|
function fulfilled(value) { try {
|
|
@@ -4543,7 +4590,7 @@
|
|
|
4543
4590
|
configurable: true
|
|
4544
4591
|
});
|
|
4545
4592
|
ErrorHandlerMiddleware.prototype.error = function (error, req, res, next) {
|
|
4546
|
-
return __awaiter$
|
|
4593
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
4547
4594
|
var result;
|
|
4548
4595
|
return __generator(this, function (_a) {
|
|
4549
4596
|
switch (_a.label) {
|
|
@@ -4560,7 +4607,7 @@
|
|
|
4560
4607
|
});
|
|
4561
4608
|
};
|
|
4562
4609
|
ErrorHandlerMiddleware.prototype.getResult = function (error, req, res) {
|
|
4563
|
-
return __awaiter$
|
|
4610
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
4564
4611
|
var result, _a, _b, _c;
|
|
4565
4612
|
return __generator(this, function (_d) {
|
|
4566
4613
|
switch (_d.label) {
|
|
@@ -4755,7 +4802,7 @@
|
|
|
4755
4802
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
4756
4803
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
4757
4804
|
};
|
|
4758
|
-
var __awaiter$
|
|
4805
|
+
var __awaiter$3 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4759
4806
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4760
4807
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4761
4808
|
function fulfilled(value) { try {
|
|
@@ -4780,7 +4827,7 @@
|
|
|
4780
4827
|
this.socketServer = socketServer;
|
|
4781
4828
|
}
|
|
4782
4829
|
ProgressController.prototype.advanceProgress = function (client, progressId) {
|
|
4783
|
-
return __awaiter$
|
|
4830
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
4784
4831
|
var progress, json;
|
|
4785
4832
|
return __generator(this, function (_a) {
|
|
4786
4833
|
switch (_a.label) {
|
|
@@ -4802,7 +4849,7 @@
|
|
|
4802
4849
|
});
|
|
4803
4850
|
};
|
|
4804
4851
|
ProgressController.prototype.setProgressInterest = function (client, progressId) {
|
|
4805
|
-
return __awaiter$
|
|
4852
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
4806
4853
|
var progress, json;
|
|
4807
4854
|
return __generator(this, function (_a) {
|
|
4808
4855
|
switch (_a.label) {
|
|
@@ -5098,6 +5145,53 @@
|
|
|
5098
5145
|
return DiContainer;
|
|
5099
5146
|
}());
|
|
5100
5147
|
|
|
5148
|
+
var __awaiter$2 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5149
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5150
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5151
|
+
function fulfilled(value) { try {
|
|
5152
|
+
step(generator.next(value));
|
|
5153
|
+
}
|
|
5154
|
+
catch (e) {
|
|
5155
|
+
reject(e);
|
|
5156
|
+
} }
|
|
5157
|
+
function rejected(value) { try {
|
|
5158
|
+
step(generator["throw"](value));
|
|
5159
|
+
}
|
|
5160
|
+
catch (e) {
|
|
5161
|
+
reject(e);
|
|
5162
|
+
} }
|
|
5163
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
5164
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
5165
|
+
});
|
|
5166
|
+
};
|
|
5167
|
+
function setupStatic(rootFolder, container) {
|
|
5168
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
5169
|
+
var browserFolder, app, ep;
|
|
5170
|
+
return __generator(this, function (_a) {
|
|
5171
|
+
switch (_a.label) {
|
|
5172
|
+
case 0:
|
|
5173
|
+
browserFolder = path.resolve(rootFolder || __dirname, "public_html");
|
|
5174
|
+
app = container.get(EXPRESS);
|
|
5175
|
+
ep = container.get(exports.EndpointProvider);
|
|
5176
|
+
console.log(browserFolder, fs.existsSync(browserFolder));
|
|
5177
|
+
if (fs.existsSync(browserFolder)) {
|
|
5178
|
+
console.log("public_html exists. setting up static files serving...");
|
|
5179
|
+
app.use(express_['static'](browserFolder, {
|
|
5180
|
+
maxAge: "1y"
|
|
5181
|
+
}));
|
|
5182
|
+
}
|
|
5183
|
+
else {
|
|
5184
|
+
console.log("public_html does not exist on path: \"" + browserFolder + "\"");
|
|
5185
|
+
}
|
|
5186
|
+
return [4 /*yield*/, ep.configure(app)];
|
|
5187
|
+
case 1:
|
|
5188
|
+
_a.sent();
|
|
5189
|
+
return [2 /*return*/];
|
|
5190
|
+
}
|
|
5191
|
+
});
|
|
5192
|
+
});
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5101
5195
|
var __awaiter$1 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5102
5196
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5103
5197
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -5285,6 +5379,7 @@
|
|
|
5285
5379
|
exports.Cache,
|
|
5286
5380
|
exports.CacheProcessor,
|
|
5287
5381
|
exports.Configuration,
|
|
5382
|
+
exports.EndpointProvider,
|
|
5288
5383
|
exports.Fixtures,
|
|
5289
5384
|
exports.Gallery,
|
|
5290
5385
|
exports.GalleryCache,
|
|
@@ -5481,14 +5576,18 @@
|
|
|
5481
5576
|
socketControllers.useContainer(diContainer);
|
|
5482
5577
|
socketControllers.useSocketServer(bp.io, socketOptions);
|
|
5483
5578
|
}
|
|
5484
|
-
if (!configuration.hasParam("mongoUri")) return [3 /*break*/, 2];
|
|
5485
|
-
|
|
5579
|
+
if (!(configuration.hasParam("mongoUri") && configuration.resolve("mongoUri"))) return [3 /*break*/, 2];
|
|
5580
|
+
console.log("Connecting to MongoDB...");
|
|
5486
5581
|
connector = diContainer.resolve(exports.MongoConnector);
|
|
5487
5582
|
return [4 /*yield*/, connector.connect()];
|
|
5488
5583
|
case 1:
|
|
5489
5584
|
_a.sent();
|
|
5585
|
+
console.log("Successfully connected to MongoDB.");
|
|
5490
5586
|
_a.label = 2;
|
|
5491
|
-
case 2: return [
|
|
5587
|
+
case 2: return [4 /*yield*/, setupStatic(config.rootFolder, diContainer)];
|
|
5588
|
+
case 3:
|
|
5589
|
+
_a.sent();
|
|
5590
|
+
return [2 /*return*/, diContainer];
|
|
5492
5591
|
}
|
|
5493
5592
|
});
|
|
5494
5593
|
});
|