un-cli 0.0.81 → 0.0.82
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 +11 -4
- package/adminlog.mjs +2 -0
- package/cmd.txt +1 -2
- package/index.html +10 -1
- package/index.mjs +16 -3
- package/makerequest.mjs +7 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,12 +14,14 @@ npm install -g un-cli
|
|
|
14
14
|
## Once installed here is how you connect
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
> uncli --portal https://utilitynetwork.esri.com/portal --service NapervilleElectric_SQLServer --user tester --password tester.108
|
|
17
|
+
> uncli --portal https://utilitynetwork.esri.com/portal --service NapervilleElectric_SQLServer --user tester --password tester.108 --verify true
|
|
18
18
|
```
|
|
19
|
+
If this fails with a verification error it means you are using a self-signed certificate you can use use --verify false to disable verification but don't use this in production.
|
|
19
20
|
|
|
20
21
|
```bash
|
|
21
22
|
|
|
22
23
|
uncli> help
|
|
24
|
+
|
|
23
25
|
┌───────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
24
26
|
│ (index) │ Values │
|
|
25
27
|
├───────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -40,10 +42,15 @@ uncli> help
|
|
|
40
42
|
│ update subnetworks --all │ 'Update all dirty subnetworks synchronously' │
|
|
41
43
|
│ update subnetworks --deleted │ 'Update all deleted dirty subnetworks synchronously' │
|
|
42
44
|
│ update subnetworks --all --async │ 'Update all dirty subnetworks asynchronously' │
|
|
43
|
-
│
|
|
44
|
-
│
|
|
45
|
+
│ export subnetworks --all [--folder] │ 'Export all subnetworks with ACK --folder where exported files are saved' │
|
|
46
|
+
│ export subnetworks --new [--folder] │ "Export all subnetworks with ACK that haven't been exported --folder where exported files are saved" │
|
|
45
47
|
│ export subnetworks --deleted │ 'Export all subnetworks with ACK that are deleted ' │
|
|
46
|
-
│
|
|
48
|
+
│ updateisconnected │ 'Run update is connected ' │
|
|
49
|
+
│ versions │ 'List all versions available to the current logged in user.' │
|
|
50
|
+
│ reconcile --version <version name> │ 'Reconcile the input version synchronously' │
|
|
51
|
+
│ reconcile --all │ 'Reconcile all versions available to the current user synchronously' │
|
|
52
|
+
│ reconcile --all --async │ 'Reconcile all versions available to the current user asynchronously' │
|
|
53
|
+
│ count │ 'Lists the number of rows in all feature layers and tables.' │
|
|
47
54
|
│ count --system │ 'Lists the number of rows in system layers.' │
|
|
48
55
|
│ connect --service │ 'Connects to the another service' │
|
|
49
56
|
│ tracelogs --age <minutes> │ 'Lists utility network trace summary logs for the last x minutes (requires admin)' │
|
package/adminlog.mjs
CHANGED
package/cmd.txt
CHANGED
package/index.html
CHANGED
|
@@ -2144,6 +2144,11 @@ function numberWithCommas(x) {
|
|
|
2144
2144
|
})
|
|
2145
2145
|
}
|
|
2146
2146
|
|
|
2147
|
+
function decodeHTMLEntities (x) {
|
|
2148
|
+
const decodedString = document.createElement('div');
|
|
2149
|
+
decodedString.innerHTML = x;
|
|
2150
|
+
return decodedString.innerHTML;
|
|
2151
|
+
}
|
|
2147
2152
|
|
|
2148
2153
|
//paging works from newer message walking to the oldest message
|
|
2149
2154
|
//start time must be less than end time
|
|
@@ -2190,7 +2195,11 @@ function numberWithCommas(x) {
|
|
|
2190
2195
|
let jsonRes = await result.json()
|
|
2191
2196
|
let allMessages = [].concat(jsonRes.logMessages)
|
|
2192
2197
|
allMessages = allMessages.filter(m => m.message.indexOf(messageFilter) > -1 && m.methodName.indexOf(methodFilter) > -1)
|
|
2193
|
-
|
|
2198
|
+
//add decode html
|
|
2199
|
+
allMessages = allMessages.map(m=> {
|
|
2200
|
+
m.message = decodeHTMLEntities(m.message)
|
|
2201
|
+
return m
|
|
2202
|
+
})
|
|
2194
2203
|
let oldStart = undefined;
|
|
2195
2204
|
let newStartTime = undefined;
|
|
2196
2205
|
while (jsonRes.hasMore && !stop)
|
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.82";
|
|
11
11
|
const GENERATE_TOKEN_TIME_MIN = 30;
|
|
12
12
|
|
|
13
13
|
let rl = null;
|
|
@@ -931,7 +931,7 @@ const inputs = {
|
|
|
931
931
|
|
|
932
932
|
const arMessages = allMessages
|
|
933
933
|
.filter(m => m.message.indexOf("Attribute rule execution complete:") > -1)
|
|
934
|
-
.map (m => JSON.parse(m.message.replace("Attribute rule execution complete:", "")))
|
|
934
|
+
.map (m => JSON.parse(decodeHTMLEntities(m.message.replace("Attribute rule execution complete:", ""))))
|
|
935
935
|
.map( m => {
|
|
936
936
|
m["Elapsed Time (ms)"] = Math.round(m["Elapsed Time"]*1000000)/1000
|
|
937
937
|
// m["Arcade Evaluation Time:"] = Math.round(m["Arcade Evaluation Time:"]*1000,6)
|
|
@@ -1279,7 +1279,7 @@ const inputs = {
|
|
|
1279
1279
|
|
|
1280
1280
|
const arMessages = allMessages
|
|
1281
1281
|
.filter(m => m.message.indexOf("Attribute rule execution complete:") > -1)
|
|
1282
|
-
.map (m => JSON.parse(m.message.replace("Attribute rule execution complete:", "")))
|
|
1282
|
+
.map (m => JSON.parse(decodeHTMLEntities(m.message.replace("Attribute rule execution complete:", ""))))
|
|
1283
1283
|
.map( m => {
|
|
1284
1284
|
m["Elapsed Time (ms)"] = Math.round(m["Elapsed Time"]*1000000)/1000
|
|
1285
1285
|
// m["Arcade Evaluation Time:"] = Math.round(m["Arcade Evaluation Time:"]*1000,6)
|
|
@@ -1539,6 +1539,19 @@ export async function run (){
|
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
1541
|
|
|
1542
|
+
function decodeHTMLEntities (x) {
|
|
1543
|
+
const entities = {
|
|
1544
|
+
'<': '<',
|
|
1545
|
+
'>': '>',
|
|
1546
|
+
'&': '&',
|
|
1547
|
+
'"': '"',
|
|
1548
|
+
''': "'"
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
|
+
const y = x.replace(/&[a-zA-Z0-9#]+;/g, (match) => entities[match] || match);
|
|
1552
|
+
return y
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1542
1555
|
|
|
1543
1556
|
function printFishnet(fishnet) {
|
|
1544
1557
|
|
package/makerequest.mjs
CHANGED
|
@@ -31,13 +31,10 @@ export function makeRequest (opts) {
|
|
|
31
31
|
|
|
32
32
|
let nodeFetch = await import ("node-fetch");
|
|
33
33
|
f = nodeFetch.default;
|
|
34
|
-
|
|
35
|
-
catch(ex) {
|
|
36
|
-
f = fetch;
|
|
37
|
-
}
|
|
34
|
+
|
|
38
35
|
//set a proxy if one exists
|
|
39
36
|
|
|
40
|
-
if (process
|
|
37
|
+
if (process?.env['HTTPS_PROXY'])
|
|
41
38
|
{
|
|
42
39
|
try {
|
|
43
40
|
const HttpsProxyAgent = await import ('https-proxy-agent')
|
|
@@ -48,7 +45,11 @@ export function makeRequest (opts) {
|
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
}
|
|
49
|
+
catch(ex) {
|
|
50
|
+
f = fetch;
|
|
51
|
+
}
|
|
52
|
+
|
|
52
53
|
const options = {
|
|
53
54
|
"method" : opts.method,
|
|
54
55
|
"headers": headers,
|