flypod 0.11.1 → 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 +1 -1
- 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
|
@@ -579,7 +579,7 @@ Targeting flags, on `update` / `versions` / `rollback` / `forget`:
|
|
|
579
579
|
| `FLYPOD_TOKEN` | Deploy as your account without logging in (agents / CI). Takes precedence over a saved session |
|
|
580
580
|
| `DEPLOY_URL` | The deploy server (default: `https://flypod.dev`) |
|
|
581
581
|
| `FLYPOD_CONFIG_DIR` | Where the CLI keeps its session + folder memory |
|
|
582
|
-
| `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 |
|
|
583
583
|
| `FLYPOD_SHOW_TOKEN` | Set to `1` to print the site's manage token inline on deploy (off by default) |
|
|
584
584
|
| `NO_COLOR` | Disable ANSI colors |
|
|
585
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