@effect-app/infra 0.133.0-next.0 → 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 +18 -0
- package/_cjs/RequestContext.cjs +2 -3
- package/_cjs/RequestContext.cjs.map +1 -1
- package/_cjs/_global.ext.cjs +16 -1
- package/_cjs/_global.ext.cjs.map +1 -1
- package/_src/RequestContext.ts +0 -1
- package/_src/_global.ext.ts +15 -0
- package/dist/RequestContext.d.ts +5 -5
- package/dist/RequestContext.d.ts.map +1 -1
- package/dist/RequestContext.js +3 -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/RepositoryBase.d.ts +1 -1
- package/dist/services/RequestContextContainer.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 +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @effect-app/infra
|
|
2
2
|
|
|
3
|
+
## 0.133.0-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c3de47e]
|
|
8
|
+
- @effect-app/prelude@0.107.0-next.2
|
|
9
|
+
- @effect-app/infra-adapters@0.85.0-next.2
|
|
10
|
+
|
|
11
|
+
## 0.133.0-next.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- bd2130b: cleanup
|
|
16
|
+
- Updated dependencies [bd2130b]
|
|
17
|
+
- @effect-app/infra-adapters@0.85.0-next.1
|
|
18
|
+
- @effect-app/prelude@0.107.0-next.1
|
|
19
|
+
- @effect-app/schema@0.150.0-next.1
|
|
20
|
+
|
|
3
21
|
## 0.133.0-next.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
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/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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AAoB;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/_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/RequestContext.ts
CHANGED
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
|
@@ -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";
|
|
@@ -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;
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVxdWVzdENvbnRleHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9fc3JjL1JlcXVlc3RDb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsU0FBUyxFQUFFLGFBQWEsRUFBRSxNQUFNLHlCQUF5QixDQUFBO0FBRWxFLE1BQU0sTUFBTSxHQUFHO0lBQ2IsSUFBSSxrQkFBRSxpQkFBaUI7SUFDdkIsV0FBVyxFQUFFLHlCQUFBLGdCQUFBLE1BQU0sQ0FBQyxFQUFFLEdBQUcsRUFBRSxhQUFhLEVBQUUsQ0FBQyxDQUFXO0lBQ3RELE1BQU0sRUFBRSxnQkFBQSxPQUFPLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQztJQUMzQixTQUFTLEVBQUUsdUNBQUEsT0FBTyxDQUFDLElBQUksRUFBaUIsR0FBRyxFQUFFLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDLE9BQU87Q0FDekQsQ0FBQTtBQUdILElBQU0sb0JBQW9CLEdBQTFCLE1BQU0sb0JBQXFCLFNBQVEsZ0JBQUEsV0FBVyxFQUVsRCxDQUFDLGdCQUFnQixFQUFFO0lBQ3BCLEVBQUUsRUFBRSxTQUFTO0lBQ2IsR0FBRyxNQ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FQUFFLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxFQUFFO2dCQUM3RSxDQUFDLENBQUMsRUFBRSxDQUFDO1NBQ1IsQ0FBQTtJQUNILENBQUM7Q0FDRixDQUFBO0FBckNZLGNBQWM7b0JBRDFCLHlCQUF5QjtHQUNiLGNBQWMsQ0FxQzFCOztBQUVELGdDQUFnQztBQUNoQyxFQUFFO0FBQ0Ysb0JBQW9CO0FBQ3BCLFdBQWlCLG9CQUFvQjtJQUNuQzs7O09BR0c7SUFDSCxNQUFhLElBQUssU0FBUSxnQkFBQSxTQUFTLEVBQStCO0tBQUc7SUFBeEQseUJBQUksT0FBb0QsQ0FBQTtBQUN2RSxDQUFDLEVBTmdCLG9CQUFvQixLQUFwQixvQkFBb0IsUUFNcEM7QUFDRCxXQUFpQixjQUFjO0lBQzdCOzs7T0FHRztJQUNILE1BQWEsSUFBSyxTQUFRLGdCQUFBLFNBQVMsRUFBeUI7S0FBRztJQUFsRCxtQkFBSSxPQUE4QyxDQUFBO0FBQ2pFLENBQUMsRUFOZ0IsY0FBYyxLQUFkLGNBQWMsUUFNOUIifQ==
|
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=
|
|
@@ -99,7 +99,7 @@ export declare function makeRepo<PM extends {
|
|
|
99
99
|
value: A_1;
|
|
100
100
|
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
|
/**
|
|
@@ -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;
|
|
@@ -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,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.2",
|
|
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.2",
|
|
25
|
+
"@effect-app/schema": "0.150.0-next.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.23.4",
|