connectbase-client 0.1.2 → 0.1.3

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 (3) hide show
  1. package/README.md +77 -0
  2. package/dist/cli.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -51,6 +51,83 @@ const state = await gameClient.createRoom({
51
51
  - **Push Notifications**: Cross-platform push notification support
52
52
  - **WebRTC**: Real-time audio/video communication
53
53
  - **Payments**: Subscription and one-time payment support
54
+ - **CLI**: Command-line tool for deploying web storage
55
+
56
+ ## CLI
57
+
58
+ Deploy your web application to Connect Base Web Storage with a single command.
59
+
60
+ ### Basic Usage
61
+
62
+ ```bash
63
+ # Deploy a directory
64
+ npx connectbase-client deploy ./dist -s <storage-id> -k <api-key>
65
+
66
+ # Deploy current directory
67
+ npx connectbase-client deploy . -s <storage-id> -k <api-key>
68
+ ```
69
+
70
+ ### Options
71
+
72
+ | Option | Alias | Description |
73
+ |--------|-------|-------------|
74
+ | `--storage <id>` | `-s` | Storage ID (required) |
75
+ | `--api-key <key>` | `-k` | API Key (required) |
76
+ | `--base-url <url>` | `-u` | Custom server URL |
77
+ | `--help` | `-h` | Show help |
78
+ | `--version` | `-v` | Show version |
79
+
80
+ ### Environment Variables
81
+
82
+ You can set credentials via environment variables:
83
+
84
+ ```bash
85
+ export CONNECTBASE_API_KEY=your-api-key
86
+ export CONNECTBASE_STORAGE_ID=your-storage-id
87
+
88
+ # Then deploy without options
89
+ npx connectbase-client deploy ./dist
90
+ ```
91
+
92
+ ### Configuration File
93
+
94
+ Create a `.connectbaserc` file in your project root:
95
+
96
+ ```json
97
+ {
98
+ "apiKey": "your-api-key",
99
+ "storageId": "your-storage-id"
100
+ }
101
+ ```
102
+
103
+ Then deploy:
104
+
105
+ ```bash
106
+ npx connectbase-client deploy ./dist
107
+ ```
108
+
109
+ ### npm Scripts
110
+
111
+ Add to your `package.json`:
112
+
113
+ ```json
114
+ {
115
+ "scripts": {
116
+ "deploy": "connectbase-client deploy ./dist"
117
+ }
118
+ }
119
+ ```
120
+
121
+ Then run:
122
+
123
+ ```bash
124
+ npm run deploy
125
+ ```
126
+
127
+ ### Requirements
128
+
129
+ - `index.html` must exist in the root of the deploy directory
130
+ - Supported file types: `.html`, `.css`, `.js`, `.json`, `.svg`, `.png`, `.jpg`, `.gif`, `.webp`, `.woff`, `.woff2`, `.ttf`, `.mp3`, `.mp4`, `.pdf`, `.wasm`, etc.
54
131
 
55
132
  ## API Reference
56
133
 
package/dist/cli.js CHANGED
@@ -29,7 +29,7 @@ var fs = __toESM(require("fs"));
29
29
  var path = __toESM(require("path"));
30
30
  var https = __toESM(require("https"));
31
31
  var http = __toESM(require("http"));
32
- var VERSION = "0.1.2";
32
+ var VERSION = "0.1.3";
33
33
  var DEFAULT_BASE_URL = "https://api.connectbase.world";
34
34
  var colors = {
35
35
  reset: "\x1B[0m",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectbase-client",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Connect Base JavaScript/TypeScript SDK for browser and Node.js",
5
5
  "repository": {
6
6
  "type": "git",