@maria_rcks/t1code 0.0.4 → 0.0.6

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.
Files changed (40) hide show
  1. package/README.md +24 -0
  2. package/bin/t1code.js +38 -4
  3. package/dist/index.mjs +879 -29527
  4. package/dist/server/{BunPTY-BulfMn1P.cjs → BunPTY-3FAOkA1C.cjs} +4 -5
  5. package/dist/server/BunPTY-3FAOkA1C.cjs.map +1 -0
  6. package/dist/server/{BunPTY-Cueq2gzZ.mjs → BunPTY-B9Pc7ndx.mjs} +5 -6
  7. package/dist/server/BunPTY-B9Pc7ndx.mjs.map +1 -0
  8. package/dist/server/{NodePTY-AdcStdsu.mjs → NodePTY-CZNVLBpq.mjs} +15 -16
  9. package/dist/server/NodePTY-CZNVLBpq.mjs.map +1 -0
  10. package/dist/server/{NodePTY-DmqnQV86.cjs → NodePTY-CbnaoLlj.cjs} +14 -15
  11. package/dist/server/NodePTY-CbnaoLlj.cjs.map +1 -0
  12. package/dist/server/NodeSqliteClient-C5fYhtpO.cjs +147 -0
  13. package/dist/server/NodeSqliteClient-C5fYhtpO.cjs.map +1 -0
  14. package/dist/server/NodeSqliteClient-COEUidVC.mjs +143 -0
  15. package/dist/server/NodeSqliteClient-COEUidVC.mjs.map +1 -0
  16. package/dist/server/SqlError-7DUB2NkG.mjs +43 -0
  17. package/dist/server/SqlError-7DUB2NkG.mjs.map +1 -0
  18. package/dist/server/SqlError-CAzXmpza.cjs +48 -0
  19. package/dist/server/SqlError-CAzXmpza.cjs.map +1 -0
  20. package/dist/server/SqliteClient-BMlcF9O1.cjs +133 -0
  21. package/dist/server/SqliteClient-BMlcF9O1.cjs.map +1 -0
  22. package/dist/server/SqliteClient-MZci3yRi.mjs +129 -0
  23. package/dist/server/SqliteClient-MZci3yRi.mjs.map +1 -0
  24. package/dist/server/index.cjs +96505 -14779
  25. package/dist/server/index.cjs.map +1 -1
  26. package/dist/server/index.mjs +96491 -14777
  27. package/dist/server/index.mjs.map +1 -1
  28. package/dist/server/open-BGXDmMPQ.cjs +501 -0
  29. package/dist/server/open-BGXDmMPQ.cjs.map +1 -0
  30. package/dist/server/open-BvXvp1QV.mjs +492 -0
  31. package/dist/server/open-BvXvp1QV.mjs.map +1 -0
  32. package/package.json +9 -2
  33. package/dist/server/BunPTY-BulfMn1P.cjs.map +0 -1
  34. package/dist/server/BunPTY-Cueq2gzZ.mjs.map +0 -1
  35. package/dist/server/NodePTY-AdcStdsu.mjs.map +0 -1
  36. package/dist/server/NodePTY-DmqnQV86.cjs.map +0 -1
  37. package/dist/server/NodeSqliteClient-BTK-dUey.mjs +0 -156
  38. package/dist/server/NodeSqliteClient-BTK-dUey.mjs.map +0 -1
  39. package/dist/server/NodeSqliteClient-ViK8pcdH.cjs +0 -174
  40. package/dist/server/NodeSqliteClient-ViK8pcdH.cjs.map +0 -1
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # t1code
2
+
3
+ Terminal-first T3 Code fork with an OpenTUI client.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bunx @maria_rcks/t1code
9
+ ```
10
+
11
+ Requires Bun `>=1.3.9`.
12
+
13
+ ## What You Get
14
+
15
+ - Native-feeling terminal UI built on OpenTUI
16
+ - Bundled server and web client for local use
17
+ - Codex-first workflow tuned for terminal usage
18
+
19
+ ## Source
20
+
21
+ - Repo: https://github.com/maria-rcks/t1code
22
+ - Issues: https://github.com/maria-rcks/t1code/issues
23
+
24
+ Based on T3 Code by `@t3dotgg` and `@juliusmarminge`.
package/bin/t1code.js CHANGED
@@ -1,8 +1,42 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
 
3
- import("../dist/index.mjs").catch((error) => {
3
+ import { spawn } from "node:child_process";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const entryPath = fileURLToPath(new URL("../dist/index.mjs", import.meta.url));
7
+
8
+ function printError(error) {
4
9
  process.stderr.write(
5
10
  `${error instanceof Error ? (error.stack ?? error.message) : String(error)}\n`,
6
11
  );
7
- process.exit(1);
8
- });
12
+ }
13
+
14
+ if (process.versions.bun === undefined) {
15
+ const child = spawn("bun", [entryPath, ...process.argv.slice(2)], {
16
+ stdio: "inherit",
17
+ env: process.env,
18
+ });
19
+
20
+ child.once("exit", (code, signal) => {
21
+ if (signal) {
22
+ process.kill(process.pid, signal);
23
+ return;
24
+ }
25
+ process.exit(code ?? 1);
26
+ });
27
+
28
+ child.once("error", (error) => {
29
+ if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
30
+ printError("t1code requires Bun on your PATH to launch the TUI runtime.");
31
+ process.exit(1);
32
+ return;
33
+ }
34
+ printError(error);
35
+ process.exit(1);
36
+ });
37
+ } else {
38
+ import("../dist/index.mjs").catch((error) => {
39
+ printError(error);
40
+ process.exit(1);
41
+ });
42
+ }