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 +37 -19
- package/cmd.txt +1 -2
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/utilitynetwork.node.mjs +33 -1
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
|
-
│
|
|
24
|
-
|
|
25
|
-
│
|
|
26
|
-
│
|
|
27
|
-
│
|
|
28
|
-
│
|
|
29
|
-
│
|
|
30
|
-
│
|
|
31
|
-
│
|
|
32
|
-
│
|
|
33
|
-
│
|
|
34
|
-
│
|
|
35
|
-
│
|
|
36
|
-
│
|
|
37
|
-
│
|
|
38
|
-
│
|
|
39
|
-
│
|
|
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
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.
|
|
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
|
-
|
|
445
|
+
"^export subnetworks --all --folder .*$|^export subnetworks --all$" : async input => {
|
|
446
446
|
|
|
447
447
|
|
|
448
448
|
//create folder
|
|
449
|
-
const file = input.match(
|
|
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("
|
|
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(
|
|
474
|
+
subnetworkResult.duration = numberWithCommas(timeEnable) + " ms"
|
|
475
475
|
|
|
476
476
|
|
|
477
477
|
//fetch the json and write it to disk
|
package/package.json
CHANGED
package/utilitynetwork.node.mjs
CHANGED
|
@@ -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
|
|