un-cli 0.0.66 → 0.0.67

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/cmd.txt +2 -1
  2. package/index.mjs +13 -12
  3. package/package.json +1 -1
package/cmd.txt CHANGED
@@ -1,2 +1,3 @@
1
- export subnetworks --all --folder c:\temp
1
+ trace --subnetwork D23630
2
+ topsql --age 10
2
3
  exit
package/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { AdminLog } from "./adminlog.mjs"
7
7
  import { logger } from "./logger.mjs"
8
8
  import fetch from "node-fetch"
9
9
  //update version
10
- let version = "0.0.66";
10
+ let version = "0.0.67";
11
11
  const GENERATE_TOKEN_TIME_MIN = 30;
12
12
 
13
13
  let rl = null;
@@ -172,8 +172,8 @@ const inputs = {
172
172
  "update subnetworks --all": "Update all dirty subnetworks synchronously",
173
173
  "update subnetworks --deleted": "Update all deleted dirty subnetworks synchronously",
174
174
  "update subnetworks --all --async": "Update all dirty subnetworks asynchronously",
175
- "export subnetworks --all": "Export all subnetworks with ACK ",
176
- "export subnetworks --new": "Export all subnetworks with ACK that haven't been exported ",
175
+ "export subnetworks --all [--folder]": "Export all subnetworks with ACK --folder where exported files are saved",
176
+ "export subnetworks --new [--folder]": "Export all subnetworks with ACK that haven't been exported --folder where exported files are saved",
177
177
  "export subnetworks --deleted": "Export all subnetworks with ACK that are deleted ",
178
178
  "count": "Lists the number of rows in all feature layers.",
179
179
  "count --system": "Lists the number of rows in system layers.",
@@ -247,7 +247,7 @@ const inputs = {
247
247
  // console.log('\x1b[36m%s\x1b[0m', 'I am cyan'); //cyan
248
248
  const topoMoments = networkMoments.networkMoments.map(m => {
249
249
  const t = m.time === 0 ? "N/A": new Date(m.time*1000)
250
- const d = m.duration === 0 ? "N/A" : numberWithCommas(Math.round(m.duration/1000)) + " s"
250
+ const d = m.duration === 0 ? "N/A" : numberWithCommas(Math.round(m.duration)) + " ms"
251
251
  m.time = t.toString()
252
252
  m.duration = d;
253
253
  return m;
@@ -265,7 +265,7 @@ const inputs = {
265
265
  const result = await un.enableTopology()
266
266
  const toDate = new Date();
267
267
  const timeEnable = toDate.getTime() - fromDate.getTime();
268
- result.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
268
+ result.duration = numberWithCommas(Math.round(timeEnable)) + " ms"
269
269
  console.table(result)
270
270
  },
271
271
  "^topology --disable$": async () => {
@@ -274,7 +274,7 @@ const inputs = {
274
274
  const result = await un.disableTopology()
275
275
  const toDate = new Date();
276
276
  const timeEnable = toDate.getTime() - fromDate.getTime();
277
- result.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
277
+ result.duration = numberWithCommas(Math.round(timeEnable)) + " ms"
278
278
  console.table(result)
279
279
  },
280
280
  "^evaluate$": async () => {
@@ -296,7 +296,7 @@ const inputs = {
296
296
  const result = {}
297
297
  const toDate = new Date();
298
298
  const timeEnable = toDate.getTime() - fromDate.getTime();
299
- result.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
299
+ result.duration = numberWithCommas(Math.round(timeEnable)) + " ms"
300
300
  console.log(result)
301
301
  },
302
302
 
@@ -341,7 +341,7 @@ const inputs = {
341
341
  const result = await un.validateNetworkTopology("sde.DEFAULT", e)
342
342
  const toDate = new Date();
343
343
  const timeEnable = toDate.getTime() - fromDate.getTime();
344
- const duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
344
+ const duration = numberWithCommas(Math.round(timeEnable)) + " ms"
345
345
  console.clear()
346
346
  console.log("Validating extent " + e.xmin)
347
347
  console.table({duration})
@@ -357,7 +357,7 @@ const inputs = {
357
357
  const result = await un.validateNetworkTopology()
358
358
  const toDate = new Date();
359
359
  const timeEnable = toDate.getTime() - fromDate.getTime();
360
- result.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
360
+ result.duration = numberWithCommas(Math.round(timeEnable)) + " ms"
361
361
  console.table(result)
362
362
  },
363
363
  "^subnetworks --dirty$": async () => {
@@ -402,7 +402,7 @@ const inputs = {
402
402
 
403
403
  const toDate = new Date();
404
404
  const timeEnable = toDate.getTime() - fromDate.getTime();
405
- subnetworkResult.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
405
+ subnetworkResult.duration = numberWithCommas(Math.round(timeEnable)) + " ms"
406
406
 
407
407
 
408
408
  console.log(`Result ${JSON.stringify(subnetworkResult)}`)
@@ -426,7 +426,7 @@ const inputs = {
426
426
 
427
427
  const toDate = new Date();
428
428
  const timeEnable = toDate.getTime() - fromDate.getTime();
429
- subnetworkResult.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
429
+ subnetworkResult.duration = numberWithCommas(Math.round(timeEnable)) + " ms"
430
430
 
431
431
  console.log(`Result ${JSON.stringify(subnetworkResult)}`)
432
432
  }
@@ -555,7 +555,7 @@ const inputs = {
555
555
  const toDate = new Date();
556
556
  const timeRun = toDate.getTime() - fromDate.getTime();
557
557
  const newResult = {}
558
- newResult.duration = numberWithCommas(Math.round(timeRun/1000)) + " s"
558
+ newResult.duration = numberWithCommas(Math.round(timeRun)) + " ms"
559
559
  newResult.elementsCount = result.traceResults.elements.length;
560
560
  console.table(newResult)
561
561
 
@@ -889,6 +889,7 @@ const inputs = {
889
889
  allMessages = allMessages.concat(jsonRes.logMessages.filter(m => m.message.indexOf("EndCursor;") > -1))
890
890
  }
891
891
  console.log ("Filtering messages...")
892
+
892
893
  allMessages = allMessages
893
894
  .map( m=> {
894
895
  m.dataAccessElapsed = parseFloat(m.message.split(";")[1].split(" ")[1])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "un-cli",
3
- "version": "0.0.66",
3
+ "version": "0.0.67",
4
4
  "description": "Command line interface for working with ArcGIS Utility Network Extension",
5
5
  "main": "index.mjs",
6
6
  "bin": {