palbase 0.37.2 → 0.38.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 (47) 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/{A6LIFQOQ.js → 2WLJWZTT.js} +2 -2
  8. package/dist/chunks/{P5EW3DTQ.js → 4NXMQWCX.js} +2 -2
  9. package/dist/chunks/{GEZH3OTX.js → 5DUY3VP2.js} +2 -2
  10. package/dist/chunks/{JCHW52YV.js → 6SDU7XE2.js} +2 -2
  11. package/dist/chunks/{QK2S67K3.js → 6SKJE2BU.js} +2 -2
  12. package/dist/chunks/{L3S7O5FQ.js → 7EDHWR5A.js} +2 -2
  13. package/dist/chunks/{IOVYIATC.js → CL6S7PER.js} +1 -1
  14. package/dist/chunks/{C4ENQSIX.js → F3D326PD.js} +1 -1
  15. package/dist/chunks/{HMDMAILZ.js → FM3BAHZZ.js} +1 -1
  16. package/dist/chunks/{SEECU52P.js → GZEEHPBE.js} +2 -2
  17. package/dist/chunks/{ZDENVL2U.js → IIZT54SQ.js} +2 -2
  18. package/dist/chunks/{UBQK5O7J.js → JFHJPS5G.js} +1 -1
  19. package/dist/chunks/{VAPNSTWC.js → JJ5KC2LB.js} +2 -2
  20. package/dist/chunks/{AF3XUGHY.js → JLRUWZ5F.js} +2 -2
  21. package/dist/chunks/{5HYKOPCW.js → JRTLS5CM.js} +2 -2
  22. package/dist/chunks/{4Y47I6LA.js → KCKE34OI.js} +2 -2
  23. package/dist/chunks/{NFFQO2UC.js → L5S55A54.js} +2 -2
  24. package/dist/chunks/{LANEQ73A.js → LRXCOKXA.js} +2 -2
  25. package/dist/chunks/{CHXCVOON.js → RSQV7RNP.js} +1 -1
  26. package/dist/chunks/{YLLZC52Q.js → TGQPGUJJ.js} +1 -1
  27. package/dist/chunks/{YQQHL67Y.js → UDOERJLL.js} +2 -2
  28. package/dist/chunks/{RVRPBQ4W.js → WHJSFH5J.js} +2 -2
  29. package/dist/chunks/{72CHRRHY.js → Z4ULG52U.js} +1 -1
  30. package/dist/cli.js +125 -125
  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/index.js +2 -2
  39. package/dist/web/message.js +2 -2
  40. package/dist/web/palbe.js +2 -2
  41. package/dist/web/paywall.js +2 -2
  42. package/dist/web/push-sw.js +1 -1
  43. package/dist/web/ssr.js +2 -2
  44. package/dist/web/vite.js +2 -2
  45. package/package.json +2 -2
  46. package/types/cloud/src/generated/project.d.ts +1 -1
  47. package/types/internal/src/modules/machines.d.ts +73 -8
@@ -268,6 +268,11 @@ export type Machine = {
268
268
  contract_error?: string;
269
269
  environment?: EnvironmentRef;
270
270
  moving_to?: EnvironmentRef;
271
+ moved_from?: EnvironmentRef;
272
+ /**
273
+ * The addresses the machine had in the environments of its project it was bound to before it moved: it answers at them too, for good (the user's call of 2026-11-02).
274
+ */
275
+ former_urls?: string[];
271
276
  };
272
277
  /**
273
278
  * A machine to open.
@@ -350,7 +355,7 @@ export type MachineCreate = {
350
355
  */
351
356
  commit?: string;
352
357
  /**
353
- * The ref of the project's environment the machine is bound to (environment_not_found for one the caller does not reach: an environment's own token or key makes what is bound to its environment alone). None: the environment called. Its name is the project's one: name_taken when another environment holds a machine of that name.
358
+ * The ref of the environment called, when given: a new machine is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a machine of that name.
354
359
  */
355
360
  environment?: string;
356
361
  };
@@ -576,6 +581,15 @@ export type Database = {
576
581
  */
577
582
  traffic_limit_bytes?: number;
578
583
  environment?: EnvironmentRef;
584
+ moving_to?: EnvironmentRef;
585
+ /**
586
+ * Why the database's last move to another environment was not made, when it was not: the environment it was moving to holds a database of its name by then, or is gone.
587
+ */
588
+ move_note?: string;
589
+ /**
590
+ * The hosts the database had in the environments of its project it was bound to before it moved: it answers at them too, for good (the user's call of 2026-11-02).
591
+ */
592
+ former_hosts?: string[];
579
593
  };
580
594
  /**
581
595
  * A page of a project's databases, by name.
@@ -608,7 +622,7 @@ export type DatabaseCreate = {
608
622
  */
609
623
  backup_days?: number;
610
624
  /**
611
- * The ref of the project's environment the database is bound to (environment_not_found for one the caller does not reach: an environment's own token or key makes what is bound to its environment alone). None: the environment called. Its name is the project's one: name_taken when another environment holds a database of that name.
625
+ * The ref of the environment called, when given: a new database is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a database of that name.
612
626
  */
613
627
  environment?: string;
614
628
  };
@@ -1520,6 +1534,11 @@ export type Site = {
1520
1534
  */
1521
1535
  preview_forks: boolean;
1522
1536
  environment?: EnvironmentRef;
1537
+ moving_to?: EnvironmentRef;
1538
+ /**
1539
+ * Why the site's last move to another environment was not made, when it was not: the environment it was moving to holds a site of its name by then, has one of its domains added, or is gone.
1540
+ */
1541
+ move_note?: string;
1523
1542
  };
1524
1543
  /**
1525
1544
  * The release a site serves; none before its first.
@@ -1567,7 +1586,7 @@ export type SiteCreate = {
1567
1586
  */
1568
1587
  preview_forks?: boolean;
1569
1588
  /**
1570
- * The ref of the project's environment the site is bound to (environment_not_found for one the caller does not reach: an environment's own token or key makes what is bound to its environment alone). None: the environment called. Its name is the project's one: name_taken when another environment holds a site of that name.
1589
+ * The ref of the environment called, when given: a new site is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a site of that name.
1571
1590
  */
1572
1591
  environment?: string;
1573
1592
  };
@@ -1937,6 +1956,28 @@ export type MachineMove = {
1937
1956
  */
1938
1957
  environment: string;
1939
1958
  };
1959
+ /**
1960
+ * Binds a site to another environment of its project.
1961
+ */
1962
+ export type SiteMove = {
1963
+ /**
1964
+ * The ref of the environment of the project the site moves to.
1965
+ */
1966
+ environment: string;
1967
+ };
1968
+ /**
1969
+ * Binds a database to another environment of its project.
1970
+ */
1971
+ export type DatabaseMove = {
1972
+ /**
1973
+ * The ref of the environment of the project the database moves to.
1974
+ */
1975
+ environment: string;
1976
+ /**
1977
+ * Moves the machines of its environment that run its migrations with it, in one step: they move once it has, its migrations theirs where it moves. Without it, a move such machines would be left behind by is refused (migrations_where_kept).
1978
+ */
1979
+ with_machines?: boolean;
1980
+ };
1940
1981
  /** Palbase Machines */
1941
1982
  export declare function client(t: Transport): {
1942
1983
  /**
@@ -1944,7 +1985,7 @@ export declare function client(t: Transport): {
1944
1985
  *
1945
1986
  * Lists the project's machines, by name.
1946
1987
  *
1947
- * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A name, in any request that names one (/machines/{name}/…), is found in the environment it is bound to and the request is answered there.
1988
+ * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /machines/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.
1948
1989
  */
1949
1990
  listMachines(input?: {
1950
1991
  query?: {
@@ -2221,7 +2262,7 @@ export declare function client(t: Transport): {
2221
2262
  *
2222
2263
  * Lists the project's databases by name, deleted ones that may still be taken back among them.
2223
2264
  *
2224
- * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A name, in any request that names one (/databases/{name}/…), is found in the environment it is bound to and the request is answered there.
2265
+ * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /databases/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.
2225
2266
  */
2226
2267
  listDatabases(input?: {
2227
2268
  query?: {
@@ -2602,7 +2643,7 @@ export declare function client(t: Transport): {
2602
2643
  *
2603
2644
  * Lists the project's sites, by name: a project has 10 at most.
2604
2645
  *
2605
- * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A name, in any request that names one (/sites/{name}/…), is found in the environment it is bound to and the request is answered there.
2646
+ * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /sites/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.
2606
2647
  */
2607
2648
  listSites(input?: {
2608
2649
  query?: {
@@ -2849,7 +2890,7 @@ export declare function client(t: Transport): {
2849
2890
  /**
2850
2891
  * Move a machine to another environment of its project
2851
2892
  *
2852
- * Binds the machine to another environment of its project (the user's call of 2026-11-01): it takes that environment's settings, secrets and modules from its next start, and its address names it (<name>-<the environment's ref>). The operator moves it — out of the environment it leaves, into the new one at the version it serves — in its own pass: the machine says where it is moving (moving_to) until it has, a second or so. Its pull requests' previews are closed; a new push opens them in the new environment. The database it is given stays where it is kept, given across environments. Its name is the project's one (name_taken when the new environment holds a machine of that name); a machine with domains of its own does not move (machine_has_domains): they are removed first. It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found).
2893
+ * Binds the machine to another environment of its project (the user's call of 2026-11-01): it takes that environment's settings, secrets and modules from its next start, and its address names it (<name>-<the environment's ref>). The operator moves it — out of the environment it leaves, into the new one at the version it serves — in its own pass: the machine says where it is moving (moving_to) until it has, a second or so, and what ran where it left answers until it is up in the new one (moved_from; ten minutes at most). It answers at the address it had too, for good (former_urls; the user's call of 2026-11-02). Its domains of its own move with it, and answer throughout: none of them may be added in the new environment too (domain_in_environment), and the new environment must have room for them (too_many_domains). Its pull requests' previews are closed; a new push opens them in the new environment. The database it is given stays where it is kept, given across environments. Its name is the project's one (name_taken when the new environment holds a machine of that name). It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found).
2853
2894
  */
2854
2895
  moveMachine(input: {
2855
2896
  path: {
@@ -2857,6 +2898,30 @@ export declare function client(t: Transport): {
2857
2898
  };
2858
2899
  body: MachineMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2859
2900
  signal?: AbortSignal;
2860
- }): Promise<Reply<202, Machine>>;
2901
+ }): Promise<Reply<200, Machine> | Reply<202, Machine>>;
2902
+ /**
2903
+ * Move a site to another environment of its project
2904
+ *
2905
+ * Binds the site to another environment of its project (the user's call of 2026-11-01), as a machine moves: the operator copies its files and releases to the new environment while it serves on where it is, then moves it — its releases, its builds, its domains of its own — in one transaction, a few seconds after the request; its address names the new environment from then on (<name>-<the environment's ref>), and it answers at the one it had too, for good (urls; the user's call of 2026-11-02). Its pull requests' previews are closed; a new push opens them in the new environment. A build of it going on is stopped and built again there; the GitHub installation it is built through is linked to the new environment when it is not. Meanwhile a change of it is refused (409 site_moving), and a move to its own environment lets the move go. The new environment must have room for it (too_many_sites, sites_full, too_many_domains), no site of its name (name_taken) and none of its domains added too (domain_in_environment). A site the platform's operator took down moves nowhere (site_taken_down). It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found). A move that cannot be made is let go of, and the site says why (move_note).
2906
+ */
2907
+ moveSite(input: {
2908
+ path: {
2909
+ name: string;
2910
+ };
2911
+ body: SiteMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2912
+ signal?: AbortSignal;
2913
+ }): Promise<Reply<200, Site> | Reply<202, Site>>;
2914
+ /**
2915
+ * Move a database to another environment of its project
2916
+ *
2917
+ * Binds the database to another environment of its project (the user's call of 2026-11-01): what it is — its row, what it is counted and paid for from then on, its address — becomes the new environment's, a few seconds after the request; what holds its data stays where it was made, so nothing is copied and it answers throughout. Its host names the new environment from then on (<name>-<the environment's ref>), and the one it had answers too, for good (former_hosts; the user's call of 2026-11-02); the machines given it are rolled out to the new host, beside the version that serves. Its migrations are the machines' of the environment that keeps it: the machines that run them move with it when with_machines says so — said to move in one step, each after the database — or the move is refused (migrations_where_kept, with the machines). A pull request preview's own database moves with nothing (preview_database); one being resized, restored or archived moves once that is done (database_busy). The new environment must have room for it as for a database opened there (free_database_taken, too_many_databases, size_not_available, backup_days_not_available) and no database of its name (name_taken). Meanwhile a change of it is refused (409 database_moving), and a move to its own environment lets the move go. It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found). A move that cannot be made is let go of, and the database says why (move_note).
2918
+ */
2919
+ moveDatabase(input: {
2920
+ path: {
2921
+ name: string;
2922
+ };
2923
+ body: DatabaseMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2924
+ signal?: AbortSignal;
2925
+ }): Promise<Reply<200, Database> | Reply<202, Database>>;
2861
2926
  };
2862
2927
  export type Client = ReturnType<typeof client>;