@sonisoft/now-sdk-ext-cli 2.3.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -366,6 +366,191 @@
366
366
  "query.js"
367
367
  ]
368
368
  },
369
+ "atf": {
370
+ "aliases": [],
371
+ "args": {},
372
+ "description": "Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\nThis command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines and automated testing workflows. You can execute individual tests, entire test suites, and configure execution parameters such as browser type, OS, and performance mode.\n\nFeatures:\n • Execute individual tests or complete test suites\n • Real-time progress monitoring\n • JSON output for CI/CD integration\n • Detailed test results and summaries\n • Browser and environment configuration\n • Performance testing mode support",
373
+ "examples": [
374
+ {
375
+ "description": "Execute a single ATF test by sys_id",
376
+ "command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
377
+ },
378
+ {
379
+ "description": "Execute a test suite by sys_id and wait for completion",
380
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
381
+ },
382
+ {
383
+ "description": "Execute a test suite by name",
384
+ "command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
385
+ },
386
+ {
387
+ "description": "Execute with specific browser configuration",
388
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
389
+ },
390
+ {
391
+ "description": "Execute as performance test with JSON output for CI/CD",
392
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
393
+ },
394
+ {
395
+ "description": "Execute with custom poll interval (10 seconds)",
396
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
397
+ }
398
+ ],
399
+ "flags": {
400
+ "json": {
401
+ "char": "j",
402
+ "description": "Output results as JSON",
403
+ "name": "json",
404
+ "required": false,
405
+ "allowNo": false,
406
+ "type": "boolean"
407
+ },
408
+ "auth": {
409
+ "char": "a",
410
+ "description": "Auth alias to use.",
411
+ "name": "auth",
412
+ "required": false,
413
+ "hasDynamicHelp": false,
414
+ "multiple": false,
415
+ "type": "option"
416
+ },
417
+ "log-level": {
418
+ "helpGroup": "GLOBAL",
419
+ "name": "log-level",
420
+ "summary": "Specify level for logging.",
421
+ "default": "info",
422
+ "hasDynamicHelp": false,
423
+ "multiple": false,
424
+ "options": [
425
+ "debug",
426
+ "warn",
427
+ "error",
428
+ "info",
429
+ "trace"
430
+ ],
431
+ "type": "option"
432
+ },
433
+ "test-id": {
434
+ "char": "t",
435
+ "description": "Test sys_id to execute",
436
+ "exclusive": [
437
+ "suite-id",
438
+ "suite-name"
439
+ ],
440
+ "name": "test-id",
441
+ "required": false,
442
+ "hasDynamicHelp": false,
443
+ "multiple": false,
444
+ "type": "option"
445
+ },
446
+ "suite-id": {
447
+ "char": "s",
448
+ "description": "Test Suite sys_id to execute",
449
+ "exclusive": [
450
+ "test-id",
451
+ "suite-name"
452
+ ],
453
+ "name": "suite-id",
454
+ "required": false,
455
+ "hasDynamicHelp": false,
456
+ "multiple": false,
457
+ "type": "option"
458
+ },
459
+ "suite-name": {
460
+ "char": "n",
461
+ "description": "Test Suite name to execute",
462
+ "exclusive": [
463
+ "test-id",
464
+ "suite-id"
465
+ ],
466
+ "name": "suite-name",
467
+ "required": false,
468
+ "hasDynamicHelp": false,
469
+ "multiple": false,
470
+ "type": "option"
471
+ },
472
+ "wait": {
473
+ "char": "w",
474
+ "description": "Wait for test suite execution to complete and return results",
475
+ "name": "wait",
476
+ "required": false,
477
+ "allowNo": false,
478
+ "type": "boolean"
479
+ },
480
+ "poll-interval": {
481
+ "char": "p",
482
+ "description": "Polling interval in milliseconds when waiting for completion",
483
+ "name": "poll-interval",
484
+ "required": false,
485
+ "default": 5000,
486
+ "hasDynamicHelp": false,
487
+ "multiple": false,
488
+ "type": "option"
489
+ },
490
+ "browser": {
491
+ "char": "b",
492
+ "description": "Browser name for test execution (e.g., chrome, firefox)",
493
+ "name": "browser",
494
+ "required": false,
495
+ "hasDynamicHelp": false,
496
+ "multiple": false,
497
+ "type": "option"
498
+ },
499
+ "browser-version": {
500
+ "description": "Browser version for test execution",
501
+ "name": "browser-version",
502
+ "required": false,
503
+ "hasDynamicHelp": false,
504
+ "multiple": false,
505
+ "type": "option"
506
+ },
507
+ "os-name": {
508
+ "description": "Operating system name for test execution",
509
+ "name": "os-name",
510
+ "required": false,
511
+ "hasDynamicHelp": false,
512
+ "multiple": false,
513
+ "type": "option"
514
+ },
515
+ "os-version": {
516
+ "description": "Operating system version for test execution",
517
+ "name": "os-version",
518
+ "required": false,
519
+ "hasDynamicHelp": false,
520
+ "multiple": false,
521
+ "type": "option"
522
+ },
523
+ "performance": {
524
+ "description": "Run as performance test",
525
+ "name": "performance",
526
+ "required": false,
527
+ "allowNo": false,
528
+ "type": "boolean"
529
+ },
530
+ "cloud": {
531
+ "description": "Run in cloud",
532
+ "name": "cloud",
533
+ "required": false,
534
+ "allowNo": false,
535
+ "type": "boolean"
536
+ }
537
+ },
538
+ "hasDynamicHelp": false,
539
+ "hiddenAliases": [],
540
+ "id": "atf",
541
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
542
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
543
+ "pluginType": "core",
544
+ "strict": true,
545
+ "enableJsonFlag": true,
546
+ "isESM": true,
547
+ "relativePath": [
548
+ "dist",
549
+ "commands",
550
+ "atf",
551
+ "index.js"
552
+ ]
553
+ },
369
554
  "app": {
370
555
  "aliases": [],
371
556
  "args": {},
@@ -845,42 +1030,25 @@
845
1030
  "uninstall.js"
846
1031
  ]
847
1032
  },
848
- "atf": {
1033
+ "attachment:get": {
849
1034
  "aliases": [],
850
1035
  "args": {},
851
- "description": "Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\nThis command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines and automated testing workflows. You can execute individual tests, entire test suites, and configure execution parameters such as browser type, OS, and performance mode.\n\nFeatures:\n • Execute individual tests or complete test suites\n • Real-time progress monitoring\n • JSON output for CI/CD integration\n • Detailed test results and summaries\n • Browser and environment configuration\n • Performance testing mode support",
1036
+ "description": "Get metadata for a specific attachment.",
852
1037
  "examples": [
853
1038
  {
854
- "description": "Execute a single ATF test by sys_id",
855
- "command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
856
- },
857
- {
858
- "description": "Execute a test suite by sys_id and wait for completion",
859
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
860
- },
861
- {
862
- "description": "Execute a test suite by name",
863
- "command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
864
- },
865
- {
866
- "description": "Execute with specific browser configuration",
867
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
868
- },
869
- {
870
- "description": "Execute as performance test with JSON output for CI/CD",
871
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
1039
+ "command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
1040
+ "description": "Get attachment metadata by sys_id"
872
1041
  },
873
1042
  {
874
- "description": "Execute with custom poll interval (10 seconds)",
875
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
1043
+ "command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
1044
+ "description": "Get attachment metadata as JSON"
876
1045
  }
877
1046
  ],
878
1047
  "flags": {
879
1048
  "json": {
880
- "char": "j",
881
- "description": "Output results as JSON",
1049
+ "description": "Format output as json.",
1050
+ "helpGroup": "GLOBAL",
882
1051
  "name": "json",
883
- "required": false,
884
1052
  "allowNo": false,
885
1053
  "type": "boolean"
886
1054
  },
@@ -909,179 +1077,11 @@
909
1077
  ],
910
1078
  "type": "option"
911
1079
  },
912
- "test-id": {
913
- "char": "t",
914
- "description": "Test sys_id to execute",
915
- "exclusive": [
916
- "suite-id",
917
- "suite-name"
918
- ],
919
- "name": "test-id",
920
- "required": false,
921
- "hasDynamicHelp": false,
922
- "multiple": false,
923
- "type": "option"
924
- },
925
- "suite-id": {
1080
+ "sys-id": {
926
1081
  "char": "s",
927
- "description": "Test Suite sys_id to execute",
928
- "exclusive": [
929
- "test-id",
930
- "suite-name"
931
- ],
932
- "name": "suite-id",
933
- "required": false,
934
- "hasDynamicHelp": false,
935
- "multiple": false,
936
- "type": "option"
937
- },
938
- "suite-name": {
939
- "char": "n",
940
- "description": "Test Suite name to execute",
941
- "exclusive": [
942
- "test-id",
943
- "suite-id"
944
- ],
945
- "name": "suite-name",
946
- "required": false,
947
- "hasDynamicHelp": false,
948
- "multiple": false,
949
- "type": "option"
950
- },
951
- "wait": {
952
- "char": "w",
953
- "description": "Wait for test suite execution to complete and return results",
954
- "name": "wait",
955
- "required": false,
956
- "allowNo": false,
957
- "type": "boolean"
958
- },
959
- "poll-interval": {
960
- "char": "p",
961
- "description": "Polling interval in milliseconds when waiting for completion",
962
- "name": "poll-interval",
963
- "required": false,
964
- "default": 5000,
965
- "hasDynamicHelp": false,
966
- "multiple": false,
967
- "type": "option"
968
- },
969
- "browser": {
970
- "char": "b",
971
- "description": "Browser name for test execution (e.g., chrome, firefox)",
972
- "name": "browser",
973
- "required": false,
974
- "hasDynamicHelp": false,
975
- "multiple": false,
976
- "type": "option"
977
- },
978
- "browser-version": {
979
- "description": "Browser version for test execution",
980
- "name": "browser-version",
981
- "required": false,
982
- "hasDynamicHelp": false,
983
- "multiple": false,
984
- "type": "option"
985
- },
986
- "os-name": {
987
- "description": "Operating system name for test execution",
988
- "name": "os-name",
989
- "required": false,
990
- "hasDynamicHelp": false,
991
- "multiple": false,
992
- "type": "option"
993
- },
994
- "os-version": {
995
- "description": "Operating system version for test execution",
996
- "name": "os-version",
997
- "required": false,
998
- "hasDynamicHelp": false,
999
- "multiple": false,
1000
- "type": "option"
1001
- },
1002
- "performance": {
1003
- "description": "Run as performance test",
1004
- "name": "performance",
1005
- "required": false,
1006
- "allowNo": false,
1007
- "type": "boolean"
1008
- },
1009
- "cloud": {
1010
- "description": "Run in cloud",
1011
- "name": "cloud",
1012
- "required": false,
1013
- "allowNo": false,
1014
- "type": "boolean"
1015
- }
1016
- },
1017
- "hasDynamicHelp": false,
1018
- "hiddenAliases": [],
1019
- "id": "atf",
1020
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1021
- "pluginName": "@sonisoft/now-sdk-ext-cli",
1022
- "pluginType": "core",
1023
- "strict": true,
1024
- "enableJsonFlag": true,
1025
- "isESM": true,
1026
- "relativePath": [
1027
- "dist",
1028
- "commands",
1029
- "atf",
1030
- "index.js"
1031
- ]
1032
- },
1033
- "attachment:get": {
1034
- "aliases": [],
1035
- "args": {},
1036
- "description": "Get metadata for a specific attachment.",
1037
- "examples": [
1038
- {
1039
- "command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
1040
- "description": "Get attachment metadata by sys_id"
1041
- },
1042
- {
1043
- "command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
1044
- "description": "Get attachment metadata as JSON"
1045
- }
1046
- ],
1047
- "flags": {
1048
- "json": {
1049
- "description": "Format output as json.",
1050
- "helpGroup": "GLOBAL",
1051
- "name": "json",
1052
- "allowNo": false,
1053
- "type": "boolean"
1054
- },
1055
- "auth": {
1056
- "char": "a",
1057
- "description": "Auth alias to use.",
1058
- "name": "auth",
1059
- "required": false,
1060
- "hasDynamicHelp": false,
1061
- "multiple": false,
1062
- "type": "option"
1063
- },
1064
- "log-level": {
1065
- "helpGroup": "GLOBAL",
1066
- "name": "log-level",
1067
- "summary": "Specify level for logging.",
1068
- "default": "info",
1069
- "hasDynamicHelp": false,
1070
- "multiple": false,
1071
- "options": [
1072
- "debug",
1073
- "warn",
1074
- "error",
1075
- "info",
1076
- "trace"
1077
- ],
1078
- "type": "option"
1079
- },
1080
- "sys-id": {
1081
- "char": "s",
1082
- "description": "Sys ID of the attachment",
1083
- "name": "sys-id",
1084
- "required": true,
1082
+ "description": "Sys ID of the attachment",
1083
+ "name": "sys-id",
1084
+ "required": true,
1085
1085
  "hasDynamicHelp": false,
1086
1086
  "multiple": false,
1087
1087
  "type": "option"
@@ -3094,7 +3094,7 @@
3094
3094
  },
3095
3095
  {
3096
3096
  "description": "Filter logs with multiple conditions (AND logic)",
3097
- "command": "<%= config.bin %> <%= command.id %> --filter \"message CONTAINS x_taniu_tan_core\" --filter \"message CONTAINS error\" --auth dev-instance"
3097
+ "command": "<%= config.bin %> <%= command.id %> --filter \"message CONTAINS x_acme_app\" --filter \"message CONTAINS error\" --auth dev-instance"
3098
3098
  },
3099
3099
  {
3100
3100
  "description": "Filter logs using regex pattern",
@@ -4281,22 +4281,22 @@
4281
4281
  "sync.js"
4282
4282
  ]
4283
4283
  },
4284
- "search:add-table": {
4284
+ "store:install": {
4285
4285
  "aliases": [],
4286
4286
  "args": {},
4287
- "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",
4287
+ "description": "Install an application from the ServiceNow Store.",
4288
4288
  "examples": [
4289
4289
  {
4290
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
4291
- "description": "Add a table to a search group"
4290
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
4291
+ "description": "Install a store application and wait for completion"
4292
4292
  },
4293
4293
  {
4294
- "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
4295
- "description": "Add a table with multiple search fields"
4294
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
4295
+ "description": "Install without waiting for completion"
4296
4296
  },
4297
4297
  {
4298
- "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
4299
- "description": "Add a table with JSON output"
4298
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
4299
+ "description": "Install with demo data"
4300
4300
  }
4301
4301
  ],
4302
4302
  "flags": {
@@ -4332,28 +4332,51 @@
4332
4332
  ],
4333
4333
  "type": "option"
4334
4334
  },
4335
- "search-fields": {
4336
- "char": "f",
4337
- "description": "Comma-separated list of fields to index for search",
4338
- "name": "search-fields",
4335
+ "app-id": {
4336
+ "char": "a",
4337
+ "description": "Store application sys_id",
4338
+ "name": "app-id",
4339
4339
  "required": true,
4340
4340
  "hasDynamicHelp": false,
4341
4341
  "multiple": false,
4342
4342
  "type": "option"
4343
4343
  },
4344
- "search-group": {
4345
- "char": "g",
4346
- "description": "Search group to add the table to",
4347
- "name": "search-group",
4348
- "required": true,
4344
+ "demo-data": {
4345
+ "description": "Load demo data during installation",
4346
+ "name": "demo-data",
4347
+ "required": false,
4348
+ "allowNo": false,
4349
+ "type": "boolean"
4350
+ },
4351
+ "no-wait": {
4352
+ "description": "Do not wait for installation to complete",
4353
+ "name": "no-wait",
4354
+ "required": false,
4355
+ "allowNo": false,
4356
+ "type": "boolean"
4357
+ },
4358
+ "poll-interval": {
4359
+ "description": "Polling interval in milliseconds",
4360
+ "name": "poll-interval",
4361
+ "required": false,
4362
+ "default": 5000,
4349
4363
  "hasDynamicHelp": false,
4350
4364
  "multiple": false,
4351
4365
  "type": "option"
4352
4366
  },
4353
- "table": {
4354
- "char": "t",
4355
- "description": "Table name to add to the search group",
4356
- "name": "table",
4367
+ "timeout": {
4368
+ "description": "Installation timeout in milliseconds",
4369
+ "name": "timeout",
4370
+ "required": false,
4371
+ "default": 1800000,
4372
+ "hasDynamicHelp": false,
4373
+ "multiple": false,
4374
+ "type": "option"
4375
+ },
4376
+ "version": {
4377
+ "char": "v",
4378
+ "description": "Application version to install",
4379
+ "name": "version",
4357
4380
  "required": true,
4358
4381
  "hasDynamicHelp": false,
4359
4382
  "multiple": false,
@@ -4362,7 +4385,7 @@
4362
4385
  },
4363
4386
  "hasDynamicHelp": false,
4364
4387
  "hiddenAliases": [],
4365
- "id": "search:add-table",
4388
+ "id": "store:install",
4366
4389
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4367
4390
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4368
4391
  "pluginType": "core",
@@ -4372,22 +4395,26 @@
4372
4395
  "relativePath": [
4373
4396
  "dist",
4374
4397
  "commands",
4375
- "search",
4376
- "add-table.js"
4398
+ "store",
4399
+ "install.js"
4377
4400
  ]
4378
4401
  },
4379
- "search:groups": {
4402
+ "store:search": {
4380
4403
  "aliases": [],
4381
4404
  "args": {},
4382
- "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",
4405
+ "description": "Search for applications in the ServiceNow Store.",
4383
4406
  "examples": [
4384
4407
  {
4385
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
4386
- "description": "List all search groups"
4408
+ "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
4409
+ "description": "Search for applications matching a term"
4387
4410
  },
4388
4411
  {
4389
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
4390
- "description": "List search groups with JSON output"
4412
+ "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
4413
+ "description": "List installed applications"
4414
+ },
4415
+ {
4416
+ "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
4417
+ "description": "List applications with available updates"
4391
4418
  }
4392
4419
  ],
4393
4420
  "flags": {
@@ -4422,44 +4449,72 @@
4422
4449
  "trace"
4423
4450
  ],
4424
4451
  "type": "option"
4425
- }
4426
- },
4427
- "hasDynamicHelp": false,
4428
- "hiddenAliases": [],
4429
- "id": "search:groups",
4430
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4431
- "pluginName": "@sonisoft/now-sdk-ext-cli",
4432
- "pluginType": "core",
4433
- "strict": true,
4434
- "enableJsonFlag": true,
4435
- "isESM": true,
4436
- "relativePath": [
4437
- "dist",
4438
- "commands",
4439
- "search",
4440
- "groups.js"
4441
- ]
4442
- },
4443
- "search": {
4444
- "aliases": [],
4445
- "args": {},
4446
- "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",
4447
- "examples": [
4448
- {
4449
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
4450
- "description": "Search for a term across the entire instance"
4451
- },
4452
- {
4453
- "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
4454
- "description": "Search within a specific application scope"
4455
4452
  },
4456
- {
4457
- "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
4458
- "description": "Search within a specific table and search group"
4453
+ "limit": {
4454
+ "description": "Maximum number of results to return",
4455
+ "name": "limit",
4456
+ "required": false,
4457
+ "default": 20,
4458
+ "hasDynamicHelp": false,
4459
+ "multiple": false,
4460
+ "type": "option"
4461
+ },
4462
+ "tab": {
4463
+ "description": "Store tab context to search",
4464
+ "name": "tab",
4465
+ "required": false,
4466
+ "default": "available_for_you",
4467
+ "hasDynamicHelp": false,
4468
+ "multiple": false,
4469
+ "options": [
4470
+ "available_for_you",
4471
+ "installed",
4472
+ "updates"
4473
+ ],
4474
+ "type": "option"
4475
+ },
4476
+ "term": {
4477
+ "char": "t",
4478
+ "description": "Search term",
4479
+ "name": "term",
4480
+ "required": false,
4481
+ "hasDynamicHelp": false,
4482
+ "multiple": false,
4483
+ "type": "option"
4484
+ }
4485
+ },
4486
+ "hasDynamicHelp": false,
4487
+ "hiddenAliases": [],
4488
+ "id": "store:search",
4489
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4490
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
4491
+ "pluginType": "core",
4492
+ "strict": true,
4493
+ "enableJsonFlag": true,
4494
+ "isESM": true,
4495
+ "relativePath": [
4496
+ "dist",
4497
+ "commands",
4498
+ "store",
4499
+ "search.js"
4500
+ ]
4501
+ },
4502
+ "store:update": {
4503
+ "aliases": [],
4504
+ "args": {},
4505
+ "description": "Update a ServiceNow Store application to a new version.",
4506
+ "examples": [
4507
+ {
4508
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
4509
+ "description": "Update a store application and wait for completion"
4459
4510
  },
4460
4511
  {
4461
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
4462
- "description": "Search with a result limit and JSON output"
4512
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
4513
+ "description": "Update without waiting for completion"
4514
+ },
4515
+ {
4516
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
4517
+ "description": "Update with custom timeout (1 hour)"
4463
4518
  }
4464
4519
  ],
4465
4520
  "flags": {
@@ -4495,45 +4550,44 @@
4495
4550
  ],
4496
4551
  "type": "option"
4497
4552
  },
4498
- "limit": {
4499
- "char": "l",
4500
- "description": "Maximum number of results to return",
4501
- "name": "limit",
4502
- "required": false,
4553
+ "app-id": {
4554
+ "char": "a",
4555
+ "description": "Store application sys_id",
4556
+ "name": "app-id",
4557
+ "required": true,
4503
4558
  "hasDynamicHelp": false,
4504
4559
  "multiple": false,
4505
4560
  "type": "option"
4506
4561
  },
4507
- "scope": {
4508
- "char": "s",
4509
- "description": "Application scope to search within",
4510
- "name": "scope",
4562
+ "no-wait": {
4563
+ "description": "Do not wait for update to complete",
4564
+ "name": "no-wait",
4511
4565
  "required": false,
4512
- "hasDynamicHelp": false,
4513
- "multiple": false,
4514
- "type": "option"
4566
+ "allowNo": false,
4567
+ "type": "boolean"
4515
4568
  },
4516
- "search-group": {
4517
- "char": "g",
4518
- "description": "Search group to search within (required when using --table)",
4519
- "name": "search-group",
4569
+ "poll-interval": {
4570
+ "description": "Polling interval in milliseconds",
4571
+ "name": "poll-interval",
4520
4572
  "required": false,
4573
+ "default": 5000,
4521
4574
  "hasDynamicHelp": false,
4522
4575
  "multiple": false,
4523
4576
  "type": "option"
4524
4577
  },
4525
- "table": {
4526
- "description": "Table name to search within (requires --search-group)",
4527
- "name": "table",
4578
+ "timeout": {
4579
+ "description": "Update timeout in milliseconds",
4580
+ "name": "timeout",
4528
4581
  "required": false,
4582
+ "default": 1800000,
4529
4583
  "hasDynamicHelp": false,
4530
4584
  "multiple": false,
4531
4585
  "type": "option"
4532
4586
  },
4533
- "term": {
4534
- "char": "t",
4535
- "description": "Search term to look for in platform code",
4536
- "name": "term",
4587
+ "version": {
4588
+ "char": "v",
4589
+ "description": "Target application version",
4590
+ "name": "version",
4537
4591
  "required": true,
4538
4592
  "hasDynamicHelp": false,
4539
4593
  "multiple": false,
@@ -4542,7 +4596,7 @@
4542
4596
  },
4543
4597
  "hasDynamicHelp": false,
4544
4598
  "hiddenAliases": [],
4545
- "id": "search",
4599
+ "id": "store:update",
4546
4600
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4547
4601
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4548
4602
  "pluginType": "core",
@@ -4552,22 +4606,18 @@
4552
4606
  "relativePath": [
4553
4607
  "dist",
4554
4608
  "commands",
4555
- "search",
4556
- "index.js"
4609
+ "store",
4610
+ "update.js"
4557
4611
  ]
4558
4612
  },
4559
- "search:tables": {
4613
+ "store:validate": {
4560
4614
  "aliases": [],
4561
4615
  "args": {},
4562
- "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",
4616
+ "description": "Validate a batch installation definition file.",
4563
4617
  "examples": [
4564
4618
  {
4565
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
4566
- "description": "List tables in a search group"
4567
- },
4568
- {
4569
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
4570
- "description": "List tables with JSON output"
4619
+ "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
4620
+ "description": "Validate a batch definition file"
4571
4621
  }
4572
4622
  ],
4573
4623
  "flags": {
@@ -4603,10 +4653,10 @@
4603
4653
  ],
4604
4654
  "type": "option"
4605
4655
  },
4606
- "search-group": {
4607
- "char": "g",
4608
- "description": "Search group name to list tables for",
4609
- "name": "search-group",
4656
+ "file": {
4657
+ "char": "f",
4658
+ "description": "Path to batch definition JSON file",
4659
+ "name": "file",
4610
4660
  "required": true,
4611
4661
  "hasDynamicHelp": false,
4612
4662
  "multiple": false,
@@ -4615,7 +4665,7 @@
4615
4665
  },
4616
4666
  "hasDynamicHelp": false,
4617
4667
  "hiddenAliases": [],
4618
- "id": "search:tables",
4668
+ "id": "store:validate",
4619
4669
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4620
4670
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4621
4671
  "pluginType": "core",
@@ -4625,26 +4675,22 @@
4625
4675
  "relativePath": [
4626
4676
  "dist",
4627
4677
  "commands",
4628
- "search",
4629
- "tables.js"
4678
+ "store",
4679
+ "validate.js"
4630
4680
  ]
4631
4681
  },
4632
- "store:install": {
4682
+ "task:approve": {
4633
4683
  "aliases": [],
4634
4684
  "args": {},
4635
- "description": "Install an application from the ServiceNow Store.",
4685
+ "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",
4636
4686
  "examples": [
4637
4687
  {
4638
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
4639
- "description": "Install a store application and wait for completion"
4640
- },
4641
- {
4642
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
4643
- "description": "Install without waiting for completion"
4688
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
4689
+ "description": "Approve a change request"
4644
4690
  },
4645
4691
  {
4646
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
4647
- "description": "Install with demo data"
4692
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
4693
+ "description": "Approve a change request with comments"
4648
4694
  }
4649
4695
  ],
4650
4696
  "flags": {
@@ -4680,51 +4726,19 @@
4680
4726
  ],
4681
4727
  "type": "option"
4682
4728
  },
4683
- "app-id": {
4684
- "char": "a",
4685
- "description": "Store application sys_id",
4686
- "name": "app-id",
4687
- "required": true,
4688
- "hasDynamicHelp": false,
4689
- "multiple": false,
4690
- "type": "option"
4691
- },
4692
- "demo-data": {
4693
- "description": "Load demo data during installation",
4694
- "name": "demo-data",
4695
- "required": false,
4696
- "allowNo": false,
4697
- "type": "boolean"
4698
- },
4699
- "no-wait": {
4700
- "description": "Do not wait for installation to complete",
4701
- "name": "no-wait",
4702
- "required": false,
4703
- "allowNo": false,
4704
- "type": "boolean"
4705
- },
4706
- "poll-interval": {
4707
- "description": "Polling interval in milliseconds",
4708
- "name": "poll-interval",
4709
- "required": false,
4710
- "default": 5000,
4711
- "hasDynamicHelp": false,
4712
- "multiple": false,
4713
- "type": "option"
4714
- },
4715
- "timeout": {
4716
- "description": "Installation timeout in milliseconds",
4717
- "name": "timeout",
4729
+ "comments": {
4730
+ "char": "c",
4731
+ "description": "Approval comments",
4732
+ "name": "comments",
4718
4733
  "required": false,
4719
- "default": 1800000,
4720
4734
  "hasDynamicHelp": false,
4721
4735
  "multiple": false,
4722
4736
  "type": "option"
4723
4737
  },
4724
- "version": {
4725
- "char": "v",
4726
- "description": "Application version to install",
4727
- "name": "version",
4738
+ "number": {
4739
+ "char": "n",
4740
+ "description": "Change request number (e.g., CHG0010001)",
4741
+ "name": "number",
4728
4742
  "required": true,
4729
4743
  "hasDynamicHelp": false,
4730
4744
  "multiple": false,
@@ -4733,7 +4747,7 @@
4733
4747
  },
4734
4748
  "hasDynamicHelp": false,
4735
4749
  "hiddenAliases": [],
4736
- "id": "store:install",
4750
+ "id": "task:approve",
4737
4751
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4738
4752
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4739
4753
  "pluginType": "core",
@@ -4743,26 +4757,26 @@
4743
4757
  "relativePath": [
4744
4758
  "dist",
4745
4759
  "commands",
4746
- "store",
4747
- "install.js"
4760
+ "task",
4761
+ "approve.js"
4748
4762
  ]
4749
4763
  },
4750
- "store:search": {
4764
+ "task:assign": {
4751
4765
  "aliases": [],
4752
4766
  "args": {},
4753
- "description": "Search for applications in the ServiceNow Store.",
4767
+ "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",
4754
4768
  "examples": [
4755
4769
  {
4756
- "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
4757
- "description": "Search for applications matching a term"
4770
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
4771
+ "description": "Assign an incident to a user"
4758
4772
  },
4759
4773
  {
4760
- "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
4761
- "description": "List installed applications"
4774
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
4775
+ "description": "Assign an incident to a user and group"
4762
4776
  },
4763
4777
  {
4764
- "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
4765
- "description": "List applications with available updates"
4778
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
4779
+ "description": "Assign a change request to a user"
4766
4780
  }
4767
4781
  ],
4768
4782
  "flags": {
@@ -4798,34 +4812,38 @@
4798
4812
  ],
4799
4813
  "type": "option"
4800
4814
  },
4801
- "limit": {
4802
- "description": "Maximum number of results to return",
4803
- "name": "limit",
4815
+ "group": {
4816
+ "char": "g",
4817
+ "description": "Assignment group",
4818
+ "name": "group",
4804
4819
  "required": false,
4805
- "default": 20,
4806
4820
  "hasDynamicHelp": false,
4807
4821
  "multiple": false,
4808
4822
  "type": "option"
4809
4823
  },
4810
- "tab": {
4811
- "description": "Store tab context to search",
4812
- "name": "tab",
4813
- "required": false,
4814
- "default": "available_for_you",
4824
+ "number": {
4825
+ "char": "n",
4826
+ "description": "Task number (e.g., INC0010001)",
4827
+ "name": "number",
4828
+ "required": true,
4815
4829
  "hasDynamicHelp": false,
4816
4830
  "multiple": false,
4817
- "options": [
4818
- "available_for_you",
4819
- "installed",
4820
- "updates"
4821
- ],
4822
4831
  "type": "option"
4823
4832
  },
4824
- "term": {
4825
- "char": "t",
4826
- "description": "Search term",
4827
- "name": "term",
4833
+ "table": {
4834
+ "description": "ServiceNow table name",
4835
+ "name": "table",
4828
4836
  "required": false,
4837
+ "default": "task",
4838
+ "hasDynamicHelp": false,
4839
+ "multiple": false,
4840
+ "type": "option"
4841
+ },
4842
+ "user": {
4843
+ "char": "u",
4844
+ "description": "User to assign the task to",
4845
+ "name": "user",
4846
+ "required": true,
4829
4847
  "hasDynamicHelp": false,
4830
4848
  "multiple": false,
4831
4849
  "type": "option"
@@ -4833,7 +4851,7 @@
4833
4851
  },
4834
4852
  "hasDynamicHelp": false,
4835
4853
  "hiddenAliases": [],
4836
- "id": "store:search",
4854
+ "id": "task:assign",
4837
4855
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4838
4856
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4839
4857
  "pluginType": "core",
@@ -4843,26 +4861,22 @@
4843
4861
  "relativePath": [
4844
4862
  "dist",
4845
4863
  "commands",
4846
- "store",
4847
- "search.js"
4864
+ "task",
4865
+ "assign.js"
4848
4866
  ]
4849
4867
  },
4850
- "store:update": {
4868
+ "task:close": {
4851
4869
  "aliases": [],
4852
4870
  "args": {},
4853
- "description": "Update a ServiceNow Store application to a new version.",
4871
+ "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",
4854
4872
  "examples": [
4855
4873
  {
4856
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
4857
- "description": "Update a store application and wait for completion"
4858
- },
4859
- {
4860
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
4861
- "description": "Update without waiting for completion"
4874
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
4875
+ "description": "Close an incident with close notes"
4862
4876
  },
4863
4877
  {
4864
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
4865
- "description": "Update with custom timeout (1 hour)"
4878
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
4879
+ "description": "Close with a specific close code"
4866
4880
  }
4867
4881
  ],
4868
4882
  "flags": {
@@ -4898,44 +4912,26 @@
4898
4912
  ],
4899
4913
  "type": "option"
4900
4914
  },
4901
- "app-id": {
4902
- "char": "a",
4903
- "description": "Store application sys_id",
4904
- "name": "app-id",
4905
- "required": true,
4906
- "hasDynamicHelp": false,
4907
- "multiple": false,
4908
- "type": "option"
4909
- },
4910
- "no-wait": {
4911
- "description": "Do not wait for update to complete",
4912
- "name": "no-wait",
4913
- "required": false,
4914
- "allowNo": false,
4915
- "type": "boolean"
4916
- },
4917
- "poll-interval": {
4918
- "description": "Polling interval in milliseconds",
4919
- "name": "poll-interval",
4915
+ "close-code": {
4916
+ "description": "Close code for the closure",
4917
+ "name": "close-code",
4920
4918
  "required": false,
4921
- "default": 5000,
4922
4919
  "hasDynamicHelp": false,
4923
4920
  "multiple": false,
4924
4921
  "type": "option"
4925
4922
  },
4926
- "timeout": {
4927
- "description": "Update timeout in milliseconds",
4928
- "name": "timeout",
4929
- "required": false,
4930
- "default": 1800000,
4923
+ "notes": {
4924
+ "description": "Close notes",
4925
+ "name": "notes",
4926
+ "required": true,
4931
4927
  "hasDynamicHelp": false,
4932
4928
  "multiple": false,
4933
4929
  "type": "option"
4934
4930
  },
4935
- "version": {
4936
- "char": "v",
4937
- "description": "Target application version",
4938
- "name": "version",
4931
+ "number": {
4932
+ "char": "n",
4933
+ "description": "Incident number (e.g., INC0010001)",
4934
+ "name": "number",
4939
4935
  "required": true,
4940
4936
  "hasDynamicHelp": false,
4941
4937
  "multiple": false,
@@ -4944,7 +4940,7 @@
4944
4940
  },
4945
4941
  "hasDynamicHelp": false,
4946
4942
  "hiddenAliases": [],
4947
- "id": "store:update",
4943
+ "id": "task:close",
4948
4944
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4949
4945
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4950
4946
  "pluginType": "core",
@@ -4954,18 +4950,26 @@
4954
4950
  "relativePath": [
4955
4951
  "dist",
4956
4952
  "commands",
4957
- "store",
4958
- "update.js"
4953
+ "task",
4954
+ "close.js"
4959
4955
  ]
4960
4956
  },
4961
- "store:validate": {
4957
+ "task:comment": {
4962
4958
  "aliases": [],
4963
4959
  "args": {},
4964
- "description": "Validate a batch installation definition file.",
4960
+ "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",
4965
4961
  "examples": [
4966
4962
  {
4967
- "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
4968
- "description": "Validate a batch definition file"
4963
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
4964
+ "description": "Add a comment to an incident"
4965
+ },
4966
+ {
4967
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
4968
+ "description": "Add a work note to an incident"
4969
+ },
4970
+ {
4971
+ "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
4972
+ "description": "Add a comment to a change request"
4969
4973
  }
4970
4974
  ],
4971
4975
  "flags": {
@@ -5001,19 +5005,44 @@
5001
5005
  ],
5002
5006
  "type": "option"
5003
5007
  },
5004
- "file": {
5005
- "char": "f",
5006
- "description": "Path to batch definition JSON file",
5007
- "name": "file",
5008
+ "comment": {
5009
+ "char": "c",
5010
+ "description": "Comment text to add",
5011
+ "name": "comment",
5012
+ "required": true,
5013
+ "hasDynamicHelp": false,
5014
+ "multiple": false,
5015
+ "type": "option"
5016
+ },
5017
+ "number": {
5018
+ "char": "n",
5019
+ "description": "Task number (e.g., INC0010001)",
5020
+ "name": "number",
5008
5021
  "required": true,
5009
5022
  "hasDynamicHelp": false,
5010
5023
  "multiple": false,
5011
5024
  "type": "option"
5025
+ },
5026
+ "table": {
5027
+ "description": "ServiceNow table name",
5028
+ "name": "table",
5029
+ "required": false,
5030
+ "default": "task",
5031
+ "hasDynamicHelp": false,
5032
+ "multiple": false,
5033
+ "type": "option"
5034
+ },
5035
+ "work-note": {
5036
+ "description": "Add as work note instead of comment",
5037
+ "name": "work-note",
5038
+ "required": false,
5039
+ "allowNo": false,
5040
+ "type": "boolean"
5012
5041
  }
5013
5042
  },
5014
5043
  "hasDynamicHelp": false,
5015
5044
  "hiddenAliases": [],
5016
- "id": "store:validate",
5045
+ "id": "task:comment",
5017
5046
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5018
5047
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5019
5048
  "pluginType": "core",
@@ -5023,22 +5052,26 @@
5023
5052
  "relativePath": [
5024
5053
  "dist",
5025
5054
  "commands",
5026
- "store",
5027
- "validate.js"
5055
+ "task",
5056
+ "comment.js"
5028
5057
  ]
5029
5058
  },
5030
- "task:approve": {
5059
+ "task:find": {
5031
5060
  "aliases": [],
5032
5061
  "args": {},
5033
- "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",
5062
+ "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",
5034
5063
  "examples": [
5035
5064
  {
5036
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --auth dev",
5037
- "description": "Approve a change request"
5065
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
5066
+ "description": "Find an incident by number"
5038
5067
  },
5039
5068
  {
5040
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 -c \"Looks good, approved\" --auth dev",
5041
- "description": "Approve a change request with comments"
5069
+ "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
5070
+ "description": "Find a change request by number"
5071
+ },
5072
+ {
5073
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
5074
+ "description": "Find an incident and output as JSON"
5042
5075
  }
5043
5076
  ],
5044
5077
  "flags": {
@@ -5074,28 +5107,28 @@
5074
5107
  ],
5075
5108
  "type": "option"
5076
5109
  },
5077
- "comments": {
5078
- "char": "c",
5079
- "description": "Approval comments",
5080
- "name": "comments",
5081
- "required": false,
5082
- "hasDynamicHelp": false,
5083
- "multiple": false,
5084
- "type": "option"
5085
- },
5086
5110
  "number": {
5087
5111
  "char": "n",
5088
- "description": "Change request number (e.g., CHG0010001)",
5112
+ "description": "Task number (e.g., INC0010001, CHG0010001)",
5089
5113
  "name": "number",
5090
5114
  "required": true,
5091
5115
  "hasDynamicHelp": false,
5092
5116
  "multiple": false,
5093
5117
  "type": "option"
5118
+ },
5119
+ "table": {
5120
+ "description": "ServiceNow table name",
5121
+ "name": "table",
5122
+ "required": false,
5123
+ "default": "task",
5124
+ "hasDynamicHelp": false,
5125
+ "multiple": false,
5126
+ "type": "option"
5094
5127
  }
5095
5128
  },
5096
5129
  "hasDynamicHelp": false,
5097
5130
  "hiddenAliases": [],
5098
- "id": "task:approve",
5131
+ "id": "task:find",
5099
5132
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5100
5133
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5101
5134
  "pluginType": "core",
@@ -5106,25 +5139,21 @@
5106
5139
  "dist",
5107
5140
  "commands",
5108
5141
  "task",
5109
- "approve.js"
5142
+ "find.js"
5110
5143
  ]
5111
5144
  },
5112
- "task:assign": {
5145
+ "task:resolve": {
5113
5146
  "aliases": [],
5114
5147
  "args": {},
5115
- "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",
5148
+ "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",
5116
5149
  "examples": [
5117
5150
  {
5118
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --user admin --auth dev",
5119
- "description": "Assign an incident to a user"
5120
- },
5121
- {
5122
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -u admin -g \"Service Desk\" --auth dev",
5123
- "description": "Assign an incident to a user and group"
5151
+ "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
5152
+ "description": "Resolve an incident with resolution notes"
5124
5153
  },
5125
5154
  {
5126
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --user admin --auth dev",
5127
- "description": "Assign a change request to a user"
5155
+ "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
5156
+ "description": "Resolve with a specific close code"
5128
5157
  }
5129
5158
  ],
5130
5159
  "flags": {
@@ -5160,37 +5189,26 @@
5160
5189
  ],
5161
5190
  "type": "option"
5162
5191
  },
5163
- "group": {
5164
- "char": "g",
5165
- "description": "Assignment group",
5166
- "name": "group",
5192
+ "close-code": {
5193
+ "description": "Close code for the resolution",
5194
+ "name": "close-code",
5167
5195
  "required": false,
5168
5196
  "hasDynamicHelp": false,
5169
5197
  "multiple": false,
5170
5198
  "type": "option"
5171
5199
  },
5172
- "number": {
5173
- "char": "n",
5174
- "description": "Task number (e.g., INC0010001)",
5175
- "name": "number",
5200
+ "notes": {
5201
+ "description": "Resolution notes",
5202
+ "name": "notes",
5176
5203
  "required": true,
5177
5204
  "hasDynamicHelp": false,
5178
5205
  "multiple": false,
5179
5206
  "type": "option"
5180
5207
  },
5181
- "table": {
5182
- "description": "ServiceNow table name",
5183
- "name": "table",
5184
- "required": false,
5185
- "default": "task",
5186
- "hasDynamicHelp": false,
5187
- "multiple": false,
5188
- "type": "option"
5189
- },
5190
- "user": {
5191
- "char": "u",
5192
- "description": "User to assign the task to",
5193
- "name": "user",
5208
+ "number": {
5209
+ "char": "n",
5210
+ "description": "Incident number (e.g., INC0010001)",
5211
+ "name": "number",
5194
5212
  "required": true,
5195
5213
  "hasDynamicHelp": false,
5196
5214
  "multiple": false,
@@ -5199,7 +5217,7 @@
5199
5217
  },
5200
5218
  "hasDynamicHelp": false,
5201
5219
  "hiddenAliases": [],
5202
- "id": "task:assign",
5220
+ "id": "task:resolve",
5203
5221
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5204
5222
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5205
5223
  "pluginType": "core",
@@ -5210,21 +5228,21 @@
5210
5228
  "dist",
5211
5229
  "commands",
5212
5230
  "task",
5213
- "assign.js"
5231
+ "resolve.js"
5214
5232
  ]
5215
5233
  },
5216
- "task:close": {
5234
+ "update-set:clone": {
5217
5235
  "aliases": [],
5218
5236
  "args": {},
5219
- "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",
5237
+ "description": "Clone an update set and its records.",
5220
5238
  "examples": [
5221
5239
  {
5222
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue confirmed resolved by user\" --auth dev",
5223
- "description": "Close an incident with close notes"
5240
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
5241
+ "description": "Clone an update set"
5224
5242
  },
5225
5243
  {
5226
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Closed\" --close-code \"Solved (Permanently)\" --auth dev",
5227
- "description": "Close with a specific close code"
5244
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
5245
+ "description": "Clone with JSON output"
5228
5246
  }
5229
5247
  ],
5230
5248
  "flags": {
@@ -5260,26 +5278,19 @@
5260
5278
  ],
5261
5279
  "type": "option"
5262
5280
  },
5263
- "close-code": {
5264
- "description": "Close code for the closure",
5265
- "name": "close-code",
5266
- "required": false,
5267
- "hasDynamicHelp": false,
5268
- "multiple": false,
5269
- "type": "option"
5270
- },
5271
- "notes": {
5272
- "description": "Close notes",
5273
- "name": "notes",
5281
+ "name": {
5282
+ "char": "n",
5283
+ "description": "Name for the cloned update set",
5284
+ "name": "name",
5274
5285
  "required": true,
5275
5286
  "hasDynamicHelp": false,
5276
5287
  "multiple": false,
5277
5288
  "type": "option"
5278
5289
  },
5279
- "number": {
5280
- "char": "n",
5281
- "description": "Incident number (e.g., INC0010001)",
5282
- "name": "number",
5290
+ "source": {
5291
+ "char": "s",
5292
+ "description": "Source update set sys_id",
5293
+ "name": "source",
5283
5294
  "required": true,
5284
5295
  "hasDynamicHelp": false,
5285
5296
  "multiple": false,
@@ -5288,7 +5299,7 @@
5288
5299
  },
5289
5300
  "hasDynamicHelp": false,
5290
5301
  "hiddenAliases": [],
5291
- "id": "task:close",
5302
+ "id": "update-set:clone",
5292
5303
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5293
5304
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5294
5305
  "pluginType": "core",
@@ -5298,26 +5309,26 @@
5298
5309
  "relativePath": [
5299
5310
  "dist",
5300
5311
  "commands",
5301
- "task",
5302
- "close.js"
5312
+ "update-set",
5313
+ "clone.js"
5303
5314
  ]
5304
5315
  },
5305
- "task:comment": {
5316
+ "update-set:create": {
5306
5317
  "aliases": [],
5307
5318
  "args": {},
5308
- "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",
5319
+ "description": "Create a new update set.",
5309
5320
  "examples": [
5310
5321
  {
5311
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --comment \"Investigating the issue\" --auth dev",
5312
- "description": "Add a comment to an incident"
5322
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
5323
+ "description": "Create a new update set with a name"
5313
5324
  },
5314
5325
  {
5315
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 -c \"Internal update\" --work-note --auth dev",
5316
- "description": "Add a work note to an incident"
5326
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
5327
+ "description": "Create with name and description"
5317
5328
  },
5318
5329
  {
5319
- "command": "<%= config.bin %> <%= command.id %> --number CHG0010001 --table change_request --comment \"Approved\" --auth dev",
5320
- "description": "Add a comment to a change request"
5330
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
5331
+ "description": "Create within a specific application scope"
5321
5332
  }
5322
5333
  ],
5323
5334
  "flags": {
@@ -5353,44 +5364,36 @@
5353
5364
  ],
5354
5365
  "type": "option"
5355
5366
  },
5356
- "comment": {
5357
- "char": "c",
5358
- "description": "Comment text to add",
5359
- "name": "comment",
5360
- "required": true,
5367
+ "application": {
5368
+ "description": "Application scope for the new update set",
5369
+ "name": "application",
5370
+ "required": false,
5361
5371
  "hasDynamicHelp": false,
5362
5372
  "multiple": false,
5363
5373
  "type": "option"
5364
5374
  },
5365
- "number": {
5366
- "char": "n",
5367
- "description": "Task number (e.g., INC0010001)",
5368
- "name": "number",
5369
- "required": true,
5375
+ "description": {
5376
+ "char": "d",
5377
+ "description": "Description for the new update set",
5378
+ "name": "description",
5379
+ "required": false,
5370
5380
  "hasDynamicHelp": false,
5371
5381
  "multiple": false,
5372
5382
  "type": "option"
5373
5383
  },
5374
- "table": {
5375
- "description": "ServiceNow table name",
5376
- "name": "table",
5377
- "required": false,
5378
- "default": "task",
5384
+ "name": {
5385
+ "char": "n",
5386
+ "description": "Name for the new update set",
5387
+ "name": "name",
5388
+ "required": true,
5379
5389
  "hasDynamicHelp": false,
5380
5390
  "multiple": false,
5381
5391
  "type": "option"
5382
- },
5383
- "work-note": {
5384
- "description": "Add as work note instead of comment",
5385
- "name": "work-note",
5386
- "required": false,
5387
- "allowNo": false,
5388
- "type": "boolean"
5389
5392
  }
5390
5393
  },
5391
5394
  "hasDynamicHelp": false,
5392
5395
  "hiddenAliases": [],
5393
- "id": "task:comment",
5396
+ "id": "update-set:create",
5394
5397
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5395
5398
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5396
5399
  "pluginType": "core",
@@ -5400,26 +5403,26 @@
5400
5403
  "relativePath": [
5401
5404
  "dist",
5402
5405
  "commands",
5403
- "task",
5404
- "comment.js"
5406
+ "update-set",
5407
+ "create.js"
5405
5408
  ]
5406
5409
  },
5407
- "task:find": {
5410
+ "update-set:current": {
5408
5411
  "aliases": [],
5409
5412
  "args": {},
5410
- "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",
5413
+ "description": "Get or set the current update set.",
5411
5414
  "examples": [
5412
5415
  {
5413
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --auth dev",
5414
- "description": "Find an incident by number"
5416
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5417
+ "description": "Get the current update set"
5415
5418
  },
5416
5419
  {
5417
- "command": "<%= config.bin %> <%= command.id %> -n CHG0010001 --table change_request --auth dev",
5418
- "description": "Find a change request by number"
5420
+ "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
5421
+ "description": "Set the current update set by sys_id"
5419
5422
  },
5420
- {
5421
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --json --auth dev",
5422
- "description": "Find an incident and output as JSON"
5423
+ {
5424
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5425
+ "description": "Get the current update set as JSON"
5423
5426
  }
5424
5427
  ],
5425
5428
  "flags": {
@@ -5455,20 +5458,11 @@
5455
5458
  ],
5456
5459
  "type": "option"
5457
5460
  },
5458
- "number": {
5459
- "char": "n",
5460
- "description": "Task number (e.g., INC0010001, CHG0010001)",
5461
- "name": "number",
5462
- "required": true,
5463
- "hasDynamicHelp": false,
5464
- "multiple": false,
5465
- "type": "option"
5466
- },
5467
- "table": {
5468
- "description": "ServiceNow table name",
5469
- "name": "table",
5461
+ "set": {
5462
+ "char": "s",
5463
+ "description": "sys_id of update set to make current",
5464
+ "name": "set",
5470
5465
  "required": false,
5471
- "default": "task",
5472
5466
  "hasDynamicHelp": false,
5473
5467
  "multiple": false,
5474
5468
  "type": "option"
@@ -5476,7 +5470,7 @@
5476
5470
  },
5477
5471
  "hasDynamicHelp": false,
5478
5472
  "hiddenAliases": [],
5479
- "id": "task:find",
5473
+ "id": "update-set:current",
5480
5474
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5481
5475
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5482
5476
  "pluginType": "core",
@@ -5486,22 +5480,26 @@
5486
5480
  "relativePath": [
5487
5481
  "dist",
5488
5482
  "commands",
5489
- "task",
5490
- "find.js"
5483
+ "update-set",
5484
+ "current.js"
5491
5485
  ]
5492
5486
  },
5493
- "task:resolve": {
5487
+ "update-set": {
5494
5488
  "aliases": [],
5495
5489
  "args": {},
5496
- "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",
5490
+ "description": "List update sets on a ServiceNow instance.",
5497
5491
  "examples": [
5498
5492
  {
5499
- "command": "<%= config.bin %> <%= command.id %> --number INC0010001 --notes \"Issue resolved by restarting the service\" --auth dev",
5500
- "description": "Resolve an incident with resolution notes"
5493
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5494
+ "description": "List update sets with default limit"
5501
5495
  },
5502
5496
  {
5503
- "command": "<%= config.bin %> <%= command.id %> -n INC0010001 --notes \"Fixed\" --close-code \"Solved (Permanently)\" --auth dev",
5504
- "description": "Resolve with a specific close code"
5497
+ "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
5498
+ "description": "List update sets with a custom query filter"
5499
+ },
5500
+ {
5501
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5502
+ "description": "List update sets with JSON output"
5505
5503
  }
5506
5504
  ],
5507
5505
  "flags": {
@@ -5537,27 +5535,20 @@
5537
5535
  ],
5538
5536
  "type": "option"
5539
5537
  },
5540
- "close-code": {
5541
- "description": "Close code for the resolution",
5542
- "name": "close-code",
5538
+ "limit": {
5539
+ "description": "Maximum number of update sets to return",
5540
+ "name": "limit",
5543
5541
  "required": false,
5542
+ "default": 20,
5544
5543
  "hasDynamicHelp": false,
5545
5544
  "multiple": false,
5546
5545
  "type": "option"
5547
5546
  },
5548
- "notes": {
5549
- "description": "Resolution notes",
5550
- "name": "notes",
5551
- "required": true,
5552
- "hasDynamicHelp": false,
5553
- "multiple": false,
5554
- "type": "option"
5555
- },
5556
- "number": {
5557
- "char": "n",
5558
- "description": "Incident number (e.g., INC0010001)",
5559
- "name": "number",
5560
- "required": true,
5547
+ "query": {
5548
+ "char": "q",
5549
+ "description": "Encoded query filter",
5550
+ "name": "query",
5551
+ "required": false,
5561
5552
  "hasDynamicHelp": false,
5562
5553
  "multiple": false,
5563
5554
  "type": "option"
@@ -5565,7 +5556,7 @@
5565
5556
  },
5566
5557
  "hasDynamicHelp": false,
5567
5558
  "hiddenAliases": [],
5568
- "id": "task:resolve",
5559
+ "id": "update-set",
5569
5560
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5570
5561
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5571
5562
  "pluginType": "core",
@@ -5575,22 +5566,22 @@
5575
5566
  "relativePath": [
5576
5567
  "dist",
5577
5568
  "commands",
5578
- "task",
5579
- "resolve.js"
5569
+ "update-set",
5570
+ "index.js"
5580
5571
  ]
5581
5572
  },
5582
- "update-set:clone": {
5573
+ "update-set:inspect": {
5583
5574
  "aliases": [],
5584
5575
  "args": {},
5585
- "description": "Clone an update set and its records.",
5576
+ "description": "Inspect the components of an update set.",
5586
5577
  "examples": [
5587
5578
  {
5588
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
5589
- "description": "Clone an update set"
5579
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
5580
+ "description": "Inspect an update set by sys_id"
5590
5581
  },
5591
5582
  {
5592
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
5593
- "description": "Clone with JSON output"
5583
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
5584
+ "description": "Inspect with JSON output"
5594
5585
  }
5595
5586
  ],
5596
5587
  "flags": {
@@ -5626,19 +5617,10 @@
5626
5617
  ],
5627
5618
  "type": "option"
5628
5619
  },
5629
- "name": {
5630
- "char": "n",
5631
- "description": "Name for the cloned update set",
5632
- "name": "name",
5633
- "required": true,
5634
- "hasDynamicHelp": false,
5635
- "multiple": false,
5636
- "type": "option"
5637
- },
5638
- "source": {
5620
+ "sys-id": {
5639
5621
  "char": "s",
5640
- "description": "Source update set sys_id",
5641
- "name": "source",
5622
+ "description": "sys_id of the update set to inspect",
5623
+ "name": "sys-id",
5642
5624
  "required": true,
5643
5625
  "hasDynamicHelp": false,
5644
5626
  "multiple": false,
@@ -5647,7 +5629,7 @@
5647
5629
  },
5648
5630
  "hasDynamicHelp": false,
5649
5631
  "hiddenAliases": [],
5650
- "id": "update-set:clone",
5632
+ "id": "update-set:inspect",
5651
5633
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5652
5634
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5653
5635
  "pluginType": "core",
@@ -5658,25 +5640,25 @@
5658
5640
  "dist",
5659
5641
  "commands",
5660
5642
  "update-set",
5661
- "clone.js"
5643
+ "inspect.js"
5662
5644
  ]
5663
5645
  },
5664
- "update-set:create": {
5646
+ "update-set:move": {
5665
5647
  "aliases": [],
5666
5648
  "args": {},
5667
- "description": "Create a new update set.",
5649
+ "description": "Move records between update sets.",
5668
5650
  "examples": [
5669
5651
  {
5670
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
5671
- "description": "Create a new update set with a name"
5652
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
5653
+ "description": "Move all records from one update set to another"
5672
5654
  },
5673
5655
  {
5674
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
5675
- "description": "Create with name and description"
5656
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
5657
+ "description": "Move specific records to a target update set"
5676
5658
  },
5677
5659
  {
5678
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
5679
- "description": "Create within a specific application scope"
5660
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
5661
+ "description": "Move records with JSON output"
5680
5662
  }
5681
5663
  ],
5682
5664
  "flags": {
@@ -5712,27 +5694,25 @@
5712
5694
  ],
5713
5695
  "type": "option"
5714
5696
  },
5715
- "application": {
5716
- "description": "Application scope for the new update set",
5717
- "name": "application",
5697
+ "records": {
5698
+ "description": "Comma-separated sys_ids of records to move",
5699
+ "name": "records",
5718
5700
  "required": false,
5719
5701
  "hasDynamicHelp": false,
5720
5702
  "multiple": false,
5721
5703
  "type": "option"
5722
5704
  },
5723
- "description": {
5724
- "char": "d",
5725
- "description": "Description for the new update set",
5726
- "name": "description",
5705
+ "source": {
5706
+ "description": "Source update set sys_id",
5707
+ "name": "source",
5727
5708
  "required": false,
5728
5709
  "hasDynamicHelp": false,
5729
5710
  "multiple": false,
5730
5711
  "type": "option"
5731
5712
  },
5732
- "name": {
5733
- "char": "n",
5734
- "description": "Name for the new update set",
5735
- "name": "name",
5713
+ "target": {
5714
+ "description": "Target update set sys_id",
5715
+ "name": "target",
5736
5716
  "required": true,
5737
5717
  "hasDynamicHelp": false,
5738
5718
  "multiple": false,
@@ -5741,7 +5721,7 @@
5741
5721
  },
5742
5722
  "hasDynamicHelp": false,
5743
5723
  "hiddenAliases": [],
5744
- "id": "update-set:create",
5724
+ "id": "update-set:move",
5745
5725
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5746
5726
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5747
5727
  "pluginType": "core",
@@ -5752,25 +5732,21 @@
5752
5732
  "dist",
5753
5733
  "commands",
5754
5734
  "update-set",
5755
- "create.js"
5735
+ "move.js"
5756
5736
  ]
5757
5737
  },
5758
- "update-set:current": {
5738
+ "workflow:create": {
5759
5739
  "aliases": [],
5760
5740
  "args": {},
5761
- "description": "Get or set the current update set.",
5741
+ "description": "Create a complete workflow from a JSON specification file.",
5762
5742
  "examples": [
5763
5743
  {
5764
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5765
- "description": "Get the current update set"
5766
- },
5767
- {
5768
- "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
5769
- "description": "Set the current update set by sys_id"
5744
+ "command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
5745
+ "description": "Create a workflow from a JSON spec file"
5770
5746
  },
5771
5747
  {
5772
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5773
- "description": "Get the current update set as JSON"
5748
+ "command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
5749
+ "description": "Create a workflow and output result as JSON"
5774
5750
  }
5775
5751
  ],
5776
5752
  "flags": {
@@ -5806,11 +5782,11 @@
5806
5782
  ],
5807
5783
  "type": "option"
5808
5784
  },
5809
- "set": {
5785
+ "spec": {
5810
5786
  "char": "s",
5811
- "description": "sys_id of update set to make current",
5812
- "name": "set",
5813
- "required": false,
5787
+ "description": "Path to workflow JSON specification file",
5788
+ "name": "spec",
5789
+ "required": true,
5814
5790
  "hasDynamicHelp": false,
5815
5791
  "multiple": false,
5816
5792
  "type": "option"
@@ -5818,7 +5794,7 @@
5818
5794
  },
5819
5795
  "hasDynamicHelp": false,
5820
5796
  "hiddenAliases": [],
5821
- "id": "update-set:current",
5797
+ "id": "workflow:create",
5822
5798
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5823
5799
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5824
5800
  "pluginType": "core",
@@ -5828,26 +5804,22 @@
5828
5804
  "relativePath": [
5829
5805
  "dist",
5830
5806
  "commands",
5831
- "update-set",
5832
- "current.js"
5807
+ "workflow",
5808
+ "create.js"
5833
5809
  ]
5834
5810
  },
5835
- "update-set": {
5811
+ "workflow:publish": {
5836
5812
  "aliases": [],
5837
5813
  "args": {},
5838
- "description": "List update sets on a ServiceNow instance.",
5814
+ "description": "Publish a workflow version.",
5839
5815
  "examples": [
5840
5816
  {
5841
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5842
- "description": "List update sets with default limit"
5843
- },
5844
- {
5845
- "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
5846
- "description": "List update sets with a custom query filter"
5817
+ "command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
5818
+ "description": "Publish a workflow version"
5847
5819
  },
5848
5820
  {
5849
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5850
- "description": "List update sets with JSON output"
5821
+ "command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
5822
+ "description": "Publish a workflow version and output as JSON"
5851
5823
  }
5852
5824
  ],
5853
5825
  "flags": {
@@ -5883,20 +5855,20 @@
5883
5855
  ],
5884
5856
  "type": "option"
5885
5857
  },
5886
- "limit": {
5887
- "description": "Maximum number of update sets to return",
5888
- "name": "limit",
5889
- "required": false,
5890
- "default": 20,
5858
+ "start-activity": {
5859
+ "char": "s",
5860
+ "description": "Sys ID of the start activity",
5861
+ "name": "start-activity",
5862
+ "required": true,
5891
5863
  "hasDynamicHelp": false,
5892
5864
  "multiple": false,
5893
5865
  "type": "option"
5894
5866
  },
5895
- "query": {
5896
- "char": "q",
5897
- "description": "Encoded query filter",
5898
- "name": "query",
5899
- "required": false,
5867
+ "version-id": {
5868
+ "char": "v",
5869
+ "description": "Sys ID of the workflow version to publish",
5870
+ "name": "version-id",
5871
+ "required": true,
5900
5872
  "hasDynamicHelp": false,
5901
5873
  "multiple": false,
5902
5874
  "type": "option"
@@ -5904,7 +5876,7 @@
5904
5876
  },
5905
5877
  "hasDynamicHelp": false,
5906
5878
  "hiddenAliases": [],
5907
- "id": "update-set",
5879
+ "id": "workflow:publish",
5908
5880
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5909
5881
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5910
5882
  "pluginType": "core",
@@ -5914,29 +5886,34 @@
5914
5886
  "relativePath": [
5915
5887
  "dist",
5916
5888
  "commands",
5917
- "update-set",
5918
- "index.js"
5889
+ "workflow",
5890
+ "publish.js"
5919
5891
  ]
5920
5892
  },
5921
- "update-set:inspect": {
5893
+ "xml:export": {
5922
5894
  "aliases": [],
5923
5895
  "args": {},
5924
- "description": "Inspect the components of an update set.",
5896
+ "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",
5925
5897
  "examples": [
5926
5898
  {
5927
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
5928
- "description": "Inspect an update set by sys_id"
5899
+ "description": "Export a record to stdout",
5900
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
5929
5901
  },
5930
5902
  {
5931
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
5932
- "description": "Inspect with JSON output"
5903
+ "description": "Export and save to a file",
5904
+ "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
5905
+ },
5906
+ {
5907
+ "description": "Export as JSON metadata",
5908
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
5933
5909
  }
5934
5910
  ],
5935
5911
  "flags": {
5936
5912
  "json": {
5937
- "description": "Format output as json.",
5938
- "helpGroup": "GLOBAL",
5913
+ "char": "j",
5914
+ "description": "Output results as JSON",
5939
5915
  "name": "json",
5916
+ "required": false,
5940
5917
  "allowNo": false,
5941
5918
  "type": "boolean"
5942
5919
  },
@@ -5965,19 +5942,37 @@
5965
5942
  ],
5966
5943
  "type": "option"
5967
5944
  },
5945
+ "table": {
5946
+ "char": "t",
5947
+ "description": "Table name of the record to export",
5948
+ "name": "table",
5949
+ "required": true,
5950
+ "hasDynamicHelp": false,
5951
+ "multiple": false,
5952
+ "type": "option"
5953
+ },
5968
5954
  "sys-id": {
5969
5955
  "char": "s",
5970
- "description": "sys_id of the update set to inspect",
5956
+ "description": "Sys ID of the record to export",
5971
5957
  "name": "sys-id",
5972
5958
  "required": true,
5973
5959
  "hasDynamicHelp": false,
5974
5960
  "multiple": false,
5975
5961
  "type": "option"
5962
+ },
5963
+ "output": {
5964
+ "char": "o",
5965
+ "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
5966
+ "name": "output",
5967
+ "required": false,
5968
+ "hasDynamicHelp": false,
5969
+ "multiple": false,
5970
+ "type": "option"
5976
5971
  }
5977
5972
  },
5978
5973
  "hasDynamicHelp": false,
5979
5974
  "hiddenAliases": [],
5980
- "id": "update-set:inspect",
5975
+ "id": "xml:export",
5981
5976
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5982
5977
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5983
5978
  "pluginType": "core",
@@ -5987,33 +5982,30 @@
5987
5982
  "relativePath": [
5988
5983
  "dist",
5989
5984
  "commands",
5990
- "update-set",
5991
- "inspect.js"
5985
+ "xml",
5986
+ "export.js"
5992
5987
  ]
5993
5988
  },
5994
- "update-set:move": {
5989
+ "xml:import": {
5995
5990
  "aliases": [],
5996
5991
  "args": {},
5997
- "description": "Move records between update sets.",
5992
+ "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",
5998
5993
  "examples": [
5999
5994
  {
6000
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
6001
- "description": "Move all records from one update set to another"
6002
- },
6003
- {
6004
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
6005
- "description": "Move specific records to a target update set"
5995
+ "description": "Import records from an XML file",
5996
+ "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
6006
5997
  },
6007
5998
  {
6008
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
6009
- "description": "Move records with JSON output"
5999
+ "description": "Import with JSON output",
6000
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
6010
6001
  }
6011
6002
  ],
6012
6003
  "flags": {
6013
6004
  "json": {
6014
- "description": "Format output as json.",
6015
- "helpGroup": "GLOBAL",
6005
+ "char": "j",
6006
+ "description": "Output results as JSON",
6016
6007
  "name": "json",
6008
+ "required": false,
6017
6009
  "allowNo": false,
6018
6010
  "type": "boolean"
6019
6011
  },
@@ -6042,25 +6034,19 @@
6042
6034
  ],
6043
6035
  "type": "option"
6044
6036
  },
6045
- "records": {
6046
- "description": "Comma-separated sys_ids of records to move",
6047
- "name": "records",
6048
- "required": false,
6049
- "hasDynamicHelp": false,
6050
- "multiple": false,
6051
- "type": "option"
6052
- },
6053
- "source": {
6054
- "description": "Source update set sys_id",
6055
- "name": "source",
6056
- "required": false,
6037
+ "file": {
6038
+ "char": "f",
6039
+ "description": "Path to the XML file to import",
6040
+ "name": "file",
6041
+ "required": true,
6057
6042
  "hasDynamicHelp": false,
6058
6043
  "multiple": false,
6059
6044
  "type": "option"
6060
6045
  },
6061
- "target": {
6062
- "description": "Target update set sys_id",
6063
- "name": "target",
6046
+ "table": {
6047
+ "char": "t",
6048
+ "description": "Target table to import records into",
6049
+ "name": "table",
6064
6050
  "required": true,
6065
6051
  "hasDynamicHelp": false,
6066
6052
  "multiple": false,
@@ -6069,7 +6055,7 @@
6069
6055
  },
6070
6056
  "hasDynamicHelp": false,
6071
6057
  "hiddenAliases": [],
6072
- "id": "update-set:move",
6058
+ "id": "xml:import",
6073
6059
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6074
6060
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6075
6061
  "pluginType": "core",
@@ -6079,22 +6065,26 @@
6079
6065
  "relativePath": [
6080
6066
  "dist",
6081
6067
  "commands",
6082
- "update-set",
6083
- "move.js"
6068
+ "xml",
6069
+ "import.js"
6084
6070
  ]
6085
6071
  },
6086
- "workflow:create": {
6072
+ "search:add-table": {
6087
6073
  "aliases": [],
6088
6074
  "args": {},
6089
- "description": "Create a complete workflow from a JSON specification file.",
6075
+ "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",
6090
6076
  "examples": [
6091
6077
  {
6092
- "command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
6093
- "description": "Create a workflow from a JSON spec file"
6078
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
6079
+ "description": "Add a table to a search group"
6094
6080
  },
6095
6081
  {
6096
- "command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
6097
- "description": "Create a workflow and output result as JSON"
6082
+ "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
6083
+ "description": "Add a table with multiple search fields"
6084
+ },
6085
+ {
6086
+ "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
6087
+ "description": "Add a table with JSON output"
6098
6088
  }
6099
6089
  ],
6100
6090
  "flags": {
@@ -6130,10 +6120,28 @@
6130
6120
  ],
6131
6121
  "type": "option"
6132
6122
  },
6133
- "spec": {
6134
- "char": "s",
6135
- "description": "Path to workflow JSON specification file",
6136
- "name": "spec",
6123
+ "search-fields": {
6124
+ "char": "f",
6125
+ "description": "Comma-separated list of fields to index for search",
6126
+ "name": "search-fields",
6127
+ "required": true,
6128
+ "hasDynamicHelp": false,
6129
+ "multiple": false,
6130
+ "type": "option"
6131
+ },
6132
+ "search-group": {
6133
+ "char": "g",
6134
+ "description": "Search group to add the table to",
6135
+ "name": "search-group",
6136
+ "required": true,
6137
+ "hasDynamicHelp": false,
6138
+ "multiple": false,
6139
+ "type": "option"
6140
+ },
6141
+ "table": {
6142
+ "char": "t",
6143
+ "description": "Table name to add to the search group",
6144
+ "name": "table",
6137
6145
  "required": true,
6138
6146
  "hasDynamicHelp": false,
6139
6147
  "multiple": false,
@@ -6142,7 +6150,7 @@
6142
6150
  },
6143
6151
  "hasDynamicHelp": false,
6144
6152
  "hiddenAliases": [],
6145
- "id": "workflow:create",
6153
+ "id": "search:add-table",
6146
6154
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6147
6155
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6148
6156
  "pluginType": "core",
@@ -6152,22 +6160,22 @@
6152
6160
  "relativePath": [
6153
6161
  "dist",
6154
6162
  "commands",
6155
- "workflow",
6156
- "create.js"
6163
+ "search",
6164
+ "add-table.js"
6157
6165
  ]
6158
6166
  },
6159
- "workflow:publish": {
6167
+ "search:groups": {
6160
6168
  "aliases": [],
6161
6169
  "args": {},
6162
- "description": "Publish a workflow version.",
6170
+ "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",
6163
6171
  "examples": [
6164
6172
  {
6165
- "command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
6166
- "description": "Publish a workflow version"
6173
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6174
+ "description": "List all search groups"
6167
6175
  },
6168
6176
  {
6169
- "command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
6170
- "description": "Publish a workflow version and output as JSON"
6177
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6178
+ "description": "List search groups with JSON output"
6171
6179
  }
6172
6180
  ],
6173
6181
  "flags": {
@@ -6202,29 +6210,11 @@
6202
6210
  "trace"
6203
6211
  ],
6204
6212
  "type": "option"
6205
- },
6206
- "start-activity": {
6207
- "char": "s",
6208
- "description": "Sys ID of the start activity",
6209
- "name": "start-activity",
6210
- "required": true,
6211
- "hasDynamicHelp": false,
6212
- "multiple": false,
6213
- "type": "option"
6214
- },
6215
- "version-id": {
6216
- "char": "v",
6217
- "description": "Sys ID of the workflow version to publish",
6218
- "name": "version-id",
6219
- "required": true,
6220
- "hasDynamicHelp": false,
6221
- "multiple": false,
6222
- "type": "option"
6223
6213
  }
6224
6214
  },
6225
6215
  "hasDynamicHelp": false,
6226
6216
  "hiddenAliases": [],
6227
- "id": "workflow:publish",
6217
+ "id": "search:groups",
6228
6218
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6229
6219
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6230
6220
  "pluginType": "core",
@@ -6234,34 +6224,37 @@
6234
6224
  "relativePath": [
6235
6225
  "dist",
6236
6226
  "commands",
6237
- "workflow",
6238
- "publish.js"
6227
+ "search",
6228
+ "groups.js"
6239
6229
  ]
6240
6230
  },
6241
- "xml:export": {
6231
+ "search": {
6242
6232
  "aliases": [],
6243
6233
  "args": {},
6244
- "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",
6234
+ "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",
6245
6235
  "examples": [
6246
6236
  {
6247
- "description": "Export a record to stdout",
6248
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
6237
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
6238
+ "description": "Search for a term across the entire instance"
6249
6239
  },
6250
6240
  {
6251
- "description": "Export and save to a file",
6252
- "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
6241
+ "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
6242
+ "description": "Search within a specific application scope"
6253
6243
  },
6254
6244
  {
6255
- "description": "Export as JSON metadata",
6256
- "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
6245
+ "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
6246
+ "description": "Search within a specific table and search group"
6247
+ },
6248
+ {
6249
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
6250
+ "description": "Search with a result limit and JSON output"
6257
6251
  }
6258
6252
  ],
6259
6253
  "flags": {
6260
6254
  "json": {
6261
- "char": "j",
6262
- "description": "Output results as JSON",
6255
+ "description": "Format output as json.",
6256
+ "helpGroup": "GLOBAL",
6263
6257
  "name": "json",
6264
- "required": false,
6265
6258
  "allowNo": false,
6266
6259
  "type": "boolean"
6267
6260
  },
@@ -6290,37 +6283,54 @@
6290
6283
  ],
6291
6284
  "type": "option"
6292
6285
  },
6293
- "table": {
6294
- "char": "t",
6295
- "description": "Table name of the record to export",
6296
- "name": "table",
6297
- "required": true,
6286
+ "limit": {
6287
+ "char": "l",
6288
+ "description": "Maximum number of results to return",
6289
+ "name": "limit",
6290
+ "required": false,
6298
6291
  "hasDynamicHelp": false,
6299
6292
  "multiple": false,
6300
6293
  "type": "option"
6301
6294
  },
6302
- "sys-id": {
6295
+ "scope": {
6303
6296
  "char": "s",
6304
- "description": "Sys ID of the record to export",
6305
- "name": "sys-id",
6306
- "required": true,
6297
+ "description": "Application scope to search within",
6298
+ "name": "scope",
6299
+ "required": false,
6307
6300
  "hasDynamicHelp": false,
6308
6301
  "multiple": false,
6309
6302
  "type": "option"
6310
6303
  },
6311
- "output": {
6312
- "char": "o",
6313
- "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
6314
- "name": "output",
6304
+ "search-group": {
6305
+ "char": "g",
6306
+ "description": "Search group to search within (required when using --table)",
6307
+ "name": "search-group",
6308
+ "required": false,
6309
+ "hasDynamicHelp": false,
6310
+ "multiple": false,
6311
+ "type": "option"
6312
+ },
6313
+ "table": {
6314
+ "description": "Table name to search within (requires --search-group)",
6315
+ "name": "table",
6315
6316
  "required": false,
6316
6317
  "hasDynamicHelp": false,
6317
6318
  "multiple": false,
6318
6319
  "type": "option"
6320
+ },
6321
+ "term": {
6322
+ "char": "t",
6323
+ "description": "Search term to look for in platform code",
6324
+ "name": "term",
6325
+ "required": true,
6326
+ "hasDynamicHelp": false,
6327
+ "multiple": false,
6328
+ "type": "option"
6319
6329
  }
6320
6330
  },
6321
6331
  "hasDynamicHelp": false,
6322
6332
  "hiddenAliases": [],
6323
- "id": "xml:export",
6333
+ "id": "search",
6324
6334
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6325
6335
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6326
6336
  "pluginType": "core",
@@ -6330,30 +6340,29 @@
6330
6340
  "relativePath": [
6331
6341
  "dist",
6332
6342
  "commands",
6333
- "xml",
6334
- "export.js"
6343
+ "search",
6344
+ "index.js"
6335
6345
  ]
6336
6346
  },
6337
- "xml:import": {
6347
+ "search:tables": {
6338
6348
  "aliases": [],
6339
6349
  "args": {},
6340
- "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",
6350
+ "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",
6341
6351
  "examples": [
6342
6352
  {
6343
- "description": "Import records from an XML file",
6344
- "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
6353
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
6354
+ "description": "List tables in a search group"
6345
6355
  },
6346
6356
  {
6347
- "description": "Import with JSON output",
6348
- "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
6357
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
6358
+ "description": "List tables with JSON output"
6349
6359
  }
6350
6360
  ],
6351
6361
  "flags": {
6352
6362
  "json": {
6353
- "char": "j",
6354
- "description": "Output results as JSON",
6363
+ "description": "Format output as json.",
6364
+ "helpGroup": "GLOBAL",
6355
6365
  "name": "json",
6356
- "required": false,
6357
6366
  "allowNo": false,
6358
6367
  "type": "boolean"
6359
6368
  },
@@ -6382,19 +6391,10 @@
6382
6391
  ],
6383
6392
  "type": "option"
6384
6393
  },
6385
- "file": {
6386
- "char": "f",
6387
- "description": "Path to the XML file to import",
6388
- "name": "file",
6389
- "required": true,
6390
- "hasDynamicHelp": false,
6391
- "multiple": false,
6392
- "type": "option"
6393
- },
6394
- "table": {
6395
- "char": "t",
6396
- "description": "Target table to import records into",
6397
- "name": "table",
6394
+ "search-group": {
6395
+ "char": "g",
6396
+ "description": "Search group name to list tables for",
6397
+ "name": "search-group",
6398
6398
  "required": true,
6399
6399
  "hasDynamicHelp": false,
6400
6400
  "multiple": false,
@@ -6403,7 +6403,7 @@
6403
6403
  },
6404
6404
  "hasDynamicHelp": false,
6405
6405
  "hiddenAliases": [],
6406
- "id": "xml:import",
6406
+ "id": "search:tables",
6407
6407
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6408
6408
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6409
6409
  "pluginType": "core",
@@ -6413,10 +6413,10 @@
6413
6413
  "relativePath": [
6414
6414
  "dist",
6415
6415
  "commands",
6416
- "xml",
6417
- "import.js"
6416
+ "search",
6417
+ "tables.js"
6418
6418
  ]
6419
6419
  }
6420
6420
  },
6421
- "version": "2.3.1"
6421
+ "version": "3.0.0"
6422
6422
  }