simplecloud 0.0.1-beta.10
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/README.md +123 -0
- package/dist/cli.js +379 -0
- package/dist/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/index.js +405 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# SimpleCloud CLI
|
|
2
|
+
|
|
3
|
+
A command-line interface tool for SimpleCloud.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js >= 18.0.0
|
|
10
|
+
- Bun (for development)
|
|
11
|
+
|
|
12
|
+
### Setup
|
|
13
|
+
|
|
14
|
+
Install dependencies:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bun install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Development
|
|
21
|
+
|
|
22
|
+
**Development Watcher (Recommended)**
|
|
23
|
+
|
|
24
|
+
Run with automatic rebuilding on file changes:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bun run dev
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This will:
|
|
31
|
+
- 🔧 Start a file watcher
|
|
32
|
+
- 📁 Watch all `.ts` files in `src/`
|
|
33
|
+
- 🔄 Automatically rebuild `dist/` on changes
|
|
34
|
+
- ⚡ Debounced builds (300ms delay)
|
|
35
|
+
- 🛑 Stop with `Ctrl+C`
|
|
36
|
+
|
|
37
|
+
**Local Package Testing**
|
|
38
|
+
|
|
39
|
+
Create a local package file for testing:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bun run local:pack # Creates temp/simplecloud.tgz (no version in filename)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Building
|
|
46
|
+
|
|
47
|
+
Build the CLI for distribution:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bun run build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This creates optimized, minified bundles in the `dist/` folder that include all dependencies.
|
|
54
|
+
|
|
55
|
+
### Testing
|
|
56
|
+
|
|
57
|
+
Test the built CLI:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bun run test:cli
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Test specific commands:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
node dist/cli.js --help
|
|
67
|
+
node dist/cli.js start group test
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Local Development
|
|
71
|
+
|
|
72
|
+
**Option 1: Shell Alias (Recommended - No Conflicts)**
|
|
73
|
+
|
|
74
|
+
Create a local `scl` alias that points to your development build:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bun run local:setup # Creates 'scl' alias in ~/.zshrc
|
|
78
|
+
source ~/.zshrc # Reload shell config
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Now you can use `scl` for local testing without conflicting with published versions:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
scl --help # Local development
|
|
85
|
+
scl start group mygroup
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Pro Tip**: Run `bun run dev` in one terminal and use `scl` commands in another terminal for seamless development with auto-rebuilding!
|
|
89
|
+
|
|
90
|
+
**Option 2: npm link (Development Symlink)**
|
|
91
|
+
|
|
92
|
+
Creates symlinks to global npm location (uses same command names):
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bun run local:link # Link for development
|
|
96
|
+
bun run local:unlink # Unlink when done
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Option 3: Direct Execution**
|
|
100
|
+
|
|
101
|
+
Run the built CLI directly:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
bun run build
|
|
105
|
+
node dist/cli.js --help
|
|
106
|
+
node dist/cli.js start group mygroup
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Generating API
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
bunx swagger-typescript-api generate -p swagger.yaml -o src/lib/generated -n simplecloud-api.ts --sort-types --single-http-client --clean-output
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## Publishing to npm
|
|
117
|
+
|
|
118
|
+
1. Update the version in `package.json`
|
|
119
|
+
2. Update author, repository, and other metadata fields
|
|
120
|
+
3. Ensure you're logged into npm: `npm login`
|
|
121
|
+
4. Publish: `npm publish`
|
|
122
|
+
|
|
123
|
+
The `prepublishOnly` script will automatically build the project before publishing.
|