shipstatic 1.1.0 → 1.1.1

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 (2) hide show
  1. package/README.md +57 -18
  2. package/package.json +6 -2
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # shipstatic
2
2
 
3
- CLI and SDK for [ShipStatic](https://shipstatic.com) — deploy static websites, landing pages, and prototypes instantly from the terminal or code.
3
+ Deploy static websites, landing pages, and prototypes instantly from the terminal or from code.
4
+
5
+ > **Looking for the main package?** This is the unscoped alias for **[`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship)** — same CLI, same SDK, shorter name. The full documentation lives there.
4
6
 
5
7
  ## Deploy in seconds — no install, no account
6
8
 
@@ -10,41 +12,78 @@ npx shipstatic ./dist
10
12
 
11
13
  That's it. Your site is live on `*.shipstatic.com`. No sign-up, no config, no global install. Got Node? You're ready.
12
14
 
13
- The output includes a **claim URL** — visit it to keep the site permanently. Anonymous deployments are public and expire in 3 days.
15
+ A single file works the same way:
14
16
 
15
- ```javascript
16
- import Ship from 'shipstatic';
17
+ ```bash
18
+ npx shipstatic ./index.html
19
+ ```
17
20
 
18
- const ship = new Ship();
19
- const result = await ship.deploy('./dist');
20
- // result.deployment live URL (happy-cat-abc1234.shipstatic.com)
21
- // result.claim → visit to keep permanently
21
+ **What comes back:** the live URL, plus a **claim URL** — visit it to keep the site permanently. Anonymous deployments are **public** and **expire in 3 days**.
22
+
23
+ ## Password-protect a deployment
24
+
25
+ ```bash
26
+ npx shipstatic ./dist --password "correct-horse-battery-staple"
27
+ ```
28
+
29
+ Visitors are prompted before the site is served. Works on a single file too:
30
+
31
+ ```bash
32
+ npx shipstatic ./index.html --password "correct-horse-battery-staple"
22
33
  ```
23
34
 
35
+ The password can also come from the environment, which keeps it out of your shell history and CI logs:
36
+
37
+ ```bash
38
+ SHIP_PASSWORD="correct-horse-battery-staple" npx shipstatic ./dist
39
+ ```
40
+
41
+ ## For scripts and agents
42
+
43
+ Add `--json` to any command for machine-readable output — on success **and** on failure:
44
+
45
+ ```bash
46
+ npx shipstatic ./dist --json
47
+ ```
48
+
49
+ - **Exit code** is `0` on success, non-zero on failure — branch on it, not on the text.
50
+ - **Errors** are JSON too under `--json`, carrying a stable `error` type and `status`. Branch on those, never on the message string.
51
+ - **`--no-color`** is honoured, and colour is disabled automatically when output is not a TTY.
52
+ - **`SHIP_PASSWORD`** sets `--password` from the environment.
53
+
54
+ Deploying anonymously needs no credentials at all — which is what makes `npx shipstatic ./dist` safe to run in a sandbox with no secrets configured. Just remember such deployments are public and expire in 3 days; the claim URL in the output is how they become permanent.
55
+
24
56
  ## Install (optional, for repeat use)
25
57
 
26
58
  ```bash
27
- npm install -g shipstatic # global CLI — the `ship` command
59
+ npm install -g shipstatic # global CLI — provides the `ship` command
28
60
  ```
29
61
 
30
- > As a project dependency: `npm install shipstatic`
62
+ > The command is **`ship`**, matching `@shipstatic/ship` exactly. As a project dependency: `npm install shipstatic`.
63
+
64
+ ## Use it as an SDK
31
65
 
32
- ## What this package is
66
+ ```javascript
67
+ import Ship from 'shipstatic';
33
68
 
34
- `shipstatic` is the unscoped name for [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship). It forwards to that package and has **no API of its own** — same CLI, same SDK, shorter name.
69
+ const ship = new Ship();
70
+ const result = await ship.deploy('./dist');
71
+ // result.deployment → live URL
72
+ // result.claim → visit to keep permanently
73
+ ```
35
74
 
36
- The two are interchangeable. Install whichever name you prefer; both resolve to the same implementation, so nothing behaves differently:
75
+ `shipstatic` and `@shipstatic/ship` resolve to the **same module**, so importing either name gives you the identical class:
37
76
 
38
77
  ```javascript
39
- import Ship from 'shipstatic'; // these are
40
- import Ship from '@shipstatic/ship'; // the same thing
78
+ import Ship from 'shipstatic'; // these are
79
+ import Ship from '@shipstatic/ship'; // the same thing
41
80
  ```
42
81
 
43
- ## Documentation
82
+ ## Everything else
44
83
 
45
- Every command, SDK method, authentication mode, and custom-domain flow is documented **once**, in [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship).
84
+ Custom domains, API keys, deploy tokens, deployment management, the full SDK reference — all documented once, in **[`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship)**.
46
85
 
47
- This README deliberately does not restate any of it. A forwarder that copies its target's documentation is just a second copy to keep true — and the day it stops being true, it is worse than no documentation at all.
86
+ This README deliberately covers only the quickstart. A forwarder that copies its target's documentation is just a second copy to keep true — and the day it stops being true, it is worse than no documentation at all.
48
87
 
49
88
  ## License
50
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipstatic",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "CLI and SDK for ShipStatic — deploy static websites, landing pages, and prototypes instantly. The unscoped name for @shipstatic/ship.",
5
5
  "keywords": [
6
6
  "shipstatic",
@@ -69,5 +69,9 @@
69
69
  "@biomejs/biome": "2.5.5",
70
70
  "publint": "^0.3.12",
71
71
  "vitest": "^4.1.10"
72
- }
72
+ },
73
+ "bugs": {
74
+ "url": "https://github.com/shipstatic/ship/issues"
75
+ },
76
+ "author": "ShipStatic"
73
77
  }