palbase 0.28.0 → 0.30.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.
Files changed (50) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{2XAUD7E5.js → 2HCODUCC.js} +2 -2
  8. package/dist/chunks/{FJWAFNAZ.js → 425EWENK.js} +2 -2
  9. package/dist/chunks/5CGZD6ER.js +2 -0
  10. package/dist/chunks/{EL7LGFXD.js → 5KRLND5G.js} +2 -2
  11. package/dist/chunks/{FXV6V457.js → AGYCOKIU.js} +1 -1
  12. package/dist/chunks/{RUQZFFRU.js → AU2V6M6Q.js} +2 -2
  13. package/dist/chunks/{DJIO7ZRV.js → CVO4TDIH.js} +1 -1
  14. package/dist/chunks/{3G43SAQ7.js → DF4GUELY.js} +1 -1
  15. package/dist/chunks/{D5YY344U.js → DGN5C3D4.js} +2 -2
  16. package/dist/chunks/{7M5HEXJC.js → DTMKEMIF.js} +2 -2
  17. package/dist/chunks/{ZVQZVVBH.js → FYJRLZWD.js} +1 -1
  18. package/dist/chunks/{QUBQS6S5.js → GT4Z7F3E.js} +2 -2
  19. package/dist/chunks/{YZCJVWWC.js → K5N4GOSB.js} +1 -1
  20. package/dist/chunks/{LTS573ZP.js → KGH6GRJH.js} +2 -2
  21. package/dist/chunks/{36Q4EJBD.js → KVYTS3P2.js} +1 -1
  22. package/dist/chunks/{DJE7B7X4.js → LZN5JQDI.js} +2 -2
  23. package/dist/chunks/{LIB2AHJU.js → MN7PDXRL.js} +2 -2
  24. package/dist/chunks/{CQ2AKEKI.js → PN5NJVJ6.js} +2 -2
  25. package/dist/chunks/{53VJSMGY.js → RYYYVFUC.js} +1 -1
  26. package/dist/chunks/{5SSYP4TM.js → SLQWIFCV.js} +2 -2
  27. package/dist/chunks/{EXT5BO4H.js → VVHRNZRS.js} +2 -2
  28. package/dist/chunks/{GP56VUVJ.js → WUUXHETU.js} +2 -2
  29. package/dist/chunks/{MVXEPZPI.js → Y5OIT4QP.js} +2 -2
  30. package/dist/cli.js +132 -132
  31. package/dist/cloud/index.js +2 -2
  32. package/dist/refuse/ai.js +1 -1
  33. package/dist/refuse/backend.js +1 -1
  34. package/dist/refuse/cloud.js +1 -1
  35. package/dist/refuse/server.js +1 -1
  36. package/dist/server/index.js +2 -2
  37. package/dist/server/testing.js +2 -2
  38. package/dist/web/calls-ui.js +2 -2
  39. package/dist/web/index.js +2 -2
  40. package/dist/web/message.js +2 -2
  41. package/dist/web/palbe.js +2 -2
  42. package/dist/web/paywall.js +2 -2
  43. package/dist/web/push-sw.js +1 -1
  44. package/dist/web/ssr.js +2 -2
  45. package/dist/web/vite.js +2 -2
  46. package/package.json +2 -2
  47. package/types/cloud/src/generated/project.d.ts +1 -1
  48. package/types/internal/src/modules/machines.d.ts +149 -10
  49. package/types/internal/src/modules/messaging.d.ts +2 -2
  50. package/dist/chunks/UYPJY7TK.js +0 -2
@@ -500,9 +500,9 @@ export type Database = {
500
500
  */
501
501
  pooled_port: number;
502
502
  /**
503
- * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
503
+ * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`). preview: a machine's pull request preview's own database — 0.25 vCPU, 512 MiB, 500 MB, put to sleep when idle — opened with its preview and deleted with it; no database is opened at or moved to it.
504
504
  */
505
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
505
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g";
506
506
  /**
507
507
  * Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
508
508
  */
@@ -1714,9 +1714,13 @@ export type Preview = {
1714
1714
  */
1715
1715
  url: string;
1716
1716
  /**
1717
- * building, ready, failed — or closed: its pull request closed, and its address answers no more.
1717
+ * authorization_required — a fork's head waiting for an admin of the environment to authorize it (fork protection): nothing of it is built until one does, and each push asks again —, building, ready, failed, refused — a machine's preview its environment's limits refused at its last push (reason says why): the next push, or previews:open, tries again —, idle — a machine's preview whose pull request had no push for 3 days: its machine and its own database are taken away, and the next push, or previews:open, makes them again — or closed: its pull request closed, its address answers no more.
1718
+ */
1719
+ state: "authorization_required" | "building" | "ready" | "failed" | "refused" | "idle" | "closed";
1720
+ /**
1721
+ * Why a machine's preview was refused (state refused).
1718
1722
  */
1719
- state: "building" | "ready" | "failed" | "closed";
1723
+ reason?: string;
1720
1724
  /**
1721
1725
  * A machine's preview: its own machine, by name.
1722
1726
  */
@@ -1724,6 +1728,15 @@ export type Preview = {
1724
1728
  created_at: string;
1725
1729
  updated_at: string;
1726
1730
  closed_at?: string;
1731
+ /**
1732
+ * The fork's head an admin last authorized.
1733
+ */
1734
+ authorized_commit?: string;
1735
+ /**
1736
+ * Who authorized it: a developer's id, or the credential the call presented.
1737
+ */
1738
+ authorized_by?: string;
1739
+ authorized_at?: string;
1727
1740
  };
1728
1741
  /**
1729
1742
  * A site's or a machine's previews, the fifty newest first.
@@ -1735,12 +1748,12 @@ export type PreviewList = {
1735
1748
  * One record of a domain's DNS.
1736
1749
  */
1737
1750
  export type DNSRecord = {
1738
- type: "CNAME" | "TXT";
1751
+ type: "A" | "CNAME" | "TXT";
1739
1752
  name: string;
1740
1753
  value: string;
1741
1754
  };
1742
1755
  /**
1743
- * A domain of the customer's own a site or a machine answers at too. Its owner adds its records to its DNS: the CNAME points it at the platform (at the apex, where DNS takes no CNAME: an ALIAS, ANAME or flattened CNAME to the same target), the TXT shows it is this environment's. It answers once Cloudflare has its certificate and the TXT record is there. A domain is one environment's, platform-wide, until it is deleted there.
1756
+ * A domain of the customer's own a site or a machine answers at too. Its owner adds its records to its DNS: a subdomain's CNAME points it at the platform through Cloudflare; an apex's A record names the platform's address for apexes, which any DNS host takes (its certificate the edge's, from Let's Encrypt) — or, where its DNS host has one, an ALIAS, ANAME or flattened CNAME to the subdomains' target keeps it behind Cloudflare. The TXT shows it is this environment's. It answers once its certificate is issued and the TXT record is there. A domain may send its visitors to another domain of the same site or machine (redirect_to). A domain is one environment's, platform-wide, until it is deleted there.
1744
1757
  */
1745
1758
  export type Domain = {
1746
1759
  /**
@@ -1752,9 +1765,21 @@ export type Domain = {
1752
1765
  */
1753
1766
  state: "pending" | "active";
1754
1767
  /**
1755
- * A domain of its own, not a subdomain: most DNS hosts take no CNAME there.
1768
+ * A domain of its own, not a subdomain: its DNS takes an A record at the platform's address for apexes (records), or an ALIAS, ANAME or flattened CNAME to the subdomains' target.
1756
1769
  */
1757
1770
  apex: boolean;
1771
+ /**
1772
+ * How it reaches the platform, as last read: cdn through Cloudflare (its certificate Cloudflare's), ip an apex's A record at the platform's address for apexes (its certificate Let's Encrypt's); null while its DNS says neither.
1773
+ */
1774
+ via: ("cdn" | "ip") | null;
1775
+ /**
1776
+ * Another domain of the same site or machine its visitors are sent to, the same path and query there (Vercel's "Redirect to"); null when it answers itself.
1777
+ */
1778
+ redirect_to: string | null;
1779
+ /**
1780
+ * The redirect's status: 308 unless said; null with redirect_to.
1781
+ */
1782
+ redirect_status: (301 | 302 | 307 | 308) | null;
1758
1783
  /**
1759
1784
  * What its owner adds to its DNS.
1760
1785
  */
@@ -1774,13 +1799,63 @@ export type DomainList = {
1774
1799
  domains: Domain[];
1775
1800
  };
1776
1801
  /**
1777
- * A domain to add.
1802
+ * A domain to add — sending its visitors to another of the same site's or machine's when redirect_to names one.
1778
1803
  */
1779
1804
  export type DomainCreate = {
1780
1805
  /**
1781
1806
  * The domain: www.example.com, or example.com — none of the platform's own.
1782
1807
  */
1783
1808
  host: string;
1809
+ /**
1810
+ * Another domain of the same site or machine, added before, its visitors are sent to (an apex to its www, or a www to its apex). It may not redirect itself, and this one may not be another's target.
1811
+ */
1812
+ redirect_to?: string;
1813
+ /**
1814
+ * The redirect's status, with redirect_to: 308 unless said.
1815
+ */
1816
+ redirect_status?: 301 | 302 | 307 | 308;
1817
+ };
1818
+ /**
1819
+ * Where a domain sends its visitors: another domain of the same site or machine, or null to have it answer itself. It holds at once.
1820
+ */
1821
+ export type DomainUpdate = {
1822
+ /**
1823
+ * Another domain of the same site or machine (one that redirects nowhere itself), or null.
1824
+ */
1825
+ redirect_to: string | null;
1826
+ /**
1827
+ * The redirect's status, with redirect_to: 308 unless said.
1828
+ */
1829
+ redirect_status?: 301 | 302 | 307 | 308;
1830
+ };
1831
+ /**
1832
+ * The fork's head an admin authorizes: the one they looked at, which must be the pull request's newest.
1833
+ */
1834
+ export type PreviewAuthorize = {
1835
+ /**
1836
+ * The pull request's head, as its preview says (Preview.commit).
1837
+ */
1838
+ commit: string;
1839
+ };
1840
+ /**
1841
+ * An authorization taken: the preview is being built at the commit.
1842
+ */
1843
+ export type PreviewAuthorized = {
1844
+ pull_request: number;
1845
+ commit: string;
1846
+ };
1847
+ /**
1848
+ * A machine's preview opened again.
1849
+ */
1850
+ export type PreviewOpened = {
1851
+ /**
1852
+ * The pull request's number.
1853
+ */
1854
+ pull_request: number;
1855
+ /**
1856
+ * The pull request's head it is built at.
1857
+ */
1858
+ commit: string;
1784
1859
  };
1785
1860
  /** Palbase Machines */
1786
1861
  export declare function client(t: Transport): {
@@ -1975,7 +2050,7 @@ export declare function client(t: Transport): {
1975
2050
  /**
1976
2051
  * Delete a machine's domain
1977
2052
  *
1978
- * Takes a domain away: it answers no more at once, and another environment may add it.
2053
+ * Takes a domain away: it answers no more at once, and another environment may add it. One another domain redirects to is kept (409 domain_redirected_to): change that one's redirect first.
1979
2054
  */
1980
2055
  deleteMachineDomain(input: {
1981
2056
  path: {
@@ -1984,6 +2059,19 @@ export declare function client(t: Transport): {
1984
2059
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1985
2060
  signal?: AbortSignal;
1986
2061
  }): Promise<Reply<204, undefined>>;
2062
+ /**
2063
+ * Set where a machine's domain redirects
2064
+ *
2065
+ * Sends the domain's visitors to another domain of the same machine — the same path and query there, with redirect_status (308 unless said) — or, redirect_to null, has it answer itself. It holds at the edge at once. A domain redirects to one that redirects nowhere, and one others redirect to answers itself.
2066
+ */
2067
+ updateMachineDomain(input: {
2068
+ path: {
2069
+ name: string; /** The domain. */
2070
+ host: string;
2071
+ };
2072
+ body: DomainUpdate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2073
+ signal?: AbortSignal;
2074
+ }): Promise<Reply<200, Domain>>;
1987
2075
  /**
1988
2076
  * Read a build
1989
2077
  *
@@ -2570,7 +2658,7 @@ export declare function client(t: Transport): {
2570
2658
  /**
2571
2659
  * Delete a site's domain
2572
2660
  *
2573
- * Takes a domain away: it answers no more at once, and another environment may add it.
2661
+ * Takes a domain away: it answers no more at once, and another environment may add it. One another domain redirects to is kept (409 domain_redirected_to): change that one's redirect first.
2574
2662
  */
2575
2663
  deleteSiteDomain(input: {
2576
2664
  path: {
@@ -2579,6 +2667,19 @@ export declare function client(t: Transport): {
2579
2667
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2580
2668
  signal?: AbortSignal;
2581
2669
  }): Promise<Reply<204, undefined>>;
2670
+ /**
2671
+ * Set where a site's domain redirects
2672
+ *
2673
+ * Sends the domain's visitors to another domain of the same site — the same path and query there, with redirect_status (308 unless said) — or, redirect_to null, has it answer itself. It holds at the edge at once. A domain redirects to one that redirects nowhere, and one others redirect to answers itself.
2674
+ */
2675
+ updateSiteDomain(input: {
2676
+ path: {
2677
+ name: string; /** The domain. */
2678
+ host: string;
2679
+ };
2680
+ body: DomainUpdate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2681
+ signal?: AbortSignal;
2682
+ }): Promise<Reply<200, Domain>>;
2582
2683
  /**
2583
2684
  * Get a site's build
2584
2685
  *
@@ -2591,5 +2692,43 @@ export declare function client(t: Transport): {
2591
2692
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2592
2693
  signal?: AbortSignal;
2593
2694
  }): Promise<Reply<200, SiteBuild>>;
2695
+ /**
2696
+ * Authorize a fork's pull request's preview
2697
+ *
2698
+ * Builds the preview of a pull request from a fork at the head an admin looked at (fork protection, Vercel's Git Fork Protection: a fork's code runs with the environment's settings and secrets). The head must be the pull request's newest: a push since answers 409 preview_head_moved. Each new push asks again.
2699
+ */
2700
+ authorizeSitePreview(input: {
2701
+ path: {
2702
+ name: string; /** The pull request's number. */
2703
+ pull_request: number;
2704
+ };
2705
+ body: PreviewAuthorize; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2706
+ signal?: AbortSignal;
2707
+ }): Promise<Reply<202, PreviewAuthorized>>;
2708
+ /**
2709
+ * Authorize a fork's pull request's preview
2710
+ *
2711
+ * Builds the preview of a pull request from a fork at the head an admin looked at (fork protection, Vercel's Git Fork Protection: a fork's code runs with the environment's settings and secrets). The head must be the pull request's newest: a push since answers 409 preview_head_moved. Each new push asks again.
2712
+ */
2713
+ authorizeMachinePreview(input: {
2714
+ path: {
2715
+ name: string; /** The pull request's number. */
2716
+ pull_request: number;
2717
+ };
2718
+ body: PreviewAuthorize; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2719
+ signal?: AbortSignal;
2720
+ }): Promise<Reply<202, PreviewAuthorized>>;
2721
+ /**
2722
+ * Open a machine's pull request preview again
2723
+ *
2724
+ * Opens a machine's preview of an open pull request again, at the pull request's head: one closed for want of a push (state idle: no push for 3 days, its machine and its own database taken away) or refused at its last push (state refused) is made anew, with a new, empty database of its own when the machine runs its database's migrations. One open goes on as it is, and its 3 days start again. A fork's preview under fork protection opens only at a head an admin authorized (409 preview_waits_authorization); one the environment's limits refuse again answers 409 preview_refused, with why.
2725
+ */
2726
+ openMachinePreview(input: {
2727
+ path: {
2728
+ name: string; /** The pull request's number. */
2729
+ pull_request: number;
2730
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2731
+ signal?: AbortSignal;
2732
+ }): Promise<Reply<202, PreviewOpened>>;
2594
2733
  };
2595
2734
  export type Client = ReturnType<typeof client>;
@@ -868,9 +868,9 @@ export type Message = {
868
868
  */
869
869
  attachments: Attachment[];
870
870
  /**
871
- * What a call message keeps of its call (kind call): written as the call starts, and again as it is answered and as it ends. It counts as no unread message.
871
+ * What a call message keeps of its call (kind call): written as the call starts, and again as it is answered and as it ends. It counts as no unread message. Always sent (null on any other message); absent (an answer kept from before it was): null.
872
872
  */
873
- call: CallRecord | null;
873
+ call?: CallRecord | null;
874
874
  /**
875
875
  * The writer's app's own id of it.
876
876
  */