@confect/server 9.0.0-next.7 → 9.0.0-next.9
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 +58 -0
- package/dist/ActionCtx.d.ts +1 -1
- package/dist/ActionCtx.js +1 -1
- package/dist/ActionCtx.js.map +1 -1
- package/dist/ActionRunner.d.ts +6 -4
- package/dist/ActionRunner.d.ts.map +1 -1
- package/dist/ActionRunner.js +4 -3
- package/dist/ActionRunner.js.map +1 -1
- package/dist/Auth.d.ts +4 -2
- package/dist/Auth.d.ts.map +1 -1
- package/dist/Auth.js +5 -1
- package/dist/Auth.js.map +1 -1
- package/dist/BlobNotFoundError.d.ts +1 -1
- package/dist/BlobNotFoundError.d.ts.map +1 -1
- package/dist/BlobNotFoundError.js +1 -1
- package/dist/BlobNotFoundError.js.map +1 -1
- package/dist/ConvexConfigProvider.d.ts +1 -1
- package/dist/ConvexConfigProvider.d.ts.map +1 -1
- package/dist/ConvexConfigProvider.js +6 -1
- package/dist/ConvexConfigProvider.js.map +1 -1
- package/dist/CronJob.d.ts +3 -3
- package/dist/CronJob.d.ts.map +1 -1
- package/dist/CronJob.js +1 -1
- package/dist/CronJob.js.map +1 -1
- package/dist/CronJobs.d.ts.map +1 -1
- package/dist/CronJobs.js +11 -4
- package/dist/CronJobs.js.map +1 -1
- package/dist/DatabaseReader.d.ts +452 -451
- package/dist/DatabaseReader.d.ts.map +1 -1
- package/dist/DatabaseReader.js +2 -1
- package/dist/DatabaseReader.js.map +1 -1
- package/dist/DatabaseSchema.d.ts +1 -1
- package/dist/DatabaseSchema.js +1 -1
- package/dist/DatabaseSchema.js.map +1 -1
- package/dist/DatabaseWriter.d.ts +7 -5
- package/dist/DatabaseWriter.d.ts.map +1 -1
- package/dist/DatabaseWriter.js +5 -1
- package/dist/DatabaseWriter.js.map +1 -1
- package/dist/Document.d.ts +2 -1
- package/dist/Document.d.ts.map +1 -1
- package/dist/Document.js +5 -1
- package/dist/Document.js.map +1 -1
- package/dist/FunctionImpl.d.ts +2 -1
- package/dist/FunctionImpl.d.ts.map +1 -1
- package/dist/FunctionImpl.js +4 -1
- package/dist/FunctionImpl.js.map +1 -1
- package/dist/GroupImpl.d.ts +2 -1
- package/dist/GroupImpl.d.ts.map +1 -1
- package/dist/GroupImpl.js +9 -1
- package/dist/GroupImpl.js.map +1 -1
- package/dist/Handler.d.ts +2 -2
- package/dist/HttpApi.d.ts +4 -2
- package/dist/HttpApi.d.ts.map +1 -1
- package/dist/HttpApi.js +7 -2
- package/dist/HttpApi.js.map +1 -1
- package/dist/MutationCtx.d.ts +1 -1
- package/dist/MutationCtx.js +1 -1
- package/dist/MutationCtx.js.map +1 -1
- package/dist/MutationRunner.d.ts +6 -4
- package/dist/MutationRunner.d.ts.map +1 -1
- package/dist/MutationRunner.js +4 -3
- package/dist/MutationRunner.js.map +1 -1
- package/dist/OrderedQuery.d.ts +7 -5
- package/dist/OrderedQuery.d.ts.map +1 -1
- package/dist/OrderedQuery.js +4 -1
- package/dist/OrderedQuery.js.map +1 -1
- package/dist/QueryCtx.d.ts +1 -1
- package/dist/QueryCtx.js +1 -1
- package/dist/QueryCtx.js.map +1 -1
- package/dist/QueryInitializer.d.ts +3 -2
- package/dist/QueryInitializer.d.ts.map +1 -1
- package/dist/QueryInitializer.js +5 -1
- package/dist/QueryInitializer.js.map +1 -1
- package/dist/QueryRunner.d.ts +6 -4
- package/dist/QueryRunner.d.ts.map +1 -1
- package/dist/QueryRunner.js +4 -3
- package/dist/QueryRunner.js.map +1 -1
- package/dist/RegisteredConvexFunction.d.ts +125 -123
- package/dist/RegisteredConvexFunction.d.ts.map +1 -1
- package/dist/RegisteredConvexFunction.js +6 -1
- package/dist/RegisteredConvexFunction.js.map +1 -1
- package/dist/RegisteredFunction.d.ts +8 -6
- package/dist/RegisteredFunction.d.ts.map +1 -1
- package/dist/RegisteredFunction.js +5 -1
- package/dist/RegisteredFunction.js.map +1 -1
- package/dist/RegisteredFunctions.d.ts.map +1 -1
- package/dist/RegisteredFunctions.js +2 -1
- package/dist/RegisteredFunctions.js.map +1 -1
- package/dist/RegisteredNodeFunction.d.ts.map +1 -1
- package/dist/RegisteredNodeFunction.js +3 -2
- package/dist/RegisteredNodeFunction.js.map +1 -1
- package/dist/RegistryItem.js +1 -1
- package/dist/RegistryItem.js.map +1 -1
- package/dist/Scheduler.d.ts +12 -8
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +10 -6
- package/dist/Scheduler.js.map +1 -1
- package/dist/SchemaToValidator.d.ts +4 -1
- package/dist/SchemaToValidator.d.ts.map +1 -1
- package/dist/SchemaToValidator.js +13 -1
- package/dist/SchemaToValidator.js.map +1 -1
- package/dist/StorageActionWriter.d.ts +4 -3
- package/dist/StorageActionWriter.d.ts.map +1 -1
- package/dist/StorageActionWriter.js +4 -1
- package/dist/StorageActionWriter.js.map +1 -1
- package/dist/StorageReader.d.ts +3 -2
- package/dist/StorageReader.d.ts.map +1 -1
- package/dist/StorageReader.js +5 -1
- package/dist/StorageReader.js.map +1 -1
- package/dist/StorageWriter.d.ts +3 -2
- package/dist/StorageWriter.d.ts.map +1 -1
- package/dist/StorageWriter.js +4 -1
- package/dist/StorageWriter.js.map +1 -1
- package/dist/Table.d.ts +19 -19
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +2 -1
- package/dist/Table.js.map +1 -1
- package/dist/TableInfo.d.ts +1 -1
- package/dist/VectorSearch.d.ts +3 -1
- package/dist/VectorSearch.d.ts.map +1 -1
- package/dist/VectorSearch.js +3 -1
- package/dist/VectorSearch.js.map +1 -1
- package/dist/internal/utils.d.ts +3 -2
- package/dist/internal/utils.d.ts.map +1 -1
- package/dist/internal/utils.js +3 -1
- package/dist/internal/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/ActionCtx.ts +1 -1
- package/src/ActionRunner.ts +2 -1
- package/src/Auth.ts +5 -1
- package/src/BlobNotFoundError.ts +1 -1
- package/src/ConvexConfigProvider.ts +6 -8
- package/src/CronJob.ts +1 -1
- package/src/CronJobs.ts +8 -10
- package/src/DatabaseReader.ts +2 -1
- package/src/DatabaseSchema.ts +2 -2
- package/src/DatabaseWriter.ts +5 -1
- package/src/Document.ts +5 -1
- package/src/FunctionImpl.ts +4 -1
- package/src/GroupImpl.ts +9 -11
- package/src/HttpApi.ts +8 -9
- package/src/MutationCtx.ts +1 -1
- package/src/MutationRunner.ts +2 -1
- package/src/OrderedQuery.ts +5 -1
- package/src/QueryCtx.ts +1 -1
- package/src/QueryInitializer.ts +5 -1
- package/src/QueryRunner.ts +2 -1
- package/src/RegisteredConvexFunction.ts +6 -1
- package/src/RegisteredFunction.ts +5 -1
- package/src/RegisteredFunctions.ts +3 -1
- package/src/RegisteredNodeFunction.ts +4 -2
- package/src/RegistryItem.ts +1 -1
- package/src/Scheduler.ts +5 -1
- package/src/SchemaToValidator.ts +14 -16
- package/src/StorageActionWriter.ts +4 -1
- package/src/StorageReader.ts +5 -1
- package/src/StorageWriter.ts +4 -1
- package/src/Table.ts +2 -1
- package/src/VectorSearch.ts +3 -1
- package/src/internal/utils.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @confect/server
|
|
2
2
|
|
|
3
|
+
## 9.0.0-next.9
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 4894959: Make Node-runtime functions first-class and remove the separate `node` namespace.
|
|
8
|
+
|
|
9
|
+
A function group's runtime is now declared solely by its spec — `GroupSpec.makeNode()` for a Node action group, `GroupSpec.make()` for a Convex group — exactly like vanilla Convex's per-file `"use node"` directive. The `confect/node/` directory is no longer special: Node specs/impls are ordinary colocated `.spec.ts`/`.impl.ts` pairs that can live anywhere in `confect/`, and codegen emits the `"use node"` directive into the generated `convex/` module based on the spec. This is safe because v9's per-group registries already isolate each Convex function's bundle from every other group's impl, so Node-only code can no longer leak into a Convex-runtime bundle regardless of namespace.
|
|
10
|
+
|
|
11
|
+
### Why
|
|
12
|
+
|
|
13
|
+
The `node` namespace existed only because the pre-v9 architecture aggregated every function's impl into one module that all generated `convex/` modules imported; Node functions had to be quarantined into a separate spec/impl/registry tree so Convex-runtime functions wouldn't transitively import Node-only code. v9's per-group isolation removed that constraint, so the namespace was no longer load-bearing — only ergonomic overhead that diverged from vanilla Convex (which identifies Node modules per-file, with no directory requirement).
|
|
14
|
+
|
|
15
|
+
### Breaking changes
|
|
16
|
+
- **API namespace removed.** A Node group at `confect/email.spec.ts` is now referenced as `refs.public.email.send` instead of `refs.public.node.email.send`. Node groups are ordinary groups in the refs tree, nesting preserved like any other group.
|
|
17
|
+
- **Generated layout changed.** Node modules are emitted at `convex/<path>.ts` (carrying `"use node"`) instead of `convex/node/<path>.ts`, and their registries at `confect/_generated/registeredFunctions/<path>.ts`. The single assembled `confect/_generated/spec.ts` now contains every group regardless of runtime; `confect/_generated/nodeSpec.ts` is no longer generated (codegen deletes any stale copy on upgrade).
|
|
18
|
+
- **`@confect/core` API.** Removed `Spec.makeNode`, `Spec.merge`, and `Spec.isConvexSpec`/`Spec.isNodeSpec`. `Spec` is now a single mixed-runtime container (`Spec.make()` accepts groups of any runtime). `Refs.make(spec)` takes a single argument (the unified spec) instead of `(convexSpec, nodeSpec)`. `GroupSpec.makeNode()`/`makeNodeAt()` and `FunctionSpec.publicNodeAction()`/`internalNodeAction()` are unchanged; `GroupSpec` subgroups may now be of any runtime (a group is just a namespace for its children).
|
|
19
|
+
|
|
20
|
+
### Migration
|
|
21
|
+
1. Move any `confect/node/<path>.spec.ts`/`.impl.ts` files to wherever you want them under `confect/` (e.g. `confect/<path>.spec.ts`); the `node/` directory has no special meaning anymore. Their specs already use `GroupSpec.makeNode()`, so no spec-body change is needed — only fix the impl's relative import of `_generated/schema` if its depth changed.
|
|
22
|
+
2. Update call sites to drop the `node` segment: `refs.public.node.<group>.<fn>` → `refs.public.<group>.<fn>`.
|
|
23
|
+
3. Replace `Refs.make(spec, nodeSpec)` with `Refs.make(spec)` (codegen does this for `_generated/refs.ts` automatically).
|
|
24
|
+
4. Run `confect codegen`. The `convex/` tree and `confect/_generated/` are re-emitted; the stale `_generated/nodeSpec.ts` is removed.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [4894959]
|
|
29
|
+
- @confect/core@9.0.0-next.9
|
|
30
|
+
|
|
31
|
+
## 9.0.0-next.8
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 3fec285: Import Effect from its submodule paths internally to shrink per-function cold-start bundles.
|
|
36
|
+
|
|
37
|
+
Confect's packages now import Effect modules from their submodule paths (`import * as Schema from "effect/Schema"`) instead of the `"effect"` barrel (`import { Schema } from "effect"`).
|
|
38
|
+
|
|
39
|
+
### Why
|
|
40
|
+
|
|
41
|
+
A barrel import of a namespace re-export defeats esbuild's tree-shaking: accessing `Schema.X` from `import { Schema } from "effect"` retains the _entire_ `Schema` namespace, because the bundler can't prune property access on the barrel's `export * as Schema`. So every Convex function's cold-start bundle was pulling all of `effect/Schema` and `effect/Stream` — and, transitively through Schema's `Arbitrary`, `fast-check` — whether the function used them or not.
|
|
42
|
+
|
|
43
|
+
Importing from the submodule path tree-shakes normally. On a minimal function this cut the bundle esbuild produces by ~54% (the `effect/Schema` module alone by ~75%) and its cold-start module-evaluation time by ~35%, with `fast-check` dropped entirely. This is also the import style Effect v4 recommends, so it's forward-compatible. A `no-restricted-imports` ESLint rule now enforces it across the codebase (type-only imports and `@effect/vitest` are exempt).
|
|
44
|
+
|
|
45
|
+
No API changes — your existing code keeps working.
|
|
46
|
+
|
|
47
|
+
### Getting the full win in your own code
|
|
48
|
+
|
|
49
|
+
This change shrinks the Confect code in every function bundle, but a function's bundle also includes your own `confect/tables/*` and `*.spec.ts` files. esbuild retains the union across all importers, so a single barrel import anywhere in a function's module graph re-pins the whole `effect/Schema` namespace and undoes the reduction. To get the full bundle/cold-start savings, import Effect from its submodule paths in your own Confect files too:
|
|
50
|
+
|
|
51
|
+
```diff
|
|
52
|
+
- import { Schema } from "effect";
|
|
53
|
+
+ import * as Schema from "effect/Schema";
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Bare helpers (`pipe`, `flow`, `identity`) come from `"effect/Function"`.
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [3fec285]
|
|
59
|
+
- @confect/core@9.0.0-next.8
|
|
60
|
+
|
|
3
61
|
## 9.0.0-next.7
|
|
4
62
|
|
|
5
63
|
### Patch Changes
|
package/dist/ActionCtx.d.ts
CHANGED
package/dist/ActionCtx.js
CHANGED
package/dist/ActionCtx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionCtx.js","names":[],"sources":["../src/ActionCtx.ts"],"sourcesContent":["import type { GenericActionCtx, GenericDataModel } from \"convex/server\";\nimport
|
|
1
|
+
{"version":3,"file":"ActionCtx.js","names":[],"sources":["../src/ActionCtx.ts"],"sourcesContent":["import type { GenericActionCtx, GenericDataModel } from \"convex/server\";\nimport * as Context from \"effect/Context\";\n\nexport const ActionCtx = <DataModel extends GenericDataModel>() =>\n Context.GenericTag<GenericActionCtx<DataModel>>(\"@confect/server/ActionCtx\");\n\nexport type ActionCtx<DataModel extends GenericDataModel> = ReturnType<\n typeof ActionCtx<DataModel>\n>[\"Identifier\"];\n"],"mappings":";;;;;AAGA,MAAa,kBACX,QAAQ,WAAwC,4BAA4B"}
|
package/dist/ActionRunner.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as Ref
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Ref from "@confect/core/Ref";
|
|
3
3
|
import { GenericActionCtx } from "convex/server";
|
|
4
|
+
import * as Layer$1 from "effect/Layer";
|
|
5
|
+
import { Effect, ParseResult } from "effect";
|
|
4
6
|
|
|
5
7
|
//#region src/ActionRunner.d.ts
|
|
6
8
|
declare namespace ActionRunner_d_exports {
|
|
7
9
|
export { ActionRunner, layer };
|
|
8
10
|
}
|
|
9
|
-
declare const ActionRunner: Context.Tag<(<Action extends Ref
|
|
11
|
+
declare const ActionRunner: Context.Tag<(<Action extends Ref.AnyAction>(action: Action, ...args: Ref.OptionalArgs<Action>) => Effect.Effect<Ref.Returns<Action>, Ref.Error<Action> | ParseResult.ParseError>), <Action extends Ref.AnyAction>(action: Action, ...args: Ref.OptionalArgs<Action>) => Effect.Effect<Ref.Returns<Action>, Ref.Error<Action> | ParseResult.ParseError>>;
|
|
10
12
|
type ActionRunner = typeof ActionRunner.Identifier;
|
|
11
|
-
declare const layer: (runAction: GenericActionCtx<any>["runAction"]) => Layer.Layer<(<Action extends Ref
|
|
13
|
+
declare const layer: (runAction: GenericActionCtx<any>["runAction"]) => Layer$1.Layer<(<Action extends Ref.AnyAction>(action: Action, ...args: Ref.OptionalArgs<Action>) => Effect.Effect<Ref.Returns<Action>, Ref.Error<Action> | ParseResult.ParseError>), never, never>;
|
|
12
14
|
//#endregion
|
|
13
15
|
export { ActionRunner, ActionRunner_d_exports, layer };
|
|
14
16
|
//# sourceMappingURL=ActionRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionRunner.d.ts","names":[],"sources":["../src/ActionRunner.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionRunner.d.ts","names":[],"sources":["../src/ActionRunner.ts"],"mappings":";;;;;;;;;;cAsBa,YAAA,EAAY,OAAA,CAAA,GAAA,kBAdP,GAAA,CAAI,SAAA,EAAS,MAAA,EACnB,MAAA,KAAM,IAAA,EACL,GAAA,CAAI,YAAA,CAAa,MAAA,MACzB,MAAA,CAAO,MAAA,CACR,GAAA,CAAI,OAAA,CAAQ,MAAA,GACZ,GAAA,CAAI,KAAA,CAAM,MAAA,IAAU,WAAA,CAAY,UAAA,oBALlB,GAAA,CAAI,SAAA,EAAS,MAAA,EACnB,MAAA,KAAM,IAAA,EACL,GAAA,CAAI,YAAA,CAAa,MAAA,MACzB,MAAA,CAAO,MAAA,CACR,GAAA,CAAI,OAAA,CAAQ,MAAA,GACZ,GAAA,CAAI,KAAA,CAAM,MAAA,IAAU,WAAA,CAAY,UAAA;AAAA,KAYxB,YAAA,UAAsB,YAAA,CAAa,UAAA;AAAA,cAElC,KAAA,GAAS,SAAA,EAAW,gBAAA,uBAAkC,OAAA,CAAA,KAAA,kBAnBjD,GAAA,CAAI,SAAA,EAAS,MAAA,EACnB,MAAA,KAAM,IAAA,EACL,GAAA,CAAI,YAAA,CAAa,MAAA,MACzB,MAAA,CAAO,MAAA,CACR,GAAA,CAAI,OAAA,CAAQ,MAAA,GACZ,GAAA,CAAI,KAAA,CAAM,MAAA,IAAU,WAAA,CAAY,UAAA"}
|
package/dist/ActionRunner.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import * as Ref
|
|
2
|
+
import * as Context from "effect/Context";
|
|
3
|
+
import * as Ref from "@confect/core/Ref";
|
|
4
4
|
import "convex/server";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
5
6
|
|
|
6
7
|
//#region src/ActionRunner.ts
|
|
7
8
|
var ActionRunner_exports = /* @__PURE__ */ __exportAll({
|
|
8
9
|
ActionRunner: () => ActionRunner,
|
|
9
10
|
layer: () => layer
|
|
10
11
|
});
|
|
11
|
-
const make = (runAction) => (action, ...args) => Ref
|
|
12
|
+
const make = (runAction) => (action, ...args) => Ref.runWithCodec(action, args[0] ?? {}, (functionReference, encodedArgs) => runAction(functionReference, encodedArgs));
|
|
12
13
|
const ActionRunner = Context.GenericTag("@confect/server/ActionRunner");
|
|
13
14
|
const layer = (runAction) => Layer.succeed(ActionRunner, make(runAction));
|
|
14
15
|
|
package/dist/ActionRunner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionRunner.js","names":[
|
|
1
|
+
{"version":3,"file":"ActionRunner.js","names":[],"sources":["../src/ActionRunner.ts"],"sourcesContent":["import * as Ref from \"@confect/core/Ref\";\nimport { type GenericActionCtx } from \"convex/server\";\nimport type { ParseResult, Effect } from \"effect\";\nimport * as Context from \"effect/Context\";\nimport * as Layer from \"effect/Layer\";\n\nconst make =\n (runAction: GenericActionCtx<any>[\"runAction\"]) =>\n <Action extends Ref.AnyAction>(\n action: Action,\n ...args: Ref.OptionalArgs<Action>\n ): Effect.Effect<\n Ref.Returns<Action>,\n Ref.Error<Action> | ParseResult.ParseError\n > =>\n Ref.runWithCodec(\n action,\n (args[0] ?? {}) as Ref.Args<Action>,\n (functionReference, encodedArgs) =>\n runAction(functionReference, encodedArgs),\n );\n\nexport const ActionRunner = Context.GenericTag<ReturnType<typeof make>>(\n \"@confect/server/ActionRunner\",\n);\nexport type ActionRunner = typeof ActionRunner.Identifier;\n\nexport const layer = (runAction: GenericActionCtx<any>[\"runAction\"]) =>\n Layer.succeed(ActionRunner, make(runAction));\n"],"mappings":";;;;;;;;;;;AAMA,MAAM,QACH,eAEC,QACA,GAAG,SAKH,IAAI,aACF,QACC,KAAK,MAAM,EAAE,GACb,mBAAmB,gBAClB,UAAU,mBAAmB,YAAY,CAC5C;AAEL,MAAa,eAAe,QAAQ,WAClC,+BACD;AAGD,MAAa,SAAS,cACpB,MAAM,QAAQ,cAAc,KAAK,UAAU,CAAC"}
|
package/dist/Auth.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as effect_Context0 from "effect/Context";
|
|
2
2
|
import * as convex_server0 from "convex/server";
|
|
3
3
|
import { Auth as Auth$1 } from "convex/server";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
5
7
|
import * as effect_Cause0 from "effect/Cause";
|
|
6
8
|
|
|
7
9
|
//#region src/Auth.d.ts
|
package/dist/Auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.d.ts","names":[],"sources":["../src/Auth.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Auth.d.ts","names":[],"sources":["../src/Auth.ts"],"mappings":";;;;;;;;;;;;cAKwC,SAAA;;;;;;;;;cAgB3B,IAAA,SAAa,SAAA;AAAA,cAKb,KAAA,GAAS,IAAA,EAAM,MAAA,KAAU,KAAA,CAAA,KAAA,CAAA,IAAA;AAAA,cAAqC,6BAAA;;;cAE9D,wBAAA,SAAiC,6BAAA;EAAA,IAI/B,OAAA,CAAA;AAAA"}
|
package/dist/Auth.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import { flow } from "effect/Function";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Option from "effect/Option";
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
3
7
|
|
|
4
8
|
//#region src/Auth.ts
|
|
5
9
|
var Auth_exports = /* @__PURE__ */ __exportAll({
|
package/dist/Auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.js","names":[],"sources":["../src/Auth.ts"],"sourcesContent":["import type { Auth as ConvexAuth } from \"convex/server\";\nimport { Effect
|
|
1
|
+
{"version":3,"file":"Auth.js","names":[],"sources":["../src/Auth.ts"],"sourcesContent":["import type { Auth as ConvexAuth } from \"convex/server\";\nimport { flow } from \"effect/Function\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\n\nconst make = (auth: ConvexAuth) => ({\n getUserIdentity: Effect.promise(() => auth.getUserIdentity()).pipe(\n Effect.andThen(\n flow(\n Option.fromNullable,\n Option.match({\n onNone: () => Effect.fail(new NoUserIdentityFoundError()),\n onSome: Effect.succeed,\n }),\n ),\n ),\n ),\n});\n\nexport class Auth extends Effect.Tag(\"@confect/server/Auth\")<\n Auth,\n ReturnType<typeof make>\n>() {}\n\nexport const layer = (auth: ConvexAuth) => Layer.succeed(Auth, make(auth));\n\nexport class NoUserIdentityFoundError extends Schema.TaggedError<NoUserIdentityFoundError>()(\n \"NoUserIdentityFoundError\",\n {},\n) {\n override get message(): string {\n return \"No user identity found\";\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,QAAQ,UAAsB,EAClC,iBAAiB,OAAO,cAAc,KAAK,iBAAiB,CAAC,CAAC,KAC5D,OAAO,QACL,KACE,OAAO,cACP,OAAO,MAAM;CACX,cAAc,OAAO,KAAK,IAAI,0BAA0B,CAAC;CACzD,QAAQ,OAAO;CAChB,CAAC,CACH,CACF,CACF,EACF;AAED,IAAa,OAAb,cAA0B,OAAO,IAAI,uBAAuB,EAGzD,CAAC;AAEJ,MAAa,SAAS,SAAqB,MAAM,QAAQ,MAAM,KAAK,KAAK,CAAC;AAE1E,IAAa,2BAAb,cAA8C,OAAO,aAAuC,CAC1F,4BACA,EAAE,CACH,CAAC;CACA,IAAa,UAAkB;AAC7B,SAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlobNotFoundError.d.ts","names":[],"sources":["../src/BlobNotFoundError.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"BlobNotFoundError.d.ts","names":[],"sources":["../src/BlobNotFoundError.ts"],"mappings":";;;;;;cAAwC,sBAAA;;;;;cAE3B,iBAAA,SAA0B,sBAAA;EAAA,IAMxB,OAAA,CAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
3
|
|
|
4
4
|
//#region src/BlobNotFoundError.ts
|
|
5
5
|
var BlobNotFoundError_exports = /* @__PURE__ */ __exportAll({ BlobNotFoundError: () => BlobNotFoundError });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlobNotFoundError.js","names":[],"sources":["../src/BlobNotFoundError.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"BlobNotFoundError.js","names":[],"sources":["../src/BlobNotFoundError.ts"],"sourcesContent":["import * as Schema from \"effect/Schema\";\n\nexport class BlobNotFoundError extends Schema.TaggedError<BlobNotFoundError>()(\n \"BlobNotFoundError\",\n {\n id: Schema.String,\n },\n) {\n override get message(): string {\n return `File with ID '${this.id}' not found`;\n }\n}\n"],"mappings":";;;;;AAEA,IAAa,oBAAb,cAAuC,OAAO,aAAgC,CAC5E,qBACA,EACE,IAAI,OAAO,QACZ,CACF,CAAC;CACA,IAAa,UAAkB;AAC7B,SAAO,iBAAiB,KAAK,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConvexConfigProvider.d.ts","names":[],"sources":["../src/ConvexConfigProvider.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"ConvexConfigProvider.d.ts","names":[],"sources":["../src/ConvexConfigProvider.ts"],"mappings":";;;;;;cASa,IAAA,GACX,OAAA,GAAU,OAAA,CAAQ,cAAA,CAAe,cAAA,CAAe,aAAA,MAC/C,cAAA,CAAe,cAAA"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { pipe } from "effect/Function";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Array from "effect/Array";
|
|
5
|
+
import * as ConfigError from "effect/ConfigError";
|
|
6
|
+
import * as ConfigProvider from "effect/ConfigProvider";
|
|
7
|
+
import * as ConfigProviderPathPatch from "effect/ConfigProviderPathPatch";
|
|
3
8
|
|
|
4
9
|
//#region src/ConvexConfigProvider.ts
|
|
5
10
|
var ConvexConfigProvider_exports = /* @__PURE__ */ __exportAll({ make: () => make });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConvexConfigProvider.js","names":[],"sources":["../src/ConvexConfigProvider.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"ConvexConfigProvider.js","names":[],"sources":["../src/ConvexConfigProvider.ts"],"sourcesContent":["import { pipe } from \"effect/Function\";\nimport * as Array from \"effect/Array\";\nimport * as ConfigError from \"effect/ConfigError\";\nimport * as ConfigProvider from \"effect/ConfigProvider\";\nimport * as ConfigProviderPathPatch from \"effect/ConfigProviderPathPatch\";\nimport * as Effect from \"effect/Effect\";\n\ndeclare const process: { env: Record<string, string | undefined> };\n\nexport const make = (\n options?: Partial<ConfigProvider.ConfigProvider.FromEnvConfig>,\n): ConfigProvider.ConfigProvider => {\n const pathDelim = options?.pathDelim ?? \"_\";\n const seqDelim = options?.seqDelim ?? \",\";\n\n return ConfigProvider.fromFlat(\n ConfigProvider.makeFlat({\n load: (path, primitive, split = true) => {\n const pathString = Array.join(path, pathDelim);\n const value = process.env[pathString];\n\n if (value === undefined) {\n return Effect.fail(\n ConfigError.MissingData(\n [...path],\n `Expected ${pathString} to exist in the process context`,\n ),\n );\n }\n\n const parse = (text: string) =>\n pipe(\n primitive.parse(text.trim()),\n Effect.mapError(ConfigError.prefixed([...path])),\n );\n\n if (!split) {\n return pipe(parse(value), Effect.map(Array.of));\n } else {\n return pipe(\n value.split(seqDelim),\n Effect.forEach((v) => parse(v)),\n );\n }\n },\n enumerateChildren: (path) =>\n Effect.fail(\n ConfigError.Unsupported(\n [...path],\n \"process.env is not enumerable in the Convex runtime\",\n ),\n ),\n patch: ConfigProviderPathPatch.empty,\n }),\n );\n};\n"],"mappings":";;;;;;;;;;AASA,MAAa,QACX,YACkC;CAClC,MAAM,YAAY,SAAS,aAAa;CACxC,MAAM,WAAW,SAAS,YAAY;AAEtC,QAAO,eAAe,SACpB,eAAe,SAAS;EACtB,OAAO,MAAM,WAAW,QAAQ,SAAS;GACvC,MAAM,aAAa,MAAM,KAAK,MAAM,UAAU;GAC9C,MAAM,QAAQ,QAAQ,IAAI;AAE1B,OAAI,UAAU,OACZ,QAAO,OAAO,KACZ,YAAY,YACV,CAAC,GAAG,KAAK,EACT,YAAY,WAAW,kCACxB,CACF;GAGH,MAAM,SAAS,SACb,KACE,UAAU,MAAM,KAAK,MAAM,CAAC,EAC5B,OAAO,SAAS,YAAY,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CACjD;AAEH,OAAI,CAAC,MACH,QAAO,KAAK,MAAM,MAAM,EAAE,OAAO,IAAI,MAAM,GAAG,CAAC;OAE/C,QAAO,KACL,MAAM,MAAM,SAAS,EACrB,OAAO,SAAS,MAAM,MAAM,EAAE,CAAC,CAChC;;EAGL,oBAAoB,SAClB,OAAO,KACL,YAAY,YACV,CAAC,GAAG,KAAK,EACT,sDACD,CACF;EACH,OAAO,wBAAwB;EAChC,CAAC,CACH"}
|
package/dist/CronJob.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Ref } from "@confect/core";
|
|
1
2
|
import { Cron, Duration } from "effect";
|
|
2
|
-
import { Ref as Ref$1 } from "@confect/core";
|
|
3
3
|
|
|
4
4
|
//#region src/CronJob.d.ts
|
|
5
5
|
declare namespace CronJob_d_exports {
|
|
@@ -11,11 +11,11 @@ interface CronJob {
|
|
|
11
11
|
readonly [TypeId]: TypeId;
|
|
12
12
|
readonly identifier: string;
|
|
13
13
|
readonly schedule: Cron.Cron | Duration.Duration;
|
|
14
|
-
readonly ref: Ref
|
|
14
|
+
readonly ref: Ref.AnyMutation | Ref.AnyAction;
|
|
15
15
|
readonly args: Record<string, unknown>;
|
|
16
16
|
}
|
|
17
17
|
declare const isCronJob: (u: unknown) => u is CronJob;
|
|
18
|
-
declare const make: <R extends Ref
|
|
18
|
+
declare const make: <R extends Ref.AnyMutation | Ref.AnyAction>(identifier: string, schedule: Cron.Cron | Duration.Duration, ref: R, ...args: Ref.OptionalArgs<R>) => CronJob;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { CronJob, CronJob_d_exports, TypeId, isCronJob, make };
|
|
21
21
|
//# sourceMappingURL=CronJob.d.ts.map
|
package/dist/CronJob.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CronJob.d.ts","names":[],"sources":["../src/CronJob.ts"],"mappings":";;;;;;;cAIa,MAAA;AAAA,KACD,MAAA,UAAgB,MAAA;AAAA,UAEX,OAAA;EAAA,UACL,MAAA,GAAS,MAAA;EAAA,SAEV,UAAA;EAAA,SACA,QAAA,EAAU,IAAA,CAAK,IAAA,GAAO,QAAA,CAAS,QAAA;EAAA,SAC/B,GAAA,EAAK,
|
|
1
|
+
{"version":3,"file":"CronJob.d.ts","names":[],"sources":["../src/CronJob.ts"],"mappings":";;;;;;;cAIa,MAAA;AAAA,KACD,MAAA,UAAgB,MAAA;AAAA,UAEX,OAAA;EAAA,UACL,MAAA,GAAS,MAAA;EAAA,SAEV,UAAA;EAAA,SACA,QAAA,EAAU,IAAA,CAAK,IAAA,GAAO,QAAA,CAAS,QAAA;EAAA,SAC/B,GAAA,EAAK,GAAA,CAAI,WAAA,GAAc,GAAA,CAAI,SAAA;EAAA,SAC3B,IAAA,EAAM,MAAA;AAAA;AAAA,cAGJ,SAAA,GAAa,CAAA,cAAa,CAAA,IAAK,OAAA;AAAA,cAoB/B,IAAA,aAAkB,GAAA,CAAI,WAAA,GAAc,GAAA,CAAI,SAAA,EACnD,UAAA,UACA,QAAA,EAAU,IAAA,CAAK,IAAA,GAAO,QAAA,CAAS,QAAA,EAC/B,GAAA,EAAK,CAAA,KACF,IAAA,EAAM,GAAA,CAAI,YAAA,CAAa,CAAA,MACzB,OAAA"}
|
package/dist/CronJob.js
CHANGED
package/dist/CronJob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CronJob.js","names":[],"sources":["../src/CronJob.ts"],"sourcesContent":["import type { Ref } from \"@confect/core\";\nimport type { Cron, Duration } from \"effect\";\nimport
|
|
1
|
+
{"version":3,"file":"CronJob.js","names":[],"sources":["../src/CronJob.ts"],"sourcesContent":["import type { Ref } from \"@confect/core\";\nimport type { Cron, Duration } from \"effect\";\nimport * as Predicate from \"effect/Predicate\";\n\nexport const TypeId = \"@confect/server/CronJob\";\nexport type TypeId = typeof TypeId;\n\nexport interface CronJob {\n readonly [TypeId]: TypeId;\n\n readonly identifier: string;\n readonly schedule: Cron.Cron | Duration.Duration;\n readonly ref: Ref.AnyMutation | Ref.AnyAction;\n readonly args: Record<string, unknown>;\n}\n\nexport const isCronJob = (u: unknown): u is CronJob =>\n Predicate.hasProperty(u, TypeId);\n\nconst Proto = {\n [TypeId]: TypeId,\n};\n\nconst makeProto = (\n identifier: string,\n schedule: Cron.Cron | Duration.Duration,\n ref: Ref.AnyMutation | Ref.AnyAction,\n args: Record<string, unknown>,\n): CronJob =>\n Object.assign(Object.create(Proto), {\n identifier,\n schedule,\n ref,\n args,\n });\n\nexport const make = <R extends Ref.AnyMutation | Ref.AnyAction>(\n identifier: string,\n schedule: Cron.Cron | Duration.Duration,\n ref: R,\n ...args: Ref.OptionalArgs<R>\n): CronJob => makeProto(identifier, schedule, ref, args[0] ?? {});\n"],"mappings":";;;;;;;;;AAIA,MAAa,SAAS;AAYtB,MAAa,aAAa,MACxB,UAAU,YAAY,GAAG,OAAO;AAElC,MAAM,QAAQ,GACX,SAAS,QACX;AAED,MAAM,aACJ,YACA,UACA,KACA,SAEA,OAAO,OAAO,OAAO,OAAO,MAAM,EAAE;CAClC;CACA;CACA;CACA;CACD,CAAC;AAEJ,MAAa,QACX,YACA,UACA,KACA,GAAG,SACS,UAAU,YAAY,UAAU,KAAK,KAAK,MAAM,EAAE,CAAC"}
|
package/dist/CronJobs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CronJobs.d.ts","names":[],"sources":["../src/CronJobs.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CronJobs.d.ts","names":[],"sources":["../src/CronJobs.ts"],"mappings":";;;;;;;cAaa,MAAA;AAAA,KACD,MAAA,UAAgB,MAAA;AAAA,UAEX,QAAA;EAAA,UACL,MAAA,GAAS,MAAA;EAAA,SACV,QAAA,EAAU,MAAA,SAAe,OAAA;EAAA,SACzB,cAAA,EAAgB,KAAA;EAEzB,GAAA,CAAI,IAAA,EAAM,OAAA,GAAkB,QAAA;AAAA;AAAA,cAGjB,UAAA,GAAc,CAAA,cAAa,CAAA,IAAK,QAAA;AAAA,cAkDhC,IAAA,QAAW,QAAA"}
|
package/dist/CronJobs.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { Array, Cron, Duration, Match, Order, Predicate, Record, pipe } from "effect";
|
|
3
2
|
import { cronJobs } from "convex/server";
|
|
4
|
-
import {
|
|
3
|
+
import { pipe } from "effect/Function";
|
|
4
|
+
import * as Array from "effect/Array";
|
|
5
|
+
import * as Predicate from "effect/Predicate";
|
|
6
|
+
import { Ref } from "@confect/core";
|
|
7
|
+
import * as Cron from "effect/Cron";
|
|
8
|
+
import * as Duration from "effect/Duration";
|
|
9
|
+
import * as Match from "effect/Match";
|
|
10
|
+
import * as Order from "effect/Order";
|
|
11
|
+
import * as Record from "effect/Record";
|
|
5
12
|
|
|
6
13
|
//#region src/CronJobs.ts
|
|
7
14
|
var CronJobs_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -17,8 +24,8 @@ const Proto = {
|
|
|
17
24
|
[TypeId]: TypeId,
|
|
18
25
|
add(cronJob) {
|
|
19
26
|
const newConvexCrons = Object.assign(cronJobs(), { crons: { ...this.convexCronJobs.crons } });
|
|
20
|
-
const functionReference = Ref
|
|
21
|
-
const encodedArgs = Ref
|
|
27
|
+
const functionReference = Ref.getFunctionReference(cronJob.ref);
|
|
28
|
+
const encodedArgs = Ref.encodeArgsSync(cronJob.ref, cronJob.args);
|
|
22
29
|
Match.value(cronJob.schedule).pipe(Match.when(Cron.isCron, (cron) => {
|
|
23
30
|
newConvexCrons.cron(cronJob.identifier, cronToConvexCronString(cron), functionReference, encodedArgs);
|
|
24
31
|
}), Match.when(Duration.isDuration, (duration) => {
|
package/dist/CronJobs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CronJobs.js","names":["makeConvexCrons"
|
|
1
|
+
{"version":3,"file":"CronJobs.js","names":["makeConvexCrons"],"sources":["../src/CronJobs.ts"],"sourcesContent":["import { Ref } from \"@confect/core\";\nimport type { CronJob as ConvexCronJob } from \"convex/server\";\nimport { cronJobs as makeConvexCrons, type Crons } from \"convex/server\";\nimport { pipe } from \"effect/Function\";\nimport * as Array from \"effect/Array\";\nimport * as Cron from \"effect/Cron\";\nimport * as Duration from \"effect/Duration\";\nimport * as Match from \"effect/Match\";\nimport * as Order from \"effect/Order\";\nimport * as Predicate from \"effect/Predicate\";\nimport * as Record from \"effect/Record\";\nimport type * as CronJob from \"./CronJob\";\n\nexport const TypeId = \"@confect/server/CronJobs\";\nexport type TypeId = typeof TypeId;\n\nexport interface CronJobs {\n readonly [TypeId]: TypeId;\n readonly cronJobs: Record<string, CronJob.CronJob>;\n readonly convexCronJobs: Crons;\n\n add(cron: CronJob.CronJob): CronJobs;\n}\n\nexport const isCronJobs = (u: unknown): u is CronJobs =>\n Predicate.hasProperty(u, TypeId);\n\nconst Proto = {\n [TypeId]: TypeId,\n\n add(this: CronJobs, cronJob: CronJob.CronJob) {\n const newConvexCrons = Object.assign(makeConvexCrons(), {\n crons: { ...this.convexCronJobs.crons },\n });\n\n const functionReference = Ref.getFunctionReference(cronJob.ref);\n const encodedArgs = Ref.encodeArgsSync(cronJob.ref, cronJob.args);\n\n Match.value(cronJob.schedule).pipe(\n Match.when(Cron.isCron, (cron) => {\n newConvexCrons.cron(\n cronJob.identifier,\n cronToConvexCronString(cron),\n functionReference,\n encodedArgs,\n );\n }),\n Match.when(Duration.isDuration, (duration) => {\n newConvexCrons.interval(\n cronJob.identifier,\n durationToConvexIntervalSchedule(duration),\n functionReference,\n encodedArgs,\n );\n }),\n Match.exhaustive,\n );\n\n return makeProto(\n Record.set(this.cronJobs, cronJob.identifier, cronJob),\n newConvexCrons,\n );\n },\n};\n\nconst makeProto = (\n cronJobs: Record<string, CronJob.CronJob>,\n convexCronJobs: Crons,\n): CronJobs =>\n Object.assign(Object.create(Proto), {\n cronJobs,\n convexCronJobs,\n });\n\nexport const make = (): CronJobs => makeProto({}, makeConvexCrons());\n\n/** @internal */\nexport const cronToConvexCronString = (cron: Cron.Cron): string => {\n const hasNonDefaultSeconds = cron.seconds.size !== 1 || !cron.seconds.has(0);\n if (hasNonDefaultSeconds) {\n throw new Error(\n \"Convex cron expressions do not support a seconds field. \" +\n \"The seconds field must be the default {0}. \" +\n \"Sub-minute scheduling is supported only by interval schedules defined using a Duration.\",\n );\n }\n\n return Array.join(\n [\n setToField(cron.minutes),\n setToField(cron.hours),\n setToField(cron.days),\n setToField(cron.months),\n setToField(cron.weekdays),\n ],\n \" \",\n );\n};\n\nconst setToField = (set: ReadonlySet<number>): string => {\n if (set.size === 0) return \"*\";\n return pipe(\n set,\n Array.sort(Order.number),\n Array.map((n) => n.toString()),\n Array.join(\",\"),\n );\n};\n\n/** @internal */\nexport const durationToConvexIntervalSchedule = (\n duration: Duration.Duration,\n): IntervalSchedule => {\n const millis = Duration.toMillis(duration);\n if (millis <= 0) {\n throw new Error(\"Interval must be a positive duration.\");\n }\n\n const oneHourInMillis = Duration.hours(1).pipe(Duration.toMillis);\n const hours = millis / oneHourInMillis;\n if (Number.isInteger(hours)) {\n return { type: \"interval\", hours };\n }\n\n const oneMinuteInMillis = Duration.minutes(1).pipe(Duration.toMillis);\n const minutes = millis / oneMinuteInMillis;\n if (Number.isInteger(minutes)) {\n return { type: \"interval\", minutes };\n }\n\n const oneSecondInMillis = Duration.seconds(1).pipe(Duration.toMillis);\n const seconds = millis / oneSecondInMillis;\n if (Number.isInteger(seconds)) {\n return { type: \"interval\", seconds };\n }\n\n throw new Error(\n \"Interval must be a whole number of seconds, minutes, or hours.\",\n );\n};\n\ntype IntervalSchedule = Extract<\n ConvexCronJob[\"schedule\"],\n { type: \"interval\" }\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaA,MAAa,SAAS;AAWtB,MAAa,cAAc,MACzB,UAAU,YAAY,GAAG,OAAO;AAElC,MAAM,QAAQ;EACX,SAAS;CAEV,IAAoB,SAA0B;EAC5C,MAAM,iBAAiB,OAAO,OAAOA,UAAiB,EAAE,EACtD,OAAO,EAAE,GAAG,KAAK,eAAe,OAAO,EACxC,CAAC;EAEF,MAAM,oBAAoB,IAAI,qBAAqB,QAAQ,IAAI;EAC/D,MAAM,cAAc,IAAI,eAAe,QAAQ,KAAK,QAAQ,KAAK;AAEjE,QAAM,MAAM,QAAQ,SAAS,CAAC,KAC5B,MAAM,KAAK,KAAK,SAAS,SAAS;AAChC,kBAAe,KACb,QAAQ,YACR,uBAAuB,KAAK,EAC5B,mBACA,YACD;IACD,EACF,MAAM,KAAK,SAAS,aAAa,aAAa;AAC5C,kBAAe,SACb,QAAQ,YACR,iCAAiC,SAAS,EAC1C,mBACA,YACD;IACD,EACF,MAAM,WACP;AAED,SAAO,UACL,OAAO,IAAI,KAAK,UAAU,QAAQ,YAAY,QAAQ,EACtD,eACD;;CAEJ;AAED,MAAM,aACJ,UACA,mBAEA,OAAO,OAAO,OAAO,OAAO,MAAM,EAAE;CAClC;CACA;CACD,CAAC;AAEJ,MAAa,aAAuB,UAAU,EAAE,EAAEA,UAAiB,CAAC;;AAGpE,MAAa,0BAA0B,SAA4B;AAEjE,KAD6B,KAAK,QAAQ,SAAS,KAAK,CAAC,KAAK,QAAQ,IAAI,EAAE,CAE1E,OAAM,IAAI,MACR,6LAGD;AAGH,QAAO,MAAM,KACX;EACE,WAAW,KAAK,QAAQ;EACxB,WAAW,KAAK,MAAM;EACtB,WAAW,KAAK,KAAK;EACrB,WAAW,KAAK,OAAO;EACvB,WAAW,KAAK,SAAS;EAC1B,EACD,IACD;;AAGH,MAAM,cAAc,QAAqC;AACvD,KAAI,IAAI,SAAS,EAAG,QAAO;AAC3B,QAAO,KACL,KACA,MAAM,KAAK,MAAM,OAAO,EACxB,MAAM,KAAK,MAAM,EAAE,UAAU,CAAC,EAC9B,MAAM,KAAK,IAAI,CAChB;;;AAIH,MAAa,oCACX,aACqB;CACrB,MAAM,SAAS,SAAS,SAAS,SAAS;AAC1C,KAAI,UAAU,EACZ,OAAM,IAAI,MAAM,wCAAwC;CAI1D,MAAM,QAAQ,SADU,SAAS,MAAM,EAAE,CAAC,KAAK,SAAS,SAAS;AAEjE,KAAI,OAAO,UAAU,MAAM,CACzB,QAAO;EAAE,MAAM;EAAY;EAAO;CAIpC,MAAM,UAAU,SADU,SAAS,QAAQ,EAAE,CAAC,KAAK,SAAS,SAAS;AAErE,KAAI,OAAO,UAAU,QAAQ,CAC3B,QAAO;EAAE,MAAM;EAAY;EAAS;CAItC,MAAM,UAAU,SADU,SAAS,QAAQ,EAAE,CAAC,KAAK,SAAS,SAAS;AAErE,KAAI,OAAO,UAAU,QAAQ,CAC3B,QAAO;EAAE,MAAM;EAAY;EAAS;AAGtC,OAAM,IAAI,MACR,iEACD"}
|