harnesstap 1.4.0 → 1.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 +2 -0
- package/dist/apply-FTAIL3X3.js +50 -0
- package/dist/{approve-FBGYQGWN.js → approve-R6AWQB3I.js} +10 -13
- package/dist/{approve-FBGYQGWN.js.map → approve-R6AWQB3I.js.map} +1 -1
- package/dist/{audit-VI4QZ6X2.js → audit-2HNKFPSU.js} +11 -15
- package/dist/{audit-VI4QZ6X2.js.map → audit-2HNKFPSU.js.map} +1 -1
- package/dist/{auth-4CQCDS2W.js → auth-C54KRLNF.js} +10 -12
- package/dist/{auth-4CQCDS2W.js.map → auth-C54KRLNF.js.map} +1 -1
- package/dist/bin.js +13 -34
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-IE7B6Q5K.js → chunk-2XDYQXP2.js} +17 -18
- package/dist/chunk-2XDYQXP2.js.map +1 -0
- package/dist/{chunk-L6YZE5MY.js → chunk-3277RVZT.js} +5 -7
- package/dist/{chunk-L6YZE5MY.js.map → chunk-3277RVZT.js.map} +1 -1
- package/dist/{chunk-QA5U36JN.js → chunk-3Q72LZPJ.js} +764 -340
- package/dist/chunk-3Q72LZPJ.js.map +1 -0
- package/dist/{chunk-OML4HXKT.js → chunk-42E2MPES.js} +16 -22
- package/dist/chunk-42E2MPES.js.map +1 -0
- package/dist/{chunk-4ZQ2SCGY.js → chunk-5HACBPK2.js} +509 -207
- package/dist/chunk-5HACBPK2.js.map +1 -0
- package/dist/{chunk-GRASK6M6.js → chunk-6FXJIKEG.js} +5 -5
- package/dist/{chunk-73OJQTBW.js → chunk-A3TZT4WT.js} +2 -2
- package/dist/{chunk-ZUASVASP.js → chunk-BUA7WFI4.js} +27034 -18024
- package/dist/chunk-BUA7WFI4.js.map +1 -0
- package/dist/{chunk-U6DXASQP.js → chunk-CBSDMRMY.js} +2 -2
- package/dist/{chunk-RDG5DT7S.js → chunk-CR2TYMKC.js} +54 -40
- package/dist/chunk-CR2TYMKC.js.map +1 -0
- package/dist/{chunk-REHRUNBB.js → chunk-CWXCZBJR.js} +70 -5
- package/dist/chunk-CWXCZBJR.js.map +1 -0
- package/dist/{chunk-R7ZOYVN3.js → chunk-D7R577XZ.js} +187 -59
- package/dist/chunk-D7R577XZ.js.map +1 -0
- package/dist/{chunk-P2C7JPLD.js → chunk-EPXAOEBB.js} +6 -6
- package/dist/{chunk-D432JAXV.js → chunk-GZU4LVFF.js} +153 -25
- package/dist/chunk-GZU4LVFF.js.map +1 -0
- package/dist/chunk-HV3ENT2F.js +61 -0
- package/dist/chunk-HV3ENT2F.js.map +1 -0
- package/dist/{chunk-3P6BWL5F.js → chunk-K4UDZUJ2.js} +2 -2
- package/dist/{chunk-ULCD6DJE.js → chunk-L6BJCRBU.js} +14 -39
- package/dist/chunk-L6BJCRBU.js.map +1 -0
- package/dist/{chunk-M4KLHJ6U.js → chunk-M6FEDSHY.js} +8 -10
- package/dist/{chunk-M4KLHJ6U.js.map → chunk-M6FEDSHY.js.map} +1 -1
- package/dist/chunk-M7PHQ3UC.js +31491 -0
- package/dist/chunk-M7PHQ3UC.js.map +1 -0
- package/dist/{chunk-PNGF5EV2.js → chunk-MHLAIGIM.js} +2 -2
- package/dist/{chunk-BPWFQKI5.js → chunk-MHMFF6A5.js} +2 -2
- package/dist/chunk-MKLJBW5N.js +14 -0
- package/dist/{chunk-MR7IOHSX.js → chunk-MQCAPCAF.js} +16 -22
- package/dist/{chunk-MR7IOHSX.js.map → chunk-MQCAPCAF.js.map} +1 -1
- package/dist/{chunk-N3VGY3T3.js → chunk-MQCH3YZ5.js} +7 -5
- package/dist/{chunk-N3VGY3T3.js.map → chunk-MQCH3YZ5.js.map} +1 -1
- package/dist/{chunk-WG5A6EAU.js → chunk-OHZNDV4A.js} +821 -28
- package/dist/chunk-OHZNDV4A.js.map +1 -0
- package/dist/{chunk-WGP4GUYZ.js → chunk-OWE3OSX6.js} +9 -11
- package/dist/{chunk-WGP4GUYZ.js.map → chunk-OWE3OSX6.js.map} +1 -1
- package/dist/{chunk-RVEXPMM3.js → chunk-PCNHBMBU.js} +3 -5
- package/dist/{chunk-RVEXPMM3.js.map → chunk-PCNHBMBU.js.map} +1 -1
- package/dist/{chunk-23XSG7LI.js → chunk-QGTDQNVV.js} +4 -4
- package/dist/{chunk-UVVZHWD2.js → chunk-R27VZIF6.js} +2 -2
- package/dist/{chunk-TQ2NA4Z4.js → chunk-R4NV3Q7G.js} +8 -2
- package/dist/chunk-R4NV3Q7G.js.map +1 -0
- package/dist/{chunk-EOPFER6N.js → chunk-R6VFJKZB.js} +19 -5
- package/dist/chunk-R6VFJKZB.js.map +1 -0
- package/dist/{chunk-3FS775NP.js → chunk-RQLVXJH2.js} +85 -4
- package/dist/chunk-RQLVXJH2.js.map +1 -0
- package/dist/{chunk-JQOKQKQT.js → chunk-S2D5PWAO.js} +2 -2
- package/dist/{chunk-43BDGVN3.js → chunk-T4EKNX2Q.js} +56 -9
- package/dist/chunk-T4EKNX2Q.js.map +1 -0
- package/dist/{chunk-XTVGCVU4.js → chunk-TERYL7JH.js} +36 -37
- package/dist/chunk-TERYL7JH.js.map +1 -0
- package/dist/{chunk-6LTLYV5D.js → chunk-UC27MQ3T.js} +1064 -265
- package/dist/chunk-UC27MQ3T.js.map +1 -0
- package/dist/chunk-UEA4NCY2.js +106 -0
- package/dist/chunk-UEA4NCY2.js.map +1 -0
- package/dist/{chunk-7HP6AAI3.js → chunk-UK2IV2ZQ.js} +2 -2
- package/dist/{chunk-PCMON7Y2.js → chunk-UZCAYOIQ.js} +8 -10
- package/dist/{chunk-PCMON7Y2.js.map → chunk-UZCAYOIQ.js.map} +1 -1
- package/dist/{chunk-N3ZCH64F.js → chunk-V4UNYSZO.js} +86 -32
- package/dist/chunk-V4UNYSZO.js.map +1 -0
- package/dist/chunk-VAPCU2FX.js +70 -0
- package/dist/chunk-VAPCU2FX.js.map +1 -0
- package/dist/{chunk-RFQ3N7FB.js → chunk-WGVU3LA5.js} +11 -9
- package/dist/chunk-WGVU3LA5.js.map +1 -0
- package/dist/{chunk-IMROMZ2K.js → chunk-WQ3F4O7U.js} +19 -14
- package/dist/chunk-WQ3F4O7U.js.map +1 -0
- package/dist/chunk-XNS4I3W6.js +102 -0
- package/dist/chunk-XNS4I3W6.js.map +1 -0
- package/dist/{chunk-2A36HWDE.js → chunk-Y4I7ZCAE.js} +129 -136
- package/dist/chunk-Y4I7ZCAE.js.map +1 -0
- package/dist/{chunk-TPEJFLV7.js → chunk-ZKMSHLXP.js} +4 -6
- package/dist/{chunk-TPEJFLV7.js.map → chunk-ZKMSHLXP.js.map} +1 -1
- package/dist/{compile-GXADKGH5.js → compile-B2QG6BAQ.js} +33 -37
- package/dist/{compile-GXADKGH5.js.map → compile-B2QG6BAQ.js.map} +1 -1
- package/dist/{config-JMHNA2U5.js → config-D3F6ICZ2.js} +16 -21
- package/dist/{config-JMHNA2U5.js.map → config-D3F6ICZ2.js.map} +1 -1
- package/dist/{cursor-local-install-46RWRBDT.js → cursor-local-install-4HDIBX22.js} +8 -12
- package/dist/{cursor-local-install-46RWRBDT.js.map → cursor-local-install-4HDIBX22.js.map} +1 -1
- package/dist/cursor-local-install-LL367GZY.js +94 -0
- package/dist/cursor-local-install-LL367GZY.js.map +1 -0
- package/dist/{doctor-N7ZULPOL.js → doctor-QSGETVDE.js} +14 -17
- package/dist/doctor-QSGETVDE.js.map +1 -0
- package/dist/{environment-OBB3WU5B.js → environment-2JS4RWQA.js} +42 -50
- package/dist/environment-2JS4RWQA.js.map +1 -0
- package/dist/{github-PBYBGOLH.js → github-JXSTHLY2.js} +9 -10
- package/dist/{github-PBYBGOLH.js.map → github-JXSTHLY2.js.map} +1 -1
- package/dist/{harness-7KYATIV6.js → harness-GBI3AMLH.js} +25 -31
- package/dist/{harness-7KYATIV6.js.map → harness-GBI3AMLH.js.map} +1 -1
- package/dist/{help-EE3AJQD4.js → help-EC52ERIE.js} +15 -20
- package/dist/{help-EE3AJQD4.js.map → help-EC52ERIE.js.map} +1 -1
- package/dist/{help-VXWKLQ6A.js → help-VIRMBOPJ.js} +57 -575
- package/dist/help-VIRMBOPJ.js.map +1 -0
- package/dist/host-plugin-view-kept-XKHD6NGU.js +139 -0
- package/dist/host-plugin-view-kept-XKHD6NGU.js.map +1 -0
- package/dist/index.js +12 -16
- package/dist/{init-LBTMPDVJ.js → init-OK3K6ILG.js} +33 -41
- package/dist/{init-LBTMPDVJ.js.map → init-OK3K6ILG.js.map} +1 -1
- package/dist/live-read-cache-ESQQJBNS.js +13 -0
- package/dist/live-read-cache-WPUFHVMZ.js +12 -0
- package/dist/{lock-WLJRXRVK.js → lock-AA2F4I3K.js} +9 -12
- package/dist/{lock-WLJRXRVK.js.map → lock-AA2F4I3K.js.map} +1 -1
- package/dist/{marketplace-GXSV6QIY.js → marketplace-QUYCV23F.js} +26 -79
- package/dist/marketplace-QUYCV23F.js.map +1 -0
- package/dist/{mcp-XPDWWU75.js → mcp-CIHSR4DD.js} +33 -37
- package/dist/{mcp-XPDWWU75.js.map → mcp-CIHSR4DD.js.map} +1 -1
- package/dist/{migrate-SBUIWN3U.js → migrate-TQPEZYS5.js} +93 -34
- package/dist/migrate-TQPEZYS5.js.map +1 -0
- package/dist/notifications-TAELTPDW.js +154 -0
- package/dist/notifications-TAELTPDW.js.map +1 -0
- package/dist/open-D3GWGDSQ.js +20 -0
- package/dist/{pack-A73LDVOX.js → pack-VUO4UBWL.js} +10 -14
- package/dist/{pack-A73LDVOX.js.map → pack-VUO4UBWL.js.map} +1 -1
- package/dist/plugin-L3466DHK.js +47 -0
- package/dist/plugin-from-project-U5UGKTJH.js +15 -0
- package/dist/{policy-6VY3CMSU.js → policy-Z5TL4N3V.js} +9 -12
- package/dist/{policy-6VY3CMSU.js.map → policy-Z5TL4N3V.js.map} +1 -1
- package/dist/{profile-YCKPMRRU.js → profile-QFI7SL3S.js} +108 -78
- package/dist/profile-QFI7SL3S.js.map +1 -0
- package/dist/{project-KHPPBKPN.js → project-3KR3EPYR.js} +486 -60
- package/dist/project-3KR3EPYR.js.map +1 -0
- package/dist/{resource-IJU3FAN5.js → resource-45BPRQ7V.js} +55 -45
- package/dist/resource-45BPRQ7V.js.map +1 -0
- package/dist/status-refresh-worker.js +1155 -0
- package/dist/status-refresh-worker.js.map +1 -0
- package/dist/{version-Z66FWWMQ.js → version-QUJZGTZ5.js} +3 -3
- package/dist/version-QUJZGTZ5.js.map +1 -0
- package/package.json +16 -11
- package/dist/apply-SUNDXRJ3.js +0 -54
- package/dist/chunk-2A36HWDE.js.map +0 -1
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/chunk-3FS775NP.js.map +0 -1
- package/dist/chunk-43BDGVN3.js.map +0 -1
- package/dist/chunk-4ZQ2SCGY.js.map +0 -1
- package/dist/chunk-6LTLYV5D.js.map +0 -1
- package/dist/chunk-D432JAXV.js.map +0 -1
- package/dist/chunk-DF4Z7LAD.js +0 -3463
- package/dist/chunk-DF4Z7LAD.js.map +0 -1
- package/dist/chunk-EOPFER6N.js.map +0 -1
- package/dist/chunk-G6WKY2W4.js +0 -389
- package/dist/chunk-G6WKY2W4.js.map +0 -1
- package/dist/chunk-IE7B6Q5K.js.map +0 -1
- package/dist/chunk-IMROMZ2K.js.map +0 -1
- package/dist/chunk-M2U3J7UX.js +0 -46
- package/dist/chunk-M2U3J7UX.js.map +0 -1
- package/dist/chunk-N3ZCH64F.js.map +0 -1
- package/dist/chunk-NAGAJ5UM.js +0 -145
- package/dist/chunk-NAGAJ5UM.js.map +0 -1
- package/dist/chunk-OML4HXKT.js.map +0 -1
- package/dist/chunk-QA5U36JN.js.map +0 -1
- package/dist/chunk-R7ZOYVN3.js.map +0 -1
- package/dist/chunk-RDG5DT7S.js.map +0 -1
- package/dist/chunk-REHRUNBB.js.map +0 -1
- package/dist/chunk-RFQ3N7FB.js.map +0 -1
- package/dist/chunk-TQ2NA4Z4.js.map +0 -1
- package/dist/chunk-ULCD6DJE.js.map +0 -1
- package/dist/chunk-WG5A6EAU.js.map +0 -1
- package/dist/chunk-XGTTOO4R.js +0 -84
- package/dist/chunk-XGTTOO4R.js.map +0 -1
- package/dist/chunk-XTVGCVU4.js.map +0 -1
- package/dist/chunk-XUJKZQZA.js +0 -235
- package/dist/chunk-XUJKZQZA.js.map +0 -1
- package/dist/chunk-ZUASVASP.js.map +0 -1
- package/dist/doctor-N7ZULPOL.js.map +0 -1
- package/dist/environment-OBB3WU5B.js.map +0 -1
- package/dist/help-VXWKLQ6A.js.map +0 -1
- package/dist/live-read-cache-TUSP7U3D.js +0 -10
- package/dist/marketplace-GXSV6QIY.js.map +0 -1
- package/dist/migrate-SBUIWN3U.js.map +0 -1
- package/dist/open-HDGLYYVU.js +0 -24
- package/dist/plugin-CEO6ZJM5.js +0 -51
- package/dist/plugin-from-project-UK7VJVUP.js +0 -18
- package/dist/profile-YCKPMRRU.js.map +0 -1
- package/dist/project-KHPPBKPN.js.map +0 -1
- package/dist/resource-IJU3FAN5.js.map +0 -1
- /package/dist/{apply-SUNDXRJ3.js.map → apply-FTAIL3X3.js.map} +0 -0
- /package/dist/{chunk-GRASK6M6.js.map → chunk-6FXJIKEG.js.map} +0 -0
- /package/dist/{chunk-73OJQTBW.js.map → chunk-A3TZT4WT.js.map} +0 -0
- /package/dist/{chunk-U6DXASQP.js.map → chunk-CBSDMRMY.js.map} +0 -0
- /package/dist/{chunk-P2C7JPLD.js.map → chunk-EPXAOEBB.js.map} +0 -0
- /package/dist/{chunk-3P6BWL5F.js.map → chunk-K4UDZUJ2.js.map} +0 -0
- /package/dist/{chunk-PNGF5EV2.js.map → chunk-MHLAIGIM.js.map} +0 -0
- /package/dist/{chunk-BPWFQKI5.js.map → chunk-MHMFF6A5.js.map} +0 -0
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-MKLJBW5N.js.map} +0 -0
- /package/dist/{chunk-23XSG7LI.js.map → chunk-QGTDQNVV.js.map} +0 -0
- /package/dist/{chunk-UVVZHWD2.js.map → chunk-R27VZIF6.js.map} +0 -0
- /package/dist/{chunk-JQOKQKQT.js.map → chunk-S2D5PWAO.js.map} +0 -0
- /package/dist/{chunk-7HP6AAI3.js.map → chunk-UK2IV2ZQ.js.map} +0 -0
- /package/dist/{live-read-cache-TUSP7U3D.js.map → live-read-cache-ESQQJBNS.js.map} +0 -0
- /package/dist/{open-HDGLYYVU.js.map → live-read-cache-WPUFHVMZ.js.map} +0 -0
- /package/dist/{plugin-CEO6ZJM5.js.map → open-D3GWGDSQ.js.map} +0 -0
- /package/dist/{plugin-from-project-UK7VJVUP.js.map → plugin-L3466DHK.js.map} +0 -0
- /package/dist/{version-Z66FWWMQ.js.map → plugin-from-project-U5UGKTJH.js.map} +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
ui
|
|
4
|
+
} from "./chunk-Y4I7ZCAE.js";
|
|
5
|
+
import "./chunk-UEA4NCY2.js";
|
|
5
6
|
import {
|
|
6
7
|
PACKAGE_VERSION
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import
|
|
9
|
-
__export
|
|
10
|
-
} from "./chunk-2H7UOFLK.js";
|
|
8
|
+
} from "./chunk-WQ3F4O7U.js";
|
|
9
|
+
import "./chunk-MKLJBW5N.js";
|
|
11
10
|
|
|
12
11
|
// src/services/cli-help-registry.ts
|
|
13
12
|
var COMMAND_HELP_REGISTRY = {
|
|
@@ -270,6 +269,7 @@ var COMMAND_HELP_REGISTRY = {
|
|
|
270
269
|
examples: [
|
|
271
270
|
"plugin edit my-plugin",
|
|
272
271
|
"plugin edit my-plugin --add skill:caveman",
|
|
272
|
+
"plugin edit backend-qa --hide skill:review",
|
|
273
273
|
"plugin edit my-plugin --environment dev"
|
|
274
274
|
]
|
|
275
275
|
},
|
|
@@ -373,6 +373,7 @@ var COMMAND_HELP_REGISTRY = {
|
|
|
373
373
|
},
|
|
374
374
|
"plugin.doctor": {
|
|
375
375
|
description: "Run doctor checks against a plugin",
|
|
376
|
+
details: "For an imported plugin, skipped-files re-reads the installed package and fails for each file the import skipped. The output lists imported of discovered resources per type. Exit 1 when the plugin is invalid.",
|
|
376
377
|
examples: [
|
|
377
378
|
"plugin doctor my-plugin",
|
|
378
379
|
"plugin doctor my-plugin --format json"
|
|
@@ -380,7 +381,7 @@ var COMMAND_HELP_REGISTRY = {
|
|
|
380
381
|
},
|
|
381
382
|
"plugin.check": {
|
|
382
383
|
description: "Compare library working heads to marketplace, git, and catalog origins",
|
|
383
|
-
details: "Omit a name to check every syncable working head. --refresh force-fetches origins. Outdated is not a failure; exit 1 only when a check row is error.",
|
|
384
|
+
details: "Omit a name to check every syncable working head. --refresh force-fetches origins. Also checks upstream links and pulled catalog packages for newer versions and stores the answer for ht status and Desktop; a newer major shows as major and is never installed automatically. Outdated is not a failure; exit 1 only when a check row is error.",
|
|
384
385
|
examples: [
|
|
385
386
|
"plugin check",
|
|
386
387
|
"plugin check my-plugin --refresh",
|
|
@@ -389,13 +390,40 @@ var COMMAND_HELP_REGISTRY = {
|
|
|
389
390
|
},
|
|
390
391
|
"plugin.update": {
|
|
391
392
|
description: "Update library working heads from marketplace, git, and catalog origins",
|
|
392
|
-
details: "Pass a plugin name or --all. --all confirms on TTY unless --yes; non-interactive --all requires --yes. --force reapplies when fingerprints already match.",
|
|
393
|
+
details: "Pass a plugin name or --all. --all confirms on TTY unless --yes; non-interactive --all requires --yes. --force reapplies when fingerprints already match. Waits while the Desktop sidecar runs a scheduled check or install. After the first successful --all in a terminal, asks once whether to keep plugins up to date.",
|
|
393
394
|
examples: [
|
|
394
395
|
"plugin update my-plugin",
|
|
395
396
|
"plugin update --all --yes",
|
|
396
397
|
"plugin update --all --yes --format json"
|
|
397
398
|
]
|
|
398
399
|
},
|
|
400
|
+
"notifications.list": {
|
|
401
|
+
description: "List plugin update notifications (unread by default); same as ht notifications",
|
|
402
|
+
details: "Notifications are written when a check finds a new version, when a parent plugin publishes, when install mode updates a plugin, and when checks keep failing. The same version is never notified twice. --all includes read ones. Nothing is deleted unless you run prune.",
|
|
403
|
+
examples: [
|
|
404
|
+
"notifications",
|
|
405
|
+
"notifications list --all --format json"
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
"notifications.read": {
|
|
409
|
+
description: "Mark a notification, or all of them, as read",
|
|
410
|
+
examples: ["notifications read 01J9Z8K3M2", "notifications read --all"]
|
|
411
|
+
},
|
|
412
|
+
"notifications.prune": {
|
|
413
|
+
description: "Delete read notifications older than an age, after confirmation",
|
|
414
|
+
details: "Only read notifications are deleted; unread ones are kept. Asks before deleting in a terminal; pass --yes otherwise.",
|
|
415
|
+
examples: ["notifications prune --older-than 90d", "notifications prune --older-than 2w --yes"]
|
|
416
|
+
},
|
|
417
|
+
"plugin.auto-update": {
|
|
418
|
+
description: "Show or change how plugin updates are checked and installed",
|
|
419
|
+
details: "With no options, prints the current setting. --mode off stops background checks; notify (the default) shows updates in ht status and Desktop; install also installs minor and patch versions inside the range for pulled catalog plugins, never a major. --frequency is hourly, daily (the default) or weekly. Stored under updates in ~/.harnesstap/config.jsonc.",
|
|
420
|
+
examples: [
|
|
421
|
+
"plugin auto-update",
|
|
422
|
+
"plugin auto-update --mode install --frequency weekly",
|
|
423
|
+
"plugin auto-update --mode off",
|
|
424
|
+
"plugin auto-update --format json"
|
|
425
|
+
]
|
|
426
|
+
},
|
|
399
427
|
"plugin.cut": {
|
|
400
428
|
description: "Cut a new local version from the working head",
|
|
401
429
|
examples: [
|
|
@@ -520,6 +548,17 @@ var COMMAND_HELP_REGISTRY = {
|
|
|
520
548
|
"profile delete work --plugin -y"
|
|
521
549
|
]
|
|
522
550
|
},
|
|
551
|
+
"profile.duplicate": {
|
|
552
|
+
description: "Duplicate a profile, kept in sync with it or as a separate copy",
|
|
553
|
+
examples: [
|
|
554
|
+
"profile duplicate backend backend-qa",
|
|
555
|
+
"profile duplicate backend backend-copy --copy"
|
|
556
|
+
]
|
|
557
|
+
},
|
|
558
|
+
"profile.detach": {
|
|
559
|
+
description: "Stop keeping a profile in sync: its current items become its own (Library only)",
|
|
560
|
+
examples: ["profile detach backend-qa"]
|
|
561
|
+
},
|
|
523
562
|
"profile.pull": {
|
|
524
563
|
description: "Pull a profile plugin from catalog",
|
|
525
564
|
examples: [
|
|
@@ -599,10 +638,12 @@ var COMMAND_HELP_REGISTRY = {
|
|
|
599
638
|
},
|
|
600
639
|
"migrate.import": {
|
|
601
640
|
description: "Import a package directory, .ap.json envelope, or .tar.gz workspace archive",
|
|
641
|
+
details: "A plugin import lists every file it skips (missing or invalid SKILL.md frontmatter, an invalid mcp.json server, root rules/, instructions/ or mcp-servers/ directories) with its path and reason, and prints imported of discovered resources per type. --strict refuses such a package and exits 1; it is the default when the terminal is not interactive. --no-strict imports the rest anyway.",
|
|
602
642
|
examples: [
|
|
603
643
|
"migrate import backup.tar.gz",
|
|
604
644
|
"migrate import ./my-plugin",
|
|
605
|
-
"migrate import my-plugin.ap.json"
|
|
645
|
+
"migrate import my-plugin.ap.json",
|
|
646
|
+
"migrate import ./my-plugin --no-strict"
|
|
606
647
|
]
|
|
607
648
|
},
|
|
608
649
|
"migrate.resolve-order": {
|
|
@@ -800,571 +841,6 @@ function getCommandHelpEntry(cmd) {
|
|
|
800
841
|
return COMMAND_HELP_REGISTRY[resolveCommandHelpPath(cmd)];
|
|
801
842
|
}
|
|
802
843
|
|
|
803
|
-
// src/ui/format.ts
|
|
804
|
-
var format_exports = {};
|
|
805
|
-
__export(format_exports, {
|
|
806
|
-
formatAbsoluteTime: () => formatAbsoluteTime,
|
|
807
|
-
formatCount: () => formatCount,
|
|
808
|
-
formatRelativeTime: () => formatRelativeTime,
|
|
809
|
-
formatRelativeTimeWithAbsolute: () => formatRelativeTimeWithAbsolute,
|
|
810
|
-
shortenId: () => shortenId,
|
|
811
|
-
truncate: () => truncate
|
|
812
|
-
});
|
|
813
|
-
function truncate(value, width) {
|
|
814
|
-
if (value.length <= width) return value;
|
|
815
|
-
if (width <= 3) return ".".repeat(Math.max(1, width));
|
|
816
|
-
return `${value.slice(0, width - 3)}...`;
|
|
817
|
-
}
|
|
818
|
-
function shortenId(value) {
|
|
819
|
-
if (value.length <= 10) return value;
|
|
820
|
-
return `${value.slice(0, 4)}...${value.slice(-4)}`;
|
|
821
|
-
}
|
|
822
|
-
function formatAbsoluteTime(value, options) {
|
|
823
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
824
|
-
if (options?.includeTime) {
|
|
825
|
-
return date.toISOString().slice(0, 19).replace("T", " ");
|
|
826
|
-
}
|
|
827
|
-
return date.toISOString().slice(0, 10);
|
|
828
|
-
}
|
|
829
|
-
function formatRelativeTime(value) {
|
|
830
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
831
|
-
const diffMs = Date.now() - date.getTime();
|
|
832
|
-
const minute = 6e4;
|
|
833
|
-
const hour = 60 * minute;
|
|
834
|
-
const day = 24 * hour;
|
|
835
|
-
if (diffMs < minute) {
|
|
836
|
-
return `${formatCount(Math.max(1, Math.floor(diffMs / 1e3)), "second")} ago`;
|
|
837
|
-
}
|
|
838
|
-
if (diffMs < hour) {
|
|
839
|
-
return `${formatCount(Math.floor(diffMs / minute), "minute")} ago`;
|
|
840
|
-
}
|
|
841
|
-
if (diffMs < day) {
|
|
842
|
-
return `${formatCount(Math.floor(diffMs / hour), "hour")} ago`;
|
|
843
|
-
}
|
|
844
|
-
if (diffMs <= 30 * day) {
|
|
845
|
-
return `${formatCount(Math.floor(diffMs / day), "day")} ago`;
|
|
846
|
-
}
|
|
847
|
-
return formatAbsoluteTime(date);
|
|
848
|
-
}
|
|
849
|
-
function formatRelativeTimeWithAbsolute(value) {
|
|
850
|
-
const relative = formatRelativeTime(value);
|
|
851
|
-
const absolute = formatAbsoluteTime(value, { includeTime: true });
|
|
852
|
-
if (relative === absolute) return relative;
|
|
853
|
-
return `${relative} (${absolute})`;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
// src/ui/theme.ts
|
|
857
|
-
import chalk from "chalk";
|
|
858
|
-
function colorEnabled() {
|
|
859
|
-
return !process.env.NO_COLOR && chalk.level > 0;
|
|
860
|
-
}
|
|
861
|
-
function maybe(style) {
|
|
862
|
-
return (value) => colorEnabled() ? style(value) : value;
|
|
863
|
-
}
|
|
864
|
-
var icons = {
|
|
865
|
-
success: "\u2713",
|
|
866
|
-
warn: "\u26A0",
|
|
867
|
-
danger: "\u2717",
|
|
868
|
-
hint: "\u2192",
|
|
869
|
-
bullet: "\xB7",
|
|
870
|
-
profile: "\u25CE",
|
|
871
|
-
added: "+",
|
|
872
|
-
removed: "\u2212",
|
|
873
|
-
modified: "~"
|
|
874
|
-
};
|
|
875
|
-
var resourceTypeStyles = {
|
|
876
|
-
instruction: maybe((value) => chalk.hex("#60a5fa")(value)),
|
|
877
|
-
skill: maybe((value) => chalk.hex("#34d399")(value)),
|
|
878
|
-
rule: maybe((value) => chalk.hex("#fbbf24")(value)),
|
|
879
|
-
mcp_server: maybe((value) => chalk.hex("#a78bfa")(value)),
|
|
880
|
-
permission: maybe((value) => chalk.hex("#f87171")(value)),
|
|
881
|
-
hook: maybe((value) => chalk.hex("#fb923c")(value)),
|
|
882
|
-
agent: maybe((value) => chalk.hex("#c084fc")(value)),
|
|
883
|
-
command: maybe((value) => chalk.hex("#2dd4bf")(value)),
|
|
884
|
-
env_var: maybe((value) => chalk.hex("#94a3b8")(value)),
|
|
885
|
-
model_config: maybe((value) => chalk.hex("#e879f9")(value))
|
|
886
|
-
};
|
|
887
|
-
var mutedStyle = maybe((value) => chalk.hex("#6b7280")(value));
|
|
888
|
-
function styleResourceType(value) {
|
|
889
|
-
const style = resourceTypeStyles[value];
|
|
890
|
-
return style ? style(value) : mutedStyle(value);
|
|
891
|
-
}
|
|
892
|
-
var theme = {
|
|
893
|
-
// Existing tokens for backward compatibility
|
|
894
|
-
primary: maybe((value) => chalk.bold(value)),
|
|
895
|
-
accent: maybe((value) => chalk.hex("#3b82f6")(value)),
|
|
896
|
-
muted: mutedStyle,
|
|
897
|
-
success: maybe((value) => chalk.hex("#14b8a6")(value)),
|
|
898
|
-
warn: maybe((value) => chalk.hex("#e6b84d")(value)),
|
|
899
|
-
danger: maybe((value) => chalk.hex("#ef4444")(value)),
|
|
900
|
-
badge: maybe((value) => chalk.bgHex("#3b82f6").white.bold(` ${value} `)),
|
|
901
|
-
// Role-based tokens
|
|
902
|
-
heading: maybe((value) => chalk.bold.hex("#3b82f6")(value)),
|
|
903
|
-
label: maybe((value) => chalk.hex("#6b7280")(value)),
|
|
904
|
-
command: maybe((value) => chalk.hex("#14b8a6")(value)),
|
|
905
|
-
flag: maybe((value) => chalk.hex("#3b82f6")(value)),
|
|
906
|
-
entity: maybe((value) => chalk.hex("#e6b84d")(value)),
|
|
907
|
-
path: maybe((value) => chalk.hex("#8b5cf6")(value)),
|
|
908
|
-
info: maybe((value) => chalk.hex("#6b7280")(value)),
|
|
909
|
-
border: maybe((value) => chalk.hex("#374151")(value)),
|
|
910
|
-
resourceType: styleResourceType
|
|
911
|
-
};
|
|
912
|
-
function disableColor() {
|
|
913
|
-
process.env.NO_COLOR = "1";
|
|
914
|
-
chalk.level = 0;
|
|
915
|
-
}
|
|
916
|
-
function isTty() {
|
|
917
|
-
return process.stdout.isTTY === true;
|
|
918
|
-
}
|
|
919
|
-
function terminalColumns() {
|
|
920
|
-
return process.stdout.columns ?? 80;
|
|
921
|
-
}
|
|
922
|
-
function getTableChars() {
|
|
923
|
-
return isTty() && !process.env.NO_COLOR ? {} : {
|
|
924
|
-
top: "-",
|
|
925
|
-
"top-mid": "+",
|
|
926
|
-
"top-left": "+",
|
|
927
|
-
"top-right": "+",
|
|
928
|
-
bottom: "-",
|
|
929
|
-
"bottom-mid": "+",
|
|
930
|
-
"bottom-left": "+",
|
|
931
|
-
"bottom-right": "+",
|
|
932
|
-
left: "|",
|
|
933
|
-
"left-mid": "+",
|
|
934
|
-
mid: "-",
|
|
935
|
-
"mid-mid": "+",
|
|
936
|
-
right: "|",
|
|
937
|
-
"right-mid": "+",
|
|
938
|
-
middle: "|"
|
|
939
|
-
};
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
// src/ui/kv.ts
|
|
943
|
-
function renderKv(key, value, keyWidth = 20, indent = 2) {
|
|
944
|
-
const spaces = " ".repeat(indent);
|
|
945
|
-
return `${spaces}${theme.muted(key.padEnd(keyWidth))} ${value}`;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
// src/ui/table.ts
|
|
949
|
-
import Table from "cli-table3";
|
|
950
|
-
var OFF_TTY_TABLE_WIDTH = 100;
|
|
951
|
-
function resolveTableMaxWidth(explicit) {
|
|
952
|
-
if (explicit !== void 0) {
|
|
953
|
-
return explicit;
|
|
954
|
-
}
|
|
955
|
-
if (isTty() && typeof process.stdout.columns === "number" && process.stdout.columns > 0) {
|
|
956
|
-
return process.stdout.columns;
|
|
957
|
-
}
|
|
958
|
-
if (isTty()) {
|
|
959
|
-
return terminalColumns();
|
|
960
|
-
}
|
|
961
|
-
return OFF_TTY_TABLE_WIDTH;
|
|
962
|
-
}
|
|
963
|
-
var ESC = String.fromCharCode(27);
|
|
964
|
-
var ANSI_SGR = new RegExp(`${ESC}\\[[0-9;]*m`, "g");
|
|
965
|
-
var ANSI_SGR_AT_START = new RegExp(`^${ESC}\\[[0-9;]*m`);
|
|
966
|
-
function visibleLength(value) {
|
|
967
|
-
return value.replace(ANSI_SGR, "").length;
|
|
968
|
-
}
|
|
969
|
-
function truncateTableCell(value, width) {
|
|
970
|
-
if (width <= 0) {
|
|
971
|
-
return "";
|
|
972
|
-
}
|
|
973
|
-
if (visibleLength(value) <= width) {
|
|
974
|
-
return value;
|
|
975
|
-
}
|
|
976
|
-
if (width <= 3) {
|
|
977
|
-
let visible2 = 0;
|
|
978
|
-
let index2 = 0;
|
|
979
|
-
while (index2 < value.length && visible2 < width) {
|
|
980
|
-
const match = value.slice(index2).match(ANSI_SGR_AT_START);
|
|
981
|
-
if (match) {
|
|
982
|
-
index2 += match[0].length;
|
|
983
|
-
continue;
|
|
984
|
-
}
|
|
985
|
-
visible2 += 1;
|
|
986
|
-
index2 += 1;
|
|
987
|
-
}
|
|
988
|
-
return value.slice(0, index2);
|
|
989
|
-
}
|
|
990
|
-
const budget = width - 3;
|
|
991
|
-
let visible = 0;
|
|
992
|
-
let index = 0;
|
|
993
|
-
while (index < value.length && visible < budget) {
|
|
994
|
-
const match = value.slice(index).match(ANSI_SGR_AT_START);
|
|
995
|
-
if (match) {
|
|
996
|
-
index += match[0].length;
|
|
997
|
-
continue;
|
|
998
|
-
}
|
|
999
|
-
visible += 1;
|
|
1000
|
-
index += 1;
|
|
1001
|
-
}
|
|
1002
|
-
const sliced = value.slice(0, index);
|
|
1003
|
-
const reset = sliced.includes(ESC) ? `${ESC}[0m` : "";
|
|
1004
|
-
return `${sliced}...${reset}`;
|
|
1005
|
-
}
|
|
1006
|
-
function contentWidth(col, rows) {
|
|
1007
|
-
return Math.max(
|
|
1008
|
-
col.width,
|
|
1009
|
-
col.header.length,
|
|
1010
|
-
...rows.map((row) => {
|
|
1011
|
-
const raw = String(row[col.key] ?? "");
|
|
1012
|
-
const transformed = col.transform ? col.transform(raw) : raw;
|
|
1013
|
-
return transformed.length;
|
|
1014
|
-
})
|
|
1015
|
-
);
|
|
1016
|
-
}
|
|
1017
|
-
function tableBorderOverhead(columnCount) {
|
|
1018
|
-
return columnCount + 1;
|
|
1019
|
-
}
|
|
1020
|
-
function computeColumnWidths(columns, rows, maxWidth) {
|
|
1021
|
-
const contentWidths = columns.map((col) => contentWidth(col, rows) + 2);
|
|
1022
|
-
if (maxWidth === void 0) {
|
|
1023
|
-
return contentWidths;
|
|
1024
|
-
}
|
|
1025
|
-
const overhead = tableBorderOverhead(columns.length);
|
|
1026
|
-
const available = Math.max(columns.length, maxWidth - overhead);
|
|
1027
|
-
const fitIndexes = columns.map((col, index) => col.fitContent ? index : -1).filter((index) => index >= 0);
|
|
1028
|
-
const flexibleIndexes = columns.map((col, index) => col.fitContent ? -1 : index).filter((index) => index >= 0);
|
|
1029
|
-
const widths = contentWidths.slice();
|
|
1030
|
-
if (fitIndexes.length > 0) {
|
|
1031
|
-
for (const index of fitIndexes) {
|
|
1032
|
-
widths[index] = contentWidths[index] ?? 0;
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
const fitTotal = fitIndexes.reduce((sum, index) => sum + (widths[index] ?? 0), 0);
|
|
1036
|
-
const flexibleBudget = Math.max(flexibleIndexes.length, available - fitTotal);
|
|
1037
|
-
if (flexibleIndexes.length === 0) {
|
|
1038
|
-
return shrinkToAvailable(widths, columns, available);
|
|
1039
|
-
}
|
|
1040
|
-
const flexibleColumns = flexibleIndexes.map((index) => columns[index]);
|
|
1041
|
-
const flexibleContent = flexibleIndexes.map((index) => contentWidths[index] ?? 0);
|
|
1042
|
-
const flexibleWidths = allocateFlexibleColumnWidths(
|
|
1043
|
-
flexibleColumns,
|
|
1044
|
-
flexibleContent,
|
|
1045
|
-
flexibleBudget
|
|
1046
|
-
);
|
|
1047
|
-
flexibleIndexes.forEach((columnIndex, innerIndex) => {
|
|
1048
|
-
widths[columnIndex] = flexibleWidths[innerIndex] ?? widths[columnIndex] ?? 0;
|
|
1049
|
-
});
|
|
1050
|
-
return shrinkToAvailable(widths, columns, available);
|
|
1051
|
-
}
|
|
1052
|
-
function shrinkToAvailable(widths, columns, available) {
|
|
1053
|
-
let allocated = widths.reduce((sum, width) => sum + width, 0);
|
|
1054
|
-
if (allocated <= available) {
|
|
1055
|
-
return widths;
|
|
1056
|
-
}
|
|
1057
|
-
let overflow = allocated - available;
|
|
1058
|
-
for (let index = widths.length - 1; index >= 0 && overflow > 0; index--) {
|
|
1059
|
-
if (columns[index]?.fitContent) {
|
|
1060
|
-
continue;
|
|
1061
|
-
}
|
|
1062
|
-
const floor = columns[index]?.minWidth ?? 1;
|
|
1063
|
-
const reducible = Math.max(0, (widths[index] ?? 0) - floor);
|
|
1064
|
-
if (reducible <= 0) {
|
|
1065
|
-
continue;
|
|
1066
|
-
}
|
|
1067
|
-
const take = Math.min(reducible, overflow);
|
|
1068
|
-
widths[index] = (widths[index] ?? 0) - take;
|
|
1069
|
-
overflow -= take;
|
|
1070
|
-
}
|
|
1071
|
-
for (let index = widths.length - 1; index >= 0 && overflow > 0; index--) {
|
|
1072
|
-
const floor = 1;
|
|
1073
|
-
const reducible = Math.max(0, (widths[index] ?? 0) - floor);
|
|
1074
|
-
if (reducible <= 0) {
|
|
1075
|
-
continue;
|
|
1076
|
-
}
|
|
1077
|
-
const take = Math.min(reducible, overflow);
|
|
1078
|
-
widths[index] = (widths[index] ?? 0) - take;
|
|
1079
|
-
overflow -= take;
|
|
1080
|
-
}
|
|
1081
|
-
return widths;
|
|
1082
|
-
}
|
|
1083
|
-
function allocateFlexibleColumnWidths(columns, contentWidths, available) {
|
|
1084
|
-
if (columns.length === 0) {
|
|
1085
|
-
return [];
|
|
1086
|
-
}
|
|
1087
|
-
const hasWidthShare = columns.some((col) => col.widthShare !== void 0);
|
|
1088
|
-
if (hasWidthShare) {
|
|
1089
|
-
const floors = columns.map((col) => col.minWidth ?? 0);
|
|
1090
|
-
const shareSum = columns.reduce((sum, col) => sum + (col.widthShare ?? 0), 0);
|
|
1091
|
-
const widths2 = columns.map((col, index) => {
|
|
1092
|
-
const share = shareSum > 0 ? (col.widthShare ?? 0) / shareSum : 1 / columns.length;
|
|
1093
|
-
return Math.max(floors[index] ?? 0, Math.floor(available * share));
|
|
1094
|
-
});
|
|
1095
|
-
let allocated2 = widths2.reduce((sum, width) => sum + width, 0);
|
|
1096
|
-
if (allocated2 > available) {
|
|
1097
|
-
let overflow = allocated2 - available;
|
|
1098
|
-
for (let index = widths2.length - 1; index >= 0 && overflow > 0; index--) {
|
|
1099
|
-
const reducible = (widths2[index] ?? 0) - (floors[index] ?? 0);
|
|
1100
|
-
if (reducible <= 0) {
|
|
1101
|
-
continue;
|
|
1102
|
-
}
|
|
1103
|
-
const take = Math.min(reducible, overflow);
|
|
1104
|
-
widths2[index] = (widths2[index] ?? 0) - take;
|
|
1105
|
-
overflow -= take;
|
|
1106
|
-
}
|
|
1107
|
-
allocated2 = widths2.reduce((sum, width) => sum + width, 0);
|
|
1108
|
-
}
|
|
1109
|
-
if (widths2.length > 0 && allocated2 < available) {
|
|
1110
|
-
widths2[0] = (widths2[0] ?? 0) + available - allocated2;
|
|
1111
|
-
}
|
|
1112
|
-
return widths2;
|
|
1113
|
-
}
|
|
1114
|
-
const total = contentWidths.reduce((sum, width) => sum + width, 0);
|
|
1115
|
-
if (total <= available) {
|
|
1116
|
-
return contentWidths;
|
|
1117
|
-
}
|
|
1118
|
-
const minWidths = columns.map(
|
|
1119
|
-
(col, index) => Math.min(col.width + 2, contentWidths[index] ?? col.width + 2)
|
|
1120
|
-
);
|
|
1121
|
-
const minTotal = minWidths.reduce((sum, width) => sum + width, 0);
|
|
1122
|
-
if (minTotal >= available) {
|
|
1123
|
-
let remaining = available;
|
|
1124
|
-
return minWidths.map((width, index) => {
|
|
1125
|
-
if (index === minWidths.length - 1) {
|
|
1126
|
-
return remaining;
|
|
1127
|
-
}
|
|
1128
|
-
const capped = Math.min(width, remaining);
|
|
1129
|
-
remaining -= capped;
|
|
1130
|
-
return capped;
|
|
1131
|
-
});
|
|
1132
|
-
}
|
|
1133
|
-
const extra = contentWidths.map((width, index) => width - (minWidths[index] ?? 0));
|
|
1134
|
-
const extraTotal = extra.reduce((sum, width) => sum + width, 0);
|
|
1135
|
-
const budget = available - minTotal;
|
|
1136
|
-
const widths = minWidths.map((min, index) => {
|
|
1137
|
-
if (extraTotal === 0) {
|
|
1138
|
-
return min;
|
|
1139
|
-
}
|
|
1140
|
-
return min + Math.floor(budget * (extra[index] ?? 0) / extraTotal);
|
|
1141
|
-
});
|
|
1142
|
-
const allocated = widths.reduce((sum, width) => sum + width, 0);
|
|
1143
|
-
if (widths.length > 0) {
|
|
1144
|
-
widths[0] = (widths[0] ?? 0) + available - allocated;
|
|
1145
|
-
}
|
|
1146
|
-
return widths;
|
|
1147
|
-
}
|
|
1148
|
-
function renderTable({
|
|
1149
|
-
columns,
|
|
1150
|
-
rows,
|
|
1151
|
-
summary,
|
|
1152
|
-
empty,
|
|
1153
|
-
maxWidth,
|
|
1154
|
-
wordWrap,
|
|
1155
|
-
wrapOnWordBoundary
|
|
1156
|
-
}) {
|
|
1157
|
-
if (rows.length === 0 && empty) {
|
|
1158
|
-
return empty;
|
|
1159
|
-
}
|
|
1160
|
-
const resolvedMaxWidth = resolveTableMaxWidth(maxWidth);
|
|
1161
|
-
const colWidths = computeColumnWidths(columns, rows, resolvedMaxWidth);
|
|
1162
|
-
const t = new Table({
|
|
1163
|
-
head: columns.map((col) => theme.heading(col.header)),
|
|
1164
|
-
colWidths,
|
|
1165
|
-
chars: getTableChars(),
|
|
1166
|
-
truncate: "...",
|
|
1167
|
-
style: { head: [], border: [] },
|
|
1168
|
-
...wordWrap !== void 0 ? { wordWrap } : {},
|
|
1169
|
-
...wrapOnWordBoundary !== void 0 ? { wrapOnWordBoundary } : {}
|
|
1170
|
-
});
|
|
1171
|
-
for (const row of rows) {
|
|
1172
|
-
t.push(
|
|
1173
|
-
columns.map((col, index) => {
|
|
1174
|
-
const raw = String(row[col.key] ?? "");
|
|
1175
|
-
const transformed = col.transform ? col.transform(raw) : raw;
|
|
1176
|
-
const innerWidth = Math.max(0, (colWidths[index] ?? col.width) - 2);
|
|
1177
|
-
const clipOverflow = Boolean(col.truncate) || Boolean(col.fitContent) || !wordWrap;
|
|
1178
|
-
const clipped = clipOverflow ? truncateTableCell(transformed, innerWidth) : transformed;
|
|
1179
|
-
const content = col.style ? col.style(clipped) : clipped;
|
|
1180
|
-
if (col.wrapOnWordBoundary === false) {
|
|
1181
|
-
return { content, wrapOnWordBoundary: false };
|
|
1182
|
-
}
|
|
1183
|
-
return content;
|
|
1184
|
-
})
|
|
1185
|
-
);
|
|
1186
|
-
}
|
|
1187
|
-
const lines = [t.toString()];
|
|
1188
|
-
if (summary) {
|
|
1189
|
-
lines.push("");
|
|
1190
|
-
lines.push(theme.info(summary));
|
|
1191
|
-
}
|
|
1192
|
-
return lines.join("\n");
|
|
1193
|
-
}
|
|
1194
|
-
var table = {
|
|
1195
|
-
render: renderTable,
|
|
1196
|
-
print: (opts) => console.log(renderTable(opts))
|
|
1197
|
-
};
|
|
1198
|
-
|
|
1199
|
-
// src/ui/panel.ts
|
|
1200
|
-
function renderPanelTitle(parts) {
|
|
1201
|
-
const [head, ...rest] = parts;
|
|
1202
|
-
return rest.length === 0 ? theme.primary(head ?? "") : `${theme.primary(head ?? "")} ${rest.map((p) => theme.muted(p)).join(" ")}`;
|
|
1203
|
-
}
|
|
1204
|
-
function renderPanel(opts) {
|
|
1205
|
-
const lines = [renderPanelTitle(opts.title)];
|
|
1206
|
-
for (const [key, value] of opts.rows) {
|
|
1207
|
-
lines.push(renderKv(key, value));
|
|
1208
|
-
}
|
|
1209
|
-
return lines.join("\n");
|
|
1210
|
-
}
|
|
1211
|
-
function panel(opts) {
|
|
1212
|
-
console.log(renderPanel(opts));
|
|
1213
|
-
}
|
|
1214
|
-
function kvBlock(rows, opts) {
|
|
1215
|
-
for (const row of rows) {
|
|
1216
|
-
console.log(renderKv(row.key, row.value, opts?.keyWidth, opts?.indent));
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
// src/ui/diff.ts
|
|
1221
|
-
function renderDiffTable({ rows, title }) {
|
|
1222
|
-
const lines = [];
|
|
1223
|
-
if (title) {
|
|
1224
|
-
lines.push(theme.primary(title));
|
|
1225
|
-
}
|
|
1226
|
-
for (const row of rows) {
|
|
1227
|
-
lines.push(` ${theme.muted(row.key)}`);
|
|
1228
|
-
lines.push(` ${theme.danger(`${icons.removed} ${row.before}`)}`);
|
|
1229
|
-
lines.push(` ${theme.success(`${icons.added} ${row.after}`)}`);
|
|
1230
|
-
}
|
|
1231
|
-
return lines.join("\n");
|
|
1232
|
-
}
|
|
1233
|
-
var diffTable = {
|
|
1234
|
-
render: renderDiffTable,
|
|
1235
|
-
print: (opts) => console.log(renderDiffTable(opts))
|
|
1236
|
-
};
|
|
1237
|
-
function renderChangeList(changes) {
|
|
1238
|
-
return changes.map((change) => {
|
|
1239
|
-
const glyph = change.kind === "added" ? icons.added : change.kind === "removed" ? icons.removed : icons.modified;
|
|
1240
|
-
const style = change.kind === "added" ? theme.success : change.kind === "removed" ? theme.danger : theme.warn;
|
|
1241
|
-
return ` ${style(glyph)} ${change.scope.padEnd(10)} ${change.key.padEnd(28)} ${change.detail}`;
|
|
1242
|
-
}).join("\n");
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
// src/ui/progress.ts
|
|
1246
|
-
import ora from "ora";
|
|
1247
|
-
function createProgress(message) {
|
|
1248
|
-
let spinner = null;
|
|
1249
|
-
if (isTty() && process.env.NODE_ENV !== "test") {
|
|
1250
|
-
spinner = ora(message).start();
|
|
1251
|
-
}
|
|
1252
|
-
return {
|
|
1253
|
-
succeed(verdict) {
|
|
1254
|
-
if (spinner) {
|
|
1255
|
-
spinner.succeed(verdict);
|
|
1256
|
-
spinner = null;
|
|
1257
|
-
} else {
|
|
1258
|
-
console.log(theme.success(`${icons.success} ${verdict}`));
|
|
1259
|
-
}
|
|
1260
|
-
},
|
|
1261
|
-
fail(verdict) {
|
|
1262
|
-
if (spinner) {
|
|
1263
|
-
spinner.fail(verdict);
|
|
1264
|
-
spinner = null;
|
|
1265
|
-
} else {
|
|
1266
|
-
console.error(theme.danger(`${icons.danger} ${verdict}`));
|
|
1267
|
-
}
|
|
1268
|
-
},
|
|
1269
|
-
stop() {
|
|
1270
|
-
spinner?.stop();
|
|
1271
|
-
spinner = null;
|
|
1272
|
-
},
|
|
1273
|
-
update(message2) {
|
|
1274
|
-
if (spinner) {
|
|
1275
|
-
spinner.text = message2;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
};
|
|
1279
|
-
}
|
|
1280
|
-
var progress = {
|
|
1281
|
-
start: (message) => createProgress(message),
|
|
1282
|
-
stop: () => {
|
|
1283
|
-
},
|
|
1284
|
-
succeed: (message) => {
|
|
1285
|
-
console.log(theme.success(`${icons.success} ${message}`));
|
|
1286
|
-
},
|
|
1287
|
-
fail: (message) => {
|
|
1288
|
-
console.error(theme.danger(`${icons.danger} ${message}`));
|
|
1289
|
-
}
|
|
1290
|
-
};
|
|
1291
|
-
|
|
1292
|
-
// src/ui/status.ts
|
|
1293
|
-
function line(icon, message) {
|
|
1294
|
-
return `${icon} ${message}`;
|
|
1295
|
-
}
|
|
1296
|
-
function renderSuccess(message, opts) {
|
|
1297
|
-
return opts?.hint ? `${theme.success(line(icons.success, message))}
|
|
1298
|
-
${theme.info(`${icons.hint} ${opts.hint}`)}` : theme.success(line(icons.success, message));
|
|
1299
|
-
}
|
|
1300
|
-
function renderWarn(message, opts) {
|
|
1301
|
-
return opts?.hint ? `${theme.warn(line(icons.warn, message))}
|
|
1302
|
-
${theme.info(`${icons.hint} ${opts.hint}`)}` : theme.warn(line(icons.warn, message));
|
|
1303
|
-
}
|
|
1304
|
-
function renderDanger(message, opts) {
|
|
1305
|
-
const hints = opts?.hints ?? (opts?.hint ? [opts.hint] : []);
|
|
1306
|
-
const base = theme.danger(line(icons.danger, message));
|
|
1307
|
-
if (hints.length === 0) {
|
|
1308
|
-
return base;
|
|
1309
|
-
}
|
|
1310
|
-
return `${base}
|
|
1311
|
-
${hints.map((hint) => ` ${theme.info(`${icons.hint} ${hint}`)}`).join("\n")}`;
|
|
1312
|
-
}
|
|
1313
|
-
var status = {
|
|
1314
|
-
success: (message, opts) => console.log(renderSuccess(message, opts)),
|
|
1315
|
-
warn: (message, opts) => console.log(renderWarn(message, opts)),
|
|
1316
|
-
danger: (message, opts) => console.error(renderDanger(message, opts)),
|
|
1317
|
-
info: (message) => console.log(theme.info(message)),
|
|
1318
|
-
dim: (message) => console.log(theme.info(message)),
|
|
1319
|
-
hint: (message) => console.log(` ${theme.info(`${icons.hint} ${message}`)}`)
|
|
1320
|
-
};
|
|
1321
|
-
|
|
1322
|
-
// src/ui/section.ts
|
|
1323
|
-
function renderHeader(title) {
|
|
1324
|
-
return theme.heading(title);
|
|
1325
|
-
}
|
|
1326
|
-
function renderSubheader(title) {
|
|
1327
|
-
return theme.label(title);
|
|
1328
|
-
}
|
|
1329
|
-
function renderRule() {
|
|
1330
|
-
return theme.border("\u2500".repeat(terminalColumns()));
|
|
1331
|
-
}
|
|
1332
|
-
function header(title) {
|
|
1333
|
-
console.log(renderHeader(title));
|
|
1334
|
-
}
|
|
1335
|
-
function subheader(title) {
|
|
1336
|
-
console.log(renderSubheader(title));
|
|
1337
|
-
}
|
|
1338
|
-
function rule() {
|
|
1339
|
-
console.log(renderRule());
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
// src/ui/index.ts
|
|
1343
|
-
var ui = {
|
|
1344
|
-
format: format_exports,
|
|
1345
|
-
icons,
|
|
1346
|
-
theme,
|
|
1347
|
-
header,
|
|
1348
|
-
renderHeader,
|
|
1349
|
-
subheader,
|
|
1350
|
-
renderSubheader,
|
|
1351
|
-
rule,
|
|
1352
|
-
renderRule,
|
|
1353
|
-
table,
|
|
1354
|
-
renderTable,
|
|
1355
|
-
panel,
|
|
1356
|
-
renderPanel,
|
|
1357
|
-
kvBlock,
|
|
1358
|
-
renderKv,
|
|
1359
|
-
diffTable,
|
|
1360
|
-
renderDiffTable,
|
|
1361
|
-
renderChangeList,
|
|
1362
|
-
spinner: progress,
|
|
1363
|
-
createProgress,
|
|
1364
|
-
...status,
|
|
1365
|
-
disableColor
|
|
1366
|
-
};
|
|
1367
|
-
|
|
1368
844
|
// src/cli/command-catalog.ts
|
|
1369
845
|
var COMMAND_CATALOG = [
|
|
1370
846
|
{
|
|
@@ -1432,6 +908,12 @@ var COMMAND_CATALOG = [
|
|
|
1432
908
|
kind: "group",
|
|
1433
909
|
loader: "migrate"
|
|
1434
910
|
},
|
|
911
|
+
{
|
|
912
|
+
name: "notifications",
|
|
913
|
+
description: "List and mark plugin update notifications",
|
|
914
|
+
kind: "group",
|
|
915
|
+
loader: "notifications"
|
|
916
|
+
},
|
|
1435
917
|
{
|
|
1436
918
|
name: "plugin",
|
|
1437
919
|
aliases: ["l"],
|
|
@@ -1929,4 +1411,4 @@ export {
|
|
|
1929
1411
|
renderRootHelpText,
|
|
1930
1412
|
resolveCommandDescription
|
|
1931
1413
|
};
|
|
1932
|
-
//# sourceMappingURL=help-
|
|
1414
|
+
//# sourceMappingURL=help-VIRMBOPJ.js.map
|