@grupodiariodaregiao/bunstone 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -22
- package/lib/app-startup.ts +1 -1
- package/lib/http-params.ts +12 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1039,7 +1039,7 @@ var require_Reflect = __commonJS(() => {
|
|
|
1039
1039
|
|
|
1040
1040
|
// node_modules/deepmerge/dist/cjs.js
|
|
1041
1041
|
var require_cjs = __commonJS((exports, module) => {
|
|
1042
|
-
var isMergeableObject = function
|
|
1042
|
+
var isMergeableObject = function isMergeableObject2(value) {
|
|
1043
1043
|
return isNonNullObject(value) && !isSpecial(value);
|
|
1044
1044
|
};
|
|
1045
1045
|
function isNonNullObject(value) {
|
|
@@ -15491,7 +15491,7 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
15491
15491
|
3793,
|
|
15492
15492
|
7920
|
|
15493
15493
|
];
|
|
15494
|
-
var toUTF8Array = function
|
|
15494
|
+
var toUTF8Array = function toUTF8Array2(str) {
|
|
15495
15495
|
var char;
|
|
15496
15496
|
var i = 0;
|
|
15497
15497
|
var p = 0;
|
|
@@ -15518,7 +15518,7 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
15518
15518
|
}
|
|
15519
15519
|
return utf8;
|
|
15520
15520
|
};
|
|
15521
|
-
var generate2 = module.exports = function
|
|
15521
|
+
var generate2 = module.exports = function generate3(str) {
|
|
15522
15522
|
var char;
|
|
15523
15523
|
var i = 0;
|
|
15524
15524
|
var start = -1;
|
|
@@ -18585,10 +18585,10 @@ var require_denque = __commonJS((exports, module) => {
|
|
|
18585
18585
|
i = this._head + i & this._capacityMask;
|
|
18586
18586
|
return this._list[i];
|
|
18587
18587
|
};
|
|
18588
|
-
Denque.prototype.get = function
|
|
18588
|
+
Denque.prototype.get = function get2(i) {
|
|
18589
18589
|
return this.peekAt(i);
|
|
18590
18590
|
};
|
|
18591
|
-
Denque.prototype.peek = function
|
|
18591
|
+
Denque.prototype.peek = function peek2() {
|
|
18592
18592
|
if (this._head === this._tail)
|
|
18593
18593
|
return;
|
|
18594
18594
|
return this._list[this._head];
|
|
@@ -18600,7 +18600,7 @@ var require_denque = __commonJS((exports, module) => {
|
|
|
18600
18600
|
return this.peekAt(-1);
|
|
18601
18601
|
};
|
|
18602
18602
|
Object.defineProperty(Denque.prototype, "length", {
|
|
18603
|
-
get: function
|
|
18603
|
+
get: function length2() {
|
|
18604
18604
|
return this.size();
|
|
18605
18605
|
}
|
|
18606
18606
|
});
|
|
@@ -30661,12 +30661,12 @@ var require_expression = __commonJS((exports, module) => {
|
|
|
30661
30661
|
}
|
|
30662
30662
|
return resultArr.join(" ");
|
|
30663
30663
|
};
|
|
30664
|
-
CronExpression.parse = function
|
|
30664
|
+
CronExpression.parse = function parse2(expression, options) {
|
|
30665
30665
|
var self2 = this;
|
|
30666
30666
|
if (typeof options === "function") {
|
|
30667
30667
|
options = {};
|
|
30668
30668
|
}
|
|
30669
|
-
function
|
|
30669
|
+
function parse3(expression2, options2) {
|
|
30670
30670
|
if (!options2) {
|
|
30671
30671
|
options2 = {};
|
|
30672
30672
|
}
|
|
@@ -30722,7 +30722,7 @@ var require_expression = __commonJS((exports, module) => {
|
|
|
30722
30722
|
return val2;
|
|
30723
30723
|
}
|
|
30724
30724
|
}
|
|
30725
|
-
return
|
|
30725
|
+
return parse3(expression, options);
|
|
30726
30726
|
};
|
|
30727
30727
|
CronExpression.fieldsToExpression = function fieldsToExpression(fields, options) {
|
|
30728
30728
|
function validateConstraints(field2, values2, constraints) {
|
|
@@ -41136,7 +41136,7 @@ function encodeXML(str) {
|
|
|
41136
41136
|
return ret + str.substr(lastIdx);
|
|
41137
41137
|
}
|
|
41138
41138
|
function getEscaper(regex, map2) {
|
|
41139
|
-
return function
|
|
41139
|
+
return function escape2(data) {
|
|
41140
41140
|
let match;
|
|
41141
41141
|
let lastIdx = 0;
|
|
41142
41142
|
let result = "";
|
|
@@ -47088,10 +47088,10 @@ Prism$1.languages.markup = {
|
|
|
47088
47088
|
} },
|
|
47089
47089
|
tokenizePlaceholders: { value: function(d, c2) {
|
|
47090
47090
|
var u, p;
|
|
47091
|
-
d.language === c2 && d.tokenStack && (d.grammar = m.languages[c2], u = 0, p = Object.keys(d.tokenStack), function
|
|
47091
|
+
d.language === c2 && d.tokenStack && (d.grammar = m.languages[c2], u = 0, p = Object.keys(d.tokenStack), function e2(t2) {
|
|
47092
47092
|
for (var n2 = 0;n2 < t2.length && !(u >= p.length); n2++) {
|
|
47093
47093
|
var a, r2, i, o2, s2, l3 = t2[n2];
|
|
47094
|
-
typeof l3 == "string" || l3.content && typeof l3.content == "string" ? (a = p[u], i = d.tokenStack[a], o2 = typeof l3 == "string" ? l3 : l3.content, a = g(c2, a), -1 < (s2 = o2.indexOf(a)) && (++u, r2 = o2.substring(0, s2), i = new m.Token(c2, m.tokenize(i, d.grammar), "language-" + c2, i), o2 = o2.substring(s2 + a.length), s2 = [], r2 && s2.push.apply(s2,
|
|
47094
|
+
typeof l3 == "string" || l3.content && typeof l3.content == "string" ? (a = p[u], i = d.tokenStack[a], o2 = typeof l3 == "string" ? l3 : l3.content, a = g(c2, a), -1 < (s2 = o2.indexOf(a)) && (++u, r2 = o2.substring(0, s2), i = new m.Token(c2, m.tokenize(i, d.grammar), "language-" + c2, i), o2 = o2.substring(s2 + a.length), s2 = [], r2 && s2.push.apply(s2, e2([r2])), s2.push(i), o2 && s2.push.apply(s2, e2([o2])), typeof l3 == "string" ? t2.splice.apply(t2, [n2, 1].concat(s2)) : l3.content = s2)) : l3.content && e2(l3.content);
|
|
47095
47095
|
}
|
|
47096
47096
|
return t2;
|
|
47097
47097
|
}(d.tokens));
|
|
@@ -86561,14 +86561,16 @@ function Body2() {
|
|
|
86561
86561
|
function Param() {
|
|
86562
86562
|
let key;
|
|
86563
86563
|
if (arguments.length === 1) {
|
|
86564
|
-
|
|
86565
|
-
|
|
86564
|
+
const arg = arguments[0];
|
|
86565
|
+
if (isZodSchema(arg)) {
|
|
86566
|
+
const zodSchema = arg;
|
|
86567
|
+
return (target, propertyKey, parameterIndex) => {
|
|
86566
86568
|
setParamMetadata(target, propertyKey, parameterIndex, "param" /* PARAM */, undefined, {
|
|
86567
|
-
zodSchema
|
|
86569
|
+
zodSchema
|
|
86568
86570
|
});
|
|
86569
86571
|
};
|
|
86570
86572
|
}
|
|
86571
|
-
key =
|
|
86573
|
+
key = arg;
|
|
86572
86574
|
}
|
|
86573
86575
|
return (target, propertyKey, parameterIndex) => {
|
|
86574
86576
|
setParamMetadata(target, propertyKey, parameterIndex, "param" /* PARAM */, key);
|
|
@@ -86577,14 +86579,16 @@ function Param() {
|
|
|
86577
86579
|
function Query() {
|
|
86578
86580
|
let key;
|
|
86579
86581
|
if (arguments.length === 1) {
|
|
86580
|
-
|
|
86581
|
-
|
|
86582
|
+
const arg = arguments[0];
|
|
86583
|
+
if (isZodSchema(arg)) {
|
|
86584
|
+
const zodSchema = arg;
|
|
86585
|
+
return (target, propertyKey, parameterIndex) => {
|
|
86582
86586
|
setParamMetadata(target, propertyKey, parameterIndex, "query" /* QUERY */, undefined, {
|
|
86583
|
-
zodSchema
|
|
86587
|
+
zodSchema
|
|
86584
86588
|
});
|
|
86585
86589
|
};
|
|
86586
86590
|
}
|
|
86587
|
-
key =
|
|
86591
|
+
key = arg;
|
|
86588
86592
|
}
|
|
86589
86593
|
return (target, propertyKey, parameterIndex) => {
|
|
86590
86594
|
setParamMetadata(target, propertyKey, parameterIndex, "query" /* QUERY */, key);
|
|
@@ -88204,7 +88208,7 @@ function setExtractor(extractStrings) {
|
|
|
88204
88208
|
readString16 = readString(3);
|
|
88205
88209
|
readString32 = readString(5);
|
|
88206
88210
|
function readString(headerLength) {
|
|
88207
|
-
return function
|
|
88211
|
+
return function readString2(length2) {
|
|
88208
88212
|
let string = strings[stringPosition++];
|
|
88209
88213
|
if (string == null) {
|
|
88210
88214
|
if (bundledStrings)
|
|
@@ -102073,7 +102077,7 @@ class Queue extends QueueGetters {
|
|
|
102073
102077
|
}
|
|
102074
102078
|
// node_modules/bullmq/dist/esm/classes/sandbox.js
|
|
102075
102079
|
var sandbox = (processFile, childPool) => {
|
|
102076
|
-
return async function
|
|
102080
|
+
return async function process3(job, token2) {
|
|
102077
102081
|
let child;
|
|
102078
102082
|
let msgHandler;
|
|
102079
102083
|
let exitHandler;
|
package/lib/app-startup.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { QUERY_HANDLER_METADATA } from "./cqrs/decorators/query-handler.decorato
|
|
|
23
23
|
import { SAGA_METADATA } from "./cqrs/decorators/saga.decorator";
|
|
24
24
|
import { EventBus } from "./cqrs/event-bus";
|
|
25
25
|
import { QueryBus } from "./cqrs/query-bus";
|
|
26
|
-
import {
|
|
26
|
+
import { ConfigurationError } from "./errors";
|
|
27
27
|
import { HttpException } from "./http-exceptions";
|
|
28
28
|
import { HTTP_HEADERS_METADATA } from "./http-methods";
|
|
29
29
|
import { ParamType, processParameters } from "./http-params";
|
package/lib/http-params.ts
CHANGED
|
@@ -67,8 +67,10 @@ export function Param(key?: string): any;
|
|
|
67
67
|
export function Param(): any {
|
|
68
68
|
let key: string | undefined;
|
|
69
69
|
if (arguments.length === 1) {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const arg = arguments[0];
|
|
71
|
+
if (isZodSchema(arg)) {
|
|
72
|
+
const zodSchema = arg as ZodType;
|
|
73
|
+
return (target: any, propertyKey: any, parameterIndex: any) => {
|
|
72
74
|
setParamMetadata(
|
|
73
75
|
target,
|
|
74
76
|
propertyKey as string,
|
|
@@ -76,12 +78,12 @@ export function Param(): any {
|
|
|
76
78
|
ParamType.PARAM,
|
|
77
79
|
undefined,
|
|
78
80
|
{
|
|
79
|
-
zodSchema
|
|
81
|
+
zodSchema,
|
|
80
82
|
},
|
|
81
83
|
);
|
|
82
84
|
};
|
|
83
85
|
}
|
|
84
|
-
key =
|
|
86
|
+
key = arg as string;
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
return (target: any, propertyKey: any, parameterIndex: any) => {
|
|
@@ -100,8 +102,10 @@ export function Query(key?: string): any;
|
|
|
100
102
|
export function Query(): any {
|
|
101
103
|
let key: string | undefined;
|
|
102
104
|
if (arguments.length === 1) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
const arg = arguments[0];
|
|
106
|
+
if (isZodSchema(arg)) {
|
|
107
|
+
const zodSchema = arg as ZodType;
|
|
108
|
+
return (target: any, propertyKey: any, parameterIndex: any) => {
|
|
105
109
|
setParamMetadata(
|
|
106
110
|
target,
|
|
107
111
|
propertyKey as string,
|
|
@@ -109,12 +113,12 @@ export function Query(): any {
|
|
|
109
113
|
ParamType.QUERY,
|
|
110
114
|
undefined,
|
|
111
115
|
{
|
|
112
|
-
zodSchema
|
|
116
|
+
zodSchema,
|
|
113
117
|
},
|
|
114
118
|
);
|
|
115
119
|
};
|
|
116
120
|
}
|
|
117
|
-
key =
|
|
121
|
+
key = arg as string;
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
return (target: any, propertyKey: any, parameterIndex: any) => {
|