@sonisoft/now-sdk-ext-cli 5.0.0 → 5.1.0

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.
@@ -44,6 +44,23 @@
44
44
  "allowNo": false,
45
45
  "type": "boolean"
46
46
  },
47
+ "log-dir": {
48
+ "description": "Directory to write log files to. Implies --log-file.",
49
+ "helpGroup": "GLOBAL",
50
+ "name": "log-dir",
51
+ "required": false,
52
+ "hasDynamicHelp": false,
53
+ "multiple": false,
54
+ "type": "option"
55
+ },
56
+ "log-file": {
57
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
58
+ "helpGroup": "GLOBAL",
59
+ "name": "log-file",
60
+ "required": false,
61
+ "allowNo": false,
62
+ "type": "boolean"
63
+ },
47
64
  "log-level": {
48
65
  "helpGroup": "GLOBAL",
49
66
  "name": "log-level",
@@ -139,6 +156,23 @@
139
156
  "allowNo": false,
140
157
  "type": "boolean"
141
158
  },
159
+ "log-dir": {
160
+ "description": "Directory to write log files to. Implies --log-file.",
161
+ "helpGroup": "GLOBAL",
162
+ "name": "log-dir",
163
+ "required": false,
164
+ "hasDynamicHelp": false,
165
+ "multiple": false,
166
+ "type": "option"
167
+ },
168
+ "log-file": {
169
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
170
+ "helpGroup": "GLOBAL",
171
+ "name": "log-file",
172
+ "required": false,
173
+ "allowNo": false,
174
+ "type": "boolean"
175
+ },
142
176
  "log-level": {
143
177
  "helpGroup": "GLOBAL",
144
178
  "name": "log-level",
@@ -299,6 +333,23 @@
299
333
  "allowNo": false,
300
334
  "type": "boolean"
301
335
  },
336
+ "log-dir": {
337
+ "description": "Directory to write log files to. Implies --log-file.",
338
+ "helpGroup": "GLOBAL",
339
+ "name": "log-dir",
340
+ "required": false,
341
+ "hasDynamicHelp": false,
342
+ "multiple": false,
343
+ "type": "option"
344
+ },
345
+ "log-file": {
346
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
347
+ "helpGroup": "GLOBAL",
348
+ "name": "log-file",
349
+ "required": false,
350
+ "allowNo": false,
351
+ "type": "boolean"
352
+ },
302
353
  "log-level": {
303
354
  "helpGroup": "GLOBAL",
304
355
  "name": "log-level",
@@ -433,6 +484,23 @@
433
484
  "allowNo": false,
434
485
  "type": "boolean"
435
486
  },
487
+ "log-dir": {
488
+ "description": "Directory to write log files to. Implies --log-file.",
489
+ "helpGroup": "GLOBAL",
490
+ "name": "log-dir",
491
+ "required": false,
492
+ "hasDynamicHelp": false,
493
+ "multiple": false,
494
+ "type": "option"
495
+ },
496
+ "log-file": {
497
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
498
+ "helpGroup": "GLOBAL",
499
+ "name": "log-file",
500
+ "required": false,
501
+ "allowNo": false,
502
+ "type": "boolean"
503
+ },
436
504
  "log-level": {
437
505
  "helpGroup": "GLOBAL",
438
506
  "name": "log-level",
@@ -535,6 +603,23 @@
535
603
  "allowNo": false,
536
604
  "type": "boolean"
537
605
  },
606
+ "log-dir": {
607
+ "description": "Directory to write log files to. Implies --log-file.",
608
+ "helpGroup": "GLOBAL",
609
+ "name": "log-dir",
610
+ "required": false,
611
+ "hasDynamicHelp": false,
612
+ "multiple": false,
613
+ "type": "option"
614
+ },
615
+ "log-file": {
616
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
617
+ "helpGroup": "GLOBAL",
618
+ "name": "log-file",
619
+ "required": false,
620
+ "allowNo": false,
621
+ "type": "boolean"
622
+ },
538
623
  "log-level": {
539
624
  "helpGroup": "GLOBAL",
540
625
  "name": "log-level",
@@ -636,6 +721,23 @@
636
721
  "allowNo": false,
637
722
  "type": "boolean"
638
723
  },
724
+ "log-dir": {
725
+ "description": "Directory to write log files to. Implies --log-file.",
726
+ "helpGroup": "GLOBAL",
727
+ "name": "log-dir",
728
+ "required": false,
729
+ "hasDynamicHelp": false,
730
+ "multiple": false,
731
+ "type": "option"
732
+ },
733
+ "log-file": {
734
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
735
+ "helpGroup": "GLOBAL",
736
+ "name": "log-file",
737
+ "required": false,
738
+ "allowNo": false,
739
+ "type": "boolean"
740
+ },
639
741
  "log-level": {
640
742
  "helpGroup": "GLOBAL",
641
743
  "name": "log-level",
@@ -766,6 +868,23 @@
766
868
  "allowNo": false,
767
869
  "type": "boolean"
768
870
  },
871
+ "log-dir": {
872
+ "description": "Directory to write log files to. Implies --log-file.",
873
+ "helpGroup": "GLOBAL",
874
+ "name": "log-dir",
875
+ "required": false,
876
+ "hasDynamicHelp": false,
877
+ "multiple": false,
878
+ "type": "option"
879
+ },
880
+ "log-file": {
881
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
882
+ "helpGroup": "GLOBAL",
883
+ "name": "log-file",
884
+ "required": false,
885
+ "allowNo": false,
886
+ "type": "boolean"
887
+ },
769
888
  "log-level": {
770
889
  "helpGroup": "GLOBAL",
771
890
  "name": "log-level",
@@ -858,6 +977,23 @@
858
977
  "allowNo": false,
859
978
  "type": "boolean"
860
979
  },
980
+ "log-dir": {
981
+ "description": "Directory to write log files to. Implies --log-file.",
982
+ "helpGroup": "GLOBAL",
983
+ "name": "log-dir",
984
+ "required": false,
985
+ "hasDynamicHelp": false,
986
+ "multiple": false,
987
+ "type": "option"
988
+ },
989
+ "log-file": {
990
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
991
+ "helpGroup": "GLOBAL",
992
+ "name": "log-file",
993
+ "required": false,
994
+ "allowNo": false,
995
+ "type": "boolean"
996
+ },
861
997
  "log-level": {
862
998
  "helpGroup": "GLOBAL",
863
999
  "name": "log-level",
@@ -965,6 +1101,23 @@
965
1101
  "allowNo": false,
966
1102
  "type": "boolean"
967
1103
  },
1104
+ "log-dir": {
1105
+ "description": "Directory to write log files to. Implies --log-file.",
1106
+ "helpGroup": "GLOBAL",
1107
+ "name": "log-dir",
1108
+ "required": false,
1109
+ "hasDynamicHelp": false,
1110
+ "multiple": false,
1111
+ "type": "option"
1112
+ },
1113
+ "log-file": {
1114
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
1115
+ "helpGroup": "GLOBAL",
1116
+ "name": "log-file",
1117
+ "required": false,
1118
+ "allowNo": false,
1119
+ "type": "boolean"
1120
+ },
968
1121
  "log-level": {
969
1122
  "helpGroup": "GLOBAL",
970
1123
  "name": "log-level",
@@ -1141,6 +1294,23 @@
1141
1294
  "allowNo": false,
1142
1295
  "type": "boolean"
1143
1296
  },
1297
+ "log-dir": {
1298
+ "description": "Directory to write log files to. Implies --log-file.",
1299
+ "helpGroup": "GLOBAL",
1300
+ "name": "log-dir",
1301
+ "required": false,
1302
+ "hasDynamicHelp": false,
1303
+ "multiple": false,
1304
+ "type": "option"
1305
+ },
1306
+ "log-file": {
1307
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
1308
+ "helpGroup": "GLOBAL",
1309
+ "name": "log-file",
1310
+ "required": false,
1311
+ "allowNo": false,
1312
+ "type": "boolean"
1313
+ },
1144
1314
  "log-level": {
1145
1315
  "helpGroup": "GLOBAL",
1146
1316
  "name": "log-level",
@@ -1222,6 +1392,23 @@
1222
1392
  "allowNo": false,
1223
1393
  "type": "boolean"
1224
1394
  },
1395
+ "log-dir": {
1396
+ "description": "Directory to write log files to. Implies --log-file.",
1397
+ "helpGroup": "GLOBAL",
1398
+ "name": "log-dir",
1399
+ "required": false,
1400
+ "hasDynamicHelp": false,
1401
+ "multiple": false,
1402
+ "type": "option"
1403
+ },
1404
+ "log-file": {
1405
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
1406
+ "helpGroup": "GLOBAL",
1407
+ "name": "log-file",
1408
+ "required": false,
1409
+ "allowNo": false,
1410
+ "type": "boolean"
1411
+ },
1225
1412
  "log-level": {
1226
1413
  "helpGroup": "GLOBAL",
1227
1414
  "name": "log-level",
@@ -1321,6 +1508,23 @@
1321
1508
  "allowNo": false,
1322
1509
  "type": "boolean"
1323
1510
  },
1511
+ "log-dir": {
1512
+ "description": "Directory to write log files to. Implies --log-file.",
1513
+ "helpGroup": "GLOBAL",
1514
+ "name": "log-dir",
1515
+ "required": false,
1516
+ "hasDynamicHelp": false,
1517
+ "multiple": false,
1518
+ "type": "option"
1519
+ },
1520
+ "log-file": {
1521
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
1522
+ "helpGroup": "GLOBAL",
1523
+ "name": "log-file",
1524
+ "required": false,
1525
+ "allowNo": false,
1526
+ "type": "boolean"
1527
+ },
1324
1528
  "log-level": {
1325
1529
  "helpGroup": "GLOBAL",
1326
1530
  "name": "log-level",
@@ -1389,73 +1593,38 @@
1389
1593
  "upload.js"
1390
1594
  ]
1391
1595
  },
1392
- "batch:create": {
1596
+ "auth:delete": {
1393
1597
  "aliases": [],
1394
- "args": {},
1395
- "description": "Batch create records on a ServiceNow instance from a JSON file.",
1598
+ "args": {
1599
+ "alias": {
1600
+ "description": "Alias to remove",
1601
+ "name": "alias",
1602
+ "required": false
1603
+ }
1604
+ },
1605
+ "description": "Remove a credential from the store.\n\nThis does not touch the OS keyring — a copy stored there before migrating remains.",
1396
1606
  "examples": [
1397
1607
  {
1398
- "command": "<%= config.bin %> <%= command.id %> --file ./records.json --auth dev",
1399
- "description": "Create records from a JSON file"
1608
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1609
+ "description": "Remove one alias"
1400
1610
  },
1401
1611
  {
1402
- "command": "<%= config.bin %> <%= command.id %> --file ./records.json --no-transaction --auth dev",
1403
- "description": "Create records without transactional mode"
1612
+ "command": "<%= config.bin %> <%= command.id %> --all",
1613
+ "description": "Remove every stored credential"
1404
1614
  }
1405
1615
  ],
1406
1616
  "flags": {
1407
- "json": {
1408
- "description": "Format output as json.",
1409
- "helpGroup": "GLOBAL",
1410
- "name": "json",
1411
- "allowNo": false,
1412
- "type": "boolean"
1413
- },
1414
- "auth": {
1415
- "char": "a",
1416
- "description": "Auth alias to use.",
1417
- "name": "auth",
1418
- "required": false,
1419
- "hasDynamicHelp": false,
1420
- "multiple": false,
1421
- "type": "option"
1422
- },
1423
1617
  "cred-store": {
1424
- "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1618
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1425
1619
  "helpGroup": "GLOBAL",
1426
1620
  "name": "cred-store",
1427
1621
  "required": false,
1428
1622
  "allowNo": false,
1429
1623
  "type": "boolean"
1430
1624
  },
1431
- "log-level": {
1432
- "helpGroup": "GLOBAL",
1433
- "name": "log-level",
1434
- "summary": "Specify level for logging.",
1435
- "default": "info",
1436
- "hasDynamicHelp": false,
1437
- "multiple": false,
1438
- "options": [
1439
- "debug",
1440
- "warn",
1441
- "error",
1442
- "info",
1443
- "trace"
1444
- ],
1445
- "type": "option"
1446
- },
1447
- "file": {
1448
- "char": "f",
1449
- "description": "Path to JSON file with create operations",
1450
- "name": "file",
1451
- "required": true,
1452
- "hasDynamicHelp": false,
1453
- "multiple": false,
1454
- "type": "option"
1455
- },
1456
- "transaction": {
1457
- "description": "Stop on first error (transactional)",
1458
- "name": "transaction",
1625
+ "all": {
1626
+ "description": "Remove every stored credential",
1627
+ "name": "all",
1459
1628
  "required": false,
1460
1629
  "allowNo": false,
1461
1630
  "type": "boolean"
@@ -1463,32 +1632,32 @@
1463
1632
  },
1464
1633
  "hasDynamicHelp": false,
1465
1634
  "hiddenAliases": [],
1466
- "id": "batch:create",
1635
+ "id": "auth:delete",
1467
1636
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1468
1637
  "pluginName": "@sonisoft/now-sdk-ext-cli",
1469
1638
  "pluginType": "core",
1470
1639
  "strict": true,
1471
- "enableJsonFlag": true,
1640
+ "enableJsonFlag": false,
1472
1641
  "isESM": true,
1473
1642
  "relativePath": [
1474
1643
  "dist",
1475
1644
  "commands",
1476
- "batch",
1477
- "create.js"
1645
+ "auth",
1646
+ "delete.js"
1478
1647
  ]
1479
1648
  },
1480
- "batch:update": {
1649
+ "auth:doctor": {
1481
1650
  "aliases": [],
1482
1651
  "args": {},
1483
- "description": "Batch update records on a ServiceNow instance from a JSON file.",
1652
+ "description": "Diagnose credential storage: whether the SDK shim is active, which backend is in use, and what is stored.",
1484
1653
  "examples": [
1485
1654
  {
1486
- "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --auth dev",
1487
- "description": "Update records from a JSON file"
1655
+ "command": "<%= config.bin %> <%= command.id %>",
1656
+ "description": "Check credential storage health"
1488
1657
  },
1489
1658
  {
1490
- "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --stop-on-error --auth dev",
1491
- "description": "Update records and stop on first error"
1659
+ "command": "<%= config.bin %> <%= command.id %> --json",
1660
+ "description": "Machine-readable output for CI"
1492
1661
  }
1493
1662
  ],
1494
1663
  "flags": {
@@ -1499,46 +1668,304 @@
1499
1668
  "allowNo": false,
1500
1669
  "type": "boolean"
1501
1670
  },
1502
- "auth": {
1503
- "char": "a",
1504
- "description": "Auth alias to use.",
1505
- "name": "auth",
1506
- "required": false,
1507
- "hasDynamicHelp": false,
1508
- "multiple": false,
1509
- "type": "option"
1510
- },
1511
1671
  "cred-store": {
1512
- "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1672
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1513
1673
  "helpGroup": "GLOBAL",
1514
1674
  "name": "cred-store",
1515
1675
  "required": false,
1516
1676
  "allowNo": false,
1517
1677
  "type": "boolean"
1518
- },
1519
- "log-level": {
1520
- "helpGroup": "GLOBAL",
1521
- "name": "log-level",
1522
- "summary": "Specify level for logging.",
1523
- "default": "info",
1524
- "hasDynamicHelp": false,
1525
- "multiple": false,
1526
- "options": [
1527
- "debug",
1528
- "warn",
1529
- "error",
1530
- "info",
1531
- "trace"
1532
- ],
1533
- "type": "option"
1534
- },
1535
- "file": {
1536
- "char": "f",
1537
- "description": "Path to JSON file with update operations",
1538
- "name": "file",
1539
- "required": true,
1540
- "hasDynamicHelp": false,
1541
- "multiple": false,
1678
+ }
1679
+ },
1680
+ "hasDynamicHelp": false,
1681
+ "hiddenAliases": [],
1682
+ "id": "auth:doctor",
1683
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1684
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1685
+ "pluginType": "core",
1686
+ "strict": true,
1687
+ "enableJsonFlag": true,
1688
+ "isESM": true,
1689
+ "relativePath": [
1690
+ "dist",
1691
+ "commands",
1692
+ "auth",
1693
+ "doctor.js"
1694
+ ]
1695
+ },
1696
+ "auth:list": {
1697
+ "aliases": [],
1698
+ "args": {},
1699
+ "description": "List credentials in the headless-safe credential store.\n\nThese are the credentials the ServiceNow SDK reads via the sn-credstore shim, which works in non-interactive sessions where the OS keyring cannot be unlocked.\n\nSecrets are never printed.",
1700
+ "examples": [
1701
+ {
1702
+ "command": "<%= config.bin %> <%= command.id %>",
1703
+ "description": "List stored credentials"
1704
+ },
1705
+ {
1706
+ "command": "<%= config.bin %> <%= command.id %> --json",
1707
+ "description": "List as JSON for scripting"
1708
+ }
1709
+ ],
1710
+ "flags": {
1711
+ "json": {
1712
+ "description": "Format output as json.",
1713
+ "helpGroup": "GLOBAL",
1714
+ "name": "json",
1715
+ "allowNo": false,
1716
+ "type": "boolean"
1717
+ },
1718
+ "cred-store": {
1719
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1720
+ "helpGroup": "GLOBAL",
1721
+ "name": "cred-store",
1722
+ "required": false,
1723
+ "allowNo": false,
1724
+ "type": "boolean"
1725
+ }
1726
+ },
1727
+ "hasDynamicHelp": false,
1728
+ "hiddenAliases": [],
1729
+ "id": "auth:list",
1730
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1731
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1732
+ "pluginType": "core",
1733
+ "strict": true,
1734
+ "enableJsonFlag": true,
1735
+ "isESM": true,
1736
+ "relativePath": [
1737
+ "dist",
1738
+ "commands",
1739
+ "auth",
1740
+ "list.js"
1741
+ ]
1742
+ },
1743
+ "auth:use": {
1744
+ "aliases": [],
1745
+ "args": {
1746
+ "alias": {
1747
+ "description": "Alias to make the default",
1748
+ "name": "alias",
1749
+ "required": true
1750
+ }
1751
+ },
1752
+ "description": "Set the default credential alias.\n\nCommands run without --auth use this alias.",
1753
+ "examples": [
1754
+ {
1755
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1756
+ "description": "Make dev206299 the default"
1757
+ }
1758
+ ],
1759
+ "flags": {
1760
+ "cred-store": {
1761
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1762
+ "helpGroup": "GLOBAL",
1763
+ "name": "cred-store",
1764
+ "required": false,
1765
+ "allowNo": false,
1766
+ "type": "boolean"
1767
+ }
1768
+ },
1769
+ "hasDynamicHelp": false,
1770
+ "hiddenAliases": [],
1771
+ "id": "auth:use",
1772
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1773
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1774
+ "pluginType": "core",
1775
+ "strict": true,
1776
+ "enableJsonFlag": false,
1777
+ "isESM": true,
1778
+ "relativePath": [
1779
+ "dist",
1780
+ "commands",
1781
+ "auth",
1782
+ "use.js"
1783
+ ]
1784
+ },
1785
+ "batch:create": {
1786
+ "aliases": [],
1787
+ "args": {},
1788
+ "description": "Batch create records on a ServiceNow instance from a JSON file.",
1789
+ "examples": [
1790
+ {
1791
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.json --auth dev",
1792
+ "description": "Create records from a JSON file"
1793
+ },
1794
+ {
1795
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.json --no-transaction --auth dev",
1796
+ "description": "Create records without transactional mode"
1797
+ }
1798
+ ],
1799
+ "flags": {
1800
+ "json": {
1801
+ "description": "Format output as json.",
1802
+ "helpGroup": "GLOBAL",
1803
+ "name": "json",
1804
+ "allowNo": false,
1805
+ "type": "boolean"
1806
+ },
1807
+ "auth": {
1808
+ "char": "a",
1809
+ "description": "Auth alias to use.",
1810
+ "name": "auth",
1811
+ "required": false,
1812
+ "hasDynamicHelp": false,
1813
+ "multiple": false,
1814
+ "type": "option"
1815
+ },
1816
+ "cred-store": {
1817
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1818
+ "helpGroup": "GLOBAL",
1819
+ "name": "cred-store",
1820
+ "required": false,
1821
+ "allowNo": false,
1822
+ "type": "boolean"
1823
+ },
1824
+ "log-dir": {
1825
+ "description": "Directory to write log files to. Implies --log-file.",
1826
+ "helpGroup": "GLOBAL",
1827
+ "name": "log-dir",
1828
+ "required": false,
1829
+ "hasDynamicHelp": false,
1830
+ "multiple": false,
1831
+ "type": "option"
1832
+ },
1833
+ "log-file": {
1834
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
1835
+ "helpGroup": "GLOBAL",
1836
+ "name": "log-file",
1837
+ "required": false,
1838
+ "allowNo": false,
1839
+ "type": "boolean"
1840
+ },
1841
+ "log-level": {
1842
+ "helpGroup": "GLOBAL",
1843
+ "name": "log-level",
1844
+ "summary": "Specify level for logging.",
1845
+ "default": "info",
1846
+ "hasDynamicHelp": false,
1847
+ "multiple": false,
1848
+ "options": [
1849
+ "debug",
1850
+ "warn",
1851
+ "error",
1852
+ "info",
1853
+ "trace"
1854
+ ],
1855
+ "type": "option"
1856
+ },
1857
+ "file": {
1858
+ "char": "f",
1859
+ "description": "Path to JSON file with create operations",
1860
+ "name": "file",
1861
+ "required": true,
1862
+ "hasDynamicHelp": false,
1863
+ "multiple": false,
1864
+ "type": "option"
1865
+ },
1866
+ "transaction": {
1867
+ "description": "Stop on first error (transactional)",
1868
+ "name": "transaction",
1869
+ "required": false,
1870
+ "allowNo": false,
1871
+ "type": "boolean"
1872
+ }
1873
+ },
1874
+ "hasDynamicHelp": false,
1875
+ "hiddenAliases": [],
1876
+ "id": "batch:create",
1877
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1878
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1879
+ "pluginType": "core",
1880
+ "strict": true,
1881
+ "enableJsonFlag": true,
1882
+ "isESM": true,
1883
+ "relativePath": [
1884
+ "dist",
1885
+ "commands",
1886
+ "batch",
1887
+ "create.js"
1888
+ ]
1889
+ },
1890
+ "batch:update": {
1891
+ "aliases": [],
1892
+ "args": {},
1893
+ "description": "Batch update records on a ServiceNow instance from a JSON file.",
1894
+ "examples": [
1895
+ {
1896
+ "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --auth dev",
1897
+ "description": "Update records from a JSON file"
1898
+ },
1899
+ {
1900
+ "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --stop-on-error --auth dev",
1901
+ "description": "Update records and stop on first error"
1902
+ }
1903
+ ],
1904
+ "flags": {
1905
+ "json": {
1906
+ "description": "Format output as json.",
1907
+ "helpGroup": "GLOBAL",
1908
+ "name": "json",
1909
+ "allowNo": false,
1910
+ "type": "boolean"
1911
+ },
1912
+ "auth": {
1913
+ "char": "a",
1914
+ "description": "Auth alias to use.",
1915
+ "name": "auth",
1916
+ "required": false,
1917
+ "hasDynamicHelp": false,
1918
+ "multiple": false,
1919
+ "type": "option"
1920
+ },
1921
+ "cred-store": {
1922
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1923
+ "helpGroup": "GLOBAL",
1924
+ "name": "cred-store",
1925
+ "required": false,
1926
+ "allowNo": false,
1927
+ "type": "boolean"
1928
+ },
1929
+ "log-dir": {
1930
+ "description": "Directory to write log files to. Implies --log-file.",
1931
+ "helpGroup": "GLOBAL",
1932
+ "name": "log-dir",
1933
+ "required": false,
1934
+ "hasDynamicHelp": false,
1935
+ "multiple": false,
1936
+ "type": "option"
1937
+ },
1938
+ "log-file": {
1939
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
1940
+ "helpGroup": "GLOBAL",
1941
+ "name": "log-file",
1942
+ "required": false,
1943
+ "allowNo": false,
1944
+ "type": "boolean"
1945
+ },
1946
+ "log-level": {
1947
+ "helpGroup": "GLOBAL",
1948
+ "name": "log-level",
1949
+ "summary": "Specify level for logging.",
1950
+ "default": "info",
1951
+ "hasDynamicHelp": false,
1952
+ "multiple": false,
1953
+ "options": [
1954
+ "debug",
1955
+ "warn",
1956
+ "error",
1957
+ "info",
1958
+ "trace"
1959
+ ],
1960
+ "type": "option"
1961
+ },
1962
+ "file": {
1963
+ "char": "f",
1964
+ "description": "Path to JSON file with update operations",
1965
+ "name": "file",
1966
+ "required": true,
1967
+ "hasDynamicHelp": false,
1968
+ "multiple": false,
1542
1969
  "type": "option"
1543
1970
  },
1544
1971
  "stop-on-error": {
@@ -1613,6 +2040,23 @@
1613
2040
  "allowNo": false,
1614
2041
  "type": "boolean"
1615
2042
  },
2043
+ "log-dir": {
2044
+ "description": "Directory to write log files to. Implies --log-file.",
2045
+ "helpGroup": "GLOBAL",
2046
+ "name": "log-dir",
2047
+ "required": false,
2048
+ "hasDynamicHelp": false,
2049
+ "multiple": false,
2050
+ "type": "option"
2051
+ },
2052
+ "log-file": {
2053
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2054
+ "helpGroup": "GLOBAL",
2055
+ "name": "log-file",
2056
+ "required": false,
2057
+ "allowNo": false,
2058
+ "type": "boolean"
2059
+ },
1616
2060
  "log-level": {
1617
2061
  "helpGroup": "GLOBAL",
1618
2062
  "name": "log-level",
@@ -1729,6 +2173,23 @@
1729
2173
  "allowNo": false,
1730
2174
  "type": "boolean"
1731
2175
  },
2176
+ "log-dir": {
2177
+ "description": "Directory to write log files to. Implies --log-file.",
2178
+ "helpGroup": "GLOBAL",
2179
+ "name": "log-dir",
2180
+ "required": false,
2181
+ "hasDynamicHelp": false,
2182
+ "multiple": false,
2183
+ "type": "option"
2184
+ },
2185
+ "log-file": {
2186
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2187
+ "helpGroup": "GLOBAL",
2188
+ "name": "log-file",
2189
+ "required": false,
2190
+ "allowNo": false,
2191
+ "type": "boolean"
2192
+ },
1732
2193
  "log-level": {
1733
2194
  "helpGroup": "GLOBAL",
1734
2195
  "name": "log-level",
@@ -1888,6 +2349,23 @@
1888
2349
  "allowNo": false,
1889
2350
  "type": "boolean"
1890
2351
  },
2352
+ "log-dir": {
2353
+ "description": "Directory to write log files to. Implies --log-file.",
2354
+ "helpGroup": "GLOBAL",
2355
+ "name": "log-dir",
2356
+ "required": false,
2357
+ "hasDynamicHelp": false,
2358
+ "multiple": false,
2359
+ "type": "option"
2360
+ },
2361
+ "log-file": {
2362
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2363
+ "helpGroup": "GLOBAL",
2364
+ "name": "log-file",
2365
+ "required": false,
2366
+ "allowNo": false,
2367
+ "type": "boolean"
2368
+ },
1891
2369
  "log-level": {
1892
2370
  "helpGroup": "GLOBAL",
1893
2371
  "name": "log-level",
@@ -1911,213 +2389,24 @@
1911
2389
  "required": false,
1912
2390
  "hasDynamicHelp": false,
1913
2391
  "multiple": false,
1914
- "type": "option"
1915
- }
1916
- },
1917
- "hasDynamicHelp": false,
1918
- "hiddenAliases": [],
1919
- "id": "exec",
1920
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1921
- "pluginName": "@sonisoft/now-sdk-ext-cli",
1922
- "pluginType": "core",
1923
- "strict": true,
1924
- "enableJsonFlag": true,
1925
- "autocomplete": {},
1926
- "isESM": true,
1927
- "relativePath": [
1928
- "dist",
1929
- "commands",
1930
- "exec",
1931
- "index.js"
1932
- ]
1933
- },
1934
- "auth:delete": {
1935
- "aliases": [],
1936
- "args": {
1937
- "alias": {
1938
- "description": "Alias to remove",
1939
- "name": "alias",
1940
- "required": false
1941
- }
1942
- },
1943
- "description": "Remove a credential from the store.\n\nThis does not touch the OS keyring — a copy stored there before migrating remains.",
1944
- "examples": [
1945
- {
1946
- "command": "<%= config.bin %> <%= command.id %> dev206299",
1947
- "description": "Remove one alias"
1948
- },
1949
- {
1950
- "command": "<%= config.bin %> <%= command.id %> --all",
1951
- "description": "Remove every stored credential"
1952
- }
1953
- ],
1954
- "flags": {
1955
- "cred-store": {
1956
- "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1957
- "helpGroup": "GLOBAL",
1958
- "name": "cred-store",
1959
- "required": false,
1960
- "allowNo": false,
1961
- "type": "boolean"
1962
- },
1963
- "all": {
1964
- "description": "Remove every stored credential",
1965
- "name": "all",
1966
- "required": false,
1967
- "allowNo": false,
1968
- "type": "boolean"
1969
- }
1970
- },
1971
- "hasDynamicHelp": false,
1972
- "hiddenAliases": [],
1973
- "id": "auth:delete",
1974
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1975
- "pluginName": "@sonisoft/now-sdk-ext-cli",
1976
- "pluginType": "core",
1977
- "strict": true,
1978
- "enableJsonFlag": false,
1979
- "isESM": true,
1980
- "relativePath": [
1981
- "dist",
1982
- "commands",
1983
- "auth",
1984
- "delete.js"
1985
- ]
1986
- },
1987
- "auth:doctor": {
1988
- "aliases": [],
1989
- "args": {},
1990
- "description": "Diagnose credential storage: whether the SDK shim is active, which backend is in use, and what is stored.",
1991
- "examples": [
1992
- {
1993
- "command": "<%= config.bin %> <%= command.id %>",
1994
- "description": "Check credential storage health"
1995
- },
1996
- {
1997
- "command": "<%= config.bin %> <%= command.id %> --json",
1998
- "description": "Machine-readable output for CI"
1999
- }
2000
- ],
2001
- "flags": {
2002
- "json": {
2003
- "description": "Format output as json.",
2004
- "helpGroup": "GLOBAL",
2005
- "name": "json",
2006
- "allowNo": false,
2007
- "type": "boolean"
2008
- },
2009
- "cred-store": {
2010
- "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
2011
- "helpGroup": "GLOBAL",
2012
- "name": "cred-store",
2013
- "required": false,
2014
- "allowNo": false,
2015
- "type": "boolean"
2016
- }
2017
- },
2018
- "hasDynamicHelp": false,
2019
- "hiddenAliases": [],
2020
- "id": "auth:doctor",
2021
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2022
- "pluginName": "@sonisoft/now-sdk-ext-cli",
2023
- "pluginType": "core",
2024
- "strict": true,
2025
- "enableJsonFlag": true,
2026
- "isESM": true,
2027
- "relativePath": [
2028
- "dist",
2029
- "commands",
2030
- "auth",
2031
- "doctor.js"
2032
- ]
2033
- },
2034
- "auth:list": {
2035
- "aliases": [],
2036
- "args": {},
2037
- "description": "List credentials in the headless-safe credential store.\n\nThese are the credentials the ServiceNow SDK reads via the sn-credstore shim, which works in non-interactive sessions where the OS keyring cannot be unlocked.\n\nSecrets are never printed.",
2038
- "examples": [
2039
- {
2040
- "command": "<%= config.bin %> <%= command.id %>",
2041
- "description": "List stored credentials"
2042
- },
2043
- {
2044
- "command": "<%= config.bin %> <%= command.id %> --json",
2045
- "description": "List as JSON for scripting"
2046
- }
2047
- ],
2048
- "flags": {
2049
- "json": {
2050
- "description": "Format output as json.",
2051
- "helpGroup": "GLOBAL",
2052
- "name": "json",
2053
- "allowNo": false,
2054
- "type": "boolean"
2055
- },
2056
- "cred-store": {
2057
- "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
2058
- "helpGroup": "GLOBAL",
2059
- "name": "cred-store",
2060
- "required": false,
2061
- "allowNo": false,
2062
- "type": "boolean"
2063
- }
2064
- },
2065
- "hasDynamicHelp": false,
2066
- "hiddenAliases": [],
2067
- "id": "auth:list",
2068
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2069
- "pluginName": "@sonisoft/now-sdk-ext-cli",
2070
- "pluginType": "core",
2071
- "strict": true,
2072
- "enableJsonFlag": true,
2073
- "isESM": true,
2074
- "relativePath": [
2075
- "dist",
2076
- "commands",
2077
- "auth",
2078
- "list.js"
2079
- ]
2080
- },
2081
- "auth:use": {
2082
- "aliases": [],
2083
- "args": {
2084
- "alias": {
2085
- "description": "Alias to make the default",
2086
- "name": "alias",
2087
- "required": true
2088
- }
2089
- },
2090
- "description": "Set the default credential alias.\n\nCommands run without --auth use this alias.",
2091
- "examples": [
2092
- {
2093
- "command": "<%= config.bin %> <%= command.id %> dev206299",
2094
- "description": "Make dev206299 the default"
2095
- }
2096
- ],
2097
- "flags": {
2098
- "cred-store": {
2099
- "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
2100
- "helpGroup": "GLOBAL",
2101
- "name": "cred-store",
2102
- "required": false,
2103
- "allowNo": false,
2104
- "type": "boolean"
2392
+ "type": "option"
2105
2393
  }
2106
2394
  },
2107
2395
  "hasDynamicHelp": false,
2108
2396
  "hiddenAliases": [],
2109
- "id": "auth:use",
2397
+ "id": "exec",
2110
2398
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2111
2399
  "pluginName": "@sonisoft/now-sdk-ext-cli",
2112
2400
  "pluginType": "core",
2113
2401
  "strict": true,
2114
- "enableJsonFlag": false,
2402
+ "enableJsonFlag": true,
2403
+ "autocomplete": {},
2115
2404
  "isESM": true,
2116
2405
  "relativePath": [
2117
2406
  "dist",
2118
2407
  "commands",
2119
- "auth",
2120
- "use.js"
2408
+ "exec",
2409
+ "index.js"
2121
2410
  ]
2122
2411
  },
2123
2412
  "flow:action": {
@@ -2156,6 +2445,23 @@
2156
2445
  "allowNo": false,
2157
2446
  "type": "boolean"
2158
2447
  },
2448
+ "log-dir": {
2449
+ "description": "Directory to write log files to. Implies --log-file.",
2450
+ "helpGroup": "GLOBAL",
2451
+ "name": "log-dir",
2452
+ "required": false,
2453
+ "hasDynamicHelp": false,
2454
+ "multiple": false,
2455
+ "type": "option"
2456
+ },
2457
+ "log-file": {
2458
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2459
+ "helpGroup": "GLOBAL",
2460
+ "name": "log-file",
2461
+ "required": false,
2462
+ "allowNo": false,
2463
+ "type": "boolean"
2464
+ },
2159
2465
  "log-level": {
2160
2466
  "helpGroup": "GLOBAL",
2161
2467
  "name": "log-level",
@@ -2276,6 +2582,23 @@
2276
2582
  "allowNo": false,
2277
2583
  "type": "boolean"
2278
2584
  },
2585
+ "log-dir": {
2586
+ "description": "Directory to write log files to. Implies --log-file.",
2587
+ "helpGroup": "GLOBAL",
2588
+ "name": "log-dir",
2589
+ "required": false,
2590
+ "hasDynamicHelp": false,
2591
+ "multiple": false,
2592
+ "type": "option"
2593
+ },
2594
+ "log-file": {
2595
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2596
+ "helpGroup": "GLOBAL",
2597
+ "name": "log-file",
2598
+ "required": false,
2599
+ "allowNo": false,
2600
+ "type": "boolean"
2601
+ },
2279
2602
  "log-level": {
2280
2603
  "helpGroup": "GLOBAL",
2281
2604
  "name": "log-level",
@@ -2379,6 +2702,23 @@
2379
2702
  "allowNo": false,
2380
2703
  "type": "boolean"
2381
2704
  },
2705
+ "log-dir": {
2706
+ "description": "Directory to write log files to. Implies --log-file.",
2707
+ "helpGroup": "GLOBAL",
2708
+ "name": "log-dir",
2709
+ "required": false,
2710
+ "hasDynamicHelp": false,
2711
+ "multiple": false,
2712
+ "type": "option"
2713
+ },
2714
+ "log-file": {
2715
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2716
+ "helpGroup": "GLOBAL",
2717
+ "name": "log-file",
2718
+ "required": false,
2719
+ "allowNo": false,
2720
+ "type": "boolean"
2721
+ },
2382
2722
  "log-level": {
2383
2723
  "helpGroup": "GLOBAL",
2384
2724
  "name": "log-level",
@@ -2483,6 +2823,23 @@
2483
2823
  "allowNo": false,
2484
2824
  "type": "boolean"
2485
2825
  },
2826
+ "log-dir": {
2827
+ "description": "Directory to write log files to. Implies --log-file.",
2828
+ "helpGroup": "GLOBAL",
2829
+ "name": "log-dir",
2830
+ "required": false,
2831
+ "hasDynamicHelp": false,
2832
+ "multiple": false,
2833
+ "type": "option"
2834
+ },
2835
+ "log-file": {
2836
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2837
+ "helpGroup": "GLOBAL",
2838
+ "name": "log-file",
2839
+ "required": false,
2840
+ "allowNo": false,
2841
+ "type": "boolean"
2842
+ },
2486
2843
  "log-level": {
2487
2844
  "helpGroup": "GLOBAL",
2488
2845
  "name": "log-level",
@@ -2577,6 +2934,23 @@
2577
2934
  "allowNo": false,
2578
2935
  "type": "boolean"
2579
2936
  },
2937
+ "log-dir": {
2938
+ "description": "Directory to write log files to. Implies --log-file.",
2939
+ "helpGroup": "GLOBAL",
2940
+ "name": "log-dir",
2941
+ "required": false,
2942
+ "hasDynamicHelp": false,
2943
+ "multiple": false,
2944
+ "type": "option"
2945
+ },
2946
+ "log-file": {
2947
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
2948
+ "helpGroup": "GLOBAL",
2949
+ "name": "log-file",
2950
+ "required": false,
2951
+ "allowNo": false,
2952
+ "type": "boolean"
2953
+ },
2580
2954
  "log-level": {
2581
2955
  "helpGroup": "GLOBAL",
2582
2956
  "name": "log-level",
@@ -2671,6 +3045,23 @@
2671
3045
  "allowNo": false,
2672
3046
  "type": "boolean"
2673
3047
  },
3048
+ "log-dir": {
3049
+ "description": "Directory to write log files to. Implies --log-file.",
3050
+ "helpGroup": "GLOBAL",
3051
+ "name": "log-dir",
3052
+ "required": false,
3053
+ "hasDynamicHelp": false,
3054
+ "multiple": false,
3055
+ "type": "option"
3056
+ },
3057
+ "log-file": {
3058
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3059
+ "helpGroup": "GLOBAL",
3060
+ "name": "log-file",
3061
+ "required": false,
3062
+ "allowNo": false,
3063
+ "type": "boolean"
3064
+ },
2674
3065
  "log-level": {
2675
3066
  "helpGroup": "GLOBAL",
2676
3067
  "name": "log-level",
@@ -2777,6 +3168,23 @@
2777
3168
  "allowNo": false,
2778
3169
  "type": "boolean"
2779
3170
  },
3171
+ "log-dir": {
3172
+ "description": "Directory to write log files to. Implies --log-file.",
3173
+ "helpGroup": "GLOBAL",
3174
+ "name": "log-dir",
3175
+ "required": false,
3176
+ "hasDynamicHelp": false,
3177
+ "multiple": false,
3178
+ "type": "option"
3179
+ },
3180
+ "log-file": {
3181
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3182
+ "helpGroup": "GLOBAL",
3183
+ "name": "log-file",
3184
+ "required": false,
3185
+ "allowNo": false,
3186
+ "type": "boolean"
3187
+ },
2780
3188
  "log-level": {
2781
3189
  "helpGroup": "GLOBAL",
2782
3190
  "name": "log-level",
@@ -2885,6 +3293,23 @@
2885
3293
  "allowNo": false,
2886
3294
  "type": "boolean"
2887
3295
  },
3296
+ "log-dir": {
3297
+ "description": "Directory to write log files to. Implies --log-file.",
3298
+ "helpGroup": "GLOBAL",
3299
+ "name": "log-dir",
3300
+ "required": false,
3301
+ "hasDynamicHelp": false,
3302
+ "multiple": false,
3303
+ "type": "option"
3304
+ },
3305
+ "log-file": {
3306
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3307
+ "helpGroup": "GLOBAL",
3308
+ "name": "log-file",
3309
+ "required": false,
3310
+ "allowNo": false,
3311
+ "type": "boolean"
3312
+ },
2888
3313
  "log-level": {
2889
3314
  "helpGroup": "GLOBAL",
2890
3315
  "name": "log-level",
@@ -2979,6 +3404,23 @@
2979
3404
  "allowNo": false,
2980
3405
  "type": "boolean"
2981
3406
  },
3407
+ "log-dir": {
3408
+ "description": "Directory to write log files to. Implies --log-file.",
3409
+ "helpGroup": "GLOBAL",
3410
+ "name": "log-dir",
3411
+ "required": false,
3412
+ "hasDynamicHelp": false,
3413
+ "multiple": false,
3414
+ "type": "option"
3415
+ },
3416
+ "log-file": {
3417
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3418
+ "helpGroup": "GLOBAL",
3419
+ "name": "log-file",
3420
+ "required": false,
3421
+ "allowNo": false,
3422
+ "type": "boolean"
3423
+ },
2982
3424
  "log-level": {
2983
3425
  "helpGroup": "GLOBAL",
2984
3426
  "name": "log-level",
@@ -3095,6 +3537,23 @@
3095
3537
  "allowNo": false,
3096
3538
  "type": "boolean"
3097
3539
  },
3540
+ "log-dir": {
3541
+ "description": "Directory to write log files to. Implies --log-file.",
3542
+ "helpGroup": "GLOBAL",
3543
+ "name": "log-dir",
3544
+ "required": false,
3545
+ "hasDynamicHelp": false,
3546
+ "multiple": false,
3547
+ "type": "option"
3548
+ },
3549
+ "log-file": {
3550
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3551
+ "helpGroup": "GLOBAL",
3552
+ "name": "log-file",
3553
+ "required": false,
3554
+ "allowNo": false,
3555
+ "type": "boolean"
3556
+ },
3098
3557
  "log-level": {
3099
3558
  "helpGroup": "GLOBAL",
3100
3559
  "name": "log-level",
@@ -3185,6 +3644,23 @@
3185
3644
  "allowNo": false,
3186
3645
  "type": "boolean"
3187
3646
  },
3647
+ "log-dir": {
3648
+ "description": "Directory to write log files to. Implies --log-file.",
3649
+ "helpGroup": "GLOBAL",
3650
+ "name": "log-dir",
3651
+ "required": false,
3652
+ "hasDynamicHelp": false,
3653
+ "multiple": false,
3654
+ "type": "option"
3655
+ },
3656
+ "log-file": {
3657
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3658
+ "helpGroup": "GLOBAL",
3659
+ "name": "log-file",
3660
+ "required": false,
3661
+ "allowNo": false,
3662
+ "type": "boolean"
3663
+ },
3188
3664
  "log-level": {
3189
3665
  "helpGroup": "GLOBAL",
3190
3666
  "name": "log-level",
@@ -3309,6 +3785,23 @@
3309
3785
  "allowNo": false,
3310
3786
  "type": "boolean"
3311
3787
  },
3788
+ "log-dir": {
3789
+ "description": "Directory to write log files to. Implies --log-file.",
3790
+ "helpGroup": "GLOBAL",
3791
+ "name": "log-dir",
3792
+ "required": false,
3793
+ "hasDynamicHelp": false,
3794
+ "multiple": false,
3795
+ "type": "option"
3796
+ },
3797
+ "log-file": {
3798
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3799
+ "helpGroup": "GLOBAL",
3800
+ "name": "log-file",
3801
+ "required": false,
3802
+ "allowNo": false,
3803
+ "type": "boolean"
3804
+ },
3312
3805
  "log-level": {
3313
3806
  "helpGroup": "GLOBAL",
3314
3807
  "name": "log-level",
@@ -3423,6 +3916,23 @@
3423
3916
  "allowNo": false,
3424
3917
  "type": "boolean"
3425
3918
  },
3919
+ "log-dir": {
3920
+ "description": "Directory to write log files to. Implies --log-file.",
3921
+ "helpGroup": "GLOBAL",
3922
+ "name": "log-dir",
3923
+ "required": false,
3924
+ "hasDynamicHelp": false,
3925
+ "multiple": false,
3926
+ "type": "option"
3927
+ },
3928
+ "log-file": {
3929
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
3930
+ "helpGroup": "GLOBAL",
3931
+ "name": "log-file",
3932
+ "required": false,
3933
+ "allowNo": false,
3934
+ "type": "boolean"
3935
+ },
3426
3936
  "log-level": {
3427
3937
  "helpGroup": "GLOBAL",
3428
3938
  "name": "log-level",
@@ -3563,6 +4073,23 @@
3563
4073
  "allowNo": false,
3564
4074
  "type": "boolean"
3565
4075
  },
4076
+ "log-dir": {
4077
+ "description": "Directory to write log files to. Implies --log-file.",
4078
+ "helpGroup": "GLOBAL",
4079
+ "name": "log-dir",
4080
+ "required": false,
4081
+ "hasDynamicHelp": false,
4082
+ "multiple": false,
4083
+ "type": "option"
4084
+ },
4085
+ "log-file": {
4086
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4087
+ "helpGroup": "GLOBAL",
4088
+ "name": "log-file",
4089
+ "required": false,
4090
+ "allowNo": false,
4091
+ "type": "boolean"
4092
+ },
3566
4093
  "log-level": {
3567
4094
  "helpGroup": "GLOBAL",
3568
4095
  "name": "log-level",
@@ -3671,6 +4198,23 @@
3671
4198
  "allowNo": false,
3672
4199
  "type": "boolean"
3673
4200
  },
4201
+ "log-dir": {
4202
+ "description": "Directory to write log files to. Implies --log-file.",
4203
+ "helpGroup": "GLOBAL",
4204
+ "name": "log-dir",
4205
+ "required": false,
4206
+ "hasDynamicHelp": false,
4207
+ "multiple": false,
4208
+ "type": "option"
4209
+ },
4210
+ "log-file": {
4211
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4212
+ "helpGroup": "GLOBAL",
4213
+ "name": "log-file",
4214
+ "required": false,
4215
+ "allowNo": false,
4216
+ "type": "boolean"
4217
+ },
3674
4218
  "log-level": {
3675
4219
  "helpGroup": "GLOBAL",
3676
4220
  "name": "log-level",
@@ -3775,6 +4319,23 @@
3775
4319
  "allowNo": false,
3776
4320
  "type": "boolean"
3777
4321
  },
4322
+ "log-dir": {
4323
+ "description": "Directory to write log files to. Implies --log-file.",
4324
+ "helpGroup": "GLOBAL",
4325
+ "name": "log-dir",
4326
+ "required": false,
4327
+ "hasDynamicHelp": false,
4328
+ "multiple": false,
4329
+ "type": "option"
4330
+ },
4331
+ "log-file": {
4332
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4333
+ "helpGroup": "GLOBAL",
4334
+ "name": "log-file",
4335
+ "required": false,
4336
+ "allowNo": false,
4337
+ "type": "boolean"
4338
+ },
3778
4339
  "log-level": {
3779
4340
  "helpGroup": "GLOBAL",
3780
4341
  "name": "log-level",
@@ -3870,6 +4431,23 @@
3870
4431
  "allowNo": false,
3871
4432
  "type": "boolean"
3872
4433
  },
4434
+ "log-dir": {
4435
+ "description": "Directory to write log files to. Implies --log-file.",
4436
+ "helpGroup": "GLOBAL",
4437
+ "name": "log-dir",
4438
+ "required": false,
4439
+ "hasDynamicHelp": false,
4440
+ "multiple": false,
4441
+ "type": "option"
4442
+ },
4443
+ "log-file": {
4444
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4445
+ "helpGroup": "GLOBAL",
4446
+ "name": "log-file",
4447
+ "required": false,
4448
+ "allowNo": false,
4449
+ "type": "boolean"
4450
+ },
3873
4451
  "log-level": {
3874
4452
  "helpGroup": "GLOBAL",
3875
4453
  "name": "log-level",
@@ -3993,6 +4571,23 @@
3993
4571
  "allowNo": false,
3994
4572
  "type": "boolean"
3995
4573
  },
4574
+ "log-dir": {
4575
+ "description": "Directory to write log files to. Implies --log-file.",
4576
+ "helpGroup": "GLOBAL",
4577
+ "name": "log-dir",
4578
+ "required": false,
4579
+ "hasDynamicHelp": false,
4580
+ "multiple": false,
4581
+ "type": "option"
4582
+ },
4583
+ "log-file": {
4584
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4585
+ "helpGroup": "GLOBAL",
4586
+ "name": "log-file",
4587
+ "required": false,
4588
+ "allowNo": false,
4589
+ "type": "boolean"
4590
+ },
3996
4591
  "log-level": {
3997
4592
  "helpGroup": "GLOBAL",
3998
4593
  "name": "log-level",
@@ -4045,29 +4640,26 @@
4045
4640
  "syslog.js"
4046
4641
  ]
4047
4642
  },
4048
- "scope": {
4643
+ "schema:field": {
4049
4644
  "aliases": [],
4050
4645
  "args": {},
4051
- "description": "Get the current application scope or list available applications.",
4646
+ "description": "Get detailed information about a specific field on a ServiceNow table.\n\nThis command retrieves comprehensive details about a single field, including its type, constraints, choices, and other metadata. Useful for understanding field definitions during development.",
4052
4647
  "examples": [
4053
4648
  {
4054
- "command": "<%= config.bin %> <%= command.id %> --auth dev",
4055
- "description": "Get the current application scope"
4056
- },
4057
- {
4058
- "command": "<%= config.bin %> <%= command.id %> --list --auth dev",
4059
- "description": "List all available applications"
4649
+ "description": "Explain the state field on incident table",
4650
+ "command": "<%= config.bin %> <%= command.id %> --table incident --field state --auth dev"
4060
4651
  },
4061
4652
  {
4062
- "command": "<%= config.bin %> <%= command.id %> -l --json --auth dev",
4063
- "description": "List applications as JSON"
4653
+ "description": "Explain the priority field on incident table with JSON output",
4654
+ "command": "<%= config.bin %> <%= command.id %> --table incident --field priority --json --auth dev"
4064
4655
  }
4065
4656
  ],
4066
4657
  "flags": {
4067
4658
  "json": {
4068
- "description": "Format output as json.",
4069
- "helpGroup": "GLOBAL",
4659
+ "char": "j",
4660
+ "description": "Output results as JSON",
4070
4661
  "name": "json",
4662
+ "required": false,
4071
4663
  "allowNo": false,
4072
4664
  "type": "boolean"
4073
4665
  },
@@ -4088,6 +4680,23 @@
4088
4680
  "allowNo": false,
4089
4681
  "type": "boolean"
4090
4682
  },
4683
+ "log-dir": {
4684
+ "description": "Directory to write log files to. Implies --log-file.",
4685
+ "helpGroup": "GLOBAL",
4686
+ "name": "log-dir",
4687
+ "required": false,
4688
+ "hasDynamicHelp": false,
4689
+ "multiple": false,
4690
+ "type": "option"
4691
+ },
4692
+ "log-file": {
4693
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4694
+ "helpGroup": "GLOBAL",
4695
+ "name": "log-file",
4696
+ "required": false,
4697
+ "allowNo": false,
4698
+ "type": "boolean"
4699
+ },
4091
4700
  "log-level": {
4092
4701
  "helpGroup": "GLOBAL",
4093
4702
  "name": "log-level",
@@ -4103,19 +4712,29 @@
4103
4712
  "trace"
4104
4713
  ],
4105
4714
  "type": "option"
4106
- },
4107
- "list": {
4108
- "char": "l",
4109
- "description": "List all available applications",
4110
- "name": "list",
4111
- "required": false,
4112
- "allowNo": false,
4113
- "type": "boolean"
4715
+ },
4716
+ "table": {
4717
+ "char": "t",
4718
+ "description": "ServiceNow table name",
4719
+ "name": "table",
4720
+ "required": true,
4721
+ "hasDynamicHelp": false,
4722
+ "multiple": false,
4723
+ "type": "option"
4724
+ },
4725
+ "field": {
4726
+ "char": "f",
4727
+ "description": "Field name to explain",
4728
+ "name": "field",
4729
+ "required": true,
4730
+ "hasDynamicHelp": false,
4731
+ "multiple": false,
4732
+ "type": "option"
4114
4733
  }
4115
4734
  },
4116
4735
  "hasDynamicHelp": false,
4117
4736
  "hiddenAliases": [],
4118
- "id": "scope",
4737
+ "id": "schema:field",
4119
4738
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4120
4739
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4121
4740
  "pluginType": "core",
@@ -4125,29 +4744,30 @@
4125
4744
  "relativePath": [
4126
4745
  "dist",
4127
4746
  "commands",
4128
- "scope",
4129
- "index.js"
4747
+ "schema",
4748
+ "field.js"
4130
4749
  ]
4131
4750
  },
4132
- "scope:set": {
4751
+ "schema": {
4133
4752
  "aliases": [],
4134
4753
  "args": {},
4135
- "description": "Set the current application scope on a ServiceNow instance.",
4754
+ "description": "Discover and inspect a ServiceNow table schema including fields, types, and relationships.\n\nThis command retrieves the full schema definition for a ServiceNow table, including all fields, their types, constraints, and optionally choices, relationships, UI policies, and business rules.\n\nFeatures:\n • List all fields with types, lengths, and constraints\n • Optionally include field choices\n • Optionally include table relationships\n • Optionally include UI policies\n • Optionally include business rules\n • JSON output for CI/CD integration",
4136
4755
  "examples": [
4137
4756
  {
4138
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123def456ghi789jkl012mno345pq --auth dev",
4139
- "description": "Set application scope by sys_id"
4757
+ "description": "Discover incident table schema",
4758
+ "command": "<%= config.bin %> <%= command.id %> --table incident --auth dev"
4140
4759
  },
4141
4760
  {
4142
- "command": "<%= config.bin %> <%= command.id %> -a abc123def456ghi789jkl012mno345pq --json --auth dev",
4143
- "description": "Set application scope and output as JSON"
4761
+ "description": "Include choices and relationships",
4762
+ "command": "<%= config.bin %> <%= command.id %> --table incident --include-choices --include-relationships --auth dev"
4144
4763
  }
4145
4764
  ],
4146
4765
  "flags": {
4147
4766
  "json": {
4148
- "description": "Format output as json.",
4149
- "helpGroup": "GLOBAL",
4767
+ "char": "j",
4768
+ "description": "Output results as JSON",
4150
4769
  "name": "json",
4770
+ "required": false,
4151
4771
  "allowNo": false,
4152
4772
  "type": "boolean"
4153
4773
  },
@@ -4168,6 +4788,23 @@
4168
4788
  "allowNo": false,
4169
4789
  "type": "boolean"
4170
4790
  },
4791
+ "log-dir": {
4792
+ "description": "Directory to write log files to. Implies --log-file.",
4793
+ "helpGroup": "GLOBAL",
4794
+ "name": "log-dir",
4795
+ "required": false,
4796
+ "hasDynamicHelp": false,
4797
+ "multiple": false,
4798
+ "type": "option"
4799
+ },
4800
+ "log-file": {
4801
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4802
+ "helpGroup": "GLOBAL",
4803
+ "name": "log-file",
4804
+ "required": false,
4805
+ "allowNo": false,
4806
+ "type": "boolean"
4807
+ },
4171
4808
  "log-level": {
4172
4809
  "helpGroup": "GLOBAL",
4173
4810
  "name": "log-level",
@@ -4184,19 +4821,47 @@
4184
4821
  ],
4185
4822
  "type": "option"
4186
4823
  },
4187
- "app-id": {
4188
- "char": "a",
4189
- "description": "32-char sys_id of application",
4190
- "name": "app-id",
4824
+ "table": {
4825
+ "char": "t",
4826
+ "description": "ServiceNow table name to discover schema for",
4827
+ "name": "table",
4191
4828
  "required": true,
4192
4829
  "hasDynamicHelp": false,
4193
4830
  "multiple": false,
4194
4831
  "type": "option"
4832
+ },
4833
+ "include-choices": {
4834
+ "description": "Include field choices in the schema output",
4835
+ "name": "include-choices",
4836
+ "required": false,
4837
+ "allowNo": false,
4838
+ "type": "boolean"
4839
+ },
4840
+ "include-relationships": {
4841
+ "description": "Include table relationships in the schema output",
4842
+ "name": "include-relationships",
4843
+ "required": false,
4844
+ "allowNo": false,
4845
+ "type": "boolean"
4846
+ },
4847
+ "include-ui-policies": {
4848
+ "description": "Include UI policies in the schema output",
4849
+ "name": "include-ui-policies",
4850
+ "required": false,
4851
+ "allowNo": false,
4852
+ "type": "boolean"
4853
+ },
4854
+ "include-business-rules": {
4855
+ "description": "Include business rules in the schema output",
4856
+ "name": "include-business-rules",
4857
+ "required": false,
4858
+ "allowNo": false,
4859
+ "type": "boolean"
4195
4860
  }
4196
4861
  },
4197
4862
  "hasDynamicHelp": false,
4198
4863
  "hiddenAliases": [],
4199
- "id": "scope:set",
4864
+ "id": "schema",
4200
4865
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4201
4866
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4202
4867
  "pluginType": "core",
@@ -4206,33 +4871,30 @@
4206
4871
  "relativePath": [
4207
4872
  "dist",
4208
4873
  "commands",
4209
- "scope",
4210
- "set.js"
4874
+ "schema",
4875
+ "index.js"
4211
4876
  ]
4212
4877
  },
4213
- "script-sync:pull": {
4878
+ "schema:validate-catalog": {
4214
4879
  "aliases": [],
4215
4880
  "args": {},
4216
- "description": "Pull a script from a ServiceNow instance to a local file.\n\nThis command downloads a script record from your ServiceNow instance and saves it as a local file. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Download scripts by name and type\n • Custom output file path support\n • Auto-generated file names based on script name and type\n • JSON output for CI/CD integration",
4881
+ "description": "Validate a ServiceNow catalog item configuration for common issues.\n\nThis command checks a catalog item configuration and reports any validation issues, warnings, or errors found. Useful for ensuring catalog items are properly configured before deployment.",
4217
4882
  "examples": [
4218
4883
  {
4219
- "description": "Pull a Script Include to auto-generated file name",
4220
- "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --auth dev-instance"
4221
- },
4222
- {
4223
- "description": "Pull a Business Rule to a specific file",
4224
- "command": "<%= config.bin %> <%= command.id %> --name MyBusinessRule --type sys_script --output ./scripts/my-rule.js --auth dev-instance"
4884
+ "description": "Validate a catalog item by sys_id",
4885
+ "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --auth dev"
4225
4886
  },
4226
4887
  {
4227
- "description": "Pull a Client Script with JSON output",
4228
- "command": "<%= config.bin %> <%= command.id %> -n MyClientScript -t sys_script_client --json --auth dev-instance"
4888
+ "description": "Validate a catalog item with JSON output",
4889
+ "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --json --auth dev"
4229
4890
  }
4230
4891
  ],
4231
4892
  "flags": {
4232
4893
  "json": {
4233
- "description": "Format output as json.",
4234
- "helpGroup": "GLOBAL",
4894
+ "char": "j",
4895
+ "description": "Output results as JSON",
4235
4896
  "name": "json",
4897
+ "required": false,
4236
4898
  "allowNo": false,
4237
4899
  "type": "boolean"
4238
4900
  },
@@ -4253,6 +4915,23 @@
4253
4915
  "allowNo": false,
4254
4916
  "type": "boolean"
4255
4917
  },
4918
+ "log-dir": {
4919
+ "description": "Directory to write log files to. Implies --log-file.",
4920
+ "helpGroup": "GLOBAL",
4921
+ "name": "log-dir",
4922
+ "required": false,
4923
+ "hasDynamicHelp": false,
4924
+ "multiple": false,
4925
+ "type": "option"
4926
+ },
4927
+ "log-file": {
4928
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4929
+ "helpGroup": "GLOBAL",
4930
+ "name": "log-file",
4931
+ "required": false,
4932
+ "allowNo": false,
4933
+ "type": "boolean"
4934
+ },
4256
4935
  "log-level": {
4257
4936
  "helpGroup": "GLOBAL",
4258
4937
  "name": "log-level",
@@ -4269,44 +4948,19 @@
4269
4948
  ],
4270
4949
  "type": "option"
4271
4950
  },
4272
- "name": {
4273
- "char": "n",
4274
- "description": "Name of the script to pull",
4275
- "name": "name",
4276
- "required": true,
4277
- "hasDynamicHelp": false,
4278
- "multiple": false,
4279
- "type": "option"
4280
- },
4281
- "type": {
4282
- "char": "t",
4283
- "description": "Type of script to pull",
4284
- "name": "type",
4951
+ "sys-id": {
4952
+ "char": "s",
4953
+ "description": "Catalog item sys_id to validate",
4954
+ "name": "sys-id",
4285
4955
  "required": true,
4286
4956
  "hasDynamicHelp": false,
4287
4957
  "multiple": false,
4288
- "options": [
4289
- "sys_script_include",
4290
- "sys_script",
4291
- "sys_ui_script",
4292
- "sys_ui_action",
4293
- "sys_script_client"
4294
- ],
4295
- "type": "option"
4296
- },
4297
- "output": {
4298
- "char": "o",
4299
- "description": "Output file path. If not specified, a file name is auto-generated.",
4300
- "name": "output",
4301
- "required": false,
4302
- "hasDynamicHelp": false,
4303
- "multiple": false,
4304
4958
  "type": "option"
4305
4959
  }
4306
4960
  },
4307
4961
  "hasDynamicHelp": false,
4308
4962
  "hiddenAliases": [],
4309
- "id": "script-sync:pull",
4963
+ "id": "schema:validate-catalog",
4310
4964
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4311
4965
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4312
4966
  "pluginType": "core",
@@ -4316,26 +4970,26 @@
4316
4970
  "relativePath": [
4317
4971
  "dist",
4318
4972
  "commands",
4319
- "script-sync",
4320
- "pull.js"
4973
+ "schema",
4974
+ "validate-catalog.js"
4321
4975
  ]
4322
4976
  },
4323
- "script-sync:push": {
4977
+ "scope": {
4324
4978
  "aliases": [],
4325
4979
  "args": {},
4326
- "description": "Push a local script file to a ServiceNow instance.\n\nThis command uploads a local script file to your ServiceNow instance, updating the corresponding script record. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Upload scripts by name and type\n • Specify the local file to push\n • JSON output for CI/CD integration\n • Detailed push result reporting",
4980
+ "description": "Get the current application scope or list available applications.",
4327
4981
  "examples": [
4328
4982
  {
4329
- "description": "Push a Script Include from a local file",
4330
- "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --file ./scripts/MyScriptInclude.js --auth dev-instance"
4983
+ "command": "<%= config.bin %> <%= command.id %> --auth dev",
4984
+ "description": "Get the current application scope"
4331
4985
  },
4332
4986
  {
4333
- "description": "Push a Business Rule with short flags",
4334
- "command": "<%= config.bin %> <%= command.id %> -n MyBusinessRule -t sys_script -f ./scripts/my-rule.js -a dev-instance"
4987
+ "command": "<%= config.bin %> <%= command.id %> --list --auth dev",
4988
+ "description": "List all available applications"
4335
4989
  },
4336
4990
  {
4337
- "description": "Push a UI Script with JSON output",
4338
- "command": "<%= config.bin %> <%= command.id %> -n MyUIScript -t sys_ui_script -f ./scripts/ui-script.js --json --auth dev-instance"
4991
+ "command": "<%= config.bin %> <%= command.id %> -l --json --auth dev",
4992
+ "description": "List applications as JSON"
4339
4993
  }
4340
4994
  ],
4341
4995
  "flags": {
@@ -4363,6 +5017,23 @@
4363
5017
  "allowNo": false,
4364
5018
  "type": "boolean"
4365
5019
  },
5020
+ "log-dir": {
5021
+ "description": "Directory to write log files to. Implies --log-file.",
5022
+ "helpGroup": "GLOBAL",
5023
+ "name": "log-dir",
5024
+ "required": false,
5025
+ "hasDynamicHelp": false,
5026
+ "multiple": false,
5027
+ "type": "option"
5028
+ },
5029
+ "log-file": {
5030
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5031
+ "helpGroup": "GLOBAL",
5032
+ "name": "log-file",
5033
+ "required": false,
5034
+ "allowNo": false,
5035
+ "type": "boolean"
5036
+ },
4366
5037
  "log-level": {
4367
5038
  "helpGroup": "GLOBAL",
4368
5039
  "name": "log-level",
@@ -4379,44 +5050,18 @@
4379
5050
  ],
4380
5051
  "type": "option"
4381
5052
  },
4382
- "name": {
4383
- "char": "n",
4384
- "description": "Name of the script to push",
4385
- "name": "name",
4386
- "required": true,
4387
- "hasDynamicHelp": false,
4388
- "multiple": false,
4389
- "type": "option"
4390
- },
4391
- "type": {
4392
- "char": "t",
4393
- "description": "Type of script to push",
4394
- "name": "type",
4395
- "required": true,
4396
- "hasDynamicHelp": false,
4397
- "multiple": false,
4398
- "options": [
4399
- "sys_script_include",
4400
- "sys_script",
4401
- "sys_ui_script",
4402
- "sys_ui_action",
4403
- "sys_script_client"
4404
- ],
4405
- "type": "option"
4406
- },
4407
- "file": {
4408
- "char": "f",
4409
- "description": "Path to the local script file to push",
4410
- "name": "file",
4411
- "required": true,
4412
- "hasDynamicHelp": false,
4413
- "multiple": false,
4414
- "type": "option"
5053
+ "list": {
5054
+ "char": "l",
5055
+ "description": "List all available applications",
5056
+ "name": "list",
5057
+ "required": false,
5058
+ "allowNo": false,
5059
+ "type": "boolean"
4415
5060
  }
4416
5061
  },
4417
5062
  "hasDynamicHelp": false,
4418
5063
  "hiddenAliases": [],
4419
- "id": "script-sync:push",
5064
+ "id": "scope",
4420
5065
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4421
5066
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4422
5067
  "pluginType": "core",
@@ -4426,26 +5071,22 @@
4426
5071
  "relativePath": [
4427
5072
  "dist",
4428
5073
  "commands",
4429
- "script-sync",
4430
- "push.js"
5074
+ "scope",
5075
+ "index.js"
4431
5076
  ]
4432
5077
  },
4433
- "script-sync:sync": {
5078
+ "scope:set": {
4434
5079
  "aliases": [],
4435
5080
  "args": {},
4436
- "description": "Synchronize all scripts in a directory with a ServiceNow instance.\n\nThis command scans a local directory for script files and synchronizes them with the corresponding records on your ServiceNow instance. You can optionally filter by script types to synchronize only specific kinds of scripts.\n\nFeatures:\n • Batch synchronization of all scripts in a directory\n • Filter by one or more script types\n • Summary report with success/failure counts\n • JSON output for CI/CD integration",
5081
+ "description": "Set the current application scope on a ServiceNow instance.",
4437
5082
  "examples": [
4438
5083
  {
4439
- "description": "Sync all scripts in a directory",
4440
- "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --auth dev-instance"
4441
- },
4442
- {
4443
- "description": "Sync only Script Includes and Business Rules",
4444
- "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --types sys_script_include --types sys_script --auth dev-instance"
5084
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123def456ghi789jkl012mno345pq --auth dev",
5085
+ "description": "Set application scope by sys_id"
4445
5086
  },
4446
5087
  {
4447
- "description": "Sync with JSON output for CI/CD",
4448
- "command": "<%= config.bin %> <%= command.id %> -d ./scripts --json --auth dev-instance"
5088
+ "command": "<%= config.bin %> <%= command.id %> -a abc123def456ghi789jkl012mno345pq --json --auth dev",
5089
+ "description": "Set application scope and output as JSON"
4449
5090
  }
4450
5091
  ],
4451
5092
  "flags": {
@@ -4465,10 +5106,27 @@
4465
5106
  "multiple": false,
4466
5107
  "type": "option"
4467
5108
  },
4468
- "cred-store": {
4469
- "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5109
+ "cred-store": {
5110
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5111
+ "helpGroup": "GLOBAL",
5112
+ "name": "cred-store",
5113
+ "required": false,
5114
+ "allowNo": false,
5115
+ "type": "boolean"
5116
+ },
5117
+ "log-dir": {
5118
+ "description": "Directory to write log files to. Implies --log-file.",
5119
+ "helpGroup": "GLOBAL",
5120
+ "name": "log-dir",
5121
+ "required": false,
5122
+ "hasDynamicHelp": false,
5123
+ "multiple": false,
5124
+ "type": "option"
5125
+ },
5126
+ "log-file": {
5127
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
4470
5128
  "helpGroup": "GLOBAL",
4471
- "name": "cred-store",
5129
+ "name": "log-file",
4472
5130
  "required": false,
4473
5131
  "allowNo": false,
4474
5132
  "type": "boolean"
@@ -4489,35 +5147,19 @@
4489
5147
  ],
4490
5148
  "type": "option"
4491
5149
  },
4492
- "directory": {
4493
- "char": "d",
4494
- "description": "Directory containing script files to synchronize",
4495
- "name": "directory",
5150
+ "app-id": {
5151
+ "char": "a",
5152
+ "description": "32-char sys_id of application",
5153
+ "name": "app-id",
4496
5154
  "required": true,
4497
5155
  "hasDynamicHelp": false,
4498
5156
  "multiple": false,
4499
5157
  "type": "option"
4500
- },
4501
- "types": {
4502
- "char": "t",
4503
- "description": "Script types to synchronize. Can be specified multiple times to include multiple types.",
4504
- "name": "types",
4505
- "required": false,
4506
- "hasDynamicHelp": false,
4507
- "multiple": true,
4508
- "options": [
4509
- "sys_script_include",
4510
- "sys_script",
4511
- "sys_ui_script",
4512
- "sys_ui_action",
4513
- "sys_script_client"
4514
- ],
4515
- "type": "option"
4516
5158
  }
4517
5159
  },
4518
5160
  "hasDynamicHelp": false,
4519
5161
  "hiddenAliases": [],
4520
- "id": "script-sync:sync",
5162
+ "id": "scope:set",
4521
5163
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4522
5164
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4523
5165
  "pluginType": "core",
@@ -4527,30 +5169,33 @@
4527
5169
  "relativePath": [
4528
5170
  "dist",
4529
5171
  "commands",
4530
- "script-sync",
4531
- "sync.js"
5172
+ "scope",
5173
+ "set.js"
4532
5174
  ]
4533
5175
  },
4534
- "schema:field": {
5176
+ "script-sync:pull": {
4535
5177
  "aliases": [],
4536
5178
  "args": {},
4537
- "description": "Get detailed information about a specific field on a ServiceNow table.\n\nThis command retrieves comprehensive details about a single field, including its type, constraints, choices, and other metadata. Useful for understanding field definitions during development.",
5179
+ "description": "Pull a script from a ServiceNow instance to a local file.\n\nThis command downloads a script record from your ServiceNow instance and saves it as a local file. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Download scripts by name and type\n • Custom output file path support\n • Auto-generated file names based on script name and type\n • JSON output for CI/CD integration",
4538
5180
  "examples": [
4539
5181
  {
4540
- "description": "Explain the state field on incident table",
4541
- "command": "<%= config.bin %> <%= command.id %> --table incident --field state --auth dev"
5182
+ "description": "Pull a Script Include to auto-generated file name",
5183
+ "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --auth dev-instance"
4542
5184
  },
4543
5185
  {
4544
- "description": "Explain the priority field on incident table with JSON output",
4545
- "command": "<%= config.bin %> <%= command.id %> --table incident --field priority --json --auth dev"
5186
+ "description": "Pull a Business Rule to a specific file",
5187
+ "command": "<%= config.bin %> <%= command.id %> --name MyBusinessRule --type sys_script --output ./scripts/my-rule.js --auth dev-instance"
5188
+ },
5189
+ {
5190
+ "description": "Pull a Client Script with JSON output",
5191
+ "command": "<%= config.bin %> <%= command.id %> -n MyClientScript -t sys_script_client --json --auth dev-instance"
4546
5192
  }
4547
5193
  ],
4548
5194
  "flags": {
4549
5195
  "json": {
4550
- "char": "j",
4551
- "description": "Output results as JSON",
5196
+ "description": "Format output as json.",
5197
+ "helpGroup": "GLOBAL",
4552
5198
  "name": "json",
4553
- "required": false,
4554
5199
  "allowNo": false,
4555
5200
  "type": "boolean"
4556
5201
  },
@@ -4571,6 +5216,23 @@
4571
5216
  "allowNo": false,
4572
5217
  "type": "boolean"
4573
5218
  },
5219
+ "log-dir": {
5220
+ "description": "Directory to write log files to. Implies --log-file.",
5221
+ "helpGroup": "GLOBAL",
5222
+ "name": "log-dir",
5223
+ "required": false,
5224
+ "hasDynamicHelp": false,
5225
+ "multiple": false,
5226
+ "type": "option"
5227
+ },
5228
+ "log-file": {
5229
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5230
+ "helpGroup": "GLOBAL",
5231
+ "name": "log-file",
5232
+ "required": false,
5233
+ "allowNo": false,
5234
+ "type": "boolean"
5235
+ },
4574
5236
  "log-level": {
4575
5237
  "helpGroup": "GLOBAL",
4576
5238
  "name": "log-level",
@@ -4587,28 +5249,44 @@
4587
5249
  ],
4588
5250
  "type": "option"
4589
5251
  },
4590
- "table": {
4591
- "char": "t",
4592
- "description": "ServiceNow table name",
4593
- "name": "table",
5252
+ "name": {
5253
+ "char": "n",
5254
+ "description": "Name of the script to pull",
5255
+ "name": "name",
4594
5256
  "required": true,
4595
5257
  "hasDynamicHelp": false,
4596
5258
  "multiple": false,
4597
5259
  "type": "option"
4598
5260
  },
4599
- "field": {
4600
- "char": "f",
4601
- "description": "Field name to explain",
4602
- "name": "field",
5261
+ "type": {
5262
+ "char": "t",
5263
+ "description": "Type of script to pull",
5264
+ "name": "type",
4603
5265
  "required": true,
4604
5266
  "hasDynamicHelp": false,
4605
5267
  "multiple": false,
5268
+ "options": [
5269
+ "sys_script_include",
5270
+ "sys_script",
5271
+ "sys_ui_script",
5272
+ "sys_ui_action",
5273
+ "sys_script_client"
5274
+ ],
5275
+ "type": "option"
5276
+ },
5277
+ "output": {
5278
+ "char": "o",
5279
+ "description": "Output file path. If not specified, a file name is auto-generated.",
5280
+ "name": "output",
5281
+ "required": false,
5282
+ "hasDynamicHelp": false,
5283
+ "multiple": false,
4606
5284
  "type": "option"
4607
5285
  }
4608
5286
  },
4609
5287
  "hasDynamicHelp": false,
4610
5288
  "hiddenAliases": [],
4611
- "id": "schema:field",
5289
+ "id": "script-sync:pull",
4612
5290
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4613
5291
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4614
5292
  "pluginType": "core",
@@ -4618,30 +5296,33 @@
4618
5296
  "relativePath": [
4619
5297
  "dist",
4620
5298
  "commands",
4621
- "schema",
4622
- "field.js"
5299
+ "script-sync",
5300
+ "pull.js"
4623
5301
  ]
4624
5302
  },
4625
- "schema": {
5303
+ "script-sync:push": {
4626
5304
  "aliases": [],
4627
5305
  "args": {},
4628
- "description": "Discover and inspect a ServiceNow table schema including fields, types, and relationships.\n\nThis command retrieves the full schema definition for a ServiceNow table, including all fields, their types, constraints, and optionally choices, relationships, UI policies, and business rules.\n\nFeatures:\n • List all fields with types, lengths, and constraints\n • Optionally include field choices\n • Optionally include table relationships\n • Optionally include UI policies\n • Optionally include business rules\n • JSON output for CI/CD integration",
5306
+ "description": "Push a local script file to a ServiceNow instance.\n\nThis command uploads a local script file to your ServiceNow instance, updating the corresponding script record. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Upload scripts by name and type\n • Specify the local file to push\n • JSON output for CI/CD integration\n • Detailed push result reporting",
4629
5307
  "examples": [
4630
5308
  {
4631
- "description": "Discover incident table schema",
4632
- "command": "<%= config.bin %> <%= command.id %> --table incident --auth dev"
5309
+ "description": "Push a Script Include from a local file",
5310
+ "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --file ./scripts/MyScriptInclude.js --auth dev-instance"
4633
5311
  },
4634
5312
  {
4635
- "description": "Include choices and relationships",
4636
- "command": "<%= config.bin %> <%= command.id %> --table incident --include-choices --include-relationships --auth dev"
5313
+ "description": "Push a Business Rule with short flags",
5314
+ "command": "<%= config.bin %> <%= command.id %> -n MyBusinessRule -t sys_script -f ./scripts/my-rule.js -a dev-instance"
5315
+ },
5316
+ {
5317
+ "description": "Push a UI Script with JSON output",
5318
+ "command": "<%= config.bin %> <%= command.id %> -n MyUIScript -t sys_ui_script -f ./scripts/ui-script.js --json --auth dev-instance"
4637
5319
  }
4638
5320
  ],
4639
5321
  "flags": {
4640
5322
  "json": {
4641
- "char": "j",
4642
- "description": "Output results as JSON",
5323
+ "description": "Format output as json.",
5324
+ "helpGroup": "GLOBAL",
4643
5325
  "name": "json",
4644
- "required": false,
4645
5326
  "allowNo": false,
4646
5327
  "type": "boolean"
4647
5328
  },
@@ -4662,6 +5343,23 @@
4662
5343
  "allowNo": false,
4663
5344
  "type": "boolean"
4664
5345
  },
5346
+ "log-dir": {
5347
+ "description": "Directory to write log files to. Implies --log-file.",
5348
+ "helpGroup": "GLOBAL",
5349
+ "name": "log-dir",
5350
+ "required": false,
5351
+ "hasDynamicHelp": false,
5352
+ "multiple": false,
5353
+ "type": "option"
5354
+ },
5355
+ "log-file": {
5356
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5357
+ "helpGroup": "GLOBAL",
5358
+ "name": "log-file",
5359
+ "required": false,
5360
+ "allowNo": false,
5361
+ "type": "boolean"
5362
+ },
4665
5363
  "log-level": {
4666
5364
  "helpGroup": "GLOBAL",
4667
5365
  "name": "log-level",
@@ -4678,47 +5376,44 @@
4678
5376
  ],
4679
5377
  "type": "option"
4680
5378
  },
4681
- "table": {
4682
- "char": "t",
4683
- "description": "ServiceNow table name to discover schema for",
4684
- "name": "table",
5379
+ "name": {
5380
+ "char": "n",
5381
+ "description": "Name of the script to push",
5382
+ "name": "name",
4685
5383
  "required": true,
4686
5384
  "hasDynamicHelp": false,
4687
5385
  "multiple": false,
4688
5386
  "type": "option"
4689
5387
  },
4690
- "include-choices": {
4691
- "description": "Include field choices in the schema output",
4692
- "name": "include-choices",
4693
- "required": false,
4694
- "allowNo": false,
4695
- "type": "boolean"
4696
- },
4697
- "include-relationships": {
4698
- "description": "Include table relationships in the schema output",
4699
- "name": "include-relationships",
4700
- "required": false,
4701
- "allowNo": false,
4702
- "type": "boolean"
4703
- },
4704
- "include-ui-policies": {
4705
- "description": "Include UI policies in the schema output",
4706
- "name": "include-ui-policies",
4707
- "required": false,
4708
- "allowNo": false,
4709
- "type": "boolean"
5388
+ "type": {
5389
+ "char": "t",
5390
+ "description": "Type of script to push",
5391
+ "name": "type",
5392
+ "required": true,
5393
+ "hasDynamicHelp": false,
5394
+ "multiple": false,
5395
+ "options": [
5396
+ "sys_script_include",
5397
+ "sys_script",
5398
+ "sys_ui_script",
5399
+ "sys_ui_action",
5400
+ "sys_script_client"
5401
+ ],
5402
+ "type": "option"
4710
5403
  },
4711
- "include-business-rules": {
4712
- "description": "Include business rules in the schema output",
4713
- "name": "include-business-rules",
4714
- "required": false,
4715
- "allowNo": false,
4716
- "type": "boolean"
5404
+ "file": {
5405
+ "char": "f",
5406
+ "description": "Path to the local script file to push",
5407
+ "name": "file",
5408
+ "required": true,
5409
+ "hasDynamicHelp": false,
5410
+ "multiple": false,
5411
+ "type": "option"
4717
5412
  }
4718
5413
  },
4719
5414
  "hasDynamicHelp": false,
4720
5415
  "hiddenAliases": [],
4721
- "id": "schema",
5416
+ "id": "script-sync:push",
4722
5417
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4723
5418
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4724
5419
  "pluginType": "core",
@@ -4728,30 +5423,33 @@
4728
5423
  "relativePath": [
4729
5424
  "dist",
4730
5425
  "commands",
4731
- "schema",
4732
- "index.js"
5426
+ "script-sync",
5427
+ "push.js"
4733
5428
  ]
4734
5429
  },
4735
- "schema:validate-catalog": {
5430
+ "script-sync:sync": {
4736
5431
  "aliases": [],
4737
5432
  "args": {},
4738
- "description": "Validate a ServiceNow catalog item configuration for common issues.\n\nThis command checks a catalog item configuration and reports any validation issues, warnings, or errors found. Useful for ensuring catalog items are properly configured before deployment.",
5433
+ "description": "Synchronize all scripts in a directory with a ServiceNow instance.\n\nThis command scans a local directory for script files and synchronizes them with the corresponding records on your ServiceNow instance. You can optionally filter by script types to synchronize only specific kinds of scripts.\n\nFeatures:\n • Batch synchronization of all scripts in a directory\n • Filter by one or more script types\n • Summary report with success/failure counts\n • JSON output for CI/CD integration",
4739
5434
  "examples": [
4740
5435
  {
4741
- "description": "Validate a catalog item by sys_id",
4742
- "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --auth dev"
5436
+ "description": "Sync all scripts in a directory",
5437
+ "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --auth dev-instance"
4743
5438
  },
4744
5439
  {
4745
- "description": "Validate a catalog item with JSON output",
4746
- "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --json --auth dev"
5440
+ "description": "Sync only Script Includes and Business Rules",
5441
+ "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --types sys_script_include --types sys_script --auth dev-instance"
5442
+ },
5443
+ {
5444
+ "description": "Sync with JSON output for CI/CD",
5445
+ "command": "<%= config.bin %> <%= command.id %> -d ./scripts --json --auth dev-instance"
4747
5446
  }
4748
5447
  ],
4749
5448
  "flags": {
4750
5449
  "json": {
4751
- "char": "j",
4752
- "description": "Output results as JSON",
5450
+ "description": "Format output as json.",
5451
+ "helpGroup": "GLOBAL",
4753
5452
  "name": "json",
4754
- "required": false,
4755
5453
  "allowNo": false,
4756
5454
  "type": "boolean"
4757
5455
  },
@@ -4772,6 +5470,23 @@
4772
5470
  "allowNo": false,
4773
5471
  "type": "boolean"
4774
5472
  },
5473
+ "log-dir": {
5474
+ "description": "Directory to write log files to. Implies --log-file.",
5475
+ "helpGroup": "GLOBAL",
5476
+ "name": "log-dir",
5477
+ "required": false,
5478
+ "hasDynamicHelp": false,
5479
+ "multiple": false,
5480
+ "type": "option"
5481
+ },
5482
+ "log-file": {
5483
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5484
+ "helpGroup": "GLOBAL",
5485
+ "name": "log-file",
5486
+ "required": false,
5487
+ "allowNo": false,
5488
+ "type": "boolean"
5489
+ },
4775
5490
  "log-level": {
4776
5491
  "helpGroup": "GLOBAL",
4777
5492
  "name": "log-level",
@@ -4788,19 +5503,35 @@
4788
5503
  ],
4789
5504
  "type": "option"
4790
5505
  },
4791
- "sys-id": {
4792
- "char": "s",
4793
- "description": "Catalog item sys_id to validate",
4794
- "name": "sys-id",
5506
+ "directory": {
5507
+ "char": "d",
5508
+ "description": "Directory containing script files to synchronize",
5509
+ "name": "directory",
4795
5510
  "required": true,
4796
5511
  "hasDynamicHelp": false,
4797
5512
  "multiple": false,
4798
5513
  "type": "option"
5514
+ },
5515
+ "types": {
5516
+ "char": "t",
5517
+ "description": "Script types to synchronize. Can be specified multiple times to include multiple types.",
5518
+ "name": "types",
5519
+ "required": false,
5520
+ "hasDynamicHelp": false,
5521
+ "multiple": true,
5522
+ "options": [
5523
+ "sys_script_include",
5524
+ "sys_script",
5525
+ "sys_ui_script",
5526
+ "sys_ui_action",
5527
+ "sys_script_client"
5528
+ ],
5529
+ "type": "option"
4799
5530
  }
4800
5531
  },
4801
5532
  "hasDynamicHelp": false,
4802
5533
  "hiddenAliases": [],
4803
- "id": "schema:validate-catalog",
5534
+ "id": "script-sync:sync",
4804
5535
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4805
5536
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4806
5537
  "pluginType": "core",
@@ -4810,8 +5541,8 @@
4810
5541
  "relativePath": [
4811
5542
  "dist",
4812
5543
  "commands",
4813
- "schema",
4814
- "validate-catalog.js"
5544
+ "script-sync",
5545
+ "sync.js"
4815
5546
  ]
4816
5547
  },
4817
5548
  "search:add-table": {
@@ -4857,6 +5588,23 @@
4857
5588
  "allowNo": false,
4858
5589
  "type": "boolean"
4859
5590
  },
5591
+ "log-dir": {
5592
+ "description": "Directory to write log files to. Implies --log-file.",
5593
+ "helpGroup": "GLOBAL",
5594
+ "name": "log-dir",
5595
+ "required": false,
5596
+ "hasDynamicHelp": false,
5597
+ "multiple": false,
5598
+ "type": "option"
5599
+ },
5600
+ "log-file": {
5601
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5602
+ "helpGroup": "GLOBAL",
5603
+ "name": "log-file",
5604
+ "required": false,
5605
+ "allowNo": false,
5606
+ "type": "boolean"
5607
+ },
4860
5608
  "log-level": {
4861
5609
  "helpGroup": "GLOBAL",
4862
5610
  "name": "log-level",
@@ -4956,6 +5704,23 @@
4956
5704
  "allowNo": false,
4957
5705
  "type": "boolean"
4958
5706
  },
5707
+ "log-dir": {
5708
+ "description": "Directory to write log files to. Implies --log-file.",
5709
+ "helpGroup": "GLOBAL",
5710
+ "name": "log-dir",
5711
+ "required": false,
5712
+ "hasDynamicHelp": false,
5713
+ "multiple": false,
5714
+ "type": "option"
5715
+ },
5716
+ "log-file": {
5717
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5718
+ "helpGroup": "GLOBAL",
5719
+ "name": "log-file",
5720
+ "required": false,
5721
+ "allowNo": false,
5722
+ "type": "boolean"
5723
+ },
4959
5724
  "log-level": {
4960
5725
  "helpGroup": "GLOBAL",
4961
5726
  "name": "log-level",
@@ -5036,6 +5801,23 @@
5036
5801
  "allowNo": false,
5037
5802
  "type": "boolean"
5038
5803
  },
5804
+ "log-dir": {
5805
+ "description": "Directory to write log files to. Implies --log-file.",
5806
+ "helpGroup": "GLOBAL",
5807
+ "name": "log-dir",
5808
+ "required": false,
5809
+ "hasDynamicHelp": false,
5810
+ "multiple": false,
5811
+ "type": "option"
5812
+ },
5813
+ "log-file": {
5814
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5815
+ "helpGroup": "GLOBAL",
5816
+ "name": "log-file",
5817
+ "required": false,
5818
+ "allowNo": false,
5819
+ "type": "boolean"
5820
+ },
5039
5821
  "log-level": {
5040
5822
  "helpGroup": "GLOBAL",
5041
5823
  "name": "log-level",
@@ -5152,6 +5934,23 @@
5152
5934
  "allowNo": false,
5153
5935
  "type": "boolean"
5154
5936
  },
5937
+ "log-dir": {
5938
+ "description": "Directory to write log files to. Implies --log-file.",
5939
+ "helpGroup": "GLOBAL",
5940
+ "name": "log-dir",
5941
+ "required": false,
5942
+ "hasDynamicHelp": false,
5943
+ "multiple": false,
5944
+ "type": "option"
5945
+ },
5946
+ "log-file": {
5947
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
5948
+ "helpGroup": "GLOBAL",
5949
+ "name": "log-file",
5950
+ "required": false,
5951
+ "allowNo": false,
5952
+ "type": "boolean"
5953
+ },
5155
5954
  "log-level": {
5156
5955
  "helpGroup": "GLOBAL",
5157
5956
  "name": "log-level",
@@ -5237,6 +6036,23 @@
5237
6036
  "allowNo": false,
5238
6037
  "type": "boolean"
5239
6038
  },
6039
+ "log-dir": {
6040
+ "description": "Directory to write log files to. Implies --log-file.",
6041
+ "helpGroup": "GLOBAL",
6042
+ "name": "log-dir",
6043
+ "required": false,
6044
+ "hasDynamicHelp": false,
6045
+ "multiple": false,
6046
+ "type": "option"
6047
+ },
6048
+ "log-file": {
6049
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6050
+ "helpGroup": "GLOBAL",
6051
+ "name": "log-file",
6052
+ "required": false,
6053
+ "allowNo": false,
6054
+ "type": "boolean"
6055
+ },
5240
6056
  "log-level": {
5241
6057
  "helpGroup": "GLOBAL",
5242
6058
  "name": "log-level",
@@ -5363,6 +6179,23 @@
5363
6179
  "allowNo": false,
5364
6180
  "type": "boolean"
5365
6181
  },
6182
+ "log-dir": {
6183
+ "description": "Directory to write log files to. Implies --log-file.",
6184
+ "helpGroup": "GLOBAL",
6185
+ "name": "log-dir",
6186
+ "required": false,
6187
+ "hasDynamicHelp": false,
6188
+ "multiple": false,
6189
+ "type": "option"
6190
+ },
6191
+ "log-file": {
6192
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6193
+ "helpGroup": "GLOBAL",
6194
+ "name": "log-file",
6195
+ "required": false,
6196
+ "allowNo": false,
6197
+ "type": "boolean"
6198
+ },
5366
6199
  "log-level": {
5367
6200
  "helpGroup": "GLOBAL",
5368
6201
  "name": "log-level",
@@ -5471,6 +6304,23 @@
5471
6304
  "allowNo": false,
5472
6305
  "type": "boolean"
5473
6306
  },
6307
+ "log-dir": {
6308
+ "description": "Directory to write log files to. Implies --log-file.",
6309
+ "helpGroup": "GLOBAL",
6310
+ "name": "log-dir",
6311
+ "required": false,
6312
+ "hasDynamicHelp": false,
6313
+ "multiple": false,
6314
+ "type": "option"
6315
+ },
6316
+ "log-file": {
6317
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6318
+ "helpGroup": "GLOBAL",
6319
+ "name": "log-file",
6320
+ "required": false,
6321
+ "allowNo": false,
6322
+ "type": "boolean"
6323
+ },
5474
6324
  "log-level": {
5475
6325
  "helpGroup": "GLOBAL",
5476
6326
  "name": "log-level",
@@ -5582,6 +6432,23 @@
5582
6432
  "allowNo": false,
5583
6433
  "type": "boolean"
5584
6434
  },
6435
+ "log-dir": {
6436
+ "description": "Directory to write log files to. Implies --log-file.",
6437
+ "helpGroup": "GLOBAL",
6438
+ "name": "log-dir",
6439
+ "required": false,
6440
+ "hasDynamicHelp": false,
6441
+ "multiple": false,
6442
+ "type": "option"
6443
+ },
6444
+ "log-file": {
6445
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6446
+ "helpGroup": "GLOBAL",
6447
+ "name": "log-file",
6448
+ "required": false,
6449
+ "allowNo": false,
6450
+ "type": "boolean"
6451
+ },
5585
6452
  "log-level": {
5586
6453
  "helpGroup": "GLOBAL",
5587
6454
  "name": "log-level",
@@ -5624,18 +6491,18 @@
5624
6491
  "validate.js"
5625
6492
  ]
5626
6493
  },
5627
- "update-set:clone": {
6494
+ "task:approve": {
5628
6495
  "aliases": [],
5629
6496
  "args": {},
5630
- "description": "Clone an update set and its records.",
6497
+ "description": "Approve a ServiceNow change request.\n\nThis command approves a change request identified by its number. You can optionally provide approval comments.\n\nFeatures:\n - Approve change requests\n - Optionally add approval comments\n - Auto-resolves change request number to sys_id",
5631
6498
  "examples": [
5632
6499
  {
5633
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
5634
- "description": "Clone an update set"
6500
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
6501
+ "description": "Approve a change request"
5635
6502
  },
5636
6503
  {
5637
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
5638
- "description": "Clone with JSON output"
6504
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
6505
+ "description": "Approve a change request with comments"
5639
6506
  }
5640
6507
  ],
5641
6508
  "flags": {
@@ -5663,6 +6530,23 @@
5663
6530
  "allowNo": false,
5664
6531
  "type": "boolean"
5665
6532
  },
6533
+ "log-dir": {
6534
+ "description": "Directory to write log files to. Implies --log-file.",
6535
+ "helpGroup": "GLOBAL",
6536
+ "name": "log-dir",
6537
+ "required": false,
6538
+ "hasDynamicHelp": false,
6539
+ "multiple": false,
6540
+ "type": "option"
6541
+ },
6542
+ "log-file": {
6543
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6544
+ "helpGroup": "GLOBAL",
6545
+ "name": "log-file",
6546
+ "required": false,
6547
+ "allowNo": false,
6548
+ "type": "boolean"
6549
+ },
5666
6550
  "log-level": {
5667
6551
  "helpGroup": "GLOBAL",
5668
6552
  "name": "log-level",
@@ -5679,19 +6563,19 @@
5679
6563
  ],
5680
6564
  "type": "option"
5681
6565
  },
5682
- "name": {
5683
- "char": "n",
5684
- "description": "Name for the cloned update set",
5685
- "name": "name",
5686
- "required": true,
6566
+ "comments": {
6567
+ "char": "c",
6568
+ "description": "Approval comments",
6569
+ "name": "comments",
6570
+ "required": false,
5687
6571
  "hasDynamicHelp": false,
5688
6572
  "multiple": false,
5689
6573
  "type": "option"
5690
6574
  },
5691
- "source": {
5692
- "char": "s",
5693
- "description": "Source update set sys_id",
5694
- "name": "source",
6575
+ "number": {
6576
+ "char": "n",
6577
+ "description": "Change request number (e.g., CHG0010001)",
6578
+ "name": "number",
5695
6579
  "required": true,
5696
6580
  "hasDynamicHelp": false,
5697
6581
  "multiple": false,
@@ -5700,7 +6584,7 @@
5700
6584
  },
5701
6585
  "hasDynamicHelp": false,
5702
6586
  "hiddenAliases": [],
5703
- "id": "update-set:clone",
6587
+ "id": "task:approve",
5704
6588
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5705
6589
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5706
6590
  "pluginType": "core",
@@ -5710,26 +6594,26 @@
5710
6594
  "relativePath": [
5711
6595
  "dist",
5712
6596
  "commands",
5713
- "update-set",
5714
- "clone.js"
6597
+ "task",
6598
+ "approve.js"
5715
6599
  ]
5716
6600
  },
5717
- "update-set:create": {
6601
+ "task:assign": {
5718
6602
  "aliases": [],
5719
6603
  "args": {},
5720
- "description": "Create a new update set.",
6604
+ "description": "Assign a ServiceNow task to a user or group.\n\nThis command assigns a task record identified by its number to a specified user and/or group. You can assign to a user, a group, or both simultaneously.\n\nFeatures:\n - Assign tasks to individual users\n - Assign tasks to assignment groups\n - Assign to both user and group at once\n - Supports any task-based table\n - Auto-resolves task number to sys_id",
5721
6605
  "examples": [
5722
6606
  {
5723
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
5724
- "description": "Create a new update set with a name"
6607
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
6608
+ "description": "Assign an incident to a user"
5725
6609
  },
5726
6610
  {
5727
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
5728
- "description": "Create with name and description"
6611
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
6612
+ "description": "Assign an incident to a user and group"
5729
6613
  },
5730
6614
  {
5731
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
5732
- "description": "Create within a specific application scope"
6615
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
6616
+ "description": "Assign a change request to a user"
5733
6617
  }
5734
6618
  ],
5735
6619
  "flags": {
@@ -5757,6 +6641,23 @@
5757
6641
  "allowNo": false,
5758
6642
  "type": "boolean"
5759
6643
  },
6644
+ "log-dir": {
6645
+ "description": "Directory to write log files to. Implies --log-file.",
6646
+ "helpGroup": "GLOBAL",
6647
+ "name": "log-dir",
6648
+ "required": false,
6649
+ "hasDynamicHelp": false,
6650
+ "multiple": false,
6651
+ "type": "option"
6652
+ },
6653
+ "log-file": {
6654
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6655
+ "helpGroup": "GLOBAL",
6656
+ "name": "log-file",
6657
+ "required": false,
6658
+ "allowNo": false,
6659
+ "type": "boolean"
6660
+ },
5760
6661
  "log-level": {
5761
6662
  "helpGroup": "GLOBAL",
5762
6663
  "name": "log-level",
@@ -5773,27 +6674,37 @@
5773
6674
  ],
5774
6675
  "type": "option"
5775
6676
  },
5776
- "application": {
5777
- "description": "Application scope for the new update set",
5778
- "name": "application",
6677
+ "group": {
6678
+ "char": "g",
6679
+ "description": "Assignment group",
6680
+ "name": "group",
5779
6681
  "required": false,
5780
6682
  "hasDynamicHelp": false,
5781
6683
  "multiple": false,
5782
6684
  "type": "option"
5783
6685
  },
5784
- "description": {
5785
- "char": "d",
5786
- "description": "Description for the new update set",
5787
- "name": "description",
6686
+ "number": {
6687
+ "char": "n",
6688
+ "description": "Task number (e.g., INC0010001)",
6689
+ "name": "number",
6690
+ "required": true,
6691
+ "hasDynamicHelp": false,
6692
+ "multiple": false,
6693
+ "type": "option"
6694
+ },
6695
+ "table": {
6696
+ "description": "ServiceNow table name",
6697
+ "name": "table",
5788
6698
  "required": false,
6699
+ "default": "task",
5789
6700
  "hasDynamicHelp": false,
5790
6701
  "multiple": false,
5791
6702
  "type": "option"
5792
6703
  },
5793
- "name": {
5794
- "char": "n",
5795
- "description": "Name for the new update set",
5796
- "name": "name",
6704
+ "user": {
6705
+ "char": "u",
6706
+ "description": "User to assign the task to",
6707
+ "name": "user",
5797
6708
  "required": true,
5798
6709
  "hasDynamicHelp": false,
5799
6710
  "multiple": false,
@@ -5802,7 +6713,7 @@
5802
6713
  },
5803
6714
  "hasDynamicHelp": false,
5804
6715
  "hiddenAliases": [],
5805
- "id": "update-set:create",
6716
+ "id": "task:assign",
5806
6717
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5807
6718
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5808
6719
  "pluginType": "core",
@@ -5812,26 +6723,22 @@
5812
6723
  "relativePath": [
5813
6724
  "dist",
5814
6725
  "commands",
5815
- "update-set",
5816
- "create.js"
6726
+ "task",
6727
+ "assign.js"
5817
6728
  ]
5818
6729
  },
5819
- "update-set:current": {
6730
+ "task:close": {
5820
6731
  "aliases": [],
5821
6732
  "args": {},
5822
- "description": "Get or set the current update set.",
6733
+ "description": "Close a ServiceNow incident.\n\nThis command closes an incident identified by its number, setting the close notes and optionally a close code. The incident must be in a state that allows closure.\n\nFeatures:\n - Close incidents with close notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
5823
6734
  "examples": [
5824
6735
  {
5825
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5826
- "description": "Get the current update set"
5827
- },
5828
- {
5829
- "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
5830
- "description": "Set the current update set by sys_id"
6736
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
6737
+ "description": "Close an incident with close notes"
5831
6738
  },
5832
6739
  {
5833
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5834
- "description": "Get the current update set as JSON"
6740
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
6741
+ "description": "Close with a specific close code"
5835
6742
  }
5836
6743
  ],
5837
6744
  "flags": {
@@ -5859,6 +6766,23 @@
5859
6766
  "allowNo": false,
5860
6767
  "type": "boolean"
5861
6768
  },
6769
+ "log-dir": {
6770
+ "description": "Directory to write log files to. Implies --log-file.",
6771
+ "helpGroup": "GLOBAL",
6772
+ "name": "log-dir",
6773
+ "required": false,
6774
+ "hasDynamicHelp": false,
6775
+ "multiple": false,
6776
+ "type": "option"
6777
+ },
6778
+ "log-file": {
6779
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6780
+ "helpGroup": "GLOBAL",
6781
+ "name": "log-file",
6782
+ "required": false,
6783
+ "allowNo": false,
6784
+ "type": "boolean"
6785
+ },
5862
6786
  "log-level": {
5863
6787
  "helpGroup": "GLOBAL",
5864
6788
  "name": "log-level",
@@ -5866,20 +6790,36 @@
5866
6790
  "default": "info",
5867
6791
  "hasDynamicHelp": false,
5868
6792
  "multiple": false,
5869
- "options": [
5870
- "debug",
5871
- "warn",
5872
- "error",
5873
- "info",
5874
- "trace"
5875
- ],
6793
+ "options": [
6794
+ "debug",
6795
+ "warn",
6796
+ "error",
6797
+ "info",
6798
+ "trace"
6799
+ ],
6800
+ "type": "option"
6801
+ },
6802
+ "close-code": {
6803
+ "description": "Close code for the closure",
6804
+ "name": "close-code",
6805
+ "required": false,
6806
+ "hasDynamicHelp": false,
6807
+ "multiple": false,
6808
+ "type": "option"
6809
+ },
6810
+ "notes": {
6811
+ "description": "Close notes",
6812
+ "name": "notes",
6813
+ "required": true,
6814
+ "hasDynamicHelp": false,
6815
+ "multiple": false,
5876
6816
  "type": "option"
5877
6817
  },
5878
- "set": {
5879
- "char": "s",
5880
- "description": "sys_id of update set to make current",
5881
- "name": "set",
5882
- "required": false,
6818
+ "number": {
6819
+ "char": "n",
6820
+ "description": "Incident number (e.g., INC0010001)",
6821
+ "name": "number",
6822
+ "required": true,
5883
6823
  "hasDynamicHelp": false,
5884
6824
  "multiple": false,
5885
6825
  "type": "option"
@@ -5887,7 +6827,7 @@
5887
6827
  },
5888
6828
  "hasDynamicHelp": false,
5889
6829
  "hiddenAliases": [],
5890
- "id": "update-set:current",
6830
+ "id": "task:close",
5891
6831
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5892
6832
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5893
6833
  "pluginType": "core",
@@ -5897,26 +6837,26 @@
5897
6837
  "relativePath": [
5898
6838
  "dist",
5899
6839
  "commands",
5900
- "update-set",
5901
- "current.js"
6840
+ "task",
6841
+ "close.js"
5902
6842
  ]
5903
6843
  },
5904
- "update-set": {
6844
+ "task:comment": {
5905
6845
  "aliases": [],
5906
6846
  "args": {},
5907
- "description": "List update sets on a ServiceNow instance.",
6847
+ "description": "Add a comment or work note to a ServiceNow task.\n\nThis command adds a comment or work note to a task record identified by its number. By default, comments are added as customer-visible comments. Use the --work-note flag to add an internal work note instead.\n\nFeatures:\n - Add customer-visible comments to any task\n - Add internal work notes visible only to fulfiller teams\n - Supports any task-based table (incident, change_request, etc.)\n - Auto-resolves task number to sys_id",
5908
6848
  "examples": [
5909
6849
  {
5910
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5911
- "description": "List update sets with default limit"
6850
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
6851
+ "description": "Add a comment to an incident"
5912
6852
  },
5913
6853
  {
5914
- "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
5915
- "description": "List update sets with a custom query filter"
6854
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
6855
+ "description": "Add a work note to an incident"
5916
6856
  },
5917
6857
  {
5918
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5919
- "description": "List update sets with JSON output"
6858
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
6859
+ "description": "Add a comment to a change request"
5920
6860
  }
5921
6861
  ],
5922
6862
  "flags": {
@@ -5944,6 +6884,23 @@
5944
6884
  "allowNo": false,
5945
6885
  "type": "boolean"
5946
6886
  },
6887
+ "log-dir": {
6888
+ "description": "Directory to write log files to. Implies --log-file.",
6889
+ "helpGroup": "GLOBAL",
6890
+ "name": "log-dir",
6891
+ "required": false,
6892
+ "hasDynamicHelp": false,
6893
+ "multiple": false,
6894
+ "type": "option"
6895
+ },
6896
+ "log-file": {
6897
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
6898
+ "helpGroup": "GLOBAL",
6899
+ "name": "log-file",
6900
+ "required": false,
6901
+ "allowNo": false,
6902
+ "type": "boolean"
6903
+ },
5947
6904
  "log-level": {
5948
6905
  "helpGroup": "GLOBAL",
5949
6906
  "name": "log-level",
@@ -5960,28 +6917,44 @@
5960
6917
  ],
5961
6918
  "type": "option"
5962
6919
  },
5963
- "limit": {
5964
- "description": "Maximum number of update sets to return",
5965
- "name": "limit",
5966
- "required": false,
5967
- "default": 20,
6920
+ "comment": {
6921
+ "char": "c",
6922
+ "description": "Comment text to add",
6923
+ "name": "comment",
6924
+ "required": true,
5968
6925
  "hasDynamicHelp": false,
5969
6926
  "multiple": false,
5970
6927
  "type": "option"
5971
6928
  },
5972
- "query": {
5973
- "char": "q",
5974
- "description": "Encoded query filter",
5975
- "name": "query",
6929
+ "number": {
6930
+ "char": "n",
6931
+ "description": "Task number (e.g., INC0010001)",
6932
+ "name": "number",
6933
+ "required": true,
6934
+ "hasDynamicHelp": false,
6935
+ "multiple": false,
6936
+ "type": "option"
6937
+ },
6938
+ "table": {
6939
+ "description": "ServiceNow table name",
6940
+ "name": "table",
5976
6941
  "required": false,
6942
+ "default": "task",
5977
6943
  "hasDynamicHelp": false,
5978
6944
  "multiple": false,
5979
6945
  "type": "option"
6946
+ },
6947
+ "work-note": {
6948
+ "description": "Add as work note instead of comment",
6949
+ "name": "work-note",
6950
+ "required": false,
6951
+ "allowNo": false,
6952
+ "type": "boolean"
5980
6953
  }
5981
6954
  },
5982
6955
  "hasDynamicHelp": false,
5983
6956
  "hiddenAliases": [],
5984
- "id": "update-set",
6957
+ "id": "task:comment",
5985
6958
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5986
6959
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5987
6960
  "pluginType": "core",
@@ -5991,22 +6964,26 @@
5991
6964
  "relativePath": [
5992
6965
  "dist",
5993
6966
  "commands",
5994
- "update-set",
5995
- "index.js"
6967
+ "task",
6968
+ "comment.js"
5996
6969
  ]
5997
6970
  },
5998
- "update-set:inspect": {
6971
+ "task:find": {
5999
6972
  "aliases": [],
6000
6973
  "args": {},
6001
- "description": "Inspect the components of an update set.",
6974
+ "description": "Find a ServiceNow task by its number.\n\nThis command looks up a task record by its number in the specified table. Returns the full task details including sys_id, description, state, and assignment information.\n\nFeatures:\n - Look up any task by number\n - Supports any task-based table\n - JSON output for scripting and automation",
6002
6975
  "examples": [
6003
6976
  {
6004
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
6005
- "description": "Inspect an update set by sys_id"
6977
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
6978
+ "description": "Find an incident by number"
6006
6979
  },
6007
6980
  {
6008
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
6009
- "description": "Inspect with JSON output"
6981
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
6982
+ "description": "Find a change request by number"
6983
+ },
6984
+ {
6985
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
6986
+ "description": "Find an incident and output as JSON"
6010
6987
  }
6011
6988
  ],
6012
6989
  "flags": {
@@ -6034,6 +7011,23 @@
6034
7011
  "allowNo": false,
6035
7012
  "type": "boolean"
6036
7013
  },
7014
+ "log-dir": {
7015
+ "description": "Directory to write log files to. Implies --log-file.",
7016
+ "helpGroup": "GLOBAL",
7017
+ "name": "log-dir",
7018
+ "required": false,
7019
+ "hasDynamicHelp": false,
7020
+ "multiple": false,
7021
+ "type": "option"
7022
+ },
7023
+ "log-file": {
7024
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7025
+ "helpGroup": "GLOBAL",
7026
+ "name": "log-file",
7027
+ "required": false,
7028
+ "allowNo": false,
7029
+ "type": "boolean"
7030
+ },
6037
7031
  "log-level": {
6038
7032
  "helpGroup": "GLOBAL",
6039
7033
  "name": "log-level",
@@ -6050,19 +7044,28 @@
6050
7044
  ],
6051
7045
  "type": "option"
6052
7046
  },
6053
- "sys-id": {
6054
- "char": "s",
6055
- "description": "sys_id of the update set to inspect",
6056
- "name": "sys-id",
7047
+ "number": {
7048
+ "char": "n",
7049
+ "description": "Task number (e.g., INC0010001, CHG0010001)",
7050
+ "name": "number",
6057
7051
  "required": true,
6058
7052
  "hasDynamicHelp": false,
6059
7053
  "multiple": false,
6060
7054
  "type": "option"
7055
+ },
7056
+ "table": {
7057
+ "description": "ServiceNow table name",
7058
+ "name": "table",
7059
+ "required": false,
7060
+ "default": "task",
7061
+ "hasDynamicHelp": false,
7062
+ "multiple": false,
7063
+ "type": "option"
6061
7064
  }
6062
7065
  },
6063
7066
  "hasDynamicHelp": false,
6064
7067
  "hiddenAliases": [],
6065
- "id": "update-set:inspect",
7068
+ "id": "task:find",
6066
7069
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6067
7070
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6068
7071
  "pluginType": "core",
@@ -6072,26 +7075,22 @@
6072
7075
  "relativePath": [
6073
7076
  "dist",
6074
7077
  "commands",
6075
- "update-set",
6076
- "inspect.js"
7078
+ "task",
7079
+ "find.js"
6077
7080
  ]
6078
7081
  },
6079
- "update-set:move": {
7082
+ "task:resolve": {
6080
7083
  "aliases": [],
6081
7084
  "args": {},
6082
- "description": "Move records between update sets.",
7085
+ "description": "Resolve a ServiceNow incident with resolution notes.\n\nThis command resolves an incident identified by its number, setting the resolution notes and optionally a close code. The incident must be in a state that allows resolution.\n\nFeatures:\n - Resolve incidents with resolution notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
6083
7086
  "examples": [
6084
7087
  {
6085
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
6086
- "description": "Move all records from one update set to another"
6087
- },
6088
- {
6089
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
6090
- "description": "Move specific records to a target update set"
7088
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
7089
+ "description": "Resolve an incident with resolution notes"
6091
7090
  },
6092
7091
  {
6093
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
6094
- "description": "Move records with JSON output"
7092
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
7093
+ "description": "Resolve with a specific close code"
6095
7094
  }
6096
7095
  ],
6097
7096
  "flags": {
@@ -6119,6 +7118,23 @@
6119
7118
  "allowNo": false,
6120
7119
  "type": "boolean"
6121
7120
  },
7121
+ "log-dir": {
7122
+ "description": "Directory to write log files to. Implies --log-file.",
7123
+ "helpGroup": "GLOBAL",
7124
+ "name": "log-dir",
7125
+ "required": false,
7126
+ "hasDynamicHelp": false,
7127
+ "multiple": false,
7128
+ "type": "option"
7129
+ },
7130
+ "log-file": {
7131
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7132
+ "helpGroup": "GLOBAL",
7133
+ "name": "log-file",
7134
+ "required": false,
7135
+ "allowNo": false,
7136
+ "type": "boolean"
7137
+ },
6122
7138
  "log-level": {
6123
7139
  "helpGroup": "GLOBAL",
6124
7140
  "name": "log-level",
@@ -6135,25 +7151,26 @@
6135
7151
  ],
6136
7152
  "type": "option"
6137
7153
  },
6138
- "records": {
6139
- "description": "Comma-separated sys_ids of records to move",
6140
- "name": "records",
7154
+ "close-code": {
7155
+ "description": "Close code for the resolution",
7156
+ "name": "close-code",
6141
7157
  "required": false,
6142
7158
  "hasDynamicHelp": false,
6143
7159
  "multiple": false,
6144
7160
  "type": "option"
6145
7161
  },
6146
- "source": {
6147
- "description": "Source update set sys_id",
6148
- "name": "source",
6149
- "required": false,
7162
+ "notes": {
7163
+ "description": "Resolution notes",
7164
+ "name": "notes",
7165
+ "required": true,
6150
7166
  "hasDynamicHelp": false,
6151
7167
  "multiple": false,
6152
7168
  "type": "option"
6153
7169
  },
6154
- "target": {
6155
- "description": "Target update set sys_id",
6156
- "name": "target",
7170
+ "number": {
7171
+ "char": "n",
7172
+ "description": "Incident number (e.g., INC0010001)",
7173
+ "name": "number",
6157
7174
  "required": true,
6158
7175
  "hasDynamicHelp": false,
6159
7176
  "multiple": false,
@@ -6162,7 +7179,7 @@
6162
7179
  },
6163
7180
  "hasDynamicHelp": false,
6164
7181
  "hiddenAliases": [],
6165
- "id": "update-set:move",
7182
+ "id": "task:resolve",
6166
7183
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6167
7184
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6168
7185
  "pluginType": "core",
@@ -6172,22 +7189,22 @@
6172
7189
  "relativePath": [
6173
7190
  "dist",
6174
7191
  "commands",
6175
- "update-set",
6176
- "move.js"
7192
+ "task",
7193
+ "resolve.js"
6177
7194
  ]
6178
7195
  },
6179
- "workflow:create": {
7196
+ "update-set:clone": {
6180
7197
  "aliases": [],
6181
7198
  "args": {},
6182
- "description": "Create a complete workflow from a JSON specification file.",
7199
+ "description": "Clone an update set and its records.",
6183
7200
  "examples": [
6184
7201
  {
6185
- "command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
6186
- "description": "Create a workflow from a JSON spec file"
7202
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
7203
+ "description": "Clone an update set"
6187
7204
  },
6188
7205
  {
6189
- "command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
6190
- "description": "Create a workflow and output result as JSON"
7206
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
7207
+ "description": "Clone with JSON output"
6191
7208
  }
6192
7209
  ],
6193
7210
  "flags": {
@@ -6215,6 +7232,23 @@
6215
7232
  "allowNo": false,
6216
7233
  "type": "boolean"
6217
7234
  },
7235
+ "log-dir": {
7236
+ "description": "Directory to write log files to. Implies --log-file.",
7237
+ "helpGroup": "GLOBAL",
7238
+ "name": "log-dir",
7239
+ "required": false,
7240
+ "hasDynamicHelp": false,
7241
+ "multiple": false,
7242
+ "type": "option"
7243
+ },
7244
+ "log-file": {
7245
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7246
+ "helpGroup": "GLOBAL",
7247
+ "name": "log-file",
7248
+ "required": false,
7249
+ "allowNo": false,
7250
+ "type": "boolean"
7251
+ },
6218
7252
  "log-level": {
6219
7253
  "helpGroup": "GLOBAL",
6220
7254
  "name": "log-level",
@@ -6231,10 +7265,19 @@
6231
7265
  ],
6232
7266
  "type": "option"
6233
7267
  },
6234
- "spec": {
7268
+ "name": {
7269
+ "char": "n",
7270
+ "description": "Name for the cloned update set",
7271
+ "name": "name",
7272
+ "required": true,
7273
+ "hasDynamicHelp": false,
7274
+ "multiple": false,
7275
+ "type": "option"
7276
+ },
7277
+ "source": {
6235
7278
  "char": "s",
6236
- "description": "Path to workflow JSON specification file",
6237
- "name": "spec",
7279
+ "description": "Source update set sys_id",
7280
+ "name": "source",
6238
7281
  "required": true,
6239
7282
  "hasDynamicHelp": false,
6240
7283
  "multiple": false,
@@ -6243,7 +7286,7 @@
6243
7286
  },
6244
7287
  "hasDynamicHelp": false,
6245
7288
  "hiddenAliases": [],
6246
- "id": "workflow:create",
7289
+ "id": "update-set:clone",
6247
7290
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6248
7291
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6249
7292
  "pluginType": "core",
@@ -6253,22 +7296,26 @@
6253
7296
  "relativePath": [
6254
7297
  "dist",
6255
7298
  "commands",
6256
- "workflow",
6257
- "create.js"
7299
+ "update-set",
7300
+ "clone.js"
6258
7301
  ]
6259
7302
  },
6260
- "workflow:publish": {
7303
+ "update-set:create": {
6261
7304
  "aliases": [],
6262
7305
  "args": {},
6263
- "description": "Publish a workflow version.",
7306
+ "description": "Create a new update set.",
6264
7307
  "examples": [
6265
7308
  {
6266
- "command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
6267
- "description": "Publish a workflow version"
7309
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
7310
+ "description": "Create a new update set with a name"
6268
7311
  },
6269
7312
  {
6270
- "command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
6271
- "description": "Publish a workflow version and output as JSON"
7313
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
7314
+ "description": "Create with name and description"
7315
+ },
7316
+ {
7317
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
7318
+ "description": "Create within a specific application scope"
6272
7319
  }
6273
7320
  ],
6274
7321
  "flags": {
@@ -6296,6 +7343,23 @@
6296
7343
  "allowNo": false,
6297
7344
  "type": "boolean"
6298
7345
  },
7346
+ "log-dir": {
7347
+ "description": "Directory to write log files to. Implies --log-file.",
7348
+ "helpGroup": "GLOBAL",
7349
+ "name": "log-dir",
7350
+ "required": false,
7351
+ "hasDynamicHelp": false,
7352
+ "multiple": false,
7353
+ "type": "option"
7354
+ },
7355
+ "log-file": {
7356
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7357
+ "helpGroup": "GLOBAL",
7358
+ "name": "log-file",
7359
+ "required": false,
7360
+ "allowNo": false,
7361
+ "type": "boolean"
7362
+ },
6299
7363
  "log-level": {
6300
7364
  "helpGroup": "GLOBAL",
6301
7365
  "name": "log-level",
@@ -6312,19 +7376,27 @@
6312
7376
  ],
6313
7377
  "type": "option"
6314
7378
  },
6315
- "start-activity": {
6316
- "char": "s",
6317
- "description": "Sys ID of the start activity",
6318
- "name": "start-activity",
6319
- "required": true,
7379
+ "application": {
7380
+ "description": "Application scope for the new update set",
7381
+ "name": "application",
7382
+ "required": false,
6320
7383
  "hasDynamicHelp": false,
6321
7384
  "multiple": false,
6322
7385
  "type": "option"
6323
7386
  },
6324
- "version-id": {
6325
- "char": "v",
6326
- "description": "Sys ID of the workflow version to publish",
6327
- "name": "version-id",
7387
+ "description": {
7388
+ "char": "d",
7389
+ "description": "Description for the new update set",
7390
+ "name": "description",
7391
+ "required": false,
7392
+ "hasDynamicHelp": false,
7393
+ "multiple": false,
7394
+ "type": "option"
7395
+ },
7396
+ "name": {
7397
+ "char": "n",
7398
+ "description": "Name for the new update set",
7399
+ "name": "name",
6328
7400
  "required": true,
6329
7401
  "hasDynamicHelp": false,
6330
7402
  "multiple": false,
@@ -6333,7 +7405,7 @@
6333
7405
  },
6334
7406
  "hasDynamicHelp": false,
6335
7407
  "hiddenAliases": [],
6336
- "id": "workflow:publish",
7408
+ "id": "update-set:create",
6337
7409
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6338
7410
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6339
7411
  "pluginType": "core",
@@ -6343,34 +7415,33 @@
6343
7415
  "relativePath": [
6344
7416
  "dist",
6345
7417
  "commands",
6346
- "workflow",
6347
- "publish.js"
7418
+ "update-set",
7419
+ "create.js"
6348
7420
  ]
6349
7421
  },
6350
- "xml:export": {
7422
+ "update-set:current": {
6351
7423
  "aliases": [],
6352
7424
  "args": {},
6353
- "description": "Export a single ServiceNow record as XML.\n\nDownloads the XML representation of a specific record from a ServiceNow table. Without --output, the XML is printed to stdout. With --output, the XML is written to the specified file path.\n\nFeatures:\n • Export any record by table and sys_id\n • Print XML to stdout for piping to other tools\n • Save directly to a file with --output\n • JSON output mode for CI/CD integration",
7425
+ "description": "Get or set the current update set.",
6354
7426
  "examples": [
6355
7427
  {
6356
- "description": "Export a record to stdout",
6357
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
7428
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
7429
+ "description": "Get the current update set"
6358
7430
  },
6359
7431
  {
6360
- "description": "Export and save to a file",
6361
- "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
7432
+ "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
7433
+ "description": "Set the current update set by sys_id"
6362
7434
  },
6363
7435
  {
6364
- "description": "Export as JSON metadata",
6365
- "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
7436
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
7437
+ "description": "Get the current update set as JSON"
6366
7438
  }
6367
7439
  ],
6368
7440
  "flags": {
6369
7441
  "json": {
6370
- "char": "j",
6371
- "description": "Output results as JSON",
7442
+ "description": "Format output as json.",
7443
+ "helpGroup": "GLOBAL",
6372
7444
  "name": "json",
6373
- "required": false,
6374
7445
  "allowNo": false,
6375
7446
  "type": "boolean"
6376
7447
  },
@@ -6391,6 +7462,23 @@
6391
7462
  "allowNo": false,
6392
7463
  "type": "boolean"
6393
7464
  },
7465
+ "log-dir": {
7466
+ "description": "Directory to write log files to. Implies --log-file.",
7467
+ "helpGroup": "GLOBAL",
7468
+ "name": "log-dir",
7469
+ "required": false,
7470
+ "hasDynamicHelp": false,
7471
+ "multiple": false,
7472
+ "type": "option"
7473
+ },
7474
+ "log-file": {
7475
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7476
+ "helpGroup": "GLOBAL",
7477
+ "name": "log-file",
7478
+ "required": false,
7479
+ "allowNo": false,
7480
+ "type": "boolean"
7481
+ },
6394
7482
  "log-level": {
6395
7483
  "helpGroup": "GLOBAL",
6396
7484
  "name": "log-level",
@@ -6407,28 +7495,10 @@
6407
7495
  ],
6408
7496
  "type": "option"
6409
7497
  },
6410
- "table": {
6411
- "char": "t",
6412
- "description": "Table name of the record to export",
6413
- "name": "table",
6414
- "required": true,
6415
- "hasDynamicHelp": false,
6416
- "multiple": false,
6417
- "type": "option"
6418
- },
6419
- "sys-id": {
7498
+ "set": {
6420
7499
  "char": "s",
6421
- "description": "Sys ID of the record to export",
6422
- "name": "sys-id",
6423
- "required": true,
6424
- "hasDynamicHelp": false,
6425
- "multiple": false,
6426
- "type": "option"
6427
- },
6428
- "output": {
6429
- "char": "o",
6430
- "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
6431
- "name": "output",
7500
+ "description": "sys_id of update set to make current",
7501
+ "name": "set",
6432
7502
  "required": false,
6433
7503
  "hasDynamicHelp": false,
6434
7504
  "multiple": false,
@@ -6437,7 +7507,7 @@
6437
7507
  },
6438
7508
  "hasDynamicHelp": false,
6439
7509
  "hiddenAliases": [],
6440
- "id": "xml:export",
7510
+ "id": "update-set:current",
6441
7511
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6442
7512
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6443
7513
  "pluginType": "core",
@@ -6447,30 +7517,33 @@
6447
7517
  "relativePath": [
6448
7518
  "dist",
6449
7519
  "commands",
6450
- "xml",
6451
- "export.js"
7520
+ "update-set",
7521
+ "current.js"
6452
7522
  ]
6453
7523
  },
6454
- "xml:import": {
7524
+ "update-set": {
6455
7525
  "aliases": [],
6456
7526
  "args": {},
6457
- "description": "Import XML records into a ServiceNow instance.\n\nReads an XML file and imports its contents into the specified target table. The XML should be in ServiceNow unload format.\n\nFeatures:\n • Import from local XML files\n • Target a specific table\n • JSON output mode for CI/CD integration",
7527
+ "description": "List update sets on a ServiceNow instance.",
6458
7528
  "examples": [
6459
7529
  {
6460
- "description": "Import records from an XML file",
6461
- "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
7530
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
7531
+ "description": "List update sets with default limit"
6462
7532
  },
6463
7533
  {
6464
- "description": "Import with JSON output",
6465
- "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
7534
+ "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
7535
+ "description": "List update sets with a custom query filter"
7536
+ },
7537
+ {
7538
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
7539
+ "description": "List update sets with JSON output"
6466
7540
  }
6467
7541
  ],
6468
7542
  "flags": {
6469
7543
  "json": {
6470
- "char": "j",
6471
- "description": "Output results as JSON",
7544
+ "description": "Format output as json.",
7545
+ "helpGroup": "GLOBAL",
6472
7546
  "name": "json",
6473
- "required": false,
6474
7547
  "allowNo": false,
6475
7548
  "type": "boolean"
6476
7549
  },
@@ -6491,6 +7564,23 @@
6491
7564
  "allowNo": false,
6492
7565
  "type": "boolean"
6493
7566
  },
7567
+ "log-dir": {
7568
+ "description": "Directory to write log files to. Implies --log-file.",
7569
+ "helpGroup": "GLOBAL",
7570
+ "name": "log-dir",
7571
+ "required": false,
7572
+ "hasDynamicHelp": false,
7573
+ "multiple": false,
7574
+ "type": "option"
7575
+ },
7576
+ "log-file": {
7577
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7578
+ "helpGroup": "GLOBAL",
7579
+ "name": "log-file",
7580
+ "required": false,
7581
+ "allowNo": false,
7582
+ "type": "boolean"
7583
+ },
6494
7584
  "log-level": {
6495
7585
  "helpGroup": "GLOBAL",
6496
7586
  "name": "log-level",
@@ -6507,20 +7597,20 @@
6507
7597
  ],
6508
7598
  "type": "option"
6509
7599
  },
6510
- "file": {
6511
- "char": "f",
6512
- "description": "Path to the XML file to import",
6513
- "name": "file",
6514
- "required": true,
7600
+ "limit": {
7601
+ "description": "Maximum number of update sets to return",
7602
+ "name": "limit",
7603
+ "required": false,
7604
+ "default": 20,
6515
7605
  "hasDynamicHelp": false,
6516
7606
  "multiple": false,
6517
7607
  "type": "option"
6518
7608
  },
6519
- "table": {
6520
- "char": "t",
6521
- "description": "Target table to import records into",
6522
- "name": "table",
6523
- "required": true,
7609
+ "query": {
7610
+ "char": "q",
7611
+ "description": "Encoded query filter",
7612
+ "name": "query",
7613
+ "required": false,
6524
7614
  "hasDynamicHelp": false,
6525
7615
  "multiple": false,
6526
7616
  "type": "option"
@@ -6528,7 +7618,7 @@
6528
7618
  },
6529
7619
  "hasDynamicHelp": false,
6530
7620
  "hiddenAliases": [],
6531
- "id": "xml:import",
7621
+ "id": "update-set",
6532
7622
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6533
7623
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6534
7624
  "pluginType": "core",
@@ -6538,22 +7628,22 @@
6538
7628
  "relativePath": [
6539
7629
  "dist",
6540
7630
  "commands",
6541
- "xml",
6542
- "import.js"
7631
+ "update-set",
7632
+ "index.js"
6543
7633
  ]
6544
7634
  },
6545
- "task:approve": {
7635
+ "update-set:inspect": {
6546
7636
  "aliases": [],
6547
7637
  "args": {},
6548
- "description": "Approve a ServiceNow change request.\n\nThis command approves a change request identified by its number. You can optionally provide approval comments.\n\nFeatures:\n - Approve change requests\n - Optionally add approval comments\n - Auto-resolves change request number to sys_id",
7638
+ "description": "Inspect the components of an update set.",
6549
7639
  "examples": [
6550
7640
  {
6551
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
6552
- "description": "Approve a change request"
7641
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
7642
+ "description": "Inspect an update set by sys_id"
6553
7643
  },
6554
7644
  {
6555
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
6556
- "description": "Approve a change request with comments"
7645
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
7646
+ "description": "Inspect with JSON output"
6557
7647
  }
6558
7648
  ],
6559
7649
  "flags": {
@@ -6581,6 +7671,23 @@
6581
7671
  "allowNo": false,
6582
7672
  "type": "boolean"
6583
7673
  },
7674
+ "log-dir": {
7675
+ "description": "Directory to write log files to. Implies --log-file.",
7676
+ "helpGroup": "GLOBAL",
7677
+ "name": "log-dir",
7678
+ "required": false,
7679
+ "hasDynamicHelp": false,
7680
+ "multiple": false,
7681
+ "type": "option"
7682
+ },
7683
+ "log-file": {
7684
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7685
+ "helpGroup": "GLOBAL",
7686
+ "name": "log-file",
7687
+ "required": false,
7688
+ "allowNo": false,
7689
+ "type": "boolean"
7690
+ },
6584
7691
  "log-level": {
6585
7692
  "helpGroup": "GLOBAL",
6586
7693
  "name": "log-level",
@@ -6597,19 +7704,10 @@
6597
7704
  ],
6598
7705
  "type": "option"
6599
7706
  },
6600
- "comments": {
6601
- "char": "c",
6602
- "description": "Approval comments",
6603
- "name": "comments",
6604
- "required": false,
6605
- "hasDynamicHelp": false,
6606
- "multiple": false,
6607
- "type": "option"
6608
- },
6609
- "number": {
6610
- "char": "n",
6611
- "description": "Change request number (e.g., CHG0010001)",
6612
- "name": "number",
7707
+ "sys-id": {
7708
+ "char": "s",
7709
+ "description": "sys_id of the update set to inspect",
7710
+ "name": "sys-id",
6613
7711
  "required": true,
6614
7712
  "hasDynamicHelp": false,
6615
7713
  "multiple": false,
@@ -6618,7 +7716,7 @@
6618
7716
  },
6619
7717
  "hasDynamicHelp": false,
6620
7718
  "hiddenAliases": [],
6621
- "id": "task:approve",
7719
+ "id": "update-set:inspect",
6622
7720
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6623
7721
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6624
7722
  "pluginType": "core",
@@ -6628,26 +7726,26 @@
6628
7726
  "relativePath": [
6629
7727
  "dist",
6630
7728
  "commands",
6631
- "task",
6632
- "approve.js"
7729
+ "update-set",
7730
+ "inspect.js"
6633
7731
  ]
6634
7732
  },
6635
- "task:assign": {
7733
+ "update-set:move": {
6636
7734
  "aliases": [],
6637
7735
  "args": {},
6638
- "description": "Assign a ServiceNow task to a user or group.\n\nThis command assigns a task record identified by its number to a specified user and/or group. You can assign to a user, a group, or both simultaneously.\n\nFeatures:\n - Assign tasks to individual users\n - Assign tasks to assignment groups\n - Assign to both user and group at once\n - Supports any task-based table\n - Auto-resolves task number to sys_id",
7736
+ "description": "Move records between update sets.",
6639
7737
  "examples": [
6640
7738
  {
6641
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
6642
- "description": "Assign an incident to a user"
7739
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
7740
+ "description": "Move all records from one update set to another"
6643
7741
  },
6644
7742
  {
6645
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
6646
- "description": "Assign an incident to a user and group"
7743
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
7744
+ "description": "Move specific records to a target update set"
6647
7745
  },
6648
7746
  {
6649
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
6650
- "description": "Assign a change request to a user"
7747
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
7748
+ "description": "Move records with JSON output"
6651
7749
  }
6652
7750
  ],
6653
7751
  "flags": {
@@ -6675,6 +7773,23 @@
6675
7773
  "allowNo": false,
6676
7774
  "type": "boolean"
6677
7775
  },
7776
+ "log-dir": {
7777
+ "description": "Directory to write log files to. Implies --log-file.",
7778
+ "helpGroup": "GLOBAL",
7779
+ "name": "log-dir",
7780
+ "required": false,
7781
+ "hasDynamicHelp": false,
7782
+ "multiple": false,
7783
+ "type": "option"
7784
+ },
7785
+ "log-file": {
7786
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7787
+ "helpGroup": "GLOBAL",
7788
+ "name": "log-file",
7789
+ "required": false,
7790
+ "allowNo": false,
7791
+ "type": "boolean"
7792
+ },
6678
7793
  "log-level": {
6679
7794
  "helpGroup": "GLOBAL",
6680
7795
  "name": "log-level",
@@ -6691,37 +7806,25 @@
6691
7806
  ],
6692
7807
  "type": "option"
6693
7808
  },
6694
- "group": {
6695
- "char": "g",
6696
- "description": "Assignment group",
6697
- "name": "group",
7809
+ "records": {
7810
+ "description": "Comma-separated sys_ids of records to move",
7811
+ "name": "records",
6698
7812
  "required": false,
6699
7813
  "hasDynamicHelp": false,
6700
7814
  "multiple": false,
6701
7815
  "type": "option"
6702
- },
6703
- "number": {
6704
- "char": "n",
6705
- "description": "Task number (e.g., INC0010001)",
6706
- "name": "number",
6707
- "required": true,
6708
- "hasDynamicHelp": false,
6709
- "multiple": false,
6710
- "type": "option"
6711
- },
6712
- "table": {
6713
- "description": "ServiceNow table name",
6714
- "name": "table",
7816
+ },
7817
+ "source": {
7818
+ "description": "Source update set sys_id",
7819
+ "name": "source",
6715
7820
  "required": false,
6716
- "default": "task",
6717
7821
  "hasDynamicHelp": false,
6718
7822
  "multiple": false,
6719
7823
  "type": "option"
6720
7824
  },
6721
- "user": {
6722
- "char": "u",
6723
- "description": "User to assign the task to",
6724
- "name": "user",
7825
+ "target": {
7826
+ "description": "Target update set sys_id",
7827
+ "name": "target",
6725
7828
  "required": true,
6726
7829
  "hasDynamicHelp": false,
6727
7830
  "multiple": false,
@@ -6730,7 +7833,7 @@
6730
7833
  },
6731
7834
  "hasDynamicHelp": false,
6732
7835
  "hiddenAliases": [],
6733
- "id": "task:assign",
7836
+ "id": "update-set:move",
6734
7837
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6735
7838
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6736
7839
  "pluginType": "core",
@@ -6740,22 +7843,22 @@
6740
7843
  "relativePath": [
6741
7844
  "dist",
6742
7845
  "commands",
6743
- "task",
6744
- "assign.js"
7846
+ "update-set",
7847
+ "move.js"
6745
7848
  ]
6746
7849
  },
6747
- "task:close": {
7850
+ "workflow:create": {
6748
7851
  "aliases": [],
6749
7852
  "args": {},
6750
- "description": "Close a ServiceNow incident.\n\nThis command closes an incident identified by its number, setting the close notes and optionally a close code. The incident must be in a state that allows closure.\n\nFeatures:\n - Close incidents with close notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
7853
+ "description": "Create a complete workflow from a JSON specification file.",
6751
7854
  "examples": [
6752
7855
  {
6753
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
6754
- "description": "Close an incident with close notes"
7856
+ "command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
7857
+ "description": "Create a workflow from a JSON spec file"
6755
7858
  },
6756
7859
  {
6757
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
6758
- "description": "Close with a specific close code"
7860
+ "command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
7861
+ "description": "Create a workflow and output result as JSON"
6759
7862
  }
6760
7863
  ],
6761
7864
  "flags": {
@@ -6783,6 +7886,23 @@
6783
7886
  "allowNo": false,
6784
7887
  "type": "boolean"
6785
7888
  },
7889
+ "log-dir": {
7890
+ "description": "Directory to write log files to. Implies --log-file.",
7891
+ "helpGroup": "GLOBAL",
7892
+ "name": "log-dir",
7893
+ "required": false,
7894
+ "hasDynamicHelp": false,
7895
+ "multiple": false,
7896
+ "type": "option"
7897
+ },
7898
+ "log-file": {
7899
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7900
+ "helpGroup": "GLOBAL",
7901
+ "name": "log-file",
7902
+ "required": false,
7903
+ "allowNo": false,
7904
+ "type": "boolean"
7905
+ },
6786
7906
  "log-level": {
6787
7907
  "helpGroup": "GLOBAL",
6788
7908
  "name": "log-level",
@@ -6799,26 +7919,10 @@
6799
7919
  ],
6800
7920
  "type": "option"
6801
7921
  },
6802
- "close-code": {
6803
- "description": "Close code for the closure",
6804
- "name": "close-code",
6805
- "required": false,
6806
- "hasDynamicHelp": false,
6807
- "multiple": false,
6808
- "type": "option"
6809
- },
6810
- "notes": {
6811
- "description": "Close notes",
6812
- "name": "notes",
6813
- "required": true,
6814
- "hasDynamicHelp": false,
6815
- "multiple": false,
6816
- "type": "option"
6817
- },
6818
- "number": {
6819
- "char": "n",
6820
- "description": "Incident number (e.g., INC0010001)",
6821
- "name": "number",
7922
+ "spec": {
7923
+ "char": "s",
7924
+ "description": "Path to workflow JSON specification file",
7925
+ "name": "spec",
6822
7926
  "required": true,
6823
7927
  "hasDynamicHelp": false,
6824
7928
  "multiple": false,
@@ -6827,7 +7931,7 @@
6827
7931
  },
6828
7932
  "hasDynamicHelp": false,
6829
7933
  "hiddenAliases": [],
6830
- "id": "task:close",
7934
+ "id": "workflow:create",
6831
7935
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6832
7936
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6833
7937
  "pluginType": "core",
@@ -6837,26 +7941,22 @@
6837
7941
  "relativePath": [
6838
7942
  "dist",
6839
7943
  "commands",
6840
- "task",
6841
- "close.js"
7944
+ "workflow",
7945
+ "create.js"
6842
7946
  ]
6843
7947
  },
6844
- "task:comment": {
7948
+ "workflow:publish": {
6845
7949
  "aliases": [],
6846
7950
  "args": {},
6847
- "description": "Add a comment or work note to a ServiceNow task.\n\nThis command adds a comment or work note to a task record identified by its number. By default, comments are added as customer-visible comments. Use the --work-note flag to add an internal work note instead.\n\nFeatures:\n - Add customer-visible comments to any task\n - Add internal work notes visible only to fulfiller teams\n - Supports any task-based table (incident, change_request, etc.)\n - Auto-resolves task number to sys_id",
7951
+ "description": "Publish a workflow version.",
6848
7952
  "examples": [
6849
7953
  {
6850
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
6851
- "description": "Add a comment to an incident"
6852
- },
6853
- {
6854
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
6855
- "description": "Add a work note to an incident"
7954
+ "command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
7955
+ "description": "Publish a workflow version"
6856
7956
  },
6857
7957
  {
6858
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
6859
- "description": "Add a comment to a change request"
7958
+ "command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
7959
+ "description": "Publish a workflow version and output as JSON"
6860
7960
  }
6861
7961
  ],
6862
7962
  "flags": {
@@ -6884,6 +7984,23 @@
6884
7984
  "allowNo": false,
6885
7985
  "type": "boolean"
6886
7986
  },
7987
+ "log-dir": {
7988
+ "description": "Directory to write log files to. Implies --log-file.",
7989
+ "helpGroup": "GLOBAL",
7990
+ "name": "log-dir",
7991
+ "required": false,
7992
+ "hasDynamicHelp": false,
7993
+ "multiple": false,
7994
+ "type": "option"
7995
+ },
7996
+ "log-file": {
7997
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
7998
+ "helpGroup": "GLOBAL",
7999
+ "name": "log-file",
8000
+ "required": false,
8001
+ "allowNo": false,
8002
+ "type": "boolean"
8003
+ },
6887
8004
  "log-level": {
6888
8005
  "helpGroup": "GLOBAL",
6889
8006
  "name": "log-level",
@@ -6900,44 +8017,28 @@
6900
8017
  ],
6901
8018
  "type": "option"
6902
8019
  },
6903
- "comment": {
6904
- "char": "c",
6905
- "description": "Comment text to add",
6906
- "name": "comment",
8020
+ "start-activity": {
8021
+ "char": "s",
8022
+ "description": "Sys ID of the start activity",
8023
+ "name": "start-activity",
6907
8024
  "required": true,
6908
8025
  "hasDynamicHelp": false,
6909
8026
  "multiple": false,
6910
8027
  "type": "option"
6911
8028
  },
6912
- "number": {
6913
- "char": "n",
6914
- "description": "Task number (e.g., INC0010001)",
6915
- "name": "number",
8029
+ "version-id": {
8030
+ "char": "v",
8031
+ "description": "Sys ID of the workflow version to publish",
8032
+ "name": "version-id",
6916
8033
  "required": true,
6917
8034
  "hasDynamicHelp": false,
6918
8035
  "multiple": false,
6919
8036
  "type": "option"
6920
- },
6921
- "table": {
6922
- "description": "ServiceNow table name",
6923
- "name": "table",
6924
- "required": false,
6925
- "default": "task",
6926
- "hasDynamicHelp": false,
6927
- "multiple": false,
6928
- "type": "option"
6929
- },
6930
- "work-note": {
6931
- "description": "Add as work note instead of comment",
6932
- "name": "work-note",
6933
- "required": false,
6934
- "allowNo": false,
6935
- "type": "boolean"
6936
8037
  }
6937
8038
  },
6938
8039
  "hasDynamicHelp": false,
6939
8040
  "hiddenAliases": [],
6940
- "id": "task:comment",
8041
+ "id": "workflow:publish",
6941
8042
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6942
8043
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6943
8044
  "pluginType": "core",
@@ -6947,33 +8048,34 @@
6947
8048
  "relativePath": [
6948
8049
  "dist",
6949
8050
  "commands",
6950
- "task",
6951
- "comment.js"
8051
+ "workflow",
8052
+ "publish.js"
6952
8053
  ]
6953
8054
  },
6954
- "task:find": {
8055
+ "xml:export": {
6955
8056
  "aliases": [],
6956
8057
  "args": {},
6957
- "description": "Find a ServiceNow task by its number.\n\nThis command looks up a task record by its number in the specified table. Returns the full task details including sys_id, description, state, and assignment information.\n\nFeatures:\n - Look up any task by number\n - Supports any task-based table\n - JSON output for scripting and automation",
8058
+ "description": "Export a single ServiceNow record as XML.\n\nDownloads the XML representation of a specific record from a ServiceNow table. Without --output, the XML is printed to stdout. With --output, the XML is written to the specified file path.\n\nFeatures:\n • Export any record by table and sys_id\n • Print XML to stdout for piping to other tools\n • Save directly to a file with --output\n • JSON output mode for CI/CD integration",
6958
8059
  "examples": [
6959
8060
  {
6960
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
6961
- "description": "Find an incident by number"
8061
+ "description": "Export a record to stdout",
8062
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
6962
8063
  },
6963
8064
  {
6964
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
6965
- "description": "Find a change request by number"
8065
+ "description": "Export and save to a file",
8066
+ "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
6966
8067
  },
6967
8068
  {
6968
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
6969
- "description": "Find an incident and output as JSON"
8069
+ "description": "Export as JSON metadata",
8070
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
6970
8071
  }
6971
8072
  ],
6972
8073
  "flags": {
6973
8074
  "json": {
6974
- "description": "Format output as json.",
6975
- "helpGroup": "GLOBAL",
8075
+ "char": "j",
8076
+ "description": "Output results as JSON",
6976
8077
  "name": "json",
8078
+ "required": false,
6977
8079
  "allowNo": false,
6978
8080
  "type": "boolean"
6979
8081
  },
@@ -6994,6 +8096,23 @@
6994
8096
  "allowNo": false,
6995
8097
  "type": "boolean"
6996
8098
  },
8099
+ "log-dir": {
8100
+ "description": "Directory to write log files to. Implies --log-file.",
8101
+ "helpGroup": "GLOBAL",
8102
+ "name": "log-dir",
8103
+ "required": false,
8104
+ "hasDynamicHelp": false,
8105
+ "multiple": false,
8106
+ "type": "option"
8107
+ },
8108
+ "log-file": {
8109
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
8110
+ "helpGroup": "GLOBAL",
8111
+ "name": "log-file",
8112
+ "required": false,
8113
+ "allowNo": false,
8114
+ "type": "boolean"
8115
+ },
6997
8116
  "log-level": {
6998
8117
  "helpGroup": "GLOBAL",
6999
8118
  "name": "log-level",
@@ -7010,20 +8129,29 @@
7010
8129
  ],
7011
8130
  "type": "option"
7012
8131
  },
7013
- "number": {
7014
- "char": "n",
7015
- "description": "Task number (e.g., INC0010001, CHG0010001)",
7016
- "name": "number",
8132
+ "table": {
8133
+ "char": "t",
8134
+ "description": "Table name of the record to export",
8135
+ "name": "table",
7017
8136
  "required": true,
7018
8137
  "hasDynamicHelp": false,
7019
8138
  "multiple": false,
7020
8139
  "type": "option"
7021
8140
  },
7022
- "table": {
7023
- "description": "ServiceNow table name",
7024
- "name": "table",
8141
+ "sys-id": {
8142
+ "char": "s",
8143
+ "description": "Sys ID of the record to export",
8144
+ "name": "sys-id",
8145
+ "required": true,
8146
+ "hasDynamicHelp": false,
8147
+ "multiple": false,
8148
+ "type": "option"
8149
+ },
8150
+ "output": {
8151
+ "char": "o",
8152
+ "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
8153
+ "name": "output",
7025
8154
  "required": false,
7026
- "default": "task",
7027
8155
  "hasDynamicHelp": false,
7028
8156
  "multiple": false,
7029
8157
  "type": "option"
@@ -7031,7 +8159,7 @@
7031
8159
  },
7032
8160
  "hasDynamicHelp": false,
7033
8161
  "hiddenAliases": [],
7034
- "id": "task:find",
8162
+ "id": "xml:export",
7035
8163
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
7036
8164
  "pluginName": "@sonisoft/now-sdk-ext-cli",
7037
8165
  "pluginType": "core",
@@ -7041,29 +8169,30 @@
7041
8169
  "relativePath": [
7042
8170
  "dist",
7043
8171
  "commands",
7044
- "task",
7045
- "find.js"
8172
+ "xml",
8173
+ "export.js"
7046
8174
  ]
7047
8175
  },
7048
- "task:resolve": {
8176
+ "xml:import": {
7049
8177
  "aliases": [],
7050
8178
  "args": {},
7051
- "description": "Resolve a ServiceNow incident with resolution notes.\n\nThis command resolves an incident identified by its number, setting the resolution notes and optionally a close code. The incident must be in a state that allows resolution.\n\nFeatures:\n - Resolve incidents with resolution notes\n - Optionally specify a close code\n - Auto-resolves incident number to sys_id",
8179
+ "description": "Import XML records into a ServiceNow instance.\n\nReads an XML file and imports its contents into the specified target table. The XML should be in ServiceNow unload format.\n\nFeatures:\n • Import from local XML files\n • Target a specific table\n • JSON output mode for CI/CD integration",
7052
8180
  "examples": [
7053
8181
  {
7054
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
7055
- "description": "Resolve an incident with resolution notes"
8182
+ "description": "Import records from an XML file",
8183
+ "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
7056
8184
  },
7057
8185
  {
7058
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
7059
- "description": "Resolve with a specific close code"
8186
+ "description": "Import with JSON output",
8187
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
7060
8188
  }
7061
8189
  ],
7062
8190
  "flags": {
7063
8191
  "json": {
7064
- "description": "Format output as json.",
7065
- "helpGroup": "GLOBAL",
8192
+ "char": "j",
8193
+ "description": "Output results as JSON",
7066
8194
  "name": "json",
8195
+ "required": false,
7067
8196
  "allowNo": false,
7068
8197
  "type": "boolean"
7069
8198
  },
@@ -7084,6 +8213,23 @@
7084
8213
  "allowNo": false,
7085
8214
  "type": "boolean"
7086
8215
  },
8216
+ "log-dir": {
8217
+ "description": "Directory to write log files to. Implies --log-file.",
8218
+ "helpGroup": "GLOBAL",
8219
+ "name": "log-dir",
8220
+ "required": false,
8221
+ "hasDynamicHelp": false,
8222
+ "multiple": false,
8223
+ "type": "option"
8224
+ },
8225
+ "log-file": {
8226
+ "description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
8227
+ "helpGroup": "GLOBAL",
8228
+ "name": "log-file",
8229
+ "required": false,
8230
+ "allowNo": false,
8231
+ "type": "boolean"
8232
+ },
7087
8233
  "log-level": {
7088
8234
  "helpGroup": "GLOBAL",
7089
8235
  "name": "log-level",
@@ -7100,26 +8246,19 @@
7100
8246
  ],
7101
8247
  "type": "option"
7102
8248
  },
7103
- "close-code": {
7104
- "description": "Close code for the resolution",
7105
- "name": "close-code",
7106
- "required": false,
7107
- "hasDynamicHelp": false,
7108
- "multiple": false,
7109
- "type": "option"
7110
- },
7111
- "notes": {
7112
- "description": "Resolution notes",
7113
- "name": "notes",
8249
+ "file": {
8250
+ "char": "f",
8251
+ "description": "Path to the XML file to import",
8252
+ "name": "file",
7114
8253
  "required": true,
7115
8254
  "hasDynamicHelp": false,
7116
8255
  "multiple": false,
7117
8256
  "type": "option"
7118
8257
  },
7119
- "number": {
7120
- "char": "n",
7121
- "description": "Incident number (e.g., INC0010001)",
7122
- "name": "number",
8258
+ "table": {
8259
+ "char": "t",
8260
+ "description": "Target table to import records into",
8261
+ "name": "table",
7123
8262
  "required": true,
7124
8263
  "hasDynamicHelp": false,
7125
8264
  "multiple": false,
@@ -7128,7 +8267,7 @@
7128
8267
  },
7129
8268
  "hasDynamicHelp": false,
7130
8269
  "hiddenAliases": [],
7131
- "id": "task:resolve",
8270
+ "id": "xml:import",
7132
8271
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
7133
8272
  "pluginName": "@sonisoft/now-sdk-ext-cli",
7134
8273
  "pluginType": "core",
@@ -7138,10 +8277,10 @@
7138
8277
  "relativePath": [
7139
8278
  "dist",
7140
8279
  "commands",
7141
- "task",
7142
- "resolve.js"
8280
+ "xml",
8281
+ "import.js"
7143
8282
  ]
7144
8283
  }
7145
8284
  },
7146
- "version": "5.0.0"
8285
+ "version": "5.1.0"
7147
8286
  }