flypod 0.25.6 → 0.26.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 +9 -1
- package/dist/bin/deploy.js +1 -1
- package/dist/{cli-dy1zwrmk.js → cli-m9rbcsfa.js} +15 -6
- package/dist/src/cli/errors.d.ts +2 -0
- package/dist/src/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -238,6 +238,11 @@ naming the limit and the largest files, and, when a few files are the
|
|
|
238
238
|
difference, the `.flypodignore` lines that would leave them out. A self-hosted server sets its own
|
|
239
239
|
limits (`UPLOAD_MAX_*`) and enforces them itself.
|
|
240
240
|
|
|
241
|
+
flypod does not host programs or installers: a deploy holding a `.exe`,
|
|
242
|
+
`.msi`, `.apk`, `.dmg`, `.ps1`, `.jar` or similar file, or a Windows, Linux or
|
|
243
|
+
macOS program under any name, fails with `invalid_upload` naming the file.
|
|
244
|
+
Link to a release page instead.
|
|
245
|
+
|
|
241
246
|
**The free plan.** flypod.dev is for hobby use, and everyone is on the free
|
|
242
247
|
plan (a Pro plan with higher limits is planned). Per person (the signed-in
|
|
243
248
|
account, or for anonymous use the network you deploy from):
|
|
@@ -495,7 +500,9 @@ found, or the path given does not exist), `no_files`, `no_site` (with a
|
|
|
495
500
|
and the largest files), `blocked`, `challenge_required`, `rate_limited`,
|
|
496
501
|
`quota_exceeded` (a free-plan limit is spent: `limit` says which, one of
|
|
497
502
|
`deploys_per_month`, `site_updates_per_hour` or `storage`;
|
|
498
|
-
`resets_at` when it comes back;
|
|
503
|
+
`resets_at` when it comes back; `upgrade_url`, when the server sells flypod
|
|
504
|
+
Pro, is a page where a person pays to raise it; exit 1, because retrying fails
|
|
505
|
+
until then),
|
|
499
506
|
`server_error` (a 5xx; `flypod update` has already retried it once, since an
|
|
500
507
|
update is safe to repeat, and an error from flypod itself carries `request_id`
|
|
501
508
|
to quote), `network` (the server could not be reached, or a proxy or
|
|
@@ -588,6 +595,7 @@ account page.
|
|
|
588
595
|
| `configure_timeline` | Show or hide the History chip on a site's pages |
|
|
589
596
|
| `list_sites`, `rename_site`, `delete_site` | The sites on your account |
|
|
590
597
|
| `keep_site` | Attach a temporary site to your account so it no longer expires |
|
|
598
|
+
| `upgrade_plan` | A link to pay for flypod Pro when a free-plan limit is spent (calling it charges nothing) |
|
|
591
599
|
| `configure_comments`, `list_comments`, `get_comment_thread` | Turn comments on or off; read threads and the moderation queue |
|
|
592
600
|
| `post_comment`, `reply_to_comment`, `update_comment_thread`, `delete_comment_thread` | Comment, reply, resolve, reopen, approve, reject, delete |
|
|
593
601
|
|
package/dist/bin/deploy.js
CHANGED
|
@@ -388,7 +388,8 @@ async function readServerMessage(res) {
|
|
|
388
388
|
...typeof body.fix === "string" && body.fix ? { fix: body.fix } : {},
|
|
389
389
|
...typeof body.limit === "string" ? { limit: body.limit } : {},
|
|
390
390
|
...typeof body.request_id === "string" && body.request_id ? { requestId: body.request_id } : {},
|
|
391
|
-
...typeof body.resets_at === "string" ? { resetsAt: body.resets_at } : {}
|
|
391
|
+
...typeof body.resets_at === "string" ? { resetsAt: body.resets_at } : {},
|
|
392
|
+
...typeof body.upgrade_url === "string" && body.upgrade_url.startsWith("https://") ? { upgradeUrl: body.upgrade_url } : {}
|
|
392
393
|
};
|
|
393
394
|
} catch {
|
|
394
395
|
const cfError = cloudflareErrorNumber(text);
|
|
@@ -428,10 +429,11 @@ function classifyParsed(res, said, ctx) {
|
|
|
428
429
|
...base,
|
|
429
430
|
code: "quota_exceeded",
|
|
430
431
|
error: message,
|
|
431
|
-
fix: "See https://flypod.dev/limits for the free plan's limits.",
|
|
432
|
+
fix: said.upgradeUrl ? `Show the person ${said.upgradeUrl} to upgrade to flypod Pro, or wait for the reset. Limits: https://flypod.dev/limits` : "See https://flypod.dev/limits for the free plan's limits.",
|
|
432
433
|
extra: {
|
|
433
434
|
...said.limit ? { limit: said.limit } : {},
|
|
434
|
-
...said.resetsAt ? { resets_at: said.resetsAt } : {}
|
|
435
|
+
...said.resetsAt ? { resets_at: said.resetsAt } : {},
|
|
436
|
+
...said.upgradeUrl ? { upgrade_url: said.upgradeUrl } : {}
|
|
435
437
|
}
|
|
436
438
|
};
|
|
437
439
|
}
|
|
@@ -722,7 +724,10 @@ spends the month's deploys. Batch your changes and deploy when they are done.
|
|
|
722
724
|
A spent limit is \`quota_exceeded\` (exit 1). Do not retry it: tell the human
|
|
723
725
|
which limit (\`limit\`) and when it resets (\`resets_at\`). For
|
|
724
726
|
\`limit: "storage"\` there is no reset date: suggest smaller images or video,
|
|
725
|
-
or deleting sites they no longer need at flypod.dev/account.
|
|
727
|
+
or deleting sites they no longer need at flypod.dev/account. When the error
|
|
728
|
+
carries \`upgrade_url\`, also show the human that link: flypod Pro raises the
|
|
729
|
+
limit, they pay on that page themselves (about 30 seconds), and then you run
|
|
730
|
+
the same command again. Never try to pay for them.
|
|
726
731
|
|
|
727
732
|
## Typical loop
|
|
728
733
|
|
|
@@ -919,7 +924,8 @@ step when there is one; \`status\` is the HTTP status when a server answered. Co
|
|
|
919
924
|
|
|
920
925
|
\`rate_limited\` means wait a minute and retry. \`quota_exceeded\` is different: a
|
|
921
926
|
monthly free-plan limit is spent, and the same command fails until \`resets_at\`.
|
|
922
|
-
Do not retry it; tell the human the \`limit\` and the date
|
|
927
|
+
Do not retry it; tell the human the \`limit\` and the date, and the
|
|
928
|
+
\`upgrade_url\` when there is one.
|
|
923
929
|
|
|
924
930
|
\`flypod update\` has already retried a \`server_error\` or \`network\` failure once
|
|
925
931
|
before reporting it, so do not loop on it: wait a minute before one more try.
|
|
@@ -932,7 +938,10 @@ path that does not exist; its \`fix\` is the command to run, such as
|
|
|
932
938
|
"Run \`npm run build\`, then \`flypod ./dist\`" for a project that is not built.
|
|
933
939
|
\`too_large\` is checked before uploading to flypod.dev
|
|
934
940
|
(at most 200 files, 10 MB of files, 12 MB as an upload) and names the largest files.
|
|
935
|
-
|
|
941
|
+
A program or installer in the folder (\`.exe\`, \`.apk\`, \`.dmg\`, \`.ps1\`, …)
|
|
942
|
+
fails with \`invalid_upload\` naming the file: flypod does not host them, so
|
|
943
|
+
leave it out (\`.flypodignore\`) and link to a release page instead.
|
|
944
|
+
For \`too_large\`, read its \`fix\`: when the folder is a project root, or most of it is source maps,
|
|
936
945
|
video or images, it says so and names the folder or the \`.flypodignore\` lines to use.
|
|
937
946
|
|
|
938
947
|
\`no_site\` carries a \`reason\`: \`never_linked\` (run \`flypod\` to make the site),
|
package/dist/src/cli/errors.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export declare function readServerMessage(res: Response): Promise<{
|
|
|
68
68
|
cfError?: number;
|
|
69
69
|
/** When a spent quota comes back (ISO 8601), from a `quota_exceeded` answer. */
|
|
70
70
|
resetsAt?: string;
|
|
71
|
+
/** Where to buy flypod Pro, from a `quota_exceeded` answer of a server that sells it. */
|
|
72
|
+
upgradeUrl?: string;
|
|
71
73
|
}>;
|
|
72
74
|
/**
|
|
73
75
|
* The number on an error page Cloudflare wrote itself: `error code: 1102` (the
|
package/dist/src/cli.js
CHANGED
package/package.json
CHANGED