@gaganref/confect-js 10.3.1-fork.1 → 10.3.1-fork.10
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/HttpClient.d.ts +2 -2
- package/dist/HttpClient.d.ts.map +1 -1
- package/dist/HttpClient.js.map +1 -1
- package/dist/WebSocketClient.d.ts +2 -2
- package/dist/WebSocketClient.d.ts.map +1 -1
- package/dist/WebSocketClient.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/HttpClient.ts +2 -2
- package/src/WebSocketClient.ts +2 -2
- package/src/index.ts +2 -2
package/dist/HttpClient.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConvexHttpClient } from "convex/browser";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as InternalHttpClient from "./internal/HttpClient";
|
|
5
|
-
export { HttpClientError } from "./internal/HttpClient";
|
|
4
|
+
import * as InternalHttpClient from "./internal/HttpClient.js";
|
|
5
|
+
export { HttpClientError } from "./internal/HttpClient.js";
|
|
6
6
|
/**
|
|
7
7
|
* A Confect client which uses HTTP to communicate with your Convex backend.
|
|
8
8
|
* Works in any JS runtime that supports `fetch`. Wraps
|
package/dist/HttpClient.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../src/HttpClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,kBAAkB,MAAM,
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../src/HttpClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAoB3D;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;EAEtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,UAAU,CAAC;AAEtD,eAAO,MAAM,KAAK,YACP,MAAM,YACL,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;;;;;;;gBACJ,CAAC"}
|
package/dist/HttpClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.js","names":["InternalHttpClient.make"],"sources":["../src/HttpClient.ts"],"sourcesContent":["import { ConvexHttpClient } from \"convex/browser\";\nimport * as Context from \"effect/Context\";\nimport * as Layer from \"effect/Layer\";\nimport * as InternalHttpClient from \"./internal/HttpClient\";\n\nexport { HttpClientError } from \"./internal/HttpClient\";\n\nconst make = (\n address: string,\n options?: ConstructorParameters<typeof ConvexHttpClient>[1],\n) => {\n const client = new ConvexHttpClient(address, options);\n return InternalHttpClient.make({\n url: client.url,\n setAuth: (token) => client.setAuth(token),\n clearAuth: () => client.clearAuth(),\n query: (functionReference, encodedArgs) =>\n client.query(functionReference, encodedArgs),\n mutation: (functionReference, encodedArgs) =>\n client.mutation(functionReference, encodedArgs),\n action: (functionReference, encodedArgs) =>\n client.action(functionReference, encodedArgs),\n });\n};\n\n/**\n * A Confect client which uses HTTP to communicate with your Convex backend.\n * Works in any JS runtime that supports `fetch`. Wraps\n * [ConvexHttpClient](https://docs.convex.dev/api/classes/browser.ConvexHttpClient).\n */\nexport const HttpClient = Context.Service<ReturnType<typeof make>>(\n \"@confect/js/HttpClient\",\n);\n\nexport type HttpClient = typeof HttpClient.Identifier;\n\nexport const layer = (\n address: string,\n options?: ConstructorParameters<typeof ConvexHttpClient>[1],\n) => Layer.sync(HttpClient, () => make(address, options));\n"],"mappings":";;;;;;;;;;;AAOA,MAAM,QACJ,SACA,YACG;CACH,MAAM,SAAS,IAAI,iBAAiB,SAAS,OAAO;CACpD,OAAOA,OAAwB;EAC7B,KAAK,OAAO;EACZ,UAAU,UAAU,OAAO,QAAQ,KAAK;EACxC,iBAAiB,OAAO,UAAU;EAClC,QAAQ,mBAAmB,gBACzB,OAAO,MAAM,mBAAmB,WAAW;EAC7C,WAAW,mBAAmB,gBAC5B,OAAO,SAAS,mBAAmB,WAAW;EAChD,SAAS,mBAAmB,gBAC1B,OAAO,OAAO,mBAAmB,WAAW;CAChD,CAAC;AACH;;;;;;AAOA,MAAa,aAAa,QAAQ,QAChC,wBACF;AAIA,MAAa,SACX,SACA,YACG,MAAM,KAAK,kBAAkB,KAAK,SAAS,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"HttpClient.js","names":["InternalHttpClient.make"],"sources":["../src/HttpClient.ts"],"sourcesContent":["import { ConvexHttpClient } from \"convex/browser\";\nimport * as Context from \"effect/Context\";\nimport * as Layer from \"effect/Layer\";\nimport * as InternalHttpClient from \"./internal/HttpClient.js\";\n\nexport { HttpClientError } from \"./internal/HttpClient.js\";\n\nconst make = (\n address: string,\n options?: ConstructorParameters<typeof ConvexHttpClient>[1],\n) => {\n const client = new ConvexHttpClient(address, options);\n return InternalHttpClient.make({\n url: client.url,\n setAuth: (token) => client.setAuth(token),\n clearAuth: () => client.clearAuth(),\n query: (functionReference, encodedArgs) =>\n client.query(functionReference, encodedArgs),\n mutation: (functionReference, encodedArgs) =>\n client.mutation(functionReference, encodedArgs),\n action: (functionReference, encodedArgs) =>\n client.action(functionReference, encodedArgs),\n });\n};\n\n/**\n * A Confect client which uses HTTP to communicate with your Convex backend.\n * Works in any JS runtime that supports `fetch`. Wraps\n * [ConvexHttpClient](https://docs.convex.dev/api/classes/browser.ConvexHttpClient).\n */\nexport const HttpClient = Context.Service<ReturnType<typeof make>>(\n \"@confect/js/HttpClient\",\n);\n\nexport type HttpClient = typeof HttpClient.Identifier;\n\nexport const layer = (\n address: string,\n options?: ConstructorParameters<typeof ConvexHttpClient>[1],\n) => Layer.sync(HttpClient, () => make(address, options));\n"],"mappings":";;;;;;;;;;;AAOA,MAAM,QACJ,SACA,YACG;CACH,MAAM,SAAS,IAAI,iBAAiB,SAAS,OAAO;CACpD,OAAOA,OAAwB;EAC7B,KAAK,OAAO;EACZ,UAAU,UAAU,OAAO,QAAQ,KAAK;EACxC,iBAAiB,OAAO,UAAU;EAClC,QAAQ,mBAAmB,gBACzB,OAAO,MAAM,mBAAmB,WAAW;EAC7C,WAAW,mBAAmB,gBAC5B,OAAO,SAAS,mBAAmB,WAAW;EAChD,SAAS,mBAAmB,gBAC1B,OAAO,OAAO,mBAAmB,WAAW;CAChD,CAAC;AACH;;;;;;AAOA,MAAa,aAAa,QAAQ,QAChC,wBACF;AAIA,MAAa,SACX,SACA,YACG,MAAM,KAAK,kBAAkB,KAAK,SAAS,OAAO,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { ConvexClient } from "convex/browser";
|
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as InternalWebSocketClient from "./internal/WebSocketClient";
|
|
6
|
-
export { WebSocketClientError } from "./internal/WebSocketClient";
|
|
5
|
+
import * as InternalWebSocketClient from "./internal/WebSocketClient.js";
|
|
6
|
+
export { WebSocketClientError } from "./internal/WebSocketClient.js";
|
|
7
7
|
/**
|
|
8
8
|
* A Confect client which uses a WebSocket to communicate with your Convex
|
|
9
9
|
* backend and supports reactive query subscriptions. The WebSocket connection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocketClient.d.ts","sourceRoot":"","sources":["../src/WebSocketClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,uBAAuB,MAAM,
|
|
1
|
+
{"version":3,"file":"WebSocketClient.d.ts","sourceRoot":"","sources":["../src/WebSocketClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,uBAAuB,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAiCrE;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;EAEI,CAAC;AAEjC,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,UAAU,CAAC;AAEhE,eAAO,MAAM,KAAK,YACP,MAAM,YACL,qBAAqB,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;gBACC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocketClient.js","names":["InternalWebSocketClient.makeScoped"],"sources":["../src/WebSocketClient.ts"],"sourcesContent":["import { ConvexClient } from \"convex/browser\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as InternalWebSocketClient from \"./internal/WebSocketClient\";\n\nexport { WebSocketClientError } from \"./internal/WebSocketClient\";\n\nconst make = (\n address: string,\n options?: ConstructorParameters<typeof ConvexClient>[1],\n) =>\n InternalWebSocketClient.makeScoped(\n address,\n Effect.sync(() => {\n const convexClient = new ConvexClient(address, options);\n return {\n setAuth: (fetchToken, onChange) =>\n onChange === undefined\n ? convexClient.setAuth(fetchToken)\n : convexClient.setAuth(fetchToken, onChange),\n close: () => convexClient.close(),\n query: (functionReference, encodedArgs) =>\n convexClient.query(functionReference, encodedArgs),\n mutation: (functionReference, encodedArgs) =>\n convexClient.mutation(functionReference, encodedArgs),\n action: (functionReference, encodedArgs) =>\n convexClient.action(functionReference, encodedArgs),\n onUpdate: (functionReference, encodedArgs, onUpdate, onError) =>\n convexClient.onUpdate(\n functionReference,\n encodedArgs,\n onUpdate,\n onError,\n ),\n };\n }),\n );\n\n/**\n * A Confect client which uses a WebSocket to communicate with your Convex\n * backend and supports reactive query subscriptions. The WebSocket connection\n * is managed by the layer's scope and closed automatically when the scope ends.\n * Wraps\n * [ConvexClient](https://docs.convex.dev/api/classes/browser.ConvexClient).\n */\nexport const WebSocketClient = Context.Service<\n Effect.Success<ReturnType<typeof make>>\n>(\"@confect/js/WebSocketClient\");\n\nexport type WebSocketClient = typeof WebSocketClient.Identifier;\n\nexport const layer = (\n address: string,\n options?: ConstructorParameters<typeof ConvexClient>[1],\n) => Layer.effect(WebSocketClient, make(address, options));\n"],"mappings":";;;;;;;;;;;;AAQA,MAAM,QACJ,SACA,YAEAA,WACE,SACA,OAAO,WAAW;CAChB,MAAM,eAAe,IAAI,aAAa,SAAS,OAAO;CACtD,OAAO;EACL,UAAU,YAAY,aACpB,aAAa,KAAA,IACT,aAAa,QAAQ,UAAU,IAC/B,aAAa,QAAQ,YAAY,QAAQ;EAC/C,aAAa,aAAa,MAAM;EAChC,QAAQ,mBAAmB,gBACzB,aAAa,MAAM,mBAAmB,WAAW;EACnD,WAAW,mBAAmB,gBAC5B,aAAa,SAAS,mBAAmB,WAAW;EACtD,SAAS,mBAAmB,gBAC1B,aAAa,OAAO,mBAAmB,WAAW;EACpD,WAAW,mBAAmB,aAAa,UAAU,YACnD,aAAa,SACX,mBACA,aACA,UACA,OACF;CACJ;AACF,CAAC,CACH;;;;;;;;AASF,MAAa,kBAAkB,QAAQ,QAErC,6BAA6B;AAI/B,MAAa,SACX,SACA,YACG,MAAM,OAAO,iBAAiB,KAAK,SAAS,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"WebSocketClient.js","names":["InternalWebSocketClient.makeScoped"],"sources":["../src/WebSocketClient.ts"],"sourcesContent":["import { ConvexClient } from \"convex/browser\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as InternalWebSocketClient from \"./internal/WebSocketClient.js\";\n\nexport { WebSocketClientError } from \"./internal/WebSocketClient.js\";\n\nconst make = (\n address: string,\n options?: ConstructorParameters<typeof ConvexClient>[1],\n) =>\n InternalWebSocketClient.makeScoped(\n address,\n Effect.sync(() => {\n const convexClient = new ConvexClient(address, options);\n return {\n setAuth: (fetchToken, onChange) =>\n onChange === undefined\n ? convexClient.setAuth(fetchToken)\n : convexClient.setAuth(fetchToken, onChange),\n close: () => convexClient.close(),\n query: (functionReference, encodedArgs) =>\n convexClient.query(functionReference, encodedArgs),\n mutation: (functionReference, encodedArgs) =>\n convexClient.mutation(functionReference, encodedArgs),\n action: (functionReference, encodedArgs) =>\n convexClient.action(functionReference, encodedArgs),\n onUpdate: (functionReference, encodedArgs, onUpdate, onError) =>\n convexClient.onUpdate(\n functionReference,\n encodedArgs,\n onUpdate,\n onError,\n ),\n };\n }),\n );\n\n/**\n * A Confect client which uses a WebSocket to communicate with your Convex\n * backend and supports reactive query subscriptions. The WebSocket connection\n * is managed by the layer's scope and closed automatically when the scope ends.\n * Wraps\n * [ConvexClient](https://docs.convex.dev/api/classes/browser.ConvexClient).\n */\nexport const WebSocketClient = Context.Service<\n Effect.Success<ReturnType<typeof make>>\n>(\"@confect/js/WebSocketClient\");\n\nexport type WebSocketClient = typeof WebSocketClient.Identifier;\n\nexport const layer = (\n address: string,\n options?: ConstructorParameters<typeof ConvexClient>[1],\n) => Layer.effect(WebSocketClient, make(address, options));\n"],"mappings":";;;;;;;;;;;;AAQA,MAAM,QACJ,SACA,YAEAA,WACE,SACA,OAAO,WAAW;CAChB,MAAM,eAAe,IAAI,aAAa,SAAS,OAAO;CACtD,OAAO;EACL,UAAU,YAAY,aACpB,aAAa,KAAA,IACT,aAAa,QAAQ,UAAU,IAC/B,aAAa,QAAQ,YAAY,QAAQ;EAC/C,aAAa,aAAa,MAAM;EAChC,QAAQ,mBAAmB,gBACzB,aAAa,MAAM,mBAAmB,WAAW;EACnD,WAAW,mBAAmB,gBAC5B,aAAa,SAAS,mBAAmB,WAAW;EACtD,SAAS,mBAAmB,gBAC1B,aAAa,OAAO,mBAAmB,WAAW;EACpD,WAAW,mBAAmB,aAAa,UAAU,YACnD,aAAa,SACX,mBACA,aACA,UACA,OACF;CACJ;AACF,CAAC,CACH;;;;;;;;AASF,MAAa,kBAAkB,QAAQ,QAErC,6BAA6B;AAI/B,MAAa,SACX,SACA,YACG,MAAM,OAAO,iBAAiB,KAAK,SAAS,OAAO,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * as WebSocketClient from "./WebSocketClient";
|
|
2
|
-
export * as HttpClient from "./HttpClient";
|
|
1
|
+
export * as WebSocketClient from "./WebSocketClient.js";
|
|
2
|
+
export * as HttpClient from "./HttpClient.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaganref/confect-js",
|
|
3
|
-
"version": "10.3.1-fork.
|
|
3
|
+
"version": "10.3.1-fork.10",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@confect/core": "npm:@gaganref/confect-core@10.3.1-fork.
|
|
5
|
+
"@confect/core": "npm:@gaganref/confect-core@10.3.1-fork.10",
|
|
6
6
|
"convex": "^1.32.0",
|
|
7
7
|
"effect": "^4.0.0"
|
|
8
8
|
},
|
package/src/HttpClient.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ConvexHttpClient } from "convex/browser";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as InternalHttpClient from "./internal/HttpClient";
|
|
4
|
+
import * as InternalHttpClient from "./internal/HttpClient.js";
|
|
5
5
|
|
|
6
|
-
export { HttpClientError } from "./internal/HttpClient";
|
|
6
|
+
export { HttpClientError } from "./internal/HttpClient.js";
|
|
7
7
|
|
|
8
8
|
const make = (
|
|
9
9
|
address: string,
|
package/src/WebSocketClient.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { ConvexClient } from "convex/browser";
|
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Layer from "effect/Layer";
|
|
5
|
-
import * as InternalWebSocketClient from "./internal/WebSocketClient";
|
|
5
|
+
import * as InternalWebSocketClient from "./internal/WebSocketClient.js";
|
|
6
6
|
|
|
7
|
-
export { WebSocketClientError } from "./internal/WebSocketClient";
|
|
7
|
+
export { WebSocketClientError } from "./internal/WebSocketClient.js";
|
|
8
8
|
|
|
9
9
|
const make = (
|
|
10
10
|
address: string,
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as WebSocketClient from "./WebSocketClient";
|
|
2
|
-
export * as HttpClient from "./HttpClient";
|
|
1
|
+
export * as WebSocketClient from "./WebSocketClient.js";
|
|
2
|
+
export * as HttpClient from "./HttpClient.js";
|