just-bash 2.2.0 → 2.3.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.
@@ -1,6 +1,6 @@
1
1
  import type { Command } from "../types.js";
2
2
  /** All available built-in command names (excludes network commands like curl) */
3
- export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat" | "yq" | "xan";
3
+ export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "rev" | "nl" | "fold" | "expand" | "unexpand" | "strings" | "split" | "column" | "join" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od" | "gzip" | "gunzip" | "zcat" | "yq" | "xan" | "sqlite3";
4
4
  /** Network command names (only available when network is configured) */
5
5
  export type NetworkCommandName = "curl";
6
6
  /** All command names including network commands */
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Output formatters for sqlite3 command
3
+ */
4
+ export type OutputMode = "list" | "csv" | "json" | "line" | "column" | "table" | "markdown" | "tabs" | "box" | "quote" | "html" | "ascii";
5
+ export interface FormatOptions {
6
+ mode: OutputMode;
7
+ header: boolean;
8
+ separator: string;
9
+ nullValue: string;
10
+ newline: string;
11
+ }
12
+ /**
13
+ * Format query results according to the specified options
14
+ */
15
+ export declare function formatOutput(columns: string[], rows: unknown[][], options: FormatOptions): string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * sqlite3 - SQLite database CLI
3
+ *
4
+ * Wraps better-sqlite3 to provide SQLite database access through the virtual filesystem.
5
+ * Databases are loaded from buffers and written back after modifications.
6
+ */
7
+ import type { Command } from "../../types.js";
8
+ export declare const sqlite3Command: Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,6 +52,7 @@
52
52
  "license": "Apache-2.0",
53
53
  "devDependencies": {
54
54
  "@biomejs/biome": "^2.3.10",
55
+ "@types/better-sqlite3": "^7.6.11",
55
56
  "@types/ini": "^4.1.1",
56
57
  "@types/node": "^25.0.3",
57
58
  "@types/papaparse": "^5.5.2",
@@ -63,6 +64,7 @@
63
64
  "vitest": "^4.0.16"
64
65
  },
65
66
  "dependencies": {
67
+ "better-sqlite3": "^11.9.1",
66
68
  "diff": "^8.0.2",
67
69
  "fast-xml-parser": "^5.3.3",
68
70
  "file-type": "^21.2.0",