@effect-app/infra 0.133.0-next.26 → 0.133.0-next.28

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @effect-app/infra
2
2
 
3
+ ## 0.133.0-next.28
4
+
5
+ ### Patch Changes
6
+
7
+ - 777162f: improve
8
+ - Updated dependencies [777162f]
9
+ - @effect-app/prelude@0.107.0-next.26
10
+ - @effect-app/schema@0.150.0-next.20
11
+ - @effect-app/infra-adapters@0.85.0-next.26
12
+
13
+ ## 0.133.0-next.27
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [0776693]
18
+ - @effect-app/prelude@0.107.0-next.25
19
+ - @effect-app/infra-adapters@0.85.0-next.25
20
+
3
21
  ## 0.133.0-next.26
4
22
 
5
23
  ### Patch Changes
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.RequestContextParent = exports.RequestContext = void 0;
7
7
  var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/schema"));
8
8
  var tsplus_module_2 = _interopRequireWildcard(require("@effect/schema/Schema"));
9
+ var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/prelude/utils"));
9
10
  var _prelude = require("@effect-app/prelude");
10
11
  var _ids = require("@effect-app/prelude/ids");
11
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -18,17 +19,14 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
18
19
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
20
  };
20
21
  var RequestContext_1;
21
- const fields = {
22
+ let RequestContextParent = exports.RequestContextParent = class RequestContextParent extends tsplus_module_1.TaggedClass()("RequestContext", {
23
+ id: _ids.RequestId,
22
24
  name: tsplus_module_1.NonEmptyString255,
23
25
  userProfile: tsplus_module_2.optional(tsplus_module_1.struct({
24
26
  sub: _ids.UserProfileId
25
27
  })),
26
28
  locale: tsplus_module_1.literal("en", "de"),
27
29
  createdAt: tsplus_module_2.withDefaultConstructor(_prelude.S.Date, () => new Date()) // TODO
28
- };
29
- let RequestContextParent = exports.RequestContextParent = class RequestContextParent extends tsplus_module_1.TaggedClass()("RequestContext", {
30
- id: _ids.RequestId,
31
- ...fields
32
30
  }) {};
33
31
  exports.RequestContextParent = RequestContextParent = __decorate([tsplus_module_1.useClassFeaturesForSchema], RequestContextParent);
34
32
  /**
@@ -36,11 +34,11 @@ exports.RequestContextParent = RequestContextParent = __decorate([tsplus_module_
36
34
  * @tsplus companion RequestContext.Ops
37
35
  */
38
36
  let RequestContext = exports.RequestContext = RequestContext_1 = class RequestContext extends _prelude.S.TaggedClass()("RequestContext", {
37
+ ...tsplus_module_3.RecordOmitold(tsplus_module_3.object$(RequestContextParent.fields), "id"),
39
38
  id: _ids.RequestId.withDefault(),
40
39
  rootId: _ids.RequestId,
41
40
  parent: tsplus_module_2.optional(RequestContextParent),
42
- namespace: tsplus_module_2.optional(tsplus_module_1.NonEmptyString255),
43
- ...fields
41
+ namespace: tsplus_module_2.optional(tsplus_module_1.NonEmptyString255)
44
42
  // ...RequestContextParent.omit("id").extend({
45
43
  // id: RequestId.withDefault(),
46
44
  // rootId: RequestId,
@@ -1 +1 @@
1
- {"version":3,"file":"RequestContext.cjs","names":["_prelude","require","_ids","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","fields","name","tsplus_module_1","NonEmptyString255","userProfile","tsplus_module_2","optional","struct","sub","UserProfileId","locale","literal","createdAt","withDefaultConstructor","S","Date","RequestContextParent","exports","TaggedClass","id","RequestId","__decorate","useClassFeaturesForSchema","RequestContext","RequestContext_1","withDefault","rootId","parent","namespace","inherit","newSelf","toMonitoring","self","operationName","parentOperationName","parentLocale","From","F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AACD,MAAM;MACrBC;KACD,CAAC;EACJ;EAEA,OAAOI,YAAYA,CAAaC,IAAoB;IAClD,OAAO;MACLC,aAAa,EAAED,IAAI,CAAC/B,IAAI;MACxBS,MAAM,EAAEsB,IAAI,CAACtB,MAAM;MACnB,IAAIsB,IAAI,CAACL,MAAM,GACX;QAAEO,mBAAmB,EAAEF,IAAI,CAACL,MAAM,CAAC1B,IAAI;QAAEkC,YAAY,EAAEH,IAAI,CAACL,MAAM,CAACjB;MAAM,CAAE,GAC3E,EAAE;KACP;EACH;CACD;AArCYO,OAAA,CAAAM,cAAA,GAAAA,cAAc,GAAAC,gBAAA,GAAAH,UAAA,E,gBAD1BC,yBAAyB,C,EACbC,cAAc,CAqC1B;AAED;AACA;AACA;AACA,WAAiBP,oBAAoB;EACnC;;;;EAIA,MAAaoB,IAAK,SAAQlC,eAAA,CAAAmC,SAAS,EAA+B;EAArDrB,oBAAA,CAAAoB,IAAI,GAAAA,IAAoD;AACvE,CAAC,EANgBpB,oBAAoB,KAAAC,OAAA,CAAAD,oBAAA,GAApBA,oBAAoB;AAOrC,WAAiBO,cAAc;EAC7B;;;;EAIA,MAAaa,IAAK,SAAQlC,eAAA,CAAAmC,SAAS,EAAyB;EAA/Cd,cAAA,CAAAa,IAAI,GAAAA,IAA8C;AACjE,CAAC,EANgBb,cAAc,KAAAN,OAAA,CAAAM,cAAA,GAAdA,cAAc"}
1
+ {"version":3,"file":"RequestContext.cjs","names":["_prelude","require","_ids","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","RequestContextParent","exports","tsplus_module_1","TaggedClass","id","RequestId","name","NonEmptyString255","userProfile","tsplus_module_2","optional","struct","sub","UserProfileId","locale","literal","createdAt","withDefaultConstructor","S","Date","__decorate","useClassFeaturesForSchema","RequestContext","RequestContext_1","tsplus_module_3","RecordOmitold","object$","fields","withDefault","rootId","parent","namespace","inherit","newSelf","toMonitoring","self","operationName","parentOperationName","parentLocale","From","FromClass"],"sources":["../_src/RequestContext.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAAkE,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAe,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CAAA,CAAAM,CAAA,IAAAf,CAAA,CAAAe,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAN,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAiB,G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,OAAO,IAAIV,gBAAc,CAAC;MACxBQ,SAAS,EAAED,MAAM,EAAEC,SAAS;MAC5B,GAAGE,OAAO;MACVJ,MAAM,EAAEC,MAAM,CAACD,MAAM;MACrBC;KACD,CAAC;EACJ;EAEA,OAAOI,YAAYA,CAAaC,IAAoB;IAClD,OAAO;MACLC,aAAa,EAAED,IAAI,CAAC7B,IAAI;MACxBQ,MAAM,EAAEqB,IAAI,CAACrB,MAAM;MACnB,IAAIqB,IAAI,CAACL,MAAM,GACX;QAAEO,mBAAmB,EAAEF,IAAI,CAACL,MAAM,CAACxB,IAAI;QAAEgC,YAAY,EAAEH,IAAI,CAACL,MAAM,CAAChB;MAAM,CAAE,GAC3E,EAAE;KACP;EACH;CACD;AArCYb,OAAA,CAAAqB,cAAA,GAAAA,cAAc,GAAAC,gBAAA,GAAAH,UAAA,E,gBAD1BC,yBAAyB,C,EACbC,cAAc,CAqC1B;AAED;AACA;AACA;AACA,WAAiBtB,oBAAoB;EACnC;;;;EAIA,MAAauC,IAAK,SAAQrC,eAAA,CAAAsC,SAAS,EAA+B;EAArDxC,oBAAA,CAAAuC,IAAI,GAAAA,IAAoD;AACvE,CAAC,EANgBvC,oBAAoB,KAAAC,OAAA,CAAAD,oBAAA,GAApBA,oBAAoB;AAOrC,WAAiBsB,cAAc;EAC7B;;;;EAIA,MAAaiB,IAAK,SAAQrC,eAAA,CAAAsC,SAAS,EAAyB;EAA/ClB,cAAA,CAAAiB,IAAI,GAAAA,IAA8C;AACjE,CAAC,EANgBjB,cAAc,KAAArB,OAAA,CAAAqB,cAAA,GAAdA,cAAc"}
@@ -1,19 +1,15 @@
1
1
  import { S } from "@effect-app/prelude"
2
2
  import { RequestId, UserProfileId } from "@effect-app/prelude/ids"
3
3
 
4
- const fields = {
5
- name: NonEmptyString255,
6
- userProfile: struct({ sub: UserProfileId }).optional(),
7
- locale: literal("en", "de"),
8
- createdAt: S.Date.withDefaultMake(() => new Date()) // TODO
9
- } as const
10
-
11
4
  @useClassFeaturesForSchema
12
5
  export class RequestContextParent extends TaggedClass<
13
6
  RequestContextParent
14
7
  >()("RequestContext", {
15
8
  id: RequestId,
16
- ...fields
9
+ name: NonEmptyString255,
10
+ userProfile: struct({ sub: UserProfileId }).optional(),
11
+ locale: literal("en", "de"),
12
+ createdAt: S.Date.withDefaultMake(() => new Date()) // TODO
17
13
  }) {}
18
14
 
19
15
  /**
@@ -24,11 +20,11 @@ export class RequestContextParent extends TaggedClass<
24
20
  export class RequestContext extends S.TaggedClass<
25
21
  RequestContext
26
22
  >()("RequestContext", {
23
+ ...RequestContextParent.fields.$$.omit("id"),
27
24
  id: RequestId.withDefault(),
28
25
  rootId: RequestId,
29
26
  parent: RequestContextParent.optional(),
30
- namespace: NonEmptyString255.optional(),
31
- ...fields
27
+ namespace: NonEmptyString255.optional()
32
28
  // ...RequestContextParent.omit("id").extend({
33
29
  // id: RequestId.withDefault(),
34
30
  // rootId: RequestId,
@@ -1,4 +1,4 @@
1
- import { useClassFeaturesForSchema, TaggedClass, NonEmptyString255, FromClass } from "@effect-app/schema";
1
+ import { useClassFeaturesForSchema, TaggedClass, NonEmptyString255, struct, literal, FromClass } from "@effect-app/schema";
2
2
  import { S } from "@effect-app/prelude";
3
3
  declare const RequestContextParent_base: S.Class<{
4
4
  readonly _tag: "RequestContext";
@@ -11,7 +11,7 @@ declare const RequestContextParent_base: S.Class<{
11
11
  } | undefined;
12
12
  }, {
13
13
  readonly _tag: "RequestContext";
14
- readonly id: string & S.StringIdBrand;
14
+ readonly id: string & S.NonEmptyString255Brand;
15
15
  readonly name: string & S.NonEmptyString255Brand;
16
16
  readonly locale: "en" | "de";
17
17
  readonly createdAt: Date;
@@ -24,34 +24,33 @@ declare const RequestContextParent_base: S.Class<{
24
24
  readonly userProfile?: {
25
25
  readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
26
26
  } | undefined;
27
- readonly id?: string & S.StringIdBrand;
27
+ readonly id?: string & S.NonEmptyString255Brand;
28
28
  readonly createdAt?: Date;
29
29
  }, RequestContextParent, {
30
+ id: S.WithDefaults<S.Schema<string, string & S.NonEmptyString255Brand>> & S.Schema<string, string & S.NonEmptyString255Brand> & {
31
+ make: () => S.StringId;
32
+ withDefault: () => S.Schema<string, S.NonEmptyString255> & S.ConstructorPropertyDescriptor<string, S.NonEmptyString255>;
33
+ };
30
34
  name: S.WithDefaults<S.Schema<string, string & S.NonEmptyString255Brand>> & S.Schema<string, string & S.NonEmptyString255Brand>;
31
35
  userProfile: S.PropertySignature<{
32
36
  readonly sub: string;
33
37
  } | undefined, true, {
34
38
  readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
35
39
  } | undefined, true>;
36
- locale: S.Schema<"en" | "de", "en" | "de">;
37
- createdAt: S.Schema<string, Date> & S.ConstructorPropertyDescriptor<string, Date>;
38
- id: S.WithDefaults<S.Schema<string, string & S.StringIdBrand> & {
39
- make: () => S.StringId;
40
- withDefault: () => S.Schema<string, string & S.StringIdBrand> & S.ConstructorPropertyDescriptor<string, string & S.StringIdBrand>;
41
- }> & S.Schema<string, string & S.StringIdBrand> & {
42
- make: () => S.StringId;
43
- withDefault: () => S.Schema<string, string & S.StringIdBrand> & S.ConstructorPropertyDescriptor<string, string & S.StringIdBrand>;
40
+ locale: S.Schema<"en" | "de", "en" | "de"> & {
41
+ literals: ["en", "de"];
44
42
  };
43
+ createdAt: S.Schema<string, Date> & S.ConstructorPropertyDescriptor<string, Date>;
45
44
  }, import("effect/Data").Case>;
46
45
  export declare class RequestContextParent extends RequestContextParent_base {
47
46
  }
48
47
  declare const RequestContext_base: S.Class<{
49
48
  readonly _tag: "RequestContext";
50
49
  readonly id: string;
51
- readonly rootId: string;
52
50
  readonly name: string;
53
51
  readonly locale: "en" | "de";
54
52
  readonly createdAt: string;
53
+ readonly rootId: string;
55
54
  readonly userProfile?: {
56
55
  readonly sub: string;
57
56
  } | undefined;
@@ -68,11 +67,11 @@ declare const RequestContext_base: S.Class<{
68
67
  readonly namespace?: string | undefined;
69
68
  }, {
70
69
  readonly _tag: "RequestContext";
71
- readonly id: string & S.StringIdBrand;
72
- readonly rootId: string & S.StringIdBrand;
70
+ readonly id: S.NonEmptyString255;
73
71
  readonly name: string & S.NonEmptyString255Brand;
74
72
  readonly locale: "en" | "de";
75
73
  readonly createdAt: Date;
74
+ readonly rootId: string & S.NonEmptyString255Brand;
76
75
  readonly userProfile?: {
77
76
  readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
78
77
  } | undefined;
@@ -86,25 +85,14 @@ declare const RequestContext_base: S.Class<{
86
85
  } | undefined;
87
86
  readonly parent?: RequestContextParent | undefined;
88
87
  readonly namespace?: (string & S.NonEmptyString255Brand) | undefined;
89
- readonly id?: string & S.StringIdBrand;
90
- readonly rootId?: string & S.StringIdBrand;
88
+ readonly id?: S.NonEmptyString255;
91
89
  readonly createdAt?: Date;
90
+ readonly rootId?: string & S.NonEmptyString255Brand;
92
91
  }, RequestContext, {
93
- name: S.WithDefaults<S.Schema<string, string & S.NonEmptyString255Brand>> & S.Schema<string, string & S.NonEmptyString255Brand>;
94
- userProfile: S.PropertySignature<{
95
- readonly sub: string;
96
- } | undefined, true, {
97
- readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
98
- } | undefined, true>;
99
- locale: S.Schema<"en" | "de", "en" | "de">;
100
- createdAt: S.Schema<string, Date> & S.ConstructorPropertyDescriptor<string, Date>;
101
- id: S.Schema<string, string & S.StringIdBrand> & S.ConstructorPropertyDescriptor<string, string & S.StringIdBrand>;
102
- rootId: S.WithDefaults<S.Schema<string, string & S.StringIdBrand> & {
92
+ id: S.Schema<string, S.NonEmptyString255> & S.ConstructorPropertyDescriptor<string, S.NonEmptyString255>;
93
+ rootId: S.WithDefaults<S.Schema<string, string & S.NonEmptyString255Brand>> & S.Schema<string, string & S.NonEmptyString255Brand> & {
103
94
  make: () => S.StringId;
104
- withDefault: () => S.Schema<string, string & S.StringIdBrand> & S.ConstructorPropertyDescriptor<string, string & S.StringIdBrand>;
105
- }> & S.Schema<string, string & S.StringIdBrand> & {
106
- make: () => S.StringId;
107
- withDefault: () => S.Schema<string, string & S.StringIdBrand> & S.ConstructorPropertyDescriptor<string, string & S.StringIdBrand>;
95
+ withDefault: () => S.Schema<string, S.NonEmptyString255> & S.ConstructorPropertyDescriptor<string, S.NonEmptyString255>;
108
96
  };
109
97
  parent: S.PropertySignature<{
110
98
  readonly _tag: "RequestContext";
@@ -117,6 +105,16 @@ declare const RequestContext_base: S.Class<{
117
105
  } | undefined;
118
106
  } | undefined, true, RequestContextParent | undefined, true>;
119
107
  namespace: S.PropertySignature<string | undefined, true, (string & S.NonEmptyString255Brand) | undefined, true>;
108
+ name: S.WithDefaults<S.Schema<string, string & S.NonEmptyString255Brand>> & S.Schema<string, string & S.NonEmptyString255Brand>;
109
+ userProfile: S.PropertySignature<{
110
+ readonly sub: string;
111
+ } | undefined, true, {
112
+ readonly sub: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
113
+ } | undefined, true>;
114
+ locale: S.Schema<"en" | "de", "en" | "de"> & {
115
+ literals: ["en", "de"];
116
+ };
117
+ createdAt: S.Schema<string, Date> & S.ConstructorPropertyDescriptor<string, Date>;
120
118
  }, import("effect/Data").Case>;
121
119
  /**
122
120
  * @tsplus type RequestContext
@@ -154,10 +152,10 @@ export declare namespace RequestContext {
154
152
  const From_base_1: S.FromClass<{
155
153
  readonly _tag: "RequestContext";
156
154
  readonly id: string;
157
- readonly rootId: string;
158
155
  readonly name: string;
159
156
  readonly locale: "en" | "de";
160
157
  readonly createdAt: string;
158
+ readonly rootId: string;
161
159
  readonly userProfile?: {
162
160
  readonly sub: string;
163
161
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU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;;;;;;;;;;;IACpC;;;OAGG;IACH,MAAM,OAAO,IAAK,SAAQ,SAAwC;KAAG;;CACtE;AACD,yBAAiB,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;IAC9B;;;OAGG;IACH,MAAM,OAAO,IAAK,SAAQ,WAAkC;KAAG;;CAChE"}
@@ -7,17 +7,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var RequestContext_1;
8
8
  import * as tsplus_module_1 from "@effect-app/schema";
9
9
  import * as tsplus_module_2 from "@effect/schema/Schema";
10
+ import * as tsplus_module_3 from "@effect-app/prelude/utils";
10
11
  import { S } from "@effect-app/prelude";
11
12
  import { RequestId, UserProfileId } from "@effect-app/prelude/ids";
12
- const fields = {
13
+ let RequestContextParent = class RequestContextParent extends tsplus_module_1.TaggedClass()("RequestContext", {
14
+ id: RequestId,
13
15
  name: tsplus_module_1.NonEmptyString255,
14
16
  userProfile: tsplus_module_2.optional(tsplus_module_1.struct({ sub: UserProfileId })),
15
17
  locale: tsplus_module_1.literal("en", "de"),
16
18
  createdAt: tsplus_module_2.withDefaultConstructor(S.Date, () => new Date()) // TODO
17
- };
18
- let RequestContextParent = class RequestContextParent extends tsplus_module_1.TaggedClass()("RequestContext", {
19
- id: RequestId,
20
- ...fields
21
19
  }) {
22
20
  };
23
21
  RequestContextParent = __decorate([
@@ -29,11 +27,11 @@ export { RequestContextParent };
29
27
  * @tsplus companion RequestContext.Ops
30
28
  */
31
29
  let RequestContext = RequestContext_1 = class RequestContext extends S.TaggedClass()("RequestContext", {
30
+ ...tsplus_module_3.RecordOmitold(tsplus_module_3.object$(RequestContextParent.fields), "id"),
32
31
  id: RequestId.withDefault(),
33
32
  rootId: RequestId,
34
33
  parent: tsplus_module_2.optional(RequestContextParent),
35
- namespace: tsplus_module_2.optional(tsplus_module_1.NonEmptyString255),
36
- ...fields
34
+ namespace: tsplus_module_2.optional(tsplus_module_1.NonEmptyString255)
37
35
  // ...RequestContextParent.omit("id").extend({
38
36
  // id: RequestId.withDefault(),
39
37
  // rootId: RequestId,
@@ -84,4 +82,4 @@ export { RequestContext };
84
82
  }
85
83
  RequestContext.From = From;
86
84
  })(RequestContext || (RequestContext = {}));
87
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVxdWVzdENvbnRleHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9fc3JjL1JlcXVlc3RDb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQTtBQUN2QyxPQUFPLEVBQUUsU0FBUyxFQUFFLGFBQWEsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBRWxFLE1BQU0sTUFBTSxHQUFHO0lBQ2IsSUFBSSxrQkFBRSxpQkFBaUI7SUFDdkIsV0FBVyxFQUFFLHlCQUFBLGdCQUFBLE1BQU0sQ0FBQyxFQUFFLEdBQUcsRUFBRSxhQUFhLEVBQUUsQ0FBQyxDQUFXO0lBQ3RELE1BQU0sRUFBRSxnQkFBQSxPQUFPLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQztJQUMzQixTQUFTLEVBQUUsdUNBQUEsQ0FBQyxDQUFDLElBQUksRUFBaUIsR0FBRyxFQUFFLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDLE9BQU87Q0FDbkQsQ0FBQTtBQUdILElBQU0sb0JBQW9CLEdBQTFCLE1BQU0sb0JBQXFCLFNBQVEsZ0JBQUEsV0FBVyxFQUVsRCxDQUFDLGdCQUFnQixFQUFFO0lBQ3BCLEVBQUUsRUFBRSxTQUFTO0lBQ2IsR0FBRyxNQUFNO0NBQ1YsQ0FBQztDQUFHLENBQUE7QUFMUSxvQkFBb0I7b0JBRGhDLHlCQUF5QjtHQUNiLG9CQUFvQixDQUs1Qjs7QUFFTDs7O0dBR0c7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UFDTCxhQUFhLEVBQUUsSUFBSSxDQUFDLElBQUk7WUFDeEIsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNO1lBQ25CLEdBQUcsQ0FBQyxJQUFJLENBQUMsTUFBTTtnQkFDYixDQUFDLENBQUMsRUFBRSxtQkFBbUIsRUFBRSxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxZQUFZLEVBQUUsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUU7Z0JBQzdFLENBQUMsQ0FBQyxFQUFFLENBQUM7U0FDUixDQUFBO0lBQ0gsQ0FBQztDQUNGLENBQUE7QUFyQ1ksY0FBYztvQkFEMUIseUJBQXlCO0dBQ2IsY0FBYyxDQXFDMUI7O0FBRUQsZ0NBQWdDO0FBQ2hDLEVBQUU7QUFDRixvQkFBb0I7QUFDcEIsV0FBaUIsb0JBQW9CO0lBQ25DOzs7T0FHRztJQUNILE1BQWEsSUFBSyxTQUFRLGdCQUFBLFNBQVMsRUFBK0I7S0FBRztJQUF4RCx5QkFBSSxPQUFvRCxDQUFBO0FBQ3ZFLENBQUMsRUFOZ0Isb0JBQW9CLEtBQXBCLG9CQUFvQixRQU1wQztBQUNELFdBQWlCLGNBQWM7SUFDN0I7OztPQUdHO0lBQ0gsTUFBYSxJQUFLLFNBQVEsZ0JBQUEsU0FBUyxFQUF5QjtLQUFHO0lBQWxELG1CQUFJLE9BQThDLENBQUE7QUFDakUsQ0FBQyxFQU5nQixjQUFjLEtBQWQsY0FBYyxRQU05QiJ9
@@ -18,10 +18,10 @@ export declare const QueueMeta: import("@effect-app/schema").Schema<{
18
18
  readonly requestContext: {
19
19
  readonly _tag: "RequestContext";
20
20
  readonly id: string;
21
- readonly rootId: string;
22
21
  readonly name: string;
23
22
  readonly locale: "en" | "de";
24
23
  readonly createdAt: string;
24
+ readonly rootId: string;
25
25
  readonly userProfile?: {
26
26
  readonly sub: string;
27
27
  } | undefined;
@@ -37,7 +37,7 @@ export declare const RCTag: import("effect/Context").Tag<RequestContext, Request
37
37
  export declare const spanAttributes: (ctx: RequestContext) => {
38
38
  "request.user.sub"?: string & import("@effect-app/prelude/ids").UserProfileIdBrand;
39
39
  "request.user.roles"?: unknown;
40
- "request.id": string & import("@effect-app/schema").StringIdBrand;
40
+ "request.id": import("@effect-app/schema").NonEmptyString255;
41
41
  "request.name": string & import("@effect-app/schema").NonEmptyString255Brand;
42
42
  "request.locale": "en" | "de";
43
43
  "request.namespace": (string & import("@effect-app/schema").NonEmptyString255Brand) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/infra",
3
- "version": "0.133.0-next.26",
3
+ "version": "0.133.0-next.28",
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/prelude": "0.107.0-next.26",
23
+ "@effect-app/infra-adapters": "0.85.0-next.26",
22
24
  "@effect-app/core": "0.97.0-next.4",
23
- "@effect-app/prelude": "0.107.0-next.24",
24
- "@effect-app/infra-adapters": "0.85.0-next.24",
25
- "@effect-app/schema": "0.150.0-next.19"
25
+ "@effect-app/schema": "0.150.0-next.20"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@babel/cli": "^7.23.4",