@fabrika/provider-contract 0.9.0-dev.12 → 0.9.0-dev.14
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/package.json +3 -3
- package/src/control.ts +13 -0
- package/types/src/control.d.ts +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/provider-contract",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test": "bun test"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@fabrika/auth-core": "0.9.0-dev.
|
|
46
|
-
"@fabrika/proxy-core": "0.9.0-dev.
|
|
45
|
+
"@fabrika/auth-core": "0.9.0-dev.14",
|
|
46
|
+
"@fabrika/proxy-core": "0.9.0-dev.14"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/src/control.ts
CHANGED
|
@@ -165,6 +165,14 @@ export interface ProviderDeployInput {
|
|
|
165
165
|
* them (ADR-0070 §9). A provider whose application runs in no object ignores it; absent, the provider's defaults.
|
|
166
166
|
*/
|
|
167
167
|
readonly applicationObjects?: ApplicationObjects
|
|
168
|
+
/**
|
|
169
|
+
* Present when the deploy brings migration files with a `dataLoss` statement of any kind, which may change stored data, and that the version running does not hold
|
|
170
|
+
* (ADR-0050): the provider backs up the application's database, and waits until the backup is stored, before any
|
|
171
|
+
* version that can run them starts. A backup that fails or does not finish fails the run with nothing deployed.
|
|
172
|
+
* Control hands it only to a provider without `dataOperations`, whose migration phase backs up itself (ADR-0070 §8),
|
|
173
|
+
* and never to a dry run or a dev bootstrap.
|
|
174
|
+
*/
|
|
175
|
+
readonly backupBeforeMigrations?: { readonly migrations: readonly string[] }
|
|
168
176
|
readonly dryRun: boolean
|
|
169
177
|
readonly sourceBinding?: ProviderSourceBinding
|
|
170
178
|
/**
|
|
@@ -716,4 +724,9 @@ export interface ControlProvider {
|
|
|
716
724
|
* access snapshot there (ADR-0050). Absent means the repository root.
|
|
717
725
|
*/
|
|
718
726
|
applicationRoot?(source: ProviderSource): string | null
|
|
727
|
+
/**
|
|
728
|
+
* The database an application of this provider runs its migrations on, which Control classifies them for: SQLite in
|
|
729
|
+
* the application's Durable Object on Cloudflare (ADR-0065). Absent means Postgres.
|
|
730
|
+
*/
|
|
731
|
+
readonly applicationDialect?: 'postgres' | 'sqlite'
|
|
719
732
|
}
|
package/types/src/control.d.ts
CHANGED
|
@@ -149,6 +149,16 @@ export interface ProviderDeployInput {
|
|
|
149
149
|
* them (ADR-0070 §9). A provider whose application runs in no object ignores it; absent, the provider's defaults.
|
|
150
150
|
*/
|
|
151
151
|
readonly applicationObjects?: ApplicationObjects;
|
|
152
|
+
/**
|
|
153
|
+
* Present when the deploy brings migration files with a `dataLoss` statement of any kind, which may change stored data, and that the version running does not hold
|
|
154
|
+
* (ADR-0050): the provider backs up the application's database, and waits until the backup is stored, before any
|
|
155
|
+
* version that can run them starts. A backup that fails or does not finish fails the run with nothing deployed.
|
|
156
|
+
* Control hands it only to a provider without `dataOperations`, whose migration phase backs up itself (ADR-0070 §8),
|
|
157
|
+
* and never to a dry run or a dev bootstrap.
|
|
158
|
+
*/
|
|
159
|
+
readonly backupBeforeMigrations?: {
|
|
160
|
+
readonly migrations: readonly string[];
|
|
161
|
+
};
|
|
152
162
|
readonly dryRun: boolean;
|
|
153
163
|
readonly sourceBinding?: ProviderSourceBinding;
|
|
154
164
|
/**
|
|
@@ -639,4 +649,9 @@ export interface ControlProvider {
|
|
|
639
649
|
* access snapshot there (ADR-0050). Absent means the repository root.
|
|
640
650
|
*/
|
|
641
651
|
applicationRoot?(source: ProviderSource): string | null;
|
|
652
|
+
/**
|
|
653
|
+
* The database an application of this provider runs its migrations on, which Control classifies them for: SQLite in
|
|
654
|
+
* the application's Durable Object on Cloudflare (ADR-0065). Absent means Postgres.
|
|
655
|
+
*/
|
|
656
|
+
readonly applicationDialect?: 'postgres' | 'sqlite';
|
|
642
657
|
}
|