flypod 0.17.0 → 0.18.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.
package/README.md CHANGED
@@ -196,6 +196,13 @@ With no path, flypod tries these in order and takes the first one that exists
196
196
  dist · build · out · .output/public · .vercel/output/static · public · _site
197
197
  ```
198
198
 
199
+ A candidate with no `index.html` of its own counts when exactly one folder
200
+ inside it has one (Angular's `dist/<app>/browser`). Failing all of them, a
201
+ folder of plain pages (an `index.html` and no `package.json`, `_config.yml` or
202
+ other project file) deploys as it is. A project root is never deployed by
203
+ guesswork: when nothing is found, the error's `fix` names the build command and
204
+ the folder it writes, e.g. ``Run `npm run build`, then `flypod ./dist`.``
205
+
199
206
  The URL is printed alone on **stdout** whenever stdout is not your terminal;
200
207
  everything else goes to stderr. So `URL=$(npx flypod)` and
201
208
  `npx flypod | tee url.txt` both get just the URL, and at a terminal you see it
@@ -225,7 +232,8 @@ out (and listed) when it points outside it, loops, or points nowhere.
225
232
  On flypod.dev a deploy may hold at most 200 files and 10 MB of files (12 MB
226
233
  as an upload: the archive is stored, not compressed, so it is the files plus
227
234
  a few bytes each). flypod checks before uploading and fails with `too_large`,
228
- naming the limit and the largest files. A self-hosted server sets its own
235
+ naming the limit and the largest files, and, when a few files are the
236
+ difference, the `.flypodignore` lines that would leave them out. A self-hosted server sets its own
229
237
  limits (`UPLOAD_MAX_*`) and enforces them itself.
230
238
 
231
239
  To skip the package runner:
@@ -266,7 +274,8 @@ rollback reaches back about a week. The live version lasts as long as the site.
266
274
  **How `update` knows which site.** On the first deploy, flypod records the
267
275
  folder → site mapping in its own config dir (`projects.json`, next to the
268
276
  session — **never written into your repo**). From that folder, `update`,
269
- `versions`, and `rollback` need no flags.
277
+ `versions`, and `rollback` need no flags, and `update` with no path deploys
278
+ the folder the site was last deployed from.
270
279
 
271
280
  To act on a site from anywhere — or from a stateless agent that kept the
272
281
  `site_id` from the deploy output — pass `--site`:
@@ -381,7 +390,9 @@ serve a site that's broken for visitors, and this array is the only signal that
381
390
  says so. Each entry carries a `code` and a `fix_recipe` naming the change to
382
391
  make — `missing-index` when nothing is served at `/`, `not-spa` when the build
383
392
  ships scripts alongside visible body content, so client-side routing fallback
384
- stays off and deep links will 404 on refresh.
393
+ stays off and deep links will 404 on refresh, and `new-site-in-linked-folder`
394
+ when `flypod` ran in a folder that already had a site and so made a second one
395
+ (the deploy is live; ship later changes with `flypod update`).
385
396
 
386
397
  `healed` is the other half: problems flypod fixed on your behalf. `spa-fallback`
387
398
  there means it recognised a single-page app, so unknown paths serve `index.html`
@@ -424,7 +435,8 @@ prose. `claim_token` and `owner_account_id` are omitted when they don't apply;
424
435
  Two more keys appear only when they apply: `replaced_link` (`site_id` and
425
436
  `url` of the site this folder pointed at before — a second `flypod` in a
426
437
  linked folder makes a new site, and the old one keeps running until it
427
- expires), and, with `--timeline` / `--no-timeline`, `timeline` (the state the
438
+ expires; the receipt's `warnings` then carries `new-site-in-linked-folder`,
439
+ and `-q` says so in one line on stderr), and, with `--timeline` / `--no-timeline`, `timeline` (the state the
428
440
  site is actually in) plus `history_url` when it is on.
429
441
 
430
442
  **Every failure is JSON too**, on every verb, so `--json` is safe to parse
@@ -437,11 +449,15 @@ unconditionally:
437
449
  Branch on `code` — it is stable; `error` is prose and may change; `fix`, when
438
450
  present, is the literal next step; `status` is the HTTP status when a server
439
451
  answered. The codes: `no_build_dir` (no build folder
440
- found, or the path given does not exist), `no_files`, `no_site`,
452
+ found, or the path given does not exist), `no_files`, `no_site` (with a
453
+ `reason` on `update`, `versions` and `rollback`: `never_linked`, `expired`,
454
+ `gone`, or `other_folder` when a folder above or below is the linked one),
441
455
  `not_signed_in`, `unauthorized`, `token_rejected`, `site_gone`,
442
456
  `invalid_upload`, `too_large` (checked before uploading too, naming the limit
443
457
  and the largest files), `blocked`, `challenge_required`, `rate_limited`,
444
- `server_error`, `network` (the server could not be reached, or a proxy or
458
+ `server_error` (a 5xx; `flypod update` has already retried it once, since an
459
+ update is safe to repeat, and an error from flypod itself carries `request_id`
460
+ to quote), `network` (the server could not be reached, or a proxy or
445
461
  firewall in between refused the request), `usage` (bad arguments, including a value flag with
446
462
  no value: `--site needs a value`), `unknown_flag` (naming the closest real flag
447
463
  when there is one), `unknown_command` (a verb that does not exist — a bare word
@@ -465,11 +481,12 @@ anonymous 14-day site.
465
481
  `flypod login --json`: it prints the URL, the confirmation code, and a
466
482
  `device_code`, then exits at once (`interactive_login_required`, exit 2) instead
467
483
  of waiting. Hand the URL and code to the user; once they confirm, finish with
468
- `flypod login --device-code <device_code>` — that polls once and either saves
484
+ `flypod login --device-code <device_code> --json` — that polls once and either saves
469
485
  the session (`{"ok": true, "logged_in": true}`) or reports
470
486
  `authorization_pending` (exit 4) to try again. The flow ends for good with
471
487
  `login_denied` (exit 3, the user said no) or `login_expired` (exit 1, start
472
- again); an interactive `flypod login` that gives up waiting reports
488
+ again; also what a code that was already used, or a `user_code` passed in
489
+ place of the `device_code`, answers); an interactive `flypod login` that gives up waiting reports
473
490
  `login_timeout` (exit 4). The JSON from `flypod login --json` also carries
474
491
  `verification_uri`, `verification_uri_complete` and `user_code` (plus
475
492
  `expires_in` and `interval` when the server sends them). After a login,
@@ -674,7 +691,7 @@ Targeting flags, on `update` / `versions` / `rollback` / `forget` / `token`:
674
691
  | `FLYPOD_SHOW_TOKEN` | Set to `1` to print the site's manage token inline on deploy (off by default) |
675
692
  | `NO_COLOR` | Disable ANSI colors |
676
693
  | `FORCE_COLOR` | Force colors even when stderr is not a TTY |
677
- | `DO_NOT_TRACK` | Set (to anything but `0` or `false`) to turn off the install id and failure reports. See [Telemetry](#telemetry) |
694
+ | `DO_NOT_TRACK` | Set (to anything but `0` or `false`) to turn off the install id, the agent, CI, launch and agent-instructions words, and failure reports. See [Telemetry](#telemetry) |
678
695
  | `FLYPOD_TELEMETRY` | `0`, `false`, `off` or `no` turns off the same, for flypod alone |
679
696
 
680
697
  `FLYPOD_API_KEY` is still read as a last-resort fallback for older setups; new
@@ -833,20 +850,42 @@ person's tenth deploy from ten people's first. What it sends:
833
850
  server, kept in `install.json`, sent as `x-flypod-install` on the CLI's
834
851
  requests. Nothing about your machine or you goes into it.
835
852
  - **The CLI version** (`x-flypod-version`).
853
+ - **Which coding agent ran it, and whether CI did**: one word from a fixed
854
+ list (`claude_code`, `codex`, `cursor`, `gemini`, `opencode`, `other` or
855
+ `none`) as `x-flypod-agent`, and `x-flypod-ci: 1` or `0`. The CLI picks the
856
+ word from environment variables the agents set for the commands they run
857
+ (`AI_AGENT`, `CLAUDECODE`, `CLAUDE_CODE_ENTRYPOINT`, `CURSOR_AGENT`, `GEMINI_CLI`, `CODEX_SANDBOX`, `CODEX_SANDBOX_NETWORK_DISABLED`, `CODEX_THREAD_ID`, `CODEX_MANAGED_BY_NPM`) and from `CI` / `GITHUB_ACTIONS`; the variables' values are never sent.
858
+ - **How it was launched**: one word (`npx`, `bunx`, `pnpm_dlx`, `yarn_dlx`,
859
+ `script`, `local`, `global` or `other`) as `x-flypod-invoked-via`, from the
860
+ shape of the CLI's own script path (a package manager's cache, a
861
+ `node_modules`, a global prefix) and the variables package managers set
862
+ (`npm_lifecycle_event`, `npm_command`, `npm_config_user_agent`,
863
+ `npm_execpath`). Never the path or the values.
864
+ - **Whether the project's agent instructions name flypod**: one word
865
+ (`skill`, `agents_md`, `claude_md`, `cursor_rules`, `copilot`, `gemini_md`
866
+ or `none`) as `x-flypod-agent-guide`. The CLI reads the start (32 KB) of
867
+ `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, `.cursor/rules/*`,
868
+ `.github/copilot-instructions.md` and `GEMINI.md` in the folder it runs in
869
+ and its parents up to the repository root, never the home directory, and
870
+ sends only which kind of file contains the word `flypod`. Never a file's
871
+ content, name or path.
836
872
  - **Failure reports**: when a command fails against flypod.dev, one small
837
873
  request to `/telemetry/cli` with the error `code`, the verb, the OS,
838
874
  runtime and its major version, and whether a script or agent ran it. For
839
875
  `too_large`, `no_files` and `no_build_dir` it adds the upload's shape:
840
876
  file count, kilobytes per kind of file (HTML, scripts, images, source
841
877
  maps, …), and whether the folder has a `package.json`, a `src/` or a build
842
- folder (`dist`, `build`, …). Never file names, paths, contents or the
843
- error text. A report is never printed, gives up after 1.5 s, and is never
878
+ folder (`dist`, `build`, …). For `no_site` it adds which kind (`reason`),
879
+ and for `unauthorized` which kind of credential was refused, whether this
880
+ machine knew the site, and whether it was named by the folder's link or
881
+ `--site`. Never file
882
+ names, paths, contents or the error text. A report is never printed, gives up after 1.5 s, and is never
844
883
  sent to a self-hosted server.
845
884
 
846
885
  The first time an id is made, a terminal run says so in one line.
847
886
 
848
887
  Turn all of it off with `DO_NOT_TRACK=1` (or `FLYPOD_TELEMETRY=0`): no id is
849
- made or sent, and no failure reports go out. The library (`deploySite()`)
888
+ made or sent, no agent, CI, launch or agent-instructions word is sent, and no failure reports go out. The library (`deploySite()`)
850
889
  sends none of this and writes nothing to your home directory.
851
890
 
852
891
  ## Library API
@@ -933,7 +972,10 @@ file in the site and is never filtered.
933
972
 
934
973
  Returns the directory to deploy: `explicit` verbatim if given (it is not
935
974
  checked), otherwise the first folder in `BUILD_DIR_CANDIDATES` under `cwd`
936
- (default `process.cwd()`) that contains an `index.html`. Throws if none match.
975
+ (default `process.cwd()`) that contains an `index.html`; then a candidate with
976
+ exactly one app folder inside that does (`dist/<app>/` or `dist/<app>/browser/`);
977
+ then `cwd` itself when it has an `index.html` and no `package.json` (or other
978
+ project file) and is not the home directory. Throws if none match.
937
979
 
938
980
  ### Constants
939
981