@effect-app/infra 0.133.0-next.1 → 0.133.0-next.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/CHANGELOG.md +8 -0
- package/_cjs/RequestContext.cjs +2 -3
- package/_cjs/RequestContext.cjs.map +1 -1
- package/_src/RequestContext.ts +0 -1
- package/dist/RequestContext.d.ts +1 -1
- package/dist/RequestContext.d.ts.map +1 -1
- package/dist/RequestContext.js +3 -4
- package/dist/services/RepositoryBase.d.ts +1 -1
- package/dist/services/simpledb/cosmosdb.d.ts +2 -2
- package/dist/services/simpledb/diskdb.d.ts +2 -2
- package/dist/services/simpledb/memdb.d.ts +2 -2
- package/dist/services/simpledb/mongodb.d.ts +2 -2
- package/dist/services/simpledb/redisdb.d.ts +2 -2
- package/dist/services/simpledb/simpledb.d.ts +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/_cjs/RequestContext.cjs
CHANGED
|
@@ -8,7 +8,6 @@ var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/prelude/schem
|
|
|
8
8
|
var tsplus_module_2 = _interopRequireWildcard(require("@effect/schema/Schema"));
|
|
9
9
|
var _prelude = require("@effect-app/prelude");
|
|
10
10
|
var _ids = require("@effect-app/prelude/ids");
|
|
11
|
-
var _schema2 = require("@effect-app/schema");
|
|
12
11
|
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); }
|
|
13
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
13
|
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
@@ -31,7 +30,7 @@ let RequestContextParent = exports.RequestContextParent = class RequestContextPa
|
|
|
31
30
|
id: _ids.RequestId,
|
|
32
31
|
...fields
|
|
33
32
|
}) {};
|
|
34
|
-
exports.RequestContextParent = RequestContextParent = __decorate([
|
|
33
|
+
exports.RequestContextParent = RequestContextParent = __decorate([tsplus_module_1.useClassFeaturesForSchema], RequestContextParent);
|
|
35
34
|
/**
|
|
36
35
|
* @tsplus type RequestContext
|
|
37
36
|
* @tsplus companion RequestContext.Ops
|
|
@@ -68,7 +67,7 @@ let RequestContext = exports.RequestContext = RequestContext_1 = class RequestCo
|
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
69
|
};
|
|
71
|
-
exports.RequestContext = RequestContext = RequestContext_1 = __decorate([
|
|
70
|
+
exports.RequestContext = RequestContext = RequestContext_1 = __decorate([tsplus_module_1.useClassFeaturesForSchema], RequestContext);
|
|
72
71
|
// codegen:start {preset: model}
|
|
73
72
|
//
|
|
74
73
|
/* eslint-disable */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestContext.cjs","names":["_prelude","require","_ids","
|
|
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","Schema2","Date","RequestContextParent","exports","TaggedClass","id","RequestId","__decorate","useClassFeaturesForSchema","RequestContext","RequestContext_1","withDefault","rootId","parent","namespace","inherit","newSelf","toMonitoring","self","operationName","parentOperationName","parentLocale","From","FromClass"],"sources":["../_src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BC;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"}
|
package/_src/RequestContext.ts
CHANGED
package/dist/RequestContext.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TaggedClass, NonEmptyString255, FromClass } from "@effect-app/prelude/schema";
|
|
1
|
+
import { useClassFeaturesForSchema, TaggedClass, NonEmptyString255, FromClass } from "@effect-app/prelude/schema";
|
|
2
2
|
import { Schema2 } from "@effect-app/prelude";
|
|
3
3
|
declare const RequestContextParent_base: Schema2.Class<{
|
|
4
4
|
readonly _tag: "RequestContext";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"RequestContext.d.ts","sourceRoot":"","sources":["../_src/RequestContext.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU7C,qBACa,oBAAqB,SAAQ,yBAKxC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;;GAGG;AACH,qBACa,cAAe,SAAQ,mBAclC;IACA,MAAM,CAAC,OAAO,CACZ,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,qBAAqB,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAUhE,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc;;;;;;CASrD;AAKD,yBAAiB,oBAAoB,CAAC;;;;;;;;;;;IACpC;;;OAGG;IACH,MAAM,OAAO,IAAK,SAAQ,SAAwC;KAAG;;CACtE;AACD,yBAAiB,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;IAC9B;;;OAGG;IACH,MAAM,OAAO,IAAK,SAAQ,WAAkC;KAAG;;CAChE"}
|
package/dist/RequestContext.js
CHANGED
|
@@ -9,7 +9,6 @@ import * as tsplus_module_1 from "@effect-app/prelude/schema";
|
|
|
9
9
|
import * as tsplus_module_2 from "@effect/schema/Schema";
|
|
10
10
|
import { Schema2 } from "@effect-app/prelude";
|
|
11
11
|
import { RequestId, UserProfileId } from "@effect-app/prelude/ids";
|
|
12
|
-
import { useClassFeaturesForSchema } from "@effect-app/schema";
|
|
13
12
|
const fields = {
|
|
14
13
|
name: tsplus_module_1.NonEmptyString255,
|
|
15
14
|
userProfile: tsplus_module_2.optional(tsplus_module_1.struct({ sub: UserProfileId })),
|
|
@@ -22,7 +21,7 @@ let RequestContextParent = class RequestContextParent extends tsplus_module_1.Ta
|
|
|
22
21
|
}) {
|
|
23
22
|
};
|
|
24
23
|
RequestContextParent = __decorate([
|
|
25
|
-
useClassFeaturesForSchema
|
|
24
|
+
tsplus_module_1.useClassFeaturesForSchema
|
|
26
25
|
], RequestContextParent);
|
|
27
26
|
export { RequestContextParent };
|
|
28
27
|
/**
|
|
@@ -61,7 +60,7 @@ let RequestContext = RequestContext_1 = class RequestContext extends Schema2.Tag
|
|
|
61
60
|
}
|
|
62
61
|
};
|
|
63
62
|
RequestContext = RequestContext_1 = __decorate([
|
|
64
|
-
useClassFeaturesForSchema
|
|
63
|
+
tsplus_module_1.useClassFeaturesForSchema
|
|
65
64
|
], RequestContext);
|
|
66
65
|
export { RequestContext };
|
|
67
66
|
// codegen:start {preset: model}
|
|
@@ -85,4 +84,4 @@ export { RequestContext };
|
|
|
85
84
|
}
|
|
86
85
|
RequestContext.From = From;
|
|
87
86
|
})(RequestContext || (RequestContext = {}));
|
|
88
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVxdWVzdENvbnRleHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9fc3JjL1JlcXVlc3RDb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsU0FBUyxFQUFFLGFBQWEsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBRWxFLE1BQU0sTUFBTSxHQUFHO0lBQ2IsSUFBSSxrQkFBRSxpQkFBaUI7SUFDdkIsV0FBVyxFQUFFLHlCQUFBLGdCQUFBLE1BQU0sQ0FBQyxFQU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
|
readonly S: PM;
|
|
101
101
|
};
|
|
102
|
-
}) => Where | readonly [Where, ...Where[]], mode?: "
|
|
102
|
+
}) => Where | readonly [Where, ...Where[]], mode?: "and" | "or" | undefined) => Filter<PM>;
|
|
103
103
|
query: (fn: (f: import("./Store/filterApi/query.js").FilterTest<PM>, fields: import("./Store/filterApi/proxy.js").Filter<PM, never>) => QueryBuilder<PM>) => QueryBuilder<PM>;
|
|
104
104
|
};
|
|
105
105
|
/**
|
|
@@ -7,8 +7,8 @@ import type { DBRecord } from "./shared.js";
|
|
|
7
7
|
import { OptimisticLockException } from "./shared.js";
|
|
8
8
|
import * as simpledb from "./simpledb.js";
|
|
9
9
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, indexes: IndexingPolicy) => import("effect/Effect").Effect<Cosmos.CosmosClient, import("effect/Cause").UnknownException, {
|
|
10
|
-
find: (id: string) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache
|
|
10
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | Cosmos.CosmosClient | simpledb.RecordCache, import("effect/Cause").UnknownException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
11
11
|
findBy: (parameters: Record<string, string>) => import("effect/Effect").Effect<Cosmos.CosmosClient, import("effect/Cause").UnknownException, import("effect/Option").Option<any>>;
|
|
12
|
-
save: (record: A) => import("effect/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache
|
|
12
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | Cosmos.CosmosClient | simpledb.RecordCache, OptimisticLockException, A>;
|
|
13
13
|
}>;
|
|
14
14
|
//# sourceMappingURL=cosmosdb.d.ts.map
|
|
@@ -4,9 +4,9 @@ import type { DBRecord, Index } from "./shared.js";
|
|
|
4
4
|
import { CouldNotAquireDbLockException } from "./shared.js";
|
|
5
5
|
import * as simpledb from "./simpledb.js";
|
|
6
6
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index, dir?: string) => {
|
|
7
|
-
find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache
|
|
7
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | simpledb.RecordCache, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
8
8
|
findByIndex: (index: Index) => import("effect/Effect").Effect<never, never, import("effect/Option").Option<TKey & {}>>;
|
|
9
|
-
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache
|
|
9
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
10
10
|
};
|
|
11
11
|
export declare function initialise(dir: string): void;
|
|
12
12
|
//# sourceMappingURL=diskdb.d.ts.map
|
|
@@ -4,8 +4,8 @@ import { Option } from "@effect-app/core/Option";
|
|
|
4
4
|
import type { DBRecord } from "./shared.js";
|
|
5
5
|
import * as simpledb from "./simpledb.js";
|
|
6
6
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>) => {
|
|
7
|
-
find: (id: string) => import("effect/Effect").Effect<simpledb.RecordCache
|
|
7
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | simpledb.RecordCache, import("@effect/schema/ParseResult").ParseError | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
8
8
|
findBy: <V extends Partial<A>>(keys: V, eq: Equivalence<V>) => import("effect/Effect").Effect<RDecode, import("@effect/schema/ParseResult").ParseError, import("effect/Option").Option<A & {}>>;
|
|
9
|
-
save: (record: A) => import("effect/Effect").Effect<simpledb.RecordCache
|
|
9
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | simpledb.RecordCache, import("@effect/schema/ParseResult").ParseError | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=memdb.d.ts.map
|
|
@@ -6,8 +6,8 @@ import type { DBRecord } from "./shared.js";
|
|
|
6
6
|
import { OptimisticLockException } from "./shared.js";
|
|
7
7
|
import * as simpledb from "./simpledb.js";
|
|
8
8
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, indexes: IndexDescription[]) => import("effect/Effect").Effect<MongoClient, import("effect/Cause").UnknownException, {
|
|
9
|
-
find: (id: string) => import("effect/Effect").Effect<
|
|
9
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | MongoClient | simpledb.RecordCache, import("effect/Cause").UnknownException | simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
10
10
|
findBy: (keys: Record<string, string>) => import("effect/Effect").Effect<MongoClient, import("effect/Cause").UnknownException, import("effect/Option").Option<TKey>>;
|
|
11
|
-
save: (record: A) => import("effect/Effect").Effect<
|
|
11
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | MongoClient | simpledb.RecordCache, OptimisticLockException, A>;
|
|
12
12
|
}>;
|
|
13
13
|
//# sourceMappingURL=mongodb.d.ts.map
|
|
@@ -6,9 +6,9 @@ import type { DBRecord, Index } from "./shared.js";
|
|
|
6
6
|
import { CouldNotAquireDbLockException } from "./shared.js";
|
|
7
7
|
import * as simpledb from "./simpledb.js";
|
|
8
8
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => Effect<REncode, never, EA>, decode: (d: EA) => Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index) => {
|
|
9
|
-
find: (id: string) => import("effect/Effect").Effect<RedisClient | simpledb.RecordCache
|
|
9
|
+
find: (id: string) => import("effect/Effect").Effect<RDecode | RedisClient | simpledb.RecordCache, simpledb.InvalidStateError, import("effect/Option").Option<A>>;
|
|
10
10
|
findByIndex: (index: Index) => import("effect/Effect").Effect<RedisClient, import("@effect-app/infra-adapters/redis-client").ConnectionException, import("effect/Option").Option<TKey>>;
|
|
11
|
-
save: (record: A) => import("effect/Effect").Effect<RedisClient | simpledb.RecordCache
|
|
11
|
+
save: (record: A) => import("effect/Effect").Effect<REncode | RedisClient | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
12
12
|
};
|
|
13
13
|
declare const RedisSerializedDBRecord_base: S.Class<{
|
|
14
14
|
readonly data: string;
|
|
@@ -17,7 +17,7 @@ export interface RecordCache extends ReturnType<typeof makeLiveRecordCache> {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const RecordCache: import("effect/Context").Tag<RecordCache, RecordCache>;
|
|
19
19
|
export declare const LiveRecordCache: import("effect/Layer").Layer<never, never, RecordCache>;
|
|
20
|
-
export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, decode: (d: EA) => Effect<RDecode, EDecode, A>, type: string): (id: string) => import("effect/Effect").Effect<
|
|
21
|
-
export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, type: string): (record: A) => import("effect/Effect").Effect<
|
|
22
|
-
export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, lock: (id: string) => Effect<R2 | Scope, E2, unknown>, type: string): (record: A) => import("effect/Effect").Effect<
|
|
20
|
+
export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, decode: (d: EA) => Effect<RDecode, EDecode, A>, type: string): (id: string) => import("effect/Effect").Effect<R | RDecode | RecordCache, E | InvalidStateError, import("effect/Option").Option<A>>;
|
|
21
|
+
export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, type: string): (record: A) => import("effect/Effect").Effect<R | RecordCache, E, A>;
|
|
22
|
+
export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, lock: (id: string) => Effect<R2 | Scope, E2, unknown>, type: string): (record: A) => import("effect/Effect").Effect<R | RecordCache | Exclude<R2, import("effect/Scope").Scope>, E | E2 | OptimisticLockException | InvalidStateError, A>;
|
|
23
23
|
//# sourceMappingURL=simpledb.d.ts.map
|
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.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"proper-lockfile": "^4.1.2",
|
|
20
20
|
"pure-rand": "6.0.4",
|
|
21
21
|
"redlock": "^4.2.0",
|
|
22
|
-
"@effect-app/infra-adapters": "0.85.0-next.
|
|
22
|
+
"@effect-app/infra-adapters": "0.85.0-next.2",
|
|
23
23
|
"@effect-app/core": "0.97.0-next.0",
|
|
24
|
-
"@effect-app/prelude": "0.107.0-next.
|
|
24
|
+
"@effect-app/prelude": "0.107.0-next.2",
|
|
25
25
|
"@effect-app/schema": "0.150.0-next.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|