@gaganref/confect-server 10.3.1-fork.26 → 10.3.1-fork.27
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/dist/ActionCall.d.ts +30 -0
- package/dist/ActionCall.d.ts.map +1 -0
- package/dist/ActionCall.js +41 -0
- package/dist/ActionCall.js.map +1 -0
- package/dist/ActionRunner.js +2 -2
- package/dist/AiGatewayDecisionClient.js +1 -1
- package/dist/AiGatewayLanguageClient.js +1 -1
- package/dist/Auth.js +1 -1
- package/dist/Callback.js +3 -3
- package/dist/ConvexConfigProvider.js +2 -2
- package/dist/ConvexFunctionDefinitions.js +2 -2
- package/dist/ConvexLogger.js +1 -1
- package/dist/CronJobs.js +6 -6
- package/dist/DatabaseSchema.js +2 -2
- package/dist/DatabaseWriter.js +3 -3
- package/dist/ExecutionMetadata.js +1 -1
- package/dist/FunctionImpl.js +2 -2
- package/dist/FunctionRegistryItem.js +1 -1
- package/dist/GroupImpl.js +5 -5
- package/dist/Handler.d.ts +7 -3
- package/dist/Handler.d.ts.map +1 -1
- package/dist/Handler.js.map +1 -1
- package/dist/HttpRouter.js +2 -2
- package/dist/MiddlewareImpl.js +1 -1
- package/dist/MutationRunner.js +2 -2
- package/dist/MutationTransactionContext.js +2 -2
- package/dist/QueryInitializer.js +2 -2
- package/dist/QueryRunner.js +2 -2
- package/dist/QueryStream.js +3 -3
- package/dist/QueryStreamCursor.js +1 -1
- package/dist/QueryStreamIndexPrefix.js +1 -1
- package/dist/QueryStreamIndexRange.js +2 -2
- package/dist/QueryStreamKey.js +1 -1
- package/dist/QueryStreamKeyBounds.js +2 -2
- package/dist/QueryStreamKeyLayout.js +2 -2
- package/dist/QueryStreamKeyValues.js +1 -1
- package/dist/QueryStreamPagination.js +1 -1
- package/dist/QueryStreamReadBudget.js +2 -2
- package/dist/QueryTransactionContext.js +2 -2
- package/dist/RegisteredConvexFunction.js +19 -19
- package/dist/RegisteredConvexFunction.js.map +1 -1
- package/dist/RegisteredFunction.d.ts.map +1 -1
- package/dist/RegisteredFunction.js +55 -13
- package/dist/RegisteredFunction.js.map +1 -1
- package/dist/RegisteredNodeFunction.js +1 -1
- package/dist/RegistryItems.js +1 -1
- package/dist/RequestMetadata.js +1 -1
- package/dist/Scheduler.js +2 -2
- package/dist/Storage.js +1 -1
- package/dist/StorageActionWriter.js +1 -1
- package/dist/StorageReader.js +1 -1
- package/dist/StorageWriter.js +1 -1
- package/dist/TransactionMetadata.js +1 -1
- package/dist/VectorSearch.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -9
- package/dist/internal/AiGatewayDecisionClient.js +1 -1
- package/dist/internal/AiGatewayLanguageClient.js +1 -1
- package/dist/internal/AiGatewayServiceToken.js +1 -1
- package/dist/internal/DocumentPatch.js +1 -1
- package/package.json +2 -2
- package/src/ActionCall.ts +82 -0
- package/src/Handler.ts +20 -5
- package/src/RegisteredFunction.ts +54 -1
- package/src/index.ts +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as DatabaseSchema from "./DatabaseSchema.js";
|
|
2
|
+
import * as MiddlewareImpl from "./MiddlewareImpl.js";
|
|
3
|
+
declare const ActionCallAlreadyUsed_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
4
|
+
readonly _tag: "ActionCallAlreadyUsed";
|
|
5
|
+
} & Readonly<A>;
|
|
6
|
+
export declare class ActionCallAlreadyUsed extends ActionCallAlreadyUsed_base<{}> {
|
|
7
|
+
}
|
|
8
|
+
declare const ActionCallNotUsed_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
9
|
+
readonly _tag: "ActionCallNotUsed";
|
|
10
|
+
} & Readonly<A>;
|
|
11
|
+
export declare class ActionCallNotUsed extends ActionCallNotUsed_base<{}> {
|
|
12
|
+
}
|
|
13
|
+
declare const MissingFunctionType_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
14
|
+
readonly _tag: "MissingFunctionType";
|
|
15
|
+
} & Readonly<A>;
|
|
16
|
+
export declare class MissingFunctionType extends MissingFunctionType_base<{}> {
|
|
17
|
+
}
|
|
18
|
+
declare const NestedActionNotAllowed_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
19
|
+
readonly _tag: "NestedActionNotAllowed";
|
|
20
|
+
} & Readonly<A>;
|
|
21
|
+
export declare class NestedActionNotAllowed extends NestedActionNotAllowed_base<{}> {
|
|
22
|
+
}
|
|
23
|
+
declare const SchedulingNotAllowed_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
24
|
+
readonly _tag: "SchedulingNotAllowed";
|
|
25
|
+
} & Readonly<A>;
|
|
26
|
+
export declare class SchedulingNotAllowed extends SchedulingNotAllowed_base<{}> {
|
|
27
|
+
}
|
|
28
|
+
export declare const layer: <S extends DatabaseSchema.AnyWithProps>(schema: S) => import("effect/Layer").Layer<MiddlewareImpl.MiddlewareImpl<"@confect/core/ActionCall/Middleware">, never, never>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=ActionCall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionCall.d.ts","sourceRoot":"","sources":["../src/ActionCall.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,cAAc,MAAM,qBAAqB,CAAC;AAG3D,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;;;;AAKtD,qBAAa,qBAAsB,SAAQ,2BAEzC,EAAE,CAAC;CAAG;;;;AACR,qBAAa,iBAAkB,SAAQ,uBAErC,EAAE,CAAC;CAAG;;;;AACR,qBAAa,mBAAoB,SAAQ,yBAEvC,EAAE,CAAC;CAAG;;;;AACR,qBAAa,sBAAuB,SAAQ,4BAE1C,EAAE,CAAC;CAAG;;;;AAER,qBAAa,oBAAqB,SAAQ,0BAExC,EAAE,CAAC;CAAG;AAER,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,cAAc,CAAC,YAAY,UAAU,CAAC,qHAgDnE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ActionCtx } from "./ActionCtx.js";
|
|
3
|
+
import { ActionRunner } from "./ActionRunner.js";
|
|
4
|
+
import { make } from "./MiddlewareImpl.js";
|
|
5
|
+
import { MutationRunner } from "./MutationRunner.js";
|
|
6
|
+
import { QueryRunner } from "./QueryRunner.js";
|
|
7
|
+
import { Scheduler } from "./Scheduler.js";
|
|
8
|
+
import * as ActionCall from "@confect/core/ActionCall";
|
|
9
|
+
import * as Ref from "@confect/core/Ref";
|
|
10
|
+
import * as Context from "effect/Context";
|
|
11
|
+
import * as Data from "effect/Data";
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
13
|
+
//#region src/ActionCall.ts
|
|
14
|
+
var ActionCall_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
+
ActionCallAlreadyUsed: () => ActionCallAlreadyUsed,
|
|
16
|
+
ActionCallNotUsed: () => ActionCallNotUsed,
|
|
17
|
+
MissingFunctionType: () => MissingFunctionType,
|
|
18
|
+
NestedActionNotAllowed: () => NestedActionNotAllowed,
|
|
19
|
+
SchedulingNotAllowed: () => SchedulingNotAllowed,
|
|
20
|
+
layer: () => layer
|
|
21
|
+
});
|
|
22
|
+
var ActionCallAlreadyUsed = class extends Data.TaggedError("ActionCallAlreadyUsed") {};
|
|
23
|
+
var ActionCallNotUsed = class extends Data.TaggedError("ActionCallNotUsed") {};
|
|
24
|
+
var MissingFunctionType = class extends Data.TaggedError("MissingFunctionType") {};
|
|
25
|
+
var NestedActionNotAllowed = class extends Data.TaggedError("NestedActionNotAllowed") {};
|
|
26
|
+
var SchedulingNotAllowed = class extends Data.TaggedError("SchedulingNotAllowed") {};
|
|
27
|
+
const layer = (schema) => make(schema, ActionCall.Middleware, (effect) => Effect.gen(function* () {
|
|
28
|
+
const ctx = yield* ActionCtx();
|
|
29
|
+
let claimed = false;
|
|
30
|
+
const call = (ref, ...args) => Effect.suspend(() => {
|
|
31
|
+
if (claimed) return Effect.die(new ActionCallAlreadyUsed());
|
|
32
|
+
claimed = true;
|
|
33
|
+
if (ref.functionType !== "query" && ref.functionType !== "mutation") return Effect.die(new MissingFunctionType());
|
|
34
|
+
return Ref.runWithCodec(ref, args[0] ?? {}, (native, encoded) => ref.functionType === "query" ? ctx.runQuery(native, encoded) : ctx.runMutation(native, encoded));
|
|
35
|
+
});
|
|
36
|
+
return yield* effect.pipe(Effect.provideService(ActionCall.ActionCall, call), Effect.updateContext((context) => Context.omit(QueryRunner, MutationRunner, ActionRunner, ActionCtx(), Scheduler)(context)));
|
|
37
|
+
}));
|
|
38
|
+
//#endregion
|
|
39
|
+
export { ActionCallAlreadyUsed, ActionCallNotUsed, ActionCall_exports, MissingFunctionType, NestedActionNotAllowed, SchedulingNotAllowed, layer };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=ActionCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionCall.js","names":["MiddlewareImpl.make","ActionCtx.ActionCtx","QueryRunner.QueryRunner","MutationRunner.MutationRunner","ActionRunner.ActionRunner","Scheduler.Scheduler"],"sources":["../src/ActionCall.ts"],"sourcesContent":["import * as ActionCall from \"@confect/core/ActionCall\";\nimport * as Ref from \"@confect/core/Ref\";\nimport type { FunctionReference } from \"convex/server\";\nimport * as Context from \"effect/Context\";\nimport * as Data from \"effect/Data\";\nimport * as Effect from \"effect/Effect\";\nimport * as ActionCtx from \"./ActionCtx.js\";\nimport * as ActionRunner from \"./ActionRunner.js\";\nimport type * as DatabaseSchema from \"./DatabaseSchema.js\";\nimport type * as DataModel from \"./DataModel.js\";\nimport type * as Handler from \"./Handler.js\";\nimport * as MiddlewareImpl from \"./MiddlewareImpl.js\";\nimport * as MutationRunner from \"./MutationRunner.js\";\nimport * as QueryRunner from \"./QueryRunner.js\";\nimport * as Scheduler from \"./Scheduler.js\";\n\nexport class ActionCallAlreadyUsed extends Data.TaggedError(\n \"ActionCallAlreadyUsed\",\n)<{}> {}\nexport class ActionCallNotUsed extends Data.TaggedError(\n \"ActionCallNotUsed\",\n)<{}> {}\nexport class MissingFunctionType extends Data.TaggedError(\n \"MissingFunctionType\",\n)<{}> {}\nexport class NestedActionNotAllowed extends Data.TaggedError(\n \"NestedActionNotAllowed\",\n)<{}> {}\n\nexport class SchedulingNotAllowed extends Data.TaggedError(\n \"SchedulingNotAllowed\",\n)<{}> {}\n\nexport const layer = <S extends DatabaseSchema.AnyWithProps>(schema: S) =>\n MiddlewareImpl.make(schema, ActionCall.Middleware, (effect) =>\n Effect.gen(function* () {\n const ctx = yield* ActionCtx.ActionCtx<\n DataModel.ToConvex<DataModel.FromSchema<S>>,\n DatabaseSchema.Scope<S>\n >();\n let claimed = false;\n const call: ActionCall.Call = <\n Target extends Ref.AnyQuery | Ref.AnyMutation,\n >(\n ref: Target,\n ...args: Ref.OptionalArgs<NoInfer<Target>>\n ) =>\n Effect.suspend(() => {\n if (claimed) return Effect.die(new ActionCallAlreadyUsed());\n claimed = true;\n if (ref.functionType !== \"query\" && ref.functionType !== \"mutation\")\n return Effect.die(new MissingFunctionType());\n return Ref.runWithCodec(\n ref,\n (args[0] ?? {}) as Ref.Args<Target>,\n (native, encoded) =>\n ref.functionType === \"query\"\n ? ctx.runQuery(\n native as FunctionReference<\"query\">,\n encoded as never,\n )\n : ctx.runMutation(\n native as FunctionReference<\"mutation\">,\n encoded as never,\n ),\n );\n });\n return yield* effect.pipe(\n Effect.provideService(ActionCall.ActionCall, call),\n Effect.updateContext(\n (context: Context.Context<Handler.ActionServices<S>>) =>\n Context.omit(\n QueryRunner.QueryRunner,\n MutationRunner.MutationRunner,\n ActionRunner.ActionRunner,\n ActionCtx.ActionCtx(),\n Scheduler.Scheduler,\n )(context),\n ),\n );\n }),\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBA,IAAa,wBAAb,cAA2C,KAAK,YAC9C,uBACF,CAAC,CAAK,CAAC;AACP,IAAa,oBAAb,cAAuC,KAAK,YAC1C,mBACF,CAAC,CAAK,CAAC;AACP,IAAa,sBAAb,cAAyC,KAAK,YAC5C,qBACF,CAAC,CAAK,CAAC;AACP,IAAa,yBAAb,cAA4C,KAAK,YAC/C,wBACF,CAAC,CAAK,CAAC;AAEP,IAAa,uBAAb,cAA0C,KAAK,YAC7C,sBACF,CAAC,CAAK,CAAC;AAEP,MAAa,SAAgD,WAC3DA,KAAoB,QAAQ,WAAW,aAAa,WAClD,OAAO,IAAI,aAAa;CACtB,MAAM,MAAM,OAAOC,UAGjB;CACF,IAAI,UAAU;CACd,MAAM,QAGJ,KACA,GAAG,SAEH,OAAO,cAAc;EACnB,IAAI,SAAS,OAAO,OAAO,IAAI,IAAI,sBAAsB,CAAC;EAC1D,UAAU;EACV,IAAI,IAAI,iBAAiB,WAAW,IAAI,iBAAiB,YACvD,OAAO,OAAO,IAAI,IAAI,oBAAoB,CAAC;EAC7C,OAAO,IAAI,aACT,KACC,KAAK,MAAM,CAAC,IACZ,QAAQ,YACP,IAAI,iBAAiB,UACjB,IAAI,SACF,QACA,OACF,IACA,IAAI,YACF,QACA,OACF,CACR;CACF,CAAC;CACH,OAAO,OAAO,OAAO,KACnB,OAAO,eAAe,WAAW,YAAY,IAAI,GACjD,OAAO,eACJ,YACC,QAAQ,KACNC,aACAC,gBACAC,cACAH,UAAoB,GACpBI,SACF,CAAC,CAAC,OAAO,CACb,CACF;AACF,CAAC,CACH"}
|
package/dist/ActionRunner.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import * as Context from "effect/Context";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
2
|
import * as Ref from "@confect/core/Ref";
|
|
3
|
+
import * as Context from "effect/Context";
|
|
5
4
|
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
6
|
//#region src/ActionRunner.ts
|
|
7
7
|
var ActionRunner_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
ActionRunner: () => ActionRunner,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { AiGatewayDisabled, AiGatewayError, AiGatewayUnavailable, layer as layer$1 } from "./internal/AiGatewayServiceToken.js";
|
|
3
3
|
import { layer as layer$2, make as make$1 } from "./internal/AiGatewayDecisionClient.js";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
4
|
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
6
|
import * as OpenRouterClient from "@effect/ai-openrouter/OpenRouterClient";
|
|
7
7
|
//#region src/AiGatewayDecisionClient.ts
|
|
8
8
|
var AiGatewayDecisionClient_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { AiGatewayDisabled, AiGatewayError, AiGatewayUnavailable, layer as layer$1 } from "./internal/AiGatewayServiceToken.js";
|
|
3
3
|
import { layer as layer$2, make as make$1 } from "./internal/AiGatewayLanguageClient.js";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
4
|
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
6
|
import * as OpenAiClient from "@effect/ai-openai-compat/OpenAiClient";
|
|
7
7
|
//#region src/AiGatewayLanguageClient.ts
|
|
8
8
|
var AiGatewayLanguageClient_exports = /* @__PURE__ */ __exportAll({
|
package/dist/Auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
3
|
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
5
|
import * as Schema from "effect/Schema";
|
|
6
6
|
import { flow } from "effect/Function";
|
|
7
7
|
import * as Match from "effect/Match";
|
package/dist/Callback.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import * as Ref from "@confect/core/Ref";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as MiddlewareSpec from "@confect/core/MiddlewareSpec";
|
|
5
|
+
import * as Predicate from "effect/Predicate";
|
|
6
|
+
import * as Array from "effect/Array";
|
|
4
7
|
import { createFunctionHandle } from "convex/server";
|
|
5
8
|
import * as Schema from "effect/Schema";
|
|
6
9
|
import { pipe } from "effect/Function";
|
|
7
10
|
import * as Option from "effect/Option";
|
|
8
11
|
import * as Callback from "@confect/core/Callback";
|
|
9
|
-
import * as MiddlewareSpec from "@confect/core/MiddlewareSpec";
|
|
10
12
|
import { UnsupportedPropertySignatureKeyTypeError, compileAst } from "@confect/core/SchemaToValidator";
|
|
11
13
|
import { convexToJson, v } from "convex/values";
|
|
12
|
-
import * as Array from "effect/Array";
|
|
13
14
|
import * as Number from "effect/Number";
|
|
14
15
|
import * as Order from "effect/Order";
|
|
15
|
-
import * as Predicate from "effect/Predicate";
|
|
16
16
|
import * as Result from "effect/Result";
|
|
17
17
|
import * as SchemaAST from "effect/SchemaAST";
|
|
18
18
|
//#region src/Callback.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import * as Layer from "effect/Layer";
|
|
3
2
|
import * as Effect from "effect/Effect";
|
|
4
|
-
import
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
5
4
|
import * as Array from "effect/Array";
|
|
5
|
+
import { pipe } from "effect/Function";
|
|
6
6
|
import * as ConfigProvider from "effect/ConfigProvider";
|
|
7
7
|
//#region src/ConvexConfigProvider.ts
|
|
8
8
|
var ConvexConfigProvider_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { mapLeaves } from "./internal/utils.js";
|
|
2
3
|
import { make } from "./GroupRegistry.js";
|
|
3
4
|
import { isFunctionRegistryItem } from "./FunctionRegistryItem.js";
|
|
4
5
|
import { Definition, prepare, register as register$1 } from "./RegisteredConvexFunction.js";
|
|
5
6
|
import { resolve } from "./ResolvedMiddleware.js";
|
|
6
|
-
import { mapLeaves } from "./internal/utils.js";
|
|
7
|
-
import * as Match from "effect/Match";
|
|
8
7
|
import * as Record from "effect/Record";
|
|
8
|
+
import * as Match from "effect/Match";
|
|
9
9
|
//#region src/ConvexFunctionDefinitions.ts
|
|
10
10
|
var ConvexFunctionDefinitions_exports = /* @__PURE__ */ __exportAll({
|
|
11
11
|
buildForGroup: () => buildForGroup,
|
package/dist/ConvexLogger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import * as Layer from "effect/Layer";
|
|
3
2
|
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as Match from "effect/Match";
|
|
5
5
|
import * as Console from "effect/Console";
|
|
6
6
|
import * as Logger from "effect/Logger";
|
package/dist/CronJobs.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import * as Predicate from "effect/Predicate";
|
|
3
|
+
import * as Array from "effect/Array";
|
|
4
|
+
import * as Record from "effect/Record";
|
|
5
|
+
import { Ref } from "@confect/core";
|
|
6
|
+
import * as DateTime from "effect/DateTime";
|
|
7
|
+
import * as Duration from "effect/Duration";
|
|
2
8
|
import { cronJobs } from "convex/server";
|
|
3
9
|
import { pipe } from "effect/Function";
|
|
4
10
|
import * as Match from "effect/Match";
|
|
5
11
|
import * as Option from "effect/Option";
|
|
6
|
-
import * as Array from "effect/Array";
|
|
7
12
|
import * as Order from "effect/Order";
|
|
8
|
-
import * as Predicate from "effect/Predicate";
|
|
9
|
-
import * as Record from "effect/Record";
|
|
10
|
-
import * as Duration from "effect/Duration";
|
|
11
|
-
import { Ref } from "@confect/core";
|
|
12
|
-
import * as DateTime from "effect/DateTime";
|
|
13
13
|
import * as Cron from "effect/Cron";
|
|
14
14
|
//#region src/CronJobs.ts
|
|
15
15
|
var CronJobs_exports = /* @__PURE__ */ __exportAll({
|
package/dist/DatabaseSchema.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import * as Data from "effect/Data";
|
|
2
3
|
import * as Predicate from "effect/Predicate";
|
|
3
|
-
import * as Result from "effect/Result";
|
|
4
4
|
import * as Record from "effect/Record";
|
|
5
|
-
import * as
|
|
5
|
+
import * as Result from "effect/Result";
|
|
6
6
|
import * as IdScope from "@confect/core/IdScope";
|
|
7
7
|
//#region src/DatabaseSchema.ts
|
|
8
8
|
var DatabaseSchema_exports = /* @__PURE__ */ __exportAll({
|
package/dist/DatabaseWriter.js
CHANGED
|
@@ -4,12 +4,12 @@ import { DocumentEncodeError, decode, encode } from "./Document.js";
|
|
|
4
4
|
import { GetByIdFailure, getById } from "./QueryInitializer.js";
|
|
5
5
|
import { encoder } from "./internal/DocumentPatch.js";
|
|
6
6
|
import * as Context from "effect/Context";
|
|
7
|
-
import * as Layer from "effect/Layer";
|
|
8
7
|
import * as Effect from "effect/Effect";
|
|
9
|
-
import
|
|
8
|
+
import * as Layer from "effect/Layer";
|
|
10
9
|
import * as Predicate from "effect/Predicate";
|
|
11
|
-
import * as Result from "effect/Result";
|
|
12
10
|
import * as Record from "effect/Record";
|
|
11
|
+
import { pipe } from "effect/Function";
|
|
12
|
+
import * as Result from "effect/Result";
|
|
13
13
|
//#region src/DatabaseWriter.ts
|
|
14
14
|
var DatabaseWriter_exports = /* @__PURE__ */ __exportAll({
|
|
15
15
|
DatabaseWriter: () => DatabaseWriter,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
3
|
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
5
|
//#region src/ExecutionMetadata.ts
|
|
6
6
|
var ExecutionMetadata_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
ExecutionMetadata: () => ExecutionMetadata,
|
package/dist/FunctionImpl.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { Registry } from "./Registry.js";
|
|
3
|
-
import { make as make$1 } from "./FunctionRegistryItem.js";
|
|
4
3
|
import { setNestedProperty } from "./internal/utils.js";
|
|
4
|
+
import { make as make$1 } from "./FunctionRegistryItem.js";
|
|
5
5
|
import * as Context from "effect/Context";
|
|
6
|
-
import * as Layer from "effect/Layer";
|
|
7
6
|
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Layer from "effect/Layer";
|
|
8
8
|
import * as Ref from "effect/Ref";
|
|
9
9
|
//#region src/FunctionImpl.ts
|
|
10
10
|
var FunctionImpl_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import * as Match from "effect/Match";
|
|
3
2
|
import * as Predicate from "effect/Predicate";
|
|
3
|
+
import * as Match from "effect/Match";
|
|
4
4
|
import * as Lazy from "@confect/core/Lazy";
|
|
5
5
|
//#region src/FunctionRegistryItem.ts
|
|
6
6
|
var FunctionRegistryItem_exports = /* @__PURE__ */ __exportAll({
|
package/dist/GroupImpl.js
CHANGED
|
@@ -2,13 +2,13 @@ import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { Registry } from "./Registry.js";
|
|
3
3
|
import { functionNames, middlewareKeys, missingRequired } from "./RegistryItems.js";
|
|
4
4
|
import * as Context from "effect/Context";
|
|
5
|
-
import * as
|
|
5
|
+
import * as Data from "effect/Data";
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
7
|
-
import * as
|
|
8
|
-
import * as Array from "effect/Array";
|
|
9
|
-
import * as Predicate from "effect/Predicate";
|
|
7
|
+
import * as Layer from "effect/Layer";
|
|
10
8
|
import * as Ref from "effect/Ref";
|
|
11
|
-
import * as
|
|
9
|
+
import * as Predicate from "effect/Predicate";
|
|
10
|
+
import * as Array from "effect/Array";
|
|
11
|
+
import * as Option from "effect/Option";
|
|
12
12
|
//#region src/GroupImpl.ts
|
|
13
13
|
var GroupImpl_exports = /* @__PURE__ */ __exportAll({
|
|
14
14
|
GroupImpl: () => GroupImpl,
|
package/dist/Handler.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ActionCall } from "@confect/core/ActionCall";
|
|
1
2
|
import type { FunctionSpec, RuntimeAndFunctionType } from "@confect/core";
|
|
2
3
|
import type * as FunctionProvenance from "@confect/core/FunctionProvenance";
|
|
3
4
|
import type * as NodeServices from "@effect/platform-node/NodeServices";
|
|
@@ -33,11 +34,14 @@ export type MutationServices<DatabaseSchema_ extends DatabaseSchema.AnyWithProps
|
|
|
33
34
|
/**
|
|
34
35
|
* Shared by both action runtimes.
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
+
type RawActionServices<DatabaseSchema_ extends DatabaseSchema.AnyWithProps> = Scheduler.ForScope<DatabaseSchema.Scope<DatabaseSchema_>> | (DatabaseSchema_["target"]["kind"] extends "component" ? never : Auth.Auth) | StorageReader.ForScope<DatabaseSchema.Scope<DatabaseSchema_>> | StorageWriter.ForScope<DatabaseSchema.Scope<DatabaseSchema_>> | StorageActionWriter.ForScope<DatabaseSchema.Scope<DatabaseSchema_>> | ExecutionMetadata | RequestMetadata | (DatabaseSchema_["target"]["kind"] extends "component" ? never : Storage) | QueryRunner.QueryRunner | MutationRunner.MutationRunner | ActionRunner.ActionRunner | VectorSearch.VectorSearch<DataModel.FromSchema<DatabaseSchema_>> | ActionCtx.ActionCtx<DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>, DatabaseSchema.Scope<DatabaseSchema_>>;
|
|
38
|
+
export type ActionServices<S extends DatabaseSchema.AnyWithProps, R = never> = [
|
|
39
|
+
Extract<R, ActionCall>
|
|
40
|
+
] extends [never] ? RawActionServices<S> : Exclude<RawActionServices<S>, Scheduler.ForScope<DatabaseSchema.Scope<S>> | QueryRunner.QueryRunner | MutationRunner.MutationRunner | ActionRunner.ActionRunner | ActionCtx.ActionCtx<DataModel.ToConvex<DataModel.FromSchema<S>>, DatabaseSchema.Scope<S>>>;
|
|
37
41
|
export type ConfectProvenanceQuery<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyQuery>, R = never> = Base<FunctionSpec_, QueryServices<DatabaseSchema_> | R>;
|
|
38
42
|
export type ConfectProvenanceMutation<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyMutation>, R = never> = Base<FunctionSpec_, MutationServices<DatabaseSchema_> | R>;
|
|
39
|
-
export type ConvexRuntimeAction<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyAction>, R = never> = Base<FunctionSpec_, ActionServices<DatabaseSchema_> | R>;
|
|
40
|
-
export type NodeRuntimeAction<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.NodeAction>, R = never> = Base<FunctionSpec_, ActionServices<DatabaseSchema_> | NodeServices.NodeServices | R>;
|
|
43
|
+
export type ConvexRuntimeAction<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyAction>, R = never> = Base<FunctionSpec_, ActionServices<DatabaseSchema_, R> | R>;
|
|
44
|
+
export type NodeRuntimeAction<DatabaseSchema_ extends DatabaseSchema.AnyWithProps, FunctionSpec_ extends FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.NodeAction>, R = never> = Base<FunctionSpec_, ActionServices<DatabaseSchema_, R> | NodeServices.NodeServices | R>;
|
|
41
45
|
type Base<FunctionSpec_ extends FunctionSpec.AnyWithProps, R> = (args: FunctionSpec.Args<FunctionSpec_>) => Effect.Effect<FunctionSpec.Returns<FunctionSpec_>, FunctionSpec.Error<FunctionSpec_>, R>;
|
|
42
46
|
export type Any = AnyConfectProvenance | AnyConvexProvenance;
|
|
43
47
|
export type AnyConfectProvenance = Base<FunctionSpec.AnyConfect, any>;
|
package/dist/Handler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Handler.d.ts","sourceRoot":"","sources":["../src/Handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,KAAK,kBAAkB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7D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,GAAG,CAAC;AAEzD,MAAM,MAAM,QAAQ,CAClB,eAAe,SAAS,cAAc,CAAC,YAAY,EACnD,aAAa,SAAS,YAAY,CAAC,YAAY,EAC/C,YAAY,SAAS,MAAM,EAC3B,CAAC,GAAG,KAAK,IACP,OAAO,CACT,eAAe,EACf,YAAY,CAAC,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC,EAClD,CAAC,CACF,CAAC"}
|
package/dist/Handler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Handler.js","names":[],"sources":["../src/Handler.ts"],"sourcesContent":["import type { FunctionSpec, RuntimeAndFunctionType } from \"@confect/core\";\nimport type * as FunctionProvenance from \"@confect/core/FunctionProvenance\";\nimport type * as NodeServices from \"@effect/platform-node/NodeServices\";\nimport type { Effect } from \"effect\";\nimport type * as ActionCtx from \"./ActionCtx.js\";\nimport type * as ActionRunner from \"./ActionRunner.js\";\nimport type * as Auth from \"./Auth.js\";\nimport type * as DatabaseReader from \"./DatabaseReader.js\";\nimport type * as DatabaseSchema from \"./DatabaseSchema.js\";\nimport type * as DatabaseWriter from \"./DatabaseWriter.js\";\nimport type * as DataModel from \"./DataModel.js\";\nimport type { ExecutionMetadata } from \"./ExecutionMetadata.js\";\nimport type { RequestMetadata } from \"./RequestMetadata.js\";\nimport type { TransactionMetadata } from \"./TransactionMetadata.js\";\nimport type * as MutationCtx from \"./MutationCtx.js\";\nimport type * as MutationRunner from \"./MutationRunner.js\";\nimport type { MutationTransactionContext } from \"./MutationTransactionContext.js\";\nimport type * as QueryCtx from \"./QueryCtx.js\";\nimport type * as QueryRunner from \"./QueryRunner.js\";\nimport type { QueryTransactionContext } from \"./QueryTransactionContext.js\";\nimport type * as RegisteredFunction from \"./RegisteredFunction.js\";\nimport type * as Scheduler from \"./Scheduler.js\";\nimport type { Storage } from \"./Storage.js\";\nimport type * as StorageActionWriter from \"./StorageActionWriter.js\";\nimport type * as StorageReader from \"./StorageReader.js\";\nimport type * as StorageWriter from \"./StorageWriter.js\";\nimport type * as VectorSearch from \"./VectorSearch.js\";\n\nexport type Handler<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends FunctionSpec.AnyWithProps,\n R = never,\n> =\n FunctionSpec_ extends FunctionSpec.WithFunctionProvenance<\n FunctionSpec_,\n FunctionProvenance.AnyConvex\n >\n ? ConvexProvenanceHandler<FunctionSpec_>\n : FunctionSpec_ extends FunctionSpec.WithFunctionProvenance<\n FunctionSpec_,\n FunctionProvenance.AnyConfect\n >\n ? ConfectProvenanceHandler<DatabaseSchema_, FunctionSpec_, R>\n : never;\n\ntype ConvexProvenanceHandler<\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionProvenance<FunctionProvenance.AnyConvex>,\n> = RegisteredFunction.ConvexRegisteredFunction<FunctionSpec_>;\n\ntype ConfectProvenanceHandler<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionProvenance<FunctionProvenance.AnyConfect>,\n R = never,\n> =\n FunctionSpec_ extends FunctionSpec.WithFunctionType<FunctionSpec_, \"query\">\n ? ConfectProvenanceQuery<DatabaseSchema_, FunctionSpec_, R>\n : FunctionSpec_ extends FunctionSpec.WithFunctionType<\n FunctionSpec_,\n \"mutation\"\n >\n ? ConfectProvenanceMutation<DatabaseSchema_, FunctionSpec_, R>\n : FunctionSpec_ extends FunctionSpec.WithRuntimeAndFunctionType<\n FunctionSpec_,\n RuntimeAndFunctionType.ConvexAction\n >\n ? ConvexRuntimeAction<DatabaseSchema_, FunctionSpec_, R>\n : FunctionSpec_ extends FunctionSpec.WithRuntimeAndFunctionType<\n FunctionSpec_,\n RuntimeAndFunctionType.NodeAction\n >\n ? NodeRuntimeAction<DatabaseSchema_, FunctionSpec_, R>\n : never;\n\nexport type QueryServices<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n> =\n | DatabaseReader.DatabaseReader<DatabaseSchema_>\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Auth.Auth)\n | StorageReader.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | ExecutionMetadata\n | TransactionMetadata\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Storage)\n | QueryRunner.QueryRunner\n | QueryTransactionContext\n | QueryCtx.QueryCtx<\n DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>,\n DatabaseSchema.Scope<DatabaseSchema_>\n >;\n\nexport type MutationServices<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n> =\n | DatabaseReader.DatabaseReader<DatabaseSchema_>\n | DatabaseWriter.DatabaseWriter<DatabaseSchema_>\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Auth.Auth)\n | Scheduler.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | StorageReader.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | StorageWriter.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | ExecutionMetadata\n | TransactionMetadata\n | RequestMetadata\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Storage)\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | QueryTransactionContext\n | MutationTransactionContext\n | MutationCtx.MutationCtx<\n DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>,\n DatabaseSchema.Scope<DatabaseSchema_>\n >;\n\n/**\n * Shared by both action runtimes.\n */\
|
|
1
|
+
{"version":3,"file":"Handler.js","names":[],"sources":["../src/Handler.ts"],"sourcesContent":["import type { ActionCall } from \"@confect/core/ActionCall\";\nimport type { FunctionSpec, RuntimeAndFunctionType } from \"@confect/core\";\nimport type * as FunctionProvenance from \"@confect/core/FunctionProvenance\";\nimport type * as NodeServices from \"@effect/platform-node/NodeServices\";\nimport type { Effect } from \"effect\";\nimport type * as ActionCtx from \"./ActionCtx.js\";\nimport type * as ActionRunner from \"./ActionRunner.js\";\nimport type * as Auth from \"./Auth.js\";\nimport type * as DatabaseReader from \"./DatabaseReader.js\";\nimport type * as DatabaseSchema from \"./DatabaseSchema.js\";\nimport type * as DatabaseWriter from \"./DatabaseWriter.js\";\nimport type * as DataModel from \"./DataModel.js\";\nimport type { ExecutionMetadata } from \"./ExecutionMetadata.js\";\nimport type { RequestMetadata } from \"./RequestMetadata.js\";\nimport type { TransactionMetadata } from \"./TransactionMetadata.js\";\nimport type * as MutationCtx from \"./MutationCtx.js\";\nimport type * as MutationRunner from \"./MutationRunner.js\";\nimport type { MutationTransactionContext } from \"./MutationTransactionContext.js\";\nimport type * as QueryCtx from \"./QueryCtx.js\";\nimport type * as QueryRunner from \"./QueryRunner.js\";\nimport type { QueryTransactionContext } from \"./QueryTransactionContext.js\";\nimport type * as RegisteredFunction from \"./RegisteredFunction.js\";\nimport type * as Scheduler from \"./Scheduler.js\";\nimport type { Storage } from \"./Storage.js\";\nimport type * as StorageActionWriter from \"./StorageActionWriter.js\";\nimport type * as StorageReader from \"./StorageReader.js\";\nimport type * as StorageWriter from \"./StorageWriter.js\";\nimport type * as VectorSearch from \"./VectorSearch.js\";\n\nexport type Handler<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends FunctionSpec.AnyWithProps,\n R = never,\n> =\n FunctionSpec_ extends FunctionSpec.WithFunctionProvenance<\n FunctionSpec_,\n FunctionProvenance.AnyConvex\n >\n ? ConvexProvenanceHandler<FunctionSpec_>\n : FunctionSpec_ extends FunctionSpec.WithFunctionProvenance<\n FunctionSpec_,\n FunctionProvenance.AnyConfect\n >\n ? ConfectProvenanceHandler<DatabaseSchema_, FunctionSpec_, R>\n : never;\n\ntype ConvexProvenanceHandler<\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionProvenance<FunctionProvenance.AnyConvex>,\n> = RegisteredFunction.ConvexRegisteredFunction<FunctionSpec_>;\n\ntype ConfectProvenanceHandler<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionProvenance<FunctionProvenance.AnyConfect>,\n R = never,\n> =\n FunctionSpec_ extends FunctionSpec.WithFunctionType<FunctionSpec_, \"query\">\n ? ConfectProvenanceQuery<DatabaseSchema_, FunctionSpec_, R>\n : FunctionSpec_ extends FunctionSpec.WithFunctionType<\n FunctionSpec_,\n \"mutation\"\n >\n ? ConfectProvenanceMutation<DatabaseSchema_, FunctionSpec_, R>\n : FunctionSpec_ extends FunctionSpec.WithRuntimeAndFunctionType<\n FunctionSpec_,\n RuntimeAndFunctionType.ConvexAction\n >\n ? ConvexRuntimeAction<DatabaseSchema_, FunctionSpec_, R>\n : FunctionSpec_ extends FunctionSpec.WithRuntimeAndFunctionType<\n FunctionSpec_,\n RuntimeAndFunctionType.NodeAction\n >\n ? NodeRuntimeAction<DatabaseSchema_, FunctionSpec_, R>\n : never;\n\nexport type QueryServices<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n> =\n | DatabaseReader.DatabaseReader<DatabaseSchema_>\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Auth.Auth)\n | StorageReader.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | ExecutionMetadata\n | TransactionMetadata\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Storage)\n | QueryRunner.QueryRunner\n | QueryTransactionContext\n | QueryCtx.QueryCtx<\n DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>,\n DatabaseSchema.Scope<DatabaseSchema_>\n >;\n\nexport type MutationServices<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n> =\n | DatabaseReader.DatabaseReader<DatabaseSchema_>\n | DatabaseWriter.DatabaseWriter<DatabaseSchema_>\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Auth.Auth)\n | Scheduler.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | StorageReader.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | StorageWriter.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | ExecutionMetadata\n | TransactionMetadata\n | RequestMetadata\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Storage)\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | QueryTransactionContext\n | MutationTransactionContext\n | MutationCtx.MutationCtx<\n DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>,\n DatabaseSchema.Scope<DatabaseSchema_>\n >;\n\n/**\n * Shared by both action runtimes.\n */\ntype RawActionServices<DatabaseSchema_ extends DatabaseSchema.AnyWithProps> =\n | Scheduler.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Auth.Auth)\n | StorageReader.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | StorageWriter.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | StorageActionWriter.ForScope<DatabaseSchema.Scope<DatabaseSchema_>>\n | ExecutionMetadata\n | RequestMetadata\n | (DatabaseSchema_[\"target\"][\"kind\"] extends \"component\" ? never : Storage)\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | VectorSearch.VectorSearch<DataModel.FromSchema<DatabaseSchema_>>\n | ActionCtx.ActionCtx<\n DataModel.ToConvex<DataModel.FromSchema<DatabaseSchema_>>,\n DatabaseSchema.Scope<DatabaseSchema_>\n >;\n\nexport type ActionServices<S extends DatabaseSchema.AnyWithProps, R = never> = [\n Extract<R, ActionCall>,\n] extends [never]\n ? RawActionServices<S>\n : Exclude<\n RawActionServices<S>,\n | Scheduler.ForScope<DatabaseSchema.Scope<S>>\n | QueryRunner.QueryRunner\n | MutationRunner.MutationRunner\n | ActionRunner.ActionRunner\n | ActionCtx.ActionCtx<\n DataModel.ToConvex<DataModel.FromSchema<S>>,\n DatabaseSchema.Scope<S>\n >\n >;\n\nexport type ConfectProvenanceQuery<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyQuery>,\n R = never,\n> = Base<FunctionSpec_, QueryServices<DatabaseSchema_> | R>;\n\nexport type ConfectProvenanceMutation<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyMutation>,\n R = never,\n> = Base<FunctionSpec_, MutationServices<DatabaseSchema_> | R>;\n\nexport type ConvexRuntimeAction<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.AnyAction>,\n R = never,\n> = Base<FunctionSpec_, ActionServices<DatabaseSchema_, R> | R>;\n\nexport type NodeRuntimeAction<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends\n FunctionSpec.AnyWithPropsWithFunctionType<RuntimeAndFunctionType.NodeAction>,\n R = never,\n> = Base<\n FunctionSpec_,\n ActionServices<DatabaseSchema_, R> | NodeServices.NodeServices | R\n>;\n\ntype Base<FunctionSpec_ extends FunctionSpec.AnyWithProps, R> = (\n args: FunctionSpec.Args<FunctionSpec_>,\n) => Effect.Effect<\n FunctionSpec.Returns<FunctionSpec_>,\n FunctionSpec.Error<FunctionSpec_>,\n R\n>;\n\nexport type Any = AnyConfectProvenance | AnyConvexProvenance;\n\nexport type AnyConfectProvenance = Base<FunctionSpec.AnyConfect, any>;\n\nexport type AnyConvexProvenance = RegisteredFunction.Any;\n\nexport type WithName<\n DatabaseSchema_ extends DatabaseSchema.AnyWithProps,\n FunctionSpec_ extends FunctionSpec.AnyWithProps,\n FunctionName extends string,\n R = never,\n> = Handler<\n DatabaseSchema_,\n FunctionSpec.WithName<FunctionSpec_, FunctionName>,\n R\n>;\n"],"mappings":""}
|
package/dist/HttpRouter.js
CHANGED
|
@@ -3,12 +3,12 @@ import { layer } from "./ConvexConfigProvider.js";
|
|
|
3
3
|
import { layer as layer$1 } from "./ConvexLogger.js";
|
|
4
4
|
import { actionLayer, baseActionLayer } from "./RegisteredFunction.js";
|
|
5
5
|
import * as Context from "effect/Context";
|
|
6
|
-
import * as Layer from "effect/Layer";
|
|
7
6
|
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Layer from "effect/Layer";
|
|
8
|
+
import * as Array from "effect/Array";
|
|
8
9
|
import { ROUTABLE_HTTP_METHODS, httpActionGeneric, httpRouter } from "convex/server";
|
|
9
10
|
import * as Schema from "effect/Schema";
|
|
10
11
|
import * as Match from "effect/Match";
|
|
11
|
-
import * as Array from "effect/Array";
|
|
12
12
|
import * as SchemaAST from "effect/SchemaAST";
|
|
13
13
|
import * as Console from "effect/Console";
|
|
14
14
|
import * as Config from "effect/Config";
|
package/dist/MiddlewareImpl.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Registry } from "./Registry.js";
|
|
|
3
3
|
import { TypeId, registryKey } from "./MiddlewareRegistryItem.js";
|
|
4
4
|
import { setNestedProperty } from "./internal/utils.js";
|
|
5
5
|
import * as Context from "effect/Context";
|
|
6
|
-
import * as Layer from "effect/Layer";
|
|
7
6
|
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Layer from "effect/Layer";
|
|
8
8
|
import * as MiddlewareSpec from "@confect/core/MiddlewareSpec";
|
|
9
9
|
import * as Ref from "effect/Ref";
|
|
10
10
|
//#region src/MiddlewareImpl.ts
|
package/dist/MutationRunner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { MutationTransactionContext } from "./MutationTransactionContext.js";
|
|
3
|
-
import * as Context from "effect/Context";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
3
|
import * as Ref from "@confect/core/Ref";
|
|
4
|
+
import * as Context from "effect/Context";
|
|
6
5
|
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Layer from "effect/Layer";
|
|
7
7
|
//#region src/MutationRunner.ts
|
|
8
8
|
var MutationRunner_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
MutationRunner: () => MutationRunner,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import * as Context from "effect/Context";
|
|
3
|
-
import * as Layer from "effect/Layer";
|
|
4
2
|
import * as Ref from "@confect/core/Ref";
|
|
3
|
+
import * as Context from "effect/Context";
|
|
5
4
|
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
6
|
//#region src/MutationTransactionContext.ts
|
|
7
7
|
var MutationTransactionContext_exports = /* @__PURE__ */ __exportAll({
|
|
8
8
|
MutationTransactionContext: () => MutationTransactionContext,
|
package/dist/QueryInitializer.js
CHANGED
|
@@ -4,11 +4,11 @@ import { make as make$1 } from "./OrderedQuery.js";
|
|
|
4
4
|
import { builder } from "./QueryStreamIndexRange.js";
|
|
5
5
|
import { fromReflection } from "./QueryStream.js";
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Predicate from "effect/Predicate";
|
|
8
|
+
import * as Array from "effect/Array";
|
|
7
9
|
import * as Schema from "effect/Schema";
|
|
8
10
|
import { pipe } from "effect/Function";
|
|
9
11
|
import * as Option from "effect/Option";
|
|
10
|
-
import * as Array from "effect/Array";
|
|
11
|
-
import * as Predicate from "effect/Predicate";
|
|
12
12
|
import * as Result from "effect/Result";
|
|
13
13
|
//#region src/QueryInitializer.ts
|
|
14
14
|
var QueryInitializer_exports = /* @__PURE__ */ __exportAll({
|
package/dist/QueryRunner.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { MutationTransactionContext } from "./MutationTransactionContext.js";
|
|
3
3
|
import { QueryTransactionContext } from "./QueryTransactionContext.js";
|
|
4
|
-
import * as Context from "effect/Context";
|
|
5
|
-
import * as Layer from "effect/Layer";
|
|
6
4
|
import * as Ref from "@confect/core/Ref";
|
|
5
|
+
import * as Context from "effect/Context";
|
|
7
6
|
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Layer from "effect/Layer";
|
|
8
8
|
//#region src/QueryRunner.ts
|
|
9
9
|
var QueryRunner_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
QueryRunner: () => QueryRunner,
|
package/dist/QueryStream.js
CHANGED
|
@@ -11,17 +11,17 @@ import { admittedByLower, admittedByUpper, forLayout, fromParsed, intersect, int
|
|
|
11
11
|
import { apply, equalityPrefixLength, fromBounds, toBounds as toBounds$1 } from "./QueryStreamIndexRange.js";
|
|
12
12
|
import { EmptyInitialPageError, InvalidPageSizeError, Range, Start, finish, initial, parseRequest, record } from "./QueryStreamPagination.js";
|
|
13
13
|
import { InvalidReadLimitError, Limits, QueryStreamReadBudget, make as make$1 } from "./QueryStreamReadBudget.js";
|
|
14
|
+
import * as Data from "effect/Data";
|
|
14
15
|
import * as Effect from "effect/Effect";
|
|
16
|
+
import * as Predicate from "effect/Predicate";
|
|
17
|
+
import * as Array from "effect/Array";
|
|
15
18
|
import * as Schema from "effect/Schema";
|
|
16
19
|
import { dual, identity, pipe } from "effect/Function";
|
|
17
20
|
import * as Match from "effect/Match";
|
|
18
21
|
import * as Option from "effect/Option";
|
|
19
22
|
import { ConvexError } from "convex/values";
|
|
20
|
-
import * as Array from "effect/Array";
|
|
21
23
|
import * as Order from "effect/Order";
|
|
22
|
-
import * as Predicate from "effect/Predicate";
|
|
23
24
|
import * as Result from "effect/Result";
|
|
24
|
-
import * as Data from "effect/Data";
|
|
25
25
|
import * as Stream from "effect/Stream";
|
|
26
26
|
import { pipeArguments } from "effect/Pipeable";
|
|
27
27
|
import * as Chunk from "effect/Chunk";
|
|
@@ -3,9 +3,9 @@ import { Equivalence, positions } from "./QueryStreamKeyLayout.js";
|
|
|
3
3
|
import { complete, isComplete } from "./QueryStreamKey.js";
|
|
4
4
|
import { QueryStreamKeyValues } from "./QueryStreamKeyValues.js";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Array from "effect/Array";
|
|
6
7
|
import * as Schema from "effect/Schema";
|
|
7
8
|
import * as Match from "effect/Match";
|
|
8
|
-
import * as Array from "effect/Array";
|
|
9
9
|
import * as SchemaIssue from "effect/SchemaIssue";
|
|
10
10
|
import * as SchemaGetter from "effect/SchemaGetter";
|
|
11
11
|
//#region src/QueryStreamCursor.ts
|
|
@@ -2,12 +2,12 @@ import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { ValueOrder } from "./QueryStreamKeyValues.js";
|
|
3
3
|
import { entries, make as make$1 } from "./QueryStreamIndexPrefix.js";
|
|
4
4
|
import { isEmpty } from "./QueryStreamKeyBounds.js";
|
|
5
|
+
import * as Data from "effect/Data";
|
|
6
|
+
import * as Array from "effect/Array";
|
|
5
7
|
import { identity, pipe } from "effect/Function";
|
|
6
8
|
import * as Match from "effect/Match";
|
|
7
9
|
import * as Option from "effect/Option";
|
|
8
|
-
import * as Array from "effect/Array";
|
|
9
10
|
import * as Result from "effect/Result";
|
|
10
|
-
import * as Data from "effect/Data";
|
|
11
11
|
//#region src/QueryStreamIndexRange.ts
|
|
12
12
|
var QueryStreamIndexRange_exports = /* @__PURE__ */ __exportAll({
|
|
13
13
|
apply: () => apply,
|
package/dist/QueryStreamKey.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runtimeWidth } from "./QueryStreamKeyLayout.js";
|
|
2
|
+
import * as Data from "effect/Data";
|
|
2
3
|
import * as Predicate from "effect/Predicate";
|
|
3
4
|
import * as Result from "effect/Result";
|
|
4
|
-
import * as Data from "effect/Data";
|
|
5
5
|
//#region src/QueryStreamKey.ts
|
|
6
6
|
const TypeId = "~@confect/server/QueryStreamKey";
|
|
7
7
|
const QueryStreamKey = Data.taggedEnum();
|
|
@@ -2,11 +2,11 @@ import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { validateEquivalence } from "./QueryStreamKeyLayout.js";
|
|
3
3
|
import { prefix, values } from "./QueryStreamKey.js";
|
|
4
4
|
import { Order as Order$1 } from "./QueryStreamKeyValues.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as Data from "effect/Data";
|
|
6
6
|
import * as Array from "effect/Array";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
7
8
|
import * as Order from "effect/Order";
|
|
8
9
|
import * as Result from "effect/Result";
|
|
9
|
-
import * as Data from "effect/Data";
|
|
10
10
|
//#region src/QueryStreamKeyBounds.ts
|
|
11
11
|
var QueryStreamKeyBounds_exports = /* @__PURE__ */ __exportAll({
|
|
12
12
|
admittedByLower: () => admittedByLower,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { hasPrefix, make as make$1 } from "./QueryStreamKeyLabels.js";
|
|
3
|
+
import * as Data from "effect/Data";
|
|
4
|
+
import * as Array from "effect/Array";
|
|
3
5
|
import { identity } from "effect/Function";
|
|
4
6
|
import * as Option from "effect/Option";
|
|
5
|
-
import * as Array from "effect/Array";
|
|
6
7
|
import * as Result from "effect/Result";
|
|
7
|
-
import * as Data from "effect/Data";
|
|
8
8
|
import * as Equivalence_ from "effect/Equivalence";
|
|
9
9
|
//#region src/QueryStreamKeyLayout.ts
|
|
10
10
|
var QueryStreamKeyLayout_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Array from "effect/Array";
|
|
3
4
|
import * as Schema from "effect/Schema";
|
|
4
5
|
import { compareValues, convexToJson, jsonToConvex } from "convex/values";
|
|
5
|
-
import * as Array from "effect/Array";
|
|
6
6
|
import * as Order_ from "effect/Order";
|
|
7
7
|
import * as Result from "effect/Result";
|
|
8
8
|
import * as SchemaIssue from "effect/SchemaIssue";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Order } from "./QueryStreamKeyValues.js";
|
|
2
|
+
import * as Data from "effect/Data";
|
|
2
3
|
import * as Schema from "effect/Schema";
|
|
3
4
|
import * as Match from "effect/Match";
|
|
4
5
|
import * as Option from "effect/Option";
|
|
5
6
|
import * as Result from "effect/Result";
|
|
6
|
-
import * as Data from "effect/Data";
|
|
7
7
|
import * as Chunk from "effect/Chunk";
|
|
8
8
|
//#region src/QueryStreamPagination.ts
|
|
9
9
|
const PageSize = Schema.Natural.pipe(Schema.brand("~@confect/server/QueryStreamPagination/PageSize"));
|