@leynier/ccst 0.5.2 → 0.7.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/AGENTS.md CHANGED
@@ -1,105 +1,105 @@
1
- Default to using Bun instead of Node.js.
2
-
3
- - Use `bun <file>` instead of `node <file>` or `ts-node <file>`
4
- - Use `bun test` instead of `jest` or `vitest`
5
- - Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
6
- - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
7
- - Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
8
- - Use `bunx <package> <command>` instead of `npx <package> <command>`
9
- - Bun automatically loads .env, so don't use dotenv.
10
-
11
- ## APIs
12
-
13
- - `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
14
- - `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
15
- - `Bun.redis` for Redis. Don't use `ioredis`.
16
- - `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
17
- - `WebSocket` is built-in. Don't use `ws`.
18
- - Prefer `Bun.file` over `node:fs`'s readFile/writeFile
19
- - Bun.$`ls` instead of execa.
20
-
21
- ## Testing
22
-
23
- Use `bun test` to run tests.
24
-
25
- ```ts#index.test.ts
26
- import { test, expect } from "bun:test";
27
-
28
- test("hello world", () => {
29
- expect(1).toBe(1);
30
- });
31
- ```
32
-
33
- ## Frontend
34
-
35
- Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
36
-
37
- Server:
38
-
39
- ```ts#index.ts
40
- import index from "./index.html"
41
-
42
- Bun.serve({
43
- routes: {
44
- "/": index,
45
- "/api/users/:id": {
46
- GET: (req) => {
47
- return new Response(JSON.stringify({ id: req.params.id }));
48
- },
49
- },
50
- },
51
- // optional websocket support
52
- websocket: {
53
- open: (ws) => {
54
- ws.send("Hello, world!");
55
- },
56
- message: (ws, message) => {
57
- ws.send(message);
58
- },
59
- close: (ws) => {
60
- // handle close
61
- }
62
- },
63
- development: {
64
- hmr: true,
65
- console: true,
66
- }
67
- })
68
- ```
69
-
70
- HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
71
-
72
- ```html#index.html
73
- <html>
74
- <body>
75
- <h1>Hello, world!</h1>
76
- <script type="module" src="./frontend.tsx"></script>
77
- </body>
78
- </html>
79
- ```
80
-
81
- With the following `frontend.tsx`:
82
-
83
- ```tsx#frontend.tsx
84
- import React from "react";
85
- import { createRoot } from "react-dom/client";
86
-
87
- // import .css files directly and it works
88
- import './index.css';
89
-
90
- const root = createRoot(document.body);
91
-
92
- export default function Frontend() {
93
- return <h1>Hello, world!</h1>;
94
- }
95
-
96
- root.render(<Frontend />);
97
- ```
98
-
99
- Then, run index.ts
100
-
101
- ```sh
102
- bun --hot ./index.ts
103
- ```
104
-
105
- For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
1
+ Default to using Bun instead of Node.js.
2
+
3
+ - Use `bun <file>` instead of `node <file>` or `ts-node <file>`
4
+ - Use `bun test` instead of `jest` or `vitest`
5
+ - Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
6
+ - Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
7
+ - Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
8
+ - Use `bunx <package> <command>` instead of `npx <package> <command>`
9
+ - Bun automatically loads .env, so don't use dotenv.
10
+
11
+ ## APIs
12
+
13
+ - `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
14
+ - `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
15
+ - `Bun.redis` for Redis. Don't use `ioredis`.
16
+ - `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
17
+ - `WebSocket` is built-in. Don't use `ws`.
18
+ - Prefer `Bun.file` over `node:fs`'s readFile/writeFile
19
+ - Bun.$`ls` instead of execa.
20
+
21
+ ## Testing
22
+
23
+ Use `bun test` to run tests.
24
+
25
+ ```ts#index.test.ts
26
+ import { test, expect } from "bun:test";
27
+
28
+ test("hello world", () => {
29
+ expect(1).toBe(1);
30
+ });
31
+ ```
32
+
33
+ ## Frontend
34
+
35
+ Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
36
+
37
+ Server:
38
+
39
+ ```ts#index.ts
40
+ import index from "./index.html"
41
+
42
+ Bun.serve({
43
+ routes: {
44
+ "/": index,
45
+ "/api/users/:id": {
46
+ GET: (req) => {
47
+ return new Response(JSON.stringify({ id: req.params.id }));
48
+ },
49
+ },
50
+ },
51
+ // optional websocket support
52
+ websocket: {
53
+ open: (ws) => {
54
+ ws.send("Hello, world!");
55
+ },
56
+ message: (ws, message) => {
57
+ ws.send(message);
58
+ },
59
+ close: (ws) => {
60
+ // handle close
61
+ }
62
+ },
63
+ development: {
64
+ hmr: true,
65
+ console: true,
66
+ }
67
+ })
68
+ ```
69
+
70
+ HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
71
+
72
+ ```html#index.html
73
+ <html>
74
+ <body>
75
+ <h1>Hello, world!</h1>
76
+ <script type="module" src="./frontend.tsx"></script>
77
+ </body>
78
+ </html>
79
+ ```
80
+
81
+ With the following `frontend.tsx`:
82
+
83
+ ```tsx#frontend.tsx
84
+ import React from "react";
85
+ import { createRoot } from "react-dom/client";
86
+
87
+ // import .css files directly and it works
88
+ import './index.css';
89
+
90
+ const root = createRoot(document.body);
91
+
92
+ export default function Frontend() {
93
+ return <h1>Hello, world!</h1>;
94
+ }
95
+
96
+ root.render(<Frontend />);
97
+ ```
98
+
99
+ Then, run index.ts
100
+
101
+ ```sh
102
+ bun --hot ./index.ts
103
+ ```
104
+
105
+ For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
package/CLAUDE.md CHANGED
@@ -1 +1 @@
1
- @./AGENTS.md
1
+ @./AGENTS.md
package/GEMINI.md CHANGED
@@ -1 +1 @@
1
- @./AGENTS.md
1
+ @./AGENTS.md
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Leynier Gutiérrez González
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Leynier Gutiérrez González
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leynier/ccst",
3
- "version": "0.5.2",
3
+ "version": "0.7.0",
4
4
  "description": "Claude Code Switch Tools for managing contexts",
5
5
  "keywords": [
6
6
  "claude",
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "commander": "^12.1.0",
35
+ "get-port": "^7.1.0",
35
36
  "jszip": "^3.10.1",
36
37
  "picocolors": "^1.1.0"
37
38
  },
@@ -56,4 +57,4 @@
56
57
  "publishConfig": {
57
58
  "access": "public"
58
59
  }
59
- }
60
+ }