@fnndsc/chell 4.2.8
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/LICENSE +21 -0
- package/README.md +325 -0
- package/dist/builtins/debug.d.ts +6 -0
- package/dist/builtins/debug.js +47 -0
- package/dist/builtins/debug.js.map +1 -0
- package/dist/builtins/executable.d.ts +22 -0
- package/dist/builtins/executable.js +115 -0
- package/dist/builtins/executable.js.map +1 -0
- package/dist/builtins/fs/cat.d.ts +16 -0
- package/dist/builtins/fs/cat.js +249 -0
- package/dist/builtins/fs/cat.js.map +1 -0
- package/dist/builtins/fs/cd.d.ts +41 -0
- package/dist/builtins/fs/cd.js +178 -0
- package/dist/builtins/fs/cd.js.map +1 -0
- package/dist/builtins/fs/cp.d.ts +7 -0
- package/dist/builtins/fs/cp.js +73 -0
- package/dist/builtins/fs/cp.js.map +1 -0
- package/dist/builtins/fs/download.d.ts +6 -0
- package/dist/builtins/fs/download.js +41 -0
- package/dist/builtins/fs/download.js.map +1 -0
- package/dist/builtins/fs/du.d.ts +58 -0
- package/dist/builtins/fs/du.js +210 -0
- package/dist/builtins/fs/du.js.map +1 -0
- package/dist/builtins/fs/edit.d.ts +7 -0
- package/dist/builtins/fs/edit.js +86 -0
- package/dist/builtins/fs/edit.js.map +1 -0
- package/dist/builtins/fs/ls.d.ts +8 -0
- package/dist/builtins/fs/ls.js +68 -0
- package/dist/builtins/fs/ls.js.map +1 -0
- package/dist/builtins/fs/mkdir.d.ts +6 -0
- package/dist/builtins/fs/mkdir.js +38 -0
- package/dist/builtins/fs/mkdir.js.map +1 -0
- package/dist/builtins/fs/mv.d.ts +7 -0
- package/dist/builtins/fs/mv.js +75 -0
- package/dist/builtins/fs/mv.js.map +1 -0
- package/dist/builtins/fs/pull.args.d.ts +22 -0
- package/dist/builtins/fs/pull.args.js +30 -0
- package/dist/builtins/fs/pull.args.js.map +1 -0
- package/dist/builtins/fs/pull.d.ts +26 -0
- package/dist/builtins/fs/pull.js +413 -0
- package/dist/builtins/fs/pull.js.map +1 -0
- package/dist/builtins/fs/pwd.d.ts +7 -0
- package/dist/builtins/fs/pwd.js +75 -0
- package/dist/builtins/fs/pwd.js.map +1 -0
- package/dist/builtins/fs/rm.d.ts +31 -0
- package/dist/builtins/fs/rm.js +148 -0
- package/dist/builtins/fs/rm.js.map +1 -0
- package/dist/builtins/fs/touch.d.ts +6 -0
- package/dist/builtins/fs/touch.js +64 -0
- package/dist/builtins/fs/touch.js.map +1 -0
- package/dist/builtins/fs/tree.d.ts +15 -0
- package/dist/builtins/fs/tree.js +84 -0
- package/dist/builtins/fs/tree.js.map +1 -0
- package/dist/builtins/fs/upload.d.ts +6 -0
- package/dist/builtins/fs/upload.js +45 -0
- package/dist/builtins/fs/upload.js.map +1 -0
- package/dist/builtins/help.d.ts +74 -0
- package/dist/builtins/help.js +1217 -0
- package/dist/builtins/help.js.map +1 -0
- package/dist/builtins/index.d.ts +45 -0
- package/dist/builtins/index.js +45 -0
- package/dist/builtins/index.js.map +1 -0
- package/dist/builtins/net/connect.d.ts +7 -0
- package/dist/builtins/net/connect.js +42 -0
- package/dist/builtins/net/connect.js.map +1 -0
- package/dist/builtins/net/cubepath.d.ts +18 -0
- package/dist/builtins/net/cubepath.js +102 -0
- package/dist/builtins/net/cubepath.js.map +1 -0
- package/dist/builtins/net/logout.d.ts +6 -0
- package/dist/builtins/net/logout.js +24 -0
- package/dist/builtins/net/logout.js.map +1 -0
- package/dist/builtins/net/pacs.d.ts +24 -0
- package/dist/builtins/net/pacs.js +121 -0
- package/dist/builtins/net/pacs.js.map +1 -0
- package/dist/builtins/net/pacsUtils.d.ts +85 -0
- package/dist/builtins/net/pacsUtils.js +184 -0
- package/dist/builtins/net/pacsUtils.js.map +1 -0
- package/dist/builtins/net/query.d.ts +60 -0
- package/dist/builtins/net/query.js +304 -0
- package/dist/builtins/net/query.js.map +1 -0
- package/dist/builtins/parametersofplugin.d.ts +13 -0
- package/dist/builtins/parametersofplugin.js +43 -0
- package/dist/builtins/parametersofplugin.js.map +1 -0
- package/dist/builtins/pluginExecute.d.ts +27 -0
- package/dist/builtins/pluginExecute.js +165 -0
- package/dist/builtins/pluginExecute.js.map +1 -0
- package/dist/builtins/proc.d.ts +6 -0
- package/dist/builtins/proc.helpers.d.ts +68 -0
- package/dist/builtins/proc.helpers.js +102 -0
- package/dist/builtins/proc.helpers.js.map +1 -0
- package/dist/builtins/proc.js +289 -0
- package/dist/builtins/proc.js.map +1 -0
- package/dist/builtins/res/compute.d.ts +6 -0
- package/dist/builtins/res/compute.js +55 -0
- package/dist/builtins/res/compute.js.map +1 -0
- package/dist/builtins/res/feed.d.ts +6 -0
- package/dist/builtins/res/feed.js +244 -0
- package/dist/builtins/res/feed.js.map +1 -0
- package/dist/builtins/res/feed.notes.d.ts +28 -0
- package/dist/builtins/res/feed.notes.js +24 -0
- package/dist/builtins/res/feed.notes.js.map +1 -0
- package/dist/builtins/res/files.d.ts +18 -0
- package/dist/builtins/res/files.js +85 -0
- package/dist/builtins/res/files.js.map +1 -0
- package/dist/builtins/res/group.d.ts +6 -0
- package/dist/builtins/res/group.js +54 -0
- package/dist/builtins/res/group.js.map +1 -0
- package/dist/builtins/res/pipeline.args.d.ts +22 -0
- package/dist/builtins/res/pipeline.args.js +28 -0
- package/dist/builtins/res/pipeline.args.js.map +1 -0
- package/dist/builtins/res/pipeline.d.ts +20 -0
- package/dist/builtins/res/pipeline.js +252 -0
- package/dist/builtins/res/pipeline.js.map +1 -0
- package/dist/builtins/res/plugin.d.ts +13 -0
- package/dist/builtins/res/plugin.js +140 -0
- package/dist/builtins/res/plugin.js.map +1 -0
- package/dist/builtins/res/plugininstance.d.ts +6 -0
- package/dist/builtins/res/plugininstance.js +53 -0
- package/dist/builtins/res/plugininstance.js.map +1 -0
- package/dist/builtins/res/pluginmeta.d.ts +6 -0
- package/dist/builtins/res/pluginmeta.js +53 -0
- package/dist/builtins/res/pluginmeta.js.map +1 -0
- package/dist/builtins/res/tag.d.ts +6 -0
- package/dist/builtins/res/tag.js +53 -0
- package/dist/builtins/res/tag.js.map +1 -0
- package/dist/builtins/res/workflow.d.ts +6 -0
- package/dist/builtins/res/workflow.js +53 -0
- package/dist/builtins/res/workflow.js.map +1 -0
- package/dist/builtins/store.d.ts +6 -0
- package/dist/builtins/store.js +108 -0
- package/dist/builtins/store.js.map +1 -0
- package/dist/builtins/sys/context.d.ts +6 -0
- package/dist/builtins/sys/context.js +50 -0
- package/dist/builtins/sys/context.js.map +1 -0
- package/dist/builtins/sys/physicalmode.d.ts +6 -0
- package/dist/builtins/sys/physicalmode.js +41 -0
- package/dist/builtins/sys/physicalmode.js.map +1 -0
- package/dist/builtins/sys/prompt.d.ts +13 -0
- package/dist/builtins/sys/prompt.helpers.d.ts +31 -0
- package/dist/builtins/sys/prompt.helpers.js +36 -0
- package/dist/builtins/sys/prompt.helpers.js.map +1 -0
- package/dist/builtins/sys/prompt.js +182 -0
- package/dist/builtins/sys/prompt.js.map +1 -0
- package/dist/builtins/sys/timing.d.ts +6 -0
- package/dist/builtins/sys/timing.js +41 -0
- package/dist/builtins/sys/timing.js.map +1 -0
- package/dist/builtins/sys/whoami.d.ts +12 -0
- package/dist/builtins/sys/whoami.js +37 -0
- package/dist/builtins/sys/whoami.js.map +1 -0
- package/dist/builtins/utils.d.ts +55 -0
- package/dist/builtins/utils.js +145 -0
- package/dist/builtins/utils.js.map +1 -0
- package/dist/builtins/wildcard.d.ts +26 -0
- package/dist/builtins/wildcard.js +120 -0
- package/dist/builtins/wildcard.js.map +1 -0
- package/dist/chell.d.ts +16 -0
- package/dist/chell.js +1193 -0
- package/dist/chell.js.map +1 -0
- package/dist/command-keys.d.ts +8 -0
- package/dist/command-keys.js +32 -0
- package/dist/command-keys.js.map +1 -0
- package/dist/config/settings.d.ts +39 -0
- package/dist/config/settings.js +93 -0
- package/dist/config/settings.js.map +1 -0
- package/dist/core/bootFlags.d.ts +32 -0
- package/dist/core/bootFlags.js +25 -0
- package/dist/core/bootFlags.js.map +1 -0
- package/dist/core/cli.d.ts +58 -0
- package/dist/core/cli.js +251 -0
- package/dist/core/cli.js.map +1 -0
- package/dist/core/prompt/index.d.ts +80 -0
- package/dist/core/prompt/index.js +29 -0
- package/dist/core/prompt/index.js.map +1 -0
- package/dist/core/prompt/theme_default.d.ts +19 -0
- package/dist/core/prompt/theme_default.js +47 -0
- package/dist/core/prompt/theme_default.js.map +1 -0
- package/dist/core/prompt/theme_p10k.d.ts +22 -0
- package/dist/core/prompt/theme_p10k.js +164 -0
- package/dist/core/prompt/theme_p10k.js.map +1 -0
- package/dist/core/prompt/utils.d.ts +23 -0
- package/dist/core/prompt/utils.js +40 -0
- package/dist/core/prompt/utils.js.map +1 -0
- package/dist/core/question.d.ts +34 -0
- package/dist/core/question.js +76 -0
- package/dist/core/question.js.map +1 -0
- package/dist/core/repl.d.ts +31 -0
- package/dist/core/repl.js +146 -0
- package/dist/core/repl.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/bootsequence.d.ts +62 -0
- package/dist/lib/bootsequence.js +222 -0
- package/dist/lib/bootsequence.js.map +1 -0
- package/dist/lib/completer/index.d.ts +15 -0
- package/dist/lib/completer/index.js +212 -0
- package/dist/lib/completer/index.js.map +1 -0
- package/dist/lib/completer/pathComplete.helpers.d.ts +22 -0
- package/dist/lib/completer/pathComplete.helpers.js +49 -0
- package/dist/lib/completer/pathComplete.helpers.js.map +1 -0
- package/dist/lib/logo.d.ts +47 -0
- package/dist/lib/logo.js +313 -0
- package/dist/lib/logo.js.map +1 -0
- package/dist/lib/parser.d.ts +13 -0
- package/dist/lib/parser.js +52 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/pipe.d.ts +11 -0
- package/dist/lib/pipe.js +90 -0
- package/dist/lib/pipe.js.map +1 -0
- package/dist/lib/prefetch.d.ts +25 -0
- package/dist/lib/prefetch.js +64 -0
- package/dist/lib/prefetch.js.map +1 -0
- package/dist/lib/semicolonParser.d.ts +22 -0
- package/dist/lib/semicolonParser.js +53 -0
- package/dist/lib/semicolonParser.js.map +1 -0
- package/dist/lib/spinner.d.ts +23 -0
- package/dist/lib/spinner.js +68 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/vfs/providers/static.d.ts +65 -0
- package/dist/lib/vfs/providers/static.js +164 -0
- package/dist/lib/vfs/providers/static.js.map +1 -0
- package/dist/lib/vfs/providers/static_content.d.ts +27 -0
- package/dist/lib/vfs/providers/static_content.js +180 -0
- package/dist/lib/vfs/providers/static_content.js.map +1 -0
- package/dist/lib/vfs/vfs.d.ts +59 -0
- package/dist/lib/vfs/vfs.js +198 -0
- package/dist/lib/vfs/vfs.js.map +1 -0
- package/dist/session/index.d.ts +76 -0
- package/dist/session/index.js +120 -0
- package/dist/session/index.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../src/builtins/res/tag.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAc,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAiB,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAc;IAC9C,MAAM,MAAM,GAAe,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,UAAU,GAAuB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnD,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,GAAkB,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AAC;YAChC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QACnI,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;QACvD,CAAC;QACD,OAAO;IACT,CAAC;IAED,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,uBAAuB,UAAU,qCAAqC,CAAC,CAAC,CAAC;AACjG,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Builtin workflow command.
|
|
3
|
+
*
|
|
4
|
+
* Subcommands: list, search, inspect
|
|
5
|
+
* Aliases: workflow / workflows
|
|
6
|
+
*/
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import { commandArgs_process } from '../utils.js';
|
|
9
|
+
import { workflows_fetchList } from '@fnndsc/chili/commands/workflows/list.js';
|
|
10
|
+
import { workflowFields_fetch } from '@fnndsc/chili/commands/workflows/fields.js';
|
|
11
|
+
import { table_display } from '@fnndsc/chili/screen/screen.js';
|
|
12
|
+
/**
|
|
13
|
+
* Builtin handler for the `workflow` command.
|
|
14
|
+
*
|
|
15
|
+
* @param args - Parsed command arguments for the workflow command.
|
|
16
|
+
*/
|
|
17
|
+
export async function builtin_workflow(args) {
|
|
18
|
+
const parsed = commandArgs_process(args);
|
|
19
|
+
const subcommand = parsed._[0];
|
|
20
|
+
if (!subcommand || subcommand === 'list') {
|
|
21
|
+
try {
|
|
22
|
+
const { workflows, selectedFields, totalCount } = await workflows_fetchList(parsed);
|
|
23
|
+
if (workflows.length === 0) {
|
|
24
|
+
console.log(chalk.gray('No workflows found.'));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
table_display(workflows, selectedFields, { title: { title: 'Workflows', justification: 'center' }, pagination: totalCount !== undefined ? { shown: workflows.length, total: totalCount } : undefined });
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
console.error(chalk.red(`workflow error: ${e instanceof Error ? e.message : String(e)}`));
|
|
32
|
+
}
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (subcommand === 'search') {
|
|
36
|
+
const query = parsed._[1] ?? '';
|
|
37
|
+
await builtin_workflow([...args.filter((a) => a !== subcommand), `--search`, query]);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (subcommand === 'inspect') {
|
|
41
|
+
const fields = await workflowFields_fetch();
|
|
42
|
+
if (fields && fields.length > 0) {
|
|
43
|
+
table_display(fields.map((f) => ({ field: f })), ['field'], { title: { title: 'Workflow fields', justification: 'center' } });
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
console.log(chalk.gray('No fields found for workflows.'));
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
console.log(chalk.red(`Unknown subcommand: ${subcommand}. Usage: workflows <list|search|inspect>`));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../../src/builtins/res/workflow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAc,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAsB,MAAM,0CAA0C,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACl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,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QAC7F,OAAO;IACT,CAAC;IAED,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAoB,MAAM,oBAAoB,EAAE,CAAC;QAC7D,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QACxI,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO;IACT,CAAC;IAED,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,uBAAuB,UAAU,0CAA0C,CAAC,CAAC,CAAC;AACtG,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Builtin store command.
|
|
3
|
+
* Manages peer store interactions (list, search, install).
|
|
4
|
+
*/
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import { commandArgs_process } from './utils.js';
|
|
7
|
+
import { store_listPlugins, store_searchPlugins } from '@fnndsc/chili/commands/store/list.js';
|
|
8
|
+
import { grid_render, long_render } from '@fnndsc/chili/views/ls.js';
|
|
9
|
+
import { spinner } from '../lib/spinner.js';
|
|
10
|
+
import { plugin_addInteractive } from './res/plugin.js';
|
|
11
|
+
import { settings, settings_save } from '../config/settings.js';
|
|
12
|
+
const DEFAULT_STORE_URL = 'https://cube.chrisproject.org/api/v1/';
|
|
13
|
+
/**
|
|
14
|
+
* Handles store commands.
|
|
15
|
+
*
|
|
16
|
+
* @param args - command arguments.
|
|
17
|
+
*/
|
|
18
|
+
export async function builtin_store(args) {
|
|
19
|
+
const parsed = commandArgs_process(args);
|
|
20
|
+
const subcommand = parsed._[0];
|
|
21
|
+
if (!subcommand) {
|
|
22
|
+
console.log(chalk.red("Usage: store <list|search|install> ..."));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const storeOptions = {
|
|
26
|
+
store: parsed.store
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
spinner.start('Fetching from store...');
|
|
30
|
+
if (subcommand === 'list') {
|
|
31
|
+
const items = await store_listPlugins(storeOptions);
|
|
32
|
+
spinner.stop();
|
|
33
|
+
if (items.length === 0) {
|
|
34
|
+
console.log('No plugins found in store.');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Use grid render by default, or long render if -l flag (handled by view options in future,
|
|
38
|
+
// but currently ls view helpers accept options).
|
|
39
|
+
// chell's ls uses args to parse flags. Here we have parsed args.
|
|
40
|
+
// parsed.l is boolean.
|
|
41
|
+
if (parsed.l) {
|
|
42
|
+
console.log(long_render(items, { human: !!parsed.h }));
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
console.log(grid_render(items));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else if (subcommand === 'search') {
|
|
49
|
+
const query = parsed._[1];
|
|
50
|
+
if (!query) {
|
|
51
|
+
spinner.stop();
|
|
52
|
+
console.log(chalk.red("Usage: store search <query>"));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const items = await store_searchPlugins(query, storeOptions);
|
|
56
|
+
spinner.stop();
|
|
57
|
+
if (items.length === 0) {
|
|
58
|
+
console.log(`No plugins found matching '${query}'.`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (parsed.l) {
|
|
62
|
+
console.log(long_render(items, { human: !!parsed.h }));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
console.log(grid_render(items));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (subcommand === 'install') {
|
|
69
|
+
spinner.stop();
|
|
70
|
+
const installParsed = { ...parsed, _: [parsed._[0], parsed._[1]] };
|
|
71
|
+
await plugin_addInteractive(installParsed);
|
|
72
|
+
}
|
|
73
|
+
else if (subcommand === 'inspect') {
|
|
74
|
+
spinner.stop();
|
|
75
|
+
const current = settings.config.storeUrl ?? DEFAULT_STORE_URL;
|
|
76
|
+
const isDefault = settings.config.storeUrl === undefined;
|
|
77
|
+
console.log(`${chalk.bold('Peer store URL:')} ${chalk.blue(current)}${isDefault ? chalk.gray(' (default)') : chalk.yellow(' (custom)')}`);
|
|
78
|
+
}
|
|
79
|
+
else if (subcommand === 'set') {
|
|
80
|
+
spinner.stop();
|
|
81
|
+
const url = parsed._[1];
|
|
82
|
+
if (!url) {
|
|
83
|
+
console.log(chalk.red('Usage: store set <url>'));
|
|
84
|
+
process.exitCode = 1;
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
settings.config.storeUrl = url;
|
|
88
|
+
await settings_save();
|
|
89
|
+
console.log(chalk.green(`Store URL set to: ${chalk.blue(url)}`));
|
|
90
|
+
}
|
|
91
|
+
else if (subcommand === 'reset') {
|
|
92
|
+
spinner.stop();
|
|
93
|
+
delete settings.config.storeUrl;
|
|
94
|
+
await settings_save();
|
|
95
|
+
console.log(chalk.green(`Store URL reset to default: ${chalk.blue(DEFAULT_STORE_URL)}`));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
spinner.stop();
|
|
99
|
+
console.log(chalk.red(`Unknown subcommand: ${subcommand}. Usage: store <list|search|install|inspect|set|reset>`));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch (e) {
|
|
103
|
+
spinner.stop();
|
|
104
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
105
|
+
console.error(chalk.red(`Store error: ${msg}`));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/builtins/store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAc,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,iBAAiB,GAAW,uCAAuC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAc;IAChD,MAAM,MAAM,GAAe,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,UAAU,GAAW,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC,CAAC;QACjE,OAAO;IACV,CAAC;IAED,MAAM,YAAY,GAAG;QACnB,KAAK,EAAE,MAAM,CAAC,KAA2B;KAC1C,CAAC;IAEF,IAAI,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAExC,I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{ context_getSingle } from '@fnndsc/salsa';
|
|
7
|
+
import { session } from '../../session/index.js';
|
|
8
|
+
import { table_display } from '@fnndsc/chili/screen/screen.js';
|
|
9
|
+
/**
|
|
10
|
+
* Displays the current ChRIS context.
|
|
11
|
+
*
|
|
12
|
+
* @param args - Command line arguments (optional flags).
|
|
13
|
+
*/
|
|
14
|
+
export async function builtin_context(args) {
|
|
15
|
+
const context = await context_getSingle();
|
|
16
|
+
const tableData = [
|
|
17
|
+
{
|
|
18
|
+
Context: 'ChRIS User',
|
|
19
|
+
Value: context.user || chalk.gray('Not set'),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
Context: 'ChRIS URL',
|
|
23
|
+
Value: context.URL || chalk.gray('Not set'),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
Context: 'ChRIS Folder',
|
|
27
|
+
Value: context.folder || chalk.gray('Not set'),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
Context: 'ChRIS Feed',
|
|
31
|
+
Value: context.feed || chalk.gray('Not set'),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
Context: 'ChRIS Plugin',
|
|
35
|
+
Value: context.plugin || chalk.gray('Not set'),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
Context: 'PACS Server',
|
|
39
|
+
Value: context.pacsserver || chalk.gray('Not set'),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
Context: 'Physical Mode',
|
|
43
|
+
Value: session.physicalMode_get() ? chalk.magenta('Enabled') : chalk.gray('Disabled'),
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
table_display(tableData, ['Context', 'Value'], {
|
|
47
|
+
title: { title: 'ChRIS Context', justification: 'center' },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/builtins/sys/context.ts"],"names":[],"m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,aAAa,CACX,SAAS,EACT,CAAC,SAAS,EAAE,OAAO,CAAC,EACpB;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE;KAC3D,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Builtin physicalmode command.
|
|
3
|
+
* Toggles physical filesystem mode.
|
|
4
|
+
*/
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import { session } from '../../session/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Toggles or displays physical filesystem mode.
|
|
9
|
+
*
|
|
10
|
+
* @param args - Command line arguments: 'on', 'off', or empty to display status.
|
|
11
|
+
*/
|
|
12
|
+
export async function builtin_physicalmode(args) {
|
|
13
|
+
const subcommand = args[0];
|
|
14
|
+
if (!subcommand) {
|
|
15
|
+
const status = session.physicalMode_get() ? 'enabled' : 'disabled';
|
|
16
|
+
console.log(`Physical filesystem mode: ${chalk.yellow(status)}`);
|
|
17
|
+
if (session.physicalMode_get()) {
|
|
18
|
+
console.log(chalk.gray(' Paths are used directly without logical-to-physical mapping.'));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
console.log(chalk.gray(' Paths are resolved through logical-to-physical mapping.'));
|
|
22
|
+
}
|
|
23
|
+
console.log(chalk.gray('\nUsage: physicalmode [on|off]'));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (subcommand === 'on') {
|
|
27
|
+
session.physicalMode_set(true);
|
|
28
|
+
console.log(chalk.yellow('[!] Physical filesystem mode enabled'));
|
|
29
|
+
console.log(chalk.gray(' Paths will be used directly without logical-to-physical mapping.'));
|
|
30
|
+
}
|
|
31
|
+
else if (subcommand === 'off') {
|
|
32
|
+
session.physicalMode_set(false);
|
|
33
|
+
console.log(chalk.green('[+] Physical filesystem mode disabled'));
|
|
34
|
+
console.log(chalk.gray(' Paths will be resolved through logical-to-physical mapping.'));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
console.log(chalk.red(`Unknown argument: ${subcommand}`));
|
|
38
|
+
console.log(chalk.gray('Usage: physicalmode [on|off]'));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=physicalmode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physicalmode.js","sourceRoot":"","sources":["../../../src/builtins/sys/physicalmode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAc;IACvD,MAAM,UAAU,GAAuB,IAAI,CAAC,CAAC,CAAC,CAAC;IAE/C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,MAAM,GAAW,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACjE,IAAI,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC,CAAC;QAC5F,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC,CAAC;QACvF,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,CAAC;QAC1D,OAAO;IACT,CAAC;IAED,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,sCAAsC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC,CAAC;IAClG,CAAC;SAAM,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC,CAAC;IAC7F,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,CAAC,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists available themes or switches/configures the active theme.
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* prompt — show current theme
|
|
6
|
+
* prompt list — list all themes
|
|
7
|
+
* prompt <theme> — activate named theme
|
|
8
|
+
* prompt toggle <segment> — toggle a p10k segment on/off
|
|
9
|
+
* prompt --configure — interactive segment configurator (p10k only)
|
|
10
|
+
*
|
|
11
|
+
* @param args - Command line arguments.
|
|
12
|
+
*/
|
|
13
|
+
export declare function builtin_prompt(args: string[]): Promise<void>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Pure helpers for the `prompt` builtin.
|
|
3
|
+
*
|
|
4
|
+
* Builds the prompt rendering context (applying offline fallbacks) and parses
|
|
5
|
+
* the interactive segment-toggle input. Dependency-free for easy unit testing.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import type { PromptContext, P10kSegmentConfig } from '../../core/prompt/index.js';
|
|
10
|
+
import type { SingleContext } from '@fnndsc/cumin';
|
|
11
|
+
/**
|
|
12
|
+
* Builds a {@link PromptContext} from session/context state, applying the
|
|
13
|
+
* "disconnected"/"no-cube"/"/" fallbacks used when offline.
|
|
14
|
+
*
|
|
15
|
+
* @param context - The current single context.
|
|
16
|
+
* @param cwd - The current working directory.
|
|
17
|
+
* @param isOffline - Whether the session is offline.
|
|
18
|
+
* @param physicalMode - Whether physical (vs logical) path mode is active.
|
|
19
|
+
* @param terminalWidth - The terminal width in columns.
|
|
20
|
+
* @param p10kSegments - The configured p10k segment toggles.
|
|
21
|
+
* @returns The assembled prompt context.
|
|
22
|
+
*/
|
|
23
|
+
export declare function promptContext_build(context: SingleContext, cwd: string, isOffline: boolean, physicalMode: boolean, terminalWidth: number, p10kSegments: P10kSegmentConfig): PromptContext;
|
|
24
|
+
/**
|
|
25
|
+
* Splits interactive segment-toggle input into individual segment tokens,
|
|
26
|
+
* accepting whitespace- or comma-separated names.
|
|
27
|
+
*
|
|
28
|
+
* @param answer - The raw user input.
|
|
29
|
+
* @returns The non-empty tokens.
|
|
30
|
+
*/
|
|
31
|
+
export declare function segmentTokens_parse(answer: string): string[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a {@link PromptContext} from session/context state, applying the
|
|
3
|
+
* "disconnected"/"no-cube"/"/" fallbacks used when offline.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The current single context.
|
|
6
|
+
* @param cwd - The current working directory.
|
|
7
|
+
* @param isOffline - Whether the session is offline.
|
|
8
|
+
* @param physicalMode - Whether physical (vs logical) path mode is active.
|
|
9
|
+
* @param terminalWidth - The terminal width in columns.
|
|
10
|
+
* @param p10kSegments - The configured p10k segment toggles.
|
|
11
|
+
* @returns The assembled prompt context.
|
|
12
|
+
*/
|
|
13
|
+
export function promptContext_build(context, cwd, isOffline, physicalMode, terminalWidth, p10kSegments) {
|
|
14
|
+
return {
|
|
15
|
+
user: isOffline ? 'disconnected' : (context.user ?? 'disconnected'),
|
|
16
|
+
uri: isOffline ? 'no-cube' : (context.URL ?? 'no-cube'),
|
|
17
|
+
cwd: isOffline ? '/' : cwd,
|
|
18
|
+
pacsserver: context.pacsserver ?? null,
|
|
19
|
+
physicalMode,
|
|
20
|
+
terminalWidth,
|
|
21
|
+
lastExitCode: 0,
|
|
22
|
+
lastCommandDurationMs: 0,
|
|
23
|
+
p10kSegments,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Splits interactive segment-toggle input into individual segment tokens,
|
|
28
|
+
* accepting whitespace- or comma-separated names.
|
|
29
|
+
*
|
|
30
|
+
* @param answer - The raw user input.
|
|
31
|
+
* @returns The non-empty tokens.
|
|
32
|
+
*/
|
|
33
|
+
export function segmentTokens_parse(answer) {
|
|
34
|
+
return answer.split(/[\s,]+/).filter((t) => t.length > 0);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=prompt.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.helpers.js","sourceRoot":"","sources":["../../../src/builtins/sys/prompt.helpers.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAsB,EACtB,GAAW,EACX,SAAkB,EAClB,YAAqB,EACrB,aAAqB,EACrB,YAA+B;IAE/B,OAAO;QACL,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,cAAc,CAAC;QACnE,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,SAAS,CAAC;QACvD,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;QAC1B,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;QACtC,YAAY;QACZ,aAAa;QACb,YAAY,EAAE,CAAC;QACf,qBAAqB,EAAE,CAAC;QACxB,YAAY;KACb,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Builtin prompt command.
|
|
3
|
+
*
|
|
4
|
+
* Lists available prompt themes, switches the active theme, or configures
|
|
5
|
+
* optional segments for the current theme.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
import { settings, settings_save } from '../../config/settings.js';
|
|
11
|
+
import { THEME_NAMES, P10K_OPTIONAL_SEGMENTS, prompt_render } from '../../core/prompt/index.js';
|
|
12
|
+
import { context_getSingle } from '@fnndsc/salsa';
|
|
13
|
+
import { session } from '../../session/index.js';
|
|
14
|
+
import { repl_question } from '../../core/question.js';
|
|
15
|
+
import { promptContext_build, segmentTokens_parse } from './prompt.helpers.js';
|
|
16
|
+
const ALL_SEGMENTS = [
|
|
17
|
+
{ label: 'host', description: 'CUBE host URL', toggleable: false },
|
|
18
|
+
{ label: 'pacs', description: 'Active PACS server (set via: context set PACSserver <id>)', toggleable: true },
|
|
19
|
+
{ label: 'user', description: 'Logged-in username', toggleable: false },
|
|
20
|
+
{ label: 'dir', description: 'Current VFS path', toggleable: false },
|
|
21
|
+
{ label: 'time', description: 'Current time (HH:MM)', toggleable: true },
|
|
22
|
+
{ label: 'duration', description: 'Last command duration — shown when ≥ 3s', toggleable: true },
|
|
23
|
+
{ label: 'status', description: 'Last exit code — shown when non-zero', toggleable: true },
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Prints the configure menu for the current theme.
|
|
27
|
+
*
|
|
28
|
+
* @param pacsserver - Current PACS server from context, or null if unset.
|
|
29
|
+
*/
|
|
30
|
+
function configure_print(pacsserver) {
|
|
31
|
+
const theme = settings.config.promptTheme;
|
|
32
|
+
if (theme !== 'p10k') {
|
|
33
|
+
console.log(chalk.yellow(`No configurable segments for '${theme}' theme.`));
|
|
34
|
+
console.log(chalk.gray(`Switch to p10k first: prompt p10k`));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
console.log(chalk.bold.blue('\np10k segment configuration:\n'));
|
|
38
|
+
console.log(` ${chalk.bold('Segment'.padEnd(12))}${chalk.bold('Status'.padEnd(8))}${chalk.bold('Description')}`);
|
|
39
|
+
console.log(` ${chalk.gray('─'.repeat(66))}`);
|
|
40
|
+
for (const seg of ALL_SEGMENTS) {
|
|
41
|
+
let enabled;
|
|
42
|
+
if (seg.toggleable) {
|
|
43
|
+
const val = settings.config.p10kSegments[seg.label];
|
|
44
|
+
// pacs: ON only when both toggled on AND a server is actually set
|
|
45
|
+
enabled = seg.label === 'pacs' ? (val && pacsserver !== null) : val;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
enabled = true;
|
|
49
|
+
}
|
|
50
|
+
const statusStr = enabled ? chalk.green('[ON ] ') : chalk.gray('[OFF] ');
|
|
51
|
+
const toggleHint = !seg.toggleable ? chalk.gray(' (always)') : '';
|
|
52
|
+
console.log(` ${chalk.cyan(seg.label.padEnd(12))}${statusStr}${seg.description}${toggleHint}`);
|
|
53
|
+
}
|
|
54
|
+
console.log(chalk.gray('\n Toggle optional segments: prompt toggle <segment>'));
|
|
55
|
+
console.log('');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Renders and prints the current prompt once (useful for single-shot testing).
|
|
59
|
+
*/
|
|
60
|
+
async function promptShow_handle() {
|
|
61
|
+
const context = await context_getSingle();
|
|
62
|
+
const cwd = await session.getCWD();
|
|
63
|
+
const ctx = promptContext_build(context, cwd, session.offline, session.physicalMode_get(), process.stdout.columns || 80, settings.config.p10kSegments);
|
|
64
|
+
process.stdout.write(prompt_render(settings.config.promptTheme, ctx) + '\n');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Runs the interactive p10k segment configurator.
|
|
68
|
+
*/
|
|
69
|
+
async function promptConfigure_handle() {
|
|
70
|
+
const theme = settings.config.promptTheme;
|
|
71
|
+
if (theme !== 'p10k') {
|
|
72
|
+
console.log(chalk.yellow(`No configurable segments for '${theme}' theme.`));
|
|
73
|
+
console.log(chalk.gray(`Switch to p10k first: prompt p10k`));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const ctxForConfigure = await context_getSingle();
|
|
77
|
+
const pacsserver = ctxForConfigure.pacsserver ?? null;
|
|
78
|
+
configure_print(pacsserver);
|
|
79
|
+
const answer = await repl_question(chalk.white('Enter segment names to toggle (e.g. "time duration"), or Enter to exit: '));
|
|
80
|
+
if (!answer)
|
|
81
|
+
return;
|
|
82
|
+
const tokens = segmentTokens_parse(answer);
|
|
83
|
+
const changed = [];
|
|
84
|
+
for (const token of tokens) {
|
|
85
|
+
if (P10K_OPTIONAL_SEGMENTS.includes(token)) {
|
|
86
|
+
const key = token;
|
|
87
|
+
settings.config.p10kSegments[key] = !settings.config.p10kSegments[key];
|
|
88
|
+
changed.push(token);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
console.log(chalk.yellow(` Unknown segment: '${token}' — skipped`));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (changed.length > 0) {
|
|
95
|
+
await settings_save();
|
|
96
|
+
configure_print(pacsserver);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Toggles a single p10k optional segment on/off.
|
|
101
|
+
*
|
|
102
|
+
* @param segName - The segment name to toggle.
|
|
103
|
+
*/
|
|
104
|
+
async function promptToggle_handle(segName) {
|
|
105
|
+
const validKey = segName !== undefined &&
|
|
106
|
+
P10K_OPTIONAL_SEGMENTS.includes(segName);
|
|
107
|
+
if (!validKey) {
|
|
108
|
+
console.log(chalk.red(`Usage: prompt toggle <segment>`));
|
|
109
|
+
console.log(chalk.gray(` Segments: ${P10K_OPTIONAL_SEGMENTS.join(', ')}`));
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const key = segName;
|
|
113
|
+
const prev = settings.config.p10kSegments[key];
|
|
114
|
+
settings.config.p10kSegments[key] = !prev;
|
|
115
|
+
await settings_save();
|
|
116
|
+
const nowStr = settings.config.p10kSegments[key] ? chalk.green('ON') : chalk.gray('OFF');
|
|
117
|
+
console.log(` ${chalk.cyan(key)} → ${nowStr}`);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Lists available themes or switches/configures the active theme.
|
|
121
|
+
*
|
|
122
|
+
* Subcommands:
|
|
123
|
+
* prompt — show current theme
|
|
124
|
+
* prompt list — list all themes
|
|
125
|
+
* prompt <theme> — activate named theme
|
|
126
|
+
* prompt toggle <segment> — toggle a p10k segment on/off
|
|
127
|
+
* prompt --configure — interactive segment configurator (p10k only)
|
|
128
|
+
*
|
|
129
|
+
* @param args - Command line arguments.
|
|
130
|
+
*/
|
|
131
|
+
export async function builtin_prompt(args) {
|
|
132
|
+
const hasConfigure = args.includes('--configure');
|
|
133
|
+
const hasShow = args.includes('--show');
|
|
134
|
+
const subcommand = args[0];
|
|
135
|
+
// No args — show current state
|
|
136
|
+
if (!subcommand) {
|
|
137
|
+
const current = settings.config.promptTheme;
|
|
138
|
+
console.log(`Prompt theme: ${chalk.yellow(current)}`);
|
|
139
|
+
console.log(chalk.gray(` Available: ${THEME_NAMES.join(', ')}`));
|
|
140
|
+
console.log(chalk.gray('\nUsage: prompt list | prompt <theme> | prompt toggle <segment> | prompt --configure'));
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
// list
|
|
144
|
+
if (subcommand === 'list') {
|
|
145
|
+
console.log(chalk.bold.blue('Available prompt themes:'));
|
|
146
|
+
const current = settings.config.promptTheme;
|
|
147
|
+
for (const name of THEME_NAMES) {
|
|
148
|
+
const marker = name === current ? chalk.green(' ✓ (active)') : '';
|
|
149
|
+
console.log(` ${chalk.cyan(name)}${marker}`);
|
|
150
|
+
}
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
// toggle <segment>
|
|
154
|
+
if (subcommand === 'toggle') {
|
|
155
|
+
await promptToggle_handle(args[1]);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
// Switch theme if a known theme name is present (may be combined with flags)
|
|
159
|
+
if (subcommand && !subcommand.startsWith('--')) {
|
|
160
|
+
const isKnown = THEME_NAMES.includes(subcommand);
|
|
161
|
+
if (!isKnown) {
|
|
162
|
+
console.log(chalk.red(`Unknown theme: '${subcommand}'`));
|
|
163
|
+
console.log(chalk.gray(` Available: ${THEME_NAMES.join(', ')}`));
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const theme = subcommand;
|
|
167
|
+
settings.config.promptTheme = theme;
|
|
168
|
+
await settings_save();
|
|
169
|
+
console.log(chalk.green(`[+] Prompt theme set to '${theme}'`));
|
|
170
|
+
// fall through to handle any flags that followed
|
|
171
|
+
}
|
|
172
|
+
// --show — render and print the current prompt (useful for single-shot testing)
|
|
173
|
+
if (hasShow) {
|
|
174
|
+
await promptShow_handle();
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
// --configure — interactive segment configurator (p10k only)
|
|
178
|
+
if (hasConfigure) {
|
|
179
|
+
await promptConfigure_handle();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/builtins/sys/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,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