@sonisoft/now-sdk-ext-cli 5.4.0 → 5.6.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.
- package/README.md +320 -230
- package/dist/commands/auth/browser-session.d.ts +13 -0
- package/dist/commands/auth/browser-session.d.ts.map +1 -0
- package/dist/commands/auth/browser-session.js +31 -0
- package/dist/commands/auth/browser-session.js.map +1 -0
- package/dist/commands/behavior/details.d.ts +16 -0
- package/dist/commands/behavior/details.d.ts.map +1 -0
- package/dist/commands/behavior/details.js +31 -0
- package/dist/commands/behavior/details.js.map +1 -0
- package/dist/commands/behavior/index.d.ts +23 -0
- package/dist/commands/behavior/index.d.ts.map +1 -0
- package/dist/commands/behavior/index.js +41 -0
- package/dist/commands/behavior/index.js.map +1 -0
- package/dist/commands/flow/definition.d.ts +1 -1
- package/dist/common/authenticated-command.d.ts.map +1 -1
- package/dist/common/authenticated-command.js +24 -4
- package/dist/common/authenticated-command.js.map +1 -1
- package/dist/common/behavior-flags.d.ts +17 -0
- package/dist/common/behavior-flags.d.ts.map +1 -0
- package/dist/common/behavior-flags.js +14 -0
- package/dist/common/behavior-flags.js.map +1 -0
- package/dist/services/behavior-display.service.d.ts +6 -0
- package/dist/services/behavior-display.service.d.ts.map +1 -0
- package/dist/services/behavior-display.service.js +50 -0
- package/dist/services/behavior-display.service.js.map +1 -0
- package/dist/services/browser-session-writer.d.ts +4 -0
- package/dist/services/browser-session-writer.d.ts.map +1 -0
- package/dist/services/browser-session-writer.js +52 -0
- package/dist/services/browser-session-writer.js.map +1 -0
- package/dist/services/flow-display.service.d.ts +9 -9
- package/dist/services/flow-display.service.d.ts.map +1 -1
- package/dist/services/flow-display.service.js +117 -117
- package/dist/services/flow-display.service.js.map +1 -1
- package/oclif.manifest.json +1397 -983
- package/package.json +6 -3
package/oclif.manifest.json
CHANGED
|
@@ -513,240 +513,6 @@
|
|
|
513
513
|
"query.js"
|
|
514
514
|
]
|
|
515
515
|
},
|
|
516
|
-
"atf": {
|
|
517
|
-
"aliases": [],
|
|
518
|
-
"args": {},
|
|
519
|
-
"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",
|
|
520
|
-
"examples": [
|
|
521
|
-
{
|
|
522
|
-
"description": "Execute a single ATF test by sys_id",
|
|
523
|
-
"command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"description": "Execute a test suite by sys_id and wait for completion",
|
|
527
|
-
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
"description": "Execute a test suite by name",
|
|
531
|
-
"command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
"description": "Execute with specific browser configuration",
|
|
535
|
-
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"description": "Execute as performance test with JSON output for CI/CD",
|
|
539
|
-
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
"description": "Execute with custom poll interval (10 seconds)",
|
|
543
|
-
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
|
|
544
|
-
}
|
|
545
|
-
],
|
|
546
|
-
"flags": {
|
|
547
|
-
"json": {
|
|
548
|
-
"char": "j",
|
|
549
|
-
"description": "Output results as JSON",
|
|
550
|
-
"name": "json",
|
|
551
|
-
"required": false,
|
|
552
|
-
"allowNo": false,
|
|
553
|
-
"type": "boolean"
|
|
554
|
-
},
|
|
555
|
-
"auth": {
|
|
556
|
-
"char": "a",
|
|
557
|
-
"description": "Auth alias to use.",
|
|
558
|
-
"name": "auth",
|
|
559
|
-
"required": false,
|
|
560
|
-
"hasDynamicHelp": false,
|
|
561
|
-
"multiple": false,
|
|
562
|
-
"type": "option"
|
|
563
|
-
},
|
|
564
|
-
"cred-store": {
|
|
565
|
-
"description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
|
|
566
|
-
"helpGroup": "GLOBAL",
|
|
567
|
-
"name": "cred-store",
|
|
568
|
-
"required": false,
|
|
569
|
-
"allowNo": false,
|
|
570
|
-
"type": "boolean"
|
|
571
|
-
},
|
|
572
|
-
"deny-execute": {
|
|
573
|
-
"description": "Refuse background scripts, flow runs and ATF runs for this invocation.",
|
|
574
|
-
"helpGroup": "GLOBAL",
|
|
575
|
-
"name": "deny-execute",
|
|
576
|
-
"required": false,
|
|
577
|
-
"allowNo": false,
|
|
578
|
-
"type": "boolean"
|
|
579
|
-
},
|
|
580
|
-
"deny-write": {
|
|
581
|
-
"description": "Refuse any change to instance data for this invocation.",
|
|
582
|
-
"helpGroup": "GLOBAL",
|
|
583
|
-
"name": "deny-write",
|
|
584
|
-
"required": false,
|
|
585
|
-
"allowNo": false,
|
|
586
|
-
"type": "boolean"
|
|
587
|
-
},
|
|
588
|
-
"log-dir": {
|
|
589
|
-
"description": "Directory to write log files to. Implies --log-file.",
|
|
590
|
-
"helpGroup": "GLOBAL",
|
|
591
|
-
"name": "log-dir",
|
|
592
|
-
"required": false,
|
|
593
|
-
"hasDynamicHelp": false,
|
|
594
|
-
"multiple": false,
|
|
595
|
-
"type": "option"
|
|
596
|
-
},
|
|
597
|
-
"log-file": {
|
|
598
|
-
"description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
|
|
599
|
-
"helpGroup": "GLOBAL",
|
|
600
|
-
"name": "log-file",
|
|
601
|
-
"required": false,
|
|
602
|
-
"allowNo": false,
|
|
603
|
-
"type": "boolean"
|
|
604
|
-
},
|
|
605
|
-
"log-level": {
|
|
606
|
-
"helpGroup": "GLOBAL",
|
|
607
|
-
"name": "log-level",
|
|
608
|
-
"summary": "Specify level for logging.",
|
|
609
|
-
"default": "info",
|
|
610
|
-
"hasDynamicHelp": false,
|
|
611
|
-
"multiple": false,
|
|
612
|
-
"options": [
|
|
613
|
-
"debug",
|
|
614
|
-
"warn",
|
|
615
|
-
"error",
|
|
616
|
-
"info",
|
|
617
|
-
"trace"
|
|
618
|
-
],
|
|
619
|
-
"type": "option"
|
|
620
|
-
},
|
|
621
|
-
"read-only": {
|
|
622
|
-
"description": "Refuse every change to the instance — equivalent to --deny-write --deny-execute. Reads are unaffected.",
|
|
623
|
-
"helpGroup": "GLOBAL",
|
|
624
|
-
"name": "read-only",
|
|
625
|
-
"required": false,
|
|
626
|
-
"allowNo": false,
|
|
627
|
-
"type": "boolean"
|
|
628
|
-
},
|
|
629
|
-
"test-id": {
|
|
630
|
-
"char": "t",
|
|
631
|
-
"description": "Test sys_id to execute",
|
|
632
|
-
"exclusive": [
|
|
633
|
-
"suite-id",
|
|
634
|
-
"suite-name"
|
|
635
|
-
],
|
|
636
|
-
"name": "test-id",
|
|
637
|
-
"required": false,
|
|
638
|
-
"hasDynamicHelp": false,
|
|
639
|
-
"multiple": false,
|
|
640
|
-
"type": "option"
|
|
641
|
-
},
|
|
642
|
-
"suite-id": {
|
|
643
|
-
"char": "s",
|
|
644
|
-
"description": "Test Suite sys_id to execute",
|
|
645
|
-
"exclusive": [
|
|
646
|
-
"test-id",
|
|
647
|
-
"suite-name"
|
|
648
|
-
],
|
|
649
|
-
"name": "suite-id",
|
|
650
|
-
"required": false,
|
|
651
|
-
"hasDynamicHelp": false,
|
|
652
|
-
"multiple": false,
|
|
653
|
-
"type": "option"
|
|
654
|
-
},
|
|
655
|
-
"suite-name": {
|
|
656
|
-
"char": "n",
|
|
657
|
-
"description": "Test Suite name to execute",
|
|
658
|
-
"exclusive": [
|
|
659
|
-
"test-id",
|
|
660
|
-
"suite-id"
|
|
661
|
-
],
|
|
662
|
-
"name": "suite-name",
|
|
663
|
-
"required": false,
|
|
664
|
-
"hasDynamicHelp": false,
|
|
665
|
-
"multiple": false,
|
|
666
|
-
"type": "option"
|
|
667
|
-
},
|
|
668
|
-
"wait": {
|
|
669
|
-
"char": "w",
|
|
670
|
-
"description": "Wait for test suite execution to complete and return results",
|
|
671
|
-
"name": "wait",
|
|
672
|
-
"required": false,
|
|
673
|
-
"allowNo": false,
|
|
674
|
-
"type": "boolean"
|
|
675
|
-
},
|
|
676
|
-
"poll-interval": {
|
|
677
|
-
"char": "p",
|
|
678
|
-
"description": "Polling interval in milliseconds when waiting for completion",
|
|
679
|
-
"name": "poll-interval",
|
|
680
|
-
"required": false,
|
|
681
|
-
"default": 5000,
|
|
682
|
-
"hasDynamicHelp": false,
|
|
683
|
-
"multiple": false,
|
|
684
|
-
"type": "option"
|
|
685
|
-
},
|
|
686
|
-
"browser": {
|
|
687
|
-
"char": "b",
|
|
688
|
-
"description": "Browser name for test execution (e.g., chrome, firefox)",
|
|
689
|
-
"name": "browser",
|
|
690
|
-
"required": false,
|
|
691
|
-
"hasDynamicHelp": false,
|
|
692
|
-
"multiple": false,
|
|
693
|
-
"type": "option"
|
|
694
|
-
},
|
|
695
|
-
"browser-version": {
|
|
696
|
-
"description": "Browser version for test execution",
|
|
697
|
-
"name": "browser-version",
|
|
698
|
-
"required": false,
|
|
699
|
-
"hasDynamicHelp": false,
|
|
700
|
-
"multiple": false,
|
|
701
|
-
"type": "option"
|
|
702
|
-
},
|
|
703
|
-
"os-name": {
|
|
704
|
-
"description": "Operating system name for test execution",
|
|
705
|
-
"name": "os-name",
|
|
706
|
-
"required": false,
|
|
707
|
-
"hasDynamicHelp": false,
|
|
708
|
-
"multiple": false,
|
|
709
|
-
"type": "option"
|
|
710
|
-
},
|
|
711
|
-
"os-version": {
|
|
712
|
-
"description": "Operating system version for test execution",
|
|
713
|
-
"name": "os-version",
|
|
714
|
-
"required": false,
|
|
715
|
-
"hasDynamicHelp": false,
|
|
716
|
-
"multiple": false,
|
|
717
|
-
"type": "option"
|
|
718
|
-
},
|
|
719
|
-
"performance": {
|
|
720
|
-
"description": "Run as performance test",
|
|
721
|
-
"name": "performance",
|
|
722
|
-
"required": false,
|
|
723
|
-
"allowNo": false,
|
|
724
|
-
"type": "boolean"
|
|
725
|
-
},
|
|
726
|
-
"cloud": {
|
|
727
|
-
"description": "Run in cloud",
|
|
728
|
-
"name": "cloud",
|
|
729
|
-
"required": false,
|
|
730
|
-
"allowNo": false,
|
|
731
|
-
"type": "boolean"
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
"hasDynamicHelp": false,
|
|
735
|
-
"hiddenAliases": [],
|
|
736
|
-
"id": "atf",
|
|
737
|
-
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
738
|
-
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
739
|
-
"pluginType": "core",
|
|
740
|
-
"strict": true,
|
|
741
|
-
"enableJsonFlag": true,
|
|
742
|
-
"isESM": true,
|
|
743
|
-
"relativePath": [
|
|
744
|
-
"dist",
|
|
745
|
-
"commands",
|
|
746
|
-
"atf",
|
|
747
|
-
"index.js"
|
|
748
|
-
]
|
|
749
|
-
},
|
|
750
516
|
"app": {
|
|
751
517
|
"aliases": [],
|
|
752
518
|
"args": {},
|
|
@@ -1471,29 +1237,263 @@
|
|
|
1471
1237
|
"uninstall.js"
|
|
1472
1238
|
]
|
|
1473
1239
|
},
|
|
1474
|
-
"
|
|
1240
|
+
"atf": {
|
|
1475
1241
|
"aliases": [],
|
|
1476
1242
|
"args": {},
|
|
1477
|
-
"description": "
|
|
1243
|
+
"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",
|
|
1478
1244
|
"examples": [
|
|
1479
1245
|
{
|
|
1480
|
-
"
|
|
1481
|
-
"
|
|
1246
|
+
"description": "Execute a single ATF test by sys_id",
|
|
1247
|
+
"command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
|
|
1482
1248
|
},
|
|
1483
1249
|
{
|
|
1484
|
-
"
|
|
1485
|
-
"
|
|
1486
|
-
}
|
|
1487
|
-
],
|
|
1488
|
-
"flags": {
|
|
1489
|
-
"json": {
|
|
1490
|
-
"description": "Format output as json.",
|
|
1491
|
-
"helpGroup": "GLOBAL",
|
|
1492
|
-
"name": "json",
|
|
1493
|
-
"allowNo": false,
|
|
1494
|
-
"type": "boolean"
|
|
1250
|
+
"description": "Execute a test suite by sys_id and wait for completion",
|
|
1251
|
+
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
|
|
1495
1252
|
},
|
|
1496
|
-
|
|
1253
|
+
{
|
|
1254
|
+
"description": "Execute a test suite by name",
|
|
1255
|
+
"command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"description": "Execute with specific browser configuration",
|
|
1259
|
+
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"description": "Execute as performance test with JSON output for CI/CD",
|
|
1263
|
+
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"description": "Execute with custom poll interval (10 seconds)",
|
|
1267
|
+
"command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
"flags": {
|
|
1271
|
+
"json": {
|
|
1272
|
+
"char": "j",
|
|
1273
|
+
"description": "Output results as JSON",
|
|
1274
|
+
"name": "json",
|
|
1275
|
+
"required": false,
|
|
1276
|
+
"allowNo": false,
|
|
1277
|
+
"type": "boolean"
|
|
1278
|
+
},
|
|
1279
|
+
"auth": {
|
|
1280
|
+
"char": "a",
|
|
1281
|
+
"description": "Auth alias to use.",
|
|
1282
|
+
"name": "auth",
|
|
1283
|
+
"required": false,
|
|
1284
|
+
"hasDynamicHelp": false,
|
|
1285
|
+
"multiple": false,
|
|
1286
|
+
"type": "option"
|
|
1287
|
+
},
|
|
1288
|
+
"cred-store": {
|
|
1289
|
+
"description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
|
|
1290
|
+
"helpGroup": "GLOBAL",
|
|
1291
|
+
"name": "cred-store",
|
|
1292
|
+
"required": false,
|
|
1293
|
+
"allowNo": false,
|
|
1294
|
+
"type": "boolean"
|
|
1295
|
+
},
|
|
1296
|
+
"deny-execute": {
|
|
1297
|
+
"description": "Refuse background scripts, flow runs and ATF runs for this invocation.",
|
|
1298
|
+
"helpGroup": "GLOBAL",
|
|
1299
|
+
"name": "deny-execute",
|
|
1300
|
+
"required": false,
|
|
1301
|
+
"allowNo": false,
|
|
1302
|
+
"type": "boolean"
|
|
1303
|
+
},
|
|
1304
|
+
"deny-write": {
|
|
1305
|
+
"description": "Refuse any change to instance data for this invocation.",
|
|
1306
|
+
"helpGroup": "GLOBAL",
|
|
1307
|
+
"name": "deny-write",
|
|
1308
|
+
"required": false,
|
|
1309
|
+
"allowNo": false,
|
|
1310
|
+
"type": "boolean"
|
|
1311
|
+
},
|
|
1312
|
+
"log-dir": {
|
|
1313
|
+
"description": "Directory to write log files to. Implies --log-file.",
|
|
1314
|
+
"helpGroup": "GLOBAL",
|
|
1315
|
+
"name": "log-dir",
|
|
1316
|
+
"required": false,
|
|
1317
|
+
"hasDynamicHelp": false,
|
|
1318
|
+
"multiple": false,
|
|
1319
|
+
"type": "option"
|
|
1320
|
+
},
|
|
1321
|
+
"log-file": {
|
|
1322
|
+
"description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
|
|
1323
|
+
"helpGroup": "GLOBAL",
|
|
1324
|
+
"name": "log-file",
|
|
1325
|
+
"required": false,
|
|
1326
|
+
"allowNo": false,
|
|
1327
|
+
"type": "boolean"
|
|
1328
|
+
},
|
|
1329
|
+
"log-level": {
|
|
1330
|
+
"helpGroup": "GLOBAL",
|
|
1331
|
+
"name": "log-level",
|
|
1332
|
+
"summary": "Specify level for logging.",
|
|
1333
|
+
"default": "info",
|
|
1334
|
+
"hasDynamicHelp": false,
|
|
1335
|
+
"multiple": false,
|
|
1336
|
+
"options": [
|
|
1337
|
+
"debug",
|
|
1338
|
+
"warn",
|
|
1339
|
+
"error",
|
|
1340
|
+
"info",
|
|
1341
|
+
"trace"
|
|
1342
|
+
],
|
|
1343
|
+
"type": "option"
|
|
1344
|
+
},
|
|
1345
|
+
"read-only": {
|
|
1346
|
+
"description": "Refuse every change to the instance — equivalent to --deny-write --deny-execute. Reads are unaffected.",
|
|
1347
|
+
"helpGroup": "GLOBAL",
|
|
1348
|
+
"name": "read-only",
|
|
1349
|
+
"required": false,
|
|
1350
|
+
"allowNo": false,
|
|
1351
|
+
"type": "boolean"
|
|
1352
|
+
},
|
|
1353
|
+
"test-id": {
|
|
1354
|
+
"char": "t",
|
|
1355
|
+
"description": "Test sys_id to execute",
|
|
1356
|
+
"exclusive": [
|
|
1357
|
+
"suite-id",
|
|
1358
|
+
"suite-name"
|
|
1359
|
+
],
|
|
1360
|
+
"name": "test-id",
|
|
1361
|
+
"required": false,
|
|
1362
|
+
"hasDynamicHelp": false,
|
|
1363
|
+
"multiple": false,
|
|
1364
|
+
"type": "option"
|
|
1365
|
+
},
|
|
1366
|
+
"suite-id": {
|
|
1367
|
+
"char": "s",
|
|
1368
|
+
"description": "Test Suite sys_id to execute",
|
|
1369
|
+
"exclusive": [
|
|
1370
|
+
"test-id",
|
|
1371
|
+
"suite-name"
|
|
1372
|
+
],
|
|
1373
|
+
"name": "suite-id",
|
|
1374
|
+
"required": false,
|
|
1375
|
+
"hasDynamicHelp": false,
|
|
1376
|
+
"multiple": false,
|
|
1377
|
+
"type": "option"
|
|
1378
|
+
},
|
|
1379
|
+
"suite-name": {
|
|
1380
|
+
"char": "n",
|
|
1381
|
+
"description": "Test Suite name to execute",
|
|
1382
|
+
"exclusive": [
|
|
1383
|
+
"test-id",
|
|
1384
|
+
"suite-id"
|
|
1385
|
+
],
|
|
1386
|
+
"name": "suite-name",
|
|
1387
|
+
"required": false,
|
|
1388
|
+
"hasDynamicHelp": false,
|
|
1389
|
+
"multiple": false,
|
|
1390
|
+
"type": "option"
|
|
1391
|
+
},
|
|
1392
|
+
"wait": {
|
|
1393
|
+
"char": "w",
|
|
1394
|
+
"description": "Wait for test suite execution to complete and return results",
|
|
1395
|
+
"name": "wait",
|
|
1396
|
+
"required": false,
|
|
1397
|
+
"allowNo": false,
|
|
1398
|
+
"type": "boolean"
|
|
1399
|
+
},
|
|
1400
|
+
"poll-interval": {
|
|
1401
|
+
"char": "p",
|
|
1402
|
+
"description": "Polling interval in milliseconds when waiting for completion",
|
|
1403
|
+
"name": "poll-interval",
|
|
1404
|
+
"required": false,
|
|
1405
|
+
"default": 5000,
|
|
1406
|
+
"hasDynamicHelp": false,
|
|
1407
|
+
"multiple": false,
|
|
1408
|
+
"type": "option"
|
|
1409
|
+
},
|
|
1410
|
+
"browser": {
|
|
1411
|
+
"char": "b",
|
|
1412
|
+
"description": "Browser name for test execution (e.g., chrome, firefox)",
|
|
1413
|
+
"name": "browser",
|
|
1414
|
+
"required": false,
|
|
1415
|
+
"hasDynamicHelp": false,
|
|
1416
|
+
"multiple": false,
|
|
1417
|
+
"type": "option"
|
|
1418
|
+
},
|
|
1419
|
+
"browser-version": {
|
|
1420
|
+
"description": "Browser version for test execution",
|
|
1421
|
+
"name": "browser-version",
|
|
1422
|
+
"required": false,
|
|
1423
|
+
"hasDynamicHelp": false,
|
|
1424
|
+
"multiple": false,
|
|
1425
|
+
"type": "option"
|
|
1426
|
+
},
|
|
1427
|
+
"os-name": {
|
|
1428
|
+
"description": "Operating system name for test execution",
|
|
1429
|
+
"name": "os-name",
|
|
1430
|
+
"required": false,
|
|
1431
|
+
"hasDynamicHelp": false,
|
|
1432
|
+
"multiple": false,
|
|
1433
|
+
"type": "option"
|
|
1434
|
+
},
|
|
1435
|
+
"os-version": {
|
|
1436
|
+
"description": "Operating system version for test execution",
|
|
1437
|
+
"name": "os-version",
|
|
1438
|
+
"required": false,
|
|
1439
|
+
"hasDynamicHelp": false,
|
|
1440
|
+
"multiple": false,
|
|
1441
|
+
"type": "option"
|
|
1442
|
+
},
|
|
1443
|
+
"performance": {
|
|
1444
|
+
"description": "Run as performance test",
|
|
1445
|
+
"name": "performance",
|
|
1446
|
+
"required": false,
|
|
1447
|
+
"allowNo": false,
|
|
1448
|
+
"type": "boolean"
|
|
1449
|
+
},
|
|
1450
|
+
"cloud": {
|
|
1451
|
+
"description": "Run in cloud",
|
|
1452
|
+
"name": "cloud",
|
|
1453
|
+
"required": false,
|
|
1454
|
+
"allowNo": false,
|
|
1455
|
+
"type": "boolean"
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
"hasDynamicHelp": false,
|
|
1459
|
+
"hiddenAliases": [],
|
|
1460
|
+
"id": "atf",
|
|
1461
|
+
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
1462
|
+
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
1463
|
+
"pluginType": "core",
|
|
1464
|
+
"strict": true,
|
|
1465
|
+
"enableJsonFlag": true,
|
|
1466
|
+
"isESM": true,
|
|
1467
|
+
"relativePath": [
|
|
1468
|
+
"dist",
|
|
1469
|
+
"commands",
|
|
1470
|
+
"atf",
|
|
1471
|
+
"index.js"
|
|
1472
|
+
]
|
|
1473
|
+
},
|
|
1474
|
+
"attachment:get": {
|
|
1475
|
+
"aliases": [],
|
|
1476
|
+
"args": {},
|
|
1477
|
+
"description": "Get metadata for a specific attachment.",
|
|
1478
|
+
"examples": [
|
|
1479
|
+
{
|
|
1480
|
+
"command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
|
|
1481
|
+
"description": "Get attachment metadata by sys_id"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
|
|
1485
|
+
"description": "Get attachment metadata as JSON"
|
|
1486
|
+
}
|
|
1487
|
+
],
|
|
1488
|
+
"flags": {
|
|
1489
|
+
"json": {
|
|
1490
|
+
"description": "Format output as json.",
|
|
1491
|
+
"helpGroup": "GLOBAL",
|
|
1492
|
+
"name": "json",
|
|
1493
|
+
"allowNo": false,
|
|
1494
|
+
"type": "boolean"
|
|
1495
|
+
},
|
|
1496
|
+
"auth": {
|
|
1497
1497
|
"char": "a",
|
|
1498
1498
|
"description": "Auth alias to use.",
|
|
1499
1499
|
"name": "auth",
|
|
@@ -1881,19 +1881,77 @@
|
|
|
1881
1881
|
"upload.js"
|
|
1882
1882
|
]
|
|
1883
1883
|
},
|
|
1884
|
-
"auth:
|
|
1884
|
+
"auth:browser-session": {
|
|
1885
1885
|
"aliases": [],
|
|
1886
|
-
"args": {
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
"
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1886
|
+
"args": {},
|
|
1887
|
+
"description": "Create a verified Playwright cookie session using a stored SDK alias.",
|
|
1888
|
+
"flags": {
|
|
1889
|
+
"json": {
|
|
1890
|
+
"description": "Format output as json.",
|
|
1891
|
+
"helpGroup": "GLOBAL",
|
|
1892
|
+
"name": "json",
|
|
1893
|
+
"allowNo": false,
|
|
1894
|
+
"type": "boolean"
|
|
1895
|
+
},
|
|
1896
|
+
"auth": {
|
|
1897
|
+
"char": "a",
|
|
1898
|
+
"description": "Stored SDK credential alias.",
|
|
1899
|
+
"name": "auth",
|
|
1900
|
+
"required": true,
|
|
1901
|
+
"hasDynamicHelp": false,
|
|
1902
|
+
"multiple": false,
|
|
1903
|
+
"type": "option"
|
|
1904
|
+
},
|
|
1905
|
+
"cred-store": {
|
|
1906
|
+
"description": "Use the headless credential store.",
|
|
1907
|
+
"name": "cred-store",
|
|
1908
|
+
"allowNo": false,
|
|
1909
|
+
"type": "boolean"
|
|
1910
|
+
},
|
|
1911
|
+
"force": {
|
|
1912
|
+
"description": "Replace an existing regular output file.",
|
|
1913
|
+
"name": "force",
|
|
1914
|
+
"allowNo": false,
|
|
1915
|
+
"type": "boolean"
|
|
1916
|
+
},
|
|
1917
|
+
"output": {
|
|
1918
|
+
"description": "Owner-only Playwright storage-state file.",
|
|
1919
|
+
"name": "output",
|
|
1920
|
+
"required": true,
|
|
1921
|
+
"hasDynamicHelp": false,
|
|
1922
|
+
"multiple": false,
|
|
1923
|
+
"type": "option"
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
"hasDynamicHelp": false,
|
|
1927
|
+
"hiddenAliases": [],
|
|
1928
|
+
"id": "auth:browser-session",
|
|
1929
|
+
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
1930
|
+
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
1931
|
+
"pluginType": "core",
|
|
1932
|
+
"strict": true,
|
|
1933
|
+
"enableJsonFlag": true,
|
|
1934
|
+
"isESM": true,
|
|
1935
|
+
"relativePath": [
|
|
1936
|
+
"dist",
|
|
1937
|
+
"commands",
|
|
1938
|
+
"auth",
|
|
1939
|
+
"browser-session.js"
|
|
1940
|
+
]
|
|
1941
|
+
},
|
|
1942
|
+
"auth:delete": {
|
|
1943
|
+
"aliases": [],
|
|
1944
|
+
"args": {
|
|
1945
|
+
"alias": {
|
|
1946
|
+
"description": "Alias to remove",
|
|
1947
|
+
"name": "alias",
|
|
1948
|
+
"required": false
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
"description": "Remove a credential from the store.\n\nThis does not touch the OS keyring — a copy stored there before migrating remains.",
|
|
1952
|
+
"examples": [
|
|
1953
|
+
{
|
|
1954
|
+
"command": "<%= config.bin %> <%= command.id %> dev206299",
|
|
1897
1955
|
"description": "Remove one alias"
|
|
1898
1956
|
},
|
|
1899
1957
|
{
|
|
@@ -2070,24 +2128,16 @@
|
|
|
2070
2128
|
"use.js"
|
|
2071
2129
|
]
|
|
2072
2130
|
},
|
|
2073
|
-
"
|
|
2131
|
+
"behavior:details": {
|
|
2074
2132
|
"aliases": [],
|
|
2075
2133
|
"args": {},
|
|
2076
|
-
"description": "
|
|
2134
|
+
"description": "Retrieve known behavior artifacts without rediscovery. Repeat --reference kind:source_table:sys_id for up to 50 records. Add --details scripts, --details definitions or --details dependencies to include bodies immediately. Source references are returned by behavior discovery; flows also accept flows:sys_hub_flow:<sys_id>.",
|
|
2077
2135
|
"examples": [
|
|
2078
|
-
|
|
2079
|
-
"command": "<%= config.bin %> <%= command.id %> --file ./records.json --auth dev",
|
|
2080
|
-
"description": "Create records from a JSON file"
|
|
2081
|
-
},
|
|
2082
|
-
{
|
|
2083
|
-
"command": "<%= config.bin %> <%= command.id %> --file ./records.json --no-transaction --auth dev",
|
|
2084
|
-
"description": "Create records without transactional mode"
|
|
2085
|
-
}
|
|
2136
|
+
"<%= config.bin %> <%= command.id %> --reference business_rules:sys_script:0123456789abcdef0123456789abcdef --details scripts --auth dev --json"
|
|
2086
2137
|
],
|
|
2087
2138
|
"flags": {
|
|
2088
2139
|
"json": {
|
|
2089
|
-
"description": "
|
|
2090
|
-
"helpGroup": "GLOBAL",
|
|
2140
|
+
"description": "Emit one JSON document",
|
|
2091
2141
|
"name": "json",
|
|
2092
2142
|
"allowNo": false,
|
|
2093
2143
|
"type": "boolean"
|
|
@@ -2166,26 +2216,53 @@
|
|
|
2166
2216
|
"allowNo": false,
|
|
2167
2217
|
"type": "boolean"
|
|
2168
2218
|
},
|
|
2169
|
-
"
|
|
2170
|
-
"
|
|
2171
|
-
"
|
|
2172
|
-
"
|
|
2173
|
-
"required": true,
|
|
2219
|
+
"dependency-depth": {
|
|
2220
|
+
"description": "Expand one dependency level; requires --details dependencies",
|
|
2221
|
+
"name": "dependency-depth",
|
|
2222
|
+
"default": 0,
|
|
2174
2223
|
"hasDynamicHelp": false,
|
|
2175
2224
|
"multiple": false,
|
|
2176
2225
|
"type": "option"
|
|
2177
2226
|
},
|
|
2178
|
-
"
|
|
2179
|
-
"description": "
|
|
2180
|
-
"name": "
|
|
2181
|
-
"
|
|
2182
|
-
"
|
|
2183
|
-
"
|
|
2227
|
+
"details": {
|
|
2228
|
+
"description": "Include selected detail now; repeat for multiple kinds",
|
|
2229
|
+
"name": "details",
|
|
2230
|
+
"hasDynamicHelp": false,
|
|
2231
|
+
"multiple": true,
|
|
2232
|
+
"options": [
|
|
2233
|
+
"scripts",
|
|
2234
|
+
"definitions",
|
|
2235
|
+
"dependencies"
|
|
2236
|
+
],
|
|
2237
|
+
"type": "option"
|
|
2238
|
+
},
|
|
2239
|
+
"max-bytes": {
|
|
2240
|
+
"description": "Maximum JSON response bytes; omissions include retrieval references",
|
|
2241
|
+
"name": "max-bytes",
|
|
2242
|
+
"default": 65536,
|
|
2243
|
+
"hasDynamicHelp": false,
|
|
2244
|
+
"multiple": false,
|
|
2245
|
+
"type": "option"
|
|
2246
|
+
},
|
|
2247
|
+
"scope": {
|
|
2248
|
+
"description": "Transaction scope for flow definition reads",
|
|
2249
|
+
"name": "scope",
|
|
2250
|
+
"hasDynamicHelp": false,
|
|
2251
|
+
"multiple": false,
|
|
2252
|
+
"type": "option"
|
|
2253
|
+
},
|
|
2254
|
+
"reference": {
|
|
2255
|
+
"description": "kind:source_table:sys_id; repeat for a batch",
|
|
2256
|
+
"name": "reference",
|
|
2257
|
+
"required": true,
|
|
2258
|
+
"hasDynamicHelp": false,
|
|
2259
|
+
"multiple": true,
|
|
2260
|
+
"type": "option"
|
|
2184
2261
|
}
|
|
2185
2262
|
},
|
|
2186
2263
|
"hasDynamicHelp": false,
|
|
2187
2264
|
"hiddenAliases": [],
|
|
2188
|
-
"id": "
|
|
2265
|
+
"id": "behavior:details",
|
|
2189
2266
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
2190
2267
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
2191
2268
|
"pluginType": "core",
|
|
@@ -2195,28 +2272,21 @@
|
|
|
2195
2272
|
"relativePath": [
|
|
2196
2273
|
"dist",
|
|
2197
2274
|
"commands",
|
|
2198
|
-
"
|
|
2199
|
-
"
|
|
2275
|
+
"behavior",
|
|
2276
|
+
"details.js"
|
|
2200
2277
|
]
|
|
2201
2278
|
},
|
|
2202
|
-
"
|
|
2279
|
+
"behavior": {
|
|
2203
2280
|
"aliases": [],
|
|
2204
2281
|
"args": {},
|
|
2205
|
-
"description": "
|
|
2282
|
+
"description": "Discover table behavior: rules, UI actions/scripts, UI/data policies, workflows, flows and state models. Active and applicable inherited behavior is included by default. Conditions describe configuration, not a prediction of execution. Select categories and details to control output size.",
|
|
2206
2283
|
"examples": [
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
"description": "Update records from a JSON file"
|
|
2210
|
-
},
|
|
2211
|
-
{
|
|
2212
|
-
"command": "<%= config.bin %> <%= command.id %> --file ./updates.json --stop-on-error --auth dev",
|
|
2213
|
-
"description": "Update records and stop on first error"
|
|
2214
|
-
}
|
|
2284
|
+
"<%= config.bin %> <%= command.id %> --table incident --auth dev --json",
|
|
2285
|
+
"<%= config.bin %> <%= command.id %> --table change_request --category business_rules --details scripts --auth dev --json"
|
|
2215
2286
|
],
|
|
2216
2287
|
"flags": {
|
|
2217
2288
|
"json": {
|
|
2218
|
-
"description": "
|
|
2219
|
-
"helpGroup": "GLOBAL",
|
|
2289
|
+
"description": "Emit one JSON document",
|
|
2220
2290
|
"name": "json",
|
|
2221
2291
|
"allowNo": false,
|
|
2222
2292
|
"type": "boolean"
|
|
@@ -2295,26 +2365,112 @@
|
|
|
2295
2365
|
"allowNo": false,
|
|
2296
2366
|
"type": "boolean"
|
|
2297
2367
|
},
|
|
2298
|
-
"
|
|
2299
|
-
"
|
|
2300
|
-
"
|
|
2301
|
-
"
|
|
2302
|
-
"required": true,
|
|
2368
|
+
"dependency-depth": {
|
|
2369
|
+
"description": "Expand one dependency level; requires --details dependencies",
|
|
2370
|
+
"name": "dependency-depth",
|
|
2371
|
+
"default": 0,
|
|
2303
2372
|
"hasDynamicHelp": false,
|
|
2304
2373
|
"multiple": false,
|
|
2305
2374
|
"type": "option"
|
|
2306
2375
|
},
|
|
2307
|
-
"
|
|
2308
|
-
"description": "
|
|
2309
|
-
"name": "
|
|
2310
|
-
"
|
|
2376
|
+
"details": {
|
|
2377
|
+
"description": "Include selected detail now; repeat for multiple kinds",
|
|
2378
|
+
"name": "details",
|
|
2379
|
+
"hasDynamicHelp": false,
|
|
2380
|
+
"multiple": true,
|
|
2381
|
+
"options": [
|
|
2382
|
+
"scripts",
|
|
2383
|
+
"definitions",
|
|
2384
|
+
"dependencies"
|
|
2385
|
+
],
|
|
2386
|
+
"type": "option"
|
|
2387
|
+
},
|
|
2388
|
+
"max-bytes": {
|
|
2389
|
+
"description": "Maximum JSON response bytes; omissions include retrieval references",
|
|
2390
|
+
"name": "max-bytes",
|
|
2391
|
+
"default": 65536,
|
|
2392
|
+
"hasDynamicHelp": false,
|
|
2393
|
+
"multiple": false,
|
|
2394
|
+
"type": "option"
|
|
2395
|
+
},
|
|
2396
|
+
"scope": {
|
|
2397
|
+
"description": "Transaction scope for flow definition reads",
|
|
2398
|
+
"name": "scope",
|
|
2399
|
+
"hasDynamicHelp": false,
|
|
2400
|
+
"multiple": false,
|
|
2401
|
+
"type": "option"
|
|
2402
|
+
},
|
|
2403
|
+
"category": {
|
|
2404
|
+
"description": "Category to inspect; repeat to select several, default all",
|
|
2405
|
+
"name": "category",
|
|
2406
|
+
"hasDynamicHelp": false,
|
|
2407
|
+
"multiple": true,
|
|
2408
|
+
"options": [
|
|
2409
|
+
"business_rules",
|
|
2410
|
+
"ui_actions",
|
|
2411
|
+
"client_scripts",
|
|
2412
|
+
"ui_policies",
|
|
2413
|
+
"data_policies",
|
|
2414
|
+
"workflows",
|
|
2415
|
+
"flows",
|
|
2416
|
+
"state_models"
|
|
2417
|
+
],
|
|
2418
|
+
"type": "option"
|
|
2419
|
+
},
|
|
2420
|
+
"cursor": {
|
|
2421
|
+
"description": "Continuation token; requires exactly one --category and the same filters",
|
|
2422
|
+
"name": "cursor",
|
|
2423
|
+
"hasDynamicHelp": false,
|
|
2424
|
+
"multiple": false,
|
|
2425
|
+
"type": "option"
|
|
2426
|
+
},
|
|
2427
|
+
"include-inactive": {
|
|
2428
|
+
"description": "Include inactive/published and draft candidates when discoverable",
|
|
2429
|
+
"name": "include-inactive",
|
|
2311
2430
|
"allowNo": false,
|
|
2312
2431
|
"type": "boolean"
|
|
2432
|
+
},
|
|
2433
|
+
"include-inherited": {
|
|
2434
|
+
"description": "Include applicable ancestor behavior",
|
|
2435
|
+
"name": "include-inherited",
|
|
2436
|
+
"allowNo": true,
|
|
2437
|
+
"type": "boolean"
|
|
2438
|
+
},
|
|
2439
|
+
"limit": {
|
|
2440
|
+
"description": "Maximum items per category",
|
|
2441
|
+
"name": "limit",
|
|
2442
|
+
"default": 50,
|
|
2443
|
+
"hasDynamicHelp": false,
|
|
2444
|
+
"multiple": false,
|
|
2445
|
+
"type": "option"
|
|
2446
|
+
},
|
|
2447
|
+
"name": {
|
|
2448
|
+
"description": "Metadata name contains this text",
|
|
2449
|
+
"name": "name",
|
|
2450
|
+
"hasDynamicHelp": false,
|
|
2451
|
+
"multiple": false,
|
|
2452
|
+
"type": "option"
|
|
2453
|
+
},
|
|
2454
|
+
"sys-id": {
|
|
2455
|
+
"description": "Metadata source sys_id to include; repeat for multiple records",
|
|
2456
|
+
"name": "sys-id",
|
|
2457
|
+
"hasDynamicHelp": false,
|
|
2458
|
+
"multiple": true,
|
|
2459
|
+
"type": "option"
|
|
2460
|
+
},
|
|
2461
|
+
"table": {
|
|
2462
|
+
"char": "t",
|
|
2463
|
+
"description": "Target table name",
|
|
2464
|
+
"name": "table",
|
|
2465
|
+
"required": true,
|
|
2466
|
+
"hasDynamicHelp": false,
|
|
2467
|
+
"multiple": false,
|
|
2468
|
+
"type": "option"
|
|
2313
2469
|
}
|
|
2314
2470
|
},
|
|
2315
2471
|
"hasDynamicHelp": false,
|
|
2316
2472
|
"hiddenAliases": [],
|
|
2317
|
-
"id": "
|
|
2473
|
+
"id": "behavior",
|
|
2318
2474
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
2319
2475
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
2320
2476
|
"pluginType": "core",
|
|
@@ -2324,38 +2480,29 @@
|
|
|
2324
2480
|
"relativePath": [
|
|
2325
2481
|
"dist",
|
|
2326
2482
|
"commands",
|
|
2327
|
-
"
|
|
2328
|
-
"
|
|
2483
|
+
"behavior",
|
|
2484
|
+
"index.js"
|
|
2329
2485
|
]
|
|
2330
2486
|
},
|
|
2331
|
-
"
|
|
2487
|
+
"batch:create": {
|
|
2332
2488
|
"aliases": [],
|
|
2333
2489
|
"args": {},
|
|
2334
|
-
"description": "
|
|
2490
|
+
"description": "Batch create records on a ServiceNow instance from a JSON file.",
|
|
2335
2491
|
"examples": [
|
|
2336
2492
|
{
|
|
2337
|
-
"
|
|
2338
|
-
"
|
|
2339
|
-
},
|
|
2340
|
-
{
|
|
2341
|
-
"description": "Execute the delete (requires --confirm)",
|
|
2342
|
-
"command": "<%= config.bin %> <%= command.id %> --table u_temp_import --query \"sys_created_on<2024-01-01\" --confirm --auth dev"
|
|
2343
|
-
},
|
|
2344
|
-
{
|
|
2345
|
-
"description": "Delete with custom limit",
|
|
2346
|
-
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"active=false^closed_at<2023-01-01\" --limit 1000 --confirm --auth dev"
|
|
2493
|
+
"command": "<%= config.bin %> <%= command.id %> --file ./records.json --auth dev",
|
|
2494
|
+
"description": "Create records from a JSON file"
|
|
2347
2495
|
},
|
|
2348
2496
|
{
|
|
2349
|
-
"
|
|
2350
|
-
"
|
|
2497
|
+
"command": "<%= config.bin %> <%= command.id %> --file ./records.json --no-transaction --auth dev",
|
|
2498
|
+
"description": "Create records without transactional mode"
|
|
2351
2499
|
}
|
|
2352
2500
|
],
|
|
2353
2501
|
"flags": {
|
|
2354
2502
|
"json": {
|
|
2355
|
-
"
|
|
2356
|
-
"
|
|
2503
|
+
"description": "Format output as json.",
|
|
2504
|
+
"helpGroup": "GLOBAL",
|
|
2357
2505
|
"name": "json",
|
|
2358
|
-
"required": false,
|
|
2359
2506
|
"allowNo": false,
|
|
2360
2507
|
"type": "boolean"
|
|
2361
2508
|
},
|
|
@@ -2433,45 +2580,26 @@
|
|
|
2433
2580
|
"allowNo": false,
|
|
2434
2581
|
"type": "boolean"
|
|
2435
2582
|
},
|
|
2436
|
-
"
|
|
2437
|
-
"char": "
|
|
2438
|
-
"description": "
|
|
2439
|
-
"name": "
|
|
2440
|
-
"required": true,
|
|
2441
|
-
"hasDynamicHelp": false,
|
|
2442
|
-
"multiple": false,
|
|
2443
|
-
"type": "option"
|
|
2444
|
-
},
|
|
2445
|
-
"query": {
|
|
2446
|
-
"char": "q",
|
|
2447
|
-
"description": "Encoded query to match records for deletion",
|
|
2448
|
-
"name": "query",
|
|
2583
|
+
"file": {
|
|
2584
|
+
"char": "f",
|
|
2585
|
+
"description": "Path to JSON file with create operations",
|
|
2586
|
+
"name": "file",
|
|
2449
2587
|
"required": true,
|
|
2450
2588
|
"hasDynamicHelp": false,
|
|
2451
2589
|
"multiple": false,
|
|
2452
2590
|
"type": "option"
|
|
2453
2591
|
},
|
|
2454
|
-
"
|
|
2455
|
-
"description": "
|
|
2456
|
-
"name": "
|
|
2592
|
+
"transaction": {
|
|
2593
|
+
"description": "Stop on first error (transactional)",
|
|
2594
|
+
"name": "transaction",
|
|
2457
2595
|
"required": false,
|
|
2458
2596
|
"allowNo": false,
|
|
2459
2597
|
"type": "boolean"
|
|
2460
|
-
},
|
|
2461
|
-
"limit": {
|
|
2462
|
-
"char": "l",
|
|
2463
|
-
"description": "Maximum number of records to delete (default 200, max 10000)",
|
|
2464
|
-
"name": "limit",
|
|
2465
|
-
"required": false,
|
|
2466
|
-
"default": 200,
|
|
2467
|
-
"hasDynamicHelp": false,
|
|
2468
|
-
"multiple": false,
|
|
2469
|
-
"type": "option"
|
|
2470
2598
|
}
|
|
2471
2599
|
},
|
|
2472
2600
|
"hasDynamicHelp": false,
|
|
2473
2601
|
"hiddenAliases": [],
|
|
2474
|
-
"id": "
|
|
2602
|
+
"id": "batch:create",
|
|
2475
2603
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
2476
2604
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
2477
2605
|
"pluginType": "core",
|
|
@@ -2481,38 +2609,29 @@
|
|
|
2481
2609
|
"relativePath": [
|
|
2482
2610
|
"dist",
|
|
2483
2611
|
"commands",
|
|
2484
|
-
"
|
|
2485
|
-
"
|
|
2612
|
+
"batch",
|
|
2613
|
+
"create.js"
|
|
2486
2614
|
]
|
|
2487
2615
|
},
|
|
2488
|
-
"
|
|
2616
|
+
"batch:update": {
|
|
2489
2617
|
"aliases": [],
|
|
2490
2618
|
"args": {},
|
|
2491
|
-
"description": "
|
|
2619
|
+
"description": "Batch update records on a ServiceNow instance from a JSON file.",
|
|
2492
2620
|
"examples": [
|
|
2493
2621
|
{
|
|
2494
|
-
"
|
|
2495
|
-
"
|
|
2496
|
-
},
|
|
2497
|
-
{
|
|
2498
|
-
"description": "Execute the update (requires --confirm)",
|
|
2499
|
-
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"active=true^priority=5\" --data '{\"priority\":\"4\"}' --confirm --auth dev"
|
|
2500
|
-
},
|
|
2501
|
-
{
|
|
2502
|
-
"description": "Update with custom limit",
|
|
2503
|
-
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"state=1\" --data '{\"assignment_group\":\"group-sys-id\"}' --limit 500 --confirm --auth dev"
|
|
2622
|
+
"command": "<%= config.bin %> <%= command.id %> --file ./updates.json --auth dev",
|
|
2623
|
+
"description": "Update records from a JSON file"
|
|
2504
2624
|
},
|
|
2505
2625
|
{
|
|
2506
|
-
"
|
|
2507
|
-
"
|
|
2626
|
+
"command": "<%= config.bin %> <%= command.id %> --file ./updates.json --stop-on-error --auth dev",
|
|
2627
|
+
"description": "Update records and stop on first error"
|
|
2508
2628
|
}
|
|
2509
2629
|
],
|
|
2510
2630
|
"flags": {
|
|
2511
2631
|
"json": {
|
|
2512
|
-
"
|
|
2513
|
-
"
|
|
2632
|
+
"description": "Format output as json.",
|
|
2633
|
+
"helpGroup": "GLOBAL",
|
|
2514
2634
|
"name": "json",
|
|
2515
|
-
"required": false,
|
|
2516
2635
|
"allowNo": false,
|
|
2517
2636
|
"type": "boolean"
|
|
2518
2637
|
},
|
|
@@ -2590,54 +2709,26 @@
|
|
|
2590
2709
|
"allowNo": false,
|
|
2591
2710
|
"type": "boolean"
|
|
2592
2711
|
},
|
|
2593
|
-
"
|
|
2594
|
-
"char": "
|
|
2595
|
-
"description": "
|
|
2596
|
-
"name": "
|
|
2597
|
-
"required": true,
|
|
2598
|
-
"hasDynamicHelp": false,
|
|
2599
|
-
"multiple": false,
|
|
2600
|
-
"type": "option"
|
|
2601
|
-
},
|
|
2602
|
-
"query": {
|
|
2603
|
-
"char": "q",
|
|
2604
|
-
"description": "Encoded query to match records",
|
|
2605
|
-
"name": "query",
|
|
2606
|
-
"required": true,
|
|
2607
|
-
"hasDynamicHelp": false,
|
|
2608
|
-
"multiple": false,
|
|
2609
|
-
"type": "option"
|
|
2610
|
-
},
|
|
2611
|
-
"data": {
|
|
2612
|
-
"char": "d",
|
|
2613
|
-
"description": "JSON object of field=value pairs to apply (e.g. '{\"priority\":\"4\",\"state\":\"2\"}')",
|
|
2614
|
-
"name": "data",
|
|
2712
|
+
"file": {
|
|
2713
|
+
"char": "f",
|
|
2714
|
+
"description": "Path to JSON file with update operations",
|
|
2715
|
+
"name": "file",
|
|
2615
2716
|
"required": true,
|
|
2616
2717
|
"hasDynamicHelp": false,
|
|
2617
2718
|
"multiple": false,
|
|
2618
2719
|
"type": "option"
|
|
2619
2720
|
},
|
|
2620
|
-
"
|
|
2621
|
-
"description": "
|
|
2622
|
-
"name": "
|
|
2721
|
+
"stop-on-error": {
|
|
2722
|
+
"description": "Stop processing on first error",
|
|
2723
|
+
"name": "stop-on-error",
|
|
2623
2724
|
"required": false,
|
|
2624
2725
|
"allowNo": false,
|
|
2625
2726
|
"type": "boolean"
|
|
2626
|
-
},
|
|
2627
|
-
"limit": {
|
|
2628
|
-
"char": "l",
|
|
2629
|
-
"description": "Maximum number of records to update (default 200, max 10000)",
|
|
2630
|
-
"name": "limit",
|
|
2631
|
-
"required": false,
|
|
2632
|
-
"default": 200,
|
|
2633
|
-
"hasDynamicHelp": false,
|
|
2634
|
-
"multiple": false,
|
|
2635
|
-
"type": "option"
|
|
2636
2727
|
}
|
|
2637
2728
|
},
|
|
2638
2729
|
"hasDynamicHelp": false,
|
|
2639
2730
|
"hiddenAliases": [],
|
|
2640
|
-
"id": "
|
|
2731
|
+
"id": "batch:update",
|
|
2641
2732
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
2642
2733
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
2643
2734
|
"pluginType": "core",
|
|
@@ -2647,72 +2738,38 @@
|
|
|
2647
2738
|
"relativePath": [
|
|
2648
2739
|
"dist",
|
|
2649
2740
|
"commands",
|
|
2650
|
-
"
|
|
2741
|
+
"batch",
|
|
2651
2742
|
"update.js"
|
|
2652
2743
|
]
|
|
2653
2744
|
},
|
|
2654
|
-
"
|
|
2745
|
+
"bulk:delete": {
|
|
2655
2746
|
"aliases": [],
|
|
2656
|
-
"args": {
|
|
2657
|
-
|
|
2658
|
-
"description": "Scope to execute script in. Use \"global\" for global scope.",
|
|
2659
|
-
"name": "scope",
|
|
2660
|
-
"required": true
|
|
2661
|
-
},
|
|
2662
|
-
"file": {
|
|
2663
|
-
"description": "File to execute in scripts background. If omitted, starts REPL mode.",
|
|
2664
|
-
"name": "file",
|
|
2665
|
-
"required": false
|
|
2666
|
-
}
|
|
2667
|
-
},
|
|
2668
|
-
"description": "Execute JavaScript on a ServiceNow instance remotely using Scripts - Background.\n\nThis command allows you to run JavaScript either from files or interactively via REPL mode. It mimics the functionality of the Scripts - Background interface in ServiceNow, providing a way to execute scripts programmatically without manual interaction. The output is returned in real-time and can be piped to other commands or saved to files.\n\nModes:\n • File Mode: Provide a file path to execute scripts from a file\n • REPL Mode: Omit the file path to start an interactive session\n\nFeatures:\n • Execute local JavaScript files remotely\n • Interactive REPL for ad-hoc script execution\n • Script parameterization with {placeholder} replacement\n • Multi-line script support in REPL\n • Scope-aware execution (global or custom scope)\n • Real-time console output capture\n • Pipe-able output for command chaining\n • Debug logging support\n • Useful for data migration, testing, and administrative tasks\n\nScript Parameterization:\n Use {paramName} placeholders in your script files, then provide values via --params:\n • Supports any JSON-serializable values (strings, numbers, booleans)\n • Multiple parameters supported\n • All occurrences of each placeholder are replaced\n • Example: {token}, {username}, {environment}\n\nREPL Controls:\n • Press Enter to add a new line\n • Type .exec or press Ctrl+D to execute the script\n • Type .clear to clear the current input\n • Type .exit or press Ctrl+C twice to exit REPL\n\n⚠️ IMPORTANT SECURITY WARNING:\nThis command executes scripts with the same permissions and risks as using Scripts - Background directly\nin ServiceNow. Always:\n • Review scripts before execution\n • Test in non-production environments first\n • Use appropriate scoping to limit access\n • Be aware of data modification risks\n • Follow your organization's security policies\n • Never execute untrusted scripts\n\nScript Capabilities:\n Scripts run with full GlideSystem API access and can:\n • Query and modify database records\n • Create, update, and delete data\n • Execute business rules and workflows\n • Access all APIs available in Scripts - Background\n • Use gs, GlideRecord, GlideAggregate, and other server-side APIs",
|
|
2747
|
+
"args": {},
|
|
2748
|
+
"description": "Bulk delete records matching an encoded query.\n\nFinds all records in a table matching the given query, then deletes each one. Defaults to dry-run mode — use --confirm to execute.\n\nFeatures:\n • Safe dry-run by default (shows match count without deleting)\n • Encoded query filtering\n • Configurable record limit (default 200, max 10000)\n • Progress reporting for large operations\n • Error collection — operation continues even if individual records fail",
|
|
2669
2749
|
"examples": [
|
|
2670
2750
|
{
|
|
2671
|
-
"description": "
|
|
2672
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
2673
|
-
},
|
|
2674
|
-
{
|
|
2675
|
-
"description": "Start REPL in custom application scope",
|
|
2676
|
-
"command": "<%= config.bin %> <%= command.id %> x_my_custom_app --auth dev-instance"
|
|
2677
|
-
},
|
|
2678
|
-
{
|
|
2679
|
-
"description": "Execute a script file in global scope",
|
|
2680
|
-
"command": "<%= config.bin %> <%= command.id %> global ./scripts/cleanup.js --auth dev-instance"
|
|
2681
|
-
},
|
|
2682
|
-
{
|
|
2683
|
-
"description": "Execute a script file in a custom application scope",
|
|
2684
|
-
"command": "<%= config.bin %> <%= command.id %> x_my_custom_app ./scripts/app-config.js --auth dev-instance"
|
|
2685
|
-
},
|
|
2686
|
-
{
|
|
2687
|
-
"description": "Execute a parameterized script with single parameter",
|
|
2688
|
-
"command": "<%= config.bin %> <%= command.id %> global ./scripts/query-user.js --auth dev-instance --params '{\"username\":\"admin\"}'"
|
|
2689
|
-
},
|
|
2690
|
-
{
|
|
2691
|
-
"description": "Execute a parameterized script with multiple parameters",
|
|
2692
|
-
"command": "<%= config.bin %> <%= command.id %> global ./scripts/update-record.js --auth dev-instance --params '{\"table\":\"incident\",\"field\":\"priority\",\"value\":\"1\"}'"
|
|
2693
|
-
},
|
|
2694
|
-
{
|
|
2695
|
-
"description": "Execute and save output to a file",
|
|
2696
|
-
"command": "<%= config.bin %> <%= command.id %> global ./scripts/report.js --auth dev-instance > report.txt"
|
|
2751
|
+
"description": "Dry run — see how many records would be deleted",
|
|
2752
|
+
"command": "<%= config.bin %> <%= command.id %> --table u_temp_import --query \"sys_created_on<2024-01-01\" --auth dev"
|
|
2697
2753
|
},
|
|
2698
2754
|
{
|
|
2699
|
-
"description": "Execute
|
|
2700
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
2755
|
+
"description": "Execute the delete (requires --confirm)",
|
|
2756
|
+
"command": "<%= config.bin %> <%= command.id %> --table u_temp_import --query \"sys_created_on<2024-01-01\" --confirm --auth dev"
|
|
2701
2757
|
},
|
|
2702
2758
|
{
|
|
2703
|
-
"description": "
|
|
2704
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
2759
|
+
"description": "Delete with custom limit",
|
|
2760
|
+
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"active=false^closed_at<2023-01-01\" --limit 1000 --confirm --auth dev"
|
|
2705
2761
|
},
|
|
2706
2762
|
{
|
|
2707
|
-
"description": "
|
|
2708
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
2763
|
+
"description": "Delete as JSON output",
|
|
2764
|
+
"command": "<%= config.bin %> <%= command.id %> --table u_staging --query \"processed=true\" --confirm --json --auth dev"
|
|
2709
2765
|
}
|
|
2710
2766
|
],
|
|
2711
2767
|
"flags": {
|
|
2712
2768
|
"json": {
|
|
2713
|
-
"
|
|
2714
|
-
"
|
|
2769
|
+
"char": "j",
|
|
2770
|
+
"description": "Output results as JSON",
|
|
2715
2771
|
"name": "json",
|
|
2772
|
+
"required": false,
|
|
2716
2773
|
"allowNo": false,
|
|
2717
2774
|
"type": "boolean"
|
|
2718
2775
|
},
|
|
@@ -2790,11 +2847,37 @@
|
|
|
2790
2847
|
"allowNo": false,
|
|
2791
2848
|
"type": "boolean"
|
|
2792
2849
|
},
|
|
2793
|
-
"
|
|
2794
|
-
"char": "
|
|
2795
|
-
"description": "
|
|
2796
|
-
"name": "
|
|
2850
|
+
"table": {
|
|
2851
|
+
"char": "t",
|
|
2852
|
+
"description": "Table name to delete records from",
|
|
2853
|
+
"name": "table",
|
|
2854
|
+
"required": true,
|
|
2855
|
+
"hasDynamicHelp": false,
|
|
2856
|
+
"multiple": false,
|
|
2857
|
+
"type": "option"
|
|
2858
|
+
},
|
|
2859
|
+
"query": {
|
|
2860
|
+
"char": "q",
|
|
2861
|
+
"description": "Encoded query to match records for deletion",
|
|
2862
|
+
"name": "query",
|
|
2863
|
+
"required": true,
|
|
2864
|
+
"hasDynamicHelp": false,
|
|
2865
|
+
"multiple": false,
|
|
2866
|
+
"type": "option"
|
|
2867
|
+
},
|
|
2868
|
+
"confirm": {
|
|
2869
|
+
"description": "Execute the delete (without this flag, performs a dry run)",
|
|
2870
|
+
"name": "confirm",
|
|
2797
2871
|
"required": false,
|
|
2872
|
+
"allowNo": false,
|
|
2873
|
+
"type": "boolean"
|
|
2874
|
+
},
|
|
2875
|
+
"limit": {
|
|
2876
|
+
"char": "l",
|
|
2877
|
+
"description": "Maximum number of records to delete (default 200, max 10000)",
|
|
2878
|
+
"name": "limit",
|
|
2879
|
+
"required": false,
|
|
2880
|
+
"default": 200,
|
|
2798
2881
|
"hasDynamicHelp": false,
|
|
2799
2882
|
"multiple": false,
|
|
2800
2883
|
"type": "option"
|
|
@@ -2802,29 +2885,40 @@
|
|
|
2802
2885
|
},
|
|
2803
2886
|
"hasDynamicHelp": false,
|
|
2804
2887
|
"hiddenAliases": [],
|
|
2805
|
-
"id": "
|
|
2888
|
+
"id": "bulk:delete",
|
|
2806
2889
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
2807
2890
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
2808
2891
|
"pluginType": "core",
|
|
2809
2892
|
"strict": true,
|
|
2810
2893
|
"enableJsonFlag": true,
|
|
2811
|
-
"autocomplete": {},
|
|
2812
2894
|
"isESM": true,
|
|
2813
2895
|
"relativePath": [
|
|
2814
2896
|
"dist",
|
|
2815
2897
|
"commands",
|
|
2816
|
-
"
|
|
2817
|
-
"
|
|
2898
|
+
"bulk",
|
|
2899
|
+
"delete.js"
|
|
2818
2900
|
]
|
|
2819
2901
|
},
|
|
2820
|
-
"
|
|
2902
|
+
"bulk:update": {
|
|
2821
2903
|
"aliases": [],
|
|
2822
2904
|
"args": {},
|
|
2823
|
-
"description": "
|
|
2905
|
+
"description": "Bulk update records matching an encoded query.\n\nFinds all records in a table matching the given query, then applies field updates to each one. Defaults to dry-run mode — use --confirm to execute.\n\nFeatures:\n • Safe dry-run by default (shows match count without modifying data)\n • Encoded query filtering\n • JSON field=value pairs for update data\n • Configurable record limit (default 200, max 10000)\n • Progress reporting for large operations\n • Error collection — operation continues even if individual records fail",
|
|
2824
2906
|
"examples": [
|
|
2825
2907
|
{
|
|
2826
|
-
"description": "
|
|
2827
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
2908
|
+
"description": "Dry run — see how many records would be updated",
|
|
2909
|
+
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"active=true^priority=5\" --data '{\"priority\":\"4\"}' --auth dev"
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
"description": "Execute the update (requires --confirm)",
|
|
2913
|
+
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"active=true^priority=5\" --data '{\"priority\":\"4\"}' --confirm --auth dev"
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
"description": "Update with custom limit",
|
|
2917
|
+
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"state=1\" --data '{\"assignment_group\":\"group-sys-id\"}' --limit 500 --confirm --auth dev"
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
"description": "Update as JSON output",
|
|
2921
|
+
"command": "<%= config.bin %> <%= command.id %> --table incident --query \"active=true\" --data '{\"state\":\"6\"}' --confirm --json --auth dev"
|
|
2828
2922
|
}
|
|
2829
2923
|
],
|
|
2830
2924
|
"flags": {
|
|
@@ -2910,57 +3004,54 @@
|
|
|
2910
3004
|
"allowNo": false,
|
|
2911
3005
|
"type": "boolean"
|
|
2912
3006
|
},
|
|
2913
|
-
"
|
|
2914
|
-
"char": "
|
|
2915
|
-
"description": "
|
|
2916
|
-
"name": "
|
|
3007
|
+
"table": {
|
|
3008
|
+
"char": "t",
|
|
3009
|
+
"description": "Table name to update records in",
|
|
3010
|
+
"name": "table",
|
|
2917
3011
|
"required": true,
|
|
2918
3012
|
"hasDynamicHelp": false,
|
|
2919
3013
|
"multiple": false,
|
|
2920
3014
|
"type": "option"
|
|
2921
3015
|
},
|
|
2922
|
-
"
|
|
2923
|
-
"char": "
|
|
2924
|
-
"description": "
|
|
2925
|
-
"name": "
|
|
2926
|
-
"required":
|
|
3016
|
+
"query": {
|
|
3017
|
+
"char": "q",
|
|
3018
|
+
"description": "Encoded query to match records",
|
|
3019
|
+
"name": "query",
|
|
3020
|
+
"required": true,
|
|
2927
3021
|
"hasDynamicHelp": false,
|
|
2928
3022
|
"multiple": false,
|
|
2929
3023
|
"type": "option"
|
|
2930
3024
|
},
|
|
2931
|
-
"
|
|
2932
|
-
"char": "
|
|
2933
|
-
"description": "
|
|
2934
|
-
"name": "
|
|
2935
|
-
"required":
|
|
2936
|
-
"default": "foreground",
|
|
3025
|
+
"data": {
|
|
3026
|
+
"char": "d",
|
|
3027
|
+
"description": "JSON object of field=value pairs to apply (e.g. '{\"priority\":\"4\",\"state\":\"2\"}')",
|
|
3028
|
+
"name": "data",
|
|
3029
|
+
"required": true,
|
|
2937
3030
|
"hasDynamicHelp": false,
|
|
2938
3031
|
"multiple": false,
|
|
2939
|
-
"options": [
|
|
2940
|
-
"foreground",
|
|
2941
|
-
"background"
|
|
2942
|
-
],
|
|
2943
3032
|
"type": "option"
|
|
2944
3033
|
},
|
|
2945
|
-
"
|
|
2946
|
-
"description": "
|
|
2947
|
-
"name": "
|
|
3034
|
+
"confirm": {
|
|
3035
|
+
"description": "Execute the update (without this flag, performs a dry run)",
|
|
3036
|
+
"name": "confirm",
|
|
2948
3037
|
"required": false,
|
|
3038
|
+
"allowNo": false,
|
|
3039
|
+
"type": "boolean"
|
|
3040
|
+
},
|
|
3041
|
+
"limit": {
|
|
3042
|
+
"char": "l",
|
|
3043
|
+
"description": "Maximum number of records to update (default 200, max 10000)",
|
|
3044
|
+
"name": "limit",
|
|
3045
|
+
"required": false,
|
|
3046
|
+
"default": 200,
|
|
2949
3047
|
"hasDynamicHelp": false,
|
|
2950
3048
|
"multiple": false,
|
|
2951
3049
|
"type": "option"
|
|
2952
|
-
},
|
|
2953
|
-
"quick": {
|
|
2954
|
-
"description": "Skip execution detail records for better performance",
|
|
2955
|
-
"name": "quick",
|
|
2956
|
-
"required": false,
|
|
2957
|
-
"allowNo": false,
|
|
2958
|
-
"type": "boolean"
|
|
2959
3050
|
}
|
|
2960
3051
|
},
|
|
2961
3052
|
"hasDynamicHelp": false,
|
|
2962
3053
|
"hiddenAliases": [],
|
|
2963
|
-
"id": "
|
|
3054
|
+
"id": "bulk:update",
|
|
2964
3055
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
2965
3056
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
2966
3057
|
"pluginType": "core",
|
|
@@ -2970,30 +3061,72 @@
|
|
|
2970
3061
|
"relativePath": [
|
|
2971
3062
|
"dist",
|
|
2972
3063
|
"commands",
|
|
2973
|
-
"
|
|
2974
|
-
"
|
|
3064
|
+
"bulk",
|
|
3065
|
+
"update.js"
|
|
2975
3066
|
]
|
|
2976
3067
|
},
|
|
2977
|
-
"
|
|
3068
|
+
"exec": {
|
|
2978
3069
|
"aliases": [],
|
|
2979
|
-
"args": {
|
|
2980
|
-
|
|
3070
|
+
"args": {
|
|
3071
|
+
"scope": {
|
|
3072
|
+
"description": "Scope to execute script in. Use \"global\" for global scope.",
|
|
3073
|
+
"name": "scope",
|
|
3074
|
+
"required": true
|
|
3075
|
+
},
|
|
3076
|
+
"file": {
|
|
3077
|
+
"description": "File to execute in scripts background. If omitted, starts REPL mode.",
|
|
3078
|
+
"name": "file",
|
|
3079
|
+
"required": false
|
|
3080
|
+
}
|
|
3081
|
+
},
|
|
3082
|
+
"description": "Execute JavaScript on a ServiceNow instance remotely using Scripts - Background.\n\nThis command allows you to run JavaScript either from files or interactively via REPL mode. It mimics the functionality of the Scripts - Background interface in ServiceNow, providing a way to execute scripts programmatically without manual interaction. The output is returned in real-time and can be piped to other commands or saved to files.\n\nModes:\n • File Mode: Provide a file path to execute scripts from a file\n • REPL Mode: Omit the file path to start an interactive session\n\nFeatures:\n • Execute local JavaScript files remotely\n • Interactive REPL for ad-hoc script execution\n • Script parameterization with {placeholder} replacement\n • Multi-line script support in REPL\n • Scope-aware execution (global or custom scope)\n • Real-time console output capture\n • Pipe-able output for command chaining\n • Debug logging support\n • Useful for data migration, testing, and administrative tasks\n\nScript Parameterization:\n Use {paramName} placeholders in your script files, then provide values via --params:\n • Supports any JSON-serializable values (strings, numbers, booleans)\n • Multiple parameters supported\n • All occurrences of each placeholder are replaced\n • Example: {token}, {username}, {environment}\n\nREPL Controls:\n • Press Enter to add a new line\n • Type .exec or press Ctrl+D to execute the script\n • Type .clear to clear the current input\n • Type .exit or press Ctrl+C twice to exit REPL\n\n⚠️ IMPORTANT SECURITY WARNING:\nThis command executes scripts with the same permissions and risks as using Scripts - Background directly\nin ServiceNow. Always:\n • Review scripts before execution\n • Test in non-production environments first\n • Use appropriate scoping to limit access\n • Be aware of data modification risks\n • Follow your organization's security policies\n • Never execute untrusted scripts\n\nScript Capabilities:\n Scripts run with full GlideSystem API access and can:\n • Query and modify database records\n • Create, update, and delete data\n • Execute business rules and workflows\n • Access all APIs available in Scripts - Background\n • Use gs, GlideRecord, GlideAggregate, and other server-side APIs",
|
|
2981
3083
|
"examples": [
|
|
2982
3084
|
{
|
|
2983
|
-
"description": "
|
|
2984
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
3085
|
+
"description": "Start REPL in global scope",
|
|
3086
|
+
"command": "<%= config.bin %> <%= command.id %> global --auth dev-instance"
|
|
2985
3087
|
},
|
|
2986
3088
|
{
|
|
2987
|
-
"description": "
|
|
2988
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
3089
|
+
"description": "Start REPL in custom application scope",
|
|
3090
|
+
"command": "<%= config.bin %> <%= command.id %> x_my_custom_app --auth dev-instance"
|
|
3091
|
+
},
|
|
3092
|
+
{
|
|
3093
|
+
"description": "Execute a script file in global scope",
|
|
3094
|
+
"command": "<%= config.bin %> <%= command.id %> global ./scripts/cleanup.js --auth dev-instance"
|
|
3095
|
+
},
|
|
3096
|
+
{
|
|
3097
|
+
"description": "Execute a script file in a custom application scope",
|
|
3098
|
+
"command": "<%= config.bin %> <%= command.id %> x_my_custom_app ./scripts/app-config.js --auth dev-instance"
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
"description": "Execute a parameterized script with single parameter",
|
|
3102
|
+
"command": "<%= config.bin %> <%= command.id %> global ./scripts/query-user.js --auth dev-instance --params '{\"username\":\"admin\"}'"
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
"description": "Execute a parameterized script with multiple parameters",
|
|
3106
|
+
"command": "<%= config.bin %> <%= command.id %> global ./scripts/update-record.js --auth dev-instance --params '{\"table\":\"incident\",\"field\":\"priority\",\"value\":\"1\"}'"
|
|
3107
|
+
},
|
|
3108
|
+
{
|
|
3109
|
+
"description": "Execute and save output to a file",
|
|
3110
|
+
"command": "<%= config.bin %> <%= command.id %> global ./scripts/report.js --auth dev-instance > report.txt"
|
|
3111
|
+
},
|
|
3112
|
+
{
|
|
3113
|
+
"description": "Execute and pipe output to grep for filtering",
|
|
3114
|
+
"command": "<%= config.bin %> <%= command.id %> global ./scripts/list-users.js --auth dev-instance | grep \"admin\""
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
"description": "Execute with debug logging to troubleshoot issues",
|
|
3118
|
+
"command": "<%= config.bin %> <%= command.id %> global ./script.js --auth dev-instance --log-level debug"
|
|
3119
|
+
},
|
|
3120
|
+
{
|
|
3121
|
+
"description": "Execute with parameters for template replacement",
|
|
3122
|
+
"command": "<%= config.bin %> <%= command.id %> global ./script.js --auth dev-instance --params '{\"token\":\"abc123\",\"env\":\"dev\"}'"
|
|
2989
3123
|
}
|
|
2990
3124
|
],
|
|
2991
3125
|
"flags": {
|
|
2992
3126
|
"json": {
|
|
2993
|
-
"
|
|
2994
|
-
"
|
|
3127
|
+
"description": "Format output as json.",
|
|
3128
|
+
"helpGroup": "GLOBAL",
|
|
2995
3129
|
"name": "json",
|
|
2996
|
-
"required": false,
|
|
2997
3130
|
"allowNo": false,
|
|
2998
3131
|
"type": "boolean"
|
|
2999
3132
|
},
|
|
@@ -3071,27 +3204,10 @@
|
|
|
3071
3204
|
"allowNo": false,
|
|
3072
3205
|
"type": "boolean"
|
|
3073
3206
|
},
|
|
3074
|
-
"
|
|
3075
|
-
"char": "
|
|
3076
|
-
"description": "
|
|
3077
|
-
"name": "
|
|
3078
|
-
"required": true,
|
|
3079
|
-
"hasDynamicHelp": false,
|
|
3080
|
-
"multiple": false,
|
|
3081
|
-
"type": "option"
|
|
3082
|
-
},
|
|
3083
|
-
"reason": {
|
|
3084
|
-
"char": "r",
|
|
3085
|
-
"description": "Cancellation reason",
|
|
3086
|
-
"name": "reason",
|
|
3087
|
-
"required": false,
|
|
3088
|
-
"hasDynamicHelp": false,
|
|
3089
|
-
"multiple": false,
|
|
3090
|
-
"type": "option"
|
|
3091
|
-
},
|
|
3092
|
-
"scope": {
|
|
3093
|
-
"description": "Scope context for script execution",
|
|
3094
|
-
"name": "scope",
|
|
3207
|
+
"params": {
|
|
3208
|
+
"char": "p",
|
|
3209
|
+
"description": "JSON object of parameters to replace in script file. Use {paramName} syntax in your script.",
|
|
3210
|
+
"name": "params",
|
|
3095
3211
|
"required": false,
|
|
3096
3212
|
"hasDynamicHelp": false,
|
|
3097
3213
|
"multiple": false,
|
|
@@ -3100,36 +3216,29 @@
|
|
|
3100
3216
|
},
|
|
3101
3217
|
"hasDynamicHelp": false,
|
|
3102
3218
|
"hiddenAliases": [],
|
|
3103
|
-
"id": "
|
|
3219
|
+
"id": "exec",
|
|
3104
3220
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3105
3221
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3106
3222
|
"pluginType": "core",
|
|
3107
3223
|
"strict": true,
|
|
3108
3224
|
"enableJsonFlag": true,
|
|
3225
|
+
"autocomplete": {},
|
|
3109
3226
|
"isESM": true,
|
|
3110
3227
|
"relativePath": [
|
|
3111
3228
|
"dist",
|
|
3112
3229
|
"commands",
|
|
3113
|
-
"
|
|
3114
|
-
"
|
|
3230
|
+
"exec",
|
|
3231
|
+
"index.js"
|
|
3115
3232
|
]
|
|
3116
3233
|
},
|
|
3117
|
-
"flow:
|
|
3234
|
+
"flow:action": {
|
|
3118
3235
|
"aliases": [],
|
|
3119
3236
|
"args": {},
|
|
3120
|
-
"description": "
|
|
3237
|
+
"description": "Execute a Flow Designer action by scoped name.\n\nRuns an action using the sn_fd.FlowAPI ScriptableFlowRunner.\n\nFeatures:\n • Execute actions by scoped name\n • Pass input values as JSON\n • Foreground or background execution mode\n • Returns context ID, outputs, and debug information",
|
|
3121
3238
|
"examples": [
|
|
3122
3239
|
{
|
|
3123
|
-
"description": "
|
|
3124
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
3125
|
-
},
|
|
3126
|
-
{
|
|
3127
|
-
"description": "Copy by scoped name",
|
|
3128
|
-
"command": "<%= config.bin %> <%= command.id %> -s global.change__standard -n \"My Custom Change Flow\" -t 4a5a6115402946939ee48e3fe80f60f8 --auth dev"
|
|
3129
|
-
},
|
|
3130
|
-
{
|
|
3131
|
-
"description": "Copy with JSON output for scripting",
|
|
3132
|
-
"command": "<%= config.bin %> <%= command.id %> -s e89e3ade731310108ef62d2b04f6a744 -n \"Copy\" -t 4a5a6115402946939ee48e3fe80f60f8 --json --auth dev"
|
|
3240
|
+
"description": "Run an action",
|
|
3241
|
+
"command": "<%= config.bin %> <%= command.id %> --name global.create_record --inputs '{\"table\":\"incident\",\"values\":{\"short_description\":\"Test\"}}' --auth dev"
|
|
3133
3242
|
}
|
|
3134
3243
|
],
|
|
3135
3244
|
"flags": {
|
|
@@ -3215,37 +3324,57 @@
|
|
|
3215
3324
|
"allowNo": false,
|
|
3216
3325
|
"type": "boolean"
|
|
3217
3326
|
},
|
|
3218
|
-
"
|
|
3219
|
-
"char": "
|
|
3220
|
-
"description": "
|
|
3221
|
-
"name": "
|
|
3327
|
+
"name": {
|
|
3328
|
+
"char": "n",
|
|
3329
|
+
"description": "Scoped name of the action (e.g. global.create_record)",
|
|
3330
|
+
"name": "name",
|
|
3222
3331
|
"required": true,
|
|
3223
3332
|
"hasDynamicHelp": false,
|
|
3224
3333
|
"multiple": false,
|
|
3225
3334
|
"type": "option"
|
|
3226
3335
|
},
|
|
3227
|
-
"
|
|
3228
|
-
"char": "
|
|
3229
|
-
"description": "
|
|
3230
|
-
"name": "
|
|
3231
|
-
"required":
|
|
3336
|
+
"inputs": {
|
|
3337
|
+
"char": "i",
|
|
3338
|
+
"description": "JSON object of input name-value pairs",
|
|
3339
|
+
"name": "inputs",
|
|
3340
|
+
"required": false,
|
|
3232
3341
|
"hasDynamicHelp": false,
|
|
3233
3342
|
"multiple": false,
|
|
3234
3343
|
"type": "option"
|
|
3235
3344
|
},
|
|
3236
|
-
"
|
|
3237
|
-
"char": "
|
|
3238
|
-
"description": "
|
|
3239
|
-
"name": "
|
|
3240
|
-
"required":
|
|
3345
|
+
"mode": {
|
|
3346
|
+
"char": "m",
|
|
3347
|
+
"description": "Execution mode",
|
|
3348
|
+
"name": "mode",
|
|
3349
|
+
"required": false,
|
|
3350
|
+
"default": "foreground",
|
|
3351
|
+
"hasDynamicHelp": false,
|
|
3352
|
+
"multiple": false,
|
|
3353
|
+
"options": [
|
|
3354
|
+
"foreground",
|
|
3355
|
+
"background"
|
|
3356
|
+
],
|
|
3357
|
+
"type": "option"
|
|
3358
|
+
},
|
|
3359
|
+
"scope": {
|
|
3360
|
+
"description": "Scope context for script execution",
|
|
3361
|
+
"name": "scope",
|
|
3362
|
+
"required": false,
|
|
3241
3363
|
"hasDynamicHelp": false,
|
|
3242
3364
|
"multiple": false,
|
|
3243
3365
|
"type": "option"
|
|
3366
|
+
},
|
|
3367
|
+
"quick": {
|
|
3368
|
+
"description": "Skip execution detail records for better performance",
|
|
3369
|
+
"name": "quick",
|
|
3370
|
+
"required": false,
|
|
3371
|
+
"allowNo": false,
|
|
3372
|
+
"type": "boolean"
|
|
3244
3373
|
}
|
|
3245
3374
|
},
|
|
3246
3375
|
"hasDynamicHelp": false,
|
|
3247
3376
|
"hiddenAliases": [],
|
|
3248
|
-
"id": "flow:
|
|
3377
|
+
"id": "flow:action",
|
|
3249
3378
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3250
3379
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3251
3380
|
"pluginType": "core",
|
|
@@ -3256,39 +3385,27 @@
|
|
|
3256
3385
|
"dist",
|
|
3257
3386
|
"commands",
|
|
3258
3387
|
"flow",
|
|
3259
|
-
"
|
|
3388
|
+
"action.js"
|
|
3260
3389
|
]
|
|
3261
3390
|
},
|
|
3262
|
-
"flow:
|
|
3391
|
+
"flow:cancel": {
|
|
3263
3392
|
"aliases": [],
|
|
3264
3393
|
"args": {},
|
|
3265
|
-
"description": "
|
|
3394
|
+
"description": "Cancel a running or paused flow execution.\n\nCancels a flow context that is in QUEUED, IN_PROGRESS, or WAITING state.",
|
|
3266
3395
|
"examples": [
|
|
3267
3396
|
{
|
|
3268
|
-
"description": "
|
|
3269
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
3270
|
-
},
|
|
3271
|
-
{
|
|
3272
|
-
"description": "Retrieve a subflow definition",
|
|
3273
|
-
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --type subflow --auth dev"
|
|
3274
|
-
},
|
|
3275
|
-
{
|
|
3276
|
-
"description": "Retrieve a custom action definition with its ordered steps",
|
|
3277
|
-
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --type action --auth dev"
|
|
3278
|
-
},
|
|
3279
|
-
{
|
|
3280
|
-
"description": "Redirect the full JSON definition to a file",
|
|
3281
|
-
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --json --auth dev > flow.json"
|
|
3397
|
+
"description": "Cancel a running flow",
|
|
3398
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --auth dev"
|
|
3282
3399
|
},
|
|
3283
3400
|
{
|
|
3284
|
-
"description": "
|
|
3285
|
-
"command": "<%= config.bin %> <%= command.id %> -
|
|
3401
|
+
"description": "Cancel with a reason",
|
|
3402
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --reason \"No longer needed\" --auth dev"
|
|
3286
3403
|
}
|
|
3287
3404
|
],
|
|
3288
3405
|
"flags": {
|
|
3289
3406
|
"json": {
|
|
3290
3407
|
"char": "j",
|
|
3291
|
-
"description": "Output
|
|
3408
|
+
"description": "Output results as JSON",
|
|
3292
3409
|
"name": "json",
|
|
3293
3410
|
"required": false,
|
|
3294
3411
|
"allowNo": false,
|
|
@@ -3368,32 +3485,26 @@
|
|
|
3368
3485
|
"allowNo": false,
|
|
3369
3486
|
"type": "boolean"
|
|
3370
3487
|
},
|
|
3371
|
-
"
|
|
3372
|
-
"char": "
|
|
3373
|
-
"description": "
|
|
3374
|
-
"name": "
|
|
3488
|
+
"context-id": {
|
|
3489
|
+
"char": "c",
|
|
3490
|
+
"description": "Flow execution context sys_id",
|
|
3491
|
+
"name": "context-id",
|
|
3375
3492
|
"required": true,
|
|
3376
3493
|
"hasDynamicHelp": false,
|
|
3377
3494
|
"multiple": false,
|
|
3378
3495
|
"type": "option"
|
|
3379
3496
|
},
|
|
3380
|
-
"
|
|
3381
|
-
"char": "
|
|
3382
|
-
"description": "
|
|
3383
|
-
"name": "
|
|
3497
|
+
"reason": {
|
|
3498
|
+
"char": "r",
|
|
3499
|
+
"description": "Cancellation reason",
|
|
3500
|
+
"name": "reason",
|
|
3384
3501
|
"required": false,
|
|
3385
|
-
"default": "flow",
|
|
3386
3502
|
"hasDynamicHelp": false,
|
|
3387
3503
|
"multiple": false,
|
|
3388
|
-
"options": [
|
|
3389
|
-
"flow",
|
|
3390
|
-
"subflow",
|
|
3391
|
-
"action"
|
|
3392
|
-
],
|
|
3393
3504
|
"type": "option"
|
|
3394
3505
|
},
|
|
3395
3506
|
"scope": {
|
|
3396
|
-
"description": "Scope
|
|
3507
|
+
"description": "Scope context for script execution",
|
|
3397
3508
|
"name": "scope",
|
|
3398
3509
|
"required": false,
|
|
3399
3510
|
"hasDynamicHelp": false,
|
|
@@ -3403,7 +3514,7 @@
|
|
|
3403
3514
|
},
|
|
3404
3515
|
"hasDynamicHelp": false,
|
|
3405
3516
|
"hiddenAliases": [],
|
|
3406
|
-
"id": "flow:
|
|
3517
|
+
"id": "flow:cancel",
|
|
3407
3518
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3408
3519
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3409
3520
|
"pluginType": "core",
|
|
@@ -3414,25 +3525,25 @@
|
|
|
3414
3525
|
"dist",
|
|
3415
3526
|
"commands",
|
|
3416
3527
|
"flow",
|
|
3417
|
-
"
|
|
3528
|
+
"cancel.js"
|
|
3418
3529
|
]
|
|
3419
3530
|
},
|
|
3420
|
-
"flow:
|
|
3531
|
+
"flow:copy": {
|
|
3421
3532
|
"aliases": [],
|
|
3422
3533
|
"args": {},
|
|
3423
|
-
"description": "
|
|
3534
|
+
"description": "Copy an existing flow into a target scoped application.\n\nThis is the ServiceNow best practice before modifying any flow — OOB and shared flows must never be modified directly; always copy first. The copied flow lands in draft/unpublished state in the target scope.\n\nEnables the full CLI-driven flow development lifecycle:\n copy → pull (now-sdk transform) → modify → push → test → publish\n\nFeatures:\n • Copy flows by sys_id or scoped name\n • Specify a display name for the new copy\n • Target any scoped application by sys_id\n • Returns the new flow sys_id for use in subsequent commands",
|
|
3424
3535
|
"examples": [
|
|
3425
3536
|
{
|
|
3426
|
-
"description": "
|
|
3427
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
3537
|
+
"description": "Copy an OOB flow into your app scope",
|
|
3538
|
+
"command": "<%= config.bin %> <%= command.id %> --source-flow-id e89e3ade731310108ef62d2b04f6a744 --name \"Copy of Change - Standard\" --target-scope 4a5a6115402946939ee48e3fe80f60f8 --auth dev"
|
|
3428
3539
|
},
|
|
3429
3540
|
{
|
|
3430
|
-
"description": "
|
|
3431
|
-
"command": "<%= config.bin %> <%= command.id %> -
|
|
3541
|
+
"description": "Copy by scoped name",
|
|
3542
|
+
"command": "<%= config.bin %> <%= command.id %> -s global.change__standard -n \"My Custom Change Flow\" -t 4a5a6115402946939ee48e3fe80f60f8 --auth dev"
|
|
3432
3543
|
},
|
|
3433
3544
|
{
|
|
3434
|
-
"description": "
|
|
3435
|
-
"command": "<%= config.bin %> <%= command.id %> -
|
|
3545
|
+
"description": "Copy with JSON output for scripting",
|
|
3546
|
+
"command": "<%= config.bin %> <%= command.id %> -s e89e3ade731310108ef62d2b04f6a744 -n \"Copy\" -t 4a5a6115402946939ee48e3fe80f60f8 --json --auth dev"
|
|
3436
3547
|
}
|
|
3437
3548
|
],
|
|
3438
3549
|
"flags": {
|
|
@@ -3518,35 +3629,37 @@
|
|
|
3518
3629
|
"allowNo": false,
|
|
3519
3630
|
"type": "boolean"
|
|
3520
3631
|
},
|
|
3521
|
-
"
|
|
3522
|
-
"char": "
|
|
3523
|
-
"description": "
|
|
3524
|
-
"name": "
|
|
3632
|
+
"source-flow-id": {
|
|
3633
|
+
"char": "s",
|
|
3634
|
+
"description": "Source flow sys_id or scoped name (e.g. global.change__standard)",
|
|
3635
|
+
"name": "source-flow-id",
|
|
3525
3636
|
"required": true,
|
|
3526
3637
|
"hasDynamicHelp": false,
|
|
3527
3638
|
"multiple": false,
|
|
3528
3639
|
"type": "option"
|
|
3529
3640
|
},
|
|
3530
|
-
"
|
|
3531
|
-
"
|
|
3532
|
-
"
|
|
3533
|
-
"
|
|
3641
|
+
"name": {
|
|
3642
|
+
"char": "n",
|
|
3643
|
+
"description": "Display name for the new copied flow",
|
|
3644
|
+
"name": "name",
|
|
3645
|
+
"required": true,
|
|
3646
|
+
"hasDynamicHelp": false,
|
|
3647
|
+
"multiple": false,
|
|
3648
|
+
"type": "option"
|
|
3649
|
+
},
|
|
3650
|
+
"target-scope": {
|
|
3651
|
+
"char": "t",
|
|
3652
|
+
"description": "Scope sys_id of the target application (use `nex scope` to find scope sys_ids)",
|
|
3653
|
+
"name": "target-scope",
|
|
3654
|
+
"required": true,
|
|
3534
3655
|
"hasDynamicHelp": false,
|
|
3535
3656
|
"multiple": false,
|
|
3536
3657
|
"type": "option"
|
|
3537
|
-
},
|
|
3538
|
-
"include-definition": {
|
|
3539
|
-
"char": "d",
|
|
3540
|
-
"description": "Include the full flow definition snapshot in the response",
|
|
3541
|
-
"name": "include-definition",
|
|
3542
|
-
"required": false,
|
|
3543
|
-
"allowNo": false,
|
|
3544
|
-
"type": "boolean"
|
|
3545
3658
|
}
|
|
3546
3659
|
},
|
|
3547
3660
|
"hasDynamicHelp": false,
|
|
3548
3661
|
"hiddenAliases": [],
|
|
3549
|
-
"id": "flow:
|
|
3662
|
+
"id": "flow:copy",
|
|
3550
3663
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3551
3664
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3552
3665
|
"pluginType": "core",
|
|
@@ -3557,23 +3670,39 @@
|
|
|
3557
3670
|
"dist",
|
|
3558
3671
|
"commands",
|
|
3559
3672
|
"flow",
|
|
3560
|
-
"
|
|
3673
|
+
"copy.js"
|
|
3561
3674
|
]
|
|
3562
3675
|
},
|
|
3563
|
-
"flow:
|
|
3676
|
+
"flow:definition": {
|
|
3564
3677
|
"aliases": [],
|
|
3565
3678
|
"args": {},
|
|
3566
|
-
"description": "Retrieve
|
|
3679
|
+
"description": "Retrieve the read-only design-time definition of a flow, subflow, or action.\n\nReturns what the artifact IS, not what a run of it did: triggers, actions, nested subflows, flow logic, inputs and outputs as Workflow Studio stores them. Nothing is executed, published or modified, and no flow context is created or required.\n\nThis is the design-time counterpart to `flow details`, which describes one past execution and needs a context sys_id.\n\nThe type is never inferred from the sys_id: --type selects the artifact that is asked for, and a sys_id of a different type fails with a type_mismatch rather than being relabelled.\n\nWith --json, stdout carries exactly one JSON document — the complete typed result including the untouched ServiceNow payload — so it can be piped or redirected. Without it, a short summary is printed; definition bodies, step scripts and input values are never printed or logged.",
|
|
3567
3680
|
"examples": [
|
|
3568
3681
|
{
|
|
3569
|
-
"description": "
|
|
3570
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
3682
|
+
"description": "Summarise a flow definition",
|
|
3683
|
+
"command": "<%= config.bin %> <%= command.id %> --sys-id 887dda5583237210fdb8f7b6feaad32c --auth dev"
|
|
3684
|
+
},
|
|
3685
|
+
{
|
|
3686
|
+
"description": "Retrieve a subflow definition",
|
|
3687
|
+
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --type subflow --auth dev"
|
|
3688
|
+
},
|
|
3689
|
+
{
|
|
3690
|
+
"description": "Retrieve a custom action definition with its ordered steps",
|
|
3691
|
+
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --type action --auth dev"
|
|
3692
|
+
},
|
|
3693
|
+
{
|
|
3694
|
+
"description": "Redirect the full JSON definition to a file",
|
|
3695
|
+
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --json --auth dev > flow.json"
|
|
3696
|
+
},
|
|
3697
|
+
{
|
|
3698
|
+
"description": "Pipe the JSON definition into another tool",
|
|
3699
|
+
"command": "<%= config.bin %> <%= command.id %> -i 887dda5583237210fdb8f7b6feaad32c --type action --json --auth dev | jq .summary.steps"
|
|
3571
3700
|
}
|
|
3572
3701
|
],
|
|
3573
3702
|
"flags": {
|
|
3574
3703
|
"json": {
|
|
3575
3704
|
"char": "j",
|
|
3576
|
-
"description": "Output
|
|
3705
|
+
"description": "Output the complete typed result as JSON",
|
|
3577
3706
|
"name": "json",
|
|
3578
3707
|
"required": false,
|
|
3579
3708
|
"allowNo": false,
|
|
@@ -3653,17 +3782,32 @@
|
|
|
3653
3782
|
"allowNo": false,
|
|
3654
3783
|
"type": "boolean"
|
|
3655
3784
|
},
|
|
3656
|
-
"
|
|
3657
|
-
"char": "
|
|
3658
|
-
"description": "
|
|
3659
|
-
"name": "
|
|
3785
|
+
"sys-id": {
|
|
3786
|
+
"char": "i",
|
|
3787
|
+
"description": "sys_id of the flow, subflow, or action to retrieve",
|
|
3788
|
+
"name": "sys-id",
|
|
3660
3789
|
"required": true,
|
|
3661
3790
|
"hasDynamicHelp": false,
|
|
3662
3791
|
"multiple": false,
|
|
3663
3792
|
"type": "option"
|
|
3664
3793
|
},
|
|
3794
|
+
"type": {
|
|
3795
|
+
"char": "t",
|
|
3796
|
+
"description": "Artifact type to retrieve. Must match what the sys_id actually is.",
|
|
3797
|
+
"name": "type",
|
|
3798
|
+
"required": false,
|
|
3799
|
+
"default": "flow",
|
|
3800
|
+
"hasDynamicHelp": false,
|
|
3801
|
+
"multiple": false,
|
|
3802
|
+
"options": [
|
|
3803
|
+
"flow",
|
|
3804
|
+
"subflow",
|
|
3805
|
+
"action"
|
|
3806
|
+
],
|
|
3807
|
+
"type": "option"
|
|
3808
|
+
},
|
|
3665
3809
|
"scope": {
|
|
3666
|
-
"description": "Scope
|
|
3810
|
+
"description": "Scope sys_id or name for the transaction scope parameter. Optional — ServiceNow resolves the artifact's own scope when omitted.",
|
|
3667
3811
|
"name": "scope",
|
|
3668
3812
|
"required": false,
|
|
3669
3813
|
"hasDynamicHelp": false,
|
|
@@ -3673,7 +3817,7 @@
|
|
|
3673
3817
|
},
|
|
3674
3818
|
"hasDynamicHelp": false,
|
|
3675
3819
|
"hiddenAliases": [],
|
|
3676
|
-
"id": "flow:
|
|
3820
|
+
"id": "flow:definition",
|
|
3677
3821
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3678
3822
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3679
3823
|
"pluginType": "core",
|
|
@@ -3684,24 +3828,24 @@
|
|
|
3684
3828
|
"dist",
|
|
3685
3829
|
"commands",
|
|
3686
3830
|
"flow",
|
|
3687
|
-
"
|
|
3831
|
+
"definition.js"
|
|
3688
3832
|
]
|
|
3689
3833
|
},
|
|
3690
|
-
"flow:
|
|
3834
|
+
"flow:details": {
|
|
3691
3835
|
"aliases": [],
|
|
3692
3836
|
"args": {},
|
|
3693
|
-
"description": "
|
|
3837
|
+
"description": "Get rich execution details for a flow context.\n\nReturns per-action timing, inputs, outputs, and high-level metadata (state, runtime, who ran it, test vs production). This is the primary diagnostic command after flow test or flow run.\n\nUses the ProcessFlow operations API (GET /api/now/processflow/operations/flow/context/{id}), the same endpoint Flow Designer uses to display execution details.\n\nNOTE: Requires flow operations logging to be enabled on the instance. If the execution report is unavailable, a notice will explain why.\n\nTypical workflow:\n flow test → flow details → diagnose → modify flow → flow test again",
|
|
3694
3838
|
"examples": [
|
|
3695
3839
|
{
|
|
3696
|
-
"description": "Get
|
|
3840
|
+
"description": "Get execution details after testing a flow",
|
|
3697
3841
|
"command": "<%= config.bin %> <%= command.id %> --context-id d4e5f6789012345678abcdef01234567 --auth dev"
|
|
3698
3842
|
},
|
|
3699
3843
|
{
|
|
3700
|
-
"description": "Get
|
|
3701
|
-
"command": "<%= config.bin %> <%= command.id %> -c d4e5f6789012345678abcdef01234567 --
|
|
3844
|
+
"description": "Get details with explicit scope",
|
|
3845
|
+
"command": "<%= config.bin %> <%= command.id %> -c d4e5f6789012345678abcdef01234567 --scope x_myapp --auth dev"
|
|
3702
3846
|
},
|
|
3703
3847
|
{
|
|
3704
|
-
"description": "Get
|
|
3848
|
+
"description": "Get details with JSON output for scripting",
|
|
3705
3849
|
"command": "<%= config.bin %> <%= command.id %> -c d4e5f6789012345678abcdef01234567 --json --auth dev"
|
|
3706
3850
|
}
|
|
3707
3851
|
],
|
|
@@ -3797,34 +3941,26 @@
|
|
|
3797
3941
|
"multiple": false,
|
|
3798
3942
|
"type": "option"
|
|
3799
3943
|
},
|
|
3800
|
-
"
|
|
3801
|
-
"
|
|
3802
|
-
"
|
|
3803
|
-
"name": "limit",
|
|
3944
|
+
"scope": {
|
|
3945
|
+
"description": "Scope sys_id for the ProcessFlow API transaction scope parameter",
|
|
3946
|
+
"name": "scope",
|
|
3804
3947
|
"required": false,
|
|
3805
|
-
"default": 100,
|
|
3806
3948
|
"hasDynamicHelp": false,
|
|
3807
3949
|
"multiple": false,
|
|
3808
3950
|
"type": "option"
|
|
3809
3951
|
},
|
|
3810
|
-
"
|
|
3811
|
-
"char": "
|
|
3812
|
-
"description": "
|
|
3813
|
-
"name": "
|
|
3952
|
+
"include-definition": {
|
|
3953
|
+
"char": "d",
|
|
3954
|
+
"description": "Include the full flow definition snapshot in the response",
|
|
3955
|
+
"name": "include-definition",
|
|
3814
3956
|
"required": false,
|
|
3815
|
-
"
|
|
3816
|
-
"
|
|
3817
|
-
"multiple": false,
|
|
3818
|
-
"options": [
|
|
3819
|
-
"asc",
|
|
3820
|
-
"desc"
|
|
3821
|
-
],
|
|
3822
|
-
"type": "option"
|
|
3957
|
+
"allowNo": false,
|
|
3958
|
+
"type": "boolean"
|
|
3823
3959
|
}
|
|
3824
3960
|
},
|
|
3825
3961
|
"hasDynamicHelp": false,
|
|
3826
3962
|
"hiddenAliases": [],
|
|
3827
|
-
"id": "flow:
|
|
3963
|
+
"id": "flow:details",
|
|
3828
3964
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3829
3965
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3830
3966
|
"pluginType": "core",
|
|
@@ -3835,21 +3971,17 @@
|
|
|
3835
3971
|
"dist",
|
|
3836
3972
|
"commands",
|
|
3837
3973
|
"flow",
|
|
3838
|
-
"
|
|
3974
|
+
"details.js"
|
|
3839
3975
|
]
|
|
3840
3976
|
},
|
|
3841
|
-
"flow:
|
|
3977
|
+
"flow:error": {
|
|
3842
3978
|
"aliases": [],
|
|
3843
3979
|
"args": {},
|
|
3844
|
-
"description": "
|
|
3980
|
+
"description": "Retrieve error details from a failed flow execution.\n\nGets the error message from a flow context that ended in an error state.",
|
|
3845
3981
|
"examples": [
|
|
3846
3982
|
{
|
|
3847
|
-
"description": "
|
|
3848
|
-
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --
|
|
3849
|
-
},
|
|
3850
|
-
{
|
|
3851
|
-
"description": "Send a message with a JSON payload",
|
|
3852
|
-
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --message \"data_ready\" --payload '{\"status\":\"ok\"}' --auth dev"
|
|
3983
|
+
"description": "Get flow error details",
|
|
3984
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --auth dev"
|
|
3853
3985
|
}
|
|
3854
3986
|
],
|
|
3855
3987
|
"flags": {
|
|
@@ -3944,24 +4076,6 @@
|
|
|
3944
4076
|
"multiple": false,
|
|
3945
4077
|
"type": "option"
|
|
3946
4078
|
},
|
|
3947
|
-
"message": {
|
|
3948
|
-
"char": "m",
|
|
3949
|
-
"description": "Message to send to the flow",
|
|
3950
|
-
"name": "message",
|
|
3951
|
-
"required": true,
|
|
3952
|
-
"hasDynamicHelp": false,
|
|
3953
|
-
"multiple": false,
|
|
3954
|
-
"type": "option"
|
|
3955
|
-
},
|
|
3956
|
-
"payload": {
|
|
3957
|
-
"char": "p",
|
|
3958
|
-
"description": "Optional JSON payload to include with the message",
|
|
3959
|
-
"name": "payload",
|
|
3960
|
-
"required": false,
|
|
3961
|
-
"hasDynamicHelp": false,
|
|
3962
|
-
"multiple": false,
|
|
3963
|
-
"type": "option"
|
|
3964
|
-
},
|
|
3965
4079
|
"scope": {
|
|
3966
4080
|
"description": "Scope context for script execution",
|
|
3967
4081
|
"name": "scope",
|
|
@@ -3973,7 +4087,7 @@
|
|
|
3973
4087
|
},
|
|
3974
4088
|
"hasDynamicHelp": false,
|
|
3975
4089
|
"hiddenAliases": [],
|
|
3976
|
-
"id": "flow:
|
|
4090
|
+
"id": "flow:error",
|
|
3977
4091
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
3978
4092
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
3979
4093
|
"pluginType": "core",
|
|
@@ -3984,21 +4098,25 @@
|
|
|
3984
4098
|
"dist",
|
|
3985
4099
|
"commands",
|
|
3986
4100
|
"flow",
|
|
3987
|
-
"
|
|
4101
|
+
"error.js"
|
|
3988
4102
|
]
|
|
3989
4103
|
},
|
|
3990
|
-
"flow:
|
|
4104
|
+
"flow:logs": {
|
|
3991
4105
|
"aliases": [],
|
|
3992
4106
|
"args": {},
|
|
3993
|
-
"description": "Retrieve
|
|
4107
|
+
"description": "Retrieve flow execution log entries for a given context.\n\nLog entries include error messages, step-level debug output, and cancellation reasons. Use this alongside flow details to get the full picture of what happened during an execution.\n\nQueries sys_flow_log entries and maps numeric log levels to human-readable names (ERROR, WARN, INFO, DEBUG).\n\nNOTE: Log entries may be empty for simple successful executions, or if the flow reporting level is set to NONE. Errors and warnings are always logged regardless of the reporting level setting.",
|
|
3994
4108
|
"examples": [
|
|
3995
4109
|
{
|
|
3996
|
-
"description": "Get flow
|
|
3997
|
-
"command": "<%= config.bin %> <%= command.id %> --context-id
|
|
4110
|
+
"description": "Get flow execution logs",
|
|
4111
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id d4e5f6789012345678abcdef01234567 --auth dev"
|
|
3998
4112
|
},
|
|
3999
4113
|
{
|
|
4000
|
-
"description": "Get
|
|
4001
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
4114
|
+
"description": "Get latest 10 log entries in reverse order",
|
|
4115
|
+
"command": "<%= config.bin %> <%= command.id %> -c d4e5f6789012345678abcdef01234567 --limit 10 --order desc --auth dev"
|
|
4116
|
+
},
|
|
4117
|
+
{
|
|
4118
|
+
"description": "Get logs with JSON output for scripting",
|
|
4119
|
+
"command": "<%= config.bin %> <%= command.id %> -c d4e5f6789012345678abcdef01234567 --json --auth dev"
|
|
4002
4120
|
}
|
|
4003
4121
|
],
|
|
4004
4122
|
"flags": {
|
|
@@ -4086,25 +4204,41 @@
|
|
|
4086
4204
|
},
|
|
4087
4205
|
"context-id": {
|
|
4088
4206
|
"char": "c",
|
|
4089
|
-
"description": "Flow
|
|
4207
|
+
"description": "Flow context sys_id returned by flow test, flow run, flow subflow, or flow action",
|
|
4090
4208
|
"name": "context-id",
|
|
4091
4209
|
"required": true,
|
|
4092
4210
|
"hasDynamicHelp": false,
|
|
4093
4211
|
"multiple": false,
|
|
4094
4212
|
"type": "option"
|
|
4095
4213
|
},
|
|
4096
|
-
"
|
|
4097
|
-
"
|
|
4098
|
-
"
|
|
4214
|
+
"limit": {
|
|
4215
|
+
"char": "l",
|
|
4216
|
+
"description": "Maximum number of log entries to return",
|
|
4217
|
+
"name": "limit",
|
|
4218
|
+
"required": false,
|
|
4219
|
+
"default": 100,
|
|
4220
|
+
"hasDynamicHelp": false,
|
|
4221
|
+
"multiple": false,
|
|
4222
|
+
"type": "option"
|
|
4223
|
+
},
|
|
4224
|
+
"order": {
|
|
4225
|
+
"char": "o",
|
|
4226
|
+
"description": "Order direction: asc (oldest first) or desc (newest first)",
|
|
4227
|
+
"name": "order",
|
|
4099
4228
|
"required": false,
|
|
4229
|
+
"default": "asc",
|
|
4100
4230
|
"hasDynamicHelp": false,
|
|
4101
4231
|
"multiple": false,
|
|
4232
|
+
"options": [
|
|
4233
|
+
"asc",
|
|
4234
|
+
"desc"
|
|
4235
|
+
],
|
|
4102
4236
|
"type": "option"
|
|
4103
4237
|
}
|
|
4104
4238
|
},
|
|
4105
4239
|
"hasDynamicHelp": false,
|
|
4106
4240
|
"hiddenAliases": [],
|
|
4107
|
-
"id": "flow:
|
|
4241
|
+
"id": "flow:logs",
|
|
4108
4242
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
4109
4243
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
4110
4244
|
"pluginType": "core",
|
|
@@ -4115,25 +4249,21 @@
|
|
|
4115
4249
|
"dist",
|
|
4116
4250
|
"commands",
|
|
4117
4251
|
"flow",
|
|
4118
|
-
"
|
|
4252
|
+
"logs.js"
|
|
4119
4253
|
]
|
|
4120
4254
|
},
|
|
4121
|
-
"flow:
|
|
4255
|
+
"flow:message": {
|
|
4122
4256
|
"aliases": [],
|
|
4123
4257
|
"args": {},
|
|
4124
|
-
"description": "
|
|
4258
|
+
"description": "Send a message to a paused flow execution.\n\nSends a message to a flow context that is in a WAITING state (e.g. waiting on a \"Wait for Message\" action). Supports an optional JSON payload.",
|
|
4125
4259
|
"examples": [
|
|
4126
4260
|
{
|
|
4127
|
-
"description": "
|
|
4128
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
4129
|
-
},
|
|
4130
|
-
{
|
|
4131
|
-
"description": "Run with inputs",
|
|
4132
|
-
"command": "<%= config.bin %> <%= command.id %> --name global.my_flow --inputs '{\"record_sys_id\":\"abc123\"}' --auth dev"
|
|
4261
|
+
"description": "Send a message to resume a waiting flow",
|
|
4262
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --message \"approved\" --auth dev"
|
|
4133
4263
|
},
|
|
4134
4264
|
{
|
|
4135
|
-
"description": "
|
|
4136
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
4265
|
+
"description": "Send a message with a JSON payload",
|
|
4266
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --message \"data_ready\" --payload '{\"status\":\"ok\"}' --auth dev"
|
|
4137
4267
|
}
|
|
4138
4268
|
],
|
|
4139
4269
|
"flags": {
|
|
@@ -4219,57 +4349,45 @@
|
|
|
4219
4349
|
"allowNo": false,
|
|
4220
4350
|
"type": "boolean"
|
|
4221
4351
|
},
|
|
4222
|
-
"
|
|
4223
|
-
"char": "
|
|
4224
|
-
"description": "
|
|
4225
|
-
"name": "
|
|
4352
|
+
"context-id": {
|
|
4353
|
+
"char": "c",
|
|
4354
|
+
"description": "Flow execution context sys_id",
|
|
4355
|
+
"name": "context-id",
|
|
4226
4356
|
"required": true,
|
|
4227
4357
|
"hasDynamicHelp": false,
|
|
4228
4358
|
"multiple": false,
|
|
4229
4359
|
"type": "option"
|
|
4230
4360
|
},
|
|
4231
|
-
"
|
|
4232
|
-
"char": "
|
|
4233
|
-
"description": "
|
|
4234
|
-
"name": "
|
|
4235
|
-
"required":
|
|
4361
|
+
"message": {
|
|
4362
|
+
"char": "m",
|
|
4363
|
+
"description": "Message to send to the flow",
|
|
4364
|
+
"name": "message",
|
|
4365
|
+
"required": true,
|
|
4236
4366
|
"hasDynamicHelp": false,
|
|
4237
4367
|
"multiple": false,
|
|
4238
4368
|
"type": "option"
|
|
4239
4369
|
},
|
|
4240
|
-
"
|
|
4241
|
-
"char": "
|
|
4242
|
-
"description": "
|
|
4243
|
-
"name": "
|
|
4370
|
+
"payload": {
|
|
4371
|
+
"char": "p",
|
|
4372
|
+
"description": "Optional JSON payload to include with the message",
|
|
4373
|
+
"name": "payload",
|
|
4244
4374
|
"required": false,
|
|
4245
|
-
"default": "foreground",
|
|
4246
4375
|
"hasDynamicHelp": false,
|
|
4247
4376
|
"multiple": false,
|
|
4248
|
-
"options": [
|
|
4249
|
-
"foreground",
|
|
4250
|
-
"background"
|
|
4251
|
-
],
|
|
4252
4377
|
"type": "option"
|
|
4253
4378
|
},
|
|
4254
4379
|
"scope": {
|
|
4255
|
-
"description": "Scope context for script execution
|
|
4380
|
+
"description": "Scope context for script execution",
|
|
4256
4381
|
"name": "scope",
|
|
4257
4382
|
"required": false,
|
|
4258
4383
|
"hasDynamicHelp": false,
|
|
4259
4384
|
"multiple": false,
|
|
4260
4385
|
"type": "option"
|
|
4261
|
-
},
|
|
4262
|
-
"quick": {
|
|
4263
|
-
"description": "Skip execution detail records for better performance",
|
|
4264
|
-
"name": "quick",
|
|
4265
|
-
"required": false,
|
|
4266
|
-
"allowNo": false,
|
|
4267
|
-
"type": "boolean"
|
|
4268
4386
|
}
|
|
4269
4387
|
},
|
|
4270
4388
|
"hasDynamicHelp": false,
|
|
4271
4389
|
"hiddenAliases": [],
|
|
4272
|
-
"id": "flow:
|
|
4390
|
+
"id": "flow:message",
|
|
4273
4391
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
4274
4392
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
4275
4393
|
"pluginType": "core",
|
|
@@ -4280,17 +4398,21 @@
|
|
|
4280
4398
|
"dist",
|
|
4281
4399
|
"commands",
|
|
4282
4400
|
"flow",
|
|
4283
|
-
"
|
|
4401
|
+
"message.js"
|
|
4284
4402
|
]
|
|
4285
4403
|
},
|
|
4286
|
-
"flow:
|
|
4404
|
+
"flow:outputs": {
|
|
4287
4405
|
"aliases": [],
|
|
4288
4406
|
"args": {},
|
|
4289
|
-
"description": "
|
|
4407
|
+
"description": "Retrieve outputs from a completed flow execution.\n\nGets the output name-value pairs from a flow, subflow, or action execution context.",
|
|
4290
4408
|
"examples": [
|
|
4291
4409
|
{
|
|
4292
|
-
"description": "
|
|
4410
|
+
"description": "Get flow outputs",
|
|
4293
4411
|
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --auth dev"
|
|
4412
|
+
},
|
|
4413
|
+
{
|
|
4414
|
+
"description": "Get outputs as JSON",
|
|
4415
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --json --auth dev"
|
|
4294
4416
|
}
|
|
4295
4417
|
],
|
|
4296
4418
|
"flags": {
|
|
@@ -4396,7 +4518,7 @@
|
|
|
4396
4518
|
},
|
|
4397
4519
|
"hasDynamicHelp": false,
|
|
4398
4520
|
"hiddenAliases": [],
|
|
4399
|
-
"id": "flow:
|
|
4521
|
+
"id": "flow:outputs",
|
|
4400
4522
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
4401
4523
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
4402
4524
|
"pluginType": "core",
|
|
@@ -4407,21 +4529,25 @@
|
|
|
4407
4529
|
"dist",
|
|
4408
4530
|
"commands",
|
|
4409
4531
|
"flow",
|
|
4410
|
-
"
|
|
4532
|
+
"outputs.js"
|
|
4411
4533
|
]
|
|
4412
4534
|
},
|
|
4413
|
-
"flow:
|
|
4535
|
+
"flow:run": {
|
|
4414
4536
|
"aliases": [],
|
|
4415
4537
|
"args": {},
|
|
4416
|
-
"description": "Execute a published Flow Designer
|
|
4538
|
+
"description": "Execute a published Flow Designer flow by scoped name.\n\nRuns a flow using the sn_fd.FlowAPI ScriptableFlowRunner. Supports foreground (synchronous) and background (asynchronous) execution modes.\n\nNote: This command requires the flow to be published. For testing flows that are not yet published (draft/saved state), use `flow test` instead.\n\nFeatures:\n • Execute flows by scoped name (e.g. global.my_flow)\n • Pass input values as JSON\n • Foreground or background execution mode\n • Quick mode to skip execution detail records\n • Returns context ID, outputs, and debug information",
|
|
4417
4539
|
"examples": [
|
|
4418
4540
|
{
|
|
4419
|
-
"description": "Run a
|
|
4420
|
-
"command": "<%= config.bin %> <%= command.id %> --name global.
|
|
4541
|
+
"description": "Run a flow in foreground mode",
|
|
4542
|
+
"command": "<%= config.bin %> <%= command.id %> --name global.my_flow --auth dev"
|
|
4421
4543
|
},
|
|
4422
4544
|
{
|
|
4423
4545
|
"description": "Run with inputs",
|
|
4424
|
-
"command": "<%= config.bin %> <%= command.id %> --name
|
|
4546
|
+
"command": "<%= config.bin %> <%= command.id %> --name global.my_flow --inputs '{\"record_sys_id\":\"abc123\"}' --auth dev"
|
|
4547
|
+
},
|
|
4548
|
+
{
|
|
4549
|
+
"description": "Run in background mode",
|
|
4550
|
+
"command": "<%= config.bin %> <%= command.id %> --name global.my_flow --mode background --auth dev"
|
|
4425
4551
|
}
|
|
4426
4552
|
],
|
|
4427
4553
|
"flags": {
|
|
@@ -4509,7 +4635,7 @@
|
|
|
4509
4635
|
},
|
|
4510
4636
|
"name": {
|
|
4511
4637
|
"char": "n",
|
|
4512
|
-
"description": "Scoped name of the
|
|
4638
|
+
"description": "Scoped name of the flow (e.g. global.my_flow)",
|
|
4513
4639
|
"name": "name",
|
|
4514
4640
|
"required": true,
|
|
4515
4641
|
"hasDynamicHelp": false,
|
|
@@ -4540,7 +4666,7 @@
|
|
|
4540
4666
|
"type": "option"
|
|
4541
4667
|
},
|
|
4542
4668
|
"scope": {
|
|
4543
|
-
"description": "Scope context for script execution",
|
|
4669
|
+
"description": "Scope context for script execution (e.g. global, x_myapp)",
|
|
4544
4670
|
"name": "scope",
|
|
4545
4671
|
"required": false,
|
|
4546
4672
|
"hasDynamicHelp": false,
|
|
@@ -4557,7 +4683,7 @@
|
|
|
4557
4683
|
},
|
|
4558
4684
|
"hasDynamicHelp": false,
|
|
4559
4685
|
"hiddenAliases": [],
|
|
4560
|
-
"id": "flow:
|
|
4686
|
+
"id": "flow:run",
|
|
4561
4687
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
4562
4688
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
4563
4689
|
"pluginType": "core",
|
|
@@ -4568,25 +4694,17 @@
|
|
|
4568
4694
|
"dist",
|
|
4569
4695
|
"commands",
|
|
4570
4696
|
"flow",
|
|
4571
|
-
"
|
|
4697
|
+
"run.js"
|
|
4572
4698
|
]
|
|
4573
4699
|
},
|
|
4574
|
-
"flow:
|
|
4700
|
+
"flow:status": {
|
|
4575
4701
|
"aliases": [],
|
|
4576
4702
|
"args": {},
|
|
4577
|
-
"description": "
|
|
4703
|
+
"description": "Get the status of a flow execution context.\n\nQueries sys_flow_context to retrieve the current state of a flow execution.\n\nPossible states: QUEUED, IN_PROGRESS, WAITING, COMPLETE, CANCELLED, ERROR",
|
|
4578
4704
|
"examples": [
|
|
4579
4705
|
{
|
|
4580
|
-
"description": "
|
|
4581
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
4582
|
-
},
|
|
4583
|
-
{
|
|
4584
|
-
"description": "Test a flow by scoped name with explicit scope",
|
|
4585
|
-
"command": "<%= config.bin %> <%= command.id %> -f x_myapp.my_flow -o '{\"current\":\"abc123\",\"table_name\":\"incident\"}' --scope x_myapp --auth dev"
|
|
4586
|
-
},
|
|
4587
|
-
{
|
|
4588
|
-
"description": "Test with JSON output",
|
|
4589
|
-
"command": "<%= config.bin %> <%= command.id %> -f 887dda5583237210fdb8f7b6feaad32c -o '{\"current\":\"abc123\"}' --json --auth dev"
|
|
4706
|
+
"description": "Check flow execution status",
|
|
4707
|
+
"command": "<%= config.bin %> <%= command.id %> --context-id abc123def456 --auth dev"
|
|
4590
4708
|
}
|
|
4591
4709
|
],
|
|
4592
4710
|
"flags": {
|
|
@@ -4672,43 +4790,27 @@
|
|
|
4672
4790
|
"allowNo": false,
|
|
4673
4791
|
"type": "boolean"
|
|
4674
4792
|
},
|
|
4675
|
-
"
|
|
4676
|
-
"char": "
|
|
4677
|
-
"description": "Flow
|
|
4678
|
-
"name": "
|
|
4679
|
-
"required": true,
|
|
4680
|
-
"hasDynamicHelp": false,
|
|
4681
|
-
"multiple": false,
|
|
4682
|
-
"type": "option"
|
|
4683
|
-
},
|
|
4684
|
-
"output-map": {
|
|
4685
|
-
"char": "o",
|
|
4686
|
-
"description": "JSON mapping of trigger output variable names to test values (e.g. '{\"current\":\"<sys_id>\",\"table_name\":\"change_request\"}')",
|
|
4687
|
-
"name": "output-map",
|
|
4793
|
+
"context-id": {
|
|
4794
|
+
"char": "c",
|
|
4795
|
+
"description": "Flow execution context sys_id",
|
|
4796
|
+
"name": "context-id",
|
|
4688
4797
|
"required": true,
|
|
4689
4798
|
"hasDynamicHelp": false,
|
|
4690
4799
|
"multiple": false,
|
|
4691
4800
|
"type": "option"
|
|
4692
4801
|
},
|
|
4693
4802
|
"scope": {
|
|
4694
|
-
"description": "Scope
|
|
4803
|
+
"description": "Scope context for script execution",
|
|
4695
4804
|
"name": "scope",
|
|
4696
4805
|
"required": false,
|
|
4697
4806
|
"hasDynamicHelp": false,
|
|
4698
4807
|
"multiple": false,
|
|
4699
4808
|
"type": "option"
|
|
4700
|
-
},
|
|
4701
|
-
"synchronous": {
|
|
4702
|
-
"description": "Run test synchronously (default: true)",
|
|
4703
|
-
"name": "synchronous",
|
|
4704
|
-
"required": false,
|
|
4705
|
-
"allowNo": true,
|
|
4706
|
-
"type": "boolean"
|
|
4707
4809
|
}
|
|
4708
4810
|
},
|
|
4709
4811
|
"hasDynamicHelp": false,
|
|
4710
4812
|
"hiddenAliases": [],
|
|
4711
|
-
"id": "flow:
|
|
4813
|
+
"id": "flow:status",
|
|
4712
4814
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
4713
4815
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
4714
4816
|
"pluginType": "core",
|
|
@@ -4719,29 +4821,21 @@
|
|
|
4719
4821
|
"dist",
|
|
4720
4822
|
"commands",
|
|
4721
4823
|
"flow",
|
|
4722
|
-
"
|
|
4824
|
+
"status.js"
|
|
4723
4825
|
]
|
|
4724
4826
|
},
|
|
4725
|
-
"
|
|
4827
|
+
"flow:subflow": {
|
|
4726
4828
|
"aliases": [],
|
|
4727
4829
|
"args": {},
|
|
4728
|
-
"description": "
|
|
4830
|
+
"description": "Execute a published Flow Designer subflow by scoped name.\n\nRuns a subflow using the sn_fd.FlowAPI ScriptableFlowRunner.\n\nNote: This command requires the subflow to be published. For testing flows that are not yet published (draft/saved state), use `flow test` instead.\n\nFeatures:\n • Execute subflows by scoped name\n • Pass input values as JSON\n • Foreground or background execution mode\n • Returns context ID, outputs, and debug information",
|
|
4729
4831
|
"examples": [
|
|
4730
4832
|
{
|
|
4731
|
-
"description": "Run
|
|
4732
|
-
"command": "<%= config.bin %> <%= command.id %> --auth dev"
|
|
4733
|
-
},
|
|
4734
|
-
{
|
|
4735
|
-
"description": "Check only version and stuck jobs",
|
|
4736
|
-
"command": "<%= config.bin %> <%= command.id %> --include-version --include-stuck-jobs --no-include-cluster --no-include-semaphores --no-include-operational-counts --auth dev"
|
|
4737
|
-
},
|
|
4738
|
-
{
|
|
4739
|
-
"description": "Health check with custom stuck job threshold",
|
|
4740
|
-
"command": "<%= config.bin %> <%= command.id %> --stuck-job-threshold 60 --auth dev"
|
|
4833
|
+
"description": "Run a subflow",
|
|
4834
|
+
"command": "<%= config.bin %> <%= command.id %> --name global.my_subflow --auth dev"
|
|
4741
4835
|
},
|
|
4742
4836
|
{
|
|
4743
|
-
"description": "
|
|
4744
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
4837
|
+
"description": "Run with inputs",
|
|
4838
|
+
"command": "<%= config.bin %> <%= command.id %> --name x_myapp.process_record --inputs '{\"table\":\"incident\",\"sys_id\":\"abc123\"}' --auth dev"
|
|
4745
4839
|
}
|
|
4746
4840
|
],
|
|
4747
4841
|
"flags": {
|
|
@@ -4827,54 +4921,57 @@
|
|
|
4827
4921
|
"allowNo": false,
|
|
4828
4922
|
"type": "boolean"
|
|
4829
4923
|
},
|
|
4830
|
-
"
|
|
4831
|
-
"
|
|
4832
|
-
"
|
|
4833
|
-
"
|
|
4834
|
-
"
|
|
4835
|
-
"
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
"description": "Include cluster node status",
|
|
4839
|
-
"name": "include-cluster",
|
|
4840
|
-
"required": false,
|
|
4841
|
-
"allowNo": true,
|
|
4842
|
-
"type": "boolean"
|
|
4843
|
-
},
|
|
4844
|
-
"include-stuck-jobs": {
|
|
4845
|
-
"description": "Include stuck job detection",
|
|
4846
|
-
"name": "include-stuck-jobs",
|
|
4847
|
-
"required": false,
|
|
4848
|
-
"allowNo": true,
|
|
4849
|
-
"type": "boolean"
|
|
4924
|
+
"name": {
|
|
4925
|
+
"char": "n",
|
|
4926
|
+
"description": "Scoped name of the subflow (e.g. global.my_subflow)",
|
|
4927
|
+
"name": "name",
|
|
4928
|
+
"required": true,
|
|
4929
|
+
"hasDynamicHelp": false,
|
|
4930
|
+
"multiple": false,
|
|
4931
|
+
"type": "option"
|
|
4850
4932
|
},
|
|
4851
|
-
"
|
|
4852
|
-
"
|
|
4853
|
-
"
|
|
4933
|
+
"inputs": {
|
|
4934
|
+
"char": "i",
|
|
4935
|
+
"description": "JSON object of input name-value pairs",
|
|
4936
|
+
"name": "inputs",
|
|
4854
4937
|
"required": false,
|
|
4855
|
-
"
|
|
4856
|
-
"
|
|
4938
|
+
"hasDynamicHelp": false,
|
|
4939
|
+
"multiple": false,
|
|
4940
|
+
"type": "option"
|
|
4857
4941
|
},
|
|
4858
|
-
"
|
|
4859
|
-
"
|
|
4860
|
-
"
|
|
4942
|
+
"mode": {
|
|
4943
|
+
"char": "m",
|
|
4944
|
+
"description": "Execution mode",
|
|
4945
|
+
"name": "mode",
|
|
4861
4946
|
"required": false,
|
|
4862
|
-
"
|
|
4863
|
-
"
|
|
4947
|
+
"default": "foreground",
|
|
4948
|
+
"hasDynamicHelp": false,
|
|
4949
|
+
"multiple": false,
|
|
4950
|
+
"options": [
|
|
4951
|
+
"foreground",
|
|
4952
|
+
"background"
|
|
4953
|
+
],
|
|
4954
|
+
"type": "option"
|
|
4864
4955
|
},
|
|
4865
|
-
"
|
|
4866
|
-
"description": "
|
|
4867
|
-
"name": "
|
|
4956
|
+
"scope": {
|
|
4957
|
+
"description": "Scope context for script execution",
|
|
4958
|
+
"name": "scope",
|
|
4868
4959
|
"required": false,
|
|
4869
|
-
"default": 30,
|
|
4870
4960
|
"hasDynamicHelp": false,
|
|
4871
4961
|
"multiple": false,
|
|
4872
4962
|
"type": "option"
|
|
4963
|
+
},
|
|
4964
|
+
"quick": {
|
|
4965
|
+
"description": "Skip execution detail records for better performance",
|
|
4966
|
+
"name": "quick",
|
|
4967
|
+
"required": false,
|
|
4968
|
+
"allowNo": false,
|
|
4969
|
+
"type": "boolean"
|
|
4873
4970
|
}
|
|
4874
4971
|
},
|
|
4875
4972
|
"hasDynamicHelp": false,
|
|
4876
4973
|
"hiddenAliases": [],
|
|
4877
|
-
"id": "
|
|
4974
|
+
"id": "flow:subflow",
|
|
4878
4975
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
4879
4976
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
4880
4977
|
"pluginType": "core",
|
|
@@ -4884,53 +4981,34 @@
|
|
|
4884
4981
|
"relativePath": [
|
|
4885
4982
|
"dist",
|
|
4886
4983
|
"commands",
|
|
4887
|
-
"
|
|
4888
|
-
"
|
|
4984
|
+
"flow",
|
|
4985
|
+
"subflow.js"
|
|
4889
4986
|
]
|
|
4890
4987
|
},
|
|
4891
|
-
"
|
|
4988
|
+
"flow:test": {
|
|
4892
4989
|
"aliases": [],
|
|
4893
4990
|
"args": {},
|
|
4894
|
-
"description": "
|
|
4991
|
+
"description": "Test a Flow Designer flow without requiring it to be published.\n\nInvokes the same API as the \"Test\" button in Flow Designer, running the flow in its current saved (draft) state. Unlike `flow run` which requires a published flow and uses sn_fd.FlowAPI, `flow test` works on unpublished drafts via the ProcessFlow REST API.\n\nFeatures:\n • Test flows by sys_id or scoped name\n • Pass trigger output values as JSON via --output-map\n • Auto-resolves scope from flow definition if not provided\n • Synchronous or asynchronous execution",
|
|
4895
4992
|
"examples": [
|
|
4896
4993
|
{
|
|
4897
|
-
"description": "
|
|
4898
|
-
"command": "<%= config.bin %> <%= command.id %> --auth dev
|
|
4899
|
-
},
|
|
4900
|
-
{
|
|
4901
|
-
"description": "Tail logs and save to a file",
|
|
4902
|
-
"command": "<%= config.bin %> <%= command.id %> --output ./logs/instance-logs.txt --auth dev-instance"
|
|
4903
|
-
},
|
|
4904
|
-
{
|
|
4905
|
-
"description": "Tail logs with custom polling interval (500ms for faster updates)",
|
|
4906
|
-
"command": "<%= config.bin %> <%= command.id %> --interval 500 --auth dev-instance"
|
|
4907
|
-
},
|
|
4908
|
-
{
|
|
4909
|
-
"description": "Filter logs containing specific text (case-insensitive)",
|
|
4910
|
-
"command": "<%= config.bin %> <%= command.id %> --filter \"message CONTAINS_CI error\" --auth dev-instance"
|
|
4911
|
-
},
|
|
4912
|
-
{
|
|
4913
|
-
"description": "Filter logs with multiple conditions (AND logic)",
|
|
4914
|
-
"command": "<%= config.bin %> <%= command.id %> --filter \"message CONTAINS x_acme_app\" --filter \"message CONTAINS error\" --auth dev-instance"
|
|
4915
|
-
},
|
|
4916
|
-
{
|
|
4917
|
-
"description": "Filter logs using regex pattern",
|
|
4918
|
-
"command": "<%= config.bin %> <%= command.id %> --filter \"message REGEX .*exception.*\" --auth dev-instance"
|
|
4994
|
+
"description": "Test a flow by sys_id",
|
|
4995
|
+
"command": "<%= config.bin %> <%= command.id %> --flow-id 887dda5583237210fdb8f7b6feaad32c --output-map '{\"current\":\"0ecd7552db252200a6a2b31be0b8f5e6\",\"table_name\":\"change_request\"}' --auth dev"
|
|
4919
4996
|
},
|
|
4920
4997
|
{
|
|
4921
|
-
"description": "
|
|
4922
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
4998
|
+
"description": "Test a flow by scoped name with explicit scope",
|
|
4999
|
+
"command": "<%= config.bin %> <%= command.id %> -f x_myapp.my_flow -o '{\"current\":\"abc123\",\"table_name\":\"incident\"}' --scope x_myapp --auth dev"
|
|
4923
5000
|
},
|
|
4924
5001
|
{
|
|
4925
|
-
"description": "
|
|
4926
|
-
"command": "<%= config.bin %> <%= command.id %>
|
|
5002
|
+
"description": "Test with JSON output",
|
|
5003
|
+
"command": "<%= config.bin %> <%= command.id %> -f 887dda5583237210fdb8f7b6feaad32c -o '{\"current\":\"abc123\"}' --json --auth dev"
|
|
4927
5004
|
}
|
|
4928
5005
|
],
|
|
4929
5006
|
"flags": {
|
|
4930
5007
|
"json": {
|
|
4931
|
-
"
|
|
4932
|
-
"
|
|
5008
|
+
"char": "j",
|
|
5009
|
+
"description": "Output results as JSON",
|
|
4933
5010
|
"name": "json",
|
|
5011
|
+
"required": false,
|
|
4934
5012
|
"allowNo": false,
|
|
4935
5013
|
"type": "boolean"
|
|
4936
5014
|
},
|
|
@@ -5008,45 +5086,43 @@
|
|
|
5008
5086
|
"allowNo": false,
|
|
5009
5087
|
"type": "boolean"
|
|
5010
5088
|
},
|
|
5011
|
-
"
|
|
5089
|
+
"flow-id": {
|
|
5090
|
+
"char": "f",
|
|
5091
|
+
"description": "Flow sys_id or scoped name (e.g. x_myapp.my_flow)",
|
|
5092
|
+
"name": "flow-id",
|
|
5093
|
+
"required": true,
|
|
5094
|
+
"hasDynamicHelp": false,
|
|
5095
|
+
"multiple": false,
|
|
5096
|
+
"type": "option"
|
|
5097
|
+
},
|
|
5098
|
+
"output-map": {
|
|
5012
5099
|
"char": "o",
|
|
5013
|
-
"description": "
|
|
5014
|
-
"name": "output",
|
|
5015
|
-
"required":
|
|
5100
|
+
"description": "JSON mapping of trigger output variable names to test values (e.g. '{\"current\":\"<sys_id>\",\"table_name\":\"change_request\"}')",
|
|
5101
|
+
"name": "output-map",
|
|
5102
|
+
"required": true,
|
|
5016
5103
|
"hasDynamicHelp": false,
|
|
5017
5104
|
"multiple": false,
|
|
5018
5105
|
"type": "option"
|
|
5019
5106
|
},
|
|
5020
|
-
"
|
|
5021
|
-
"
|
|
5022
|
-
"
|
|
5023
|
-
"name": "interval",
|
|
5107
|
+
"scope": {
|
|
5108
|
+
"description": "Scope sys_id for transaction scope (auto-resolved from flow definition if omitted)",
|
|
5109
|
+
"name": "scope",
|
|
5024
5110
|
"required": false,
|
|
5025
|
-
"default": 1000,
|
|
5026
5111
|
"hasDynamicHelp": false,
|
|
5027
5112
|
"multiple": false,
|
|
5028
5113
|
"type": "option"
|
|
5029
5114
|
},
|
|
5030
|
-
"
|
|
5031
|
-
"description": "
|
|
5032
|
-
"name": "
|
|
5115
|
+
"synchronous": {
|
|
5116
|
+
"description": "Run test synchronously (default: true)",
|
|
5117
|
+
"name": "synchronous",
|
|
5033
5118
|
"required": false,
|
|
5034
|
-
"allowNo":
|
|
5119
|
+
"allowNo": true,
|
|
5035
5120
|
"type": "boolean"
|
|
5036
|
-
},
|
|
5037
|
-
"filter": {
|
|
5038
|
-
"char": "f",
|
|
5039
|
-
"description": "Filter logs by field and value. Syntax: field OPERATOR value. Operators: CONTAINS, CONTAINS_CI (case-insensitive), EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI, ENDS_WITH, ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_EQUALS. Field defaults to \"message\" if omitted. Multiple filters are combined with AND logic.",
|
|
5040
|
-
"name": "filter",
|
|
5041
|
-
"required": false,
|
|
5042
|
-
"hasDynamicHelp": false,
|
|
5043
|
-
"multiple": true,
|
|
5044
|
-
"type": "option"
|
|
5045
5121
|
}
|
|
5046
5122
|
},
|
|
5047
5123
|
"hasDynamicHelp": false,
|
|
5048
5124
|
"hiddenAliases": [],
|
|
5049
|
-
"id": "
|
|
5125
|
+
"id": "flow:test",
|
|
5050
5126
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
5051
5127
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
5052
5128
|
"pluginType": "core",
|
|
@@ -5056,8 +5132,8 @@
|
|
|
5056
5132
|
"relativePath": [
|
|
5057
5133
|
"dist",
|
|
5058
5134
|
"commands",
|
|
5059
|
-
"
|
|
5060
|
-
"
|
|
5135
|
+
"flow",
|
|
5136
|
+
"test.js"
|
|
5061
5137
|
]
|
|
5062
5138
|
},
|
|
5063
5139
|
"policy:status": {
|
|
@@ -9830,25 +9906,283 @@
|
|
|
9830
9906
|
"move.js"
|
|
9831
9907
|
]
|
|
9832
9908
|
},
|
|
9833
|
-
"workflow:create": {
|
|
9909
|
+
"workflow:create": {
|
|
9910
|
+
"aliases": [],
|
|
9911
|
+
"args": {},
|
|
9912
|
+
"description": "Create a complete workflow from a JSON specification file.",
|
|
9913
|
+
"examples": [
|
|
9914
|
+
{
|
|
9915
|
+
"command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
|
|
9916
|
+
"description": "Create a workflow from a JSON spec file"
|
|
9917
|
+
},
|
|
9918
|
+
{
|
|
9919
|
+
"command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
|
|
9920
|
+
"description": "Create a workflow and output result as JSON"
|
|
9921
|
+
}
|
|
9922
|
+
],
|
|
9923
|
+
"flags": {
|
|
9924
|
+
"json": {
|
|
9925
|
+
"description": "Format output as json.",
|
|
9926
|
+
"helpGroup": "GLOBAL",
|
|
9927
|
+
"name": "json",
|
|
9928
|
+
"allowNo": false,
|
|
9929
|
+
"type": "boolean"
|
|
9930
|
+
},
|
|
9931
|
+
"auth": {
|
|
9932
|
+
"char": "a",
|
|
9933
|
+
"description": "Auth alias to use.",
|
|
9934
|
+
"name": "auth",
|
|
9935
|
+
"required": false,
|
|
9936
|
+
"hasDynamicHelp": false,
|
|
9937
|
+
"multiple": false,
|
|
9938
|
+
"type": "option"
|
|
9939
|
+
},
|
|
9940
|
+
"cred-store": {
|
|
9941
|
+
"description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
|
|
9942
|
+
"helpGroup": "GLOBAL",
|
|
9943
|
+
"name": "cred-store",
|
|
9944
|
+
"required": false,
|
|
9945
|
+
"allowNo": false,
|
|
9946
|
+
"type": "boolean"
|
|
9947
|
+
},
|
|
9948
|
+
"deny-execute": {
|
|
9949
|
+
"description": "Refuse background scripts, flow runs and ATF runs for this invocation.",
|
|
9950
|
+
"helpGroup": "GLOBAL",
|
|
9951
|
+
"name": "deny-execute",
|
|
9952
|
+
"required": false,
|
|
9953
|
+
"allowNo": false,
|
|
9954
|
+
"type": "boolean"
|
|
9955
|
+
},
|
|
9956
|
+
"deny-write": {
|
|
9957
|
+
"description": "Refuse any change to instance data for this invocation.",
|
|
9958
|
+
"helpGroup": "GLOBAL",
|
|
9959
|
+
"name": "deny-write",
|
|
9960
|
+
"required": false,
|
|
9961
|
+
"allowNo": false,
|
|
9962
|
+
"type": "boolean"
|
|
9963
|
+
},
|
|
9964
|
+
"log-dir": {
|
|
9965
|
+
"description": "Directory to write log files to. Implies --log-file.",
|
|
9966
|
+
"helpGroup": "GLOBAL",
|
|
9967
|
+
"name": "log-dir",
|
|
9968
|
+
"required": false,
|
|
9969
|
+
"hasDynamicHelp": false,
|
|
9970
|
+
"multiple": false,
|
|
9971
|
+
"type": "option"
|
|
9972
|
+
},
|
|
9973
|
+
"log-file": {
|
|
9974
|
+
"description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
|
|
9975
|
+
"helpGroup": "GLOBAL",
|
|
9976
|
+
"name": "log-file",
|
|
9977
|
+
"required": false,
|
|
9978
|
+
"allowNo": false,
|
|
9979
|
+
"type": "boolean"
|
|
9980
|
+
},
|
|
9981
|
+
"log-level": {
|
|
9982
|
+
"helpGroup": "GLOBAL",
|
|
9983
|
+
"name": "log-level",
|
|
9984
|
+
"summary": "Specify level for logging.",
|
|
9985
|
+
"default": "info",
|
|
9986
|
+
"hasDynamicHelp": false,
|
|
9987
|
+
"multiple": false,
|
|
9988
|
+
"options": [
|
|
9989
|
+
"debug",
|
|
9990
|
+
"warn",
|
|
9991
|
+
"error",
|
|
9992
|
+
"info",
|
|
9993
|
+
"trace"
|
|
9994
|
+
],
|
|
9995
|
+
"type": "option"
|
|
9996
|
+
},
|
|
9997
|
+
"read-only": {
|
|
9998
|
+
"description": "Refuse every change to the instance — equivalent to --deny-write --deny-execute. Reads are unaffected.",
|
|
9999
|
+
"helpGroup": "GLOBAL",
|
|
10000
|
+
"name": "read-only",
|
|
10001
|
+
"required": false,
|
|
10002
|
+
"allowNo": false,
|
|
10003
|
+
"type": "boolean"
|
|
10004
|
+
},
|
|
10005
|
+
"spec": {
|
|
10006
|
+
"char": "s",
|
|
10007
|
+
"description": "Path to workflow JSON specification file",
|
|
10008
|
+
"name": "spec",
|
|
10009
|
+
"required": true,
|
|
10010
|
+
"hasDynamicHelp": false,
|
|
10011
|
+
"multiple": false,
|
|
10012
|
+
"type": "option"
|
|
10013
|
+
}
|
|
10014
|
+
},
|
|
10015
|
+
"hasDynamicHelp": false,
|
|
10016
|
+
"hiddenAliases": [],
|
|
10017
|
+
"id": "workflow:create",
|
|
10018
|
+
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
10019
|
+
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
10020
|
+
"pluginType": "core",
|
|
10021
|
+
"strict": true,
|
|
10022
|
+
"enableJsonFlag": true,
|
|
10023
|
+
"isESM": true,
|
|
10024
|
+
"relativePath": [
|
|
10025
|
+
"dist",
|
|
10026
|
+
"commands",
|
|
10027
|
+
"workflow",
|
|
10028
|
+
"create.js"
|
|
10029
|
+
]
|
|
10030
|
+
},
|
|
10031
|
+
"workflow:publish": {
|
|
10032
|
+
"aliases": [],
|
|
10033
|
+
"args": {},
|
|
10034
|
+
"description": "Publish a workflow version.",
|
|
10035
|
+
"examples": [
|
|
10036
|
+
{
|
|
10037
|
+
"command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
|
|
10038
|
+
"description": "Publish a workflow version"
|
|
10039
|
+
},
|
|
10040
|
+
{
|
|
10041
|
+
"command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
|
|
10042
|
+
"description": "Publish a workflow version and output as JSON"
|
|
10043
|
+
}
|
|
10044
|
+
],
|
|
10045
|
+
"flags": {
|
|
10046
|
+
"json": {
|
|
10047
|
+
"description": "Format output as json.",
|
|
10048
|
+
"helpGroup": "GLOBAL",
|
|
10049
|
+
"name": "json",
|
|
10050
|
+
"allowNo": false,
|
|
10051
|
+
"type": "boolean"
|
|
10052
|
+
},
|
|
10053
|
+
"auth": {
|
|
10054
|
+
"char": "a",
|
|
10055
|
+
"description": "Auth alias to use.",
|
|
10056
|
+
"name": "auth",
|
|
10057
|
+
"required": false,
|
|
10058
|
+
"hasDynamicHelp": false,
|
|
10059
|
+
"multiple": false,
|
|
10060
|
+
"type": "option"
|
|
10061
|
+
},
|
|
10062
|
+
"cred-store": {
|
|
10063
|
+
"description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
|
|
10064
|
+
"helpGroup": "GLOBAL",
|
|
10065
|
+
"name": "cred-store",
|
|
10066
|
+
"required": false,
|
|
10067
|
+
"allowNo": false,
|
|
10068
|
+
"type": "boolean"
|
|
10069
|
+
},
|
|
10070
|
+
"deny-execute": {
|
|
10071
|
+
"description": "Refuse background scripts, flow runs and ATF runs for this invocation.",
|
|
10072
|
+
"helpGroup": "GLOBAL",
|
|
10073
|
+
"name": "deny-execute",
|
|
10074
|
+
"required": false,
|
|
10075
|
+
"allowNo": false,
|
|
10076
|
+
"type": "boolean"
|
|
10077
|
+
},
|
|
10078
|
+
"deny-write": {
|
|
10079
|
+
"description": "Refuse any change to instance data for this invocation.",
|
|
10080
|
+
"helpGroup": "GLOBAL",
|
|
10081
|
+
"name": "deny-write",
|
|
10082
|
+
"required": false,
|
|
10083
|
+
"allowNo": false,
|
|
10084
|
+
"type": "boolean"
|
|
10085
|
+
},
|
|
10086
|
+
"log-dir": {
|
|
10087
|
+
"description": "Directory to write log files to. Implies --log-file.",
|
|
10088
|
+
"helpGroup": "GLOBAL",
|
|
10089
|
+
"name": "log-dir",
|
|
10090
|
+
"required": false,
|
|
10091
|
+
"hasDynamicHelp": false,
|
|
10092
|
+
"multiple": false,
|
|
10093
|
+
"type": "option"
|
|
10094
|
+
},
|
|
10095
|
+
"log-file": {
|
|
10096
|
+
"description": "Write logs to a file. Defaults to $XDG_STATE_HOME/now-sdk-ext/logs (~/.local/state/now-sdk-ext/logs). Off by default; without this, nex logs warnings and errors to stderr only.",
|
|
10097
|
+
"helpGroup": "GLOBAL",
|
|
10098
|
+
"name": "log-file",
|
|
10099
|
+
"required": false,
|
|
10100
|
+
"allowNo": false,
|
|
10101
|
+
"type": "boolean"
|
|
10102
|
+
},
|
|
10103
|
+
"log-level": {
|
|
10104
|
+
"helpGroup": "GLOBAL",
|
|
10105
|
+
"name": "log-level",
|
|
10106
|
+
"summary": "Specify level for logging.",
|
|
10107
|
+
"default": "info",
|
|
10108
|
+
"hasDynamicHelp": false,
|
|
10109
|
+
"multiple": false,
|
|
10110
|
+
"options": [
|
|
10111
|
+
"debug",
|
|
10112
|
+
"warn",
|
|
10113
|
+
"error",
|
|
10114
|
+
"info",
|
|
10115
|
+
"trace"
|
|
10116
|
+
],
|
|
10117
|
+
"type": "option"
|
|
10118
|
+
},
|
|
10119
|
+
"read-only": {
|
|
10120
|
+
"description": "Refuse every change to the instance — equivalent to --deny-write --deny-execute. Reads are unaffected.",
|
|
10121
|
+
"helpGroup": "GLOBAL",
|
|
10122
|
+
"name": "read-only",
|
|
10123
|
+
"required": false,
|
|
10124
|
+
"allowNo": false,
|
|
10125
|
+
"type": "boolean"
|
|
10126
|
+
},
|
|
10127
|
+
"start-activity": {
|
|
10128
|
+
"char": "s",
|
|
10129
|
+
"description": "Sys ID of the start activity",
|
|
10130
|
+
"name": "start-activity",
|
|
10131
|
+
"required": true,
|
|
10132
|
+
"hasDynamicHelp": false,
|
|
10133
|
+
"multiple": false,
|
|
10134
|
+
"type": "option"
|
|
10135
|
+
},
|
|
10136
|
+
"version-id": {
|
|
10137
|
+
"char": "v",
|
|
10138
|
+
"description": "Sys ID of the workflow version to publish",
|
|
10139
|
+
"name": "version-id",
|
|
10140
|
+
"required": true,
|
|
10141
|
+
"hasDynamicHelp": false,
|
|
10142
|
+
"multiple": false,
|
|
10143
|
+
"type": "option"
|
|
10144
|
+
}
|
|
10145
|
+
},
|
|
10146
|
+
"hasDynamicHelp": false,
|
|
10147
|
+
"hiddenAliases": [],
|
|
10148
|
+
"id": "workflow:publish",
|
|
10149
|
+
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
10150
|
+
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
10151
|
+
"pluginType": "core",
|
|
10152
|
+
"strict": true,
|
|
10153
|
+
"enableJsonFlag": true,
|
|
10154
|
+
"isESM": true,
|
|
10155
|
+
"relativePath": [
|
|
10156
|
+
"dist",
|
|
10157
|
+
"commands",
|
|
10158
|
+
"workflow",
|
|
10159
|
+
"publish.js"
|
|
10160
|
+
]
|
|
10161
|
+
},
|
|
10162
|
+
"xml:export": {
|
|
9834
10163
|
"aliases": [],
|
|
9835
10164
|
"args": {},
|
|
9836
|
-
"description": "
|
|
10165
|
+
"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",
|
|
9837
10166
|
"examples": [
|
|
9838
10167
|
{
|
|
9839
|
-
"
|
|
9840
|
-
"
|
|
10168
|
+
"description": "Export a record to stdout",
|
|
10169
|
+
"command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
|
|
9841
10170
|
},
|
|
9842
10171
|
{
|
|
9843
|
-
"
|
|
9844
|
-
"
|
|
10172
|
+
"description": "Export and save to a file",
|
|
10173
|
+
"command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
|
|
10174
|
+
},
|
|
10175
|
+
{
|
|
10176
|
+
"description": "Export as JSON metadata",
|
|
10177
|
+
"command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
|
|
9845
10178
|
}
|
|
9846
10179
|
],
|
|
9847
10180
|
"flags": {
|
|
9848
10181
|
"json": {
|
|
9849
|
-
"
|
|
9850
|
-
"
|
|
10182
|
+
"char": "j",
|
|
10183
|
+
"description": "Output results as JSON",
|
|
9851
10184
|
"name": "json",
|
|
10185
|
+
"required": false,
|
|
9852
10186
|
"allowNo": false,
|
|
9853
10187
|
"type": "boolean"
|
|
9854
10188
|
},
|
|
@@ -9926,19 +10260,37 @@
|
|
|
9926
10260
|
"allowNo": false,
|
|
9927
10261
|
"type": "boolean"
|
|
9928
10262
|
},
|
|
9929
|
-
"
|
|
10263
|
+
"table": {
|
|
10264
|
+
"char": "t",
|
|
10265
|
+
"description": "Table name of the record to export",
|
|
10266
|
+
"name": "table",
|
|
10267
|
+
"required": true,
|
|
10268
|
+
"hasDynamicHelp": false,
|
|
10269
|
+
"multiple": false,
|
|
10270
|
+
"type": "option"
|
|
10271
|
+
},
|
|
10272
|
+
"sys-id": {
|
|
9930
10273
|
"char": "s",
|
|
9931
|
-
"description": "
|
|
9932
|
-
"name": "
|
|
10274
|
+
"description": "Sys ID of the record to export",
|
|
10275
|
+
"name": "sys-id",
|
|
9933
10276
|
"required": true,
|
|
9934
10277
|
"hasDynamicHelp": false,
|
|
9935
10278
|
"multiple": false,
|
|
9936
10279
|
"type": "option"
|
|
10280
|
+
},
|
|
10281
|
+
"output": {
|
|
10282
|
+
"char": "o",
|
|
10283
|
+
"description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
|
|
10284
|
+
"name": "output",
|
|
10285
|
+
"required": false,
|
|
10286
|
+
"hasDynamicHelp": false,
|
|
10287
|
+
"multiple": false,
|
|
10288
|
+
"type": "option"
|
|
9937
10289
|
}
|
|
9938
10290
|
},
|
|
9939
10291
|
"hasDynamicHelp": false,
|
|
9940
10292
|
"hiddenAliases": [],
|
|
9941
|
-
"id": "
|
|
10293
|
+
"id": "xml:export",
|
|
9942
10294
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
9943
10295
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
9944
10296
|
"pluginType": "core",
|
|
@@ -9948,29 +10300,30 @@
|
|
|
9948
10300
|
"relativePath": [
|
|
9949
10301
|
"dist",
|
|
9950
10302
|
"commands",
|
|
9951
|
-
"
|
|
9952
|
-
"
|
|
10303
|
+
"xml",
|
|
10304
|
+
"export.js"
|
|
9953
10305
|
]
|
|
9954
10306
|
},
|
|
9955
|
-
"
|
|
10307
|
+
"xml:import": {
|
|
9956
10308
|
"aliases": [],
|
|
9957
10309
|
"args": {},
|
|
9958
|
-
"description": "
|
|
10310
|
+
"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",
|
|
9959
10311
|
"examples": [
|
|
9960
10312
|
{
|
|
9961
|
-
"
|
|
9962
|
-
"
|
|
10313
|
+
"description": "Import records from an XML file",
|
|
10314
|
+
"command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
|
|
9963
10315
|
},
|
|
9964
10316
|
{
|
|
9965
|
-
"
|
|
9966
|
-
"
|
|
10317
|
+
"description": "Import with JSON output",
|
|
10318
|
+
"command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
|
|
9967
10319
|
}
|
|
9968
10320
|
],
|
|
9969
10321
|
"flags": {
|
|
9970
10322
|
"json": {
|
|
9971
|
-
"
|
|
9972
|
-
"
|
|
10323
|
+
"char": "j",
|
|
10324
|
+
"description": "Output results as JSON",
|
|
9973
10325
|
"name": "json",
|
|
10326
|
+
"required": false,
|
|
9974
10327
|
"allowNo": false,
|
|
9975
10328
|
"type": "boolean"
|
|
9976
10329
|
},
|
|
@@ -10048,19 +10401,19 @@
|
|
|
10048
10401
|
"allowNo": false,
|
|
10049
10402
|
"type": "boolean"
|
|
10050
10403
|
},
|
|
10051
|
-
"
|
|
10052
|
-
"char": "
|
|
10053
|
-
"description": "
|
|
10054
|
-
"name": "
|
|
10404
|
+
"file": {
|
|
10405
|
+
"char": "f",
|
|
10406
|
+
"description": "Path to the XML file to import",
|
|
10407
|
+
"name": "file",
|
|
10055
10408
|
"required": true,
|
|
10056
10409
|
"hasDynamicHelp": false,
|
|
10057
10410
|
"multiple": false,
|
|
10058
10411
|
"type": "option"
|
|
10059
10412
|
},
|
|
10060
|
-
"
|
|
10061
|
-
"char": "
|
|
10062
|
-
"description": "
|
|
10063
|
-
"name": "
|
|
10413
|
+
"table": {
|
|
10414
|
+
"char": "t",
|
|
10415
|
+
"description": "Target table to import records into",
|
|
10416
|
+
"name": "table",
|
|
10064
10417
|
"required": true,
|
|
10065
10418
|
"hasDynamicHelp": false,
|
|
10066
10419
|
"multiple": false,
|
|
@@ -10069,7 +10422,7 @@
|
|
|
10069
10422
|
},
|
|
10070
10423
|
"hasDynamicHelp": false,
|
|
10071
10424
|
"hiddenAliases": [],
|
|
10072
|
-
"id": "
|
|
10425
|
+
"id": "xml:import",
|
|
10073
10426
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
10074
10427
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
10075
10428
|
"pluginType": "core",
|
|
@@ -10079,34 +10432,53 @@
|
|
|
10079
10432
|
"relativePath": [
|
|
10080
10433
|
"dist",
|
|
10081
10434
|
"commands",
|
|
10082
|
-
"
|
|
10083
|
-
"
|
|
10435
|
+
"xml",
|
|
10436
|
+
"import.js"
|
|
10084
10437
|
]
|
|
10085
10438
|
},
|
|
10086
|
-
"
|
|
10439
|
+
"log": {
|
|
10087
10440
|
"aliases": [],
|
|
10088
10441
|
"args": {},
|
|
10089
|
-
"description": "
|
|
10442
|
+
"description": "Tail and monitor ServiceNow system logs in real-time with beautiful formatting.\n\nThis command provides real-time log monitoring with enhanced visual formatting using color-coded output that makes logs easy to scan and understand at a glance. Automatically highlights errors, warnings, success messages, and important keywords.\n\nKey Features:\n • Real-time log tailing (like Unix tail -f)\n • Powerful filtering with multiple operators (CONTAINS, REGEX, EQUALS, etc.)\n • Smart keyword highlighting (errors in red, warnings in yellow, etc.)\n • Beautiful color-coded console output with chalk\n • Export logs to file with automatic appending\n • Fast 1-second default polling interval\n • Timestamps and sequence numbers for each log\n • Graceful shutdown with Ctrl+C\n • Clean output without colors (--no-color flag)\n\nSmart Highlighting:\n • Error terms (error, exception, failed) - highlighted in RED\n • Warning terms (warn, warning, deprecated) - highlighted in YELLOW\n • Success terms (success, completed, done) - highlighted in GREEN\n • System terms (system, user, transaction) - highlighted in BLUE\n\nFiltering:\n • Apply filters using --filter flag with syntax: \"field OPERATOR value\"\n • Supports case-sensitive and case-insensitive operations\n • Multiple filters are combined with AND logic\n • Operators: CONTAINS, CONTAINS_CI, EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI,\n ENDS_WITH, ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_CONTAINS_CI, NOT_EQUALS, NOT_EQUALS_CI\n\nUse Cases:\n • Monitor logs during application development\n • Debug issues in real-time\n • Track system events during deployments\n • Filter logs for specific application or component\n • Quickly spot errors and warnings\n • Collect logs for analysis or audit trails\n\n⚠️ IMPORTANT NOTES:\n • Press Ctrl+C to stop tailing and exit gracefully\n • Log files are created/appended automatically\n • Uses ChannelAjax when available for better performance\n • Default poll interval is 1 second for real-time monitoring",
|
|
10090
10443
|
"examples": [
|
|
10091
10444
|
{
|
|
10092
|
-
"description": "
|
|
10093
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
10445
|
+
"description": "Tail all logs in real-time",
|
|
10446
|
+
"command": "<%= config.bin %> <%= command.id %> --auth dev-instance"
|
|
10094
10447
|
},
|
|
10095
10448
|
{
|
|
10096
|
-
"description": "
|
|
10097
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
10449
|
+
"description": "Tail logs and save to a file",
|
|
10450
|
+
"command": "<%= config.bin %> <%= command.id %> --output ./logs/instance-logs.txt --auth dev-instance"
|
|
10098
10451
|
},
|
|
10099
10452
|
{
|
|
10100
|
-
"description": "
|
|
10101
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
10453
|
+
"description": "Tail logs with custom polling interval (500ms for faster updates)",
|
|
10454
|
+
"command": "<%= config.bin %> <%= command.id %> --interval 500 --auth dev-instance"
|
|
10455
|
+
},
|
|
10456
|
+
{
|
|
10457
|
+
"description": "Filter logs containing specific text (case-insensitive)",
|
|
10458
|
+
"command": "<%= config.bin %> <%= command.id %> --filter \"message CONTAINS_CI error\" --auth dev-instance"
|
|
10459
|
+
},
|
|
10460
|
+
{
|
|
10461
|
+
"description": "Filter logs with multiple conditions (AND logic)",
|
|
10462
|
+
"command": "<%= config.bin %> <%= command.id %> --filter \"message CONTAINS x_acme_app\" --filter \"message CONTAINS error\" --auth dev-instance"
|
|
10463
|
+
},
|
|
10464
|
+
{
|
|
10465
|
+
"description": "Filter logs using regex pattern",
|
|
10466
|
+
"command": "<%= config.bin %> <%= command.id %> --filter \"message REGEX .*exception.*\" --auth dev-instance"
|
|
10467
|
+
},
|
|
10468
|
+
{
|
|
10469
|
+
"description": "Filter logs by message starting with a pattern",
|
|
10470
|
+
"command": "<%= config.bin %> <%= command.id %> --filter \"message STARTS_WITH [ERROR]\" --auth dev-instance"
|
|
10471
|
+
},
|
|
10472
|
+
{
|
|
10473
|
+
"description": "Tail logs without colored output",
|
|
10474
|
+
"command": "<%= config.bin %> <%= command.id %> --no-color --auth dev-instance"
|
|
10102
10475
|
}
|
|
10103
10476
|
],
|
|
10104
10477
|
"flags": {
|
|
10105
10478
|
"json": {
|
|
10106
|
-
"
|
|
10107
|
-
"
|
|
10479
|
+
"description": "Format output as json.",
|
|
10480
|
+
"helpGroup": "GLOBAL",
|
|
10108
10481
|
"name": "json",
|
|
10109
|
-
"required": false,
|
|
10110
10482
|
"allowNo": false,
|
|
10111
10483
|
"type": "boolean"
|
|
10112
10484
|
},
|
|
@@ -10184,37 +10556,45 @@
|
|
|
10184
10556
|
"allowNo": false,
|
|
10185
10557
|
"type": "boolean"
|
|
10186
10558
|
},
|
|
10187
|
-
"
|
|
10188
|
-
"char": "
|
|
10189
|
-
"description": "
|
|
10190
|
-
"name": "
|
|
10191
|
-
"required":
|
|
10559
|
+
"output": {
|
|
10560
|
+
"char": "o",
|
|
10561
|
+
"description": "Output file path to save logs. Creates parent directories if needed.",
|
|
10562
|
+
"name": "output",
|
|
10563
|
+
"required": false,
|
|
10192
10564
|
"hasDynamicHelp": false,
|
|
10193
10565
|
"multiple": false,
|
|
10194
10566
|
"type": "option"
|
|
10195
10567
|
},
|
|
10196
|
-
"
|
|
10197
|
-
"char": "
|
|
10198
|
-
"description": "
|
|
10199
|
-
"name": "
|
|
10200
|
-
"required":
|
|
10568
|
+
"interval": {
|
|
10569
|
+
"char": "i",
|
|
10570
|
+
"description": "Polling interval in milliseconds",
|
|
10571
|
+
"name": "interval",
|
|
10572
|
+
"required": false,
|
|
10573
|
+
"default": 1000,
|
|
10201
10574
|
"hasDynamicHelp": false,
|
|
10202
10575
|
"multiple": false,
|
|
10203
10576
|
"type": "option"
|
|
10204
10577
|
},
|
|
10205
|
-
"
|
|
10206
|
-
"
|
|
10207
|
-
"
|
|
10208
|
-
"
|
|
10578
|
+
"no-color": {
|
|
10579
|
+
"description": "Disable colored output",
|
|
10580
|
+
"name": "no-color",
|
|
10581
|
+
"required": false,
|
|
10582
|
+
"allowNo": false,
|
|
10583
|
+
"type": "boolean"
|
|
10584
|
+
},
|
|
10585
|
+
"filter": {
|
|
10586
|
+
"char": "f",
|
|
10587
|
+
"description": "Filter logs by field and value. Syntax: field OPERATOR value. Operators: CONTAINS, CONTAINS_CI (case-insensitive), EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI, ENDS_WITH, ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_EQUALS. Field defaults to \"message\" if omitted. Multiple filters are combined with AND logic.",
|
|
10588
|
+
"name": "filter",
|
|
10209
10589
|
"required": false,
|
|
10210
10590
|
"hasDynamicHelp": false,
|
|
10211
|
-
"multiple":
|
|
10591
|
+
"multiple": true,
|
|
10212
10592
|
"type": "option"
|
|
10213
10593
|
}
|
|
10214
10594
|
},
|
|
10215
10595
|
"hasDynamicHelp": false,
|
|
10216
10596
|
"hiddenAliases": [],
|
|
10217
|
-
"id": "
|
|
10597
|
+
"id": "log",
|
|
10218
10598
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
10219
10599
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
10220
10600
|
"pluginType": "core",
|
|
@@ -10224,22 +10604,30 @@
|
|
|
10224
10604
|
"relativePath": [
|
|
10225
10605
|
"dist",
|
|
10226
10606
|
"commands",
|
|
10227
|
-
"
|
|
10228
|
-
"
|
|
10607
|
+
"log",
|
|
10608
|
+
"index.js"
|
|
10229
10609
|
]
|
|
10230
10610
|
},
|
|
10231
|
-
"
|
|
10611
|
+
"health:check": {
|
|
10232
10612
|
"aliases": [],
|
|
10233
10613
|
"args": {},
|
|
10234
|
-
"description": "
|
|
10614
|
+
"description": "Run a consolidated health check on a ServiceNow instance.\n\nPerforms comprehensive diagnostics including version info, cluster status, stuck job detection, semaphore counts, and operational record counts.\n\nFeatures:\n • Instance version and build information\n • Cluster node status\n • Stuck job detection with configurable threshold\n • Active semaphore count\n • Operational counts (incidents, changes, problems)\n • Color-coded status indicators\n • JSON output for CI/CD monitoring",
|
|
10235
10615
|
"examples": [
|
|
10236
10616
|
{
|
|
10237
|
-
"description": "
|
|
10238
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
10617
|
+
"description": "Run full health check",
|
|
10618
|
+
"command": "<%= config.bin %> <%= command.id %> --auth dev"
|
|
10239
10619
|
},
|
|
10240
10620
|
{
|
|
10241
|
-
"description": "
|
|
10242
|
-
"command": "<%= config.bin %> <%= command.id %> --
|
|
10621
|
+
"description": "Check only version and stuck jobs",
|
|
10622
|
+
"command": "<%= config.bin %> <%= command.id %> --include-version --include-stuck-jobs --no-include-cluster --no-include-semaphores --no-include-operational-counts --auth dev"
|
|
10623
|
+
},
|
|
10624
|
+
{
|
|
10625
|
+
"description": "Health check with custom stuck job threshold",
|
|
10626
|
+
"command": "<%= config.bin %> <%= command.id %> --stuck-job-threshold 60 --auth dev"
|
|
10627
|
+
},
|
|
10628
|
+
{
|
|
10629
|
+
"description": "Health check as JSON",
|
|
10630
|
+
"command": "<%= config.bin %> <%= command.id %> --json --auth dev"
|
|
10243
10631
|
}
|
|
10244
10632
|
],
|
|
10245
10633
|
"flags": {
|
|
@@ -10325,20 +10713,46 @@
|
|
|
10325
10713
|
"allowNo": false,
|
|
10326
10714
|
"type": "boolean"
|
|
10327
10715
|
},
|
|
10328
|
-
"
|
|
10329
|
-
"
|
|
10330
|
-
"
|
|
10331
|
-
"
|
|
10332
|
-
"
|
|
10333
|
-
"
|
|
10334
|
-
"multiple": false,
|
|
10335
|
-
"type": "option"
|
|
10716
|
+
"include-version": {
|
|
10717
|
+
"description": "Include instance version information",
|
|
10718
|
+
"name": "include-version",
|
|
10719
|
+
"required": false,
|
|
10720
|
+
"allowNo": true,
|
|
10721
|
+
"type": "boolean"
|
|
10336
10722
|
},
|
|
10337
|
-
"
|
|
10338
|
-
"
|
|
10339
|
-
"
|
|
10340
|
-
"
|
|
10341
|
-
"
|
|
10723
|
+
"include-cluster": {
|
|
10724
|
+
"description": "Include cluster node status",
|
|
10725
|
+
"name": "include-cluster",
|
|
10726
|
+
"required": false,
|
|
10727
|
+
"allowNo": true,
|
|
10728
|
+
"type": "boolean"
|
|
10729
|
+
},
|
|
10730
|
+
"include-stuck-jobs": {
|
|
10731
|
+
"description": "Include stuck job detection",
|
|
10732
|
+
"name": "include-stuck-jobs",
|
|
10733
|
+
"required": false,
|
|
10734
|
+
"allowNo": true,
|
|
10735
|
+
"type": "boolean"
|
|
10736
|
+
},
|
|
10737
|
+
"include-semaphores": {
|
|
10738
|
+
"description": "Include active semaphore count",
|
|
10739
|
+
"name": "include-semaphores",
|
|
10740
|
+
"required": false,
|
|
10741
|
+
"allowNo": true,
|
|
10742
|
+
"type": "boolean"
|
|
10743
|
+
},
|
|
10744
|
+
"include-operational-counts": {
|
|
10745
|
+
"description": "Include operational record counts (incidents, changes, problems)",
|
|
10746
|
+
"name": "include-operational-counts",
|
|
10747
|
+
"required": false,
|
|
10748
|
+
"allowNo": true,
|
|
10749
|
+
"type": "boolean"
|
|
10750
|
+
},
|
|
10751
|
+
"stuck-job-threshold": {
|
|
10752
|
+
"description": "Minutes threshold for a job to be considered stuck",
|
|
10753
|
+
"name": "stuck-job-threshold",
|
|
10754
|
+
"required": false,
|
|
10755
|
+
"default": 30,
|
|
10342
10756
|
"hasDynamicHelp": false,
|
|
10343
10757
|
"multiple": false,
|
|
10344
10758
|
"type": "option"
|
|
@@ -10346,7 +10760,7 @@
|
|
|
10346
10760
|
},
|
|
10347
10761
|
"hasDynamicHelp": false,
|
|
10348
10762
|
"hiddenAliases": [],
|
|
10349
|
-
"id": "
|
|
10763
|
+
"id": "health:check",
|
|
10350
10764
|
"pluginAlias": "@sonisoft/now-sdk-ext-cli",
|
|
10351
10765
|
"pluginName": "@sonisoft/now-sdk-ext-cli",
|
|
10352
10766
|
"pluginType": "core",
|
|
@@ -10356,10 +10770,10 @@
|
|
|
10356
10770
|
"relativePath": [
|
|
10357
10771
|
"dist",
|
|
10358
10772
|
"commands",
|
|
10359
|
-
"
|
|
10360
|
-
"
|
|
10773
|
+
"health",
|
|
10774
|
+
"check.js"
|
|
10361
10775
|
]
|
|
10362
10776
|
}
|
|
10363
10777
|
},
|
|
10364
|
-
"version": "5.
|
|
10778
|
+
"version": "5.6.0"
|
|
10365
10779
|
}
|