palbase 0.36.3 → 0.37.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/dist/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{4KZO2C5H.js → 6FVAAS5I.js} +2 -2
- package/dist/chunks/{OEWOP7JD.js → AYPQOPOF.js} +1 -1
- package/dist/chunks/{ZBRTF44F.js → DQYLTIE5.js} +2 -2
- package/dist/chunks/{FOODO57K.js → GCVJJS4Y.js} +1 -1
- package/dist/chunks/{6PGRSVYO.js → GHUIGLRJ.js} +2 -2
- package/dist/chunks/{3MGAJ4QB.js → H6LQPKWU.js} +1 -1
- package/dist/chunks/{U5N652TM.js → I6H2425X.js} +2 -2
- package/dist/chunks/{UU53ZCFV.js → IZ6RIKPB.js} +2 -2
- package/dist/chunks/{MVB43ENS.js → JEA6LCOK.js} +2 -2
- package/dist/chunks/{BGY524G7.js → LEBJY4WH.js} +2 -2
- package/dist/chunks/{5J224ZLW.js → MW7YMYNO.js} +1 -1
- package/dist/chunks/{AKTUT5UR.js → NPJJBKWB.js} +2 -2
- package/dist/chunks/{5SP42QUJ.js → PMT4A5UW.js} +2 -2
- package/dist/chunks/{6UCMNHJR.js → QA6474UP.js} +2 -2
- package/dist/chunks/{RWVDZGUN.js → RAPT7CYO.js} +1 -1
- package/dist/chunks/{HPMVVGYC.js → SRDV2B4P.js} +2 -2
- package/dist/chunks/{N246ARLY.js → TPQAYDWC.js} +1 -1
- package/dist/chunks/{4VCY7CWJ.js → UA3CCXS4.js} +2 -2
- package/dist/chunks/{PGNK2ATJ.js → VU2SS32B.js} +2 -2
- package/dist/chunks/{JLQ6DNXQ.js → XYRYBY7I.js} +2 -2
- package/dist/chunks/{GPCVPQRD.js → YO6MPQJ4.js} +2 -2
- package/dist/chunks/{OSMUZCE3.js → YOR7K46P.js} +1 -1
- package/dist/chunks/{KKJGY76F.js → YT7ZMYMN.js} +2 -2
- package/dist/cli.js +132 -132
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/cloud/src/generated/project.d.ts +1 -1
- package/types/cloud/src/generated/studio.d.ts +4 -0
- package/types/internal/src/modules/machines.d.ts +64 -2
|
@@ -266,6 +266,8 @@ export type Machine = {
|
|
|
266
266
|
* Why the contract of the build the machine serves from was refused, in its app's words where it said.
|
|
267
267
|
*/
|
|
268
268
|
contract_error?: string;
|
|
269
|
+
environment?: EnvironmentRef;
|
|
270
|
+
moving_to?: EnvironmentRef;
|
|
269
271
|
};
|
|
270
272
|
/**
|
|
271
273
|
* A machine to open.
|
|
@@ -347,6 +349,10 @@ export type MachineCreate = {
|
|
|
347
349
|
* For a source read with tokens, the first build's commit (its full SHA): the branch's head (409 commit_not_head otherwise); the head when left out.
|
|
348
350
|
*/
|
|
349
351
|
commit?: string;
|
|
352
|
+
/**
|
|
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.
|
|
354
|
+
*/
|
|
355
|
+
environment?: string;
|
|
350
356
|
};
|
|
351
357
|
/**
|
|
352
358
|
* A page of a project's machines, by name.
|
|
@@ -569,6 +575,7 @@ export type Database = {
|
|
|
569
575
|
* How much its size lets it read from and write to its disk in a month: past it, it sleeps until the month ends, and a client is told so. Absent for a size with no such limit.
|
|
570
576
|
*/
|
|
571
577
|
traffic_limit_bytes?: number;
|
|
578
|
+
environment?: EnvironmentRef;
|
|
572
579
|
};
|
|
573
580
|
/**
|
|
574
581
|
* A page of a project's databases, by name.
|
|
@@ -600,6 +607,10 @@ export type DatabaseCreate = {
|
|
|
600
607
|
* How many days the database's backups are kept: it can be brought back to any moment of them. 1 to 35.
|
|
601
608
|
*/
|
|
602
609
|
backup_days?: number;
|
|
610
|
+
/**
|
|
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.
|
|
612
|
+
*/
|
|
613
|
+
environment?: string;
|
|
603
614
|
};
|
|
604
615
|
/**
|
|
605
616
|
* A change to a database; a field left out stays as it is.
|
|
@@ -852,6 +863,7 @@ export type MachineDatabase = {
|
|
|
852
863
|
* The machine's releases run their migrations against the database before they serve (a Palbase backend's); they are run as the database's owner. A database's migrations are one machine's: a second machine asking for them is refused (409 `database_migrated_elsewhere`).
|
|
853
864
|
*/
|
|
854
865
|
migrations?: boolean;
|
|
866
|
+
environment?: EnvironmentRef;
|
|
855
867
|
};
|
|
856
868
|
/**
|
|
857
869
|
* When to bring the database back to.
|
|
@@ -1507,6 +1519,7 @@ export type Site = {
|
|
|
1507
1519
|
* Whether a pull request from a fork — another repository, which anyone may open — is previewed too. Off by default: its build would run with the environment's build settings.
|
|
1508
1520
|
*/
|
|
1509
1521
|
preview_forks: boolean;
|
|
1522
|
+
environment?: EnvironmentRef;
|
|
1510
1523
|
};
|
|
1511
1524
|
/**
|
|
1512
1525
|
* The release a site serves; none before its first.
|
|
@@ -1553,6 +1566,10 @@ export type SiteCreate = {
|
|
|
1553
1566
|
* Whether a fork's pull requests are previewed (Site.preview_forks).
|
|
1554
1567
|
*/
|
|
1555
1568
|
preview_forks?: boolean;
|
|
1569
|
+
/**
|
|
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.
|
|
1571
|
+
*/
|
|
1572
|
+
environment?: string;
|
|
1556
1573
|
};
|
|
1557
1574
|
/**
|
|
1558
1575
|
* What to change of a site; a field left out is unchanged.
|
|
@@ -1898,17 +1915,42 @@ export type PreviewDeploy = {
|
|
|
1898
1915
|
*/
|
|
1899
1916
|
git_access_token?: string;
|
|
1900
1917
|
};
|
|
1918
|
+
/**
|
|
1919
|
+
* An environment of the project, as a machine, a database or a site is bound to it: its ref — the one its address names — and its name. On a machine, a database or a site: the environment it is bound to — a machine takes that environment's settings, secrets and modules, a site is built with its settings and secrets, any machine of the project may be given a database whichever environment keeps it. On a machine's database: the environment that keeps it, when it is not the machine's; given in a change ({"ref": …}), the environment to find the database in — none finds it in the machine's own environment first, then in the project's others (ambiguous_database when two keep one of that name).
|
|
1920
|
+
*/
|
|
1921
|
+
export type EnvironmentRef = {
|
|
1922
|
+
/**
|
|
1923
|
+
* The environment's ref: where it answers (<ref>.<domain>), and what a machine's, a database's or a site's address ends with.
|
|
1924
|
+
*/
|
|
1925
|
+
ref: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* The environment's name.
|
|
1928
|
+
*/
|
|
1929
|
+
name?: string;
|
|
1930
|
+
};
|
|
1931
|
+
/**
|
|
1932
|
+
* Binds a machine to another environment of its project.
|
|
1933
|
+
*/
|
|
1934
|
+
export type MachineMove = {
|
|
1935
|
+
/**
|
|
1936
|
+
* The ref of the environment of the project the machine moves to.
|
|
1937
|
+
*/
|
|
1938
|
+
environment: string;
|
|
1939
|
+
};
|
|
1901
1940
|
/** Palbase Machines */
|
|
1902
1941
|
export declare function client(t: Transport): {
|
|
1903
1942
|
/**
|
|
1904
1943
|
* List machines
|
|
1905
1944
|
*
|
|
1906
1945
|
* Lists the project's machines, by name.
|
|
1946
|
+
*
|
|
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.
|
|
1907
1948
|
*/
|
|
1908
1949
|
listMachines(input?: {
|
|
1909
1950
|
query?: {
|
|
1910
1951
|
limit?: number; /** The next_cursor of the previous page. Opaque; omit it for the first page. */
|
|
1911
|
-
cursor?: string;
|
|
1952
|
+
cursor?: string; /** The ref of one of the project's environments: what is bound to it alone. None: every environment the caller reaches — every one of the project's for a developer, an organization's token or an account token; an environment's own token or key reaches its environment alone. */
|
|
1953
|
+
environment?: string;
|
|
1912
1954
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1913
1955
|
signal?: AbortSignal;
|
|
1914
1956
|
}): Promise<Reply<200, MachinePage>>;
|
|
@@ -2178,11 +2220,14 @@ export declare function client(t: Transport): {
|
|
|
2178
2220
|
* List the databases
|
|
2179
2221
|
*
|
|
2180
2222
|
* Lists the project's databases by name, deleted ones that may still be taken back among them.
|
|
2223
|
+
*
|
|
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.
|
|
2181
2225
|
*/
|
|
2182
2226
|
listDatabases(input?: {
|
|
2183
2227
|
query?: {
|
|
2184
2228
|
limit?: number; /** The next_cursor of the previous page. Opaque; omit it for the first page. */
|
|
2185
|
-
cursor?: string;
|
|
2229
|
+
cursor?: string; /** The ref of one of the project's environments: what is bound to it alone. None: every environment the caller reaches — every one of the project's for a developer, an organization's token or an account token; an environment's own token or key reaches its environment alone. */
|
|
2230
|
+
environment?: string;
|
|
2186
2231
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2187
2232
|
signal?: AbortSignal;
|
|
2188
2233
|
}): Promise<Reply<200, DatabasePage>>;
|
|
@@ -2556,8 +2601,13 @@ export declare function client(t: Transport): {
|
|
|
2556
2601
|
* List sites
|
|
2557
2602
|
*
|
|
2558
2603
|
* Lists the project's sites, by name: a project has 10 at most.
|
|
2604
|
+
*
|
|
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.
|
|
2559
2606
|
*/
|
|
2560
2607
|
listSites(input?: {
|
|
2608
|
+
query?: {
|
|
2609
|
+
environment?: string;
|
|
2610
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2561
2611
|
signal?: AbortSignal;
|
|
2562
2612
|
}): Promise<Reply<200, SiteList>>;
|
|
2563
2613
|
/**
|
|
@@ -2796,5 +2846,17 @@ export declare function client(t: Transport): {
|
|
|
2796
2846
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2797
2847
|
signal?: AbortSignal;
|
|
2798
2848
|
}): Promise<Reply<202, PreviewOpened>>;
|
|
2849
|
+
/**
|
|
2850
|
+
* Move a machine to another environment of its project
|
|
2851
|
+
*
|
|
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).
|
|
2853
|
+
*/
|
|
2854
|
+
moveMachine(input: {
|
|
2855
|
+
path: {
|
|
2856
|
+
name: string;
|
|
2857
|
+
};
|
|
2858
|
+
body: MachineMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2859
|
+
signal?: AbortSignal;
|
|
2860
|
+
}): Promise<Reply<202, Machine>>;
|
|
2799
2861
|
};
|
|
2800
2862
|
export type Client = ReturnType<typeof client>;
|