@shipstatic/ship 2.0.0-beta.1 → 2.0.0-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 CHANGED
@@ -49,18 +49,20 @@ const ship = new Ship({ token: 'ship-...' });
49
49
  ship ./dist # Deploy (shortcut)
50
50
  ship ./dist --label production --label v1.0.0 # Deploy with labels
51
51
  ship deployments list
52
+ ship deployments list --limit 20 # Page size; a hint shows the next cursor
53
+ ship deployments list --cursor <cursor> # Continue from a previous page
52
54
  ship deployments get <deployment>
53
55
  ship deployments set <deployment> --label production
54
- ship deployments remove <deployment>
56
+ ship deployments delete <deployment>
55
57
  ```
56
58
 
57
59
  ```typescript
58
60
  ship.deploy(input, options?) // Shortcut for deployments.upload()
59
61
  ship.deployments.upload(input, options?)
60
- ship.deployments.list()
62
+ ship.deployments.list(options?) // { limit?, cursor? } — response carries the next cursor
61
63
  ship.deployments.get(deployment)
62
64
  ship.deployments.set(deployment, { labels })
63
- ship.deployments.remove(deployment)
65
+ ship.deployments.delete(deployment)
64
66
  ```
65
67
 
66
68
  ### Domains
@@ -70,25 +72,25 @@ ship domains set www.example.com # Reserve domain (no deployme
70
72
  ship domains set www.example.com <deployment> # Link domain to deployment
71
73
  ship domains set www.example.com --label prod # Update labels only
72
74
  ship domains get www.example.com
73
- ship domains list
75
+ ship domains list # --limit / --cursor paginate here too
74
76
  ship domains validate www.example.com
75
77
  ship domains verify www.example.com
76
78
  ship domains records www.example.com
77
79
  ship domains dns www.example.com
78
80
  ship domains share www.example.com
79
- ship domains remove www.example.com
81
+ ship domains delete www.example.com
80
82
  ```
81
83
 
82
84
  ```typescript
83
85
  ship.domains.set(name, { deployment?, labels? }) // Upsert — create, repoint, or label
84
86
  ship.domains.get(name)
85
- ship.domains.list()
87
+ ship.domains.list(options?) // { limit?, cursor? }
86
88
  ship.domains.validate(name)
87
89
  ship.domains.verify(name)
88
90
  ship.domains.records(name)
89
91
  ship.domains.dns(name)
90
92
  ship.domains.share(name)
91
- ship.domains.remove(name)
93
+ ship.domains.delete(name)
92
94
  ```
93
95
 
94
96
  `domains.set()` is a merge-upsert — omitted fields are preserved on update, defaulted on create. Once linked, a domain cannot be unlinked (`{ deployment: null }` → 400). Switch deployments or delete the domain instead.
@@ -105,26 +107,29 @@ ship.domains.set('www.münchen.de'); // → Unicode supported
105
107
  ```bash
106
108
  ship tokens create --ttl 3600 --label ci
107
109
  ship tokens list
108
- ship tokens remove <token>
110
+ ship tokens get <token>
111
+ ship tokens delete <token>
109
112
  ```
110
113
 
111
114
  ```typescript
112
115
  ship.tokens.create({ ttl?, labels? })
113
116
  ship.tokens.list()
114
- ship.tokens.remove(token)
117
+ ship.tokens.get(token)
118
+ ship.tokens.delete(token)
115
119
  ```
116
120
 
117
121
  ### Account
118
122
 
119
123
  ```bash
120
124
  ship whoami
125
+ ship account get
121
126
  ship config
122
127
  ship ping
123
128
  ```
124
129
 
125
130
  ```typescript
126
131
  ship.account.get() // → whoami
127
- ship.ping() // → boolean
132
+ ship.ping() // → { timestamp } (server clock; reachability is the absence of a throw)
128
133
  ship.getLimits() // → platform plan limits (cached)
129
134
  ```
130
135
 
@@ -141,8 +146,8 @@ ship ./dist -q | ship domains set www.example.com
141
146
  # Deploy and open in browser
142
147
  open https://$(ship ./dist -q)
143
148
 
144
- # Batch remove all deployments
145
- ship deployments list -q | xargs -I{} ship deployments remove {} -q
149
+ # Batch delete all deployments
150
+ ship deployments list -q | xargs -I{} ship deployments delete {} -q
146
151
  ```
147
152
 
148
153
  ### Shell Completion
@@ -164,8 +169,8 @@ Available on every command:
164
169
  | `--json` | Output results in JSON format |
165
170
  | `-q, --quiet` | Output only the resource identifier |
166
171
  | `--no-color` | Disable colored output |
167
- | `--help` | Display help for command |
168
- | `--version` | Show version information |
172
+ | `-h, --help` | Display help for command |
173
+ | `-V, --version` | Show version information |
169
174
 
170
175
  ### Deploy Flags
171
176
 
@@ -219,13 +224,9 @@ ship.setToken('ship-...');
219
224
  ship.deploy(input, {
220
225
  labels?: string[],
221
226
  password?: string, // Password-protect the deployment (6–128 chars)
222
- onProgress?: ({ percent }) => void,
223
- signal?: AbortSignal,
224
- onCancel?: () => void, // Called if signal aborts
227
+ signal?: AbortSignal, // Abort to cancel the deploy
225
228
  pathDetect?: boolean, // Auto-optimize paths (default: true)
226
229
  spaDetect?: boolean, // Auto-detect SPA (default: true)
227
- maxConcurrency?: number, // Concurrent uploads (default: 4)
228
- timeout?: number, // Request timeout in ms
229
230
  via?: string, // Client identifier
230
231
  });
231
232
  ```
@@ -273,6 +274,8 @@ ship.off('request', handler);
273
274
 
274
275
  Pass `fetch` to override the transport function used for every API call. Defaults to `globalThis.fetch`. Useful for wrapping requests with tracing, retries, or request signing, and for injecting a Cloudflare service-binding `Fetcher` from a Worker so calls reach a sibling Worker in-process instead of through the public hostname.
275
276
 
277
+ This is also the seam for corporate proxies: Node's built-in `fetch` ignores `HTTP(S)_PROXY` environment variables, so behind a proxy inject a proxy-aware transport (e.g. [undici](https://github.com/nodejs/undici)'s `EnvHttpProxyAgent` as the dispatcher, or Node 24+'s `NODE_USE_ENV_PROXY=1`).
278
+
276
279
  ```typescript
277
280
  import type { Fetch } from '@shipstatic/ship';
278
281
 
package/SKILL.md CHANGED
@@ -225,7 +225,7 @@ Every command supports three modes:
225
225
 
226
226
  Errors go to stderr in all modes. Exit 0 = success, 1 = error.
227
227
 
228
- List commands return `{"<resource>s": [...], "cursor": null, "total": N}`. `domains list` text mode omits status — use `--json` to see `pending` vs `success`.
228
+ List commands return `{"<resource>s": [...], "cursor": null}`. A non-null `cursor` means more pages remain — pass it back with `--cursor` to continue, and size pages with `--limit`. There is no total; a count is an aggregate over a collection, not a property of one page. `domains list` text mode omits status — use `--json` to see `pending` vs `success`.
229
229
 
230
230
  ## Commands
231
231
 
@@ -237,7 +237,7 @@ ship deployments upload <path> # Deploy (explicit)
237
237
  ship deployments list # List all
238
238
  ship deployments get <deployment> # Details
239
239
  ship deployments set <deployment> # Update labels (--label)
240
- ship deployments remove <deployment> # Delete (async)
240
+ ship deployments delete <deployment> # Delete (async)
241
241
  ```
242
242
 
243
243
  ### Domains
@@ -251,7 +251,7 @@ ship domains records <name> # Required DNS records
251
251
  ship domains dns <name> # DNS provider lookup
252
252
  ship domains share <name> # Shareable setup link
253
253
  ship domains verify <name> # Trigger DNS verification
254
- ship domains remove <name> # Delete
254
+ ship domains delete <name> # Delete
255
255
  ```
256
256
 
257
257
  ### Account & Tokens
@@ -262,7 +262,8 @@ ship ping # Connectivity check
262
262
  ship tokens create # New deploy token (shown once)
263
263
  ship tokens create --ttl 3600 # With expiry (seconds)
264
264
  ship tokens list # List tokens
265
- ship tokens remove <token> # Revoke
265
+ ship tokens get <token> # Details for one token
266
+ ship tokens delete <token> # Delete (revokes immediately)
266
267
  ```
267
268
 
268
269
  ## Flags