@graffy/client 0.15.25 → 0.16.0-alpha.2

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 (3) hide show
  1. package/index.cjs +3 -1
  2. package/index.mjs +4 -2
  3. package/package.json +3 -3
package/index.cjs CHANGED
@@ -88,7 +88,9 @@ const httpClient = (baseUrl, {
88
88
  if (!EventSource)
89
89
  throw Error("client.sse.unavailable");
90
90
  const optionsParam = getOptionsParam(await getOptions("watch", options));
91
- const url = `${baseUrl}?q=${common.encodeUrl(query)}&opts=${optionsParam}`;
91
+ const url = `${baseUrl}?q=${encodeURIComponent(
92
+ common.serialize(query)
93
+ )}&opts=${optionsParam}`;
92
94
  const source = new EventSource(url);
93
95
  yield* stream.makeStream((push, end) => {
94
96
  source.onmessage = ({ data }) => {
package/index.mjs CHANGED
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { encodeUrl, deserialize, serialize, add, makeId, makeWatcher } from "@graffy/common";
7
+ import { serialize, deserialize, add, makeId, makeWatcher } from "@graffy/common";
8
8
  import { makeStream } from "@graffy/stream";
9
9
  import debug from "debug";
10
10
  function getOptionsParam(options) {
@@ -85,7 +85,9 @@ const httpClient = (baseUrl, {
85
85
  if (!EventSource)
86
86
  throw Error("client.sse.unavailable");
87
87
  const optionsParam = getOptionsParam(await getOptions("watch", options));
88
- const url = `${baseUrl}?q=${encodeUrl(query)}&opts=${optionsParam}`;
88
+ const url = `${baseUrl}?q=${encodeURIComponent(
89
+ serialize(query)
90
+ )}&opts=${optionsParam}`;
89
91
  const source = new EventSource(url);
90
92
  yield* makeStream((push, end) => {
91
93
  source.onmessage = ({ data }) => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graffy/client",
3
3
  "description": "Graffy client library for the browser, usin the `fetch()` or `WebSocket` APIs. This module is intended to be used with a Node.js server running Graffy Server.",
4
4
  "author": "aravind (https://github.com/aravindet)",
5
- "version": "0.15.25",
5
+ "version": "0.16.0-alpha.2",
6
6
  "main": "./index.cjs",
7
7
  "exports": {
8
8
  "import": "./index.mjs",
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "license": "Apache-2.0",
18
18
  "dependencies": {
19
- "@graffy/stream": "0.15.25",
20
- "@graffy/common": "0.15.25",
19
+ "@graffy/common": "0.16.0-alpha.2",
20
+ "@graffy/stream": "0.16.0-alpha.2",
21
21
  "debug": "^4.3.3"
22
22
  }
23
23
  }