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

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.
@@ -1389,6 +1389,195 @@
1389
1389
  "upload.js"
1390
1390
  ]
1391
1391
  },
1392
+ "auth:delete": {
1393
+ "aliases": [],
1394
+ "args": {
1395
+ "alias": {
1396
+ "description": "Alias to remove",
1397
+ "name": "alias",
1398
+ "required": false
1399
+ }
1400
+ },
1401
+ "description": "Remove a credential from the store.\n\nThis does not touch the OS keyring — a copy stored there before migrating remains.",
1402
+ "examples": [
1403
+ {
1404
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1405
+ "description": "Remove one alias"
1406
+ },
1407
+ {
1408
+ "command": "<%= config.bin %> <%= command.id %> --all",
1409
+ "description": "Remove every stored credential"
1410
+ }
1411
+ ],
1412
+ "flags": {
1413
+ "cred-store": {
1414
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1415
+ "helpGroup": "GLOBAL",
1416
+ "name": "cred-store",
1417
+ "required": false,
1418
+ "allowNo": false,
1419
+ "type": "boolean"
1420
+ },
1421
+ "all": {
1422
+ "description": "Remove every stored credential",
1423
+ "name": "all",
1424
+ "required": false,
1425
+ "allowNo": false,
1426
+ "type": "boolean"
1427
+ }
1428
+ },
1429
+ "hasDynamicHelp": false,
1430
+ "hiddenAliases": [],
1431
+ "id": "auth:delete",
1432
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1433
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1434
+ "pluginType": "core",
1435
+ "strict": true,
1436
+ "enableJsonFlag": false,
1437
+ "isESM": true,
1438
+ "relativePath": [
1439
+ "dist",
1440
+ "commands",
1441
+ "auth",
1442
+ "delete.js"
1443
+ ]
1444
+ },
1445
+ "auth:doctor": {
1446
+ "aliases": [],
1447
+ "args": {},
1448
+ "description": "Diagnose credential storage: whether the SDK shim is active, which backend is in use, and what is stored.",
1449
+ "examples": [
1450
+ {
1451
+ "command": "<%= config.bin %> <%= command.id %>",
1452
+ "description": "Check credential storage health"
1453
+ },
1454
+ {
1455
+ "command": "<%= config.bin %> <%= command.id %> --json",
1456
+ "description": "Machine-readable output for CI"
1457
+ }
1458
+ ],
1459
+ "flags": {
1460
+ "json": {
1461
+ "description": "Format output as json.",
1462
+ "helpGroup": "GLOBAL",
1463
+ "name": "json",
1464
+ "allowNo": false,
1465
+ "type": "boolean"
1466
+ },
1467
+ "cred-store": {
1468
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1469
+ "helpGroup": "GLOBAL",
1470
+ "name": "cred-store",
1471
+ "required": false,
1472
+ "allowNo": false,
1473
+ "type": "boolean"
1474
+ }
1475
+ },
1476
+ "hasDynamicHelp": false,
1477
+ "hiddenAliases": [],
1478
+ "id": "auth:doctor",
1479
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1480
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1481
+ "pluginType": "core",
1482
+ "strict": true,
1483
+ "enableJsonFlag": true,
1484
+ "isESM": true,
1485
+ "relativePath": [
1486
+ "dist",
1487
+ "commands",
1488
+ "auth",
1489
+ "doctor.js"
1490
+ ]
1491
+ },
1492
+ "auth:list": {
1493
+ "aliases": [],
1494
+ "args": {},
1495
+ "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.",
1496
+ "examples": [
1497
+ {
1498
+ "command": "<%= config.bin %> <%= command.id %>",
1499
+ "description": "List stored credentials"
1500
+ },
1501
+ {
1502
+ "command": "<%= config.bin %> <%= command.id %> --json",
1503
+ "description": "List as JSON for scripting"
1504
+ }
1505
+ ],
1506
+ "flags": {
1507
+ "json": {
1508
+ "description": "Format output as json.",
1509
+ "helpGroup": "GLOBAL",
1510
+ "name": "json",
1511
+ "allowNo": false,
1512
+ "type": "boolean"
1513
+ },
1514
+ "cred-store": {
1515
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1516
+ "helpGroup": "GLOBAL",
1517
+ "name": "cred-store",
1518
+ "required": false,
1519
+ "allowNo": false,
1520
+ "type": "boolean"
1521
+ }
1522
+ },
1523
+ "hasDynamicHelp": false,
1524
+ "hiddenAliases": [],
1525
+ "id": "auth:list",
1526
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1527
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1528
+ "pluginType": "core",
1529
+ "strict": true,
1530
+ "enableJsonFlag": true,
1531
+ "isESM": true,
1532
+ "relativePath": [
1533
+ "dist",
1534
+ "commands",
1535
+ "auth",
1536
+ "list.js"
1537
+ ]
1538
+ },
1539
+ "auth:use": {
1540
+ "aliases": [],
1541
+ "args": {
1542
+ "alias": {
1543
+ "description": "Alias to make the default",
1544
+ "name": "alias",
1545
+ "required": true
1546
+ }
1547
+ },
1548
+ "description": "Set the default credential alias.\n\nCommands run without --auth use this alias.",
1549
+ "examples": [
1550
+ {
1551
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1552
+ "description": "Make dev206299 the default"
1553
+ }
1554
+ ],
1555
+ "flags": {
1556
+ "cred-store": {
1557
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1558
+ "helpGroup": "GLOBAL",
1559
+ "name": "cred-store",
1560
+ "required": false,
1561
+ "allowNo": false,
1562
+ "type": "boolean"
1563
+ }
1564
+ },
1565
+ "hasDynamicHelp": false,
1566
+ "hiddenAliases": [],
1567
+ "id": "auth:use",
1568
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1569
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1570
+ "pluginType": "core",
1571
+ "strict": true,
1572
+ "enableJsonFlag": false,
1573
+ "isESM": true,
1574
+ "relativePath": [
1575
+ "dist",
1576
+ "commands",
1577
+ "auth",
1578
+ "use.js"
1579
+ ]
1580
+ },
1392
1581
  "batch:create": {
1393
1582
  "aliases": [],
1394
1583
  "args": {},
@@ -1931,227 +2120,38 @@
1931
2120
  "index.js"
1932
2121
  ]
1933
2122
  },
1934
- "auth:delete": {
2123
+ "flow:action": {
1935
2124
  "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.",
2125
+ "args": {},
2126
+ "description": "Execute a Flow Designer action by scoped name.\n\nRuns an action using the sn_fd.FlowAPI ScriptableFlowRunner.\n\nFeatures:\n • Execute actions by scoped name\n • Pass input values as JSON\n • Foreground or background execution mode\n • Returns context ID, outputs, and debug information",
1944
2127
  "examples": [
1945
2128
  {
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"
2129
+ "description": "Run an action",
2130
+ "command": "<%= config.bin %> <%= command.id %> --name global.create_record --inputs '{\"table\":\"incident\",\"values\":{\"short_description\":\"Test\"}}' --auth dev"
1952
2131
  }
1953
2132
  ],
1954
2133
  "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",
2134
+ "json": {
2135
+ "char": "j",
2136
+ "description": "Output results as JSON",
2137
+ "name": "json",
1959
2138
  "required": false,
1960
2139
  "allowNo": false,
1961
2140
  "type": "boolean"
1962
2141
  },
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"
2105
- }
2106
- },
2107
- "hasDynamicHelp": false,
2108
- "hiddenAliases": [],
2109
- "id": "auth:use",
2110
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
2111
- "pluginName": "@sonisoft/now-sdk-ext-cli",
2112
- "pluginType": "core",
2113
- "strict": true,
2114
- "enableJsonFlag": false,
2115
- "isESM": true,
2116
- "relativePath": [
2117
- "dist",
2118
- "commands",
2119
- "auth",
2120
- "use.js"
2121
- ]
2122
- },
2123
- "flow:action": {
2124
- "aliases": [],
2125
- "args": {},
2126
- "description": "Execute a Flow Designer action by scoped name.\n\nRuns an action using the sn_fd.FlowAPI ScriptableFlowRunner.\n\nFeatures:\n • Execute actions by scoped name\n • Pass input values as JSON\n • Foreground or background execution mode\n • Returns context ID, outputs, and debug information",
2127
- "examples": [
2128
- {
2129
- "description": "Run an action",
2130
- "command": "<%= config.bin %> <%= command.id %> --name global.create_record --inputs '{\"table\":\"incident\",\"values\":{\"short_description\":\"Test\"}}' --auth dev"
2131
- }
2132
- ],
2133
- "flags": {
2134
- "json": {
2135
- "char": "j",
2136
- "description": "Output results as JSON",
2137
- "name": "json",
2138
- "required": false,
2139
- "allowNo": false,
2140
- "type": "boolean"
2141
- },
2142
- "auth": {
2143
- "char": "a",
2144
- "description": "Auth alias to use.",
2145
- "name": "auth",
2146
- "required": false,
2147
- "hasDynamicHelp": false,
2148
- "multiple": false,
2149
- "type": "option"
2150
- },
2151
- "cred-store": {
2152
- "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.",
2153
- "helpGroup": "GLOBAL",
2154
- "name": "cred-store",
2142
+ "auth": {
2143
+ "char": "a",
2144
+ "description": "Auth alias to use.",
2145
+ "name": "auth",
2146
+ "required": false,
2147
+ "hasDynamicHelp": false,
2148
+ "multiple": false,
2149
+ "type": "option"
2150
+ },
2151
+ "cred-store": {
2152
+ "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.",
2153
+ "helpGroup": "GLOBAL",
2154
+ "name": "cred-store",
2155
2155
  "required": false,
2156
2156
  "allowNo": false,
2157
2157
  "type": "boolean"
@@ -4045,29 +4045,26 @@
4045
4045
  "syslog.js"
4046
4046
  ]
4047
4047
  },
4048
- "scope": {
4048
+ "schema:field": {
4049
4049
  "aliases": [],
4050
4050
  "args": {},
4051
- "description": "Get the current application scope or list available applications.",
4051
+ "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
4052
  "examples": [
4053
4053
  {
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"
4054
+ "description": "Explain the state field on incident table",
4055
+ "command": "<%= config.bin %> <%= command.id %> --table incident --field state --auth dev"
4060
4056
  },
4061
4057
  {
4062
- "command": "<%= config.bin %> <%= command.id %> -l --json --auth dev",
4063
- "description": "List applications as JSON"
4058
+ "description": "Explain the priority field on incident table with JSON output",
4059
+ "command": "<%= config.bin %> <%= command.id %> --table incident --field priority --json --auth dev"
4064
4060
  }
4065
4061
  ],
4066
4062
  "flags": {
4067
4063
  "json": {
4068
- "description": "Format output as json.",
4069
- "helpGroup": "GLOBAL",
4064
+ "char": "j",
4065
+ "description": "Output results as JSON",
4070
4066
  "name": "json",
4067
+ "required": false,
4071
4068
  "allowNo": false,
4072
4069
  "type": "boolean"
4073
4070
  },
@@ -4104,18 +4101,28 @@
4104
4101
  ],
4105
4102
  "type": "option"
4106
4103
  },
4107
- "list": {
4108
- "char": "l",
4109
- "description": "List all available applications",
4110
- "name": "list",
4111
- "required": false,
4112
- "allowNo": false,
4113
- "type": "boolean"
4104
+ "table": {
4105
+ "char": "t",
4106
+ "description": "ServiceNow table name",
4107
+ "name": "table",
4108
+ "required": true,
4109
+ "hasDynamicHelp": false,
4110
+ "multiple": false,
4111
+ "type": "option"
4112
+ },
4113
+ "field": {
4114
+ "char": "f",
4115
+ "description": "Field name to explain",
4116
+ "name": "field",
4117
+ "required": true,
4118
+ "hasDynamicHelp": false,
4119
+ "multiple": false,
4120
+ "type": "option"
4114
4121
  }
4115
4122
  },
4116
4123
  "hasDynamicHelp": false,
4117
4124
  "hiddenAliases": [],
4118
- "id": "scope",
4125
+ "id": "schema:field",
4119
4126
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4120
4127
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4121
4128
  "pluginType": "core",
@@ -4125,29 +4132,30 @@
4125
4132
  "relativePath": [
4126
4133
  "dist",
4127
4134
  "commands",
4128
- "scope",
4129
- "index.js"
4135
+ "schema",
4136
+ "field.js"
4130
4137
  ]
4131
4138
  },
4132
- "scope:set": {
4139
+ "schema": {
4133
4140
  "aliases": [],
4134
4141
  "args": {},
4135
- "description": "Set the current application scope on a ServiceNow instance.",
4142
+ "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
4143
  "examples": [
4137
4144
  {
4138
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123def456ghi789jkl012mno345pq --auth dev",
4139
- "description": "Set application scope by sys_id"
4145
+ "description": "Discover incident table schema",
4146
+ "command": "<%= config.bin %> <%= command.id %> --table incident --auth dev"
4140
4147
  },
4141
4148
  {
4142
- "command": "<%= config.bin %> <%= command.id %> -a abc123def456ghi789jkl012mno345pq --json --auth dev",
4143
- "description": "Set application scope and output as JSON"
4149
+ "description": "Include choices and relationships",
4150
+ "command": "<%= config.bin %> <%= command.id %> --table incident --include-choices --include-relationships --auth dev"
4144
4151
  }
4145
4152
  ],
4146
4153
  "flags": {
4147
4154
  "json": {
4148
- "description": "Format output as json.",
4149
- "helpGroup": "GLOBAL",
4155
+ "char": "j",
4156
+ "description": "Output results as JSON",
4150
4157
  "name": "json",
4158
+ "required": false,
4151
4159
  "allowNo": false,
4152
4160
  "type": "boolean"
4153
4161
  },
@@ -4184,55 +4192,80 @@
4184
4192
  ],
4185
4193
  "type": "option"
4186
4194
  },
4187
- "app-id": {
4188
- "char": "a",
4189
- "description": "32-char sys_id of application",
4190
- "name": "app-id",
4195
+ "table": {
4196
+ "char": "t",
4197
+ "description": "ServiceNow table name to discover schema for",
4198
+ "name": "table",
4191
4199
  "required": true,
4192
4200
  "hasDynamicHelp": false,
4193
4201
  "multiple": false,
4194
4202
  "type": "option"
4195
- }
4196
- },
4197
- "hasDynamicHelp": false,
4198
- "hiddenAliases": [],
4199
- "id": "scope:set",
4200
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4201
- "pluginName": "@sonisoft/now-sdk-ext-cli",
4202
- "pluginType": "core",
4203
- "strict": true,
4204
- "enableJsonFlag": true,
4205
- "isESM": true,
4206
- "relativePath": [
4207
- "dist",
4208
- "commands",
4209
- "scope",
4210
- "set.js"
4203
+ },
4204
+ "include-choices": {
4205
+ "description": "Include field choices in the schema output",
4206
+ "name": "include-choices",
4207
+ "required": false,
4208
+ "allowNo": false,
4209
+ "type": "boolean"
4210
+ },
4211
+ "include-relationships": {
4212
+ "description": "Include table relationships in the schema output",
4213
+ "name": "include-relationships",
4214
+ "required": false,
4215
+ "allowNo": false,
4216
+ "type": "boolean"
4217
+ },
4218
+ "include-ui-policies": {
4219
+ "description": "Include UI policies in the schema output",
4220
+ "name": "include-ui-policies",
4221
+ "required": false,
4222
+ "allowNo": false,
4223
+ "type": "boolean"
4224
+ },
4225
+ "include-business-rules": {
4226
+ "description": "Include business rules in the schema output",
4227
+ "name": "include-business-rules",
4228
+ "required": false,
4229
+ "allowNo": false,
4230
+ "type": "boolean"
4231
+ }
4232
+ },
4233
+ "hasDynamicHelp": false,
4234
+ "hiddenAliases": [],
4235
+ "id": "schema",
4236
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4237
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
4238
+ "pluginType": "core",
4239
+ "strict": true,
4240
+ "enableJsonFlag": true,
4241
+ "isESM": true,
4242
+ "relativePath": [
4243
+ "dist",
4244
+ "commands",
4245
+ "schema",
4246
+ "index.js"
4211
4247
  ]
4212
4248
  },
4213
- "script-sync:pull": {
4249
+ "schema:validate-catalog": {
4214
4250
  "aliases": [],
4215
4251
  "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",
4252
+ "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
4253
  "examples": [
4218
4254
  {
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"
4255
+ "description": "Validate a catalog item by sys_id",
4256
+ "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --auth dev"
4225
4257
  },
4226
4258
  {
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"
4259
+ "description": "Validate a catalog item with JSON output",
4260
+ "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --json --auth dev"
4229
4261
  }
4230
4262
  ],
4231
4263
  "flags": {
4232
4264
  "json": {
4233
- "description": "Format output as json.",
4234
- "helpGroup": "GLOBAL",
4265
+ "char": "j",
4266
+ "description": "Output results as JSON",
4235
4267
  "name": "json",
4268
+ "required": false,
4236
4269
  "allowNo": false,
4237
4270
  "type": "boolean"
4238
4271
  },
@@ -4269,44 +4302,19 @@
4269
4302
  ],
4270
4303
  "type": "option"
4271
4304
  },
4272
- "name": {
4273
- "char": "n",
4274
- "description": "Name of the script to pull",
4275
- "name": "name",
4305
+ "sys-id": {
4306
+ "char": "s",
4307
+ "description": "Catalog item sys_id to validate",
4308
+ "name": "sys-id",
4276
4309
  "required": true,
4277
4310
  "hasDynamicHelp": false,
4278
4311
  "multiple": false,
4279
4312
  "type": "option"
4280
- },
4281
- "type": {
4282
- "char": "t",
4283
- "description": "Type of script to pull",
4284
- "name": "type",
4285
- "required": true,
4286
- "hasDynamicHelp": false,
4287
- "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
- "type": "option"
4305
4313
  }
4306
4314
  },
4307
4315
  "hasDynamicHelp": false,
4308
4316
  "hiddenAliases": [],
4309
- "id": "script-sync:pull",
4317
+ "id": "schema:validate-catalog",
4310
4318
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4311
4319
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4312
4320
  "pluginType": "core",
@@ -4316,26 +4324,26 @@
4316
4324
  "relativePath": [
4317
4325
  "dist",
4318
4326
  "commands",
4319
- "script-sync",
4320
- "pull.js"
4327
+ "schema",
4328
+ "validate-catalog.js"
4321
4329
  ]
4322
4330
  },
4323
- "script-sync:push": {
4331
+ "scope": {
4324
4332
  "aliases": [],
4325
4333
  "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",
4334
+ "description": "Get the current application scope or list available applications.",
4327
4335
  "examples": [
4328
4336
  {
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"
4337
+ "command": "<%= config.bin %> <%= command.id %> --auth dev",
4338
+ "description": "Get the current application scope"
4331
4339
  },
4332
4340
  {
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"
4341
+ "command": "<%= config.bin %> <%= command.id %> --list --auth dev",
4342
+ "description": "List all available applications"
4335
4343
  },
4336
4344
  {
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"
4345
+ "command": "<%= config.bin %> <%= command.id %> -l --json --auth dev",
4346
+ "description": "List applications as JSON"
4339
4347
  }
4340
4348
  ],
4341
4349
  "flags": {
@@ -4379,44 +4387,18 @@
4379
4387
  ],
4380
4388
  "type": "option"
4381
4389
  },
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"
4390
+ "list": {
4391
+ "char": "l",
4392
+ "description": "List all available applications",
4393
+ "name": "list",
4394
+ "required": false,
4395
+ "allowNo": false,
4396
+ "type": "boolean"
4415
4397
  }
4416
4398
  },
4417
4399
  "hasDynamicHelp": false,
4418
4400
  "hiddenAliases": [],
4419
- "id": "script-sync:push",
4401
+ "id": "scope",
4420
4402
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4421
4403
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4422
4404
  "pluginType": "core",
@@ -4426,26 +4408,22 @@
4426
4408
  "relativePath": [
4427
4409
  "dist",
4428
4410
  "commands",
4429
- "script-sync",
4430
- "push.js"
4411
+ "scope",
4412
+ "index.js"
4431
4413
  ]
4432
4414
  },
4433
- "script-sync:sync": {
4415
+ "scope:set": {
4434
4416
  "aliases": [],
4435
4417
  "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",
4418
+ "description": "Set the current application scope on a ServiceNow instance.",
4437
4419
  "examples": [
4438
4420
  {
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"
4421
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123def456ghi789jkl012mno345pq --auth dev",
4422
+ "description": "Set application scope by sys_id"
4445
4423
  },
4446
4424
  {
4447
- "description": "Sync with JSON output for CI/CD",
4448
- "command": "<%= config.bin %> <%= command.id %> -d ./scripts --json --auth dev-instance"
4425
+ "command": "<%= config.bin %> <%= command.id %> -a abc123def456ghi789jkl012mno345pq --json --auth dev",
4426
+ "description": "Set application scope and output as JSON"
4449
4427
  }
4450
4428
  ],
4451
4429
  "flags": {
@@ -4489,35 +4467,19 @@
4489
4467
  ],
4490
4468
  "type": "option"
4491
4469
  },
4492
- "directory": {
4493
- "char": "d",
4494
- "description": "Directory containing script files to synchronize",
4495
- "name": "directory",
4470
+ "app-id": {
4471
+ "char": "a",
4472
+ "description": "32-char sys_id of application",
4473
+ "name": "app-id",
4496
4474
  "required": true,
4497
4475
  "hasDynamicHelp": false,
4498
4476
  "multiple": false,
4499
4477
  "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
4478
  }
4517
4479
  },
4518
4480
  "hasDynamicHelp": false,
4519
4481
  "hiddenAliases": [],
4520
- "id": "script-sync:sync",
4482
+ "id": "scope:set",
4521
4483
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4522
4484
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4523
4485
  "pluginType": "core",
@@ -4527,30 +4489,33 @@
4527
4489
  "relativePath": [
4528
4490
  "dist",
4529
4491
  "commands",
4530
- "script-sync",
4531
- "sync.js"
4492
+ "scope",
4493
+ "set.js"
4532
4494
  ]
4533
4495
  },
4534
- "schema:field": {
4496
+ "search:add-table": {
4535
4497
  "aliases": [],
4536
4498
  "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.",
4499
+ "description": "Add a table to a code search group on a ServiceNow instance.\n\nThis command registers a new table and its searchable fields with a search group, making the table's records discoverable through code search. This is useful when you need to include custom tables in code search results.\n\nFeatures:\n • Add custom tables to search groups\n • Specify which fields should be indexed\n • JSON output for scripting and automation",
4538
4500
  "examples": [
4539
4501
  {
4540
- "description": "Explain the state field on incident table",
4541
- "command": "<%= config.bin %> <%= command.id %> --table incident --field state --auth dev"
4502
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
4503
+ "description": "Add a table to a search group"
4542
4504
  },
4543
4505
  {
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"
4506
+ "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
4507
+ "description": "Add a table with multiple search fields"
4508
+ },
4509
+ {
4510
+ "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
4511
+ "description": "Add a table with JSON output"
4546
4512
  }
4547
4513
  ],
4548
4514
  "flags": {
4549
4515
  "json": {
4550
- "char": "j",
4551
- "description": "Output results as JSON",
4516
+ "description": "Format output as json.",
4517
+ "helpGroup": "GLOBAL",
4552
4518
  "name": "json",
4553
- "required": false,
4554
4519
  "allowNo": false,
4555
4520
  "type": "boolean"
4556
4521
  },
@@ -4587,19 +4552,28 @@
4587
4552
  ],
4588
4553
  "type": "option"
4589
4554
  },
4590
- "table": {
4591
- "char": "t",
4592
- "description": "ServiceNow table name",
4593
- "name": "table",
4555
+ "search-fields": {
4556
+ "char": "f",
4557
+ "description": "Comma-separated list of fields to index for search",
4558
+ "name": "search-fields",
4594
4559
  "required": true,
4595
4560
  "hasDynamicHelp": false,
4596
4561
  "multiple": false,
4597
4562
  "type": "option"
4598
4563
  },
4599
- "field": {
4600
- "char": "f",
4601
- "description": "Field name to explain",
4602
- "name": "field",
4564
+ "search-group": {
4565
+ "char": "g",
4566
+ "description": "Search group to add the table to",
4567
+ "name": "search-group",
4568
+ "required": true,
4569
+ "hasDynamicHelp": false,
4570
+ "multiple": false,
4571
+ "type": "option"
4572
+ },
4573
+ "table": {
4574
+ "char": "t",
4575
+ "description": "Table name to add to the search group",
4576
+ "name": "table",
4603
4577
  "required": true,
4604
4578
  "hasDynamicHelp": false,
4605
4579
  "multiple": false,
@@ -4608,7 +4582,7 @@
4608
4582
  },
4609
4583
  "hasDynamicHelp": false,
4610
4584
  "hiddenAliases": [],
4611
- "id": "schema:field",
4585
+ "id": "search:add-table",
4612
4586
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4613
4587
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4614
4588
  "pluginType": "core",
@@ -4618,30 +4592,29 @@
4618
4592
  "relativePath": [
4619
4593
  "dist",
4620
4594
  "commands",
4621
- "schema",
4622
- "field.js"
4595
+ "search",
4596
+ "add-table.js"
4623
4597
  ]
4624
4598
  },
4625
- "schema": {
4599
+ "search:groups": {
4626
4600
  "aliases": [],
4627
4601
  "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",
4602
+ "description": "List all available code search groups on a ServiceNow instance.\n\nSearch groups organize searchable tables into logical categories. Use this command to discover which search groups are configured, then use the group names with other search commands to narrow your search scope.\n\nFeatures:\n • List all configured search groups\n • JSON output for scripting and automation",
4629
4603
  "examples": [
4630
4604
  {
4631
- "description": "Discover incident table schema",
4632
- "command": "<%= config.bin %> <%= command.id %> --table incident --auth dev"
4605
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
4606
+ "description": "List all search groups"
4633
4607
  },
4634
4608
  {
4635
- "description": "Include choices and relationships",
4636
- "command": "<%= config.bin %> <%= command.id %> --table incident --include-choices --include-relationships --auth dev"
4609
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
4610
+ "description": "List search groups with JSON output"
4637
4611
  }
4638
4612
  ],
4639
4613
  "flags": {
4640
4614
  "json": {
4641
- "char": "j",
4642
- "description": "Output results as JSON",
4615
+ "description": "Format output as json.",
4616
+ "helpGroup": "GLOBAL",
4643
4617
  "name": "json",
4644
- "required": false,
4645
4618
  "allowNo": false,
4646
4619
  "type": "boolean"
4647
4620
  },
@@ -4650,75 +4623,38 @@
4650
4623
  "description": "Auth alias to use.",
4651
4624
  "name": "auth",
4652
4625
  "required": false,
4653
- "hasDynamicHelp": false,
4654
- "multiple": false,
4655
- "type": "option"
4656
- },
4657
- "cred-store": {
4658
- "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.",
4659
- "helpGroup": "GLOBAL",
4660
- "name": "cred-store",
4661
- "required": false,
4662
- "allowNo": false,
4663
- "type": "boolean"
4664
- },
4665
- "log-level": {
4666
- "helpGroup": "GLOBAL",
4667
- "name": "log-level",
4668
- "summary": "Specify level for logging.",
4669
- "default": "info",
4670
- "hasDynamicHelp": false,
4671
- "multiple": false,
4672
- "options": [
4673
- "debug",
4674
- "warn",
4675
- "error",
4676
- "info",
4677
- "trace"
4678
- ],
4679
- "type": "option"
4680
- },
4681
- "table": {
4682
- "char": "t",
4683
- "description": "ServiceNow table name to discover schema for",
4684
- "name": "table",
4685
- "required": true,
4686
- "hasDynamicHelp": false,
4687
- "multiple": false,
4688
- "type": "option"
4689
- },
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"
4626
+ "hasDynamicHelp": false,
4627
+ "multiple": false,
4628
+ "type": "option"
4710
4629
  },
4711
- "include-business-rules": {
4712
- "description": "Include business rules in the schema output",
4713
- "name": "include-business-rules",
4630
+ "cred-store": {
4631
+ "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.",
4632
+ "helpGroup": "GLOBAL",
4633
+ "name": "cred-store",
4714
4634
  "required": false,
4715
4635
  "allowNo": false,
4716
4636
  "type": "boolean"
4637
+ },
4638
+ "log-level": {
4639
+ "helpGroup": "GLOBAL",
4640
+ "name": "log-level",
4641
+ "summary": "Specify level for logging.",
4642
+ "default": "info",
4643
+ "hasDynamicHelp": false,
4644
+ "multiple": false,
4645
+ "options": [
4646
+ "debug",
4647
+ "warn",
4648
+ "error",
4649
+ "info",
4650
+ "trace"
4651
+ ],
4652
+ "type": "option"
4717
4653
  }
4718
4654
  },
4719
4655
  "hasDynamicHelp": false,
4720
4656
  "hiddenAliases": [],
4721
- "id": "schema",
4657
+ "id": "search:groups",
4722
4658
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4723
4659
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4724
4660
  "pluginType": "core",
@@ -4728,30 +4664,37 @@
4728
4664
  "relativePath": [
4729
4665
  "dist",
4730
4666
  "commands",
4731
- "schema",
4732
- "index.js"
4667
+ "search",
4668
+ "groups.js"
4733
4669
  ]
4734
4670
  },
4735
- "schema:validate-catalog": {
4671
+ "search": {
4736
4672
  "aliases": [],
4737
4673
  "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.",
4674
+ "description": "Search platform code across a ServiceNow instance.\n\nThis command allows you to search through code stored on the platform, including scripts, business rules, UI pages, and other scriptable records. You can search globally, within a specific application scope, or within a specific table and search group.\n\nFeatures:\n • Full-text code search across the platform\n • Scope-specific search within application boundaries\n • Table-specific search within a search group\n • JSON output for CI/CD integration\n • Configurable result limits",
4739
4675
  "examples": [
4740
4676
  {
4741
- "description": "Validate a catalog item by sys_id",
4742
- "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --auth dev"
4677
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
4678
+ "description": "Search for a term across the entire instance"
4743
4679
  },
4744
4680
  {
4745
- "description": "Validate a catalog item with JSON output",
4746
- "command": "<%= config.bin %> <%= command.id %> --sys-id a1b2c3d4e5f6 --json --auth dev"
4681
+ "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
4682
+ "description": "Search within a specific application scope"
4683
+ },
4684
+ {
4685
+ "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
4686
+ "description": "Search within a specific table and search group"
4687
+ },
4688
+ {
4689
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
4690
+ "description": "Search with a result limit and JSON output"
4747
4691
  }
4748
4692
  ],
4749
4693
  "flags": {
4750
4694
  "json": {
4751
- "char": "j",
4752
- "description": "Output results as JSON",
4695
+ "description": "Format output as json.",
4696
+ "helpGroup": "GLOBAL",
4753
4697
  "name": "json",
4754
- "required": false,
4755
4698
  "allowNo": false,
4756
4699
  "type": "boolean"
4757
4700
  },
@@ -4788,10 +4731,45 @@
4788
4731
  ],
4789
4732
  "type": "option"
4790
4733
  },
4791
- "sys-id": {
4734
+ "limit": {
4735
+ "char": "l",
4736
+ "description": "Maximum number of results to return",
4737
+ "name": "limit",
4738
+ "required": false,
4739
+ "hasDynamicHelp": false,
4740
+ "multiple": false,
4741
+ "type": "option"
4742
+ },
4743
+ "scope": {
4792
4744
  "char": "s",
4793
- "description": "Catalog item sys_id to validate",
4794
- "name": "sys-id",
4745
+ "description": "Application scope to search within",
4746
+ "name": "scope",
4747
+ "required": false,
4748
+ "hasDynamicHelp": false,
4749
+ "multiple": false,
4750
+ "type": "option"
4751
+ },
4752
+ "search-group": {
4753
+ "char": "g",
4754
+ "description": "Search group to search within (required when using --table)",
4755
+ "name": "search-group",
4756
+ "required": false,
4757
+ "hasDynamicHelp": false,
4758
+ "multiple": false,
4759
+ "type": "option"
4760
+ },
4761
+ "table": {
4762
+ "description": "Table name to search within (requires --search-group)",
4763
+ "name": "table",
4764
+ "required": false,
4765
+ "hasDynamicHelp": false,
4766
+ "multiple": false,
4767
+ "type": "option"
4768
+ },
4769
+ "term": {
4770
+ "char": "t",
4771
+ "description": "Search term to look for in platform code",
4772
+ "name": "term",
4795
4773
  "required": true,
4796
4774
  "hasDynamicHelp": false,
4797
4775
  "multiple": false,
@@ -4800,7 +4778,7 @@
4800
4778
  },
4801
4779
  "hasDynamicHelp": false,
4802
4780
  "hiddenAliases": [],
4803
- "id": "schema:validate-catalog",
4781
+ "id": "search",
4804
4782
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4805
4783
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4806
4784
  "pluginType": "core",
@@ -4810,26 +4788,22 @@
4810
4788
  "relativePath": [
4811
4789
  "dist",
4812
4790
  "commands",
4813
- "schema",
4814
- "validate-catalog.js"
4791
+ "search",
4792
+ "index.js"
4815
4793
  ]
4816
4794
  },
4817
- "search:add-table": {
4795
+ "search:tables": {
4818
4796
  "aliases": [],
4819
4797
  "args": {},
4820
- "description": "Add a table to a code search group on a ServiceNow instance.\n\nThis command registers a new table and its searchable fields with a search group, making the table's records discoverable through code search. This is useful when you need to include custom tables in code search results.\n\nFeatures:\n • Add custom tables to search groups\n • Specify which fields should be indexed\n • JSON output for scripting and automation",
4798
+ "description": "List tables configured for a specific code search group.\n\nEach search group contains one or more tables that are indexed for code search. Use this command to discover which tables belong to a search group, including the fields that are searchable on each table.\n\nFeatures:\n • List all tables in a search group\n • View searchable fields per table\n • JSON output for scripting and automation",
4821
4799
  "examples": [
4822
4800
  {
4823
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
4824
- "description": "Add a table to a search group"
4825
- },
4826
- {
4827
- "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
4828
- "description": "Add a table with multiple search fields"
4801
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
4802
+ "description": "List tables in a search group"
4829
4803
  },
4830
4804
  {
4831
- "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
4832
- "description": "Add a table with JSON output"
4805
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
4806
+ "description": "List tables with JSON output"
4833
4807
  }
4834
4808
  ],
4835
4809
  "flags": {
@@ -4873,37 +4847,19 @@
4873
4847
  ],
4874
4848
  "type": "option"
4875
4849
  },
4876
- "search-fields": {
4877
- "char": "f",
4878
- "description": "Comma-separated list of fields to index for search",
4879
- "name": "search-fields",
4880
- "required": true,
4881
- "hasDynamicHelp": false,
4882
- "multiple": false,
4883
- "type": "option"
4884
- },
4885
4850
  "search-group": {
4886
4851
  "char": "g",
4887
- "description": "Search group to add the table to",
4852
+ "description": "Search group name to list tables for",
4888
4853
  "name": "search-group",
4889
4854
  "required": true,
4890
4855
  "hasDynamicHelp": false,
4891
4856
  "multiple": false,
4892
4857
  "type": "option"
4893
- },
4894
- "table": {
4895
- "char": "t",
4896
- "description": "Table name to add to the search group",
4897
- "name": "table",
4898
- "required": true,
4899
- "hasDynamicHelp": false,
4900
- "multiple": false,
4901
- "type": "option"
4902
4858
  }
4903
4859
  },
4904
4860
  "hasDynamicHelp": false,
4905
4861
  "hiddenAliases": [],
4906
- "id": "search:add-table",
4862
+ "id": "search:tables",
4907
4863
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4908
4864
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4909
4865
  "pluginType": "core",
@@ -4914,21 +4870,25 @@
4914
4870
  "dist",
4915
4871
  "commands",
4916
4872
  "search",
4917
- "add-table.js"
4873
+ "tables.js"
4918
4874
  ]
4919
4875
  },
4920
- "search:groups": {
4876
+ "script-sync:pull": {
4921
4877
  "aliases": [],
4922
4878
  "args": {},
4923
- "description": "List all available code search groups on a ServiceNow instance.\n\nSearch groups organize searchable tables into logical categories. Use this command to discover which search groups are configured, then use the group names with other search commands to narrow your search scope.\n\nFeatures:\n • List all configured search groups\n • JSON output for scripting and automation",
4879
+ "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",
4924
4880
  "examples": [
4925
4881
  {
4926
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
4927
- "description": "List all search groups"
4882
+ "description": "Pull a Script Include to auto-generated file name",
4883
+ "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --auth dev-instance"
4928
4884
  },
4929
4885
  {
4930
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
4931
- "description": "List search groups with JSON output"
4886
+ "description": "Pull a Business Rule to a specific file",
4887
+ "command": "<%= config.bin %> <%= command.id %> --name MyBusinessRule --type sys_script --output ./scripts/my-rule.js --auth dev-instance"
4888
+ },
4889
+ {
4890
+ "description": "Pull a Client Script with JSON output",
4891
+ "command": "<%= config.bin %> <%= command.id %> -n MyClientScript -t sys_script_client --json --auth dev-instance"
4932
4892
  }
4933
4893
  ],
4934
4894
  "flags": {
@@ -4971,11 +4931,45 @@
4971
4931
  "trace"
4972
4932
  ],
4973
4933
  "type": "option"
4934
+ },
4935
+ "name": {
4936
+ "char": "n",
4937
+ "description": "Name of the script to pull",
4938
+ "name": "name",
4939
+ "required": true,
4940
+ "hasDynamicHelp": false,
4941
+ "multiple": false,
4942
+ "type": "option"
4943
+ },
4944
+ "type": {
4945
+ "char": "t",
4946
+ "description": "Type of script to pull",
4947
+ "name": "type",
4948
+ "required": true,
4949
+ "hasDynamicHelp": false,
4950
+ "multiple": false,
4951
+ "options": [
4952
+ "sys_script_include",
4953
+ "sys_script",
4954
+ "sys_ui_script",
4955
+ "sys_ui_action",
4956
+ "sys_script_client"
4957
+ ],
4958
+ "type": "option"
4959
+ },
4960
+ "output": {
4961
+ "char": "o",
4962
+ "description": "Output file path. If not specified, a file name is auto-generated.",
4963
+ "name": "output",
4964
+ "required": false,
4965
+ "hasDynamicHelp": false,
4966
+ "multiple": false,
4967
+ "type": "option"
4974
4968
  }
4975
4969
  },
4976
4970
  "hasDynamicHelp": false,
4977
4971
  "hiddenAliases": [],
4978
- "id": "search:groups",
4972
+ "id": "script-sync:pull",
4979
4973
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4980
4974
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4981
4975
  "pluginType": "core",
@@ -4985,30 +4979,26 @@
4985
4979
  "relativePath": [
4986
4980
  "dist",
4987
4981
  "commands",
4988
- "search",
4989
- "groups.js"
4982
+ "script-sync",
4983
+ "pull.js"
4990
4984
  ]
4991
4985
  },
4992
- "search": {
4986
+ "script-sync:push": {
4993
4987
  "aliases": [],
4994
4988
  "args": {},
4995
- "description": "Search platform code across a ServiceNow instance.\n\nThis command allows you to search through code stored on the platform, including scripts, business rules, UI pages, and other scriptable records. You can search globally, within a specific application scope, or within a specific table and search group.\n\nFeatures:\n • Full-text code search across the platform\n • Scope-specific search within application boundaries\n • Table-specific search within a search group\n • JSON output for CI/CD integration\n • Configurable result limits",
4989
+ "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",
4996
4990
  "examples": [
4997
4991
  {
4998
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
4999
- "description": "Search for a term across the entire instance"
5000
- },
5001
- {
5002
- "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
5003
- "description": "Search within a specific application scope"
4992
+ "description": "Push a Script Include from a local file",
4993
+ "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --file ./scripts/MyScriptInclude.js --auth dev-instance"
5004
4994
  },
5005
4995
  {
5006
- "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
5007
- "description": "Search within a specific table and search group"
4996
+ "description": "Push a Business Rule with short flags",
4997
+ "command": "<%= config.bin %> <%= command.id %> -n MyBusinessRule -t sys_script -f ./scripts/my-rule.js -a dev-instance"
5008
4998
  },
5009
4999
  {
5010
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
5011
- "description": "Search with a result limit and JSON output"
5000
+ "description": "Push a UI Script with JSON output",
5001
+ "command": "<%= config.bin %> <%= command.id %> -n MyUIScript -t sys_ui_script -f ./scripts/ui-script.js --json --auth dev-instance"
5012
5002
  }
5013
5003
  ],
5014
5004
  "flags": {
@@ -5052,45 +5042,35 @@
5052
5042
  ],
5053
5043
  "type": "option"
5054
5044
  },
5055
- "limit": {
5056
- "char": "l",
5057
- "description": "Maximum number of results to return",
5058
- "name": "limit",
5059
- "required": false,
5060
- "hasDynamicHelp": false,
5061
- "multiple": false,
5062
- "type": "option"
5063
- },
5064
- "scope": {
5065
- "char": "s",
5066
- "description": "Application scope to search within",
5067
- "name": "scope",
5068
- "required": false,
5069
- "hasDynamicHelp": false,
5070
- "multiple": false,
5071
- "type": "option"
5072
- },
5073
- "search-group": {
5074
- "char": "g",
5075
- "description": "Search group to search within (required when using --table)",
5076
- "name": "search-group",
5077
- "required": false,
5045
+ "name": {
5046
+ "char": "n",
5047
+ "description": "Name of the script to push",
5048
+ "name": "name",
5049
+ "required": true,
5078
5050
  "hasDynamicHelp": false,
5079
5051
  "multiple": false,
5080
5052
  "type": "option"
5081
5053
  },
5082
- "table": {
5083
- "description": "Table name to search within (requires --search-group)",
5084
- "name": "table",
5085
- "required": false,
5054
+ "type": {
5055
+ "char": "t",
5056
+ "description": "Type of script to push",
5057
+ "name": "type",
5058
+ "required": true,
5086
5059
  "hasDynamicHelp": false,
5087
5060
  "multiple": false,
5061
+ "options": [
5062
+ "sys_script_include",
5063
+ "sys_script",
5064
+ "sys_ui_script",
5065
+ "sys_ui_action",
5066
+ "sys_script_client"
5067
+ ],
5088
5068
  "type": "option"
5089
5069
  },
5090
- "term": {
5091
- "char": "t",
5092
- "description": "Search term to look for in platform code",
5093
- "name": "term",
5070
+ "file": {
5071
+ "char": "f",
5072
+ "description": "Path to the local script file to push",
5073
+ "name": "file",
5094
5074
  "required": true,
5095
5075
  "hasDynamicHelp": false,
5096
5076
  "multiple": false,
@@ -5099,7 +5079,7 @@
5099
5079
  },
5100
5080
  "hasDynamicHelp": false,
5101
5081
  "hiddenAliases": [],
5102
- "id": "search",
5082
+ "id": "script-sync:push",
5103
5083
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5104
5084
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5105
5085
  "pluginType": "core",
@@ -5109,22 +5089,26 @@
5109
5089
  "relativePath": [
5110
5090
  "dist",
5111
5091
  "commands",
5112
- "search",
5113
- "index.js"
5092
+ "script-sync",
5093
+ "push.js"
5114
5094
  ]
5115
5095
  },
5116
- "search:tables": {
5096
+ "script-sync:sync": {
5117
5097
  "aliases": [],
5118
5098
  "args": {},
5119
- "description": "List tables configured for a specific code search group.\n\nEach search group contains one or more tables that are indexed for code search. Use this command to discover which tables belong to a search group, including the fields that are searchable on each table.\n\nFeatures:\n • List all tables in a search group\n • View searchable fields per table\n • JSON output for scripting and automation",
5099
+ "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",
5120
5100
  "examples": [
5121
5101
  {
5122
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
5123
- "description": "List tables in a search group"
5102
+ "description": "Sync all scripts in a directory",
5103
+ "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --auth dev-instance"
5124
5104
  },
5125
5105
  {
5126
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
5127
- "description": "List tables with JSON output"
5106
+ "description": "Sync only Script Includes and Business Rules",
5107
+ "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --types sys_script_include --types sys_script --auth dev-instance"
5108
+ },
5109
+ {
5110
+ "description": "Sync with JSON output for CI/CD",
5111
+ "command": "<%= config.bin %> <%= command.id %> -d ./scripts --json --auth dev-instance"
5128
5112
  }
5129
5113
  ],
5130
5114
  "flags": {
@@ -5168,19 +5152,35 @@
5168
5152
  ],
5169
5153
  "type": "option"
5170
5154
  },
5171
- "search-group": {
5172
- "char": "g",
5173
- "description": "Search group name to list tables for",
5174
- "name": "search-group",
5155
+ "directory": {
5156
+ "char": "d",
5157
+ "description": "Directory containing script files to synchronize",
5158
+ "name": "directory",
5175
5159
  "required": true,
5176
5160
  "hasDynamicHelp": false,
5177
5161
  "multiple": false,
5178
5162
  "type": "option"
5163
+ },
5164
+ "types": {
5165
+ "char": "t",
5166
+ "description": "Script types to synchronize. Can be specified multiple times to include multiple types.",
5167
+ "name": "types",
5168
+ "required": false,
5169
+ "hasDynamicHelp": false,
5170
+ "multiple": true,
5171
+ "options": [
5172
+ "sys_script_include",
5173
+ "sys_script",
5174
+ "sys_ui_script",
5175
+ "sys_ui_action",
5176
+ "sys_script_client"
5177
+ ],
5178
+ "type": "option"
5179
5179
  }
5180
5180
  },
5181
5181
  "hasDynamicHelp": false,
5182
5182
  "hiddenAliases": [],
5183
- "id": "search:tables",
5183
+ "id": "script-sync:sync",
5184
5184
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5185
5185
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5186
5186
  "pluginType": "core",
@@ -5190,26 +5190,22 @@
5190
5190
  "relativePath": [
5191
5191
  "dist",
5192
5192
  "commands",
5193
- "search",
5194
- "tables.js"
5193
+ "script-sync",
5194
+ "sync.js"
5195
5195
  ]
5196
5196
  },
5197
- "store:install": {
5197
+ "task:approve": {
5198
5198
  "aliases": [],
5199
5199
  "args": {},
5200
- "description": "Install an application from the ServiceNow Store.",
5200
+ "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",
5201
5201
  "examples": [
5202
5202
  {
5203
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
5204
- "description": "Install a store application and wait for completion"
5205
- },
5206
- {
5207
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
5208
- "description": "Install without waiting for completion"
5203
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
5204
+ "description": "Approve a change request"
5209
5205
  },
5210
5206
  {
5211
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
5212
- "description": "Install with demo data"
5207
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
5208
+ "description": "Approve a change request with comments"
5213
5209
  }
5214
5210
  ],
5215
5211
  "flags": {
@@ -5253,51 +5249,19 @@
5253
5249
  ],
5254
5250
  "type": "option"
5255
5251
  },
5256
- "app-id": {
5257
- "char": "a",
5258
- "description": "Store application sys_id",
5259
- "name": "app-id",
5260
- "required": true,
5261
- "hasDynamicHelp": false,
5262
- "multiple": false,
5263
- "type": "option"
5264
- },
5265
- "demo-data": {
5266
- "description": "Load demo data during installation",
5267
- "name": "demo-data",
5268
- "required": false,
5269
- "allowNo": false,
5270
- "type": "boolean"
5271
- },
5272
- "no-wait": {
5273
- "description": "Do not wait for installation to complete",
5274
- "name": "no-wait",
5275
- "required": false,
5276
- "allowNo": false,
5277
- "type": "boolean"
5278
- },
5279
- "poll-interval": {
5280
- "description": "Polling interval in milliseconds",
5281
- "name": "poll-interval",
5282
- "required": false,
5283
- "default": 5000,
5284
- "hasDynamicHelp": false,
5285
- "multiple": false,
5286
- "type": "option"
5287
- },
5288
- "timeout": {
5289
- "description": "Installation timeout in milliseconds",
5290
- "name": "timeout",
5252
+ "comments": {
5253
+ "char": "c",
5254
+ "description": "Approval comments",
5255
+ "name": "comments",
5291
5256
  "required": false,
5292
- "default": 1800000,
5293
5257
  "hasDynamicHelp": false,
5294
5258
  "multiple": false,
5295
5259
  "type": "option"
5296
5260
  },
5297
- "version": {
5298
- "char": "v",
5299
- "description": "Application version to install",
5300
- "name": "version",
5261
+ "number": {
5262
+ "char": "n",
5263
+ "description": "Change request number (e.g., CHG0010001)",
5264
+ "name": "number",
5301
5265
  "required": true,
5302
5266
  "hasDynamicHelp": false,
5303
5267
  "multiple": false,
@@ -5306,7 +5270,7 @@
5306
5270
  },
5307
5271
  "hasDynamicHelp": false,
5308
5272
  "hiddenAliases": [],
5309
- "id": "store:install",
5273
+ "id": "task:approve",
5310
5274
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5311
5275
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5312
5276
  "pluginType": "core",
@@ -5316,26 +5280,26 @@
5316
5280
  "relativePath": [
5317
5281
  "dist",
5318
5282
  "commands",
5319
- "store",
5320
- "install.js"
5283
+ "task",
5284
+ "approve.js"
5321
5285
  ]
5322
5286
  },
5323
- "store:search": {
5287
+ "task:assign": {
5324
5288
  "aliases": [],
5325
5289
  "args": {},
5326
- "description": "Search for applications in the ServiceNow Store.",
5290
+ "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",
5327
5291
  "examples": [
5328
5292
  {
5329
- "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
5330
- "description": "Search for applications matching a term"
5293
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
5294
+ "description": "Assign an incident to a user"
5331
5295
  },
5332
5296
  {
5333
- "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
5334
- "description": "List installed applications"
5297
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
5298
+ "description": "Assign an incident to a user and group"
5335
5299
  },
5336
5300
  {
5337
- "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
5338
- "description": "List applications with available updates"
5301
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
5302
+ "description": "Assign a change request to a user"
5339
5303
  }
5340
5304
  ],
5341
5305
  "flags": {
@@ -5379,34 +5343,38 @@
5379
5343
  ],
5380
5344
  "type": "option"
5381
5345
  },
5382
- "limit": {
5383
- "description": "Maximum number of results to return",
5384
- "name": "limit",
5346
+ "group": {
5347
+ "char": "g",
5348
+ "description": "Assignment group",
5349
+ "name": "group",
5385
5350
  "required": false,
5386
- "default": 20,
5387
5351
  "hasDynamicHelp": false,
5388
5352
  "multiple": false,
5389
5353
  "type": "option"
5390
5354
  },
5391
- "tab": {
5392
- "description": "Store tab context to search",
5393
- "name": "tab",
5394
- "required": false,
5395
- "default": "available_for_you",
5355
+ "number": {
5356
+ "char": "n",
5357
+ "description": "Task number (e.g., INC0010001)",
5358
+ "name": "number",
5359
+ "required": true,
5396
5360
  "hasDynamicHelp": false,
5397
5361
  "multiple": false,
5398
- "options": [
5399
- "available_for_you",
5400
- "installed",
5401
- "updates"
5402
- ],
5403
5362
  "type": "option"
5404
5363
  },
5405
- "term": {
5406
- "char": "t",
5407
- "description": "Search term",
5408
- "name": "term",
5364
+ "table": {
5365
+ "description": "ServiceNow table name",
5366
+ "name": "table",
5409
5367
  "required": false,
5368
+ "default": "task",
5369
+ "hasDynamicHelp": false,
5370
+ "multiple": false,
5371
+ "type": "option"
5372
+ },
5373
+ "user": {
5374
+ "char": "u",
5375
+ "description": "User to assign the task to",
5376
+ "name": "user",
5377
+ "required": true,
5410
5378
  "hasDynamicHelp": false,
5411
5379
  "multiple": false,
5412
5380
  "type": "option"
@@ -5414,7 +5382,7 @@
5414
5382
  },
5415
5383
  "hasDynamicHelp": false,
5416
5384
  "hiddenAliases": [],
5417
- "id": "store:search",
5385
+ "id": "task:assign",
5418
5386
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5419
5387
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5420
5388
  "pluginType": "core",
@@ -5424,26 +5392,22 @@
5424
5392
  "relativePath": [
5425
5393
  "dist",
5426
5394
  "commands",
5427
- "store",
5428
- "search.js"
5395
+ "task",
5396
+ "assign.js"
5429
5397
  ]
5430
5398
  },
5431
- "store:update": {
5399
+ "task:close": {
5432
5400
  "aliases": [],
5433
5401
  "args": {},
5434
- "description": "Update a ServiceNow Store application to a new version.",
5402
+ "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",
5435
5403
  "examples": [
5436
5404
  {
5437
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
5438
- "description": "Update a store application and wait for completion"
5439
- },
5440
- {
5441
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
5442
- "description": "Update without waiting for completion"
5405
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
5406
+ "description": "Close an incident with close notes"
5443
5407
  },
5444
5408
  {
5445
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
5446
- "description": "Update with custom timeout (1 hour)"
5409
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
5410
+ "description": "Close with a specific close code"
5447
5411
  }
5448
5412
  ],
5449
5413
  "flags": {
@@ -5487,44 +5451,26 @@
5487
5451
  ],
5488
5452
  "type": "option"
5489
5453
  },
5490
- "app-id": {
5491
- "char": "a",
5492
- "description": "Store application sys_id",
5493
- "name": "app-id",
5494
- "required": true,
5495
- "hasDynamicHelp": false,
5496
- "multiple": false,
5497
- "type": "option"
5498
- },
5499
- "no-wait": {
5500
- "description": "Do not wait for update to complete",
5501
- "name": "no-wait",
5502
- "required": false,
5503
- "allowNo": false,
5504
- "type": "boolean"
5505
- },
5506
- "poll-interval": {
5507
- "description": "Polling interval in milliseconds",
5508
- "name": "poll-interval",
5454
+ "close-code": {
5455
+ "description": "Close code for the closure",
5456
+ "name": "close-code",
5509
5457
  "required": false,
5510
- "default": 5000,
5511
5458
  "hasDynamicHelp": false,
5512
5459
  "multiple": false,
5513
5460
  "type": "option"
5514
5461
  },
5515
- "timeout": {
5516
- "description": "Update timeout in milliseconds",
5517
- "name": "timeout",
5518
- "required": false,
5519
- "default": 1800000,
5462
+ "notes": {
5463
+ "description": "Close notes",
5464
+ "name": "notes",
5465
+ "required": true,
5520
5466
  "hasDynamicHelp": false,
5521
5467
  "multiple": false,
5522
- "type": "option"
5523
- },
5524
- "version": {
5525
- "char": "v",
5526
- "description": "Target application version",
5527
- "name": "version",
5468
+ "type": "option"
5469
+ },
5470
+ "number": {
5471
+ "char": "n",
5472
+ "description": "Incident number (e.g., INC0010001)",
5473
+ "name": "number",
5528
5474
  "required": true,
5529
5475
  "hasDynamicHelp": false,
5530
5476
  "multiple": false,
@@ -5533,7 +5479,7 @@
5533
5479
  },
5534
5480
  "hasDynamicHelp": false,
5535
5481
  "hiddenAliases": [],
5536
- "id": "store:update",
5482
+ "id": "task:close",
5537
5483
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5538
5484
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5539
5485
  "pluginType": "core",
@@ -5543,18 +5489,26 @@
5543
5489
  "relativePath": [
5544
5490
  "dist",
5545
5491
  "commands",
5546
- "store",
5547
- "update.js"
5492
+ "task",
5493
+ "close.js"
5548
5494
  ]
5549
5495
  },
5550
- "store:validate": {
5496
+ "task:comment": {
5551
5497
  "aliases": [],
5552
5498
  "args": {},
5553
- "description": "Validate a batch installation definition file.",
5499
+ "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",
5554
5500
  "examples": [
5555
5501
  {
5556
- "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
5557
- "description": "Validate a batch definition file"
5502
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
5503
+ "description": "Add a comment to an incident"
5504
+ },
5505
+ {
5506
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
5507
+ "description": "Add a work note to an incident"
5508
+ },
5509
+ {
5510
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
5511
+ "description": "Add a comment to a change request"
5558
5512
  }
5559
5513
  ],
5560
5514
  "flags": {
@@ -5598,19 +5552,44 @@
5598
5552
  ],
5599
5553
  "type": "option"
5600
5554
  },
5601
- "file": {
5602
- "char": "f",
5603
- "description": "Path to batch definition JSON file",
5604
- "name": "file",
5555
+ "comment": {
5556
+ "char": "c",
5557
+ "description": "Comment text to add",
5558
+ "name": "comment",
5559
+ "required": true,
5560
+ "hasDynamicHelp": false,
5561
+ "multiple": false,
5562
+ "type": "option"
5563
+ },
5564
+ "number": {
5565
+ "char": "n",
5566
+ "description": "Task number (e.g., INC0010001)",
5567
+ "name": "number",
5605
5568
  "required": true,
5606
5569
  "hasDynamicHelp": false,
5607
5570
  "multiple": false,
5608
5571
  "type": "option"
5572
+ },
5573
+ "table": {
5574
+ "description": "ServiceNow table name",
5575
+ "name": "table",
5576
+ "required": false,
5577
+ "default": "task",
5578
+ "hasDynamicHelp": false,
5579
+ "multiple": false,
5580
+ "type": "option"
5581
+ },
5582
+ "work-note": {
5583
+ "description": "Add as work note instead of comment",
5584
+ "name": "work-note",
5585
+ "required": false,
5586
+ "allowNo": false,
5587
+ "type": "boolean"
5609
5588
  }
5610
5589
  },
5611
5590
  "hasDynamicHelp": false,
5612
5591
  "hiddenAliases": [],
5613
- "id": "store:validate",
5592
+ "id": "task:comment",
5614
5593
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5615
5594
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5616
5595
  "pluginType": "core",
@@ -5620,22 +5599,26 @@
5620
5599
  "relativePath": [
5621
5600
  "dist",
5622
5601
  "commands",
5623
- "store",
5624
- "validate.js"
5602
+ "task",
5603
+ "comment.js"
5625
5604
  ]
5626
5605
  },
5627
- "update-set:clone": {
5606
+ "task:find": {
5628
5607
  "aliases": [],
5629
5608
  "args": {},
5630
- "description": "Clone an update set and its records.",
5609
+ "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",
5631
5610
  "examples": [
5632
5611
  {
5633
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
5634
- "description": "Clone an update set"
5612
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
5613
+ "description": "Find an incident by number"
5635
5614
  },
5636
5615
  {
5637
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
5638
- "description": "Clone with JSON output"
5616
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
5617
+ "description": "Find a change request by number"
5618
+ },
5619
+ {
5620
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
5621
+ "description": "Find an incident and output as JSON"
5639
5622
  }
5640
5623
  ],
5641
5624
  "flags": {
@@ -5679,20 +5662,20 @@
5679
5662
  ],
5680
5663
  "type": "option"
5681
5664
  },
5682
- "name": {
5665
+ "number": {
5683
5666
  "char": "n",
5684
- "description": "Name for the cloned update set",
5685
- "name": "name",
5667
+ "description": "Task number (e.g., INC0010001, CHG0010001)",
5668
+ "name": "number",
5686
5669
  "required": true,
5687
5670
  "hasDynamicHelp": false,
5688
5671
  "multiple": false,
5689
5672
  "type": "option"
5690
5673
  },
5691
- "source": {
5692
- "char": "s",
5693
- "description": "Source update set sys_id",
5694
- "name": "source",
5695
- "required": true,
5674
+ "table": {
5675
+ "description": "ServiceNow table name",
5676
+ "name": "table",
5677
+ "required": false,
5678
+ "default": "task",
5696
5679
  "hasDynamicHelp": false,
5697
5680
  "multiple": false,
5698
5681
  "type": "option"
@@ -5700,7 +5683,7 @@
5700
5683
  },
5701
5684
  "hasDynamicHelp": false,
5702
5685
  "hiddenAliases": [],
5703
- "id": "update-set:clone",
5686
+ "id": "task:find",
5704
5687
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5705
5688
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5706
5689
  "pluginType": "core",
@@ -5710,26 +5693,22 @@
5710
5693
  "relativePath": [
5711
5694
  "dist",
5712
5695
  "commands",
5713
- "update-set",
5714
- "clone.js"
5696
+ "task",
5697
+ "find.js"
5715
5698
  ]
5716
5699
  },
5717
- "update-set:create": {
5700
+ "task:resolve": {
5718
5701
  "aliases": [],
5719
5702
  "args": {},
5720
- "description": "Create a new update set.",
5703
+ "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",
5721
5704
  "examples": [
5722
5705
  {
5723
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
5724
- "description": "Create a new update set with a name"
5725
- },
5726
- {
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"
5706
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
5707
+ "description": "Resolve an incident with resolution notes"
5729
5708
  },
5730
5709
  {
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"
5710
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
5711
+ "description": "Resolve with a specific close code"
5733
5712
  }
5734
5713
  ],
5735
5714
  "flags": {
@@ -5773,27 +5752,26 @@
5773
5752
  ],
5774
5753
  "type": "option"
5775
5754
  },
5776
- "application": {
5777
- "description": "Application scope for the new update set",
5778
- "name": "application",
5755
+ "close-code": {
5756
+ "description": "Close code for the resolution",
5757
+ "name": "close-code",
5779
5758
  "required": false,
5780
5759
  "hasDynamicHelp": false,
5781
5760
  "multiple": false,
5782
5761
  "type": "option"
5783
5762
  },
5784
- "description": {
5785
- "char": "d",
5786
- "description": "Description for the new update set",
5787
- "name": "description",
5788
- "required": false,
5763
+ "notes": {
5764
+ "description": "Resolution notes",
5765
+ "name": "notes",
5766
+ "required": true,
5789
5767
  "hasDynamicHelp": false,
5790
5768
  "multiple": false,
5791
5769
  "type": "option"
5792
5770
  },
5793
- "name": {
5771
+ "number": {
5794
5772
  "char": "n",
5795
- "description": "Name for the new update set",
5796
- "name": "name",
5773
+ "description": "Incident number (e.g., INC0010001)",
5774
+ "name": "number",
5797
5775
  "required": true,
5798
5776
  "hasDynamicHelp": false,
5799
5777
  "multiple": false,
@@ -5802,7 +5780,7 @@
5802
5780
  },
5803
5781
  "hasDynamicHelp": false,
5804
5782
  "hiddenAliases": [],
5805
- "id": "update-set:create",
5783
+ "id": "task:resolve",
5806
5784
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5807
5785
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5808
5786
  "pluginType": "core",
@@ -5812,26 +5790,26 @@
5812
5790
  "relativePath": [
5813
5791
  "dist",
5814
5792
  "commands",
5815
- "update-set",
5816
- "create.js"
5793
+ "task",
5794
+ "resolve.js"
5817
5795
  ]
5818
5796
  },
5819
- "update-set:current": {
5797
+ "store:install": {
5820
5798
  "aliases": [],
5821
5799
  "args": {},
5822
- "description": "Get or set the current update set.",
5800
+ "description": "Install an application from the ServiceNow Store.",
5823
5801
  "examples": [
5824
5802
  {
5825
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5826
- "description": "Get the current update set"
5803
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
5804
+ "description": "Install a store application and wait for completion"
5827
5805
  },
5828
5806
  {
5829
- "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
5830
- "description": "Set the current update set by sys_id"
5807
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
5808
+ "description": "Install without waiting for completion"
5831
5809
  },
5832
5810
  {
5833
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5834
- "description": "Get the current update set as JSON"
5811
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
5812
+ "description": "Install with demo data"
5835
5813
  }
5836
5814
  ],
5837
5815
  "flags": {
@@ -5875,11 +5853,52 @@
5875
5853
  ],
5876
5854
  "type": "option"
5877
5855
  },
5878
- "set": {
5879
- "char": "s",
5880
- "description": "sys_id of update set to make current",
5881
- "name": "set",
5856
+ "app-id": {
5857
+ "char": "a",
5858
+ "description": "Store application sys_id",
5859
+ "name": "app-id",
5860
+ "required": true,
5861
+ "hasDynamicHelp": false,
5862
+ "multiple": false,
5863
+ "type": "option"
5864
+ },
5865
+ "demo-data": {
5866
+ "description": "Load demo data during installation",
5867
+ "name": "demo-data",
5868
+ "required": false,
5869
+ "allowNo": false,
5870
+ "type": "boolean"
5871
+ },
5872
+ "no-wait": {
5873
+ "description": "Do not wait for installation to complete",
5874
+ "name": "no-wait",
5875
+ "required": false,
5876
+ "allowNo": false,
5877
+ "type": "boolean"
5878
+ },
5879
+ "poll-interval": {
5880
+ "description": "Polling interval in milliseconds",
5881
+ "name": "poll-interval",
5882
+ "required": false,
5883
+ "default": 5000,
5884
+ "hasDynamicHelp": false,
5885
+ "multiple": false,
5886
+ "type": "option"
5887
+ },
5888
+ "timeout": {
5889
+ "description": "Installation timeout in milliseconds",
5890
+ "name": "timeout",
5882
5891
  "required": false,
5892
+ "default": 1800000,
5893
+ "hasDynamicHelp": false,
5894
+ "multiple": false,
5895
+ "type": "option"
5896
+ },
5897
+ "version": {
5898
+ "char": "v",
5899
+ "description": "Application version to install",
5900
+ "name": "version",
5901
+ "required": true,
5883
5902
  "hasDynamicHelp": false,
5884
5903
  "multiple": false,
5885
5904
  "type": "option"
@@ -5887,7 +5906,7 @@
5887
5906
  },
5888
5907
  "hasDynamicHelp": false,
5889
5908
  "hiddenAliases": [],
5890
- "id": "update-set:current",
5909
+ "id": "store:install",
5891
5910
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5892
5911
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5893
5912
  "pluginType": "core",
@@ -5897,26 +5916,26 @@
5897
5916
  "relativePath": [
5898
5917
  "dist",
5899
5918
  "commands",
5900
- "update-set",
5901
- "current.js"
5919
+ "store",
5920
+ "install.js"
5902
5921
  ]
5903
5922
  },
5904
- "update-set": {
5923
+ "store:search": {
5905
5924
  "aliases": [],
5906
5925
  "args": {},
5907
- "description": "List update sets on a ServiceNow instance.",
5926
+ "description": "Search for applications in the ServiceNow Store.",
5908
5927
  "examples": [
5909
5928
  {
5910
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5911
- "description": "List update sets with default limit"
5929
+ "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
5930
+ "description": "Search for applications matching a term"
5912
5931
  },
5913
5932
  {
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"
5933
+ "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
5934
+ "description": "List installed applications"
5916
5935
  },
5917
5936
  {
5918
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5919
- "description": "List update sets with JSON output"
5937
+ "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
5938
+ "description": "List applications with available updates"
5920
5939
  }
5921
5940
  ],
5922
5941
  "flags": {
@@ -5961,7 +5980,7 @@
5961
5980
  "type": "option"
5962
5981
  },
5963
5982
  "limit": {
5964
- "description": "Maximum number of update sets to return",
5983
+ "description": "Maximum number of results to return",
5965
5984
  "name": "limit",
5966
5985
  "required": false,
5967
5986
  "default": 20,
@@ -5969,10 +5988,24 @@
5969
5988
  "multiple": false,
5970
5989
  "type": "option"
5971
5990
  },
5972
- "query": {
5973
- "char": "q",
5974
- "description": "Encoded query filter",
5975
- "name": "query",
5991
+ "tab": {
5992
+ "description": "Store tab context to search",
5993
+ "name": "tab",
5994
+ "required": false,
5995
+ "default": "available_for_you",
5996
+ "hasDynamicHelp": false,
5997
+ "multiple": false,
5998
+ "options": [
5999
+ "available_for_you",
6000
+ "installed",
6001
+ "updates"
6002
+ ],
6003
+ "type": "option"
6004
+ },
6005
+ "term": {
6006
+ "char": "t",
6007
+ "description": "Search term",
6008
+ "name": "term",
5976
6009
  "required": false,
5977
6010
  "hasDynamicHelp": false,
5978
6011
  "multiple": false,
@@ -5981,7 +6014,7 @@
5981
6014
  },
5982
6015
  "hasDynamicHelp": false,
5983
6016
  "hiddenAliases": [],
5984
- "id": "update-set",
6017
+ "id": "store:search",
5985
6018
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5986
6019
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5987
6020
  "pluginType": "core",
@@ -5991,22 +6024,26 @@
5991
6024
  "relativePath": [
5992
6025
  "dist",
5993
6026
  "commands",
5994
- "update-set",
5995
- "index.js"
6027
+ "store",
6028
+ "search.js"
5996
6029
  ]
5997
6030
  },
5998
- "update-set:inspect": {
6031
+ "store:update": {
5999
6032
  "aliases": [],
6000
6033
  "args": {},
6001
- "description": "Inspect the components of an update set.",
6034
+ "description": "Update a ServiceNow Store application to a new version.",
6002
6035
  "examples": [
6003
6036
  {
6004
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
6005
- "description": "Inspect an update set by sys_id"
6037
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
6038
+ "description": "Update a store application and wait for completion"
6006
6039
  },
6007
6040
  {
6008
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
6009
- "description": "Inspect with JSON output"
6041
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
6042
+ "description": "Update without waiting for completion"
6043
+ },
6044
+ {
6045
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
6046
+ "description": "Update with custom timeout (1 hour)"
6010
6047
  }
6011
6048
  ],
6012
6049
  "flags": {
@@ -6050,10 +6087,44 @@
6050
6087
  ],
6051
6088
  "type": "option"
6052
6089
  },
6053
- "sys-id": {
6054
- "char": "s",
6055
- "description": "sys_id of the update set to inspect",
6056
- "name": "sys-id",
6090
+ "app-id": {
6091
+ "char": "a",
6092
+ "description": "Store application sys_id",
6093
+ "name": "app-id",
6094
+ "required": true,
6095
+ "hasDynamicHelp": false,
6096
+ "multiple": false,
6097
+ "type": "option"
6098
+ },
6099
+ "no-wait": {
6100
+ "description": "Do not wait for update to complete",
6101
+ "name": "no-wait",
6102
+ "required": false,
6103
+ "allowNo": false,
6104
+ "type": "boolean"
6105
+ },
6106
+ "poll-interval": {
6107
+ "description": "Polling interval in milliseconds",
6108
+ "name": "poll-interval",
6109
+ "required": false,
6110
+ "default": 5000,
6111
+ "hasDynamicHelp": false,
6112
+ "multiple": false,
6113
+ "type": "option"
6114
+ },
6115
+ "timeout": {
6116
+ "description": "Update timeout in milliseconds",
6117
+ "name": "timeout",
6118
+ "required": false,
6119
+ "default": 1800000,
6120
+ "hasDynamicHelp": false,
6121
+ "multiple": false,
6122
+ "type": "option"
6123
+ },
6124
+ "version": {
6125
+ "char": "v",
6126
+ "description": "Target application version",
6127
+ "name": "version",
6057
6128
  "required": true,
6058
6129
  "hasDynamicHelp": false,
6059
6130
  "multiple": false,
@@ -6062,7 +6133,7 @@
6062
6133
  },
6063
6134
  "hasDynamicHelp": false,
6064
6135
  "hiddenAliases": [],
6065
- "id": "update-set:inspect",
6136
+ "id": "store:update",
6066
6137
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6067
6138
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6068
6139
  "pluginType": "core",
@@ -6072,26 +6143,18 @@
6072
6143
  "relativePath": [
6073
6144
  "dist",
6074
6145
  "commands",
6075
- "update-set",
6076
- "inspect.js"
6146
+ "store",
6147
+ "update.js"
6077
6148
  ]
6078
6149
  },
6079
- "update-set:move": {
6150
+ "store:validate": {
6080
6151
  "aliases": [],
6081
6152
  "args": {},
6082
- "description": "Move records between update sets.",
6153
+ "description": "Validate a batch installation definition file.",
6083
6154
  "examples": [
6084
6155
  {
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"
6091
- },
6092
- {
6093
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
6094
- "description": "Move records with JSON output"
6156
+ "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
6157
+ "description": "Validate a batch definition file"
6095
6158
  }
6096
6159
  ],
6097
6160
  "flags": {
@@ -6135,25 +6198,10 @@
6135
6198
  ],
6136
6199
  "type": "option"
6137
6200
  },
6138
- "records": {
6139
- "description": "Comma-separated sys_ids of records to move",
6140
- "name": "records",
6141
- "required": false,
6142
- "hasDynamicHelp": false,
6143
- "multiple": false,
6144
- "type": "option"
6145
- },
6146
- "source": {
6147
- "description": "Source update set sys_id",
6148
- "name": "source",
6149
- "required": false,
6150
- "hasDynamicHelp": false,
6151
- "multiple": false,
6152
- "type": "option"
6153
- },
6154
- "target": {
6155
- "description": "Target update set sys_id",
6156
- "name": "target",
6201
+ "file": {
6202
+ "char": "f",
6203
+ "description": "Path to batch definition JSON file",
6204
+ "name": "file",
6157
6205
  "required": true,
6158
6206
  "hasDynamicHelp": false,
6159
6207
  "multiple": false,
@@ -6162,7 +6210,7 @@
6162
6210
  },
6163
6211
  "hasDynamicHelp": false,
6164
6212
  "hiddenAliases": [],
6165
- "id": "update-set:move",
6213
+ "id": "store:validate",
6166
6214
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6167
6215
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6168
6216
  "pluginType": "core",
@@ -6172,8 +6220,8 @@
6172
6220
  "relativePath": [
6173
6221
  "dist",
6174
6222
  "commands",
6175
- "update-set",
6176
- "move.js"
6223
+ "store",
6224
+ "validate.js"
6177
6225
  ]
6178
6226
  },
6179
6227
  "workflow:create": {
@@ -6347,30 +6395,25 @@
6347
6395
  "publish.js"
6348
6396
  ]
6349
6397
  },
6350
- "xml:export": {
6398
+ "update-set:clone": {
6351
6399
  "aliases": [],
6352
6400
  "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",
6401
+ "description": "Clone an update set and its records.",
6354
6402
  "examples": [
6355
6403
  {
6356
- "description": "Export a record to stdout",
6357
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
6358
- },
6359
- {
6360
- "description": "Export and save to a file",
6361
- "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
6404
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
6405
+ "description": "Clone an update set"
6362
6406
  },
6363
6407
  {
6364
- "description": "Export as JSON metadata",
6365
- "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
6408
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
6409
+ "description": "Clone with JSON output"
6366
6410
  }
6367
6411
  ],
6368
6412
  "flags": {
6369
6413
  "json": {
6370
- "char": "j",
6371
- "description": "Output results as JSON",
6414
+ "description": "Format output as json.",
6415
+ "helpGroup": "GLOBAL",
6372
6416
  "name": "json",
6373
- "required": false,
6374
6417
  "allowNo": false,
6375
6418
  "type": "boolean"
6376
6419
  },
@@ -6407,37 +6450,28 @@
6407
6450
  ],
6408
6451
  "type": "option"
6409
6452
  },
6410
- "table": {
6411
- "char": "t",
6412
- "description": "Table name of the record to export",
6413
- "name": "table",
6453
+ "name": {
6454
+ "char": "n",
6455
+ "description": "Name for the cloned update set",
6456
+ "name": "name",
6414
6457
  "required": true,
6415
6458
  "hasDynamicHelp": false,
6416
6459
  "multiple": false,
6417
6460
  "type": "option"
6418
6461
  },
6419
- "sys-id": {
6462
+ "source": {
6420
6463
  "char": "s",
6421
- "description": "Sys ID of the record to export",
6422
- "name": "sys-id",
6464
+ "description": "Source update set sys_id",
6465
+ "name": "source",
6423
6466
  "required": true,
6424
6467
  "hasDynamicHelp": false,
6425
6468
  "multiple": false,
6426
6469
  "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",
6432
- "required": false,
6433
- "hasDynamicHelp": false,
6434
- "multiple": false,
6435
- "type": "option"
6436
6470
  }
6437
6471
  },
6438
6472
  "hasDynamicHelp": false,
6439
6473
  "hiddenAliases": [],
6440
- "id": "xml:export",
6474
+ "id": "update-set:clone",
6441
6475
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6442
6476
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6443
6477
  "pluginType": "core",
@@ -6447,30 +6481,33 @@
6447
6481
  "relativePath": [
6448
6482
  "dist",
6449
6483
  "commands",
6450
- "xml",
6451
- "export.js"
6484
+ "update-set",
6485
+ "clone.js"
6452
6486
  ]
6453
6487
  },
6454
- "xml:import": {
6488
+ "update-set:create": {
6455
6489
  "aliases": [],
6456
6490
  "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",
6491
+ "description": "Create a new update set.",
6458
6492
  "examples": [
6459
6493
  {
6460
- "description": "Import records from an XML file",
6461
- "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
6494
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
6495
+ "description": "Create a new update set with a name"
6462
6496
  },
6463
6497
  {
6464
- "description": "Import with JSON output",
6465
- "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
6498
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
6499
+ "description": "Create with name and description"
6500
+ },
6501
+ {
6502
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
6503
+ "description": "Create within a specific application scope"
6466
6504
  }
6467
6505
  ],
6468
6506
  "flags": {
6469
6507
  "json": {
6470
- "char": "j",
6471
- "description": "Output results as JSON",
6508
+ "description": "Format output as json.",
6509
+ "helpGroup": "GLOBAL",
6472
6510
  "name": "json",
6473
- "required": false,
6474
6511
  "allowNo": false,
6475
6512
  "type": "boolean"
6476
6513
  },
@@ -6507,19 +6544,27 @@
6507
6544
  ],
6508
6545
  "type": "option"
6509
6546
  },
6510
- "file": {
6511
- "char": "f",
6512
- "description": "Path to the XML file to import",
6513
- "name": "file",
6514
- "required": true,
6547
+ "application": {
6548
+ "description": "Application scope for the new update set",
6549
+ "name": "application",
6550
+ "required": false,
6515
6551
  "hasDynamicHelp": false,
6516
6552
  "multiple": false,
6517
6553
  "type": "option"
6518
6554
  },
6519
- "table": {
6520
- "char": "t",
6521
- "description": "Target table to import records into",
6522
- "name": "table",
6555
+ "description": {
6556
+ "char": "d",
6557
+ "description": "Description for the new update set",
6558
+ "name": "description",
6559
+ "required": false,
6560
+ "hasDynamicHelp": false,
6561
+ "multiple": false,
6562
+ "type": "option"
6563
+ },
6564
+ "name": {
6565
+ "char": "n",
6566
+ "description": "Name for the new update set",
6567
+ "name": "name",
6523
6568
  "required": true,
6524
6569
  "hasDynamicHelp": false,
6525
6570
  "multiple": false,
@@ -6528,7 +6573,7 @@
6528
6573
  },
6529
6574
  "hasDynamicHelp": false,
6530
6575
  "hiddenAliases": [],
6531
- "id": "xml:import",
6576
+ "id": "update-set:create",
6532
6577
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6533
6578
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6534
6579
  "pluginType": "core",
@@ -6538,22 +6583,26 @@
6538
6583
  "relativePath": [
6539
6584
  "dist",
6540
6585
  "commands",
6541
- "xml",
6542
- "import.js"
6586
+ "update-set",
6587
+ "create.js"
6543
6588
  ]
6544
6589
  },
6545
- "task:approve": {
6590
+ "update-set:current": {
6546
6591
  "aliases": [],
6547
6592
  "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",
6593
+ "description": "Get or set the current update set.",
6549
6594
  "examples": [
6550
6595
  {
6551
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
6552
- "description": "Approve a change request"
6596
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6597
+ "description": "Get the current update set"
6553
6598
  },
6554
6599
  {
6555
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
6556
- "description": "Approve a change request with comments"
6600
+ "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
6601
+ "description": "Set the current update set by sys_id"
6602
+ },
6603
+ {
6604
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6605
+ "description": "Get the current update set as JSON"
6557
6606
  }
6558
6607
  ],
6559
6608
  "flags": {
@@ -6597,28 +6646,19 @@
6597
6646
  ],
6598
6647
  "type": "option"
6599
6648
  },
6600
- "comments": {
6601
- "char": "c",
6602
- "description": "Approval comments",
6603
- "name": "comments",
6649
+ "set": {
6650
+ "char": "s",
6651
+ "description": "sys_id of update set to make current",
6652
+ "name": "set",
6604
6653
  "required": false,
6605
6654
  "hasDynamicHelp": false,
6606
6655
  "multiple": false,
6607
6656
  "type": "option"
6608
- },
6609
- "number": {
6610
- "char": "n",
6611
- "description": "Change request number (e.g., CHG0010001)",
6612
- "name": "number",
6613
- "required": true,
6614
- "hasDynamicHelp": false,
6615
- "multiple": false,
6616
- "type": "option"
6617
6657
  }
6618
6658
  },
6619
6659
  "hasDynamicHelp": false,
6620
6660
  "hiddenAliases": [],
6621
- "id": "task:approve",
6661
+ "id": "update-set:current",
6622
6662
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6623
6663
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6624
6664
  "pluginType": "core",
@@ -6628,26 +6668,26 @@
6628
6668
  "relativePath": [
6629
6669
  "dist",
6630
6670
  "commands",
6631
- "task",
6632
- "approve.js"
6671
+ "update-set",
6672
+ "current.js"
6633
6673
  ]
6634
6674
  },
6635
- "task:assign": {
6675
+ "update-set": {
6636
6676
  "aliases": [],
6637
6677
  "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",
6678
+ "description": "List update sets on a ServiceNow instance.",
6639
6679
  "examples": [
6640
6680
  {
6641
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
6642
- "description": "Assign an incident to a user"
6681
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6682
+ "description": "List update sets with default limit"
6643
6683
  },
6644
6684
  {
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"
6685
+ "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
6686
+ "description": "List update sets with a custom query filter"
6647
6687
  },
6648
6688
  {
6649
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
6650
- "description": "Assign a change request to a user"
6689
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6690
+ "description": "List update sets with JSON output"
6651
6691
  }
6652
6692
  ],
6653
6693
  "flags": {
@@ -6691,38 +6731,20 @@
6691
6731
  ],
6692
6732
  "type": "option"
6693
6733
  },
6694
- "group": {
6695
- "char": "g",
6696
- "description": "Assignment group",
6697
- "name": "group",
6734
+ "limit": {
6735
+ "description": "Maximum number of update sets to return",
6736
+ "name": "limit",
6698
6737
  "required": false,
6738
+ "default": 20,
6699
6739
  "hasDynamicHelp": false,
6700
6740
  "multiple": false,
6701
6741
  "type": "option"
6702
6742
  },
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",
6743
+ "query": {
6744
+ "char": "q",
6745
+ "description": "Encoded query filter",
6746
+ "name": "query",
6715
6747
  "required": false,
6716
- "default": "task",
6717
- "hasDynamicHelp": false,
6718
- "multiple": false,
6719
- "type": "option"
6720
- },
6721
- "user": {
6722
- "char": "u",
6723
- "description": "User to assign the task to",
6724
- "name": "user",
6725
- "required": true,
6726
6748
  "hasDynamicHelp": false,
6727
6749
  "multiple": false,
6728
6750
  "type": "option"
@@ -6730,7 +6752,7 @@
6730
6752
  },
6731
6753
  "hasDynamicHelp": false,
6732
6754
  "hiddenAliases": [],
6733
- "id": "task:assign",
6755
+ "id": "update-set",
6734
6756
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6735
6757
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6736
6758
  "pluginType": "core",
@@ -6740,22 +6762,22 @@
6740
6762
  "relativePath": [
6741
6763
  "dist",
6742
6764
  "commands",
6743
- "task",
6744
- "assign.js"
6765
+ "update-set",
6766
+ "index.js"
6745
6767
  ]
6746
6768
  },
6747
- "task:close": {
6769
+ "update-set:inspect": {
6748
6770
  "aliases": [],
6749
6771
  "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",
6772
+ "description": "Inspect the components of an update set.",
6751
6773
  "examples": [
6752
6774
  {
6753
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
6754
- "description": "Close an incident with close notes"
6775
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
6776
+ "description": "Inspect an update set by sys_id"
6755
6777
  },
6756
6778
  {
6757
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
6758
- "description": "Close with a specific close code"
6779
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
6780
+ "description": "Inspect with JSON output"
6759
6781
  }
6760
6782
  ],
6761
6783
  "flags": {
@@ -6799,26 +6821,10 @@
6799
6821
  ],
6800
6822
  "type": "option"
6801
6823
  },
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",
6824
+ "sys-id": {
6825
+ "char": "s",
6826
+ "description": "sys_id of the update set to inspect",
6827
+ "name": "sys-id",
6822
6828
  "required": true,
6823
6829
  "hasDynamicHelp": false,
6824
6830
  "multiple": false,
@@ -6827,7 +6833,7 @@
6827
6833
  },
6828
6834
  "hasDynamicHelp": false,
6829
6835
  "hiddenAliases": [],
6830
- "id": "task:close",
6836
+ "id": "update-set:inspect",
6831
6837
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6832
6838
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6833
6839
  "pluginType": "core",
@@ -6837,26 +6843,26 @@
6837
6843
  "relativePath": [
6838
6844
  "dist",
6839
6845
  "commands",
6840
- "task",
6841
- "close.js"
6846
+ "update-set",
6847
+ "inspect.js"
6842
6848
  ]
6843
6849
  },
6844
- "task:comment": {
6850
+ "update-set:move": {
6845
6851
  "aliases": [],
6846
6852
  "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",
6853
+ "description": "Move records between update sets.",
6848
6854
  "examples": [
6849
6855
  {
6850
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
6851
- "description": "Add a comment to an incident"
6856
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
6857
+ "description": "Move all records from one update set to another"
6852
6858
  },
6853
6859
  {
6854
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
6855
- "description": "Add a work note to an incident"
6860
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
6861
+ "description": "Move specific records to a target update set"
6856
6862
  },
6857
6863
  {
6858
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
6859
- "description": "Add a comment to a change request"
6864
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
6865
+ "description": "Move records with JSON output"
6860
6866
  }
6861
6867
  ],
6862
6868
  "flags": {
@@ -6900,44 +6906,34 @@
6900
6906
  ],
6901
6907
  "type": "option"
6902
6908
  },
6903
- "comment": {
6904
- "char": "c",
6905
- "description": "Comment text to add",
6906
- "name": "comment",
6907
- "required": true,
6909
+ "records": {
6910
+ "description": "Comma-separated sys_ids of records to move",
6911
+ "name": "records",
6912
+ "required": false,
6908
6913
  "hasDynamicHelp": false,
6909
6914
  "multiple": false,
6910
6915
  "type": "option"
6911
6916
  },
6912
- "number": {
6913
- "char": "n",
6914
- "description": "Task number (e.g., INC0010001)",
6915
- "name": "number",
6916
- "required": true,
6917
+ "source": {
6918
+ "description": "Source update set sys_id",
6919
+ "name": "source",
6920
+ "required": false,
6917
6921
  "hasDynamicHelp": false,
6918
6922
  "multiple": false,
6919
6923
  "type": "option"
6920
6924
  },
6921
- "table": {
6922
- "description": "ServiceNow table name",
6923
- "name": "table",
6924
- "required": false,
6925
- "default": "task",
6925
+ "target": {
6926
+ "description": "Target update set sys_id",
6927
+ "name": "target",
6928
+ "required": true,
6926
6929
  "hasDynamicHelp": false,
6927
6930
  "multiple": false,
6928
6931
  "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
6932
  }
6937
6933
  },
6938
6934
  "hasDynamicHelp": false,
6939
6935
  "hiddenAliases": [],
6940
- "id": "task:comment",
6936
+ "id": "update-set:move",
6941
6937
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6942
6938
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6943
6939
  "pluginType": "core",
@@ -6947,33 +6943,34 @@
6947
6943
  "relativePath": [
6948
6944
  "dist",
6949
6945
  "commands",
6950
- "task",
6951
- "comment.js"
6946
+ "update-set",
6947
+ "move.js"
6952
6948
  ]
6953
6949
  },
6954
- "task:find": {
6950
+ "xml:export": {
6955
6951
  "aliases": [],
6956
6952
  "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",
6953
+ "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
6954
  "examples": [
6959
6955
  {
6960
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
6961
- "description": "Find an incident by number"
6956
+ "description": "Export a record to stdout",
6957
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
6962
6958
  },
6963
6959
  {
6964
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
6965
- "description": "Find a change request by number"
6960
+ "description": "Export and save to a file",
6961
+ "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
6966
6962
  },
6967
6963
  {
6968
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
6969
- "description": "Find an incident and output as JSON"
6964
+ "description": "Export as JSON metadata",
6965
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
6970
6966
  }
6971
6967
  ],
6972
6968
  "flags": {
6973
6969
  "json": {
6974
- "description": "Format output as json.",
6975
- "helpGroup": "GLOBAL",
6970
+ "char": "j",
6971
+ "description": "Output results as JSON",
6976
6972
  "name": "json",
6973
+ "required": false,
6977
6974
  "allowNo": false,
6978
6975
  "type": "boolean"
6979
6976
  },
@@ -7010,20 +7007,29 @@
7010
7007
  ],
7011
7008
  "type": "option"
7012
7009
  },
7013
- "number": {
7014
- "char": "n",
7015
- "description": "Task number (e.g., INC0010001, CHG0010001)",
7016
- "name": "number",
7010
+ "table": {
7011
+ "char": "t",
7012
+ "description": "Table name of the record to export",
7013
+ "name": "table",
7017
7014
  "required": true,
7018
7015
  "hasDynamicHelp": false,
7019
7016
  "multiple": false,
7020
7017
  "type": "option"
7021
7018
  },
7022
- "table": {
7023
- "description": "ServiceNow table name",
7024
- "name": "table",
7019
+ "sys-id": {
7020
+ "char": "s",
7021
+ "description": "Sys ID of the record to export",
7022
+ "name": "sys-id",
7023
+ "required": true,
7024
+ "hasDynamicHelp": false,
7025
+ "multiple": false,
7026
+ "type": "option"
7027
+ },
7028
+ "output": {
7029
+ "char": "o",
7030
+ "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
7031
+ "name": "output",
7025
7032
  "required": false,
7026
- "default": "task",
7027
7033
  "hasDynamicHelp": false,
7028
7034
  "multiple": false,
7029
7035
  "type": "option"
@@ -7031,7 +7037,7 @@
7031
7037
  },
7032
7038
  "hasDynamicHelp": false,
7033
7039
  "hiddenAliases": [],
7034
- "id": "task:find",
7040
+ "id": "xml:export",
7035
7041
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
7036
7042
  "pluginName": "@sonisoft/now-sdk-ext-cli",
7037
7043
  "pluginType": "core",
@@ -7041,29 +7047,30 @@
7041
7047
  "relativePath": [
7042
7048
  "dist",
7043
7049
  "commands",
7044
- "task",
7045
- "find.js"
7050
+ "xml",
7051
+ "export.js"
7046
7052
  ]
7047
7053
  },
7048
- "task:resolve": {
7054
+ "xml:import": {
7049
7055
  "aliases": [],
7050
7056
  "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",
7057
+ "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
7058
  "examples": [
7053
7059
  {
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"
7060
+ "description": "Import records from an XML file",
7061
+ "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
7056
7062
  },
7057
7063
  {
7058
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
7059
- "description": "Resolve with a specific close code"
7064
+ "description": "Import with JSON output",
7065
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
7060
7066
  }
7061
7067
  ],
7062
7068
  "flags": {
7063
7069
  "json": {
7064
- "description": "Format output as json.",
7065
- "helpGroup": "GLOBAL",
7070
+ "char": "j",
7071
+ "description": "Output results as JSON",
7066
7072
  "name": "json",
7073
+ "required": false,
7067
7074
  "allowNo": false,
7068
7075
  "type": "boolean"
7069
7076
  },
@@ -7100,26 +7107,19 @@
7100
7107
  ],
7101
7108
  "type": "option"
7102
7109
  },
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",
7110
+ "file": {
7111
+ "char": "f",
7112
+ "description": "Path to the XML file to import",
7113
+ "name": "file",
7114
7114
  "required": true,
7115
7115
  "hasDynamicHelp": false,
7116
7116
  "multiple": false,
7117
7117
  "type": "option"
7118
7118
  },
7119
- "number": {
7120
- "char": "n",
7121
- "description": "Incident number (e.g., INC0010001)",
7122
- "name": "number",
7119
+ "table": {
7120
+ "char": "t",
7121
+ "description": "Target table to import records into",
7122
+ "name": "table",
7123
7123
  "required": true,
7124
7124
  "hasDynamicHelp": false,
7125
7125
  "multiple": false,
@@ -7128,7 +7128,7 @@
7128
7128
  },
7129
7129
  "hasDynamicHelp": false,
7130
7130
  "hiddenAliases": [],
7131
- "id": "task:resolve",
7131
+ "id": "xml:import",
7132
7132
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
7133
7133
  "pluginName": "@sonisoft/now-sdk-ext-cli",
7134
7134
  "pluginType": "core",
@@ -7138,10 +7138,10 @@
7138
7138
  "relativePath": [
7139
7139
  "dist",
7140
7140
  "commands",
7141
- "task",
7142
- "resolve.js"
7141
+ "xml",
7142
+ "import.js"
7143
7143
  ]
7144
7144
  }
7145
7145
  },
7146
- "version": "5.0.0"
7146
+ "version": "5.0.1"
7147
7147
  }