effect-app 4.0.0-beta.267 → 4.0.0-beta.268
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 +6 -0
- package/dist/Model/filter/types.d.ts +4 -4
- package/dist/Schema/Class.js +2 -2
- package/dist/Schema/SpecialOpenApi.js +1 -1
- package/dist/client.d.ts +5 -5
- package/dist/rpc/Invalidation.js +3 -3
- package/dist/utils.d.ts +5 -5
- package/package.json +3 -3
- package/src/Array.ts +2 -2
- package/src/Chunk.ts +3 -3
- package/src/Config/SecretURL.ts +1 -1
- package/src/Config/internal/configSecretURL.ts +1 -1
- package/src/Config.ts +1 -1
- package/src/Effect.ts +3 -3
- package/src/Emailer.ts +4 -4
- package/src/Inputify.type.ts +1 -1
- package/src/Layer.ts +2 -2
- package/src/Model/Repository/Registry.ts +3 -3
- package/src/Model/Repository/ext.ts +11 -11
- package/src/Model/Repository/internal/internal.ts +16 -16
- package/src/Model/Repository/legacy.ts +4 -4
- package/src/Model/Repository/makeRepo.ts +11 -11
- package/src/Model/Repository/service.ts +9 -9
- package/src/Model/Repository/validation.ts +2 -2
- package/src/Model/Repository.ts +6 -6
- package/src/Model/dsl.ts +4 -4
- package/src/Model/filter/filterApi.ts +1 -1
- package/src/Model/filter/types/errors.ts +3 -3
- package/src/Model/filter/types/fields.ts +2 -2
- package/src/Model/filter/types/path/common.ts +1 -1
- package/src/Model/filter/types/path/eager.ts +3 -3
- package/src/Model/filter/types/path/index.ts +2 -2
- package/src/Model/filter/types/validator.ts +3 -3
- package/src/Model/query/dsl.ts +6 -6
- package/src/Model/query/new-kid-interpreter.ts +9 -9
- package/src/Model/query.ts +2 -2
- package/src/Model.ts +4 -4
- package/src/NonEmptySet.ts +3 -3
- package/src/Option.ts +1 -1
- package/src/Pure.ts +2 -2
- package/src/QueueMaker.ts +3 -3
- package/src/RequestContext.ts +4 -4
- package/src/Schema/Class.ts +5 -5
- package/src/Schema/SchemaParser.ts +1 -1
- package/src/Schema/SpecialOpenApi.ts +2 -2
- package/src/Schema/email.ts +2 -2
- package/src/Schema/ext.ts +4 -4
- package/src/Schema/moreStrings.ts +4 -4
- package/src/Schema/numbers.ts +3 -3
- package/src/Schema/phoneNumber.ts +4 -4
- package/src/Schema/strings.ts +2 -2
- package/src/Schema.ts +23 -23
- package/src/Set.ts +1 -1
- package/src/Store.ts +11 -11
- package/src/_ext/Array.ts +1 -1
- package/src/client/InvalidationKeys.ts +3 -3
- package/src/client/apiClientFactory.ts +9 -9
- package/src/client/clientFor.ts +3 -3
- package/src/client/errors.ts +1 -1
- package/src/client/makeClient.ts +4 -4
- package/src/http/Request.ts +2 -2
- package/src/http.ts +1 -1
- package/src/ids.ts +2 -2
- package/src/index.ts +19 -19
- package/src/middleware.ts +1 -1
- package/src/rpc/Invalidation.ts +7 -7
- package/src/rpc/MiddlewareMaker.ts +6 -6
- package/src/rpc/RpcContextMap.ts +2 -2
- package/src/rpc/RpcMiddleware.ts +2 -2
- package/src/rpc.ts +4 -4
- package/src/runtime.ts +4 -4
- package/src/setupRequest.ts +6 -6
- package/src/toast.ts +4 -4
- package/src/transform.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/src/utils.ts +2 -2
- package/src/validation.ts +2 -2
- package/src/withToast.ts +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./types/errors.
|
|
2
|
-
export * from "./types/fields.
|
|
3
|
-
export * from "./types/utils.
|
|
4
|
-
export * from "./types/validator.
|
|
1
|
+
export * from "./types/errors.js";
|
|
2
|
+
export * from "./types/fields.js";
|
|
3
|
+
export * from "./types/utils.js";
|
|
4
|
+
export * from "./types/validator.js";
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Nb2RlbC9maWx0ZXIvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsY0FBYyxtQkFBbUIsQ0FBQTtBQUNqQyxjQUFjLG1CQUFtQixDQUFBO0FBQ2pDLGNBQWMsa0JBQWtCLENBQUE7QUFDaEMsY0FBYyxzQkFBc0IsQ0FBQSJ9
|
package/dist/Schema/Class.js
CHANGED
|
@@ -36,7 +36,7 @@ function makeRelaxedDeclaration(ast, fields, cls) {
|
|
|
36
36
|
* @example
|
|
37
37
|
* ```ts
|
|
38
38
|
* import * as Schema from "effect/Schema"
|
|
39
|
-
* import { Class } from "./Class.
|
|
39
|
+
* import { Class } from "./Class.ts"
|
|
40
40
|
*
|
|
41
41
|
* class A extends Class<A>("A")({ a: Schema.String }) {}
|
|
42
42
|
*
|
|
@@ -91,7 +91,7 @@ export const Class = (identifier) => (fields, annotations, options) => {
|
|
|
91
91
|
* @example
|
|
92
92
|
* ```ts
|
|
93
93
|
* import * as Schema from "effect/Schema"
|
|
94
|
-
* import { TaggedClass } from "./Class.
|
|
94
|
+
* import { TaggedClass } from "./Class.ts"
|
|
95
95
|
*
|
|
96
96
|
* class Circle extends TaggedClass<Circle>()("Circle", {
|
|
97
97
|
* radius: Schema.Number
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* ```ts
|
|
14
14
|
* import { OpenApi } from "effect/unstable"
|
|
15
|
-
* import { deduplicateOpenApiSchemas } from "./SpecialOpenApi.
|
|
15
|
+
* import { deduplicateOpenApiSchemas } from "./SpecialOpenApi.ts"
|
|
16
16
|
*
|
|
17
17
|
* const api = HttpApi.make("myApi")
|
|
18
18
|
* .pipe(HttpApi.annotateContext(OpenApi.annotations({ transform: deduplicateOpenApiSchemas })))
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./client/apiClientFactory.
|
|
2
|
-
export * from "./client/clientFor.
|
|
3
|
-
export * from "./client/errors.
|
|
4
|
-
export * from "./client/InvalidationKeys.
|
|
5
|
-
export * from "./client/makeClient.
|
|
1
|
+
export * from "./client/apiClientFactory.js";
|
|
2
|
+
export * from "./client/clientFor.js";
|
|
3
|
+
export * from "./client/errors.js";
|
|
4
|
+
export * from "./client/InvalidationKeys.js";
|
|
5
|
+
export * from "./client/makeClient.js";
|
|
6
6
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLGNBQWMsOEJBQThCLENBQUE7QUFDNUMsY0FBYyx1QkFBdUIsQ0FBQTtBQUNyQyxjQUFjLG9CQUFvQixDQUFBO0FBQ2xDLGNBQWMsOEJBQThCLENBQUE7QUFDNUMsY0FBYyx3QkFBd0IsQ0FBQSJ9
|
package/dist/rpc/Invalidation.js
CHANGED
|
@@ -73,7 +73,7 @@ export const StreamFailureChunk = (error) => S.Struct({ _tag: S.Literal("error")
|
|
|
73
73
|
* ```ts
|
|
74
74
|
* import { makeQueryKey } from "effect-app/client"
|
|
75
75
|
* import { Invalidation } from "effect-app/rpc"
|
|
76
|
-
* import * as UserRsc from "../User/index.
|
|
76
|
+
* import * as UserRsc from "../User/index.ts" // separate module to avoid circular deps
|
|
77
77
|
*
|
|
78
78
|
* class UpdateProfile extends Rpc.make("UpdateProfile", { ... })
|
|
79
79
|
* .annotate(Invalidation.Invalidates, [makeQueryKey(UserRsc.GetMe), makeQueryKey(UserRsc.GetProfile)]) {}
|
|
@@ -103,8 +103,8 @@ export const Invalidates = Context.Reference("effect-app/rpc/Invalidates", { def
|
|
|
103
103
|
* ```ts
|
|
104
104
|
* import * as Effect from "effect/Effect"
|
|
105
105
|
* import { Invalidation } from "effect-app/rpc"
|
|
106
|
-
* import * as CartRsc from "../Cart/queries.
|
|
107
|
-
* import * as UserRsc from "../User/queries.
|
|
106
|
+
* import * as CartRsc from "../Cart/queries.ts"
|
|
107
|
+
* import * as UserRsc from "../User/queries.ts"
|
|
108
108
|
*
|
|
109
109
|
* const handler = Effect.fnUntraced(function*(req: UpdateCartRequest) {
|
|
110
110
|
* const cart = yield* CartRepo.save(req.cart)
|
package/dist/utils.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import * as Fiber from "effect/Fiber";
|
|
|
3
3
|
import * as Option from "effect/Option";
|
|
4
4
|
import * as Result from "effect/Result";
|
|
5
5
|
import type { DeepMutable, Equals, Mutable } from "./Types.js";
|
|
6
|
-
export * from "./utils/effectify.
|
|
7
|
-
export * from "./utils/extend.
|
|
8
|
-
export * from "./utils/gen.
|
|
9
|
-
export * from "./utils/logger.
|
|
10
|
-
export * from "./utils/logLevel.
|
|
6
|
+
export * from "./utils/effectify.js";
|
|
7
|
+
export * from "./utils/extend.js";
|
|
8
|
+
export * from "./utils/gen.js";
|
|
9
|
+
export * from "./utils/logger.js";
|
|
10
|
+
export * from "./utils/logLevel.js";
|
|
11
11
|
export * from "effect/Utils";
|
|
12
12
|
export declare const cloneTrait: unique symbol;
|
|
13
13
|
export interface Clone {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "effect-app",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.268",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
],
|
|
56
56
|
"scripts": {
|
|
57
57
|
"watch": "pnpm build:tsc -w",
|
|
58
|
-
"build:tsc": "pnpm clean-dist && pnpm check",
|
|
58
|
+
"build:tsc": "pnpm clean-dist && pnpm check && node ../../scripts/rewrite-dist-declaration-imports.mjs dist",
|
|
59
59
|
"check": "tsgo --build",
|
|
60
|
-
"build:tsc-src": "pnpm clean-dist && tsc --build ./tsconfig.src.json",
|
|
60
|
+
"build:tsc-src": "pnpm clean-dist && tsc --build ./tsconfig.src.json && node ../../scripts/rewrite-dist-declaration-imports.mjs dist",
|
|
61
61
|
"build:src": "pnpm build:tsc-src",
|
|
62
62
|
"build": "pnpm build:tsc",
|
|
63
63
|
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsgo -w",
|
package/src/Array.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { NonEmptyArray, NonEmptyReadonlyArray } from "effect/Array"
|
|
|
2
2
|
import * as Array from "effect/Array"
|
|
3
3
|
import * as Chunk from "effect/Chunk"
|
|
4
4
|
import * as Effect from "effect/Effect"
|
|
5
|
-
import { dual, type Predicate } from "./Function.
|
|
6
|
-
import * as Option from "./Option.
|
|
5
|
+
import { dual, type Predicate } from "./Function.ts"
|
|
6
|
+
import * as Option from "./Option.ts"
|
|
7
7
|
|
|
8
8
|
export const toNonEmptyArray = Option.liftPredicate(Array.isReadonlyArrayNonEmpty)
|
|
9
9
|
|
package/src/Chunk.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { pipe, type Predicate, type Refinement } from "./Function.
|
|
2
|
-
import * as Option from "./Option.
|
|
1
|
+
import { pipe, type Predicate, type Refinement } from "./Function.ts"
|
|
2
|
+
import * as Option from "./Option.ts"
|
|
3
3
|
|
|
4
4
|
import * as Chunk from "effect/Chunk"
|
|
5
5
|
import { type Equivalence } from "effect/Equivalence"
|
|
6
|
-
import * as Array from "./Array.
|
|
6
|
+
import * as Array from "./Array.ts"
|
|
7
7
|
|
|
8
8
|
export * from "effect/Chunk"
|
|
9
9
|
|
package/src/Config/SecretURL.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type * as Chunk from "effect/Chunk"
|
|
|
5
5
|
import * as Config from "effect/Config"
|
|
6
6
|
import type * as Equal from "effect/Equal"
|
|
7
7
|
import type * as Redacted from "effect/Redacted"
|
|
8
|
-
import * as internal from "./internal/configSecretURL.
|
|
8
|
+
import * as internal from "./internal/configSecretURL.ts"
|
|
9
9
|
|
|
10
10
|
// /**
|
|
11
11
|
// * @since 1.0.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Chunk from "effect/Chunk"
|
|
2
2
|
import * as Redacted from "effect/Redacted"
|
|
3
|
-
import type * as SecretURL from "../SecretURL.
|
|
3
|
+
import type * as SecretURL from "../SecretURL.ts"
|
|
4
4
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
export const isSecretURL = (u: unknown): u is SecretURL.SecretURL => {
|
package/src/Config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Config, make } from "effect/Config"
|
|
2
2
|
import { dual } from "effect/Function"
|
|
3
3
|
|
|
4
|
-
import * as ConfigProvider from "./ConfigProvider.
|
|
4
|
+
import * as ConfigProvider from "./ConfigProvider.ts"
|
|
5
5
|
|
|
6
6
|
export const nested: {
|
|
7
7
|
(name: string): <A>(self: Config<A>) => Config<A>
|
package/src/Effect.ts
CHANGED
|
@@ -8,9 +8,9 @@ import * as Option from "effect/Option"
|
|
|
8
8
|
import * as Ref from "effect/Ref"
|
|
9
9
|
import type { Scope } from "effect/Scope"
|
|
10
10
|
import type { Semaphore } from "effect/Semaphore"
|
|
11
|
-
import type * as Context from "./Context.
|
|
12
|
-
import { curry } from "./Function.
|
|
13
|
-
import { typedKeysOf } from "./utils.
|
|
11
|
+
import type * as Context from "./Context.ts"
|
|
12
|
+
import { curry } from "./Function.ts"
|
|
13
|
+
import { typedKeysOf } from "./utils.ts"
|
|
14
14
|
|
|
15
15
|
export * from "effect/Effect"
|
|
16
16
|
// v4: Effect interface not re-exported by `export *` due to local binding collision
|
package/src/Emailer.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as Data from "effect/Data"
|
|
2
|
-
import type { NonEmptyReadonlyArray } from "./Array.
|
|
3
|
-
import * as Context from "./Context.
|
|
4
|
-
import type * as Effect from "./Effect.
|
|
5
|
-
import type { Email } from "./Schema.
|
|
2
|
+
import type { NonEmptyReadonlyArray } from "./Array.ts"
|
|
3
|
+
import * as Context from "./Context.ts"
|
|
4
|
+
import type * as Effect from "./Effect.ts"
|
|
5
|
+
import type { Email } from "./Schema.ts"
|
|
6
6
|
|
|
7
7
|
export class SendMailError extends Data.TaggedError("SendMailError")<{
|
|
8
8
|
readonly raw: Error
|
package/src/Inputify.type.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BuiltInObject } from "effect-app/utils"
|
|
2
2
|
|
|
3
|
-
import type { Primitive } from "./Widen.type.
|
|
3
|
+
import type { Primitive } from "./Widen.type.ts"
|
|
4
4
|
|
|
5
5
|
// Get rid of Date | string, and replace with Date | null
|
|
6
6
|
export type Inputify<T> = Date extends T ? string extends T ? Date | null
|
package/src/Layer.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { dual } from "effect/Function"
|
|
|
4
4
|
import * as Layer from "effect/Layer"
|
|
5
5
|
import type * as Scope from "effect/Scope"
|
|
6
6
|
import type * as Types from "effect/Types"
|
|
7
|
-
import type * as Context from "./Context.
|
|
8
|
-
import { type EffectGenUtils } from "./utils/gen.
|
|
7
|
+
import type * as Context from "./Context.ts"
|
|
8
|
+
import { type EffectGenUtils } from "./utils/gen.ts"
|
|
9
9
|
|
|
10
10
|
export * from "effect/Layer"
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DatabaseError } from "../../client/errors.
|
|
2
|
-
import * as Context from "../../Context.
|
|
3
|
-
import * as Effect from "../../Effect.
|
|
1
|
+
import type { DatabaseError } from "../../client/errors.ts"
|
|
2
|
+
import * as Context from "../../Context.ts"
|
|
3
|
+
import * as Effect from "../../Effect.ts"
|
|
4
4
|
|
|
5
5
|
export interface RegisteredRepository {
|
|
6
6
|
readonly seedNamespace: (namespace: string) => Effect.Effect<void, DatabaseError>
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import * as Exit from "effect/Exit"
|
|
4
4
|
import * as Request from "effect/Request"
|
|
5
5
|
import * as RequestResolver from "effect/RequestResolver"
|
|
6
|
-
import * as Array from "../../Array.
|
|
7
|
-
import type { NonEmptyArray } from "../../Array.
|
|
8
|
-
import { type InvalidStateError, NotFoundError, type OptimisticConcurrencyException } from "../../client/errors.
|
|
9
|
-
import * as Effect from "../../Effect.
|
|
10
|
-
import * as Option from "../../Option.
|
|
11
|
-
import { type FixEnv, type PureEnv, runTerm } from "../../Pure.
|
|
12
|
-
import { AnyPureDSL } from "../dsl.
|
|
13
|
-
import type { FieldValues } from "../filter/types.
|
|
14
|
-
import type { Query, QueryEnd, QueryWhere } from "../query.
|
|
15
|
-
import * as Q from "../query.
|
|
16
|
-
import type { Repository } from "./service.
|
|
6
|
+
import * as Array from "../../Array.ts"
|
|
7
|
+
import type { NonEmptyArray } from "../../Array.ts"
|
|
8
|
+
import { type InvalidStateError, NotFoundError, type OptimisticConcurrencyException } from "../../client/errors.ts"
|
|
9
|
+
import * as Effect from "../../Effect.ts"
|
|
10
|
+
import * as Option from "../../Option.ts"
|
|
11
|
+
import { type FixEnv, type PureEnv, runTerm } from "../../Pure.ts"
|
|
12
|
+
import { AnyPureDSL } from "../dsl.ts"
|
|
13
|
+
import type { FieldValues } from "../filter/types.ts"
|
|
14
|
+
import type { Query, QueryEnd, QueryWhere } from "../query.ts"
|
|
15
|
+
import * as Q from "../query.ts"
|
|
16
|
+
import type { Repository } from "./service.ts"
|
|
17
17
|
|
|
18
18
|
interface BatchOptions {
|
|
19
19
|
readonly batch?: true | number
|
|
@@ -10,23 +10,23 @@ import * as Result from "effect/Result"
|
|
|
10
10
|
import * as SchemaAST from "effect/SchemaAST"
|
|
11
11
|
import type * as Scope from "effect/Scope"
|
|
12
12
|
import * as Unify from "effect/Unify"
|
|
13
|
-
import * as Array from "../../../Array.
|
|
14
|
-
import type { NonEmptyReadonlyArray } from "../../../Array.
|
|
15
|
-
import { toNonEmptyArray } from "../../../Array.
|
|
16
|
-
import * as Chunk from "../../../Chunk.
|
|
17
|
-
import { NotFoundError } from "../../../client/errors.
|
|
18
|
-
import * as Context from "../../../Context.
|
|
19
|
-
import * as Effect from "../../../Effect.
|
|
20
|
-
import { flatMapOption } from "../../../Effect.
|
|
21
|
-
import * as Option from "../../../Option.
|
|
22
|
-
import * as S from "../../../Schema.
|
|
23
|
-
import { type Codec, NonNegativeInt } from "../../../Schema.
|
|
13
|
+
import * as Array from "../../../Array.ts"
|
|
14
|
+
import type { NonEmptyReadonlyArray } from "../../../Array.ts"
|
|
15
|
+
import { toNonEmptyArray } from "../../../Array.ts"
|
|
16
|
+
import * as Chunk from "../../../Chunk.ts"
|
|
17
|
+
import { NotFoundError } from "../../../client/errors.ts"
|
|
18
|
+
import * as Context from "../../../Context.ts"
|
|
19
|
+
import * as Effect from "../../../Effect.ts"
|
|
20
|
+
import { flatMapOption } from "../../../Effect.ts"
|
|
21
|
+
import * as Option from "../../../Option.ts"
|
|
22
|
+
import * as S from "../../../Schema.ts"
|
|
23
|
+
import { type Codec, NonNegativeInt } from "../../../Schema.ts"
|
|
24
24
|
import { setupRequestContextFromCurrent } from "../../../setupRequest.ts"
|
|
25
|
-
import { type FilterArgs, getContextMap, type PersistenceModelType, type StoreConfig, storeId, StoreMaker } from "../../../Store.
|
|
26
|
-
import type { FieldValues } from "../../filter/types.
|
|
27
|
-
import * as Q from "../../query.
|
|
28
|
-
import type { ChangeFeed, ChangeFeedEvent, Repository } from "../service.
|
|
29
|
-
import { ValidationError, ValidationResult } from "../validation.
|
|
25
|
+
import { type FilterArgs, getContextMap, type PersistenceModelType, type StoreConfig, storeId, StoreMaker } from "../../../Store.ts"
|
|
26
|
+
import type { FieldValues } from "../../filter/types.ts"
|
|
27
|
+
import * as Q from "../../query.ts"
|
|
28
|
+
import type { ChangeFeed, ChangeFeedEvent, Repository } from "../service.ts"
|
|
29
|
+
import { ValidationError, ValidationResult } from "../validation.ts"
|
|
30
30
|
|
|
31
31
|
const dedupe = Array.dedupeWith(Equivalence.String)
|
|
32
32
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
3
|
-
import type { DatabaseError, OptimisticConcurrencyException } from "../../client/errors.
|
|
4
|
-
import type * as Effect from "../../Effect.
|
|
5
|
-
import type * as Option from "../../Option.
|
|
6
|
-
import type * as S from "../../Schema.
|
|
3
|
+
import type { DatabaseError, OptimisticConcurrencyException } from "../../client/errors.ts"
|
|
4
|
+
import type * as Effect from "../../Effect.ts"
|
|
5
|
+
import type * as Option from "../../Option.ts"
|
|
6
|
+
import type * as S from "../../Schema.ts"
|
|
7
7
|
|
|
8
8
|
export interface Mapped1<A, IdKey extends keyof A, R> {
|
|
9
9
|
all: Effect.Effect<A[], S.SchemaError | DatabaseError, R>
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
6
|
|
|
7
|
-
// import type { ParserEnv } from "../../Schema/custom/Parser.
|
|
7
|
+
// import type { ParserEnv } from "../../Schema/custom/Parser.ts"
|
|
8
8
|
|
|
9
9
|
import type * as Scope from "effect/Scope"
|
|
10
|
-
import type { NonEmptyReadonlyArray } from "../../Array.
|
|
11
|
-
import type * as Context from "../../Context.
|
|
12
|
-
import * as Effect from "../../Effect.
|
|
13
|
-
import type * as S from "../../Schema.
|
|
14
|
-
import type { StoreConfig, StoreMaker } from "../../Store.
|
|
15
|
-
import type { FieldValues } from "../filter/types.
|
|
16
|
-
import { type ExtendedRepository, extendRepo } from "./ext.
|
|
17
|
-
import { makeRepoInternal } from "./internal/internal.
|
|
18
|
-
import { RepositoryRegistry } from "./Registry.
|
|
19
|
-
import type { Repository } from "./service.
|
|
10
|
+
import type { NonEmptyReadonlyArray } from "../../Array.ts"
|
|
11
|
+
import type * as Context from "../../Context.ts"
|
|
12
|
+
import * as Effect from "../../Effect.ts"
|
|
13
|
+
import type * as S from "../../Schema.ts"
|
|
14
|
+
import type { StoreConfig, StoreMaker } from "../../Store.ts"
|
|
15
|
+
import type { FieldValues } from "../filter/types.ts"
|
|
16
|
+
import { type ExtendedRepository, extendRepo } from "./ext.ts"
|
|
17
|
+
import { makeRepoInternal } from "./internal/internal.ts"
|
|
18
|
+
import { RepositoryRegistry } from "./Registry.ts"
|
|
19
|
+
import type { Repository } from "./service.ts"
|
|
20
20
|
|
|
21
21
|
export interface RepositoryOptions<
|
|
22
22
|
IdKey extends keyof T & keyof Encoded,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import type * as Scope from "effect/Scope"
|
|
3
|
-
import type { DatabaseError, InvalidStateError, NotFoundError, OptimisticConcurrencyException } from "../../client/errors.
|
|
4
|
-
import type * as Effect from "../../Effect.
|
|
5
|
-
import type * as Option from "../../Option.
|
|
6
|
-
import type * as S from "../../Schema.
|
|
7
|
-
import type { NonNegativeInt } from "../../Schema/numbers.
|
|
8
|
-
import type { FieldValues, IsNever, ResolveFirstLevel } from "../filter/types.
|
|
9
|
-
import type { QAll, Query, QueryProjection, RawQuery } from "../query.
|
|
10
|
-
import type { Mapped } from "./legacy.
|
|
11
|
-
import type { ValidationResult } from "./validation.
|
|
3
|
+
import type { DatabaseError, InvalidStateError, NotFoundError, OptimisticConcurrencyException } from "../../client/errors.ts"
|
|
4
|
+
import type * as Effect from "../../Effect.ts"
|
|
5
|
+
import type * as Option from "../../Option.ts"
|
|
6
|
+
import type * as S from "../../Schema.ts"
|
|
7
|
+
import type { NonNegativeInt } from "../../Schema/numbers.ts"
|
|
8
|
+
import type { FieldValues, IsNever, ResolveFirstLevel } from "../filter/types.ts"
|
|
9
|
+
import type { QAll, Query, QueryProjection, RawQuery } from "../query.ts"
|
|
10
|
+
import type { Mapped } from "./legacy.ts"
|
|
11
|
+
import type { ValidationResult } from "./validation.ts"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Event emitted by a repository's ChangeFeed.
|
package/src/Model/Repository.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./Repository/ext.
|
|
2
|
-
export * from "./Repository/legacy.
|
|
3
|
-
export { makeRepo } from "./Repository/makeRepo.
|
|
4
|
-
export * from "./Repository/Registry.
|
|
5
|
-
export * from "./Repository/service.
|
|
6
|
-
export * from "./Repository/validation.
|
|
1
|
+
export * from "./Repository/ext.ts"
|
|
2
|
+
export * from "./Repository/legacy.ts"
|
|
3
|
+
export { makeRepo } from "./Repository/makeRepo.ts"
|
|
4
|
+
export * from "./Repository/Registry.ts"
|
|
5
|
+
export * from "./Repository/service.ts"
|
|
6
|
+
export * from "./Repository/validation.ts"
|
package/src/Model/dsl.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import type { NonEmptyReadonlyArray } from "../Array.
|
|
3
|
-
import { toNonEmptyArray } from "../Array.
|
|
4
|
-
import * as Effect from "../Effect.
|
|
5
|
-
import { type FixEnv, get, logMany, type Pure, type PureEnvEnv, type PureLogT, set } from "../Pure.
|
|
2
|
+
import type { NonEmptyReadonlyArray } from "../Array.ts"
|
|
3
|
+
import { toNonEmptyArray } from "../Array.ts"
|
|
4
|
+
import * as Effect from "../Effect.ts"
|
|
5
|
+
import { type FixEnv, get, logMany, type Pure, type PureEnvEnv, type PureLogT, set } from "../Pure.ts"
|
|
6
6
|
|
|
7
7
|
export interface PureDSL<S, S2, W> {
|
|
8
8
|
get: Pure<never, S, S, never, never, S>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FieldValues, InternalFieldName } from "./fields.
|
|
2
|
-
import type { BrowserNativeObject, IsAny, LiteralUnion, Merge } from "./utils.
|
|
3
|
-
import type { RegisterOptions, ValidateResult } from "./validator.
|
|
1
|
+
import type { FieldValues, InternalFieldName } from "./fields.ts"
|
|
2
|
+
import type { BrowserNativeObject, IsAny, LiteralUnion, Merge } from "./utils.ts"
|
|
3
|
+
import type { RegisterOptions, ValidateResult } from "./validator.ts"
|
|
4
4
|
|
|
5
5
|
export type Message = string
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { expectTypeOf } from "@effect/vitest"
|
|
3
|
-
import type { FieldValues } from "../fields.
|
|
4
|
-
import type { BrowserNativeObject, Equals, IsLiteral, IsNever, Primitive } from "../utils.
|
|
3
|
+
import type { FieldValues } from "../fields.ts"
|
|
4
|
+
import type { BrowserNativeObject, Equals, IsLiteral, IsNever, Primitive } from "../utils.ts"
|
|
5
5
|
|
|
6
|
-
import type { ArrayKey, IsTuple, TupleKeys } from "./common.
|
|
6
|
+
import type { ArrayKey, IsTuple, TupleKeys } from "./common.ts"
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Helper type for recursively constructing paths through a type.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Re-export public API */
|
|
2
2
|
|
|
3
|
-
export type { PathString } from "./common.
|
|
4
|
-
export type { FieldPath, FieldPathByValue, FieldPathValue, FieldPathValues, Path, PathValue } from "./eager.
|
|
3
|
+
export type { PathString } from "./common.ts"
|
|
4
|
+
export type { FieldPath, FieldPathByValue, FieldPathValue, FieldPathValues, Path, PathValue } from "./eager.ts"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Message } from "./errors.
|
|
2
|
-
import type { FieldValues, InternalFieldName } from "./fields.
|
|
3
|
-
import type { FieldPath, FieldPathValue } from "./path/index.
|
|
1
|
+
import type { Message } from "./errors.ts"
|
|
2
|
+
import type { FieldValues, InternalFieldName } from "./fields.ts"
|
|
3
|
+
import type { FieldPath, FieldPathValue } from "./path/index.ts"
|
|
4
4
|
|
|
5
5
|
export type ValidationValue = boolean | number | string | RegExp
|
|
6
6
|
|
package/src/Model/query/dsl.ts
CHANGED
|
@@ -5,12 +5,12 @@ import * as Data from "effect/Data"
|
|
|
5
5
|
import { flow } from "effect/Function"
|
|
6
6
|
import * as Pipeable from "effect/Pipeable"
|
|
7
7
|
import type { Covariant } from "effect/Types"
|
|
8
|
-
import type * as Option from "../../Option.
|
|
9
|
-
import type * as S from "../../Schema.
|
|
10
|
-
import type { NonNegativeInt } from "../../Schema.
|
|
11
|
-
import type { Ops } from "../filter/filterApi.
|
|
12
|
-
import type { FieldValues } from "../filter/types.
|
|
13
|
-
import type { FieldPath, FieldPathValue, RefineFieldPathValue } from "../filter/types/path/eager.
|
|
8
|
+
import type * as Option from "../../Option.ts"
|
|
9
|
+
import type * as S from "../../Schema.ts"
|
|
10
|
+
import type { NonNegativeInt } from "../../Schema.ts"
|
|
11
|
+
import type { Ops } from "../filter/filterApi.ts"
|
|
12
|
+
import type { FieldValues } from "../filter/types.ts"
|
|
13
|
+
import type { FieldPath, FieldPathValue, RefineFieldPathValue } from "../filter/types/path/eager.ts"
|
|
14
14
|
|
|
15
15
|
export type QAll<
|
|
16
16
|
TFieldValues extends FieldValues,
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { identity, pipe } from "effect/Function"
|
|
4
4
|
import * as Match from "effect/Match"
|
|
5
5
|
import * as SchemaAST from "effect/SchemaAST"
|
|
6
|
-
import * as Array from "../../Array.
|
|
7
|
-
import { toNonEmptyArray } from "../../Array.
|
|
8
|
-
import * as Option from "../../Option.
|
|
9
|
-
import * as S from "../../Schema.
|
|
10
|
-
import { dropUndefinedT } from "../../utils.
|
|
11
|
-
import type { FilterResult } from "../filter/filterApi.
|
|
12
|
-
import type { FieldValues } from "../filter/types.
|
|
13
|
-
import type { FieldPath } from "../filter/types/path/eager.
|
|
14
|
-
import { make, type Q, type QAll } from "../query/dsl.
|
|
6
|
+
import * as Array from "../../Array.ts"
|
|
7
|
+
import { toNonEmptyArray } from "../../Array.ts"
|
|
8
|
+
import * as Option from "../../Option.ts"
|
|
9
|
+
import * as S from "../../Schema.ts"
|
|
10
|
+
import { dropUndefinedT } from "../../utils.ts"
|
|
11
|
+
import type { FilterResult } from "../filter/filterApi.ts"
|
|
12
|
+
import type { FieldValues } from "../filter/types.ts"
|
|
13
|
+
import type { FieldPath } from "../filter/types/path/eager.ts"
|
|
14
|
+
import { make, type Q, type QAll } from "../query/dsl.ts"
|
|
15
15
|
|
|
16
16
|
export type AggregateIrExpression =
|
|
17
17
|
| { readonly _tag: "agg-count" }
|
package/src/Model/query.ts
CHANGED
package/src/Model.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./Model/dsl.
|
|
2
|
-
export * as Q from "./Model/query.
|
|
3
|
-
export { makeRepo } from "./Model/Repository.
|
|
4
|
-
export { type RegisteredRepository, RepositoryRegistry, RepositoryRegistryLive } from "./Model/Repository.
|
|
1
|
+
export * from "./Model/dsl.ts"
|
|
2
|
+
export * as Q from "./Model/query.ts"
|
|
3
|
+
export { makeRepo } from "./Model/Repository.ts"
|
|
4
|
+
export { type RegisteredRepository, RepositoryRegistry, RepositoryRegistryLive } from "./Model/Repository.ts"
|
package/src/NonEmptySet.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { NonEmptyReadonlyArray } from "effect/Array"
|
|
|
2
2
|
import type * as Equivalence from "effect/Equivalence"
|
|
3
3
|
import * as Option from "effect/Option"
|
|
4
4
|
import type * as Order from "effect/Order"
|
|
5
|
-
import { flow, pipe } from "./Function.
|
|
6
|
-
import { filter_, filterMap, filterMap_, fromArray as fromArrayOriginal, insert as insertOriginal, insert_ as insert_Original, map, map_, reduce, reduce_, remove, remove_, type Set, toArray as toArrayOriginal } from "./Set.
|
|
5
|
+
import { flow, pipe } from "./Function.ts"
|
|
6
|
+
import { filter_, filterMap, filterMap_, fromArray as fromArrayOriginal, insert as insertOriginal, insert_ as insert_Original, map, map_, reduce, reduce_, remove, remove_, type Set, toArray as toArrayOriginal } from "./Set.ts"
|
|
7
7
|
|
|
8
8
|
export interface NonEmptyBrand {
|
|
9
9
|
readonly NonEmpty: unique symbol
|
|
@@ -89,4 +89,4 @@ export function fromSet<A>(set: Set<A>) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
// TODO
|
|
92
|
-
export * from "./Set.
|
|
92
|
+
export * from "./Set.ts"
|
package/src/Option.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
5
5
|
// eslint-disable-next-line import/no-unassigned-import
|
|
6
|
-
import "./builtin.
|
|
6
|
+
import "./builtin.ts"
|
|
7
7
|
import { getOrUndefined as value, type Some } from "effect/Option"
|
|
8
8
|
import * as Option from "effect/Option"
|
|
9
9
|
|
package/src/Pure.ts
CHANGED
|
@@ -3,8 +3,8 @@ import * as Chunk from "effect/Chunk"
|
|
|
3
3
|
import * as Effect from "effect/Effect"
|
|
4
4
|
import * as Layer from "effect/Layer"
|
|
5
5
|
import * as Result from "effect/Result"
|
|
6
|
-
import * as Context from "./Context.
|
|
7
|
-
import { tuple } from "./Function.
|
|
6
|
+
import * as Context from "./Context.ts"
|
|
7
|
+
import { tuple } from "./Function.ts"
|
|
8
8
|
|
|
9
9
|
const S1 = Symbol()
|
|
10
10
|
const S2 = Symbol()
|
package/src/QueueMaker.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Scope from "effect/Scope"
|
|
2
|
-
import type { NonEmptyReadonlyArray } from "./Array.
|
|
3
|
-
import type * as Effect from "./Effect.
|
|
4
|
-
import { RequestContext } from "./RequestContext.
|
|
2
|
+
import type { NonEmptyReadonlyArray } from "./Array.ts"
|
|
3
|
+
import type * as Effect from "./Effect.ts"
|
|
4
|
+
import { RequestContext } from "./RequestContext.ts"
|
|
5
5
|
|
|
6
6
|
export interface QueueBase<Evt, DrainEvt> {
|
|
7
7
|
drain: <DrainE, DrainR>(
|