un-cli 0.0.65 → 0.0.66

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/README.md CHANGED
@@ -18,26 +18,44 @@ npm install -g un-cli
18
18
  ```
19
19
 
20
20
  ```bash
21
+
21
22
  uncli> help
22
- ┌─────────────────────────┬───────────────────────────────────────────────────────────────┐
23
- (index) Values
24
- ├─────────────────────────┼───────────────────────────────────────────────────────────────┤
25
- help 'Displays this help'
26
- version 'Displays the version of uncli'
27
- ls 'List all services'
28
- def 'Show the feature service definition'
29
- def -layers 'List all layers in this service'
30
- subnetworks 'Lists all subnetworks'
31
- subnetworks -d 'Lists only dirty subnetworks'
32
- update subnetworks -all 'Update all dirty subnetworks '
33
- export subnetworks -all 'Export all subnetworks with ACK '
34
- export subnetworks -new "Export all subnetworks with ACK that haven't been exported "
35
- count 'Lists the number of rows in all feature layers.'
36
- count -system 'Lists the number of rows in system layers.'
37
- whoami 'List the current login info'
38
- clear 'Clears this screen'
39
- quit 'Exit this program'
40
- └─────────────────────────┴───────────────────────────────────────────────────────────────┘
23
+ ┌───────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
24
+ (index) Values
25
+ ├───────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
26
+ help 'Displays this help'
27
+ version 'Displays the version of uncli'
28
+ ls 'List all services'
29
+ def 'Show the feature service definition'
30
+ def --layers 'List all layers in this service'
31
+ subnetworks 'Lists all subnetworks'
32
+ subnetworks --dirty 'Lists only dirty subnetworks'
33
+ subnetworks --deleted 'Lists dirty and deleted subnetworks'
34
+ evaluate 'Evaluate in parallel'
35
+ trace --subnetwork <subnetwork> │ 'Traces input subnetwork and returns the time and number of elements returned .'
36
+ topology 'Displays the topology status'
37
+ topology --disable 'Disable topology'
38
+ topology --enable 'Enable topology'
39
+ topology --validate 'Validate topology (full extent)'
40
+ update subnetworks --all 'Update all dirty subnetworks synchronously'
41
+ │ update subnetworks --deleted │ 'Update all deleted dirty subnetworks synchronously' │
42
+ │ update subnetworks --all --async │ 'Update all dirty subnetworks asynchronously' │
43
+ │ export subnetworks --all │ 'Export all subnetworks with ACK ' │
44
+ │ export subnetworks --new │ "Export all subnetworks with ACK that haven't been exported " │
45
+ │ export subnetworks --deleted │ 'Export all subnetworks with ACK that are deleted ' │
46
+ │ count │ 'Lists the number of rows in all feature layers.' │
47
+ │ count --system │ 'Lists the number of rows in system layers.' │
48
+ │ connect --service │ 'Connects to the another service' │
49
+ │ tracelogs --age <minutes> │ 'Lists utility network trace summary logs for the last x minutes (requires admin)' │
50
+ │ validatelogs --age <minutes> │ 'Lists utility network validate summary logs for the last x minutes (requires admin)' │
51
+ │ updatesubnetworkslog --age <minutes> │ 'Lists utility network update subnetworks summary logs for the last x minutes (requires admin)' │
52
+ │ arlogs --age <minutes> │ 'Lists attribute rules execution logs for the last x minutes (requires admin)' │
53
+ │ arlogs --byrule [--minguid --maxguid] │ 'Lists attribute rules execution summary by rule (requires admin), --maxguid and --minguid show the GUID of the feature' │
54
+ │ topsql --age <minutes> │ 'Lists all queries executed in the last x minutes (requires admin)' │
55
+ │ whoami │ 'Lists the current login info' │
56
+ │ clear │ 'Clears this screen' │
57
+ │ quit │ 'Exit this program' │
58
+ └───────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
41
59
  ```
42
60
 
43
61
 
package/cmd.txt CHANGED
@@ -1,3 +1,2 @@
1
- trace --subnetwork NW53-22313
2
- topsql --age 2
1
+ export subnetworks --all --folder c:\temp
3
2
  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.65";
10
+ let version = "0.0.66";
11
11
  const GENERATE_TOKEN_TIME_MIN = 30;
12
12
 
13
13
  let rl = null;
@@ -442,14 +442,14 @@ const inputs = {
442
442
  console.log(`Result from submitting job ${JSON.stringify(subnetworkResult)}`)
443
443
  }
444
444
  },
445
- "^export subnetworks --all$" : async input => {
445
+ "^export subnetworks --all --folder .*$|^export subnetworks --all$" : async input => {
446
446
 
447
447
 
448
448
  //create folder
449
- const file = input.match(/-f .*/gm)
449
+ const file = input.match(/--folder .*/gm)
450
450
  let inputDir = "Exported"
451
451
  if (file != null && file.length > 0)
452
- inputDir = file[0].replace("-f ", "")
452
+ inputDir = file[0].replace("--folder ", "")
453
453
  //create directory if doesn't exists
454
454
  if (!fs.existsSync(inputDir)) fs.mkdirSync(inputDir)
455
455
 
@@ -471,7 +471,7 @@ const inputs = {
471
471
 
472
472
  const toDate = new Date();
473
473
  const timeEnable = toDate.getTime() - fromDate.getTime();
474
- subnetworkResult.duration = numberWithCommas(Math.round(timeEnable/1000)) + " s"
474
+ subnetworkResult.duration = numberWithCommas(timeEnable) + " ms"
475
475
 
476
476
 
477
477
  //fetch the json and write it to disk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "un-cli",
3
- "version": "0.0.65",
3
+ "version": "0.0.66",
4
4
  "description": "Command line interface for working with ArcGIS Utility Network Extension",
5
5
  "main": "index.mjs",
6
6
  "bin": {
@@ -997,6 +997,37 @@ export class UtilityNetwork {
997
997
  let ar = thisObj.featureServiceUrl.split("/");
998
998
  ar[ar.length-1]="UtilityNetworkServer";
999
999
  let exportsubnetworkUrl = ar.join("/") + "/exportSubnetwork"
1000
+ const resultTypes = [
1001
+ {
1002
+ "type": "features",
1003
+ "includeGeometry": true,
1004
+ "includePropagatedValues": false,
1005
+ "includeDomainDescriptions": true,
1006
+ "networkAttributeNames": [
1007
+ "Is subnetwork controller"
1008
+ ],
1009
+ "diagramTemplateName": "",
1010
+ "resultTypeFields": []
1011
+ },
1012
+ {
1013
+ "type": "connectivity",
1014
+ "includeGeometry": true,
1015
+ "includePropagatedValues": false,
1016
+ "includeDomainDescriptions": true,
1017
+ "networkAttributeNames": [],
1018
+ "diagramTemplateName": "",
1019
+ "resultTypeFields": []
1020
+ },
1021
+ {
1022
+ "type": "associations",
1023
+ "includeGeometry": false,
1024
+ "includePropagatedValues": false,
1025
+ "includeDomainDescriptions": true,
1026
+ "networkAttributeNames": [],
1027
+ "diagramTemplateName": "",
1028
+ "resultTypeFields": []
1029
+ }
1030
+ ]
1000
1031
  //traceConfiguration: JSON.stringify(subnetworkDef),
1001
1032
  let exportsubnetworkJson = {
1002
1033
  f: "json",
@@ -1007,9 +1038,10 @@ export class UtilityNetwork {
1007
1038
  exportAcknowledgement: true,
1008
1039
  allSubnetworksInTier: false,
1009
1040
  continueOnFailure: false,
1010
- traceConfiguration: subnetworkDef,
1041
+ traceConfiguration: subnetworkDef,
1011
1042
  async: async,
1012
1043
  gdbVersion:this.gdbVersion,
1044
+ resultTypes: JSON.stringify(resultTypes)
1013
1045
  }
1014
1046
  let un = this;
1015
1047