@ts-cloud/core 0.7.29 → 0.7.31
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/app-database.d.ts +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/types.d.ts +11 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CloudConfig, DatabaseConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the application's on-box/managed database declaration.
|
|
4
|
+
*
|
|
5
|
+
* `infrastructure.appDatabase` is the ONE canonical key — every ts-cloud code
|
|
6
|
+
* path that creates the database, wires `DB_*` env, backs it up, or restores it
|
|
7
|
+
* resolves through this helper so the surface can never drift again.
|
|
8
|
+
*
|
|
9
|
+
* Backward compatibility: early configs (e.g. bughq) declared the same block as
|
|
10
|
+
* `infrastructure.compute.database`. That alias is still honored when the
|
|
11
|
+
* canonical key is absent; `appDatabase` wins when both are set.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveAppDatabase(config: Pick<CloudConfig, 'infrastructure'>): DatabaseConfig | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './types';
|
|
5
5
|
export * from './deployment-mode';
|
|
6
|
+
export * from './app-database';
|
|
6
7
|
export * from './drivers';
|
|
7
8
|
export * from './template-builder';
|
|
8
9
|
export { validateTemplate, validateTemplateSize, validateResourceLimits, type ValidationResult, } from './template-validator';
|
package/dist/index.js
CHANGED
|
@@ -1100,6 +1100,10 @@ function deploymentCoexistenceError(config) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
return null;
|
|
1102
1102
|
}
|
|
1103
|
+
// src/app-database.ts
|
|
1104
|
+
function resolveAppDatabase(config) {
|
|
1105
|
+
return config.infrastructure?.appDatabase ?? config.infrastructure?.compute?.database;
|
|
1106
|
+
}
|
|
1103
1107
|
// src/drivers/types.ts
|
|
1104
1108
|
function resolveCloudProvider(config) {
|
|
1105
1109
|
if (config.cloud?.provider)
|
|
@@ -47275,6 +47279,7 @@ export {
|
|
|
47275
47279
|
resolveDashboardDomain,
|
|
47276
47280
|
resolveCredentials,
|
|
47277
47281
|
resolveCloudProvider,
|
|
47282
|
+
resolveAppDatabase,
|
|
47278
47283
|
resolveApp,
|
|
47279
47284
|
requiresReplacement,
|
|
47280
47285
|
replicaManager,
|
package/dist/types.d.ts
CHANGED
|
@@ -2382,6 +2382,17 @@ export interface ComputeConfig {
|
|
|
2382
2382
|
* `services` array above.
|
|
2383
2383
|
*/
|
|
2384
2384
|
managedServices?: ComputeServicesConfig;
|
|
2385
|
+
/**
|
|
2386
|
+
* Application database created on the box's {@link managedServices} engine
|
|
2387
|
+
* (role + schema, Forge-style).
|
|
2388
|
+
*
|
|
2389
|
+
* @deprecated Use the canonical {@link InfrastructureConfig.appDatabase}
|
|
2390
|
+
* instead — same shape, one obvious home next to the other infrastructure
|
|
2391
|
+
* declarations. This alias is still honored everywhere `appDatabase` is read
|
|
2392
|
+
* (see `resolveAppDatabase`) so existing configs keep working; `appDatabase`
|
|
2393
|
+
* wins when both are set.
|
|
2394
|
+
*/
|
|
2395
|
+
database?: DatabaseConfig;
|
|
2385
2396
|
/**
|
|
2386
2397
|
* Host firewall (UFW). When enabled, only SSH + the listed ports are open.
|
|
2387
2398
|
* On Hetzner this complements the cloud firewall; on a bare box it's the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-cloud/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core CloudFormation generation library for ts-cloud",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typecheck": "tsc --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ts-cloud/aws-types": "0.7.
|
|
34
|
+
"@ts-cloud/aws-types": "0.7.31"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "^7.0.2"
|