querysub 0.342.0 → 0.343.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.342.0",
3
+ "version": "0.343.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",
@@ -1071,7 +1071,7 @@ export class PathValueProxyWatcher {
1071
1071
  let runLeeway = MAX_ACCEPTED_CHANGE_AGE * 0.8;
1072
1072
  let runCutoffTime = Date.now() - runLeeway;
1073
1073
  if (options.runAtTime && options.runAtTime.time < runCutoffTime) {
1074
- let message = `MAX_CHANGE_AGE_EXCEEDED! Cannot run watcher at time ${options.runAtTime.time} because it is older than the cutOff time of ${runCutoffTime}. Writing this far in the past would break things, and might be rejected by other authorities due to being too old.`;
1074
+ let message = `MAX_CHANGE_AGE_EXCEEDED! Cannot run watcher ${options.debugName} at time ${options.runAtTime.time} because it is older than the cutOff time of ${runCutoffTime}. Writing this far in the past would break things, and might be rejected by other authorities due to being too old.`;
1075
1075
  console.error(red(message));
1076
1076
  // NOTE: We could also adjust the to be more recent, to allow it to be commited anyway,
1077
1077
  // in a slightly different state than originally expected.
@@ -1181,9 +1181,6 @@ export class PathValueProxyWatcher {
1181
1181
  };
1182
1182
  const getReadyToCommit = () => {
1183
1183
  let blocked = isProxyBlockedByOrder(watcher);
1184
- if (blocked) {
1185
- console.info(`Proxy ${watcher.debugName} is blocked by order`);
1186
- }
1187
1184
  return (
1188
1185
  watcher.lastUnsyncedAccesses.size === 0
1189
1186
  && watcher.lastUnsyncedParentAccesses.size === 0
@@ -2419,7 +2416,7 @@ const finishProxyAndTriggerNext = runInSerial(
2419
2416
  let next = proxiesOrdered[index];
2420
2417
  // Only trigger if it's the first entry and therefore it won't be blocked by the previous proxy, or, of course, if it's from a timeout, In which case, it won't be blocked anyway.
2421
2418
  if (next && (index === 0 || fromTimeout)) {
2422
- console.info(`Triggering next proxy in order: ${next.debugName}`, next.options.baseFunction || next.options.watchFunction);
2419
+ //console.info(`Triggering next proxy in order: ${next.debugName}`, next.options.baseFunction || next.options.watchFunction);
2423
2420
  next.explicitlyTrigger({
2424
2421
  newParentsSynced: new Set(),
2425
2422
  pathSources: new Set(),
@@ -520,7 +520,6 @@ export class PathFunctionRunner {
520
520
  runCount++;
521
521
  if (PathFunctionRunner.DEBUG_CALLS) {
522
522
  console.log(`Evaluating (try count ${runCount}) ${getDebugName(callPath, functionSpec, true)}`);
523
- console.log(` RUNNING AT REAL TIME ${debugTime(proxyWatcher.getTriggeredWatcher().currentReadTime || callPath.runAtTime)}`);
524
523
  }
525
524
  if (PathFunctionRunner.DEBUG_CALL_TRIGGERS && runCount > PathFunctionRunner.DEBUG_WATCHES_THRESHOLD) {
526
525
  // NOTE: If this happens a few times during initial loading it is fine. If it happens a lot... and with values MUCH
@@ -672,7 +671,7 @@ export class PathFunctionRunner {
672
671
  }
673
672
 
674
673
  if (PathFunctionRunner.DEBUG_CALLS) {
675
- console.log(`FINISHED${nooped ? " (skipped)" : ""} ${getDebugName(callPath, functionSpec, true)}, writes: ${finalWrites?.length}`);
674
+ console.log(`FINISHED${nooped ? " (skipped)" : ""} ${getDebugName(callPath, functionSpec, true)}, writes: ${finalWrites?.length}, took ${blue(formatTime(Date.now() - startTime))}`);
676
675
  }
677
676
 
678
677
  let wallTime = Date.now() - startTime;
@@ -30,7 +30,7 @@ async function main() {
30
30
  //ActionsHistory.LOG_ACTION_HISTORY = "runner";
31
31
 
32
32
  // ClientWatcher.DEBUG_READS = true;
33
- ClientWatcher.DEBUG_WRITES = true;
33
+ //ClientWatcher.DEBUG_WRITES = true;
34
34
  // ClientWatcher.DEBUG_TRIGGERS = "heavy";
35
35
  // authorityStorage.DEBUG_UNWATCH = true;
36
36
 
@@ -2436,7 +2436,7 @@ export function getSourceVSCodeLink(element: DOMNode | undefined) {
2436
2436
  Command palette: You can trigger VS Code commands using vscode://file/{file}?command={commandId}.
2437
2437
  Extensions: Some VS Code extensions may add support for additional URL parameters.
2438
2438
  */
2439
- let path = `cursor://file/${sourceInfo.sourceFileName}`;
2439
+ let path = `cursor://file${new URL(sourceInfo.sourceFileName).pathname}`;
2440
2440
  if (sourceInfo.lineNumber) {
2441
2441
  path += `:${sourceInfo.lineNumber}:${sourceInfo.columnNumber}`;
2442
2442
  path += `?selection=${sourceInfo.lineNumber},${sourceInfo.columnNumber}`;