un-cli 0.0.76 → 0.0.79

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/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.75";
10
+ let version = "0.0.79";
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
- //print the parameters
89
- logger.info(JSON.stringify(parameters));
88
+
90
89
  //connect to portal
91
90
 
92
91
  const token = await getToken(parameters);
@@ -177,7 +176,7 @@ const inputs = {
177
176
  "export subnetworks --deleted": "Export all subnetworks with ACK that are deleted ",
178
177
  "updateisconnected": "Run update is connected ",
179
178
 
180
- "count": "Lists the number of rows in all feature layers.",
179
+ "count": "Lists the number of rows in all feature layers and tables.",
181
180
  "count --system": "Lists the number of rows in system layers.",
182
181
  "connect --service": "Connects to the another service",
183
182
  "tracelogs --age <minutes>": "Lists utility network trace summary logs for the last x minutes (requires admin)",
@@ -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;
@@ -749,8 +748,8 @@ const inputs = {
749
748
  let totalRows =0;
750
749
  serviceDef.layers.forEach (l=> Object.keys(l).forEach (k => !layerProperties.includes(k) ? delete l[k] : ""))
751
750
  //all layers except system ones
752
- const allLayers = serviceDef.layers.filter(l => l.type === 'Feature Layer' && !systemLayers.find(a=> a.id === l.id ))
753
-
751
+ let allLayers = serviceDef.layers.filter(l => l.type === 'Feature Layer' && !systemLayers.find(a=> a.id === l.id ))
752
+ allLayers = allLayers.concat(serviceDef.tables);
754
753
 
755
754
  for (let i = 0; i < allLayers.length; i++ )
756
755
  {
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
- {
2
- "name": "un-cli",
3
- "version": "0.0.76",
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.79",
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();