shipstatic 1.1.2 → 1.2.0
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 +36 -48
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,87 +1,75 @@
|
|
|
1
1
|
# shipstatic
|
|
2
2
|
|
|
3
|
-
**The package you're looking for is [`@shipstatic/ship`](https://www.npmjs.com/package/@shipstatic/ship)
|
|
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
|
-
|
|
7
|
+
Deploy a static site from the terminal or from code.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Deploy in seconds — no install, no account
|
|
10
|
-
|
|
11
|
-
Put a static site, landing page, or prototype online:
|
|
9
|
+
## Deploy
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
12
|
npx shipstatic ./dist
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
**No account, no API key, no config, no install.** This works in a fresh sandbox with no secrets set.
|
|
18
16
|
|
|
19
|
-
A single file works
|
|
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:
|
|
20
18
|
|
|
21
19
|
```bash
|
|
22
20
|
npx shipstatic ./index.html
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
**What
|
|
23
|
+
**What you get back:** the live URL, plus a **claim URL**.
|
|
26
24
|
|
|
27
|
-
|
|
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.
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
npx shipstatic ./dist --password "correct-horse-battery-staple"
|
|
31
|
-
```
|
|
27
|
+
## Auth — deploy needs none, everything else does
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
| | |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `npx shipstatic ./dist` | **Nothing.** No account, no API key, no deploy token, no login. |
|
|
32
|
+
| Every other command — domains, tokens, `whoami`, listing deployments | **Requires an API key.** |
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
npx shipstatic ./index.html --password "correct-horse-battery-staple"
|
|
37
|
-
```
|
|
34
|
+
> **`ship whoami` failing is normal** without a key, and it says nothing about deploying. An authentication error from any other command is not a reason the deploy won't work — run the deploy anyway. It stays anonymous.
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
Need the rest? Get a free key at [my.shipstatic.com/api-key](https://my.shipstatic.com/api-key), then `ship config`.
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
SHIP_PASSWORD="correct-horse-battery-staple" npx shipstatic ./dist
|
|
43
|
-
```
|
|
38
|
+
## Common tasks
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
| Goal | Command |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Deploy a folder | `npx shipstatic ./dist` |
|
|
43
|
+
| Deploy one file | `npx shipstatic ./index.html` |
|
|
44
|
+
| Password-protect it | `npx shipstatic ./dist --password "secret"` |
|
|
45
|
+
| Machine-readable output | `npx shipstatic ./dist --json` |
|
|
46
|
+
| Keep the password out of logs | `SHIP_PASSWORD="secret" npx shipstatic ./dist` |
|
|
47
|
+
| Repeat use | `npm install -g shipstatic` → the `ship` command |
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
## For scripts and agents
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
npx shipstatic ./dist --json
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
-
|
|
54
|
-
- **
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
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.
|
|
59
|
-
|
|
60
|
-
## Install (optional, for repeat use)
|
|
55
|
+
- **`--json`** emits machine-readable output on success **and** on failure.
|
|
56
|
+
- **Exit code** is `0` on success, non-zero on failure. Branch on it, not on the text.
|
|
57
|
+
- **Errors** carry a stable `error` type and `status`. Branch on those, never on the message string.
|
|
58
|
+
- **`--no-color`** is honoured; colour is off automatically when stdout is not a TTY.
|
|
59
|
+
- **`SHIP_PASSWORD`** supplies `--password` from the environment.
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
npm install -g shipstatic # global CLI — provides the `ship` command
|
|
64
|
-
```
|
|
61
|
+
Deploying needs no credentials, so there is nothing to configure before the first run and nothing to leak in a log.
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Use it as an SDK
|
|
63
|
+
## From code
|
|
69
64
|
|
|
70
65
|
```javascript
|
|
71
66
|
import Ship from 'shipstatic';
|
|
72
67
|
|
|
73
|
-
const
|
|
74
|
-
const result = await ship.deploy('./dist');
|
|
68
|
+
const result = await new Ship().deploy('./dist');
|
|
75
69
|
// result.deployment → live URL
|
|
76
70
|
// result.claim → visit to keep permanently
|
|
77
71
|
```
|
|
78
72
|
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
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)**.
|
|
82
|
-
|
|
83
|
-
This README covers only the quickstart, deliberately. A copy of another package's documentation is a second copy to keep true — and the day it stops being true, it's worse than none.
|
|
84
|
-
|
|
85
|
-
## License
|
|
73
|
+
## Full documentation
|
|
86
74
|
|
|
87
|
-
|
|
75
|
+
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.
|
|
3
|
+
"version": "1.2.0",
|
|
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",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"format": "biome format --write ."
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@shipstatic/ship": "^1.
|
|
65
|
+
"@shipstatic/ship": "^1.2.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@arethetypeswrong/cli": "^0.18.5",
|