querysub 0.266.0 → 0.267.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.266.0",
3
+ "version": "0.267.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -429,9 +429,8 @@ async function edgeNodeFunction(config: {
429
429
  let host = edgeNodeConfig.host;
430
430
  if (!host.endsWith("/")) host += "/";
431
431
  for (let entryPath of edgeNodeConfig.entryPaths) {
432
- if (entryPath.startsWith("/")) {
433
- entryPath = entryPath.slice("/".length);
434
- }
432
+ // IMPORTANT! DO NOT REMOVE THE STARTING "/" FROM ENTRYPATH!
433
+ // The server needs it, because paths need 1 "/" to begin with, so two ("//") means require with "/", instead of requiring relative to the current directory!
435
434
  await require("https://" + host + entryPath);
436
435
  }
437
436
  }
@@ -133,7 +133,10 @@ type ServiceConfig = ${serviceConfigType}
133
133
  onData: async (data: string) => {
134
134
  Querysub.localCommit(() => {
135
135
  let fullData = this.state.watchingOutputs[outputKey].data + data;
136
- fullData = fullData.slice(-100_000);
136
+ // Don't trim every time, otherwise the relative scroll position changes by too much
137
+ if (fullData.length > 1_000_000) {
138
+ fullData = fullData.slice(-100_000);
139
+ }
137
140
  this.state.watchingOutputs[outputKey].data = fullData;
138
141
  });
139
142
  }