@confect/server 9.0.0-next.7 → 9.0.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/ActionCtx.d.ts +1 -1
  3. package/dist/ActionCtx.js +1 -1
  4. package/dist/ActionCtx.js.map +1 -1
  5. package/dist/ActionRunner.d.ts +6 -4
  6. package/dist/ActionRunner.d.ts.map +1 -1
  7. package/dist/ActionRunner.js +4 -3
  8. package/dist/ActionRunner.js.map +1 -1
  9. package/dist/Auth.d.ts +5 -3
  10. package/dist/Auth.d.ts.map +1 -1
  11. package/dist/Auth.js +5 -1
  12. package/dist/Auth.js.map +1 -1
  13. package/dist/BlobNotFoundError.d.ts +1 -1
  14. package/dist/BlobNotFoundError.d.ts.map +1 -1
  15. package/dist/BlobNotFoundError.js +1 -1
  16. package/dist/BlobNotFoundError.js.map +1 -1
  17. package/dist/ConvexConfigProvider.d.ts +1 -1
  18. package/dist/ConvexConfigProvider.d.ts.map +1 -1
  19. package/dist/ConvexConfigProvider.js +6 -1
  20. package/dist/ConvexConfigProvider.js.map +1 -1
  21. package/dist/CronJob.d.ts +3 -3
  22. package/dist/CronJob.d.ts.map +1 -1
  23. package/dist/CronJob.js +1 -1
  24. package/dist/CronJob.js.map +1 -1
  25. package/dist/CronJobs.d.ts.map +1 -1
  26. package/dist/CronJobs.js +11 -4
  27. package/dist/CronJobs.js.map +1 -1
  28. package/dist/DatabaseReader.d.ts +436 -435
  29. package/dist/DatabaseReader.d.ts.map +1 -1
  30. package/dist/DatabaseReader.js +2 -1
  31. package/dist/DatabaseReader.js.map +1 -1
  32. package/dist/DatabaseSchema.js +1 -1
  33. package/dist/DatabaseSchema.js.map +1 -1
  34. package/dist/DatabaseWriter.d.ts +3 -1
  35. package/dist/DatabaseWriter.d.ts.map +1 -1
  36. package/dist/DatabaseWriter.js +5 -1
  37. package/dist/DatabaseWriter.js.map +1 -1
  38. package/dist/Document.d.ts +2 -1
  39. package/dist/Document.d.ts.map +1 -1
  40. package/dist/Document.js +5 -1
  41. package/dist/Document.js.map +1 -1
  42. package/dist/FunctionImpl.d.ts +2 -1
  43. package/dist/FunctionImpl.d.ts.map +1 -1
  44. package/dist/FunctionImpl.js +4 -1
  45. package/dist/FunctionImpl.js.map +1 -1
  46. package/dist/GroupImpl.d.ts +2 -1
  47. package/dist/GroupImpl.d.ts.map +1 -1
  48. package/dist/GroupImpl.js +9 -1
  49. package/dist/GroupImpl.js.map +1 -1
  50. package/dist/Handler.d.ts +2 -2
  51. package/dist/HttpApi.d.ts +4 -2
  52. package/dist/HttpApi.d.ts.map +1 -1
  53. package/dist/HttpApi.js +7 -2
  54. package/dist/HttpApi.js.map +1 -1
  55. package/dist/MutationCtx.d.ts +1 -1
  56. package/dist/MutationCtx.js +1 -1
  57. package/dist/MutationCtx.js.map +1 -1
  58. package/dist/MutationRunner.d.ts +6 -4
  59. package/dist/MutationRunner.d.ts.map +1 -1
  60. package/dist/MutationRunner.js +4 -3
  61. package/dist/MutationRunner.js.map +1 -1
  62. package/dist/OrderedQuery.d.ts +7 -5
  63. package/dist/OrderedQuery.d.ts.map +1 -1
  64. package/dist/OrderedQuery.js +4 -1
  65. package/dist/OrderedQuery.js.map +1 -1
  66. package/dist/QueryCtx.d.ts +1 -1
  67. package/dist/QueryCtx.js +1 -1
  68. package/dist/QueryCtx.js.map +1 -1
  69. package/dist/QueryInitializer.d.ts +2 -1
  70. package/dist/QueryInitializer.d.ts.map +1 -1
  71. package/dist/QueryInitializer.js +5 -1
  72. package/dist/QueryInitializer.js.map +1 -1
  73. package/dist/QueryRunner.d.ts +6 -4
  74. package/dist/QueryRunner.d.ts.map +1 -1
  75. package/dist/QueryRunner.js +4 -3
  76. package/dist/QueryRunner.js.map +1 -1
  77. package/dist/RegisteredConvexFunction.d.ts +117 -115
  78. package/dist/RegisteredConvexFunction.d.ts.map +1 -1
  79. package/dist/RegisteredConvexFunction.js +6 -1
  80. package/dist/RegisteredConvexFunction.js.map +1 -1
  81. package/dist/RegisteredFunction.d.ts +8 -6
  82. package/dist/RegisteredFunction.d.ts.map +1 -1
  83. package/dist/RegisteredFunction.js +5 -1
  84. package/dist/RegisteredFunction.js.map +1 -1
  85. package/dist/RegisteredFunctions.d.ts.map +1 -1
  86. package/dist/RegisteredFunctions.js +2 -1
  87. package/dist/RegisteredFunctions.js.map +1 -1
  88. package/dist/RegisteredNodeFunction.d.ts.map +1 -1
  89. package/dist/RegisteredNodeFunction.js +3 -2
  90. package/dist/RegisteredNodeFunction.js.map +1 -1
  91. package/dist/RegistryItem.js +1 -1
  92. package/dist/RegistryItem.js.map +1 -1
  93. package/dist/Scheduler.d.ts +12 -8
  94. package/dist/Scheduler.d.ts.map +1 -1
  95. package/dist/Scheduler.js +10 -6
  96. package/dist/Scheduler.js.map +1 -1
  97. package/dist/SchemaToValidator.d.ts +4 -1
  98. package/dist/SchemaToValidator.d.ts.map +1 -1
  99. package/dist/SchemaToValidator.js +13 -1
  100. package/dist/SchemaToValidator.js.map +1 -1
  101. package/dist/StorageActionWriter.d.ts +3 -2
  102. package/dist/StorageActionWriter.d.ts.map +1 -1
  103. package/dist/StorageActionWriter.js +4 -1
  104. package/dist/StorageActionWriter.js.map +1 -1
  105. package/dist/StorageReader.d.ts +3 -2
  106. package/dist/StorageReader.d.ts.map +1 -1
  107. package/dist/StorageReader.js +5 -1
  108. package/dist/StorageReader.js.map +1 -1
  109. package/dist/StorageWriter.d.ts +3 -2
  110. package/dist/StorageWriter.d.ts.map +1 -1
  111. package/dist/StorageWriter.js +4 -1
  112. package/dist/StorageWriter.js.map +1 -1
  113. package/dist/Table.d.ts +19 -19
  114. package/dist/Table.d.ts.map +1 -1
  115. package/dist/Table.js +2 -1
  116. package/dist/Table.js.map +1 -1
  117. package/dist/TableInfo.d.ts +1 -1
  118. package/dist/VectorSearch.d.ts +3 -1
  119. package/dist/VectorSearch.d.ts.map +1 -1
  120. package/dist/VectorSearch.js +3 -1
  121. package/dist/VectorSearch.js.map +1 -1
  122. package/dist/internal/utils.d.ts +3 -2
  123. package/dist/internal/utils.d.ts.map +1 -1
  124. package/dist/internal/utils.js +3 -1
  125. package/dist/internal/utils.js.map +1 -1
  126. package/package.json +2 -2
  127. package/src/ActionCtx.ts +1 -1
  128. package/src/ActionRunner.ts +2 -1
  129. package/src/Auth.ts +5 -1
  130. package/src/BlobNotFoundError.ts +1 -1
  131. package/src/ConvexConfigProvider.ts +6 -8
  132. package/src/CronJob.ts +1 -1
  133. package/src/CronJobs.ts +8 -10
  134. package/src/DatabaseReader.ts +2 -1
  135. package/src/DatabaseSchema.ts +1 -1
  136. package/src/DatabaseWriter.ts +5 -1
  137. package/src/Document.ts +5 -1
  138. package/src/FunctionImpl.ts +4 -1
  139. package/src/GroupImpl.ts +9 -11
  140. package/src/HttpApi.ts +8 -9
  141. package/src/MutationCtx.ts +1 -1
  142. package/src/MutationRunner.ts +2 -1
  143. package/src/OrderedQuery.ts +5 -1
  144. package/src/QueryCtx.ts +1 -1
  145. package/src/QueryInitializer.ts +5 -1
  146. package/src/QueryRunner.ts +2 -1
  147. package/src/RegisteredConvexFunction.ts +6 -1
  148. package/src/RegisteredFunction.ts +5 -1
  149. package/src/RegisteredFunctions.ts +3 -1
  150. package/src/RegisteredNodeFunction.ts +4 -2
  151. package/src/RegistryItem.ts +1 -1
  152. package/src/Scheduler.ts +5 -1
  153. package/src/SchemaToValidator.ts +14 -16
  154. package/src/StorageActionWriter.ts +4 -1
  155. package/src/StorageReader.ts +5 -1
  156. package/src/StorageWriter.ts +4 -1
  157. package/src/Table.ts +2 -1
  158. package/src/VectorSearch.ts +3 -1
  159. package/src/internal/utils.ts +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../src/internal/utils.ts"],"sourcesContent":["import type { Predicate } from \"effect\";\nimport { Array, Effect, Record } from \"effect\";\n\ntype NestedObject<T> = {\n [key: string]: T | NestedObject<T>;\n};\n\nexport const mapLeaves = <T, U>(\n obj: NestedObject<T>,\n leafRefinement: Predicate.Refinement<unknown, T>,\n f: (value: T) => U,\n): NestedObject<U> => {\n const result: any = {};\n\n for (const key in obj) {\n const value = obj[key];\n\n if (leafRefinement(value)) {\n result[key] = f(value as T);\n } else {\n result[key] = mapLeaves(value as NestedObject<T>, leafRefinement, f);\n }\n }\n\n return result;\n};\n\nconst collectBranchLeaves = <T>(\n obj: NestedObject<T>,\n leafRefinement: Predicate.Refinement<unknown, T>,\n path: string[] = [],\n): { path: string[]; values: Record<string, T> }[] => {\n const leaves = Record.filter(obj, leafRefinement) as Record<string, T>;\n const hasLeaves = Record.keys(leaves).length > 0;\n\n const currentBranch = hasLeaves ? [{ path, values: leaves }] : [];\n\n const nestedBranches = Array.flatMap(Record.keys(obj), (key) => {\n const value = obj[key];\n\n if (!leafRefinement(value) && typeof value === \"object\") {\n return collectBranchLeaves(value as NestedObject<T>, leafRefinement, [\n ...path,\n key,\n ]);\n }\n return [];\n });\n\n return [...currentBranch, ...nestedBranches];\n};\n\nexport const forEachBranchLeaves = <T, A, E, R>(\n obj: NestedObject<T>,\n leafRefinement: Predicate.Refinement<unknown, T>,\n f: (branchLeaves: {\n path: string[];\n values: Record<string, T>;\n }) => Effect.Effect<A, E, R>,\n): Effect.Effect<void, E, R> => {\n const branchLeaves = collectBranchLeaves(obj, leafRefinement);\n return Effect.forEach(branchLeaves, f, {\n discard: true,\n });\n};\n\nexport const setNestedProperty = <T extends object>(\n obj: T,\n path: PropertyKey[],\n value: any,\n): T => {\n if (path.length === 0) {\n return obj;\n }\n\n if (path.length === 1) {\n const key = path[0] as keyof T;\n return { ...obj, [key]: value };\n }\n\n const [head, ...tail] = path;\n const key = head as keyof T;\n return {\n ...obj,\n [key]: setNestedProperty((obj as any)[key] ?? {}, tail, value),\n };\n};\n"],"mappings":";;;AAOA,MAAa,aACX,KACA,gBACA,MACoB;CACpB,MAAM,SAAc,EAAE;AAEtB,MAAK,MAAM,OAAO,KAAK;EACrB,MAAM,QAAQ,IAAI;AAElB,MAAI,eAAe,MAAM,CACvB,QAAO,OAAO,EAAE,MAAW;MAE3B,QAAO,OAAO,UAAU,OAA0B,gBAAgB,EAAE;;AAIxE,QAAO;;AAGT,MAAM,uBACJ,KACA,gBACA,OAAiB,EAAE,KACiC;CACpD,MAAM,SAAS,OAAO,OAAO,KAAK,eAAe;CAGjD,MAAM,gBAFY,OAAO,KAAK,OAAO,CAAC,SAAS,IAEb,CAAC;EAAE;EAAM,QAAQ;EAAQ,CAAC,GAAG,EAAE;CAEjE,MAAM,iBAAiB,MAAM,QAAQ,OAAO,KAAK,IAAI,GAAG,QAAQ;EAC9D,MAAM,QAAQ,IAAI;AAElB,MAAI,CAAC,eAAe,MAAM,IAAI,OAAO,UAAU,SAC7C,QAAO,oBAAoB,OAA0B,gBAAgB,CACnE,GAAG,MACH,IACD,CAAC;AAEJ,SAAO,EAAE;GACT;AAEF,QAAO,CAAC,GAAG,eAAe,GAAG,eAAe;;AAG9C,MAAa,uBACX,KACA,gBACA,MAI8B;CAC9B,MAAM,eAAe,oBAAoB,KAAK,eAAe;AAC7D,QAAO,OAAO,QAAQ,cAAc,GAAG,EACrC,SAAS,MACV,CAAC;;AAGJ,MAAa,qBACX,KACA,MACA,UACM;AACN,KAAI,KAAK,WAAW,EAClB,QAAO;AAGT,KAAI,KAAK,WAAW,GAAG;EACrB,MAAM,MAAM,KAAK;AACjB,SAAO;GAAE,GAAG;IAAM,MAAM;GAAO;;CAGjC,MAAM,CAAC,MAAM,GAAG,QAAQ;CACxB,MAAM,MAAM;AACZ,QAAO;EACL,GAAG;GACF,MAAM,kBAAmB,IAAY,QAAQ,EAAE,EAAE,MAAM,MAAM;EAC/D"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../src/internal/utils.ts"],"sourcesContent":["import type { Predicate } from \"effect\";\nimport * as Array from \"effect/Array\";\nimport * as Effect from \"effect/Effect\";\nimport * as Record from \"effect/Record\";\n\ntype NestedObject<T> = {\n [key: string]: T | NestedObject<T>;\n};\n\nexport const mapLeaves = <T, U>(\n obj: NestedObject<T>,\n leafRefinement: Predicate.Refinement<unknown, T>,\n f: (value: T) => U,\n): NestedObject<U> => {\n const result: any = {};\n\n for (const key in obj) {\n const value = obj[key];\n\n if (leafRefinement(value)) {\n result[key] = f(value as T);\n } else {\n result[key] = mapLeaves(value as NestedObject<T>, leafRefinement, f);\n }\n }\n\n return result;\n};\n\nconst collectBranchLeaves = <T>(\n obj: NestedObject<T>,\n leafRefinement: Predicate.Refinement<unknown, T>,\n path: string[] = [],\n): { path: string[]; values: Record<string, T> }[] => {\n const leaves = Record.filter(obj, leafRefinement) as Record<string, T>;\n const hasLeaves = Record.keys(leaves).length > 0;\n\n const currentBranch = hasLeaves ? [{ path, values: leaves }] : [];\n\n const nestedBranches = Array.flatMap(Record.keys(obj), (key) => {\n const value = obj[key];\n\n if (!leafRefinement(value) && typeof value === \"object\") {\n return collectBranchLeaves(value as NestedObject<T>, leafRefinement, [\n ...path,\n key,\n ]);\n }\n return [];\n });\n\n return [...currentBranch, ...nestedBranches];\n};\n\nexport const forEachBranchLeaves = <T, A, E, R>(\n obj: NestedObject<T>,\n leafRefinement: Predicate.Refinement<unknown, T>,\n f: (branchLeaves: {\n path: string[];\n values: Record<string, T>;\n }) => Effect.Effect<A, E, R>,\n): Effect.Effect<void, E, R> => {\n const branchLeaves = collectBranchLeaves(obj, leafRefinement);\n return Effect.forEach(branchLeaves, f, {\n discard: true,\n });\n};\n\nexport const setNestedProperty = <T extends object>(\n obj: T,\n path: PropertyKey[],\n value: any,\n): T => {\n if (path.length === 0) {\n return obj;\n }\n\n if (path.length === 1) {\n const key = path[0] as keyof T;\n return { ...obj, [key]: value };\n }\n\n const [head, ...tail] = path;\n const key = head as keyof T;\n return {\n ...obj,\n [key]: setNestedProperty((obj as any)[key] ?? {}, tail, value),\n };\n};\n"],"mappings":";;;;;AASA,MAAa,aACX,KACA,gBACA,MACoB;CACpB,MAAM,SAAc,EAAE;AAEtB,MAAK,MAAM,OAAO,KAAK;EACrB,MAAM,QAAQ,IAAI;AAElB,MAAI,eAAe,MAAM,CACvB,QAAO,OAAO,EAAE,MAAW;MAE3B,QAAO,OAAO,UAAU,OAA0B,gBAAgB,EAAE;;AAIxE,QAAO;;AAGT,MAAM,uBACJ,KACA,gBACA,OAAiB,EAAE,KACiC;CACpD,MAAM,SAAS,OAAO,OAAO,KAAK,eAAe;CAGjD,MAAM,gBAFY,OAAO,KAAK,OAAO,CAAC,SAAS,IAEb,CAAC;EAAE;EAAM,QAAQ;EAAQ,CAAC,GAAG,EAAE;CAEjE,MAAM,iBAAiB,MAAM,QAAQ,OAAO,KAAK,IAAI,GAAG,QAAQ;EAC9D,MAAM,QAAQ,IAAI;AAElB,MAAI,CAAC,eAAe,MAAM,IAAI,OAAO,UAAU,SAC7C,QAAO,oBAAoB,OAA0B,gBAAgB,CACnE,GAAG,MACH,IACD,CAAC;AAEJ,SAAO,EAAE;GACT;AAEF,QAAO,CAAC,GAAG,eAAe,GAAG,eAAe;;AAG9C,MAAa,uBACX,KACA,gBACA,MAI8B;CAC9B,MAAM,eAAe,oBAAoB,KAAK,eAAe;AAC7D,QAAO,OAAO,QAAQ,cAAc,GAAG,EACrC,SAAS,MACV,CAAC;;AAGJ,MAAa,qBACX,KACA,MACA,UACM;AACN,KAAI,KAAK,WAAW,EAClB,QAAO;AAGT,KAAI,KAAK,WAAW,GAAG;EACrB,MAAM,MAAM,KAAK;AACjB,SAAO;GAAE,GAAG;IAAM,MAAM;GAAO;;CAGjC,MAAM,CAAC,MAAM,GAAG,QAAQ;CACxB,MAAM,MAAM;AACZ,QAAO;EACL,GAAG;GACF,MAAM,kBAAmB,IAAY,QAAQ,EAAE,EAAE,MAAM,MAAM;EAC/D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@confect/server",
3
3
  "description": "Backend bindings to the Convex platform",
4
- "version": "9.0.0-next.7",
4
+ "version": "9.0.0-next.8",
5
5
  "author": "RJ Dellecese",
6
6
  "bugs": {
7
7
  "url": "https://github.com/rjdellecese/confect/issues"
@@ -72,7 +72,7 @@
72
72
  "@effect/platform-node": "^0.106.0",
73
73
  "convex": "1.39.1",
74
74
  "effect": "^3.21.2",
75
- "@confect/core": "^9.0.0-next.7"
75
+ "@confect/core": "^9.0.0-next.8"
76
76
  },
77
77
  "repository": {
78
78
  "type": "git",
package/src/ActionCtx.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { GenericActionCtx, GenericDataModel } from "convex/server";
2
- import { Context } from "effect";
2
+ import * as Context from "effect/Context";
3
3
 
4
4
  export const ActionCtx = <DataModel extends GenericDataModel>() =>
5
5
  Context.GenericTag<GenericActionCtx<DataModel>>("@confect/server/ActionCtx");
@@ -1,7 +1,8 @@
1
1
  import * as Ref from "@confect/core/Ref";
2
2
  import { type GenericActionCtx } from "convex/server";
3
3
  import type { ParseResult, Effect } from "effect";
4
- import { Context, Layer } from "effect";
4
+ import * as Context from "effect/Context";
5
+ import * as Layer from "effect/Layer";
5
6
 
6
7
  const make =
7
8
  (runAction: GenericActionCtx<any>["runAction"]) =>
package/src/Auth.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import type { Auth as ConvexAuth } from "convex/server";
2
- import { Effect, flow, Layer, Option, Schema } from "effect";
2
+ import { flow } from "effect/Function";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ import * as Option from "effect/Option";
6
+ import * as Schema from "effect/Schema";
3
7
 
4
8
  const make = (auth: ConvexAuth) => ({
5
9
  getUserIdentity: Effect.promise(() => auth.getUserIdentity()).pipe(
@@ -1,4 +1,4 @@
1
- import { Schema } from "effect";
1
+ import * as Schema from "effect/Schema";
2
2
 
3
3
  export class BlobNotFoundError extends Schema.TaggedError<BlobNotFoundError>()(
4
4
  "BlobNotFoundError",
@@ -1,11 +1,9 @@
1
- import {
2
- Array,
3
- ConfigError,
4
- ConfigProvider,
5
- ConfigProviderPathPatch,
6
- Effect,
7
- pipe,
8
- } from "effect";
1
+ import { pipe } from "effect/Function";
2
+ import * as Array from "effect/Array";
3
+ import * as ConfigError from "effect/ConfigError";
4
+ import * as ConfigProvider from "effect/ConfigProvider";
5
+ import * as ConfigProviderPathPatch from "effect/ConfigProviderPathPatch";
6
+ import * as Effect from "effect/Effect";
9
7
 
10
8
  declare const process: { env: Record<string, string | undefined> };
11
9
 
package/src/CronJob.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Ref } from "@confect/core";
2
2
  import type { Cron, Duration } from "effect";
3
- import { Predicate } from "effect";
3
+ import * as Predicate from "effect/Predicate";
4
4
 
5
5
  export const TypeId = "@confect/server/CronJob";
6
6
  export type TypeId = typeof TypeId;
package/src/CronJobs.ts CHANGED
@@ -1,16 +1,14 @@
1
1
  import { Ref } from "@confect/core";
2
2
  import type { CronJob as ConvexCronJob } from "convex/server";
3
3
  import { cronJobs as makeConvexCrons, type Crons } from "convex/server";
4
- import {
5
- Array,
6
- Cron,
7
- Duration,
8
- Match,
9
- Order,
10
- pipe,
11
- Predicate,
12
- Record,
13
- } from "effect";
4
+ import { pipe } from "effect/Function";
5
+ import * as Array from "effect/Array";
6
+ import * as Cron from "effect/Cron";
7
+ import * as Duration from "effect/Duration";
8
+ import * as Match from "effect/Match";
9
+ import * as Order from "effect/Order";
10
+ import * as Predicate from "effect/Predicate";
11
+ import * as Record from "effect/Record";
14
12
  import type * as CronJob from "./CronJob";
15
13
 
16
14
  export const TypeId = "@confect/server/CronJobs";
@@ -1,5 +1,6 @@
1
1
  import type { GenericDatabaseReader } from "convex/server";
2
- import { Context, Layer } from "effect";
2
+ import * as Context from "effect/Context";
3
+ import * as Layer from "effect/Layer";
3
4
  import type { BaseDatabaseReader } from "@confect/core/Types";
4
5
  import type * as DatabaseSchema from "./DatabaseSchema";
5
6
  import type * as DataModel from "./DataModel";
@@ -1,4 +1,4 @@
1
- import { Predicate } from "effect";
1
+ import * as Predicate from "effect/Predicate";
2
2
  import type * as Table from "./Table";
3
3
 
4
4
  export const TypeId = "@confect/server/DatabaseSchema";
@@ -6,7 +6,11 @@ import type {
6
6
  WithoutSystemFields,
7
7
  } from "convex/server";
8
8
  import type { GenericId } from "convex/values";
9
- import { Context, Effect, Layer, pipe, Record } from "effect";
9
+ import { pipe } from "effect/Function";
10
+ import * as Context from "effect/Context";
11
+ import * as Effect from "effect/Effect";
12
+ import * as Layer from "effect/Layer";
13
+ import * as Record from "effect/Record";
10
14
  import type * as DatabaseSchema from "./DatabaseSchema";
11
15
  import type * as DataModel from "./DataModel";
12
16
  import type { DocumentByName as DocumentByName_ } from "./DataModel";
package/src/Document.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import * as SystemFields from "@confect/core/SystemFields";
2
- import { Effect, Function, ParseResult, pipe, Schema } from "effect";
2
+ import { pipe } from "effect/Function";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Function from "effect/Function";
5
+ import * as ParseResult from "effect/ParseResult";
6
+ import * as Schema from "effect/Schema";
3
7
  import type { ReadonlyRecord } from "effect/Record";
4
8
  import type * as DataModel from "./DataModel";
5
9
  import type { ReadonlyValue } from "./SchemaToValidator";
@@ -1,7 +1,10 @@
1
1
  import type * as FunctionSpec from "@confect/core/FunctionSpec";
2
2
  import type * as GroupSpec from "@confect/core/GroupSpec";
3
3
  import * as Registry from "@confect/core/Registry";
4
- import { Context, Effect, Layer, Ref } from "effect";
4
+ import * as Context from "effect/Context";
5
+ import * as Effect from "effect/Effect";
6
+ import * as Layer from "effect/Layer";
7
+ import * as Ref from "effect/Ref";
5
8
  import type * as DatabaseSchema from "./DatabaseSchema";
6
9
  import type * as Handler from "./Handler";
7
10
  import { setNestedProperty } from "./internal/utils";
package/src/GroupImpl.ts CHANGED
@@ -1,16 +1,14 @@
1
1
  import type * as GroupSpec from "@confect/core/GroupSpec";
2
2
  import * as Registry from "@confect/core/Registry";
3
- import {
4
- Array,
5
- Context,
6
- Effect,
7
- Layer,
8
- Option,
9
- pipe,
10
- Predicate,
11
- Record,
12
- Ref,
13
- } from "effect";
3
+ import { pipe } from "effect/Function";
4
+ import * as Array from "effect/Array";
5
+ import * as Context from "effect/Context";
6
+ import * as Effect from "effect/Effect";
7
+ import * as Layer from "effect/Layer";
8
+ import * as Option from "effect/Option";
9
+ import * as Predicate from "effect/Predicate";
10
+ import * as Record from "effect/Record";
11
+ import * as Ref from "effect/Ref";
14
12
  import type * as DatabaseSchema from "./DatabaseSchema";
15
13
  import type * as FunctionImpl from "./FunctionImpl";
16
14
 
package/src/HttpApi.ts CHANGED
@@ -1,11 +1,7 @@
1
- import {
2
- type HttpApi,
3
- HttpApiBuilder,
4
- HttpApiScalar,
5
- type HttpApp,
6
- type HttpRouter,
7
- HttpServer,
8
- } from "@effect/platform";
1
+ import type { HttpApi, HttpApp, HttpRouter } from "@effect/platform";
2
+ import * as HttpApiBuilder from "@effect/platform/HttpApiBuilder";
3
+ import * as HttpApiScalar from "@effect/platform/HttpApiScalar";
4
+ import * as HttpServer from "@effect/platform/HttpServer";
9
5
  import {
10
6
  type HttpRouter as ConvexHttpRouter,
11
7
  type GenericActionCtx,
@@ -15,7 +11,10 @@ import {
15
11
  ROUTABLE_HTTP_METHODS,
16
12
  type RouteSpecWithPathPrefix,
17
13
  } from "convex/server";
18
- import { Array, Layer, pipe, Record } from "effect";
14
+ import { pipe } from "effect/Function";
15
+ import * as Array from "effect/Array";
16
+ import * as Layer from "effect/Layer";
17
+ import * as Record from "effect/Record";
19
18
  import * as ActionCtx from "./ActionCtx";
20
19
  import * as ActionRunner from "./ActionRunner";
21
20
  import * as Auth from "./Auth";
@@ -1,5 +1,5 @@
1
1
  import type { GenericDataModel, GenericMutationCtx } from "convex/server";
2
- import { Context } from "effect";
2
+ import * as Context from "effect/Context";
3
3
 
4
4
  export const MutationCtx = <DataModel extends GenericDataModel>() =>
5
5
  Context.GenericTag<GenericMutationCtx<DataModel>>(
@@ -1,7 +1,8 @@
1
1
  import * as Ref from "@confect/core/Ref";
2
2
  import { type GenericMutationCtx } from "convex/server";
3
3
  import type { ParseResult, Effect } from "effect";
4
- import { Context, Layer } from "effect";
4
+ import * as Context from "effect/Context";
5
+ import * as Layer from "effect/Layer";
5
6
 
6
7
  const make =
7
8
  (runMutation: GenericMutationCtx<any>["runMutation"]) =>
@@ -4,7 +4,11 @@ import type {
4
4
  OrderedQuery as ConvexOrderedQuery,
5
5
  PaginationResult,
6
6
  } from "convex/server";
7
- import { Chunk, Effect, identity, type Option, pipe, Stream } from "effect";
7
+ import { identity, pipe } from "effect/Function";
8
+ import type { Option } from "effect";
9
+ import * as Chunk from "effect/Chunk";
10
+ import * as Effect from "effect/Effect";
11
+ import * as Stream from "effect/Stream";
8
12
  import * as Document from "./Document";
9
13
  import type * as TableInfo from "./TableInfo";
10
14
 
package/src/QueryCtx.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { GenericDataModel, GenericQueryCtx } from "convex/server";
2
- import { Context } from "effect";
2
+ import * as Context from "effect/Context";
3
3
 
4
4
  export const QueryCtx = <DataModel extends GenericDataModel>() =>
5
5
  Context.GenericTag<GenericQueryCtx<DataModel>>("@confect/server/QueryCtx");
@@ -16,7 +16,11 @@ import type {
16
16
  SearchIndexes,
17
17
  } from "convex/server";
18
18
  import type { GenericId } from "convex/values";
19
- import { Array, Effect, Either, pipe, Schema } from "effect";
19
+ import { pipe } from "effect/Function";
20
+ import * as Array from "effect/Array";
21
+ import * as Effect from "effect/Effect";
22
+ import * as Either from "effect/Either";
23
+ import * as Schema from "effect/Schema";
20
24
  import type {
21
25
  BaseDatabaseReader,
22
26
  IndexFieldTypesForEq,
@@ -1,7 +1,8 @@
1
1
  import * as Ref from "@confect/core/Ref";
2
2
  import { type GenericQueryCtx } from "convex/server";
3
3
  import type { ParseResult, Effect } from "effect";
4
- import { Context, Layer } from "effect";
4
+ import * as Context from "effect/Context";
5
+ import * as Layer from "effect/Layer";
5
6
 
6
7
  const make =
7
8
  (runQuery: GenericQueryCtx<any>["runQuery"]) =>
@@ -11,7 +11,12 @@ import {
11
11
  queryGeneric,
12
12
  } from "convex/server";
13
13
  import type { Value } from "convex/values";
14
- import { Clock, Effect, Layer, Match, pipe, Schema } from "effect";
14
+ import { pipe } from "effect/Function";
15
+ import * as Clock from "effect/Clock";
16
+ import * as Effect from "effect/Effect";
17
+ import * as Layer from "effect/Layer";
18
+ import * as Match from "effect/Match";
19
+ import * as Schema from "effect/Schema";
15
20
  import * as Auth from "./Auth";
16
21
  import * as ConvexConfigProvider from "./ConvexConfigProvider";
17
22
  import * as DatabaseReader from "./DatabaseReader";
@@ -10,7 +10,11 @@ import {
10
10
  } from "convex/server";
11
11
  import type { Value } from "convex/values";
12
12
  import { ConvexError } from "convex/values";
13
- import { Effect, Either, Layer, pipe, Schema } from "effect";
13
+ import { pipe } from "effect/Function";
14
+ import * as Effect from "effect/Effect";
15
+ import * as Either from "effect/Either";
16
+ import * as Layer from "effect/Layer";
17
+ import * as Schema from "effect/Schema";
14
18
  import * as ActionCtx from "./ActionCtx";
15
19
  import * as ActionRunner from "./ActionRunner";
16
20
  import * as Auth from "./Auth";
@@ -2,7 +2,9 @@ import type * as FunctionSpec from "@confect/core/FunctionSpec";
2
2
  import type * as GroupSpec from "@confect/core/GroupSpec";
3
3
  import * as Registry from "@confect/core/Registry";
4
4
  import type * as Spec from "@confect/core/Spec";
5
- import { Effect, type Layer, Ref, type Types } from "effect";
5
+ import type { Layer, Types } from "effect";
6
+ import * as Effect from "effect/Effect";
7
+ import * as Ref from "effect/Ref";
6
8
  import type * as DatabaseSchema from "./DatabaseSchema";
7
9
  import type * as GroupImpl from "./GroupImpl";
8
10
  import { mapLeaves } from "./internal/utils";
@@ -1,12 +1,14 @@
1
1
  import type * as FunctionSpec from "@confect/core/FunctionSpec";
2
- import { NodeContext } from "@effect/platform-node";
2
+ import * as NodeContext from "@effect/platform-node/NodeContext";
3
3
  import {
4
4
  actionGeneric,
5
5
  type DefaultFunctionArgs,
6
6
  internalActionGeneric,
7
7
  } from "convex/server";
8
8
  import type { Effect } from "effect";
9
- import { Layer, Match, type Schema } from "effect";
9
+ import type { Schema } from "effect";
10
+ import * as Layer from "effect/Layer";
11
+ import * as Match from "effect/Match";
10
12
  import type * as DatabaseSchema from "./DatabaseSchema";
11
13
  import type * as Handler from "./Handler";
12
14
  import * as RegisteredFunction from "./RegisteredFunction";
@@ -1,5 +1,5 @@
1
1
  import type * as FunctionSpec from "@confect/core/FunctionSpec";
2
- import { Predicate } from "effect";
2
+ import * as Predicate from "effect/Predicate";
3
3
  import type * as DatabaseSchema from "./DatabaseSchema";
4
4
  import type * as Handler from "./Handler";
5
5
 
package/src/Scheduler.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import { Ref } from "@confect/core";
2
2
  import type { Scheduler as ConvexScheduler } from "convex/server";
3
- import { Context, DateTime, Duration, Effect, Layer } from "effect";
3
+ import * as Context from "effect/Context";
4
+ import * as DateTime from "effect/DateTime";
5
+ import * as Duration from "effect/Duration";
6
+ import * as Effect from "effect/Effect";
7
+ import * as Layer from "effect/Layer";
4
8
 
5
9
  const make = (scheduler: ConvexScheduler) => ({
6
10
  runAfter: <Ref_ extends Ref.AnyMutation | Ref.AnyAction>(
@@ -17,22 +17,20 @@ import type {
17
17
  VUnion,
18
18
  } from "convex/values";
19
19
  import { v } from "convex/values";
20
- import {
21
- Array,
22
- Cause,
23
- Data,
24
- Effect,
25
- Exit,
26
- Match,
27
- Number,
28
- Option,
29
- type ParseResult,
30
- pipe,
31
- Predicate,
32
- Schema,
33
- SchemaAST,
34
- String,
35
- } from "effect";
20
+ import { pipe } from "effect/Function";
21
+ import type { ParseResult } from "effect";
22
+ import * as Array from "effect/Array";
23
+ import * as Cause from "effect/Cause";
24
+ import * as Data from "effect/Data";
25
+ import * as Effect from "effect/Effect";
26
+ import * as Exit from "effect/Exit";
27
+ import * as Match from "effect/Match";
28
+ import * as Number from "effect/Number";
29
+ import * as Option from "effect/Option";
30
+ import * as Predicate from "effect/Predicate";
31
+ import * as Schema from "effect/Schema";
32
+ import * as SchemaAST from "effect/SchemaAST";
33
+ import * as String from "effect/String";
36
34
 
37
35
  import * as GenericId from "@confect/core/GenericId";
38
36
  import type {
@@ -1,6 +1,9 @@
1
1
  import type { StorageActionWriter as ConvexStorageActionWriter } from "convex/server";
2
2
  import type { GenericId } from "convex/values";
3
- import { Effect, flow, Layer, Option } from "effect";
3
+ import { flow } from "effect/Function";
4
+ import * as Effect from "effect/Effect";
5
+ import * as Layer from "effect/Layer";
6
+ import * as Option from "effect/Option";
4
7
  import { BlobNotFoundError } from "./BlobNotFoundError";
5
8
 
6
9
  const make = (storageActionWriter: ConvexStorageActionWriter) => ({
@@ -1,6 +1,10 @@
1
1
  import type { StorageReader as ConvexStorageReader } from "convex/server";
2
2
  import type { GenericId } from "convex/values";
3
- import { Effect, flow, Layer, Option, pipe, Schema } from "effect";
3
+ import { flow, pipe } from "effect/Function";
4
+ import * as Effect from "effect/Effect";
5
+ import * as Layer from "effect/Layer";
6
+ import * as Option from "effect/Option";
7
+ import * as Schema from "effect/Schema";
4
8
  import { BlobNotFoundError } from "./BlobNotFoundError";
5
9
 
6
10
  const make = (storageReader: ConvexStorageReader) => ({
@@ -1,6 +1,9 @@
1
1
  import type { StorageWriter as ConvexStorageWriter } from "convex/server";
2
2
  import type { GenericId } from "convex/values";
3
- import { Effect, Layer, pipe, Schema } from "effect";
3
+ import { pipe } from "effect/Function";
4
+ import * as Effect from "effect/Effect";
5
+ import * as Layer from "effect/Layer";
6
+ import * as Schema from "effect/Schema";
4
7
  import { BlobNotFoundError } from "./BlobNotFoundError";
5
8
 
6
9
  const make = (storageWriter: ConvexStorageWriter) => ({
package/src/Table.ts CHANGED
@@ -13,7 +13,8 @@ import {
13
13
  type VectorIndexConfig,
14
14
  } from "convex/server";
15
15
  import type { GenericValidator, Validator } from "convex/values";
16
- import { Predicate, Schema } from "effect";
16
+ import * as Predicate from "effect/Predicate";
17
+ import * as Schema from "effect/Schema";
17
18
  import {
18
19
  compileTableSchema,
19
20
  type TableSchemaToTableValidator,
@@ -6,7 +6,9 @@ import type {
6
6
  VectorSearchQuery,
7
7
  } from "convex/server";
8
8
  import type { GenericId } from "convex/values";
9
- import { Context, Effect, Layer } from "effect";
9
+ import * as Context from "effect/Context";
10
+ import * as Effect from "effect/Effect";
11
+ import * as Layer from "effect/Layer";
10
12
  import type * as DataModel from "./DataModel";
11
13
 
12
14
  type ConvexVectorSearch<DataModel_ extends DataModel.AnyWithProps> =
@@ -1,5 +1,7 @@
1
1
  import type { Predicate } from "effect";
2
- import { Array, Effect, Record } from "effect";
2
+ import * as Array from "effect/Array";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Record from "effect/Record";
3
5
 
4
6
  type NestedObject<T> = {
5
7
  [key: string]: T | NestedObject<T>;