querysub 0.30.0 → 0.31.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.30.0",
3
+ "version": "0.31.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",
@@ -59,7 +59,7 @@ export async function replaceFunctions(config: {
59
59
 
60
60
  for (let previous of previousFunctions) {
61
61
  if (!currentFunctionNames.has(getFunctionName(previous))) {
62
- messages.push({ text: `Removing ${red(debugFunction(previous))}`, order: 3 });
62
+ messages.push({ text: `Removing\t ${red(debugFunction(previous))}`, order: 3 });
63
63
  base[previous.ModuleId].Sources[previous.FunctionId] = undefined;
64
64
  }
65
65
  }
@@ -487,24 +487,14 @@ export async function getCallWrites(config: {
487
487
  let { call, debugName } = config;
488
488
  const { functionSpec } = await proxyWatcher.commitFunction({
489
489
  watchFunction: function getModuleConfig() {
490
- //let moduleConfig = atomicObjectRead(functionSchema()[call.DomainName].PathFunctionRunner[call.ModuleId].Module);
491
- // if (!(call.DomainName in functionSchema())) {
492
- // throw new Error(`Domain not found ${call.DomainName}`);
493
- // }
494
490
  let domainObject = functionSchema()[call.DomainName];
495
- // if (!(call.ModuleId in domainObject.PathFunctionRunner)) {
496
- // throw new Error(`Module not found ${call.DomainName}.${call.ModuleId}`);
497
- // }
498
491
  let moduleObject = domainObject.PathFunctionRunner[call.ModuleId];
499
- if (!(call.FunctionId in moduleObject.Sources) && Querysub.isAllSynced()) {
500
- throw new Error(`Function not found in database ${call.DomainName}.${call.ModuleId}.${call.FunctionId}, have ${JSON.stringify(Object.keys(moduleObject.Sources))}`);
501
- }
502
492
  let functionSpec = atomicObjectRead(moduleObject.Sources[call.FunctionId]);
503
493
  return { functionSpec };
504
494
  }
505
495
  });
506
496
  if (!functionSpec) {
507
- throw new Error(`Function not found ${call.DomainName}.${call.ModuleId}.${call.FunctionId}`);
497
+ throw new Error(`Function not found in database ${call.DomainName}.${call.ModuleId}.${call.FunctionId}`);
508
498
  }
509
499
 
510
500
  await addModuleToLoader(functionSpec);