terminal-pilot 0.0.37 → 0.0.39
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/dist/cli.d.ts +1 -0
- package/dist/cli.js +168 -5
- package/dist/cli.js.map +3 -3
- package/dist/commands/close-session.js +4 -1
- package/dist/commands/close-session.js.map +2 -2
- package/dist/commands/create-session.js +4 -1
- package/dist/commands/create-session.js.map +2 -2
- package/dist/commands/daemon-runtime.js +11 -3
- package/dist/commands/daemon-runtime.js.map +2 -2
- package/dist/commands/fill.js +4 -1
- package/dist/commands/fill.js.map +2 -2
- package/dist/commands/get-session.js +4 -1
- package/dist/commands/get-session.js.map +2 -2
- package/dist/commands/index.js +148 -1
- package/dist/commands/index.js.map +3 -3
- package/dist/commands/install.js +145 -1
- package/dist/commands/install.js.map +3 -3
- package/dist/commands/installer.js +145 -1
- package/dist/commands/installer.js.map +3 -3
- package/dist/commands/list-sessions.js +4 -1
- package/dist/commands/list-sessions.js.map +2 -2
- package/dist/commands/press-key.js +4 -1
- package/dist/commands/press-key.js.map +2 -2
- package/dist/commands/read-history.js +4 -1
- package/dist/commands/read-history.js.map +2 -2
- package/dist/commands/read-screen.js +4 -1
- package/dist/commands/read-screen.js.map +2 -2
- package/dist/commands/resize.js +4 -1
- package/dist/commands/resize.js.map +2 -2
- package/dist/commands/runtime.d.ts +1 -0
- package/dist/commands/runtime.js +4 -1
- package/dist/commands/runtime.js.map +2 -2
- package/dist/commands/screenshot.js +4 -1
- package/dist/commands/screenshot.js.map +2 -2
- package/dist/commands/send-signal.js +4 -1
- package/dist/commands/send-signal.js.map +2 -2
- package/dist/commands/type.js +4 -1
- package/dist/commands/type.js.map +2 -2
- package/dist/commands/uninstall.js +145 -1
- package/dist/commands/uninstall.js.map +3 -3
- package/dist/commands/wait-for-exit.js +4 -1
- package/dist/commands/wait-for-exit.js.map +2 -2
- package/dist/commands/wait-for.js +4 -1
- package/dist/commands/wait-for.js.map +2 -2
- package/dist/testing/cli-repl.js +168 -5
- package/dist/testing/cli-repl.js.map +3 -3
- package/dist/testing/qa-cli.js +168 -5
- package/dist/testing/qa-cli.js.map +3 -3
- package/node_modules/toolcraft-design/README.md +187 -5
- package/node_modules/toolcraft-design/dist/brand.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/brand.js +1 -0
- package/node_modules/toolcraft-design/dist/brands.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/brands.js +1 -0
- package/node_modules/toolcraft-design/dist/cancel.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/cancel.js +1 -0
- package/node_modules/toolcraft-design/dist/color.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/color.js +1 -0
- package/node_modules/toolcraft-design/dist/configure-theme.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/configure-theme.js +1 -0
- package/node_modules/toolcraft-design/dist/confirm-or-cancel.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/confirm-or-cancel.js +1 -0
- package/node_modules/toolcraft-design/dist/confirm.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/confirm.js +1 -0
- package/node_modules/toolcraft-design/dist/create-dashboard.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/create-dashboard.js +1 -0
- package/node_modules/toolcraft-design/dist/create-logger.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/create-logger.js +1 -0
- package/node_modules/toolcraft-design/dist/dark.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/dark.js +1 -0
- package/node_modules/toolcraft-design/dist/format-columns.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/format-columns.js +1 -0
- package/node_modules/toolcraft-design/dist/format-command-list.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/format-command-list.js +1 -0
- package/node_modules/toolcraft-design/dist/format-command-not-found-panel.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/format-command-not-found-panel.js +1 -0
- package/node_modules/toolcraft-design/dist/format-command-not-found.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/format-command-not-found.js +1 -0
- package/node_modules/toolcraft-design/dist/format-command.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/format-command.js +1 -0
- package/node_modules/toolcraft-design/dist/format-option-list.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/format-option-list.js +1 -0
- package/node_modules/toolcraft-design/dist/format-option.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/format-option.js +1 -0
- package/node_modules/toolcraft-design/dist/format-usage.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/format-usage.js +1 -0
- package/node_modules/toolcraft-design/dist/get-template-partial-names.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/get-template-partial-names.js +1 -0
- package/node_modules/toolcraft-design/dist/get-theme-config.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/get-theme-config.js +1 -0
- package/node_modules/toolcraft-design/dist/get-theme.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/get-theme.js +1 -0
- package/node_modules/toolcraft-design/dist/help-formatter-plain.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/help-formatter-plain.js +2 -0
- package/node_modules/toolcraft-design/dist/help-formatter.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/help-formatter.js +1 -0
- package/node_modules/toolcraft-design/dist/index.d.ts +2 -2
- package/node_modules/toolcraft-design/dist/index.js +1 -1
- package/node_modules/toolcraft-design/dist/intro-plain.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/intro-plain.js +1 -0
- package/node_modules/toolcraft-design/dist/intro.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/intro.js +1 -0
- package/node_modules/toolcraft-design/dist/is-cancel.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/is-cancel.js +1 -0
- package/node_modules/toolcraft-design/dist/light.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/light.js +1 -0
- package/node_modules/toolcraft-design/dist/log.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/log.js +1 -0
- package/node_modules/toolcraft-design/dist/logger.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/logger.js +1 -0
- package/node_modules/toolcraft-design/dist/multiselect.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/multiselect.js +1 -0
- package/node_modules/toolcraft-design/dist/note.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/note.js +1 -0
- package/node_modules/toolcraft-design/dist/open-external.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/open-external.js +1 -0
- package/node_modules/toolcraft-design/dist/outro.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/outro.js +1 -0
- package/node_modules/toolcraft-design/dist/parse.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/parse.js +1 -0
- package/node_modules/toolcraft-design/dist/password.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/password.js +1 -0
- package/node_modules/toolcraft-design/dist/prompt-cancelled-error.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/prompt-cancelled-error.js +1 -0
- package/node_modules/toolcraft-design/dist/prompt-text.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/prompt-text.js +1 -0
- package/node_modules/toolcraft-design/dist/prompt-theme.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/prompt-theme.js +1 -0
- package/node_modules/toolcraft-design/dist/render-catalog.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-catalog.js +1 -0
- package/node_modules/toolcraft-design/dist/render-detail-card.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-detail-card.js +1 -0
- package/node_modules/toolcraft-design/dist/render-html.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-html.js +1 -0
- package/node_modules/toolcraft-design/dist/render-inspector-card.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-inspector-card.js +1 -0
- package/node_modules/toolcraft-design/dist/render-markdown-html.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-markdown-html.js +1 -0
- package/node_modules/toolcraft-design/dist/render-markdown.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-markdown.js +1 -0
- package/node_modules/toolcraft-design/dist/render-menu.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-menu.js +1 -0
- package/node_modules/toolcraft-design/dist/render-resource-browser.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-resource-browser.js +1 -0
- package/node_modules/toolcraft-design/dist/render-spinner-frame.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-spinner-frame.js +1 -0
- package/node_modules/toolcraft-design/dist/render-spinner-stopped.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-spinner-stopped.js +1 -0
- package/node_modules/toolcraft-design/dist/render-table.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-table.js +1 -0
- package/node_modules/toolcraft-design/dist/render-template.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render-template.js +1 -0
- package/node_modules/toolcraft-design/dist/render.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/render.js +1 -0
- package/node_modules/toolcraft-design/dist/reset-output-format-cache.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/reset-output-format-cache.js +1 -0
- package/node_modules/toolcraft-design/dist/reset-theme-cache.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/reset-theme-cache.js +1 -0
- package/node_modules/toolcraft-design/dist/reset-theme.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/reset-theme.js +1 -0
- package/node_modules/toolcraft-design/dist/resolve-output-format.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/resolve-output-format.js +1 -0
- package/node_modules/toolcraft-design/dist/resolve-template-partials.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/resolve-template-partials.js +1 -0
- package/node_modules/toolcraft-design/dist/resolve-theme-name.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/resolve-theme-name.js +1 -0
- package/node_modules/toolcraft-design/dist/run-explorer.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/run-explorer.js +1 -0
- package/node_modules/toolcraft-design/dist/run-two-pane-explorer.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/run-two-pane-explorer.js +1 -0
- package/node_modules/toolcraft-design/dist/select.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/select.js +1 -0
- package/node_modules/toolcraft-design/dist/should-use-interactive-dashboard.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/should-use-interactive-dashboard.js +1 -0
- package/node_modules/toolcraft-design/dist/single-detail.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/single-detail.js +1 -0
- package/node_modules/toolcraft-design/dist/spacing.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/spacing.js +1 -0
- package/node_modules/toolcraft-design/dist/spinner-frames.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/spinner-frames.js +1 -0
- package/node_modules/toolcraft-design/dist/spinner.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/spinner.js +1 -0
- package/node_modules/toolcraft-design/dist/strip-ansi.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/strip-ansi.js +1 -0
- package/node_modules/toolcraft-design/dist/symbols.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/symbols.js +1 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/ast.d.ts +6 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/html-renderer.d.ts +7 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/html-renderer.js +366 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/index.d.ts +5 -1
- package/node_modules/toolcraft-design/dist/terminal-markdown/index.js +6 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/parser/code-highlight.d.ts +4 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/parser/code-highlight.js +1357 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/renderer.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/terminal-markdown/renderer.js +63 -1
- package/node_modules/toolcraft-design/dist/text.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/text.js +1 -0
- package/node_modules/toolcraft-design/dist/typography.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/typography.js +1 -0
- package/node_modules/toolcraft-design/dist/widths.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/widths.js +1 -0
- package/node_modules/toolcraft-design/dist/with-output-format.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/with-output-format.js +1 -0
- package/node_modules/toolcraft-design/dist/with-spinner.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/with-spinner.js +1 -0
- package/node_modules/toolcraft-design/package.json +4 -0
- package/package.json +1 -1
package/dist/testing/cli-repl.js
CHANGED
|
@@ -1910,6 +1910,150 @@ import { LineCounter, parse, parseDocument } from "yaml";
|
|
|
1910
1910
|
// ../frontmatter/src/stringify.ts
|
|
1911
1911
|
import { stringify } from "yaml";
|
|
1912
1912
|
|
|
1913
|
+
// ../toolcraft-design/src/terminal-markdown/parser/code-highlight.ts
|
|
1914
|
+
var codeLanguages = [
|
|
1915
|
+
{
|
|
1916
|
+
id: "javascript",
|
|
1917
|
+
aliases: ["js", "javascript", "mjs", "cjs", "es6"],
|
|
1918
|
+
family: "lexical",
|
|
1919
|
+
spec: "javascript"
|
|
1920
|
+
},
|
|
1921
|
+
{ id: "javascriptreact", aliases: ["jsx"], family: "lexical", spec: "javascript" },
|
|
1922
|
+
{
|
|
1923
|
+
id: "typescript",
|
|
1924
|
+
aliases: ["ts", "typescript", "mts", "cts"],
|
|
1925
|
+
family: "lexical",
|
|
1926
|
+
spec: "typescript"
|
|
1927
|
+
},
|
|
1928
|
+
{ id: "typescriptreact", aliases: ["tsx"], family: "lexical", spec: "typescript" },
|
|
1929
|
+
{ id: "json", aliases: ["json"], family: "data", spec: "json" },
|
|
1930
|
+
{ id: "jsonc", aliases: ["jsonc"], family: "data", spec: "jsonc" },
|
|
1931
|
+
{ id: "jsonl", aliases: ["jsonl"], family: "data", spec: "json" },
|
|
1932
|
+
{ id: "yaml", aliases: ["yaml", "yml"], family: "data", spec: "yaml" },
|
|
1933
|
+
{ id: "css", aliases: ["css"], family: "style", spec: "css" },
|
|
1934
|
+
{ id: "scss", aliases: ["scss"], family: "style", spec: "css" },
|
|
1935
|
+
{ id: "sass", aliases: ["sass"], family: "style", spec: "css" },
|
|
1936
|
+
{ id: "less", aliases: ["less"], family: "style", spec: "css" },
|
|
1937
|
+
{ id: "postcss", aliases: ["postcss"], family: "style", spec: "css" },
|
|
1938
|
+
{ id: "shellscript", aliases: ["sh", "bash", "shell", "shellscript", "zsh", "fish"], family: "lexical", spec: "shell" },
|
|
1939
|
+
{ id: "python", aliases: ["py", "python"], family: "lexical", spec: "python" },
|
|
1940
|
+
{ id: "sql", aliases: ["sql", "ddl", "dml"], family: "lexical", spec: "sql" },
|
|
1941
|
+
{ id: "html", aliases: ["html"], family: "markup", spec: "html" },
|
|
1942
|
+
{ id: "xml", aliases: ["xml", "svg"], family: "markup", spec: "xml" },
|
|
1943
|
+
{ id: "markdown", aliases: ["md", "markdown"], family: "line", spec: "markdown" },
|
|
1944
|
+
{ id: "diff", aliases: ["diff", "patch"], family: "line", spec: "diff" },
|
|
1945
|
+
{ id: "dockerfile", aliases: ["dockerfile", "docker"], family: "line", spec: "dockerfile" },
|
|
1946
|
+
{ id: "ini", aliases: ["ini", "properties"], family: "data", spec: "ini" },
|
|
1947
|
+
{ id: "toml", aliases: ["toml"], family: "data", spec: "toml" },
|
|
1948
|
+
{ id: "plaintext", aliases: ["text", "txt", "plain", "plaintext"], plain: true },
|
|
1949
|
+
{ id: "ruby", aliases: ["rb", "ruby"], family: "lexical", spec: "ruby" },
|
|
1950
|
+
{ id: "go", aliases: ["go", "golang"], family: "lexical", spec: "go" },
|
|
1951
|
+
{ id: "java", aliases: ["java"], family: "lexical", spec: "java" },
|
|
1952
|
+
{ id: "kotlin", aliases: ["kt", "kotlin", "kts"], family: "lexical", spec: "kotlin" },
|
|
1953
|
+
{ id: "swift", aliases: ["swift"], family: "lexical", spec: "swift" },
|
|
1954
|
+
{ id: "dart", aliases: ["dart"], family: "lexical", spec: "dart" },
|
|
1955
|
+
{ id: "scala", aliases: ["scala", "sc"], family: "lexical", spec: "scala" },
|
|
1956
|
+
{ id: "groovy", aliases: ["groovy", "gvy", "gy", "gsp"], family: "lexical", spec: "groovy" },
|
|
1957
|
+
{ id: "c", aliases: ["c"], family: "lexical", spec: "c" },
|
|
1958
|
+
{ id: "cpp", aliases: ["cpp", "c++", "cc", "cxx"], family: "lexical", spec: "cpp" },
|
|
1959
|
+
{ id: "csharp", aliases: ["cs", "csharp", "c#"], family: "lexical", spec: "csharp" },
|
|
1960
|
+
{ id: "objective-c", aliases: ["objc", "objectivec", "objective-c", "m", "mm"], family: "lexical", spec: "objectivec" },
|
|
1961
|
+
{ id: "rust", aliases: ["rs", "rust"], family: "lexical", spec: "rust" },
|
|
1962
|
+
{ id: "php", aliases: ["php"], family: "lexical", spec: "php" },
|
|
1963
|
+
{ id: "lua", aliases: ["lua"], family: "lexical", spec: "lua" },
|
|
1964
|
+
{ id: "perl", aliases: ["pl", "perl", "pm"], family: "lexical", spec: "perl" },
|
|
1965
|
+
{ id: "r", aliases: ["r", "rscript"], family: "lexical", spec: "r" },
|
|
1966
|
+
{ id: "powershell", aliases: ["ps1", "powershell", "pwsh"], family: "lexical", spec: "powershell" },
|
|
1967
|
+
{ id: "elixir", aliases: ["ex", "exs", "elixir"], family: "lexical", spec: "elixir" },
|
|
1968
|
+
{ id: "erlang", aliases: ["erl", "erlang", "hrl"], family: "lexical", spec: "erlang" },
|
|
1969
|
+
{ id: "haskell", aliases: ["hs", "haskell"], family: "lexical", spec: "haskell" },
|
|
1970
|
+
{ id: "clojure", aliases: ["clj", "cljs", "cljc", "clojure"], family: "lexical", spec: "clojure" },
|
|
1971
|
+
{ id: "fsharp", aliases: ["fs", "fsi", "fsx", "fsharp"], family: "lexical", spec: "fsharp" },
|
|
1972
|
+
{ id: "vb", aliases: ["vb", "vbnet"], family: "lexical", spec: "vb" },
|
|
1973
|
+
{ id: "graphql", aliases: ["graphql", "gql"], family: "lexical", spec: "graphql" },
|
|
1974
|
+
{ id: "protobuf", aliases: ["proto", "protobuf"], family: "lexical", spec: "protobuf" },
|
|
1975
|
+
{ id: "hcl", aliases: ["hcl", "tf", "terraform"], family: "lexical", spec: "hcl" },
|
|
1976
|
+
{ id: "nginx", aliases: ["nginx", "nginxconf"], family: "lexical", spec: "nginx" },
|
|
1977
|
+
{ id: "makefile", aliases: ["makefile", "mk"], family: "lexical", spec: "makefile" },
|
|
1978
|
+
{ id: "cmake", aliases: ["cmake"], family: "lexical", spec: "cmake" },
|
|
1979
|
+
{ id: "gradle", aliases: ["gradle"], family: "lexical", spec: "groovy" },
|
|
1980
|
+
{ id: "env", aliases: ["env", "dotenv"], family: "data", spec: "ini" },
|
|
1981
|
+
{ id: "vue", aliases: ["vue"], family: "markup", spec: "html" },
|
|
1982
|
+
{ id: "svelte", aliases: ["svelte"], family: "markup", spec: "html" }
|
|
1983
|
+
];
|
|
1984
|
+
var languageByAlias = /* @__PURE__ */ new Map();
|
|
1985
|
+
for (const language of codeLanguages) {
|
|
1986
|
+
languageByAlias.set(language.id.toLowerCase(), language);
|
|
1987
|
+
for (const alias of language.aliases) {
|
|
1988
|
+
languageByAlias.set(alias.toLowerCase(), language);
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
var jsKeywords = /* @__PURE__ */ new Set([
|
|
1992
|
+
"as",
|
|
1993
|
+
"async",
|
|
1994
|
+
"await",
|
|
1995
|
+
"break",
|
|
1996
|
+
"case",
|
|
1997
|
+
"catch",
|
|
1998
|
+
"class",
|
|
1999
|
+
"const",
|
|
2000
|
+
"continue",
|
|
2001
|
+
"debugger",
|
|
2002
|
+
"default",
|
|
2003
|
+
"delete",
|
|
2004
|
+
"do",
|
|
2005
|
+
"else",
|
|
2006
|
+
"export",
|
|
2007
|
+
"extends",
|
|
2008
|
+
"finally",
|
|
2009
|
+
"for",
|
|
2010
|
+
"from",
|
|
2011
|
+
"function",
|
|
2012
|
+
"get",
|
|
2013
|
+
"if",
|
|
2014
|
+
"import",
|
|
2015
|
+
"in",
|
|
2016
|
+
"instanceof",
|
|
2017
|
+
"let",
|
|
2018
|
+
"new",
|
|
2019
|
+
"of",
|
|
2020
|
+
"return",
|
|
2021
|
+
"set",
|
|
2022
|
+
"static",
|
|
2023
|
+
"super",
|
|
2024
|
+
"switch",
|
|
2025
|
+
"throw",
|
|
2026
|
+
"try",
|
|
2027
|
+
"typeof",
|
|
2028
|
+
"var",
|
|
2029
|
+
"void",
|
|
2030
|
+
"while",
|
|
2031
|
+
"with",
|
|
2032
|
+
"yield"
|
|
2033
|
+
]);
|
|
2034
|
+
var tsKeywords = /* @__PURE__ */ new Set([
|
|
2035
|
+
...jsKeywords,
|
|
2036
|
+
"abstract",
|
|
2037
|
+
"declare",
|
|
2038
|
+
"enum",
|
|
2039
|
+
"implements",
|
|
2040
|
+
"interface",
|
|
2041
|
+
"keyof",
|
|
2042
|
+
"namespace",
|
|
2043
|
+
"private",
|
|
2044
|
+
"protected",
|
|
2045
|
+
"public",
|
|
2046
|
+
"readonly",
|
|
2047
|
+
"satisfies",
|
|
2048
|
+
"type"
|
|
2049
|
+
]);
|
|
2050
|
+
var cKeywords = /* @__PURE__ */ new Set(["auto", "break", "case", "const", "continue", "default", "do", "else", "enum", "extern", "for", "goto", "if", "inline", "register", "restrict", "return", "sizeof", "static", "struct", "switch", "typedef", "union", "volatile", "while"]);
|
|
2051
|
+
var cTypes = /* @__PURE__ */ new Set(["bool", "char", "double", "float", "int", "int16_t", "int32_t", "int64_t", "int8_t", "long", "short", "size_t", "uint16_t", "uint32_t", "uint64_t", "uint8_t", "void"]);
|
|
2052
|
+
var cppKeywords = /* @__PURE__ */ new Set([...cKeywords, "alignas", "alignof", "and", "bitand", "bitor", "catch", "class", "concept", "constexpr", "consteval", "constinit", "decltype", "delete", "explicit", "export", "friend", "mutable", "namespace", "new", "noexcept", "not", "operator", "or", "private", "protected", "public", "requires", "template", "this", "throw", "try", "typename", "using", "virtual", "xor"]);
|
|
2053
|
+
var cppTypes = /* @__PURE__ */ new Set([...cTypes, "auto", "bool", "char16_t", "char32_t", "std", "string", "wstring"]);
|
|
2054
|
+
var objectiveCKeywords = /* @__PURE__ */ new Set([...cKeywords, "@autoreleasepool", "@catch", "@class", "@dynamic", "@end", "@finally", "@implementation", "@import", "@interface", "@optional", "@package", "@private", "@property", "@protected", "@protocol", "@public", "@selector", "@synthesize", "@throw", "@try", "YES", "NO", "nil", "self", "super"]);
|
|
2055
|
+
var objectiveCTypes = /* @__PURE__ */ new Set([...cTypes, "BOOL", "Class", "CGFloat", "NSInteger", "NSObject", "NSString", "NSUInteger", "SEL", "id"]);
|
|
2056
|
+
|
|
1913
2057
|
// ../toolcraft-design/src/dashboard/terminal-width.ts
|
|
1914
2058
|
var graphemeSegmenter3 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
1915
2059
|
|
|
@@ -3433,7 +3577,7 @@ function createRuntimeLogger(options = {}) {
|
|
|
3433
3577
|
}
|
|
3434
3578
|
|
|
3435
3579
|
// ../toolcraft/src/package-metadata.ts
|
|
3436
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
3580
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
3437
3581
|
import path from "node:path";
|
|
3438
3582
|
import { fileURLToPath } from "node:url";
|
|
3439
3583
|
function pathFromInput(from) {
|
|
@@ -3447,8 +3591,14 @@ function pathFromInput(from) {
|
|
|
3447
3591
|
}
|
|
3448
3592
|
function getSearchDirectory(from) {
|
|
3449
3593
|
const resolved = pathFromInput(from);
|
|
3594
|
+
let searchPath = resolved;
|
|
3595
|
+
try {
|
|
3596
|
+
searchPath = realpathSync(resolved);
|
|
3597
|
+
} catch {
|
|
3598
|
+
searchPath = resolved;
|
|
3599
|
+
}
|
|
3450
3600
|
try {
|
|
3451
|
-
return statSync(
|
|
3601
|
+
return statSync(searchPath).isDirectory() ? searchPath : path.dirname(searchPath);
|
|
3452
3602
|
} catch {
|
|
3453
3603
|
return path.dirname(resolved);
|
|
3454
3604
|
}
|
|
@@ -19297,6 +19447,9 @@ function createTerminalPilotRuntime(options = {}) {
|
|
|
19297
19447
|
};
|
|
19298
19448
|
},
|
|
19299
19449
|
listSessions: listSessions2,
|
|
19450
|
+
async hasRetainedSessions() {
|
|
19451
|
+
return nameToId.size > 0 || pendingNames.size > 0;
|
|
19452
|
+
},
|
|
19300
19453
|
async close() {
|
|
19301
19454
|
if (pilotPromise === void 0) {
|
|
19302
19455
|
return;
|
|
@@ -22819,8 +22972,7 @@ async function runTerminalPilotDaemon() {
|
|
|
22819
22972
|
clearTimeout(idleTimer);
|
|
22820
22973
|
idleTimer = void 0;
|
|
22821
22974
|
}
|
|
22822
|
-
|
|
22823
|
-
if (sessions.length > 0) {
|
|
22975
|
+
if (await runtime.hasRetainedSessions()) {
|
|
22824
22976
|
return;
|
|
22825
22977
|
}
|
|
22826
22978
|
idleTimer = setTimeout(() => {
|
|
@@ -22906,6 +23058,9 @@ function createDaemonTerminalPilotRuntime() {
|
|
|
22906
23058
|
session: proxySession(entry.name, entry.session)
|
|
22907
23059
|
}));
|
|
22908
23060
|
},
|
|
23061
|
+
async hasRetainedSessions() {
|
|
23062
|
+
return request("hasRetainedSessions");
|
|
23063
|
+
},
|
|
22909
23064
|
async close() {
|
|
22910
23065
|
await request("shutdown").catch(() => void 0);
|
|
22911
23066
|
}
|
|
@@ -22957,6 +23112,9 @@ async function handleRequest(runtime, request) {
|
|
|
22957
23112
|
const sessions = await runtime.listSessions();
|
|
22958
23113
|
return sessions.map(formatNamedSession);
|
|
22959
23114
|
}
|
|
23115
|
+
if (request.method === "hasRetainedSessions") {
|
|
23116
|
+
return runtime.hasRetainedSessions();
|
|
23117
|
+
}
|
|
22960
23118
|
if (request.method === "closeSession") {
|
|
22961
23119
|
return runtime.closeSession(optionalString2(params17.name), envFromValue(params17.envSession));
|
|
22962
23120
|
}
|
|
@@ -23149,6 +23307,9 @@ function sleep2(ms) {
|
|
|
23149
23307
|
|
|
23150
23308
|
// src/cli.ts
|
|
23151
23309
|
configureTheme({ brand: "green", label: "Terminal Pilot" });
|
|
23310
|
+
function getBundledPackageVersion() {
|
|
23311
|
+
return true ? "0.0.39" : void 0;
|
|
23312
|
+
}
|
|
23152
23313
|
function normalizeArgv(argv) {
|
|
23153
23314
|
if (argv.includes("--json") && !argv.some((argument) => argument === "--output" || argument.startsWith("--output="))) {
|
|
23154
23315
|
return argv.flatMap((argument) => argument === "--json" ? ["--output", "json"] : [argument]);
|
|
@@ -23163,6 +23324,7 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23163
23324
|
const originalArgv = process.argv;
|
|
23164
23325
|
process.argv = normalizeArgv(argv);
|
|
23165
23326
|
try {
|
|
23327
|
+
const packageVersion = options.packageVersion ?? getBundledPackageVersion();
|
|
23166
23328
|
await runCLI(createTerminalPilotGroup(), {
|
|
23167
23329
|
services: {
|
|
23168
23330
|
terminalPilotRuntime: options.terminalPilotRuntime ?? createDaemonTerminalPilotRuntime()
|
|
@@ -23172,7 +23334,8 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23172
23334
|
output: true,
|
|
23173
23335
|
verbose: true,
|
|
23174
23336
|
yes: true
|
|
23175
|
-
}
|
|
23337
|
+
},
|
|
23338
|
+
...packageVersion === void 0 ? {} : { version: packageVersion }
|
|
23176
23339
|
});
|
|
23177
23340
|
} finally {
|
|
23178
23341
|
process.argv = originalArgv;
|