querysub 0.158.0 → 0.160.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.158.0",
3
+ "version": "0.160.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",
@@ -15,7 +15,7 @@ import yargs from "yargs";
15
15
  import { isPublic } from "../config";
16
16
  import { deployBlock } from "./deployBlock";
17
17
  import { LOCAL_DOMAIN } from "../0-path-value-core/PathController";
18
- import { magenta } from "socket-function/src/formatting/logColors";
18
+ import { blue, magenta, red } from "socket-function/src/formatting/logColors";
19
19
  import { getGitRef } from "./git";
20
20
  import { getGitURL } from "./git";
21
21
  import { setLiveDeployedHash } from "./deploySchema";
@@ -31,6 +31,7 @@ let yargObj = yargs(process.argv)
31
31
  .option("deployonlycode", { type: "boolean", desc: "Only deploy code, not ui" })
32
32
  .option("deployonlyui", { type: "boolean", desc: "Only deploy ui, not code" })
33
33
  .option("notifyrefreshdelay", { type: "number", default: timeInHour * 12, desc: "The time clients have to refresh their UI after a deploy." })
34
+ .option("dryrun", { type: "boolean", desc: "Dry run, don't actually deploy" })
34
35
  .argv
35
36
  ;
36
37
 
@@ -51,6 +52,8 @@ export async function deployMain() {
51
52
  let folderRoot = path.resolve(".").replaceAll("\\", "/");
52
53
  const deployPath = path.resolve("./deploy.ts");
53
54
  require(deployPath);
55
+ // Wait for Promise.resolve imports to import
56
+ await delay(0);
54
57
 
55
58
  const srcRoot = path.resolve(__dirname + "/../").replaceAll("\\", "/");
56
59
 
@@ -118,6 +121,13 @@ export async function deployMain() {
118
121
  });
119
122
  }
120
123
  }
124
+ for (let fnc of currentFunctions) {
125
+ console.log(blue(`${fnc.DomainName}.${fnc.ModuleId}.${fnc.FunctionId}`));
126
+ }
127
+ if (yargObj.dryrun) {
128
+ console.log(red("Dry run, not actually deploying"));
129
+ return;
130
+ }
121
131
 
122
132
  console.log();
123
133
  console.log();
@@ -913,7 +913,7 @@ function getSyncedTime() {
913
913
  }
914
914
  if (isNode()) {
915
915
  if (watcher) {
916
- throw new Error(`Trying to access time in a serverside non-temporary watcher. Clientside this is allowed, as infinite loops (render every frame) makes sense. Serverside this is not allowed. Did you try to run a call-type operatin in a watcher? If you manually created a watcher, you might want to set "temporary: true" if you will be immediately disposing it. You almost might want to fork your write logic with setImmediate to detach this from your watcher, so your write can access a single non-changing time.`);
916
+ throw new Error(`Trying to access time in a serverside non-temporary watcher. Clientside this is allowed, as infinite loops (render every frame) makes sense. Serverside this is not allowed. Did you try to run a call-type operatin in a watcher? If you manually created a watcher, you might want to set "temporary: true" if you will be immediately disposing it. You almost might want to fork your write logic with setImmediate to detach this from your watcher, so your write can access a single non-changing time. In ${watcher.debugName}`);
917
917
  }
918
918
  return Date.now();
919
919
  }