shipstatic 1.1.1 → 1.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 (2) hide show
  1. package/README.md +28 -54
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,90 +1,64 @@
1
1
  # shipstatic
2
2
 
3
- Deploy static websites, landing pages, and prototypes instantlyfrom the terminal or from code.
3
+ > **The package you're looking for is [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship)** that's where the code and the full documentation live.
4
+ >
5
+ > This is an alias for it, so a guess at the unscoped name doesn't dead-end. **Use it directly** — `npx shipstatic` runs the same binary, `import Ship from 'shipstatic'` resolves to the same module. Nothing to switch to.
4
6
 
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.
7
+ Deploy a static site from the terminal or from code.
6
8
 
7
- ## Deploy in seconds — no install, no account
9
+ ## Deploy
8
10
 
9
11
  ```bash
10
12
  npx shipstatic ./dist
11
13
  ```
12
14
 
13
- That's it. Your site is live on `*.shipstatic.com`. No sign-up, no config, no global install. Got Node? You're ready.
15
+ **No account, no API key, no config, no install.** This works in a fresh sandbox with no secrets set.
14
16
 
15
- A single file works the same way:
17
+ Point it at your **built output** — `./dist`, `./build`, `./out` — not your project root. Build first if the project needs it. A single file works too:
16
18
 
17
19
  ```bash
18
20
  npx shipstatic ./index.html
19
21
  ```
20
22
 
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**.
23
+ **What you get back:** the live URL, plus a **claim URL**.
22
24
 
23
- ## Password-protect a deployment
25
+ > Anonymous deployments are **public** and **expire in 3 days**. The claim URL is how one becomes permanent — surface it to whoever asked for the deploy.
24
26
 
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"
33
- ```
27
+ ## Common tasks
34
28
 
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
- ```
29
+ | Goal | Command |
30
+ |---|---|
31
+ | Deploy a folder | `npx shipstatic ./dist` |
32
+ | Deploy one file | `npx shipstatic ./index.html` |
33
+ | Password-protect it | `npx shipstatic ./dist --password "secret"` |
34
+ | Machine-readable output | `npx shipstatic ./dist --json` |
35
+ | Keep the password out of logs | `SHIP_PASSWORD="secret" npx shipstatic ./dist` |
36
+ | Repeat use | `npm install -g shipstatic` → the `ship` command |
40
37
 
41
38
  ## For scripts and agents
42
39
 
43
- Add `--json` to any command for machine-readable output — on success **and** on failure:
44
-
45
40
  ```bash
46
41
  npx shipstatic ./dist --json
47
42
  ```
48
43
 
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.
44
+ - **`--json`** emits machine-readable output on success **and** on failure.
45
+ - **Exit code** is `0` on success, non-zero on failure. Branch on it, not on the text.
46
+ - **Errors** carry a stable `error` type and `status`. Branch on those, never on the message string.
47
+ - **`--no-color`** is honoured; colour is off automatically when stdout is not a TTY.
48
+ - **`SHIP_PASSWORD`** supplies `--password` from the environment.
55
49
 
56
- ## Install (optional, for repeat use)
50
+ Deploying needs no credentials, so there is nothing to configure before the first run and nothing to leak in a log.
57
51
 
58
- ```bash
59
- npm install -g shipstatic # global CLI — provides the `ship` command
60
- ```
61
-
62
- > The command is **`ship`**, matching `@shipstatic/ship` exactly. As a project dependency: `npm install shipstatic`.
63
-
64
- ## Use it as an SDK
52
+ ## From code
65
53
 
66
54
  ```javascript
67
55
  import Ship from 'shipstatic';
68
56
 
69
- const ship = new Ship();
70
- const result = await ship.deploy('./dist');
57
+ const result = await new Ship().deploy('./dist');
71
58
  // result.deployment → live URL
72
59
  // result.claim → visit to keep permanently
73
60
  ```
74
61
 
75
- `shipstatic` and `@shipstatic/ship` resolve to the **same module**, so importing either name gives you the identical class:
76
-
77
- ```javascript
78
- import Ship from 'shipstatic'; // these are
79
- import Ship from '@shipstatic/ship'; // the same thing
80
- ```
81
-
82
- ## Everything else
83
-
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)**.
85
-
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.
87
-
88
- ## License
62
+ ## Full documentation
89
63
 
90
- MIT
64
+ Custom domains, API keys, deploy tokens, managing deployments, the complete SDK reference — **[`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship)**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipstatic",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
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",