@shipstatic/ship 0.9.5 → 0.9.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.
package/README.md CHANGED
@@ -2,23 +2,15 @@
2
2
 
3
3
  CLI and SDK for [ShipStatic](https://shipstatic.com) — deploy static websites, landing pages, and prototypes instantly from the terminal or code.
4
4
 
5
- ## Install
5
+ ## Deploy in seconds — no install, no account
6
6
 
7
7
  ```bash
8
- npm install -g @shipstatic/ship
8
+ npx @shipstatic/ship ./dist
9
9
  ```
10
10
 
11
- > As a project dependency: `npm install @shipstatic/ship`
12
-
13
- ## Deploy — Free, No Account Needed
11
+ That's it. Your site is live on `*.shipstatic.com`. No sign-up, no config, no global install. Got Node? You're ready.
14
12
 
15
- ```bash
16
- ship ./dist
17
- ```
18
-
19
- Your site is live instantly on `*.shipstatic.com`. No API key, no sign-up, no configuration.
20
-
21
- Deployments without an API key are public and expire in 3 days. The output includes a **claim URL** — visit it to keep the site permanently.
13
+ The output includes a **claim URL** — visit it to keep the site permanently. Anonymous deployments are public and expire in 3 days.
22
14
 
23
15
  ```javascript
24
16
  import Ship from '@shipstatic/ship';
@@ -29,6 +21,16 @@ const result = await ship.deploy('./dist');
29
21
  // result.claim → visit to keep permanently
30
22
  ```
31
23
 
24
+ ## Install (optional, for repeat use)
25
+
26
+ ```bash
27
+ npm install -g @shipstatic/ship # global CLI — drop the `npx @shipstatic/ship` prefix
28
+ ```
29
+
30
+ > As a project dependency: `npm install @shipstatic/ship`
31
+ >
32
+ > Every example in this README uses the bare `ship` command. If you haven't installed it globally, prefix any of them with `npx @shipstatic/ship` (or `npx -y @shipstatic/ship` in non-interactive environments).
33
+
32
34
  ## All Commands — Free API Key
33
35
 
34
36
  For permanent deployments and full control over your sites and domains, get a free API key from [my.shipstatic.com/api-key](https://my.shipstatic.com/api-key).
@@ -152,20 +154,40 @@ ship completion uninstall
152
154
 
153
155
  ### Global Flags
154
156
 
157
+ Available on every command:
158
+
155
159
  | Flag | Description |
156
160
  |------|-------------|
157
161
  | `--api-key <key>` | API key for authenticated requests |
158
162
  | `--deploy-token <token>` | Deploy token for single-use deployments |
163
+ | `--api-url <url>` | API URL override (for development) |
159
164
  | `--config <file>` | Custom config file path |
160
- | `--label <label>` | Add label (repeatable) |
161
- | `--password <password>` | Password-protect this deployment |
162
- | `--no-path-detect` | Disable automatic path optimization |
163
- | `--no-spa-detect` | Disable automatic SPA detection |
164
- | `--no-color` | Disable colored output |
165
165
  | `--json` | Output results in JSON format |
166
166
  | `-q, --quiet` | Output only the resource identifier |
167
+ | `--no-color` | Disable colored output |
168
+ | `--help` | Display help for command |
167
169
  | `--version` | Show version information |
168
170
 
171
+ ### Deploy Flags
172
+
173
+ Available on `ship <path>` and `ship deployments upload`:
174
+
175
+ | Flag | Description |
176
+ |------|-------------|
177
+ | `--label <label>` | Add label (repeatable) |
178
+ | `--password <password>` | Password-protect this deployment (6–128 chars) |
179
+ | `--no-path-detect` | Disable automatic path optimization |
180
+ | `--no-spa-detect` | Disable automatic SPA detection |
181
+
182
+ ### CLI Environment Variables
183
+
184
+ | Var | Purpose |
185
+ |---|---|
186
+ | `SHIP_API_KEY` | Default for `--api-key` |
187
+ | `SHIP_DEPLOY_TOKEN` | Default for `--deploy-token` |
188
+ | `SHIP_API_URL` | Default for `--api-url` |
189
+ | `SHIP_PASSWORD` | Default for `--password` (empty string normalized to absence) |
190
+
169
191
  ## SDK Reference
170
192
 
171
193
  ### Authentication
@@ -193,11 +215,13 @@ ship.deploy(input, {
193
215
  password?: string, // Password-protect the deployment (6–128 chars)
194
216
  onProgress?: ({ percent }) => void,
195
217
  signal?: AbortSignal,
218
+ onCancel?: () => void, // Called if signal aborts
196
219
  pathDetect?: boolean, // Auto-optimize paths (default: true)
197
220
  spaDetect?: boolean, // Auto-detect SPA (default: true)
198
221
  maxConcurrency?: number, // Concurrent uploads (default: 4)
199
222
  timeout?: number, // Request timeout in ms
200
223
  via?: string, // Client identifier
224
+ apiUrl?: string, // Per-request API URL override
201
225
  apiKey?: string, // Per-request API key override
202
226
  deployToken?: string, // Per-request deploy token override
203
227
  });
package/SKILL.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ship
3
3
  description: "Deploy static websites to ShipStatic. Use when the user wants to deploy a site, publish a website, upload to hosting, go live, set up a custom domain, manage deployments, or share a site URL. No account required — instant deployment. CLI (`ship`) and Node.js/browser SDK."
4
- compatibility: "Node.js >= 20. Install globally via npm: npm install -g @shipstatic/ship"
4
+ compatibility: "Node.js >= 20. Run via npx (no install) or install globally: npm install -g @shipstatic/ship"
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -17,6 +17,18 @@ metadata:
17
17
 
18
18
  Deploy static sites. No account, no config — just ship it.
19
19
 
20
+ ## No-install usage (recommended for agents)
21
+
22
+ You don't need to install anything. Run any command via `npx`:
23
+
24
+ ```bash
25
+ npx -y @shipstatic/ship ./dist # deploy (shortcut)
26
+ npx -y @shipstatic/ship deployments list # any subcommand works the same
27
+ npx -y @shipstatic/ship domains set www.example.com # ...
28
+ ```
29
+
30
+ `-y` skips the install prompt — important for non-interactive runtimes (CI, sandboxes, agent containers). Every example below uses the bare `ship` command for readability; substitute `npx -y @shipstatic/ship` if it isn't installed globally.
31
+
20
32
  ## Deploy
21
33
 
22
34
  ```bash
@@ -40,10 +52,12 @@ ship ./dist --json
40
52
  ```json
41
53
  {
42
54
  "deployment": "happy-cat-abc1234.shipstatic.com",
55
+ "url": "https://happy-cat-abc1234.shipstatic.com",
43
56
  "files": 12,
44
57
  "size": 348160,
45
58
  "status": "success",
46
59
  "config": false,
60
+ "password": false,
47
61
  "labels": [],
48
62
  "via": "cli",
49
63
  "created": 1743552000,
@@ -52,7 +66,7 @@ ship ./dist --json
52
66
  }
53
67
  ```
54
68
 
55
- `claim` and `expires` only appear without credentials. With an API key, deployments are permanent.
69
+ `claim` only appears on the initial deploy without credentials. `expires` is `null` for authenticated (permanent) deploys. `config: true` indicates a `ship.json` is present in the deployment; `password: true` indicates the deployment is password-protected.
56
70
 
57
71
  ### Piping
58
72
 
@@ -156,6 +170,7 @@ ship domains set www.example.com <dep> --json
156
170
  ```json
157
171
  {
158
172
  "domain": "www.example.com",
173
+ "url": "https://www.example.com",
159
174
  "deployment": "happy-cat-abc1234.shipstatic.com",
160
175
  "status": "pending",
161
176
  "labels": [],
@@ -274,5 +289,7 @@ ship tokens remove <token> # Revoke
274
289
  | `not found` | No such resource | Verify the ID/name |
275
290
  | `path does not exist` | Bad deploy path | Check file/directory |
276
291
  | `invalid domain name` | Not a subdomain | Use `www.example.com`, not `example.com` |
292
+ | `<resource> limit reached` | Plan caps hit (deployments, domains) | Suggest upgrading the plan; do not retry |
293
+ | `Account has been deleted` / `Account terminated` | Account is gone | Stop; the account cannot deploy |
277
294
  | `DNS information is only available for external domains` | DNS op on internal domain | Only custom domains need DNS |
278
295
  | `DNS verification already requested recently` | Rate limited | Wait |
package/dist/browser.d.ts CHANGED
@@ -119,9 +119,14 @@ interface ShipClientOptions {
119
119
  * Used by orchestrators (e.g. n8n nodes processing many tenants from one
120
120
  * worker) so the API's rate-limit bucket keys per caller rather than per
121
121
  * shared IP. **Programmatic-only by design** — there is no `--caller`
122
- * CLI flag because the CLI is a single-user tool (`via: 'cli'` is hardcoded
123
- * in `performDeploy`); every CLI invocation belongs to one human, and
124
- * a per-tenant rate-limit bucket would defeat the purpose.
122
+ * CLI flag because every CLI invocation belongs to one human; a per-tenant
123
+ * rate-limit bucket would defeat the purpose.
124
+ *
125
+ * Distinct from `via` (the client identifier — `'cli'`, `'sdk'`, `'web'`,
126
+ * `'git'`, etc.). `via` is for analytics/origin tracking and is
127
+ * env-overridable via `SHIP_VIA` for integrations that wrap the CLI
128
+ * (GitHub Action, MCP). `caller` is for rate-limit isolation and stays
129
+ * programmatic-only.
125
130
  */
126
131
  caller?: string | undefined;
127
132
  /**