@confect/test 9.2.4 → 10.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,21 +1,39 @@
1
1
  # @confect/test
2
2
 
3
- ## 9.2.4
4
-
5
- ## 9.2.3
3
+ ## 10.0.0-next.1
6
4
 
7
5
  ### Patch Changes
8
6
 
9
- - @confect/core@9.2.3
10
- - @confect/server@9.2.3
7
+ - 4d98ea8: Raise the required `effect` peer version to `^4.0.0-beta.98` (from `^4.0.0-beta.97`).
8
+
9
+ `effect`'s `SchemaError` is now exposed as its own public module (`effect/SchemaError`), which changes the import path TypeScript picks when Confect emits `.d.ts` declarations that reference `Schema.SchemaError` (for example in generated `services.d.ts`). Existing `Schema.SchemaError` / `Schema.isSchemaError` usage is unaffected — this is purely a declaration-emit detail that consumers relying on generated types may notice.
10
+
11
+ - Updated dependencies [4d98ea8]
12
+ - @confect/core@10.0.0-next.1
13
+ - @confect/server@10.0.0-next.1
14
+
15
+ ## 10.0.0-next.0
16
+
17
+ ### Major Changes
18
+
19
+ - 70e313e: Migrate to Effect v4. All `@confect/*` packages now require `effect@^4.0.0-beta.97`; `@effect/platform` and `@effect/cli` are no longer dependencies (their functionality moved into `effect` core and `effect/unstable/*`).
11
20
 
12
- ## 9.2.2
21
+ Breaking changes for users:
22
+ - **Schemas** follow Effect v4's Schema API: `Schema.Union([a, b])` (array form), `Schema.Literals([...])` for literal unions, `Schema.optionalKey` in place of `optionalWith({ exact: true })`, `Schema.TaggedErrorClass` in place of `Schema.TaggedError`, and checks like `Schema.String.check(Schema.isMaxLength(...))` in place of piped filters.
23
+ - **Option-returning functions** must use a codec with a serializable encoded form, such as `Schema.OptionFromNullOr(...)` — v4's `Schema.Option` encodes to an `Option` instance, which is not a Convex value.
24
+ - **Table schemas** may now be transformations (`Schema.decodeTo` chains, `Schema.encodeKeys`), branded structs, suspended schemas, or unions of these — Convex's system fields are carried through the whole encoding chain. Schemas that do not resolve to an object shape at every step (such as `Schema.Class`) are rejected with a descriptive error when the table is defined.
25
+ - **Clients**: decode failures surface as `SchemaError` rather than `ParseError` in `@confect/js` and `@confect/react`, and `@confect/react`'s `useMutation`/`useAction` handles with an `error` schema now resolve to `Result` (v4's replacement for `Either`).
26
+ - **HTTP** is now mounted through the renamed `HttpRouter` module (formerly `HttpApi`). `HttpRouter.make(routes)` takes a single route-registering `Layer` composed from Effect's own `effect/unstable/http` and `effect/unstable/httpapi` modules — `HttpApiBuilder.layer(api)` (with group handler layers supplied via `Layer.provide`; a missing group is a compile-time error), `HttpApiScalar.layer` for docs, `HttpRouter.add` for plain routes, and `HttpRouter.middleware(fn, { global: true })` for middleware, merged with `Layer.mergeAll`. The per-path-prefix record and its `api`/`apiLive`/`middleware`/`scalar` options are gone; Confect registers one catch-all Convex HTTP action at `/`, and plain Convex routes added to the returned router still take precedence. Handlers, middleware, and route-layer construction all run with Confect's Convex-aware `ConfigProvider` in context.
27
+ - **Node actions** use `effect/unstable/process` (`ChildProcessSpawner`) and `@effect/platform-node`'s `NodeServices` in place of `@effect/platform` `Command`/`NodeContext`.
28
+ - **Configuration**: Confect's Convex-aware `ConfigProvider` treats empty-string environment variables as missing values (matching Effect v4's built-in providers), so `Config.withDefault` and `Config.option` recover from them.
29
+ - **CLI**: a malformed `convex.json` now fails codegen with a descriptive error instead of being silently ignored.
30
+ - Confect queries no longer stub the global `Date.now`. Queries run with a `Clock` whose unsafe accessors return constants, so Effect-internal reads (log timestamps, spans) never evict a query from Convex's cache; explicit time reads — `Clock.currentTimeMillis`/`currentTimeNanos` or a raw `Date.now()` call — opt the query out and evict as they honestly should.
13
31
 
14
32
  ### Patch Changes
15
33
 
16
- - Updated dependencies [7e7b2a4]
17
- - @confect/server@9.2.2
18
- - @confect/core@9.2.2
34
+ - Updated dependencies [70e313e]
35
+ - @confect/core@10.0.0-next.0
36
+ - @confect/server@10.0.0-next.0
19
37
 
20
38
  ## 9.2.1
21
39
 
@@ -3,18 +3,17 @@ import type { DatabaseSchema } from "@confect/server";
3
3
  import { RegisteredConvexFunction } from "@confect/server";
4
4
  import type { GenericSchema, SchemaDefinition, UserIdentity } from "convex/server";
5
5
  import type { Value } from "convex/values";
6
- import type { ParseResult } from "effect";
7
6
  import * as Context from "effect/Context";
8
7
  import * as Effect from "effect/Effect";
9
8
  import * as Layer from "effect/Layer";
10
9
  import * as Schema from "effect/Schema";
11
10
  export type TestConfectWithoutIdentity<ConfectSchema extends DatabaseSchema.AnyWithProps> = {
12
- query: <QueryRef extends Ref.AnyQuery>(queryRef: QueryRef, ...args: Ref.OptionalArgs<QueryRef>) => Effect.Effect<Ref.Returns<QueryRef>, Ref.Error<QueryRef> | ParseResult.ParseError>;
13
- mutation: <MutationRef extends Ref.AnyMutation>(mutationRef: MutationRef, ...args: Ref.OptionalArgs<MutationRef>) => Effect.Effect<Ref.Returns<MutationRef>, Ref.Error<MutationRef> | ParseResult.ParseError>;
14
- action: <ActionRef extends Ref.AnyAction>(actionRef: ActionRef, ...args: Ref.OptionalArgs<ActionRef>) => Effect.Effect<Ref.Returns<ActionRef>, Ref.Error<ActionRef> | ParseResult.ParseError>;
11
+ query: <QueryRef extends Ref.AnyQuery>(queryRef: QueryRef, ...args: Ref.OptionalArgs<QueryRef>) => Effect.Effect<Ref.Returns<QueryRef>, Ref.Error<QueryRef> | Schema.SchemaError>;
12
+ mutation: <MutationRef extends Ref.AnyMutation>(mutationRef: MutationRef, ...args: Ref.OptionalArgs<MutationRef>) => Effect.Effect<Ref.Returns<MutationRef>, Ref.Error<MutationRef> | Schema.SchemaError>;
13
+ action: <ActionRef extends Ref.AnyAction>(actionRef: ActionRef, ...args: Ref.OptionalArgs<ActionRef>) => Effect.Effect<Ref.Returns<ActionRef>, Ref.Error<ActionRef> | Schema.SchemaError>;
15
14
  run: {
16
15
  <E>(handler: Effect.Effect<void, E, RegisteredConvexFunction.MutationServices<ConfectSchema>>): Effect.Effect<void>;
17
- <A, B extends Value, E>(handler: Effect.Effect<A, E, RegisteredConvexFunction.MutationServices<ConfectSchema>>, returns: Schema.Schema<A, B>): Effect.Effect<A, ParseResult.ParseError>;
16
+ <A, B extends Value, E>(handler: Effect.Effect<A, E, RegisteredConvexFunction.MutationServices<ConfectSchema>>, returns: Schema.Codec<A, B>): Effect.Effect<A, Schema.SchemaError>;
18
17
  };
19
18
  fetch: (pathQueryFragment: string, init?: RequestInit) => Effect.Effect<Response>;
20
19
  finishInProgressScheduledFunctions: () => Effect.Effect<void>;
@@ -23,6 +22,6 @@ export type TestConfectWithoutIdentity<ConfectSchema extends DatabaseSchema.AnyW
23
22
  export type TestConfect<ConfectSchema extends DatabaseSchema.AnyWithProps> = {
24
23
  withIdentity: (userIdentity: Partial<UserIdentity>) => TestConfectWithoutIdentity<ConfectSchema>;
25
24
  } & TestConfectWithoutIdentity<ConfectSchema>;
26
- export declare const TestConfect: <ConfectSchema extends DatabaseSchema.AnyWithProps>() => Context.Tag<TestConfect<ConfectSchema>, TestConfect<ConfectSchema>>;
25
+ export declare const TestConfect: <ConfectSchema extends DatabaseSchema.AnyWithProps>() => Context.Service<TestConfect<ConfectSchema>, TestConfect<ConfectSchema>>;
27
26
  export declare const layer: <DatabaseSchema_ extends DatabaseSchema.AnyWithProps>(databaseSchema: DatabaseSchema_, convexSchemaDefinition: SchemaDefinition<GenericSchema, true>, modules: Record<string, () => Promise<any>>) => () => Layer.Layer<TestConfect<DatabaseSchema_>>;
28
27
  //# sourceMappingURL=TestConfect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestConfect.d.ts","sourceRoot":"","sources":["../src/TestConfect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAM3D,OAAO,KAAK,EAEV,aAAa,EACb,gBAAgB,EACh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,aAAa,SAAS,cAAc,CAAC,YAAY,IAAI;IAC3E,YAAY,EAAE,CACZ,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,KAChC,0BAA0B,CAAC,aAAa,CAAC,CAAC;CAChD,GAAG,0BAA0B,CAAC,aAAa,CAAC,CAAC;AAE9C,eAAO,MAAM,WAAW,GACtB,aAAa,SAAS,cAAc,CAAC,YAAY,8EAC4B,CAAC;AAgLhF,eAAO,MAAM,KAAK,GACf,eAAe,SAAS,cAAc,CAAC,YAAY,EAClD,gBAAgB,eAAe,EAC/B,wBAAwB,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,EAC7D,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,WAEzC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,CAAC,CAQzC,CAAC"}
@@ -6,15 +6,14 @@ import * as Context from "effect/Context";
6
6
  import * as Effect from "effect/Effect";
7
7
  import * as Layer from "effect/Layer";
8
8
  import * as Schema from "effect/Schema";
9
+
9
10
  //#region src/TestConfect.ts
10
11
  var TestConfect_exports = /* @__PURE__ */ __exportAll({
11
12
  TestConfect: () => TestConfect,
12
13
  layer: () => layer
13
14
  });
14
- const TestConfect = () => Context.GenericTag("@confect/test/TestConfect");
15
+ const TestConfect = () => Context.Service("@confect/test/TestConfect");
15
16
  var TestConfectImplWithoutIdentity = class {
16
- confectSchema;
17
- testConvex;
18
17
  constructor(confectSchema, testConvex) {
19
18
  this.confectSchema = confectSchema;
20
19
  this.testConvex = testConvex;
@@ -24,15 +23,13 @@ var TestConfectImplWithoutIdentity = class {
24
23
  action = (actionRef, ...args) => Ref.runWithCodec(actionRef, args[0] ?? {}, (functionReference, encodedArgs) => this.testConvex.action(functionReference, encodedArgs));
25
24
  run = ((handler, returns) => {
26
25
  const makeMutationLayer = (mutationCtx) => RegisteredConvexFunction.mutationLayer(this.confectSchema, mutationCtx);
27
- return returns === void 0 ? Effect.promise(() => this.testConvex.run((mutationCtx) => Effect.runPromise(handler.pipe(Effect.asVoid, Effect.provide(makeMutationLayer(mutationCtx)))))) : Effect.promise(() => this.testConvex.run((mutationCtx) => Effect.runPromise(handler.pipe(Effect.andThen(Schema.encode(returns)), Effect.provide(makeMutationLayer(mutationCtx)))))).pipe(Effect.andThen(Schema.decode(returns)));
26
+ return returns === void 0 ? Effect.promise(() => this.testConvex.run((mutationCtx) => Effect.runPromise(handler.pipe(Effect.asVoid, Effect.provide(makeMutationLayer(mutationCtx)))))) : Effect.promise(() => this.testConvex.run((mutationCtx) => Effect.runPromise(handler.pipe(Effect.andThen(Schema.encodeEffect(returns)), Effect.provide(makeMutationLayer(mutationCtx)))))).pipe(Effect.andThen(Schema.decodeEffect(returns)));
28
27
  });
29
28
  fetch = (pathQueryFragment, init) => Effect.promise(() => this.testConvex.fetch(pathQueryFragment, init));
30
29
  finishInProgressScheduledFunctions = () => Effect.promise(() => this.testConvex.finishInProgressScheduledFunctions());
31
30
  finishAllScheduledFunctions = (advanceTimers) => Effect.promise(() => this.testConvex.finishAllScheduledFunctions(advanceTimers));
32
31
  };
33
32
  var TestConfectImpl = class {
34
- confectSchema;
35
- testConvex;
36
33
  testConfectImplWithoutIdentity;
37
34
  constructor(confectSchema, testConvex) {
38
35
  this.confectSchema = confectSchema;
@@ -49,7 +46,7 @@ var TestConfectImpl = class {
49
46
  finishAllScheduledFunctions = (advanceTimers) => this.testConfectImplWithoutIdentity.finishAllScheduledFunctions(advanceTimers);
50
47
  };
51
48
  const layer = (databaseSchema, convexSchemaDefinition, modules) => () => Layer.sync(TestConfect(), () => new TestConfectImpl(databaseSchema, convexTest(convexSchemaDefinition, modules)));
49
+
52
50
  //#endregion
53
51
  export { TestConfect, TestConfect_exports, layer };
54
-
55
52
  //# sourceMappingURL=TestConfect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TestConfect.js","names":[],"sources":["../src/TestConfect.ts"],"sourcesContent":["import { Ref } from \"@confect/core\";\nimport type { DatabaseSchema, DataModel } from \"@confect/server\";\nimport { RegisteredConvexFunction } from \"@confect/server\";\nimport type {\n TestConvexForDataModel,\n TestConvexForDataModelAndIdentity,\n} from \"convex-test\";\nimport { convexTest } from \"convex-test\";\nimport type {\n GenericMutationCtx,\n GenericSchema,\n SchemaDefinition,\n UserIdentity,\n} from \"convex/server\";\nimport type { Value } from \"convex/values\";\nimport type { ParseResult } from \"effect\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\n\nexport type TestConfectWithoutIdentity<\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n> = {\n query: <QueryRef extends Ref.AnyQuery>(\n queryRef: QueryRef,\n ...args: Ref.OptionalArgs<QueryRef>\n ) => Effect.Effect<\n Ref.Returns<QueryRef>,\n Ref.Error<QueryRef> | ParseResult.ParseError\n >;\n mutation: <MutationRef extends Ref.AnyMutation>(\n mutationRef: MutationRef,\n ...args: Ref.OptionalArgs<MutationRef>\n ) => Effect.Effect<\n Ref.Returns<MutationRef>,\n Ref.Error<MutationRef> | ParseResult.ParseError\n >;\n action: <ActionRef extends Ref.AnyAction>(\n actionRef: ActionRef,\n ...args: Ref.OptionalArgs<ActionRef>\n ) => Effect.Effect<\n Ref.Returns<ActionRef>,\n Ref.Error<ActionRef> | ParseResult.ParseError\n >;\n run: {\n <E>(\n handler: Effect.Effect<\n void,\n E,\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >,\n ): Effect.Effect<void>;\n <A, B extends Value, E>(\n handler: Effect.Effect<\n A,\n E,\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >,\n returns: Schema.Schema<A, B>,\n ): Effect.Effect<A, ParseResult.ParseError>;\n };\n fetch: (\n pathQueryFragment: string,\n init?: RequestInit,\n ) => Effect.Effect<Response>;\n finishInProgressScheduledFunctions: () => Effect.Effect<void>;\n finishAllScheduledFunctions: (\n advanceTimers: () => void,\n ) => Effect.Effect<void>;\n};\n\nexport type TestConfect<ConfectSchema extends DatabaseSchema.AnyWithProps> = {\n withIdentity: (\n userIdentity: Partial<UserIdentity>,\n ) => TestConfectWithoutIdentity<ConfectSchema>;\n} & TestConfectWithoutIdentity<ConfectSchema>;\n\nexport const TestConfect = <\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n>() =>\n Context.GenericTag<TestConfect<ConfectSchema>>(\"@confect/test/TestConfect\");\n\nclass TestConfectImplWithoutIdentity<\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n> implements TestConfectWithoutIdentity<ConfectSchema> {\n constructor(\n private confectSchema: ConfectSchema,\n private testConvex: TestConvexForDataModel<\n DataModel.ToConvex<DataModel.FromSchema<ConfectSchema>>\n >,\n ) {}\n\n readonly query = <QueryRef extends Ref.AnyQuery>(\n queryRef: QueryRef,\n ...args: Ref.OptionalArgs<QueryRef>\n ): Effect.Effect<\n Ref.Returns<QueryRef>,\n Ref.Error<QueryRef> | ParseResult.ParseError\n > =>\n Ref.runWithCodec(\n queryRef,\n (args[0] ?? {}) as Ref.Args<QueryRef>,\n (functionReference, encodedArgs) =>\n this.testConvex.query(functionReference as any, encodedArgs),\n );\n\n readonly mutation = <MutationRef extends Ref.AnyMutation>(\n mutationRef: MutationRef,\n ...args: Ref.OptionalArgs<MutationRef>\n ): Effect.Effect<\n Ref.Returns<MutationRef>,\n Ref.Error<MutationRef> | ParseResult.ParseError\n > =>\n Ref.runWithCodec(\n mutationRef,\n (args[0] ?? {}) as Ref.Args<MutationRef>,\n (functionReference, encodedArgs) =>\n this.testConvex.mutation(functionReference as any, encodedArgs),\n );\n\n readonly action = <ActionRef extends Ref.AnyAction>(\n actionRef: ActionRef,\n ...args: Ref.OptionalArgs<ActionRef>\n ): Effect.Effect<\n Ref.Returns<ActionRef>,\n Ref.Error<ActionRef> | ParseResult.ParseError\n > =>\n Ref.runWithCodec(\n actionRef,\n (args[0] ?? {}) as Ref.Args<ActionRef>,\n (functionReference, encodedArgs) =>\n this.testConvex.action(functionReference as any, encodedArgs),\n );\n\n readonly run: TestConfectWithoutIdentity<ConfectSchema>[\"run\"] = (<\n A,\n B extends Value,\n E,\n >(\n handler: Effect.Effect<\n A,\n E,\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >,\n returns?: Schema.Schema<A, B>,\n ): Effect.Effect<void> | Effect.Effect<A, ParseResult.ParseError> => {\n const makeMutationLayer = (\n mutationCtx: GenericMutationCtx<\n DataModel.ToConvex<DataModel.FromSchema<ConfectSchema>>\n >,\n ): Layer.Layer<RegisteredConvexFunction.MutationServices<ConfectSchema>> =>\n RegisteredConvexFunction.mutationLayer(\n this.confectSchema,\n mutationCtx,\n ) as Layer.Layer<\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >;\n\n return returns === undefined\n ? Effect.promise(() =>\n this.testConvex.run((mutationCtx) =>\n Effect.runPromise(\n handler.pipe(\n Effect.asVoid,\n Effect.provide(makeMutationLayer(mutationCtx)),\n ),\n ),\n ),\n )\n : Effect.promise(() =>\n this.testConvex.run((mutationCtx) =>\n Effect.runPromise(\n handler.pipe(\n Effect.andThen(Schema.encode(returns)),\n Effect.provide(makeMutationLayer(mutationCtx)),\n ),\n ),\n ),\n ).pipe(Effect.andThen(Schema.decode(returns)));\n }) as TestConfectWithoutIdentity<ConfectSchema>[\"run\"];\n\n readonly fetch = <PathQueryFragment extends string>(\n pathQueryFragment: PathQueryFragment,\n init?: RequestInit,\n ) => Effect.promise(() => this.testConvex.fetch(pathQueryFragment, init));\n\n readonly finishInProgressScheduledFunctions = () =>\n Effect.promise(() => this.testConvex.finishInProgressScheduledFunctions());\n\n readonly finishAllScheduledFunctions = (advanceTimers: () => void) =>\n Effect.promise(() =>\n this.testConvex.finishAllScheduledFunctions(advanceTimers),\n );\n}\n\nclass TestConfectImpl<\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n> implements TestConfect<ConfectSchema> {\n private readonly testConfectImplWithoutIdentity: TestConfectImplWithoutIdentity<ConfectSchema>;\n\n constructor(\n private confectSchema: ConfectSchema,\n private testConvex: TestConvexForDataModelAndIdentity<\n DataModel.ToConvex<DataModel.FromSchema<ConfectSchema>>\n >,\n ) {\n this.testConfectImplWithoutIdentity = new TestConfectImplWithoutIdentity(\n confectSchema,\n testConvex,\n );\n }\n\n readonly withIdentity = (userIdentity: Partial<UserIdentity>) =>\n new TestConfectImplWithoutIdentity(\n this.confectSchema,\n this.testConvex.withIdentity(userIdentity),\n );\n\n readonly query = <QueryRef extends Ref.AnyQuery>(\n queryRef: QueryRef,\n ...args: Ref.OptionalArgs<QueryRef>\n ) => this.testConfectImplWithoutIdentity.query(queryRef, ...args);\n\n readonly mutation = <MutationRef extends Ref.AnyMutation>(\n mutationRef: MutationRef,\n ...args: Ref.OptionalArgs<MutationRef>\n ) => this.testConfectImplWithoutIdentity.mutation(mutationRef, ...args);\n\n readonly action = <ActionRef extends Ref.AnyAction>(\n actionRef: ActionRef,\n ...args: Ref.OptionalArgs<ActionRef>\n ) => this.testConfectImplWithoutIdentity.action(actionRef, ...args);\n\n readonly run: TestConfect<ConfectSchema>[\"run\"] = ((\n handler: any,\n returns?: any,\n ) =>\n this.testConfectImplWithoutIdentity.run(\n handler,\n returns,\n )) as TestConfect<ConfectSchema>[\"run\"];\n\n readonly fetch = <PathQueryFragment extends string>(\n pathQueryFragment: PathQueryFragment,\n init?: RequestInit,\n ) => this.testConfectImplWithoutIdentity.fetch(pathQueryFragment, init);\n\n readonly finishInProgressScheduledFunctions = () =>\n this.testConfectImplWithoutIdentity.finishInProgressScheduledFunctions();\n\n readonly finishAllScheduledFunctions = (advanceTimers: () => void) =>\n this.testConfectImplWithoutIdentity.finishAllScheduledFunctions(\n advanceTimers,\n );\n}\n\nexport const layer =\n <DatabaseSchema_ extends DatabaseSchema.AnyWithProps>(\n databaseSchema: DatabaseSchema_,\n convexSchemaDefinition: SchemaDefinition<GenericSchema, true>,\n modules: Record<string, () => Promise<any>>,\n ) =>\n (): Layer.Layer<TestConfect<DatabaseSchema_>> =>\n Layer.sync(\n TestConfect<DatabaseSchema_>(),\n () =>\n new TestConfectImpl(\n databaseSchema,\n convexTest(convexSchemaDefinition, modules) as any,\n ),\n );\n"],"mappings":";;;;;;;;;;;;;AA8EA,MAAa,oBAGX,QAAQ,WAAuC,2BAA2B;AAE5E,IAAM,iCAAN,MAEuD;CAE3C;CACA;CAFV,YACE,eACA,YAGA;EAJQ,KAAA,gBAAA;EACA,KAAA,aAAA;CAGP;CAEH,SACE,UACA,GAAG,SAKH,IAAI,aACF,UACC,KAAK,MAAM,CAAC,IACZ,mBAAmB,gBAClB,KAAK,WAAW,MAAM,mBAA0B,WAAW,CAC/D;CAEF,YACE,aACA,GAAG,SAKH,IAAI,aACF,aACC,KAAK,MAAM,CAAC,IACZ,mBAAmB,gBAClB,KAAK,WAAW,SAAS,mBAA0B,WAAW,CAClE;CAEF,UACE,WACA,GAAG,SAKH,IAAI,aACF,WACC,KAAK,MAAM,CAAC,IACZ,mBAAmB,gBAClB,KAAK,WAAW,OAAO,mBAA0B,WAAW,CAChE;CAEF,QAKE,SAKA,YACmE;EACnE,MAAM,qBACJ,gBAIA,yBAAyB,cACvB,KAAK,eACL,WACF;EAIF,OAAO,YAAY,KAAA,IACf,OAAO,cACL,KAAK,WAAW,KAAK,gBACnB,OAAO,WACL,QAAQ,KACN,OAAO,QACP,OAAO,QAAQ,kBAAkB,WAAW,CAAC,CAC/C,CACF,CACF,CACF,IACA,OAAO,cACL,KAAK,WAAW,KAAK,gBACnB,OAAO,WACL,QAAQ,KACN,OAAO,QAAQ,OAAO,OAAO,OAAO,CAAC,GACrC,OAAO,QAAQ,kBAAkB,WAAW,CAAC,CAC/C,CACF,CACF,CACF,CAAC,CAAC,KAAK,OAAO,QAAQ,OAAO,OAAO,OAAO,CAAC,CAAC;CACnD;CAEA,SACE,mBACA,SACG,OAAO,cAAc,KAAK,WAAW,MAAM,mBAAmB,IAAI,CAAC;CAExE,2CACE,OAAO,cAAc,KAAK,WAAW,mCAAmC,CAAC;CAE3E,+BAAwC,kBACtC,OAAO,cACL,KAAK,WAAW,4BAA4B,aAAa,CAC3D;AACJ;AAEA,IAAM,kBAAN,MAEwC;CAI5B;CACA;CAJV;CAEA,YACE,eACA,YAGA;EAJQ,KAAA,gBAAA;EACA,KAAA,aAAA;EAIR,KAAK,iCAAiC,IAAI,+BACxC,eACA,UACF;CACF;CAEA,gBAAyB,iBACvB,IAAI,+BACF,KAAK,eACL,KAAK,WAAW,aAAa,YAAY,CAC3C;CAEF,SACE,UACA,GAAG,SACA,KAAK,+BAA+B,MAAM,UAAU,GAAG,IAAI;CAEhE,YACE,aACA,GAAG,SACA,KAAK,+BAA+B,SAAS,aAAa,GAAG,IAAI;CAEtE,UACE,WACA,GAAG,SACA,KAAK,+BAA+B,OAAO,WAAW,GAAG,IAAI;CAElE,QACE,SACA,YAEA,KAAK,+BAA+B,IAClC,SACA,OACF;CAEF,SACE,mBACA,SACG,KAAK,+BAA+B,MAAM,mBAAmB,IAAI;CAEtE,2CACE,KAAK,+BAA+B,mCAAmC;CAEzE,+BAAwC,kBACtC,KAAK,+BAA+B,4BAClC,aACF;AACJ;AAEA,MAAa,SAET,gBACA,wBACA,kBAGA,MAAM,KACJ,YAA6B,SAE3B,IAAI,gBACF,gBACA,WAAW,wBAAwB,OAAO,CAC5C,CACJ"}
1
+ {"version":3,"file":"TestConfect.js","names":[],"sources":["../src/TestConfect.ts"],"sourcesContent":["import { Ref } from \"@confect/core\";\nimport type { DatabaseSchema, DataModel } from \"@confect/server\";\nimport { RegisteredConvexFunction } from \"@confect/server\";\nimport type {\n TestConvexForDataModel,\n TestConvexForDataModelAndIdentity,\n} from \"convex-test\";\nimport { convexTest } from \"convex-test\";\nimport type {\n GenericMutationCtx,\n GenericSchema,\n SchemaDefinition,\n UserIdentity,\n} from \"convex/server\";\nimport type { Value } from \"convex/values\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schema from \"effect/Schema\";\n\nexport type TestConfectWithoutIdentity<\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n> = {\n query: <QueryRef extends Ref.AnyQuery>(\n queryRef: QueryRef,\n ...args: Ref.OptionalArgs<QueryRef>\n ) => Effect.Effect<\n Ref.Returns<QueryRef>,\n Ref.Error<QueryRef> | Schema.SchemaError\n >;\n mutation: <MutationRef extends Ref.AnyMutation>(\n mutationRef: MutationRef,\n ...args: Ref.OptionalArgs<MutationRef>\n ) => Effect.Effect<\n Ref.Returns<MutationRef>,\n Ref.Error<MutationRef> | Schema.SchemaError\n >;\n action: <ActionRef extends Ref.AnyAction>(\n actionRef: ActionRef,\n ...args: Ref.OptionalArgs<ActionRef>\n ) => Effect.Effect<\n Ref.Returns<ActionRef>,\n Ref.Error<ActionRef> | Schema.SchemaError\n >;\n run: {\n <E>(\n handler: Effect.Effect<\n void,\n E,\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >,\n ): Effect.Effect<void>;\n <A, B extends Value, E>(\n handler: Effect.Effect<\n A,\n E,\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >,\n returns: Schema.Codec<A, B>,\n ): Effect.Effect<A, Schema.SchemaError>;\n };\n fetch: (\n pathQueryFragment: string,\n init?: RequestInit,\n ) => Effect.Effect<Response>;\n finishInProgressScheduledFunctions: () => Effect.Effect<void>;\n finishAllScheduledFunctions: (\n advanceTimers: () => void,\n ) => Effect.Effect<void>;\n};\n\nexport type TestConfect<ConfectSchema extends DatabaseSchema.AnyWithProps> = {\n withIdentity: (\n userIdentity: Partial<UserIdentity>,\n ) => TestConfectWithoutIdentity<ConfectSchema>;\n} & TestConfectWithoutIdentity<ConfectSchema>;\n\nexport const TestConfect = <\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n>() => Context.Service<TestConfect<ConfectSchema>>(\"@confect/test/TestConfect\");\n\nclass TestConfectImplWithoutIdentity<\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n> implements TestConfectWithoutIdentity<ConfectSchema> {\n constructor(\n private confectSchema: ConfectSchema,\n private testConvex: TestConvexForDataModel<\n DataModel.ToConvex<DataModel.FromSchema<ConfectSchema>>\n >,\n ) {}\n\n readonly query = <QueryRef extends Ref.AnyQuery>(\n queryRef: QueryRef,\n ...args: Ref.OptionalArgs<QueryRef>\n ): Effect.Effect<\n Ref.Returns<QueryRef>,\n Ref.Error<QueryRef> | Schema.SchemaError\n > =>\n Ref.runWithCodec(\n queryRef,\n (args[0] ?? {}) as Ref.Args<QueryRef>,\n (functionReference, encodedArgs) =>\n this.testConvex.query(functionReference as any, encodedArgs),\n );\n\n readonly mutation = <MutationRef extends Ref.AnyMutation>(\n mutationRef: MutationRef,\n ...args: Ref.OptionalArgs<MutationRef>\n ): Effect.Effect<\n Ref.Returns<MutationRef>,\n Ref.Error<MutationRef> | Schema.SchemaError\n > =>\n Ref.runWithCodec(\n mutationRef,\n (args[0] ?? {}) as Ref.Args<MutationRef>,\n (functionReference, encodedArgs) =>\n this.testConvex.mutation(functionReference as any, encodedArgs),\n );\n\n readonly action = <ActionRef extends Ref.AnyAction>(\n actionRef: ActionRef,\n ...args: Ref.OptionalArgs<ActionRef>\n ): Effect.Effect<\n Ref.Returns<ActionRef>,\n Ref.Error<ActionRef> | Schema.SchemaError\n > =>\n Ref.runWithCodec(\n actionRef,\n (args[0] ?? {}) as Ref.Args<ActionRef>,\n (functionReference, encodedArgs) =>\n this.testConvex.action(functionReference as any, encodedArgs),\n );\n\n readonly run: TestConfectWithoutIdentity<ConfectSchema>[\"run\"] = (<\n A,\n B extends Value,\n E,\n >(\n handler: Effect.Effect<\n A,\n E,\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >,\n returns?: Schema.Codec<A, B>,\n ): Effect.Effect<void> | Effect.Effect<A, Schema.SchemaError> => {\n const makeMutationLayer = (\n mutationCtx: GenericMutationCtx<\n DataModel.ToConvex<DataModel.FromSchema<ConfectSchema>>\n >,\n ): Layer.Layer<RegisteredConvexFunction.MutationServices<ConfectSchema>> =>\n RegisteredConvexFunction.mutationLayer(\n this.confectSchema,\n mutationCtx,\n ) as Layer.Layer<\n RegisteredConvexFunction.MutationServices<ConfectSchema>\n >;\n\n return returns === undefined\n ? Effect.promise(() =>\n this.testConvex.run((mutationCtx) =>\n Effect.runPromise(\n handler.pipe(\n Effect.asVoid,\n Effect.provide(makeMutationLayer(mutationCtx)),\n ),\n ),\n ),\n )\n : Effect.promise(() =>\n this.testConvex.run((mutationCtx) =>\n Effect.runPromise(\n handler.pipe(\n Effect.andThen(Schema.encodeEffect(returns)),\n Effect.provide(makeMutationLayer(mutationCtx)),\n ),\n ),\n ),\n ).pipe(Effect.andThen(Schema.decodeEffect(returns)));\n }) as TestConfectWithoutIdentity<ConfectSchema>[\"run\"];\n\n readonly fetch = <PathQueryFragment extends string>(\n pathQueryFragment: PathQueryFragment,\n init?: RequestInit,\n ) => Effect.promise(() => this.testConvex.fetch(pathQueryFragment, init));\n\n readonly finishInProgressScheduledFunctions = () =>\n Effect.promise(() => this.testConvex.finishInProgressScheduledFunctions());\n\n readonly finishAllScheduledFunctions = (advanceTimers: () => void) =>\n Effect.promise(() =>\n this.testConvex.finishAllScheduledFunctions(advanceTimers),\n );\n}\n\nclass TestConfectImpl<\n ConfectSchema extends DatabaseSchema.AnyWithProps,\n> implements TestConfect<ConfectSchema> {\n private readonly testConfectImplWithoutIdentity: TestConfectImplWithoutIdentity<ConfectSchema>;\n\n constructor(\n private confectSchema: ConfectSchema,\n private testConvex: TestConvexForDataModelAndIdentity<\n DataModel.ToConvex<DataModel.FromSchema<ConfectSchema>>\n >,\n ) {\n this.testConfectImplWithoutIdentity = new TestConfectImplWithoutIdentity(\n confectSchema,\n testConvex,\n );\n }\n\n readonly withIdentity = (userIdentity: Partial<UserIdentity>) =>\n new TestConfectImplWithoutIdentity(\n this.confectSchema,\n this.testConvex.withIdentity(userIdentity),\n );\n\n readonly query = <QueryRef extends Ref.AnyQuery>(\n queryRef: QueryRef,\n ...args: Ref.OptionalArgs<QueryRef>\n ) => this.testConfectImplWithoutIdentity.query(queryRef, ...args);\n\n readonly mutation = <MutationRef extends Ref.AnyMutation>(\n mutationRef: MutationRef,\n ...args: Ref.OptionalArgs<MutationRef>\n ) => this.testConfectImplWithoutIdentity.mutation(mutationRef, ...args);\n\n readonly action = <ActionRef extends Ref.AnyAction>(\n actionRef: ActionRef,\n ...args: Ref.OptionalArgs<ActionRef>\n ) => this.testConfectImplWithoutIdentity.action(actionRef, ...args);\n\n readonly run: TestConfect<ConfectSchema>[\"run\"] = ((\n handler: any,\n returns?: any,\n ) =>\n this.testConfectImplWithoutIdentity.run(\n handler,\n returns,\n )) as TestConfect<ConfectSchema>[\"run\"];\n\n readonly fetch = <PathQueryFragment extends string>(\n pathQueryFragment: PathQueryFragment,\n init?: RequestInit,\n ) => this.testConfectImplWithoutIdentity.fetch(pathQueryFragment, init);\n\n readonly finishInProgressScheduledFunctions = () =>\n this.testConfectImplWithoutIdentity.finishInProgressScheduledFunctions();\n\n readonly finishAllScheduledFunctions = (advanceTimers: () => void) =>\n this.testConfectImplWithoutIdentity.finishAllScheduledFunctions(\n advanceTimers,\n );\n}\n\nexport const layer =\n <DatabaseSchema_ extends DatabaseSchema.AnyWithProps>(\n databaseSchema: DatabaseSchema_,\n convexSchemaDefinition: SchemaDefinition<GenericSchema, true>,\n modules: Record<string, () => Promise<any>>,\n ) =>\n (): Layer.Layer<TestConfect<DatabaseSchema_>> =>\n Layer.sync(\n TestConfect<DatabaseSchema_>(),\n () =>\n new TestConfectImpl(\n databaseSchema,\n convexTest(convexSchemaDefinition, modules) as any,\n ),\n );\n"],"mappings":";;;;;;;;;;;;;;AA6EA,MAAa,oBAEN,QAAQ,QAAoC,4BAA4B;AAE/E,IAAM,iCAAN,MAEuD;CACrD,YACE,AAAQ,eACR,AAAQ,YAGR;EAJQ;EACA;;CAKV,AAAS,SACP,UACA,GAAG,SAKH,IAAI,aACF,UACC,KAAK,MAAM,EAAE,GACb,mBAAmB,gBAClB,KAAK,WAAW,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KAAK;CAEjE,AAAS,YACP,aACA,GAAG,SACA,KAAK,+BAA+B,SAAS,aAAa,GAAG,KAAK;CAEvE,AAAS,UACP,WACA,GAAG,SACA,KAAK,+BAA+B,OAAO,WAAW,GAAG,KAAK;CAEnE,AAAS,QACP,SACA,YAEA,KAAK,+BAA+B,IAClC,SACA,QACD;CAEH,AAAS,SACP,mBACA,SACG,KAAK,+BAA+B,MAAM,mBAAmB,KAAK;CAEvE,AAAS,2CACP,KAAK,+BAA+B,oCAAoC;CAE1E,AAAS,+BAA+B,kBACtC,KAAK,+BAA+B,4BAClC,cACD;;AAGL,MAAa,SAET,gBACA,wBACA,kBAGA,MAAM,KACJ,aAA8B,QAE5B,IAAI,gBACF,gBACA,WAAW,wBAAwB,QAAQ,CAC5C,CACJ"}
@@ -2,12 +2,17 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __exportAll = (all, no_symbols) => {
4
4
  let target = {};
5
- for (var name in all) __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true
8
- });
9
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (!no_symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
10
14
  return target;
11
15
  };
16
+
12
17
  //#endregion
13
- export { __exportAll };
18
+ export { __exportAll };
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  import { TestConfect_exports } from "./TestConfect.js";
2
- export { TestConfect_exports as TestConfect };
2
+
3
+ export { TestConfect_exports as TestConfect };