@scefira/dfw 1.5.1 → 1.5.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/cjs/guards/QueryValidatorGuard.d.ts +3 -0
- package/dist/cjs/guards/QueryValidatorGuard.d.ts.map +1 -0
- package/dist/cjs/guards/{QueryValidationGuard.js → QueryValidatorGuard.js} +4 -4
- package/dist/cjs/guards/QueryValidatorGuard.js.map +1 -0
- package/dist/cjs/guards/index.d.ts +1 -1
- package/dist/cjs/guards/index.d.ts.map +1 -1
- package/dist/cjs/guards/index.js +1 -1
- package/dist/cjs/guards/index.js.map +1 -1
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/guards/QueryValidatorGuard.d.ts +3 -0
- package/dist/esm/guards/QueryValidatorGuard.d.ts.map +1 -0
- package/dist/esm/guards/{QueryValidationGuard.js → QueryValidatorGuard.js} +2 -2
- package/dist/esm/guards/QueryValidatorGuard.js.map +1 -0
- package/dist/esm/guards/index.d.ts +1 -1
- package/dist/esm/guards/index.d.ts.map +1 -1
- package/dist/esm/guards/index.js +1 -1
- package/dist/esm/guards/index.js.map +1 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/guards/QueryValidationGuard.d.ts +0 -3
- package/dist/cjs/guards/QueryValidationGuard.d.ts.map +0 -1
- package/dist/cjs/guards/QueryValidationGuard.js.map +0 -1
- package/dist/esm/guards/QueryValidationGuard.d.ts +0 -3
- package/dist/esm/guards/QueryValidationGuard.d.ts.map +0 -1
- package/dist/esm/guards/QueryValidationGuard.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryValidatorGuard.d.ts","sourceRoot":"","sources":["../../../src/guards/QueryValidatorGuard.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAExC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,mHAQnD,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.QueryValidatorGuard = void 0;
|
|
4
4
|
const makeGuard_1 = require("#makers/makeGuard");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const
|
|
6
|
+
const QueryValidatorGuard = (scheme) => (0, makeGuard_1.makeGuard)((_, req) => {
|
|
7
7
|
const result = scheme.safeParse(req.query);
|
|
8
8
|
if (!result.success) {
|
|
9
9
|
throw { type: "QUERY_VALIDATION_FAILED", details: zod_1.z.treeifyError(result.error) };
|
|
10
10
|
}
|
|
11
11
|
Object.assign(req.query, result.data);
|
|
12
12
|
});
|
|
13
|
-
exports.
|
|
14
|
-
//# sourceMappingURL=
|
|
13
|
+
exports.QueryValidatorGuard = QueryValidatorGuard;
|
|
14
|
+
//# sourceMappingURL=QueryValidatorGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryValidatorGuard.js","sourceRoot":"","sources":["../../../src/guards/QueryValidatorGuard.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAC9C,6BAAwC;AAEjC,MAAM,mBAAmB,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,IAAA,qBAAS,EAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAE1C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IACpF,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;AACzC,CAAC,CAAC,CAAA;AARW,QAAA,mBAAmB,uBAQ9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
|
package/dist/cjs/guards/index.js
CHANGED
|
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("#guards/BodyValidatorGuard"), exports);
|
|
18
|
-
__exportStar(require("#guards/
|
|
18
|
+
__exportStar(require("#guards/QueryValidatorGuard"), exports);
|
|
19
19
|
__exportStar(require("#guards/UserAuthGuard"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA0C;AAC1C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA0C;AAC1C,8DAA2C;AAC3C,wDAAqC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -4,4 +4,7 @@ export * from "#listeners/index";
|
|
|
4
4
|
export * from "#makers/index";
|
|
5
5
|
export * from "#guards/index";
|
|
6
6
|
export * from "#modules/index";
|
|
7
|
+
import type { PassportStatic } from "passport";
|
|
8
|
+
export declare const passport: PassportStatic;
|
|
9
|
+
export type { AuthenticateCallback, AuthenticateOptions, Authenticator, InitializeOptions, LogInOptions, LogOutOptions, PassportStatic, Profile, SessionOptions, Strategy, StrategyFailure, } from "passport";
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAG9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,QAAQ,EAAE,cAA+B,CAAC;AAEvD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,OAAO,EACP,cAAc,EACd,QAAQ,EACR,eAAe,GAChB,MAAM,UAAU,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -13,10 +13,16 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.passport = void 0;
|
|
17
21
|
__exportStar(require("#lib/index"), exports);
|
|
18
22
|
__exportStar(require("#listeners/index"), exports);
|
|
19
23
|
__exportStar(require("#makers/index"), exports);
|
|
20
24
|
__exportStar(require("#guards/index"), exports);
|
|
21
25
|
__exportStar(require("#modules/index"), exports);
|
|
26
|
+
const passport_1 = __importDefault(require("passport"));
|
|
27
|
+
exports.passport = passport_1.default;
|
|
22
28
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,6CAA0B;AAC1B,mDAAgC;AAChC,gDAA6B;AAC7B,gDAA6B;AAC7B,iDAA8B;AAE9B,wDAAsC;AAGzB,QAAA,QAAQ,GAAmB,kBAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryValidatorGuard.d.ts","sourceRoot":"","sources":["../../../src/guards/QueryValidatorGuard.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAExC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,SAAS,mHAQnD,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { makeGuard } from "#makers/makeGuard";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export const
|
|
3
|
+
export const QueryValidatorGuard = (scheme) => makeGuard((_, req) => {
|
|
4
4
|
const result = scheme.safeParse(req.query);
|
|
5
5
|
if (!result.success) {
|
|
6
6
|
throw { type: "QUERY_VALIDATION_FAILED", details: z.treeifyError(result.error) };
|
|
7
7
|
}
|
|
8
8
|
Object.assign(req.query, result.data);
|
|
9
9
|
});
|
|
10
|
-
//# sourceMappingURL=
|
|
10
|
+
//# sourceMappingURL=QueryValidatorGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryValidatorGuard.js","sourceRoot":"","sources":["../../../src/guards/QueryValidatorGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAkB,MAAM,KAAK,CAAC;AAExC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAE1C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IACpF,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;AACzC,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
|
package/dist/esm/guards/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -4,4 +4,7 @@ export * from "#listeners/index";
|
|
|
4
4
|
export * from "#makers/index";
|
|
5
5
|
export * from "#guards/index";
|
|
6
6
|
export * from "#modules/index";
|
|
7
|
+
import type { PassportStatic } from "passport";
|
|
8
|
+
export declare const passport: PassportStatic;
|
|
9
|
+
export type { AuthenticateCallback, AuthenticateOptions, Authenticator, InitializeOptions, LogInOptions, LogOutOptions, PassportStatic, Profile, SessionOptions, Strategy, StrategyFailure, } from "passport";
|
|
7
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAG9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,QAAQ,EAAE,cAA+B,CAAC;AAEvD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,OAAO,EACP,cAAc,EACd,QAAQ,EACR,eAAe,GAChB,MAAM,UAAU,CAAC"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAE9B,OAAO,cAAc,MAAM,UAAU,CAAC;AAGtC,MAAM,CAAC,MAAM,QAAQ,GAAmB,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryValidationGuard.d.ts","sourceRoot":"","sources":["../../../src/guards/QueryValidationGuard.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAExC,eAAO,MAAM,oBAAoB,GAAI,QAAQ,SAAS,mHAQpD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryValidationGuard.js","sourceRoot":"","sources":["../../../src/guards/QueryValidationGuard.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAC9C,6BAAwC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,IAAA,qBAAS,EAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAE1C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IACpF,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;AACzC,CAAC,CAAC,CAAA;AARW,QAAA,oBAAoB,wBAQ/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryValidationGuard.d.ts","sourceRoot":"","sources":["../../../src/guards/QueryValidationGuard.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAExC,eAAO,MAAM,oBAAoB,GAAI,QAAQ,SAAS,mHAQpD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryValidationGuard.js","sourceRoot":"","sources":["../../../src/guards/QueryValidationGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAkB,MAAM,KAAK,CAAC;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAE1C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IACpF,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;AACzC,CAAC,CAAC,CAAA"}
|