@effect-app/infra 0.133.0-next.0 → 0.133.0-next.1
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/CHANGELOG.md +10 -0
- package/_cjs/_global.ext.cjs +16 -1
- package/_cjs/_global.ext.cjs.map +1 -1
- package/_src/_global.ext.ts +15 -0
- package/dist/RequestContext.d.ts +4 -4
- package/dist/_global.ext.d.ts +15 -0
- package/dist/_global.ext.d.ts.map +1 -1
- package/dist/_global.ext.js +13 -1
- package/dist/services/RequestContextContainer.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.133.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bd2130b: cleanup
|
|
8
|
+
- Updated dependencies [bd2130b]
|
|
9
|
+
- @effect-app/infra-adapters@0.85.0-next.1
|
|
10
|
+
- @effect-app/prelude@0.107.0-next.1
|
|
11
|
+
- @effect-app/schema@0.150.0-next.1
|
|
12
|
+
|
|
3
13
|
## 0.133.0-next.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/_cjs/_global.ext.cjs
CHANGED
|
@@ -3,11 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.parseSync = void 0;
|
|
6
|
+
exports.parseSync = exports.defaultNullable = exports.defaultDate = exports.defaultArray = void 0;
|
|
7
7
|
var _schema = require("@effect-app/schema/schema");
|
|
8
|
+
/**
|
|
9
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
10
|
+
*/
|
|
11
|
+
const defaultDate = s => _schema.S.withDefaultConstructor(s, () => new Date());
|
|
12
|
+
/**
|
|
13
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
14
|
+
*/
|
|
15
|
+
exports.defaultDate = defaultDate;
|
|
16
|
+
const defaultNullable = s => _schema.S.withDefaultConstructor(s, () => null);
|
|
17
|
+
/**
|
|
18
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
19
|
+
*/
|
|
20
|
+
exports.defaultNullable = defaultNullable;
|
|
21
|
+
const defaultArray = s => _schema.S.withDefaultConstructor(s, () => []);
|
|
8
22
|
/**
|
|
9
23
|
* @tsplus fluent effect/schema/Schema __call
|
|
10
24
|
*/
|
|
25
|
+
exports.defaultArray = defaultArray;
|
|
11
26
|
const parseSync = (self, u, options) => _schema.S.parseSync(self)(u, options);
|
|
12
27
|
exports.parseSync = parseSync;
|
|
13
28
|
//# sourceMappingURL=_global.ext.cjs.map
|
package/_cjs/_global.ext.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_global.ext.cjs","names":["_schema","require","
|
|
1
|
+
{"version":3,"file":"_global.ext.cjs","names":["_schema","require","defaultDate","s","S","withDefaultConstructor","Date","exports","defaultNullable","defaultArray","parseSync","self","u","options"],"sources":["../_src/_global.ext.ts"],"sourcesContent":[null],"mappings":";;;;;;AAsCA,IAAAA,OAAA,GAAAC,OAAA;AAGA;;;AAGO,MAAMC,WAAW,GAAUC,CAAuB,IAAKC,SAAC,CAACC,sBAAsB,CAACF,CAAC,EAAE,MAAM,IAAIG,IAAI,EAAE,CAAC;AAE3G;;;AAAAC,OAAA,CAAAL,WAAA,GAAAA,WAAA;AAGO,MAAMM,eAAe,GAAcL,CAA4B,IAAKC,SAAC,CAACC,sBAAsB,CAACF,CAAC,EAAE,MAAM,IAAI,CAAC;AAElH;;;AAAAI,OAAA,CAAAC,eAAA,GAAAA,eAAA;AAGO,MAAMC,YAAY,GAAaN,CAAmC,IAAKC,SAAC,CAACC,sBAAsB,CAACF,CAAC,EAAE,MAAM,EAAE,CAAC;AAEnH;;;AAAAI,OAAA,CAAAE,YAAA,GAAAA,YAAA;AAGO,MAAMC,SAAS,GAAGA,CAAOC,IAAoB,EAAEC,CAAI,EAAEC,OAAkC,KAC5FT,SAAC,CAACM,SAAS,CAACC,IAAI,CAAC,CAACC,CAAC,EAAEC,OAAO,CAAC;AAAAN,OAAA,CAAAG,SAAA,GAAAA,SAAA"}
|
package/_src/_global.ext.ts
CHANGED
|
@@ -39,6 +39,21 @@ import {} from "@effect-app/infra/api/reportError"
|
|
|
39
39
|
import { S } from "@effect-app/schema/schema"
|
|
40
40
|
import type { ParseOptions } from "@effect/schema/AST"
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
44
|
+
*/
|
|
45
|
+
export const defaultDate = <From>(s: S.Schema<From, Date>) => S.withDefaultConstructor(s, () => new Date())
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
49
|
+
*/
|
|
50
|
+
export const defaultNullable = <From, To>(s: S.Schema<From, To | null>) => S.withDefaultConstructor(s, () => null)
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
54
|
+
*/
|
|
55
|
+
export const defaultArray = <From, T>(s: S.Schema<From, ReadonlyArray<T>>) => S.withDefaultConstructor(s, () => [])
|
|
56
|
+
|
|
42
57
|
/**
|
|
43
58
|
* @tsplus fluent effect/schema/Schema __call
|
|
44
59
|
*/
|
package/dist/RequestContext.d.ts
CHANGED
|
@@ -16,13 +16,13 @@ declare const RequestContextParent_base: Schema2.Class<{
|
|
|
16
16
|
readonly locale: "en" | "de";
|
|
17
17
|
readonly createdAt: Date;
|
|
18
18
|
readonly userProfile?: {
|
|
19
|
-
readonly sub: string &
|
|
19
|
+
readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
|
|
20
20
|
} | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
readonly name: string & Schema2.NonEmptyString255Brand;
|
|
23
23
|
readonly locale: "en" | "de";
|
|
24
24
|
readonly userProfile?: {
|
|
25
|
-
readonly sub: string &
|
|
25
|
+
readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
|
|
26
26
|
} | undefined;
|
|
27
27
|
readonly id?: string & Schema2.StringIdBrand;
|
|
28
28
|
readonly createdAt?: Date;
|
|
@@ -58,7 +58,7 @@ declare const RequestContext_base: Schema2.Class<{
|
|
|
58
58
|
readonly locale: "en" | "de";
|
|
59
59
|
readonly createdAt: Date;
|
|
60
60
|
readonly userProfile?: {
|
|
61
|
-
readonly sub: string &
|
|
61
|
+
readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
|
|
62
62
|
} | undefined;
|
|
63
63
|
readonly parent?: RequestContextParent | undefined;
|
|
64
64
|
readonly namespace?: (string & Schema2.NonEmptyString255Brand) | undefined;
|
|
@@ -66,7 +66,7 @@ declare const RequestContext_base: Schema2.Class<{
|
|
|
66
66
|
readonly name: string & Schema2.NonEmptyString255Brand;
|
|
67
67
|
readonly locale: "en" | "de";
|
|
68
68
|
readonly userProfile?: {
|
|
69
|
-
readonly sub: string &
|
|
69
|
+
readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
|
|
70
70
|
} | undefined;
|
|
71
71
|
readonly parent?: RequestContextParent | undefined;
|
|
72
72
|
readonly namespace?: (string & Schema2.NonEmptyString255Brand) | undefined;
|
package/dist/_global.ext.d.ts
CHANGED
|
@@ -32,6 +32,21 @@ import type {} from "@effect-app/infra/api/setupRequest";
|
|
|
32
32
|
import {} from "@effect-app/infra/api/reportError";
|
|
33
33
|
import { S } from "@effect-app/schema/schema";
|
|
34
34
|
import type { ParseOptions } from "@effect/schema/AST";
|
|
35
|
+
/**
|
|
36
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
37
|
+
* @tsplus location "@effect-app/infra/_global.ext"
|
|
38
|
+
*/
|
|
39
|
+
export declare const defaultDate: <From>(s: S.Schema<From, Date>) => S.ConstructorPropertyDescriptor<From, Date>;
|
|
40
|
+
/**
|
|
41
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
42
|
+
* @tsplus location "@effect-app/infra/_global.ext"
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultNullable: <From, To>(s: S.Schema<From, To | null>) => S.ConstructorPropertyDescriptor<From, To | null>;
|
|
45
|
+
/**
|
|
46
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
47
|
+
* @tsplus location "@effect-app/infra/_global.ext"
|
|
48
|
+
*/
|
|
49
|
+
export declare const defaultArray: <From, T>(s: S.Schema<From, ReadonlyArray<T>>) => S.ConstructorPropertyDescriptor<From, readonly T[]>;
|
|
35
50
|
/**
|
|
36
51
|
* @tsplus fluent effect/schema/Schema __call
|
|
37
52
|
* @tsplus location "@effect-app/infra/_global.ext"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_global.ext.d.ts","sourceRoot":"","sources":["../_src/_global.ext.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,yCAAyC,CAAA;AAC7D;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,6CAA6C,CAAA;AACjE;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,4CAA4C,CAAA;AAChE;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,8CAA8C,CAAA;AAKlE;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAClD;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,oCAAoC,CAAA;AAExD;;GAEG;AACH,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,2BAA2B,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;;;;;AAKtD,eAAO,MAAM,SAAS,eAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,YAAY,GAAG,SAAS,MAC/D,CAAA"}
|
|
1
|
+
{"version":3,"file":"_global.ext.d.ts","sourceRoot":"","sources":["../_src/_global.ext.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,yCAAyC,CAAA;AAC7D;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,6CAA6C,CAAA;AACjE;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,4CAA4C,CAAA;AAChE;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,8CAA8C,CAAA;AAKlE;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAClD;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAEjD;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,oCAAoC,CAAA;AAExD;;GAEG;AACH,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,2BAA2B,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;;;;;AAKtD,eAAO,MAAM,WAAW,YAAa,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,gDAAkD,CAAA;;;;;AAK3G,eAAO,MAAM,eAAe,gBAAiB,QAAQ,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,qDAA4C,CAAA;;;;;AAKlH,eAAO,MAAM,YAAY,eAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,wDAA0C,CAAA;;;;;AAKnH,eAAO,MAAM,SAAS,eAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,YAAY,GAAG,SAAS,MAC/D,CAAA"}
|
package/dist/_global.ext.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { S } from "@effect-app/schema/schema";
|
|
2
|
+
/**
|
|
3
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
4
|
+
*/
|
|
5
|
+
export const defaultDate = (s) => S.withDefaultConstructor(s, () => new Date());
|
|
6
|
+
/**
|
|
7
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
8
|
+
*/
|
|
9
|
+
export const defaultNullable = (s) => S.withDefaultConstructor(s, () => null);
|
|
10
|
+
/**
|
|
11
|
+
* @tsplus fluent effect/schema/Schema withDefault
|
|
12
|
+
*/
|
|
13
|
+
export const defaultArray = (s) => S.withDefaultConstructor(s, () => []);
|
|
2
14
|
/**
|
|
3
15
|
* @tsplus fluent effect/schema/Schema __call
|
|
4
16
|
*/
|
|
5
17
|
export const parseSync = (self, u, options) => S.parseSync(self)(u, options);
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiX2dsb2JhbC5leHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9fc3JjL19nbG9iYWwuZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNDQSxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sMkJBQTJCLENBQUE7QUFHN0M7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxXQUFXLEdBQUcsQ0FBTyxDQUF1QixFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsc0JBQXNCLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDLElBQUksSUFBSSxFQUFFLENBQUMsQ0FBQTtBQUUzRzs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLGVBQWUsR0FBRyxDQUFXLENBQTRCLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxzQkFBc0IsQ0FBQyxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUE7QUFFbEg7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUcsQ0FBVSxDQUFtQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsc0JBQXNCLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFBO0FBRW5IOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sU0FBUyxHQUFHLENBQU8sSUFBb0IsRUFBRSxDQUFJLEVBQUUsT0FBa0MsRUFBRSxFQUFFLENBQ2hHLENBQUMsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxDQUFBIn0=
|
|
@@ -35,7 +35,7 @@ export declare const RCTag: import("effect/Context").Tag<RequestContext, Request
|
|
|
35
35
|
* @tsplus location "@effect-app/infra/services/RequestContextContainer"
|
|
36
36
|
*/
|
|
37
37
|
export declare const spanAttributes: (ctx: RequestContext) => {
|
|
38
|
-
"request.user.sub"?: string & import("@effect-app/
|
|
38
|
+
"request.user.sub"?: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
|
|
39
39
|
"request.user.roles"?: unknown;
|
|
40
40
|
"request.id": import("@effect-app/schema/moreStrings").StringId;
|
|
41
41
|
"request.name": string & import("@effect-app/schema/strings").NonEmptyString255Brand;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.133.0-next.
|
|
3
|
+
"version": "0.133.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"proper-lockfile": "^4.1.2",
|
|
20
20
|
"pure-rand": "6.0.4",
|
|
21
21
|
"redlock": "^4.2.0",
|
|
22
|
-
"@effect-app/
|
|
23
|
-
"@effect-app/infra-adapters": "0.85.0-next.0",
|
|
22
|
+
"@effect-app/infra-adapters": "0.85.0-next.1",
|
|
24
23
|
"@effect-app/core": "0.97.0-next.0",
|
|
25
|
-
"@effect-app/prelude": "0.107.0-next.
|
|
24
|
+
"@effect-app/prelude": "0.107.0-next.1",
|
|
25
|
+
"@effect-app/schema": "0.150.0-next.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.23.4",
|