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.
Files changed (78) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/Model/filter/types.d.ts +4 -4
  3. package/dist/Schema/Class.js +2 -2
  4. package/dist/Schema/SpecialOpenApi.js +1 -1
  5. package/dist/client.d.ts +5 -5
  6. package/dist/rpc/Invalidation.js +3 -3
  7. package/dist/utils.d.ts +5 -5
  8. package/package.json +3 -3
  9. package/src/Array.ts +2 -2
  10. package/src/Chunk.ts +3 -3
  11. package/src/Config/SecretURL.ts +1 -1
  12. package/src/Config/internal/configSecretURL.ts +1 -1
  13. package/src/Config.ts +1 -1
  14. package/src/Effect.ts +3 -3
  15. package/src/Emailer.ts +4 -4
  16. package/src/Inputify.type.ts +1 -1
  17. package/src/Layer.ts +2 -2
  18. package/src/Model/Repository/Registry.ts +3 -3
  19. package/src/Model/Repository/ext.ts +11 -11
  20. package/src/Model/Repository/internal/internal.ts +16 -16
  21. package/src/Model/Repository/legacy.ts +4 -4
  22. package/src/Model/Repository/makeRepo.ts +11 -11
  23. package/src/Model/Repository/service.ts +9 -9
  24. package/src/Model/Repository/validation.ts +2 -2
  25. package/src/Model/Repository.ts +6 -6
  26. package/src/Model/dsl.ts +4 -4
  27. package/src/Model/filter/filterApi.ts +1 -1
  28. package/src/Model/filter/types/errors.ts +3 -3
  29. package/src/Model/filter/types/fields.ts +2 -2
  30. package/src/Model/filter/types/path/common.ts +1 -1
  31. package/src/Model/filter/types/path/eager.ts +3 -3
  32. package/src/Model/filter/types/path/index.ts +2 -2
  33. package/src/Model/filter/types/validator.ts +3 -3
  34. package/src/Model/query/dsl.ts +6 -6
  35. package/src/Model/query/new-kid-interpreter.ts +9 -9
  36. package/src/Model/query.ts +2 -2
  37. package/src/Model.ts +4 -4
  38. package/src/NonEmptySet.ts +3 -3
  39. package/src/Option.ts +1 -1
  40. package/src/Pure.ts +2 -2
  41. package/src/QueueMaker.ts +3 -3
  42. package/src/RequestContext.ts +4 -4
  43. package/src/Schema/Class.ts +5 -5
  44. package/src/Schema/SchemaParser.ts +1 -1
  45. package/src/Schema/SpecialOpenApi.ts +2 -2
  46. package/src/Schema/email.ts +2 -2
  47. package/src/Schema/ext.ts +4 -4
  48. package/src/Schema/moreStrings.ts +4 -4
  49. package/src/Schema/numbers.ts +3 -3
  50. package/src/Schema/phoneNumber.ts +4 -4
  51. package/src/Schema/strings.ts +2 -2
  52. package/src/Schema.ts +23 -23
  53. package/src/Set.ts +1 -1
  54. package/src/Store.ts +11 -11
  55. package/src/_ext/Array.ts +1 -1
  56. package/src/client/InvalidationKeys.ts +3 -3
  57. package/src/client/apiClientFactory.ts +9 -9
  58. package/src/client/clientFor.ts +3 -3
  59. package/src/client/errors.ts +1 -1
  60. package/src/client/makeClient.ts +4 -4
  61. package/src/http/Request.ts +2 -2
  62. package/src/http.ts +1 -1
  63. package/src/ids.ts +2 -2
  64. package/src/index.ts +19 -19
  65. package/src/middleware.ts +1 -1
  66. package/src/rpc/Invalidation.ts +7 -7
  67. package/src/rpc/MiddlewareMaker.ts +6 -6
  68. package/src/rpc/RpcContextMap.ts +2 -2
  69. package/src/rpc/RpcMiddleware.ts +2 -2
  70. package/src/rpc.ts +4 -4
  71. package/src/runtime.ts +4 -4
  72. package/src/setupRequest.ts +6 -6
  73. package/src/toast.ts +4 -4
  74. package/src/transform.ts +1 -1
  75. package/src/utils/logger.ts +1 -1
  76. package/src/utils.ts +2 -2
  77. package/src/validation.ts +2 -2
  78. package/src/withToast.ts +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @effect-app/prelude
2
2
 
3
+ ## 4.0.0-beta.268
4
+
5
+ ### Patch Changes
6
+
7
+ - acfdc9e: Point development package exports at TypeScript sources while keeping published exports on compiled dist files.
8
+
3
9
  ## 4.0.0-beta.267
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,5 @@
1
- export * from "./types/errors.ts";
2
- export * from "./types/fields.ts";
3
- export * from "./types/utils.ts";
4
- export * from "./types/validator.ts";
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
@@ -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.js"
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.js"
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.js"
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.ts";
2
- export * from "./client/clientFor.ts";
3
- export * from "./client/errors.ts";
4
- export * from "./client/InvalidationKeys.ts";
5
- export * from "./client/makeClient.ts";
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
@@ -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.js" // separate module to avoid circular deps
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.js"
107
- * import * as UserRsc from "../User/queries.js"
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.ts";
7
- export * from "./utils/extend.ts";
8
- export * from "./utils/gen.ts";
9
- export * from "./utils/logger.ts";
10
- export * from "./utils/logLevel.ts";
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.267",
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.js"
6
- import * as Option from "./Option.js"
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.js"
2
- import * as Option from "./Option.js"
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.js"
6
+ import * as Array from "./Array.ts"
7
7
 
8
8
  export * from "effect/Chunk"
9
9
 
@@ -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.js"
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.js"
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.js"
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.js"
12
- import { curry } from "./Function.js"
13
- import { typedKeysOf } from "./utils.js"
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.js"
3
- import * as Context from "./Context.js"
4
- import type * as Effect from "./Effect.js"
5
- import type { Email } from "./Schema.js"
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
@@ -1,6 +1,6 @@
1
1
  import type { BuiltInObject } from "effect-app/utils"
2
2
 
3
- import type { Primitive } from "./Widen.type.js"
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.js"
8
- import { type EffectGenUtils } from "./utils/gen.js"
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.js"
2
- import * as Context from "../../Context.js"
3
- import * as Effect from "../../Effect.js"
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.js"
7
- import type { NonEmptyArray } from "../../Array.js"
8
- import { type InvalidStateError, NotFoundError, type OptimisticConcurrencyException } from "../../client/errors.js"
9
- import * as Effect from "../../Effect.js"
10
- import * as Option from "../../Option.js"
11
- import { type FixEnv, type PureEnv, runTerm } from "../../Pure.js"
12
- import { AnyPureDSL } from "../dsl.js"
13
- import type { FieldValues } from "../filter/types.js"
14
- import type { Query, QueryEnd, QueryWhere } from "../query.js"
15
- import * as Q from "../query.js"
16
- import type { Repository } from "./service.js"
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.js"
14
- import type { NonEmptyReadonlyArray } from "../../../Array.js"
15
- import { toNonEmptyArray } from "../../../Array.js"
16
- import * as Chunk from "../../../Chunk.js"
17
- import { NotFoundError } from "../../../client/errors.js"
18
- import * as Context from "../../../Context.js"
19
- import * as Effect from "../../../Effect.js"
20
- import { flatMapOption } from "../../../Effect.js"
21
- import * as Option from "../../../Option.js"
22
- import * as S from "../../../Schema.js"
23
- import { type Codec, NonNegativeInt } from "../../../Schema.js"
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.js"
26
- import type { FieldValues } from "../../filter/types.js"
27
- import * as Q from "../../query.js"
28
- import type { ChangeFeed, ChangeFeedEvent, Repository } from "../service.js"
29
- import { ValidationError, ValidationResult } from "../validation.js"
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.js"
4
- import type * as Effect from "../../Effect.js"
5
- import type * as Option from "../../Option.js"
6
- import type * as S from "../../Schema.js"
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.js"
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.js"
11
- import type * as Context from "../../Context.js"
12
- import * as Effect from "../../Effect.js"
13
- import type * as S from "../../Schema.js"
14
- import type { StoreConfig, StoreMaker } from "../../Store.js"
15
- import type { FieldValues } from "../filter/types.js"
16
- import { type ExtendedRepository, extendRepo } from "./ext.js"
17
- import { makeRepoInternal } from "./internal/internal.js"
18
- import { RepositoryRegistry } from "./Registry.js"
19
- import type { Repository } from "./service.js"
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.js"
4
- import type * as Effect from "../../Effect.js"
5
- import type * as Option from "../../Option.js"
6
- import type * as S from "../../Schema.js"
7
- import type { NonNegativeInt } from "../../Schema/numbers.js"
8
- import type { FieldValues, IsNever, ResolveFirstLevel } from "../filter/types.js"
9
- import type { QAll, Query, QueryProjection, RawQuery } from "../query.js"
10
- import type { Mapped } from "./legacy.js"
11
- import type { ValidationResult } from "./validation.js"
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.
@@ -1,5 +1,5 @@
1
- import * as S from "../../Schema.js"
2
- import { NonNegativeInt } from "../../Schema.js"
1
+ import * as S from "../../Schema.ts"
2
+ import { NonNegativeInt } from "../../Schema.ts"
3
3
 
4
4
  /**
5
5
  * Represents a single validation error when decoding a repository item.
@@ -1,6 +1,6 @@
1
- export * from "./Repository/ext.js"
2
- export * from "./Repository/legacy.js"
3
- export { makeRepo } from "./Repository/makeRepo.js"
4
- export * from "./Repository/Registry.js"
5
- export * from "./Repository/service.js"
6
- export * from "./Repository/validation.js"
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.js"
3
- import { toNonEmptyArray } from "../Array.js"
4
- import * as Effect from "../Effect.js"
5
- import { type FixEnv, get, logMany, type Pure, type PureEnvEnv, type PureLogT, set } from "../Pure.js"
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,4 +1,4 @@
1
- import { type RelationDirection } from "../query.js"
1
+ import { type RelationDirection } from "../query.ts"
2
2
 
3
3
  export type InOps =
4
4
  | "in"
@@ -1,6 +1,6 @@
1
- import type { FieldValues, InternalFieldName } from "./fields.js"
2
- import type { BrowserNativeObject, IsAny, LiteralUnion, Merge } from "./utils.js"
3
- import type { RegisterOptions, ValidateResult } from "./validator.js"
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,5 +1,5 @@
1
- import type { IsFlatObject } from "./utils.js"
2
- import type { RegisterOptions } from "./validator.js"
1
+ import type { IsFlatObject } from "./utils.ts"
2
+ import type { RegisterOptions } from "./validator.ts"
3
3
 
4
4
  export type InternalFieldName = string
5
5
 
@@ -1,4 +1,4 @@
1
- import type { IsAny, IsNever } from "../utils.js"
1
+ import type { IsAny, IsNever } from "../utils.ts"
2
2
 
3
3
  /**
4
4
  * Type alias to `string` which describes a lodash-like path through an object.
@@ -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.js"
4
- import type { BrowserNativeObject, Equals, IsLiteral, IsNever, Primitive } from "../utils.js"
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.js"
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.js"
4
- export type { FieldPath, FieldPathByValue, FieldPathValue, FieldPathValues, Path, PathValue } from "./eager.js"
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.js"
2
- import type { FieldValues, InternalFieldName } from "./fields.js"
3
- import type { FieldPath, FieldPathValue } from "./path/index.js"
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
 
@@ -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.js"
9
- import type * as S from "../../Schema.js"
10
- import type { NonNegativeInt } from "../../Schema.js"
11
- import type { Ops } from "../filter/filterApi.js"
12
- import type { FieldValues } from "../filter/types.js"
13
- import type { FieldPath, FieldPathValue, RefineFieldPathValue } from "../filter/types/path/eager.js"
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.js"
7
- import { toNonEmptyArray } from "../../Array.js"
8
- import * as Option from "../../Option.js"
9
- import * as S from "../../Schema.js"
10
- import { dropUndefinedT } from "../../utils.js"
11
- import type { FilterResult } from "../filter/filterApi.js"
12
- import type { FieldValues } from "../filter/types.js"
13
- import type { FieldPath } from "../filter/types/path/eager.js"
14
- import { make, type Q, type QAll } from "../query/dsl.js"
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" }
@@ -1,5 +1,5 @@
1
- export * from "./query/dsl.js"
2
- export * from "./query/new-kid-interpreter.js"
1
+ export * from "./query/dsl.ts"
2
+ export * from "./query/new-kid-interpreter.ts"
3
3
 
4
4
  export interface RawQuery<Encoded, Out> {
5
5
  cosmos: (vals: { name: string }) => {
package/src/Model.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./Model/dsl.js"
2
- export * as Q from "./Model/query.js"
3
- export { makeRepo } from "./Model/Repository.js"
4
- export { type RegisteredRepository, RepositoryRegistry, RepositoryRegistryLive } from "./Model/Repository.js"
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"
@@ -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.js"
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.js"
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.js"
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.js"
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.js"
7
- import { tuple } from "./Function.js"
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.js"
3
- import type * as Effect from "./Effect.js"
4
- import { RequestContext } from "./RequestContext.js"
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>(