@my-devkit/core 1.0.18
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/command.d.ts +5 -0
- package/command.js +26 -0
- package/command.js.map +1 -0
- package/date-helper.d.ts +5 -0
- package/date-helper.js +30 -0
- package/date-helper.js.map +1 -0
- package/decorators/cacheable.decorator.d.ts +1 -0
- package/decorators/cacheable.decorator.js +29 -0
- package/decorators/cacheable.decorator.js.map +1 -0
- package/decorators/index.d.ts +2 -0
- package/decorators/index.js +15 -0
- package/decorators/index.js.map +1 -0
- package/decorators/retryable.decorator.d.ts +2 -0
- package/decorators/retryable.decorator.js +64 -0
- package/decorators/retryable.decorator.js.map +1 -0
- package/document.d.ts +4 -0
- package/document.js +3 -0
- package/document.js.map +1 -0
- package/enum-helper.d.ts +7 -0
- package/enum-helper.js +31 -0
- package/enum-helper.js.map +1 -0
- package/errors/bad-request-error.d.ts +5 -0
- package/errors/bad-request-error.js +30 -0
- package/errors/bad-request-error.js.map +1 -0
- package/errors/domain-error.d.ts +5 -0
- package/errors/domain-error.js +30 -0
- package/errors/domain-error.js.map +1 -0
- package/errors/error-base.d.ts +3 -0
- package/errors/error-base.js +3 -0
- package/errors/error-base.js.map +1 -0
- package/errors/forbidden-error.d.ts +5 -0
- package/errors/forbidden-error.js +30 -0
- package/errors/forbidden-error.js.map +1 -0
- package/errors/index.d.ts +7 -0
- package/errors/index.js +20 -0
- package/errors/index.js.map +1 -0
- package/errors/not-found-error.d.ts +5 -0
- package/errors/not-found-error.js +30 -0
- package/errors/not-found-error.js.map +1 -0
- package/errors/not-implemented-error.d.ts +5 -0
- package/errors/not-implemented-error.js +30 -0
- package/errors/not-implemented-error.js.map +1 -0
- package/errors/unauthorized-error.d.ts +5 -0
- package/errors/unauthorized-error.js +30 -0
- package/errors/unauthorized-error.js.map +1 -0
- package/guid/index.d.ts +1 -0
- package/guid/index.js +6 -0
- package/guid/index.js.map +1 -0
- package/index.d.ts +18 -0
- package/index.js +33 -0
- package/index.js.map +1 -0
- package/logger.d.ts +26 -0
- package/logger.js +74 -0
- package/logger.js.map +1 -0
- package/maintenance-model.d.ts +5 -0
- package/maintenance-model.js +49 -0
- package/maintenance-model.js.map +1 -0
- package/model.d.ts +7 -0
- package/model.js +34 -0
- package/model.js.map +1 -0
- package/my-devkit-core-1.0.18.tgz +0 -0
- package/package.json +47 -0
- package/release-model.d.ts +5 -0
- package/release-model.js +49 -0
- package/release-model.js.map +1 -0
- package/retry.d.ts +16 -0
- package/retry.js +96 -0
- package/retry.js.map +1 -0
- package/serialize/deserialize.d.ts +1 -0
- package/serialize/deserialize.js +14 -0
- package/serialize/deserialize.js.map +1 -0
- package/serialize/index.d.ts +4 -0
- package/serialize/index.js +20 -0
- package/serialize/index.js.map +1 -0
- package/serialize/serializable.d.ts +8 -0
- package/serialize/serializable.js +29 -0
- package/serialize/serializable.js.map +1 -0
- package/serialize/serialize.d.ts +2 -0
- package/serialize/serialize.js +9 -0
- package/serialize/serialize.js.map +1 -0
- package/sleep.d.ts +5 -0
- package/sleep.js +52 -0
- package/sleep.js.map +1 -0
- package/validators/custom-validators/camel-case.d.ts +2 -0
- package/validators/custom-validators/camel-case.js +22 -0
- package/validators/custom-validators/camel-case.js.map +1 -0
- package/validators/custom-validators/equals-to.d.ts +2 -0
- package/validators/custom-validators/equals-to.js +24 -0
- package/validators/custom-validators/equals-to.js.map +1 -0
- package/validators/custom-validators/greater-or-equal-than.d.ts +2 -0
- package/validators/custom-validators/greater-or-equal-than.js +27 -0
- package/validators/custom-validators/greater-or-equal-than.js.map +1 -0
- package/validators/custom-validators/greater-than-date.d.ts +2 -0
- package/validators/custom-validators/greater-than-date.js +32 -0
- package/validators/custom-validators/greater-than-date.js.map +1 -0
- package/validators/custom-validators/index.d.ts +7 -0
- package/validators/custom-validators/index.js +20 -0
- package/validators/custom-validators/index.js.map +1 -0
- package/validators/custom-validators/is-not-in-relative-to.d.ts +2 -0
- package/validators/custom-validators/is-not-in-relative-to.js +29 -0
- package/validators/custom-validators/is-not-in-relative-to.js.map +1 -0
- package/validators/custom-validators/is-optional-if.d.ts +2 -0
- package/validators/custom-validators/is-optional-if.js +24 -0
- package/validators/custom-validators/is-optional-if.js.map +1 -0
- package/validators/custom-validators/pascal-case.d.ts +2 -0
- package/validators/custom-validators/pascal-case.js +22 -0
- package/validators/custom-validators/pascal-case.js.map +1 -0
- package/validators/index.d.ts +3 -0
- package/validators/index.js +89 -0
- package/validators/index.js.map +1 -0
- package/validators/validate.d.ts +2 -0
- package/validators/validate.js +134 -0
- package/validators/validate.js.map +1 -0
- package/validators/validation-error.d.ts +9 -0
- package/validators/validation-error.js +29 -0
- package/validators/validation-error.js.map +1 -0
- package/vendors/index.d.ts +1 -0
- package/vendors/index.js +14 -0
- package/vendors/index.js.map +1 -0
- package/vendors/lodash.d.ts +26 -0
- package/vendors/lodash.js +21 -0
- package/vendors/lodash.js.map +1 -0
package/command.d.ts
ADDED
package/command.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Command = void 0;
|
|
13
|
+
var serialize_1 = require("./serialize");
|
|
14
|
+
var Command = /** @class */ (function () {
|
|
15
|
+
function Command(commandType) {
|
|
16
|
+
this._type = null;
|
|
17
|
+
this._type = commandType;
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
serialize_1.autoserializeAs(String),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Command.prototype, "_type", void 0);
|
|
23
|
+
return Command;
|
|
24
|
+
}());
|
|
25
|
+
exports.Command = Command;
|
|
26
|
+
//# sourceMappingURL=command.js.map
|
package/command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA4D;AAE5D;IAGI,iBAAY,WAAmB;QAFC,UAAK,GAAW,IAAI,CAAC;QAGjD,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;IAC7B,CAAC;IAJwB;QAAxB,2BAAe,CAAC,MAAM,CAAC;;0CAA6B;IAKzD,cAAC;CAAA,AAND,IAMC;AANqB,0BAAO"}
|
package/date-helper.d.ts
ADDED
package/date-helper.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateHelper = void 0;
|
|
4
|
+
var DateHelper = /** @class */ (function () {
|
|
5
|
+
function DateHelper() {
|
|
6
|
+
}
|
|
7
|
+
DateHelper.getUTCTimestamp = function () {
|
|
8
|
+
var now = new Date;
|
|
9
|
+
return Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds(), now.getUTCMilliseconds());
|
|
10
|
+
};
|
|
11
|
+
DateHelper.getElapsedTime = function (startDate) {
|
|
12
|
+
return (new Date()).getTime() - startDate.getTime();
|
|
13
|
+
};
|
|
14
|
+
DateHelper.getReadableElapsedTime = function (startDate) {
|
|
15
|
+
var elapsedTime = this.getElapsedTime(startDate);
|
|
16
|
+
var minutes = Math.floor(elapsedTime / 60000);
|
|
17
|
+
var seconds = Math.floor(elapsedTime / 1000) - 60000 * minutes;
|
|
18
|
+
var miliseconds = elapsedTime - 60000 * minutes - 1000 * seconds;
|
|
19
|
+
if (minutes) {
|
|
20
|
+
return minutes + " min " + seconds + " sec " + miliseconds + " ms";
|
|
21
|
+
}
|
|
22
|
+
else if (seconds) {
|
|
23
|
+
return seconds + " sec " + miliseconds + " ms";
|
|
24
|
+
}
|
|
25
|
+
return miliseconds + " ms";
|
|
26
|
+
};
|
|
27
|
+
return DateHelper;
|
|
28
|
+
}());
|
|
29
|
+
exports.DateHelper = DateHelper;
|
|
30
|
+
//# sourceMappingURL=date-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-helper.js","sourceRoot":"","sources":["../src/date-helper.ts"],"names":[],"mappings":";;;AAAA;IAAA;IAyBA,CAAC;IAxBiB,0BAAe,GAA7B;QACI,IAAM,GAAG,GAAG,IAAI,IAAI,CAAC;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,GAAG,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,UAAU,EAAE,EACrE,GAAG,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,aAAa,EAAE,EAAE,GAAG,CAAC,aAAa,EAAE,EAAE,GAAG,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC/F,CAAC;IAEa,yBAAc,GAA5B,UAA6B,SAAe;QACxC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IACxD,CAAC;IAEa,iCAAsB,GAApC,UAAqC,SAAe;QAChD,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAEnD,IAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC;QAChD,IAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC;QACjE,IAAM,WAAW,GAAG,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC;QAEnE,IAAI,OAAO,EAAE;YACT,OAAU,OAAO,cAAS,OAAO,aAAQ,WAAW,QAAK,CAAC;SAC7D;aAAM,IAAI,OAAO,EAAE;YAChB,OAAU,OAAO,aAAQ,WAAW,QAAK,CAAC;SAC7C;QACD,OAAU,WAAW,QAAK,CAAC;IAC/B,CAAC;IACL,iBAAC;AAAD,CAAC,AAzBD,IAyBC;AAzBY,gCAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Cacheable(): MethodDecorator;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Cacheable = void 0;
|
|
4
|
+
var guid_1 = require("../guid");
|
|
5
|
+
var logger_1 = require("../logger");
|
|
6
|
+
function Cacheable() {
|
|
7
|
+
var _this = this;
|
|
8
|
+
return function (target, propertyKey, descriptor) {
|
|
9
|
+
var originalMethod = descriptor.value;
|
|
10
|
+
var cachePropertyName = "__cache_" + propertyKey.toString() + "_" + guid_1.guid() + "__";
|
|
11
|
+
target[cachePropertyName] = new Map();
|
|
12
|
+
descriptor.value = function () {
|
|
13
|
+
var args = [];
|
|
14
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15
|
+
args[_i] = arguments[_i];
|
|
16
|
+
}
|
|
17
|
+
var cacheKey = JSON.stringify(args);
|
|
18
|
+
if (!target[cachePropertyName].has(cacheKey)) {
|
|
19
|
+
target[cachePropertyName].set(cacheKey, originalMethod.apply(_this, args));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
logger_1.Logger.info("Cacheable: " + target.constructor.name + "." + propertyKey.toString() + " result retrieved from cache", { args: args });
|
|
23
|
+
}
|
|
24
|
+
return target[cachePropertyName].get(cacheKey);
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.Cacheable = Cacheable;
|
|
29
|
+
//# sourceMappingURL=cacheable.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cacheable.decorator.js","sourceRoot":"","sources":["../../src/decorators/cacheable.decorator.ts"],"names":[],"mappings":";;;AAAA,gCAA+B;AAC/B,oCAAmC;AAEnC,SAAgB,SAAS;IAAzB,iBAgBC;IAfG,OAAO,UAAC,MAAM,EAAE,WAAW,EAAE,UAAU;QACnC,IAAM,cAAc,GAAQ,UAAU,CAAC,KAAK,CAAC;QAC7C,IAAM,iBAAiB,GAAG,aAAW,WAAW,CAAC,QAAQ,EAAE,SAAI,WAAI,EAAE,OAAI,CAAC;QAC1E,MAAM,CAAC,iBAAiB,CAAC,GAAG,IAAI,GAAG,EAAe,CAAC;QAElD,UAAkB,CAAC,KAAK,GAAG;YAAC,cAAO;iBAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;gBAAP,yBAAO;;YAChC,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;gBAC1C,MAAM,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,KAAI,EAAE,IAAI,CAAC,CAAC,CAAC;aAC7E;iBAAM;gBACH,eAAM,CAAC,IAAI,CAAC,gBAAc,MAAM,CAAC,WAAW,CAAC,IAAI,SAAI,WAAW,CAAC,QAAQ,EAAE,iCAA8B,EAAE,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC;aACxH;YACD,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAhBD,8BAgBC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./cacheable.decorator"), exports);
|
|
14
|
+
__exportStar(require("./retryable.decorator"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Retryable = void 0;
|
|
40
|
+
var retry_1 = require("../retry");
|
|
41
|
+
function Retryable(options) {
|
|
42
|
+
return function (_target, _propertyKey, descriptor) {
|
|
43
|
+
var originalMethod = descriptor.value;
|
|
44
|
+
descriptor.value = function () {
|
|
45
|
+
var args = [];
|
|
46
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
47
|
+
args[_i] = arguments[_i];
|
|
48
|
+
}
|
|
49
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
+
var _this = this;
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
return [2 /*return*/, retry_1.retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
53
|
+
switch (_a.label) {
|
|
54
|
+
case 0: return [4 /*yield*/, originalMethod.apply(this, args)];
|
|
55
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
56
|
+
}
|
|
57
|
+
}); }); }, options)];
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
exports.Retryable = Retryable;
|
|
64
|
+
//# sourceMappingURL=retryable.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retryable.decorator.js","sourceRoot":"","sources":["../../src/decorators/retryable.decorator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAiC;AAEjC,SAAgB,SAAS,CAAC,OAAuB;IAC7C,OAAO,UAAC,OAAO,EAAE,YAAY,EAAE,UAAU;QACrC,IAAM,cAAc,GAAQ,UAAU,CAAC,KAAK,CAAC;QAE5C,UAAkB,CAAC,KAAK,GAAG;YAAgB,cAAO;iBAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;gBAAP,yBAAO;;;;;oBAC/C,sBAAO,aAAK,CAAC;;wCAAY,qBAAM,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAA;wCAAtC,sBAAA,SAAsC,EAAA;;iCAAA,EAAE,OAAO,CAAC,EAAC;;;SAC7E,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AARD,8BAQC"}
|
package/document.d.ts
ADDED
package/document.js
ADDED
package/document.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../src/document.ts"],"names":[],"mappings":""}
|
package/enum-helper.d.ts
ADDED
package/enum-helper.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
4
|
+
to[j] = from[i];
|
|
5
|
+
return to;
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.EnumHelper = void 0;
|
|
9
|
+
var EnumHelper = /** @class */ (function () {
|
|
10
|
+
function EnumHelper(_name, _members) {
|
|
11
|
+
this._name = _name;
|
|
12
|
+
this._members = _members;
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(EnumHelper.prototype, "name", {
|
|
15
|
+
get: function () {
|
|
16
|
+
return this._name;
|
|
17
|
+
},
|
|
18
|
+
enumerable: false,
|
|
19
|
+
configurable: true
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(EnumHelper.prototype, "members", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return __spreadArray([], this._members);
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
return EnumHelper;
|
|
29
|
+
}());
|
|
30
|
+
exports.EnumHelper = EnumHelper;
|
|
31
|
+
//# sourceMappingURL=enum-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum-helper.js","sourceRoot":"","sources":["../src/enum-helper.ts"],"names":[],"mappings":";;;;;;;;AAAA;IACI,oBAAoB,KAAa,EAAU,QAAa;QAApC,UAAK,GAAL,KAAK,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAK;IACxD,CAAC;IAED,sBAAW,4BAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAW,+BAAO;aAAlB;YACI,yBAAW,IAAI,CAAC,QAAQ,EAAE;QAC9B,CAAC;;;OAAA;IACL,iBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,gCAAU"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BadRequestError = void 0;
|
|
19
|
+
var BadRequestError = /** @class */ (function (_super) {
|
|
20
|
+
__extends(BadRequestError, _super);
|
|
21
|
+
function BadRequestError(message) {
|
|
22
|
+
var _this = _super.call(this, message) || this;
|
|
23
|
+
_this.message = message;
|
|
24
|
+
_this.name = 'BadRequestError';
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return BadRequestError;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.BadRequestError = BadRequestError;
|
|
30
|
+
//# sourceMappingURL=bad-request-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-request-error.js","sourceRoot":"","sources":["../../src/errors/bad-request-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAqC,mCAAK;IACtC,yBAAmB,OAAe;QAAlC,YACI,kBAAM,OAAO,CAAC,SAEjB;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAE9B,KAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;;IAClC,CAAC;IACL,sBAAC;AAAD,CAAC,AALD,CAAqC,KAAK,GAKzC;AALY,0CAAe"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DomainError = void 0;
|
|
19
|
+
var DomainError = /** @class */ (function (_super) {
|
|
20
|
+
__extends(DomainError, _super);
|
|
21
|
+
function DomainError(message) {
|
|
22
|
+
var _this = _super.call(this, message) || this;
|
|
23
|
+
_this.message = message;
|
|
24
|
+
_this.name = 'DomainError';
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return DomainError;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.DomainError = DomainError;
|
|
30
|
+
//# sourceMappingURL=domain-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-error.js","sourceRoot":"","sources":["../../src/errors/domain-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAiC,+BAAK;IAClC,qBAAmB,OAAe;QAAlC,YACI,kBAAM,OAAO,CAAC,SAEjB;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAE9B,KAAI,CAAC,IAAI,GAAG,aAAa,CAAC;;IAC9B,CAAC;IACL,kBAAC;AAAD,CAAC,AALD,CAAiC,KAAK,GAKrC;AALY,kCAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-base.js","sourceRoot":"","sources":["../../src/errors/error-base.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ForbiddenError = void 0;
|
|
19
|
+
var ForbiddenError = /** @class */ (function (_super) {
|
|
20
|
+
__extends(ForbiddenError, _super);
|
|
21
|
+
function ForbiddenError(message) {
|
|
22
|
+
var _this = _super.call(this, message) || this;
|
|
23
|
+
_this.message = message;
|
|
24
|
+
_this.name = 'ForbiddenError';
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return ForbiddenError;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.ForbiddenError = ForbiddenError;
|
|
30
|
+
//# sourceMappingURL=forbidden-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden-error.js","sourceRoot":"","sources":["../../src/errors/forbidden-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAoC,kCAAK;IACrC,wBAAmB,OAAe;QAAlC,YACI,kBAAM,OAAO,CAAC,SAEjB;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAE9B,KAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;;IACjC,CAAC;IACL,qBAAC;AAAD,CAAC,AALD,CAAoC,KAAK,GAKxC;AALY,wCAAc"}
|
package/errors/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./error-base"), exports);
|
|
14
|
+
__exportStar(require("./bad-request-error"), exports);
|
|
15
|
+
__exportStar(require("./forbidden-error"), exports);
|
|
16
|
+
__exportStar(require("./not-found-error"), exports);
|
|
17
|
+
__exportStar(require("./not-implemented-error"), exports);
|
|
18
|
+
__exportStar(require("./unauthorized-error"), exports);
|
|
19
|
+
__exportStar(require("./domain-error"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B;AAE7B,sDAAoC;AACpC,oDAAkC;AAClC,oDAAkC;AAClC,0DAAwC;AACxC,uDAAqC;AACrC,iDAA+B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.NotFoundError = void 0;
|
|
19
|
+
var NotFoundError = /** @class */ (function (_super) {
|
|
20
|
+
__extends(NotFoundError, _super);
|
|
21
|
+
function NotFoundError(message) {
|
|
22
|
+
var _this = _super.call(this, message) || this;
|
|
23
|
+
_this.message = message;
|
|
24
|
+
_this.name = 'NotFoundError';
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return NotFoundError;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.NotFoundError = NotFoundError;
|
|
30
|
+
//# sourceMappingURL=not-found-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-found-error.js","sourceRoot":"","sources":["../../src/errors/not-found-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAmC,iCAAK;IACpC,uBAAmB,OAAe;QAAlC,YACI,kBAAM,OAAO,CAAC,SAEjB;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAE9B,KAAI,CAAC,IAAI,GAAG,eAAe,CAAC;;IAChC,CAAC;IACL,oBAAC;AAAD,CAAC,AALD,CAAmC,KAAK,GAKvC;AALY,sCAAa"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.NotImplementedError = void 0;
|
|
19
|
+
var NotImplementedError = /** @class */ (function (_super) {
|
|
20
|
+
__extends(NotImplementedError, _super);
|
|
21
|
+
function NotImplementedError(message) {
|
|
22
|
+
var _this = _super.call(this, message) || this;
|
|
23
|
+
_this.message = message;
|
|
24
|
+
_this.name = 'NotImplementedError';
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return NotImplementedError;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.NotImplementedError = NotImplementedError;
|
|
30
|
+
//# sourceMappingURL=not-implemented-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-implemented-error.js","sourceRoot":"","sources":["../../src/errors/not-implemented-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAyC,uCAAK;IAC1C,6BAAmB,OAAe;QAAlC,YACI,kBAAM,OAAO,CAAC,SAEjB;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAE9B,KAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;;IACtC,CAAC;IACL,0BAAC;AAAD,CAAC,AALD,CAAyC,KAAK,GAK7C;AALY,kDAAmB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UnauthorizedError = void 0;
|
|
19
|
+
var UnauthorizedError = /** @class */ (function (_super) {
|
|
20
|
+
__extends(UnauthorizedError, _super);
|
|
21
|
+
function UnauthorizedError(message) {
|
|
22
|
+
var _this = _super.call(this, message) || this;
|
|
23
|
+
_this.message = message;
|
|
24
|
+
_this.name = 'UnauthorizedError';
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
return UnauthorizedError;
|
|
28
|
+
}(Error));
|
|
29
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
30
|
+
//# sourceMappingURL=unauthorized-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unauthorized-error.js","sourceRoot":"","sources":["../../src/errors/unauthorized-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAuC,qCAAK;IACxC,2BAAmB,OAAe;QAAlC,YACI,kBAAM,OAAO,CAAC,SAEjB;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAE9B,KAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;;IACpC,CAAC;IACL,wBAAC;AAAD,CAAC,AALD,CAAuC,KAAK,GAK3C;AALY,8CAAiB"}
|
package/guid/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const guid: any;
|
package/guid/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/guid/index.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEb,QAAA,IAAI,GAAG,SAAE,CAAC"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as validators from './validators';
|
|
2
|
+
export * from './decorators';
|
|
3
|
+
export * from './document';
|
|
4
|
+
export * from './command';
|
|
5
|
+
export * from './date-helper';
|
|
6
|
+
export * from './enum-helper';
|
|
7
|
+
export * from './errors';
|
|
8
|
+
export * from './guid';
|
|
9
|
+
export * from './logger';
|
|
10
|
+
export * from './model';
|
|
11
|
+
export * from './maintenance-model';
|
|
12
|
+
export * from './release-model';
|
|
13
|
+
export * from './serialize';
|
|
14
|
+
export * from './retry';
|
|
15
|
+
export * from './sleep';
|
|
16
|
+
export * from './vendors';
|
|
17
|
+
export declare const Validators: typeof validators;
|
|
18
|
+
export { ValidationError } from './validators/validation-error';
|