un-cli 0.0.76 → 0.0.78
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 +30 -2
- package/adminlog.mjs +13 -3
- package/index.html +1484 -153
- package/index.mjs +5 -6
- package/package.json +22 -22
- package/portal.mjs +1 -1
- package/un.mjs +3 -3
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.78";
|
|
11
11
|
const GENERATE_TOKEN_TIME_MIN = 30;
|
|
12
12
|
|
|
13
13
|
let rl = null;
|
|
@@ -85,8 +85,7 @@ async function regenerateToken(parameters) {
|
|
|
85
85
|
//connect to the service
|
|
86
86
|
async function connect(parameters) {
|
|
87
87
|
try{
|
|
88
|
-
|
|
89
|
-
logger.info(JSON.stringify(parameters));
|
|
88
|
+
|
|
90
89
|
//connect to portal
|
|
91
90
|
|
|
92
91
|
const token = await getToken(parameters);
|
|
@@ -358,7 +357,7 @@ const inputs = {
|
|
|
358
357
|
|
|
359
358
|
for (let j = 0 ; j < fishnet[i].length; j++) {
|
|
360
359
|
|
|
361
|
-
fishnet[i][j].content = '
|
|
360
|
+
fishnet[i][j].content = '*'
|
|
362
361
|
const e = fishnet[i][j].extent
|
|
363
362
|
|
|
364
363
|
try {
|
|
@@ -375,7 +374,7 @@ const inputs = {
|
|
|
375
374
|
result.duration = duration
|
|
376
375
|
console.table(result)
|
|
377
376
|
//console.log(`add_env(${ JSON.stringify(e)})`)
|
|
378
|
-
fishnet[i][j].content = '
|
|
377
|
+
fishnet[i][j].content = 'x'
|
|
379
378
|
|
|
380
379
|
}
|
|
381
380
|
catch(ex){
|
|
@@ -446,7 +445,7 @@ const inputs = {
|
|
|
446
445
|
}
|
|
447
446
|
},
|
|
448
447
|
|
|
449
|
-
"^update subnetworks --all" : async input => {
|
|
448
|
+
"^update subnetworks --all$" : async input => {
|
|
450
449
|
|
|
451
450
|
let subnetworks;
|
|
452
451
|
let more = false;
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "un-cli",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Command line interface for working with ArcGIS Utility Network Extension",
|
|
5
|
-
"main": "index.mjs",
|
|
6
|
-
"bin": {
|
|
7
|
-
"uncli": "un.mjs"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"start": "node un.mjs"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"esri",
|
|
14
|
-
"ArcGIS",
|
|
15
|
-
"utility-network"
|
|
16
|
-
],
|
|
17
|
-
"author": "Hussein Nasser",
|
|
18
|
-
"license": "ISC",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"node-fetch": "^2.6.0"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "un-cli",
|
|
3
|
+
"version": "0.0.78",
|
|
4
|
+
"description": "Command line interface for working with ArcGIS Utility Network Extension",
|
|
5
|
+
"main": "index.mjs",
|
|
6
|
+
"bin": {
|
|
7
|
+
"uncli": "un.mjs"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "node un.mjs"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"esri",
|
|
14
|
+
"ArcGIS",
|
|
15
|
+
"utility-network"
|
|
16
|
+
],
|
|
17
|
+
"author": "Hussein Nasser",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"node-fetch": "^2.6.0"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/portal.mjs
CHANGED
|
@@ -46,7 +46,7 @@ export class Portal{
|
|
|
46
46
|
catch(ex){
|
|
47
47
|
logger.error(ex?.status?.message)
|
|
48
48
|
console.error(ex?.status?.errno)
|
|
49
|
-
reject(`Failed to connect to portal, check your username or password or add --verify false if you are using a self-signed certificate. Normally a production system should have a valid certificate signed by a CA and you should NOT disable verification in that case.) \n\n${ex}`)
|
|
49
|
+
reject(`Failed to connect to portal, check your username or password or add --verify false if you are using a self-signed certificate. Normally a production system should have a valid certificate signed by a CA and you should NOT disable verification in that case.) \n\n${JSON.stringify(ex)}`)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
}
|
package/un.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node --experimental-modules
|
|
2
|
-
|
|
3
|
-
import {run} from "./index.mjs"
|
|
1
|
+
#!/usr/bin/env node --experimental-modules
|
|
2
|
+
|
|
3
|
+
import {run} from "./index.mjs"
|
|
4
4
|
run();
|