flypod 0.9.0 → 0.10.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 +56 -18
- package/dist/bin/deploy.js +659 -322
- package/dist/{cli-db9gcrd0.js → cli-198a0gkx.js} +1093 -1008
- package/dist/src/cli/commands.d.ts +11 -2
- package/dist/src/cli/errors.d.ts +68 -0
- package/dist/src/cli/receipt.d.ts +7 -0
- package/dist/src/cli.d.ts +16 -0
- package/dist/src/cli.js +3 -1
- package/dist/src/deploy-source.d.ts +17 -0
- package/dist/src/pack.d.ts +25 -0
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npx flypod ./dist
|
|
7
|
-
# → https://
|
|
7
|
+
# → https://a3f1c2d4e5b60789.flypod.page
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
```
|
|
@@ -16,14 +16,16 @@ npx flypod ./dist
|
|
|
16
16
|
|
|
17
17
|
────────────────────────────────────────────────────────
|
|
18
18
|
● Live
|
|
19
|
-
https://
|
|
19
|
+
https://a3f1c2d4e5b60789.flypod.page
|
|
20
20
|
────────────────────────────────────────────────────────
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
ship a change flypod update new version, same URL
|
|
23
|
+
undo flypod rollback previous version, instantly
|
|
24
|
+
history flypod versions every version, newest first
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
expires 29 Sep 2026 · 14 days · flypod versions
|
|
27
|
+
keep it flypod login drops the expiry from this URL
|
|
28
|
+
and every site on this machine
|
|
27
29
|
```
|
|
28
30
|
|
|
29
31
|
That URL is real, public, and HTTPS. Send it to someone. (The elapsed time above
|
|
@@ -63,6 +65,13 @@ That's the whole ownership model. `flypod login` claims **every** anonymous site
|
|
|
63
65
|
this machine remembers, not just the last one — so "deploy now, log in whenever"
|
|
64
66
|
really is the path. You never have to learn what a token is.
|
|
65
67
|
|
|
68
|
+
Claiming removes the expiry and nothing else. Your site's address does not
|
|
69
|
+
change: every site, temporary or claimed, is served at
|
|
70
|
+
`https://<site-id>.flypod.page`, while `flypod.dev` is the API, the docs, and
|
|
71
|
+
the account pages. Two domains because a deploy needs no account — keeping
|
|
72
|
+
uploaded content off the brand domain means one bad upload can only cost the
|
|
73
|
+
reputation of a domain flypod does not depend on.
|
|
74
|
+
|
|
66
75
|
Before you start, [flypod.dev/limits](https://flypod.dev/limits) is the honest
|
|
67
76
|
list of what flypod does and does not do — static files only, no server code, no
|
|
68
77
|
build step, 14-day anonymous expiry, and the upload sizes the service ships
|
|
@@ -300,8 +309,8 @@ npx flypod ./dist --json
|
|
|
300
309
|
```json
|
|
301
310
|
{
|
|
302
311
|
"ok": true,
|
|
303
|
-
"url": "https://
|
|
304
|
-
"site_id": "
|
|
312
|
+
"url": "https://a3f1c2d4e5b60789.flypod.page",
|
|
313
|
+
"site_id": "a3f1c2d4e5b60789",
|
|
305
314
|
"version_id": "…",
|
|
306
315
|
"expires_at": 1782929906088,
|
|
307
316
|
"manage_token": "…",
|
|
@@ -332,8 +341,34 @@ For an agent, that pair is a closed loop — deploy, read the receipt, apply the
|
|
|
332
341
|
`expires_at` is epoch **milliseconds** while the site is temporary, and `null`
|
|
333
342
|
once it's yours. On an authenticated deploy `owner_account_id` is present and
|
|
334
343
|
`claim_token` is absent — keys that don't apply are omitted rather than emitted
|
|
335
|
-
as `null`.
|
|
336
|
-
|
|
344
|
+
as `null`. `link_saved` says whether `flypod update` will work from this folder
|
|
345
|
+
with no flags; when it is `false` the `next` commands carry `--site <id>`.
|
|
346
|
+
|
|
347
|
+
**Every failure is JSON too**, on every verb, so `--json` is safe to parse
|
|
348
|
+
unconditionally:
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
{ "ok": false, "code": "rate_limited", "error": "Too many requests from this network right now.", "fix": "Wait a minute and retry the same command.", "retry_after_s": 30 }
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Branch on `code` — it is stable; `error` is prose and may change; `fix`, when
|
|
355
|
+
present, is the literal next step. The codes: `no_build_dir`, `no_files`,
|
|
356
|
+
`no_site`, `not_signed_in`, `unauthorized`, `token_rejected`, `site_gone`,
|
|
357
|
+
`invalid_upload`, `too_large`, `blocked`, `challenge_required`, `rate_limited`,
|
|
358
|
+
`server_error`, `network`, `usage`, `unknown_flag`, and the login codes below.
|
|
359
|
+
The [exit code](#exit-codes) follows the code, never the verb.
|
|
360
|
+
|
|
361
|
+
A credential that is sent but not accepted (an expired `FLYPOD_TOKEN`, say)
|
|
362
|
+
fails the deploy with `token_rejected` — it never silently falls back to an
|
|
363
|
+
anonymous 14-day site.
|
|
364
|
+
|
|
365
|
+
**Signing in from an agent.** `flypod login` needs a browser, so an agent runs
|
|
366
|
+
`flypod login --json`: it prints the URL, the confirmation code, and a
|
|
367
|
+
`device_code`, then exits at once (`interactive_login_required`, exit 2) instead
|
|
368
|
+
of waiting. Hand the URL and code to the user; once they confirm, finish with
|
|
369
|
+
`flypod login --device-code <device_code>` — that polls once and either saves
|
|
370
|
+
the session (`{"ok": true, "logged_in": true}`) or reports
|
|
371
|
+
`authorization_pending` (exit 4) to try again.
|
|
337
372
|
|
|
338
373
|
Or capture just the URL:
|
|
339
374
|
|
|
@@ -377,7 +412,7 @@ The Markdown sources survive. A browser opening the URL gets the styled page; a
|
|
|
377
412
|
client that asks for Markdown gets the original back from the same URL:
|
|
378
413
|
|
|
379
414
|
```sh
|
|
380
|
-
curl -H 'Accept: text/markdown' https://
|
|
415
|
+
curl -H 'Accept: text/markdown' https://a3f1c2d4e5b60789.flypod.page/guide.html
|
|
381
416
|
```
|
|
382
417
|
|
|
383
418
|
## Flags
|
|
@@ -419,13 +454,15 @@ setups should use `FLYPOD_TOKEN`.
|
|
|
419
454
|
|
|
420
455
|
## Exit codes
|
|
421
456
|
|
|
457
|
+
The exit code follows the failure's `code`, so the table is true for every verb:
|
|
458
|
+
|
|
422
459
|
| Code | Meaning |
|
|
423
460
|
|------|---------|
|
|
424
461
|
| `0` | Success |
|
|
425
|
-
| `1` | Runtime error — no build folder,
|
|
426
|
-
| `2` | Usage error — unknown flag, unknown subcommand, missing argument |
|
|
427
|
-
| `3` |
|
|
428
|
-
| `4` |
|
|
462
|
+
| `1` | Runtime error the caller can act on — no build folder, site gone, upload rejected or blocked |
|
|
463
|
+
| `2` | Usage error — unknown flag, unknown subcommand, missing argument, or a login that needs a browser (`--json`) |
|
|
464
|
+
| `3` | Auth — not signed in, credential refused (`unauthorized`, `token_rejected`), or sign-in denied |
|
|
465
|
+
| `4` | Retryable — rate limited, server 5xx, network failure, or a sign-in still pending |
|
|
429
466
|
| `130` | The interactive skill picker was cancelled; nothing was written |
|
|
430
467
|
|
|
431
468
|
## How long does a deploy last?
|
|
@@ -463,9 +500,10 @@ long version, with the reasoning attached, is at
|
|
|
463
500
|
- **No build step, and no CI/CD integration.** flypod ships your build *output*;
|
|
464
501
|
it never runs your bundler and has no opinions about your git history. Point
|
|
465
502
|
it at `dist/`, not at the project root.
|
|
466
|
-
- **No custom domains.** Every site lives at
|
|
467
|
-
|
|
468
|
-
|
|
503
|
+
- **No custom domains, and no chosen subdomain.** Every site lives at
|
|
504
|
+
`<site-id>.flypod.page`, where the 16-hex site id is flypod's to pick. There
|
|
505
|
+
is no DNS change to make, which is exactly why a script or an agent can
|
|
506
|
+
produce a working URL unattended.
|
|
469
507
|
- **No dashboard you're expected to live in.** The CLI and the URL are the
|
|
470
508
|
product.
|
|
471
509
|
- **Not permanent by default.** Anonymous deploys last 14 days.
|