flypod 0.11.0 → 0.11.2
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 +18 -9
- package/dist/bin/deploy.js +1 -1
- package/dist/{cli-nqpgfpnm.js → cli-c6hpb7tq.js} +6 -1
- package/dist/src/cli.d.ts +4 -2
- package/dist/src/cli.js +1 -1
- package/dist/src/deploy-source.d.ts +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -442,21 +442,30 @@ publish something.
|
|
|
442
442
|
|
|
443
443
|
| Tool | What it does |
|
|
444
444
|
|------|--------------|
|
|
445
|
-
| `deploy_site` |
|
|
446
|
-
| `
|
|
447
|
-
| `
|
|
448
|
-
| `
|
|
445
|
+
| `deploy_site`, `update_site`, `rollback_site` | Publish a site, publish a new version, go back to an earlier one |
|
|
446
|
+
| `get_site`, `compare_versions` | A site's URL, expiry and versions; the files that differ between two versions |
|
|
447
|
+
| `duplicate_site` | Copy a temporary site to a new URL |
|
|
448
|
+
| `list_sites`, `rename_site`, `delete_site` | The sites on your account |
|
|
449
|
+
| `keep_site` | Attach a temporary site to your account so it no longer expires |
|
|
450
|
+
| `configure_comments`, `list_comments`, `get_comment_thread` | Turn comments on or off; read threads and the moderation queue |
|
|
451
|
+
| `post_comment`, `reply_to_comment`, `update_comment_thread`, `delete_comment_thread` | Comment, reply, resolve, reopen, approve, reject, delete |
|
|
452
|
+
|
|
453
|
+
That is everything the CLI and the account page can do to a site. Deleting an
|
|
454
|
+
account and changing its password are deliberately not tools.
|
|
449
455
|
|
|
450
456
|
`deploy_site` takes `files` (path → text) and optionally `binary_files` (path →
|
|
451
457
|
base64, for small images), up to 200 files and 4 MB. It returns the URL plus a
|
|
452
|
-
`site_id` and `manage_token`, which the other tools need
|
|
453
|
-
for the conversation, since there is no folder
|
|
458
|
+
`site_id` and `manage_token`, which the other site tools need while the site is
|
|
459
|
+
temporary — the app holds them for the conversation, since there is no folder
|
|
460
|
+
on disk to remember them.
|
|
454
461
|
|
|
455
462
|
A site made this way is temporary, like any deploy without an account. The
|
|
456
463
|
result includes a `keep_url`: a page where the person signs in and presses one
|
|
457
464
|
button to keep the site for good, with no terminal involved. Clients that can
|
|
458
|
-
set a header can
|
|
459
|
-
`--header "Authorization: Bearer $FLYPOD_TOKEN"`.
|
|
465
|
+
set a header can sign the connector in instead:
|
|
466
|
+
`--header "Authorization: Bearer $FLYPOD_TOKEN"`. Signed in, every deploy is
|
|
467
|
+
yours from the start, a site needs only its `site_id`, and the account and
|
|
468
|
+
comment tools work.
|
|
460
469
|
|
|
461
470
|
Every tool call becomes an ordinary API request inside the server, so the
|
|
462
471
|
connector is held to the same rate limit, upload rules and content screening
|
|
@@ -570,7 +579,7 @@ Targeting flags, on `update` / `versions` / `rollback` / `forget`:
|
|
|
570
579
|
| `FLYPOD_TOKEN` | Deploy as your account without logging in (agents / CI). Takes precedence over a saved session |
|
|
571
580
|
| `DEPLOY_URL` | The deploy server (default: `https://flypod.dev`) |
|
|
572
581
|
| `FLYPOD_CONFIG_DIR` | Where the CLI keeps its session + folder memory |
|
|
573
|
-
| `FLYPOD_SOURCE` | Override how the deploy reports its surface (`cli`, `skill`, `library`) |
|
|
582
|
+
| `FLYPOD_SOURCE` | Override how the deploy reports its surface (`cli`, `skill`, `library`). `deploySite()` reads it too when no `source` is passed |
|
|
574
583
|
| `FLYPOD_SHOW_TOKEN` | Set to `1` to print the site's manage token inline on deploy (off by default) |
|
|
575
584
|
| `NO_COLOR` | Disable ANSI colors |
|
|
576
585
|
| `FORCE_COLOR` | Force colors even when stderr is not a TTY |
|
package/dist/bin/deploy.js
CHANGED
|
@@ -1500,12 +1500,17 @@ async function collectDist(path) {
|
|
|
1500
1500
|
await walk(path);
|
|
1501
1501
|
return files;
|
|
1502
1502
|
}
|
|
1503
|
+
function envSource() {
|
|
1504
|
+
const value = globalThis.process?.env?.FLYPOD_SOURCE;
|
|
1505
|
+
return value ? coerceSource(value) : undefined;
|
|
1506
|
+
}
|
|
1503
1507
|
async function deploySite(opts) {
|
|
1504
1508
|
const handle = opts.handle ?? ((request) => fetch(request));
|
|
1505
1509
|
const baseUrl = opts.baseUrl ?? "https://flypod.dev";
|
|
1506
1510
|
const zip = packDeploy(opts.files);
|
|
1507
1511
|
const bridgeFetch = async (input, init) => handle(new Request(typeof input === "string" ? input : input.url, init));
|
|
1508
|
-
const
|
|
1512
|
+
const source = opts.source ?? envSource() ?? "library";
|
|
1513
|
+
const client = buildClient(opts.apiKey, baseUrl, bridgeFetch, source);
|
|
1509
1514
|
const res = await client.createSite(zip);
|
|
1510
1515
|
if (!res.ok)
|
|
1511
1516
|
throw await DeployError.fromResponse(res);
|
package/dist/src/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DeploySource } from "./deploy-source";
|
|
2
2
|
/**
|
|
3
3
|
* Build-output folders the common frontend frameworks emit, in priority order.
|
|
4
4
|
* `public` ranks low because some tools use it for *source* assets (Vite/CRA);
|
|
@@ -56,6 +56,7 @@ export interface DeployOptions {
|
|
|
56
56
|
* Surface reported to the server as `x-flypod-source`. Defaults to
|
|
57
57
|
* `library`, which is the truth for a direct call to this function; the
|
|
58
58
|
* `flypod` binary passes its own resolved source (`cli` or `skill`).
|
|
59
|
+
* When omitted, a `FLYPOD_SOURCE` environment variable is used if set.
|
|
59
60
|
*/
|
|
60
61
|
source?: DeploySource;
|
|
61
62
|
}
|
|
@@ -67,7 +68,8 @@ export interface DeployOptions {
|
|
|
67
68
|
* one request-building path. `buildClient` — not `createClient` — is used
|
|
68
69
|
* deliberately: this is a published library function callers can invoke
|
|
69
70
|
* directly with just `{files, apiKey}`, so it must never reach for a saved
|
|
70
|
-
* session or ambient env vars the caller didn't pass in `opts`.
|
|
71
|
+
* session or ambient env vars the caller didn't pass in `opts`. The single
|
|
72
|
+
* exception is the `FLYPOD_SOURCE` label; see `envSource`.
|
|
71
73
|
*/
|
|
72
74
|
export declare function deploySite(opts: DeployOptions): Promise<DeployResult>;
|
|
73
75
|
/**
|
package/dist/src/cli.js
CHANGED
|
@@ -7,6 +7,36 @@ export declare const SOURCE_HEADER = "x-flypod-source";
|
|
|
7
7
|
* it. It is a device id we minted, not PII — no IP, no user agent.
|
|
8
8
|
*/
|
|
9
9
|
export declare const ANON_ID_HEADER = "x-flypod-anon-id";
|
|
10
|
+
/**
|
|
11
|
+
* Request header that says "this request is ours". `1` or `true`.
|
|
12
|
+
*
|
|
13
|
+
* `source: ci` already says it for a deploy, but it does so by replacing the
|
|
14
|
+
* surface, and three kinds of our own traffic could not use it: the MCP
|
|
15
|
+
* endpoint (its source is fixed to `mcp`), the landing-page drop demo
|
|
16
|
+
* (`browser`), and everything a signed-in browser does on `/account`, which has
|
|
17
|
+
* no source at all. In the week of 2026-09-28 the north star read 11 activated
|
|
18
|
+
* builders, and by timing most of them were us exercising the features that
|
|
19
|
+
* shipped that week. Nothing on the events could say so.
|
|
20
|
+
*
|
|
21
|
+
* It is not a credential. Sending it only removes the caller from our growth
|
|
22
|
+
* numbers, so there is nothing to gain by forging it.
|
|
23
|
+
*/
|
|
24
|
+
export declare const INTERNAL_HEADER = "x-flypod-internal";
|
|
25
|
+
/**
|
|
26
|
+
* Cookie that marks a browser as one of ours. `apps/site` and `apps/docs` set
|
|
27
|
+
* it on `.flypod.dev` when any page is loaded once with `?internal=1` (and
|
|
28
|
+
* clear it on `?internal=0`), then stop reporting pageviews from that browser.
|
|
29
|
+
* Because it rides on same-site requests, the drop demo and every `/account`
|
|
30
|
+
* action from that browser are recognised here with no further work.
|
|
31
|
+
*/
|
|
32
|
+
export declare const INTERNAL_COOKIE = "flypod_internal";
|
|
33
|
+
/**
|
|
34
|
+
* Is this request our own? True for `x-flypod-source: ci`, for the internal
|
|
35
|
+
* header, and for a browser carrying the internal cookie. Every product event
|
|
36
|
+
* then carries `internal: true`, and the growth report drops those events and
|
|
37
|
+
* every id that ever sent one (`scripts/growth-report.ts`, `notSelf`).
|
|
38
|
+
*/
|
|
39
|
+
export declare function isInternal(request: Request): boolean;
|
|
10
40
|
/**
|
|
11
41
|
* `ci` is ours, and it exists so the growth report can subtract us from our own
|
|
12
42
|
* numbers. Set `FLYPOD_SOURCE=ci` in anything that deploys on our behalf — a
|
package/package.json
CHANGED