@stacksjs/ts-cloud 0.7.96 → 0.7.98
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/bin/cli.js +578 -578
- package/dist/bin/dashboard-server.js +324 -324
- package/dist/{chunk-ws3r73x9.js → chunk-1x4xrdkt.js} +93 -8
- package/dist/{chunk-7jkxqr0b.js → chunk-3g4r09dd.js} +1 -1
- package/dist/{chunk-80apz7eb.js → chunk-89kbfd6c.js} +13 -5
- package/dist/{chunk-hmehkeqx.js → chunk-c6db5m63.js} +3 -1
- package/dist/{chunk-ecc6h5nh.js → chunk-fmt40tpw.js} +2 -2
- package/dist/deploy/dashboard-vitess-provision.d.ts +32 -0
- package/dist/deploy/dashboard-vitess-provision.test.d.ts +1 -0
- package/dist/deploy/index.js +4 -4
- package/dist/drivers/index.js +2 -2
- package/dist/index.js +4 -4
- package/dist/ui/account/automation.html +4 -4
- package/dist/ui/account/security.html +2 -2
- package/dist/ui/applications/compose.html +4 -4
- package/dist/ui/applications/new.html +2 -2
- package/dist/ui/data/backups.html +4 -4
- package/dist/ui/data/services.html +4 -4
- package/dist/ui/data/volumes.html +4 -4
- package/dist/ui/index.html +4 -4
- package/dist/ui/operations/alerts.html +4 -4
- package/dist/ui/operations/configuration.html +4 -4
- package/dist/ui/operations/jobs.html +4 -4
- package/dist/ui/operations/maintenance.html +3 -3
- package/dist/ui/operations/observability.html +4 -4
- package/dist/ui/operations/previews.html +4 -4
- package/dist/ui/operations/queue.html +4 -4
- package/dist/ui/operations/regions.html +4 -4
- package/dist/ui/operations/releases.html +4 -4
- package/dist/ui/operations/workloads.html +4 -4
- package/dist/ui/server/actions.html +3 -3
- package/dist/ui/server/activity.html +2 -2
- package/dist/ui/server/capacity.html +4 -4
- package/dist/ui/server/database.html +47 -6
- package/dist/ui/server/deployments.html +3 -3
- package/dist/ui/server/diagnostics.html +2 -2
- package/dist/ui/server/firewall.html +4 -4
- package/dist/ui/server/fleet.html +4 -4
- package/dist/ui/server/logs.html +4 -4
- package/dist/ui/server/metrics.html +4 -4
- package/dist/ui/server/security.html +2 -2
- package/dist/ui/server/services.html +2 -2
- package/dist/ui/server/sites.html +4 -4
- package/dist/ui/server/ssh-keys.html +4 -4
- package/dist/ui/server/team.html +4 -4
- package/dist/ui/server/terminal.html +2 -2
- package/dist/ui/serverless/alarms.html +4 -4
- package/dist/ui/serverless/assets.html +2 -2
- package/dist/ui/serverless/cost.html +2 -2
- package/dist/ui/serverless/data.html +4 -4
- package/dist/ui/serverless/firewall.html +2 -2
- package/dist/ui/serverless/functions.html +4 -4
- package/dist/ui/serverless/logs.html +4 -4
- package/dist/ui/serverless/metrics.html +2 -2
- package/dist/ui/serverless/queues.html +4 -4
- package/dist/ui/serverless/secrets.html +3 -3
- package/dist/ui/serverless/traces.html +4 -4
- package/dist/ui/serverless.html +3 -3
- package/dist/ui-src/pages/server/database.stx +47 -0
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
step,
|
|
10
10
|
success,
|
|
11
11
|
warn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3g4r09dd.js";
|
|
13
13
|
import {
|
|
14
14
|
AwsBackupClient,
|
|
15
15
|
CloudWatchLogsClient,
|
|
@@ -36,7 +36,9 @@ import {
|
|
|
36
36
|
BACKUP_RUNNER_PATH,
|
|
37
37
|
PANTRY_PROJECT_DIR,
|
|
38
38
|
buildBackupRestoreScript,
|
|
39
|
+
buildPantryBootstrapScript,
|
|
39
40
|
buildRollbackScript,
|
|
41
|
+
buildVitessProvisionScript,
|
|
40
42
|
createCloudDriver,
|
|
41
43
|
pgAdminCommand,
|
|
42
44
|
releasePaths,
|
|
@@ -45,7 +47,7 @@ import {
|
|
|
45
47
|
resolveSiteKind,
|
|
46
48
|
resolveUiSource,
|
|
47
49
|
siteInstallBase
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-89kbfd6c.js";
|
|
49
51
|
import {
|
|
50
52
|
artifactKey,
|
|
51
53
|
buildCloudFormationTemplate,
|
|
@@ -67,7 +69,7 @@ import {
|
|
|
67
69
|
resolveStatePath,
|
|
68
70
|
setStateDir,
|
|
69
71
|
statePath
|
|
70
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-c6db5m63.js";
|
|
71
73
|
import {
|
|
72
74
|
SSMClient
|
|
73
75
|
} from "./chunk-7m60qnc8.js";
|
|
@@ -8375,7 +8377,7 @@ async function deployServerlessApp(config, environment2, opts = {}) {
|
|
|
8375
8377
|
}
|
|
8376
8378
|
if (imageMode) {
|
|
8377
8379
|
step("Building + pushing container image");
|
|
8378
|
-
const { buildAndPushServerlessImage } = await import("./chunk-
|
|
8380
|
+
const { buildAndPushServerlessImage } = await import("./chunk-fmt40tpw.js");
|
|
8379
8381
|
const built = await buildAndPushServerlessImage({
|
|
8380
8382
|
app,
|
|
8381
8383
|
projectRoot,
|
|
@@ -39994,6 +39996,64 @@ async function actOnMigration(config6, environment2, uuid, action) {
|
|
|
39994
39996
|
return { ...r, uuid };
|
|
39995
39997
|
}
|
|
39996
39998
|
|
|
39999
|
+
// src/deploy/dashboard-vitess-provision.ts
|
|
40000
|
+
function conflict(config6) {
|
|
40001
|
+
const database = config6.infrastructure?.appDatabase;
|
|
40002
|
+
if (database?.engine && database.engine !== "vitess")
|
|
40003
|
+
return `This project already declares ${database.engine} as its application database.`;
|
|
40004
|
+
const services = config6.infrastructure?.compute?.managedServices;
|
|
40005
|
+
const other = services ? ["mysql", "mariadb", "postgres"].find((engine) => Boolean(services[engine])) : undefined;
|
|
40006
|
+
if (other)
|
|
40007
|
+
return `This server already declares the ${other} database service.`;
|
|
40008
|
+
return;
|
|
40009
|
+
}
|
|
40010
|
+
function planDashboardVitessProvision(config6, input) {
|
|
40011
|
+
const keyspace = input.keyspace.trim();
|
|
40012
|
+
const username = input.username.trim();
|
|
40013
|
+
const password2 = input.password;
|
|
40014
|
+
const configuredConflict = conflict(config6);
|
|
40015
|
+
if (configuredConflict)
|
|
40016
|
+
throw new Error(configuredConflict);
|
|
40017
|
+
if (!isValidDbIdentifier(keyspace))
|
|
40018
|
+
throw new Error("Keyspace must contain letters, numbers, or underscores and cannot start with a number.");
|
|
40019
|
+
if (!isValidDbIdentifier(username))
|
|
40020
|
+
throw new Error("Username must contain letters, numbers, or underscores and cannot start with a number.");
|
|
40021
|
+
if (password2.length < 16)
|
|
40022
|
+
throw new Error("Password must contain at least 16 characters.");
|
|
40023
|
+
if (input.confirm !== keyspace)
|
|
40024
|
+
throw new Error(`Type "${keyspace}" to confirm Vitess provisioning.`);
|
|
40025
|
+
const service16 = {
|
|
40026
|
+
mode: "cluster",
|
|
40027
|
+
cell: "zone1",
|
|
40028
|
+
keyspaces: [{ name: keyspace, sharded: input.sharded === true }],
|
|
40029
|
+
vtgatePort: 15306,
|
|
40030
|
+
username,
|
|
40031
|
+
password: password2,
|
|
40032
|
+
bindAddress: "127.0.0.1"
|
|
40033
|
+
};
|
|
40034
|
+
return {
|
|
40035
|
+
service: service16,
|
|
40036
|
+
appDatabase: {
|
|
40037
|
+
engine: "vitess",
|
|
40038
|
+
name: keyspace,
|
|
40039
|
+
username,
|
|
40040
|
+
host: "127.0.0.1",
|
|
40041
|
+
port: 15306,
|
|
40042
|
+
ssl: false
|
|
40043
|
+
},
|
|
40044
|
+
commands: [...buildPantryBootstrapScript(), ...buildVitessProvisionScript(service16)]
|
|
40045
|
+
};
|
|
40046
|
+
}
|
|
40047
|
+
async function provisionVitessFromDashboard(config6, environment2, input) {
|
|
40048
|
+
const plan2 = planDashboardVitessProvision(config6, input);
|
|
40049
|
+
const result2 = await runDb(config6, environment2, plan2.commands, `ts-cloud vitess:provision ${plan2.appDatabase.name}`);
|
|
40050
|
+
return {
|
|
40051
|
+
...result2,
|
|
40052
|
+
database: plan2.appDatabase,
|
|
40053
|
+
service: Object.fromEntries(Object.entries(plan2.service).filter(([key2]) => key2 !== "password"))
|
|
40054
|
+
};
|
|
40055
|
+
}
|
|
40056
|
+
|
|
39997
40057
|
// src/deploy/dashboard-policy.ts
|
|
39998
40058
|
var FAIL_CLOSED = {
|
|
39999
40059
|
capability: "runtime:terminal",
|
|
@@ -40235,6 +40295,7 @@ var POLICIES = {
|
|
|
40235
40295
|
"GET /api/databases/vitess": { capability: "data:read" },
|
|
40236
40296
|
"GET /api/databases/vitess/migrations": { capability: "data:read" },
|
|
40237
40297
|
"POST /api/databases/vitess/migrations/action": { capability: "data:admin" },
|
|
40298
|
+
"POST /api/databases/vitess/provision": { capability: "runtime:terminal", scope: "organization" },
|
|
40238
40299
|
"POST /api/databases/vitess/keyspaces": { capability: "data:admin" },
|
|
40239
40300
|
"POST /api/databases/vitess/vschema": { capability: "data:admin" },
|
|
40240
40301
|
"POST /api/databases/vitess/schema": { capability: "data:admin" },
|
|
@@ -43616,6 +43677,9 @@ ${stderr}`);
|
|
|
43616
43677
|
}
|
|
43617
43678
|
}
|
|
43618
43679
|
function sanitizeCloudConfig(config6) {
|
|
43680
|
+
const managedServices = config6.infrastructure?.compute?.managedServices ? JSON.parse(JSON.stringify(config6.infrastructure.compute.managedServices)) : undefined;
|
|
43681
|
+
if (managedServices?.vitess?.password)
|
|
43682
|
+
managedServices.vitess.password = "";
|
|
43619
43683
|
return {
|
|
43620
43684
|
project: {
|
|
43621
43685
|
name: config6.project?.name,
|
|
@@ -43633,7 +43697,7 @@ function sanitizeCloudConfig(config6) {
|
|
|
43633
43697
|
onDemandTls: config6.infrastructure.compute.proxy.onDemandTls,
|
|
43634
43698
|
cdn: !!config6.infrastructure.compute.proxy.cdn
|
|
43635
43699
|
} : undefined,
|
|
43636
|
-
managedServices
|
|
43700
|
+
managedServices,
|
|
43637
43701
|
sshKeys: describeSshKeys(computeSshKeys(config6)).map((key2) => ({
|
|
43638
43702
|
name: key2.name,
|
|
43639
43703
|
type: key2.type,
|
|
@@ -43903,6 +43967,13 @@ async function startLocalDashboardServer(options = {}) {
|
|
|
43903
43967
|
process.env.TS_CLOUD_DASHBOARD_BOX = "1";
|
|
43904
43968
|
await loadLocalEnv(cwd);
|
|
43905
43969
|
const config6 = options.config ?? await loadCloudConfig();
|
|
43970
|
+
const dashboardDatabasePassword = process.env.TS_CLOUD_DASHBOARD_DB_PASSWORD;
|
|
43971
|
+
const appDatabase = resolveAppDatabase(config6);
|
|
43972
|
+
if (dashboardDatabasePassword && appDatabase && !appDatabase.password)
|
|
43973
|
+
appDatabase.password = dashboardDatabasePassword;
|
|
43974
|
+
const managedVitess = config6.infrastructure?.compute?.managedServices?.vitess;
|
|
43975
|
+
if (dashboardDatabasePassword && managedVitess && typeof managedVitess === "object" && !managedVitess.password)
|
|
43976
|
+
managedVitess.password = dashboardDatabasePassword;
|
|
43906
43977
|
const controlPlane = initializeDashboardControlPlane(cwd, config6);
|
|
43907
43978
|
if (controlPlane.reconciliation.failed > 0) {
|
|
43908
43979
|
console.warn(` ts-cloud dashboard: marked ${controlPlane.reconciliation.failed} orphaned operation(s) as failed after restart.`);
|
|
@@ -46971,14 +47042,14 @@ This replacement link expires ${created.invitation.expiresAt} and can be used on
|
|
|
46971
47042
|
const fields = checkMemberSiteFields(body);
|
|
46972
47043
|
if (!fields.ok)
|
|
46973
47044
|
return json15({ ok: false, error: fields.error }, 403);
|
|
46974
|
-
const
|
|
47045
|
+
const conflict2 = checkRouteConflict({
|
|
46975
47046
|
siteName: name,
|
|
46976
47047
|
body,
|
|
46977
47048
|
sites: config6.sites ?? {},
|
|
46978
47049
|
ownSites: Object.keys(scopedUser.sites)
|
|
46979
47050
|
});
|
|
46980
|
-
if (!
|
|
46981
|
-
return json15({ ok: false, error:
|
|
47051
|
+
if (!conflict2.ok)
|
|
47052
|
+
return json15({ ok: false, error: conflict2.error }, 409);
|
|
46982
47053
|
}
|
|
46983
47054
|
if (body.port !== undefined && body.port !== null && body.port !== "" && (!Number.isInteger(Number(body.port)) || Number(body.port) < 1 || Number(body.port) > 65535))
|
|
46984
47055
|
return json15({ ok: false, error: "Port must be a number between 1 and 65535." }, 422);
|
|
@@ -49220,6 +49291,20 @@ data: ${JSON.stringify({ cursor: position, at: new Date().toISOString() })}
|
|
|
49220
49291
|
missingPrimary: shardsMissingPrimary(topology2)
|
|
49221
49292
|
});
|
|
49222
49293
|
}
|
|
49294
|
+
if (url.pathname === "/api/databases/vitess/provision" && req.method === "POST") {
|
|
49295
|
+
const body = await readJsonBody(req);
|
|
49296
|
+
try {
|
|
49297
|
+
return json15(await provisionVitessFromDashboard(config6, environment2, {
|
|
49298
|
+
keyspace: String(body.keyspace ?? ""),
|
|
49299
|
+
username: String(body.username ?? ""),
|
|
49300
|
+
password: String(body.password ?? ""),
|
|
49301
|
+
sharded: body.sharded === true,
|
|
49302
|
+
confirm: String(body.confirm ?? "")
|
|
49303
|
+
}));
|
|
49304
|
+
} catch (error2) {
|
|
49305
|
+
return json15({ ok: false, error: error2 instanceof Error ? error2.message : String(error2) }, 422);
|
|
49306
|
+
}
|
|
49307
|
+
}
|
|
49223
49308
|
if (url.pathname === "/api/databases/vitess/migrations" && req.method === "GET") {
|
|
49224
49309
|
const keyspace = url.searchParams.get("keyspace") ?? undefined;
|
|
49225
49310
|
return json15(await listMigrations(config6, environment2, keyspace));
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resolveProjectStackName,
|
|
9
9
|
resolveStatePath,
|
|
10
10
|
statePath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-c6db5m63.js";
|
|
12
12
|
import {
|
|
13
13
|
EC2Client,
|
|
14
14
|
SSMClient
|
|
@@ -2478,7 +2478,7 @@ class AwsDriver {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
|
|
2480
2480
|
// src/drivers/hetzner/driver.ts
|
|
2481
|
-
import { execSync } from "node:child_process";
|
|
2481
|
+
import { execFileSync, execSync } from "node:child_process";
|
|
2482
2482
|
import { randomUUID } from "node:crypto";
|
|
2483
2483
|
import { existsSync, readFileSync as readFileSync2 } from "node:fs";
|
|
2484
2484
|
|
|
@@ -3692,6 +3692,8 @@ class HetznerDriver {
|
|
|
3692
3692
|
const pinned = [];
|
|
3693
3693
|
for (const id of pinnedIds) {
|
|
3694
3694
|
const server = servers2.find((candidate) => candidate.id === id) ?? await this.tryGetServer(id);
|
|
3695
|
+
if (id === state?.serverId && state.serverName && server?.name !== state.serverName)
|
|
3696
|
+
continue;
|
|
3695
3697
|
if (server && server.status !== "off")
|
|
3696
3698
|
pinned.push(server);
|
|
3697
3699
|
}
|
|
@@ -3957,10 +3959,10 @@ ${out}`);
|
|
|
3957
3959
|
}
|
|
3958
3960
|
}
|
|
3959
3961
|
sshExec(host, script) {
|
|
3960
|
-
const escaped = script.replace(/'/g, `'\\''`);
|
|
3961
3962
|
try {
|
|
3962
|
-
return
|
|
3963
|
+
return execFileSync("ssh", [...this.sshBaseArgs(host), "bash -s"], {
|
|
3963
3964
|
encoding: "utf8",
|
|
3965
|
+
input: script,
|
|
3964
3966
|
stdio: ["pipe", "pipe", "pipe"],
|
|
3965
3967
|
maxBuffer: SSH_MAX_BUFFER
|
|
3966
3968
|
});
|
|
@@ -5473,6 +5475,12 @@ function redactForDashboard(config) {
|
|
|
5473
5475
|
if (db?.password)
|
|
5474
5476
|
db.password = "";
|
|
5475
5477
|
}
|
|
5478
|
+
if (safe.infrastructure?.appDatabase?.password)
|
|
5479
|
+
safe.infrastructure.appDatabase.password = "";
|
|
5480
|
+
if (safe.infrastructure?.compute?.database?.password)
|
|
5481
|
+
safe.infrastructure.compute.database.password = "";
|
|
5482
|
+
if (safe.infrastructure?.compute?.managedServices?.vitess?.password)
|
|
5483
|
+
safe.infrastructure.compute.managedServices.vitess.password = "";
|
|
5476
5484
|
return safe;
|
|
5477
5485
|
}
|
|
5478
5486
|
function serializeDashboardConfig(config) {
|
|
@@ -6815,4 +6823,4 @@ function buildCloudFrontOriginConfig(options) {
|
|
|
6815
6823
|
CustomErrorResponses: { Quantity: 0 }
|
|
6816
6824
|
};
|
|
6817
6825
|
}
|
|
6818
|
-
export { collectServerDnsDomains, removeStaleServerAddressRecords, normalizePublicIpv6, IPV6_EXCLUDED_HOST_LABELS, hostAcceptsIpv6, reconcileAddressRecords, verifyAddressRecord, PANTRY_PROJECT_DIR, pgAdminCommand, BACKUP_RUNNER_PATH, buildBackupRestoreScript, siteInstallBase, isPhpSite, resolveSiteDeployTarget, resolveSiteKind, validateDeploymentConfig, shipsARelease, DEFAULT_RPX_CERTS_DIR, normalizeRoutePath, deriveRouteId, buildRpxConfig, buildRpxLbConfig, renderRpxLauncher, RPX_DIR, RPX_LAUNCHER_PATH, RPX_SERVICE_NAME, buildRpxProvisionScript, buildRpxFragmentRefreshScript, buildUbuntuBootstrapScript, AwsDriver, resolveHetznerLocation, HetznerClient, resolveHetznerApiToken2 as resolveHetznerApiToken, normalizeSshPublicKey, wrapCloudInitUserData, HetznerDriver, LocalBoxDriver, isBoxMode, createCloudDriver, CloudDriverFactory, cloudDrivers, planHetznerServerResize, isHetznerCapacityError, executeHetznerServerResize, buildSshArgs, sshExec, sshExecOrThrow, scpUpload, waitForSsh, waitForCloudInit, collectHetznerResizeManifest, prepareHetznerResize, verifyHetznerResize, resolveHetznerHostOptimizationPlan, buildHetznerHostOptimizationScript, applyHetznerHostOptimization, collectHetznerHostOptimizationReport, verifyHetznerHostOptimization, resizeCheckpointPath, resizeLockPath, readResizeCheckpoint, writeResizeCheckpoint, acquireResizeLock, ensureSshKey, ensureFirewall, ensureServer, serverPublicIpv4, UBUNTU_2404_AMI_PARAM, buildBoxUserData, HetznerBoxProvisioner, AwsBoxProvisioner, createBoxProvisioner, releasePaths, buildRollbackScript, resolveExecStart, buildSiteDeployScript, buildStaticSiteDeployScript, releaseTarballTmpPath, buildAwsArtifactFetch, buildLocalArtifactFetch, buildHostCleanupScript, MANAGEMENT_DASHBOARD_SITE, dashboardCredentialsFile, resolveDashboardAuth, resolveUiSource, ensureManagementDashboard, buildManagementDashboardArtifact, resolveSiteFramework, deploySiteRelease, deployAllComputeSites, reloadRpxGateway, renewRpxCertificates, MANAGED_CACHE_POLICY_OPTIMIZED, MANAGED_CACHE_POLICY_DISABLED, MANAGED_ORIGIN_REQUEST_POLICY_ALL_VIEWER, buildCloudFrontOriginConfig };
|
|
6826
|
+
export { collectServerDnsDomains, removeStaleServerAddressRecords, normalizePublicIpv6, IPV6_EXCLUDED_HOST_LABELS, hostAcceptsIpv6, reconcileAddressRecords, verifyAddressRecord, PANTRY_PROJECT_DIR, buildPantryBootstrapScript, buildVitessProvisionScript, pgAdminCommand, BACKUP_RUNNER_PATH, buildBackupRestoreScript, siteInstallBase, isPhpSite, resolveSiteDeployTarget, resolveSiteKind, validateDeploymentConfig, shipsARelease, DEFAULT_RPX_CERTS_DIR, normalizeRoutePath, deriveRouteId, buildRpxConfig, buildRpxLbConfig, renderRpxLauncher, RPX_DIR, RPX_LAUNCHER_PATH, RPX_SERVICE_NAME, buildRpxProvisionScript, buildRpxFragmentRefreshScript, buildUbuntuBootstrapScript, AwsDriver, resolveHetznerLocation, HetznerClient, resolveHetznerApiToken2 as resolveHetznerApiToken, normalizeSshPublicKey, wrapCloudInitUserData, HetznerDriver, LocalBoxDriver, isBoxMode, createCloudDriver, CloudDriverFactory, cloudDrivers, planHetznerServerResize, isHetznerCapacityError, executeHetznerServerResize, buildSshArgs, sshExec, sshExecOrThrow, scpUpload, waitForSsh, waitForCloudInit, collectHetznerResizeManifest, prepareHetznerResize, verifyHetznerResize, resolveHetznerHostOptimizationPlan, buildHetznerHostOptimizationScript, applyHetznerHostOptimization, collectHetznerHostOptimizationReport, verifyHetznerHostOptimization, resizeCheckpointPath, resizeLockPath, readResizeCheckpoint, writeResizeCheckpoint, acquireResizeLock, ensureSshKey, ensureFirewall, ensureServer, serverPublicIpv4, UBUNTU_2404_AMI_PARAM, buildBoxUserData, HetznerBoxProvisioner, AwsBoxProvisioner, createBoxProvisioner, releasePaths, buildRollbackScript, resolveExecStart, buildSiteDeployScript, buildStaticSiteDeployScript, releaseTarballTmpPath, buildAwsArtifactFetch, buildLocalArtifactFetch, buildHostCleanupScript, MANAGEMENT_DASHBOARD_SITE, dashboardCredentialsFile, resolveDashboardAuth, resolveUiSource, ensureManagementDashboard, buildManagementDashboardArtifact, resolveSiteFramework, deploySiteRelease, deployAllComputeSites, reloadRpxGateway, renewRpxCertificates, MANAGED_CACHE_POLICY_OPTIMIZED, MANAGED_CACHE_POLICY_DISABLED, MANAGED_ORIGIN_REQUEST_POLICY_ALL_VIEWER, buildCloudFrontOriginConfig };
|
|
@@ -21992,6 +21992,7 @@ function resolveManagementDashboardSites(config, environment, opts) {
|
|
|
21992
21992
|
if (!domain)
|
|
21993
21993
|
return [];
|
|
21994
21994
|
const port = opts.port ?? deriveManagementDashboardPort(domain);
|
|
21995
|
+
const database2 = config.infrastructure?.appDatabase ?? config.infrastructure?.compute?.database;
|
|
21995
21996
|
const site = {
|
|
21996
21997
|
root: opts.uiRoot,
|
|
21997
21998
|
deploy: "server",
|
|
@@ -22002,7 +22003,8 @@ function resolveManagementDashboardSites(config, environment, opts) {
|
|
|
22002
22003
|
env: {
|
|
22003
22004
|
APP_ENV: "production",
|
|
22004
22005
|
NODE_ENV: "production",
|
|
22005
|
-
TS_CLOUD_DASHBOARD_TELEMETRY: "1"
|
|
22006
|
+
TS_CLOUD_DASHBOARD_TELEMETRY: "1",
|
|
22007
|
+
...database2?.password ? { TS_CLOUD_DASHBOARD_DB_PASSWORD: database2.password } : {}
|
|
22006
22008
|
},
|
|
22007
22009
|
zeroDowntime: false,
|
|
22008
22010
|
sharedPaths: [DASHBOARD_STATE_DIR],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAndPushServerlessImage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3g4r09dd.js";
|
|
4
4
|
import"./chunk-50jpda9q.js";
|
|
5
|
-
import"./chunk-
|
|
5
|
+
import"./chunk-c6db5m63.js";
|
|
6
6
|
import"./chunk-zqtpg06c.js";
|
|
7
7
|
import"./chunk-v0bahtg2.js";
|
|
8
8
|
export {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CloudConfig, EnvironmentType, VitessServiceConfig } from '@ts-cloud/core';
|
|
2
|
+
import type { DbRunResult } from './dashboard-database';
|
|
3
|
+
export interface DashboardVitessProvisionInput {
|
|
4
|
+
keyspace: string;
|
|
5
|
+
username: string;
|
|
6
|
+
password: string;
|
|
7
|
+
sharded?: boolean;
|
|
8
|
+
confirm: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DashboardVitessProvisionPlan {
|
|
11
|
+
service: VitessServiceConfig;
|
|
12
|
+
appDatabase: {
|
|
13
|
+
engine: 'vitess';
|
|
14
|
+
name: string;
|
|
15
|
+
username: string;
|
|
16
|
+
host: '127.0.0.1';
|
|
17
|
+
port: 15306;
|
|
18
|
+
ssl: false;
|
|
19
|
+
};
|
|
20
|
+
commands: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface DashboardVitessProvisionResult extends DbRunResult {
|
|
23
|
+
database: DashboardVitessProvisionPlan['appDatabase'];
|
|
24
|
+
service: Omit<VitessServiceConfig, 'password'>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Build the exact same typed Vitess service consumed by cold-boot provisioning.
|
|
28
|
+
* The dashboard only supplies the few application-specific values; topology,
|
|
29
|
+
* bind address, and vtgate port stay on production-safe defaults.
|
|
30
|
+
*/
|
|
31
|
+
export declare function planDashboardVitessProvision(config: CloudConfig, input: DashboardVitessProvisionInput): DashboardVitessProvisionPlan;
|
|
32
|
+
export declare function provisionVitessFromDashboard(config: CloudConfig, environment: EnvironmentType, input: DashboardVitessProvisionInput): Promise<DashboardVitessProvisionResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/deploy/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
synchronizeDashboardUsers,
|
|
31
31
|
trackDashboardOperation,
|
|
32
32
|
verifyStaticApiOrigin
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-1x4xrdkt.js";
|
|
34
34
|
import {
|
|
35
35
|
deleteStaticSite,
|
|
36
36
|
deployStaticSite,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "../chunk-ef2dwfrg.js";
|
|
45
45
|
import {
|
|
46
46
|
buildAndPushServerlessImage
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-3g4r09dd.js";
|
|
48
48
|
import"../chunk-ybcz6sxc.js";
|
|
49
49
|
import"../chunk-01d86gt1.js";
|
|
50
50
|
import"../chunk-50jpda9q.js";
|
|
@@ -70,8 +70,8 @@ import {
|
|
|
70
70
|
siteInstallBase,
|
|
71
71
|
validateDeploymentConfig,
|
|
72
72
|
verifyAddressRecord
|
|
73
|
-
} from "../chunk-
|
|
74
|
-
import"../chunk-
|
|
73
|
+
} from "../chunk-89kbfd6c.js";
|
|
74
|
+
import"../chunk-c6db5m63.js";
|
|
75
75
|
import"../chunk-7m60qnc8.js";
|
|
76
76
|
import"../chunk-4cjrg98a.js";
|
|
77
77
|
import"../chunk-hpv68b4a.js";
|
package/dist/drivers/index.js
CHANGED
|
@@ -68,8 +68,8 @@ import {
|
|
|
68
68
|
waitForSsh,
|
|
69
69
|
wrapCloudInitUserData,
|
|
70
70
|
writeResizeCheckpoint
|
|
71
|
-
} from "../chunk-
|
|
72
|
-
import"../chunk-
|
|
71
|
+
} from "../chunk-89kbfd6c.js";
|
|
72
|
+
import"../chunk-c6db5m63.js";
|
|
73
73
|
import"../chunk-7m60qnc8.js";
|
|
74
74
|
import"../chunk-4cjrg98a.js";
|
|
75
75
|
import"../chunk-wj3s95p9.js";
|
package/dist/index.js
CHANGED
|
@@ -283,7 +283,7 @@ import {
|
|
|
283
283
|
volumeCapabilities,
|
|
284
284
|
webhookEndpoint,
|
|
285
285
|
zeroCapacity
|
|
286
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-1x4xrdkt.js";
|
|
287
287
|
import {
|
|
288
288
|
deleteStaticSite,
|
|
289
289
|
deployStaticSite,
|
|
@@ -297,7 +297,7 @@ import {
|
|
|
297
297
|
} from "./chunk-ef2dwfrg.js";
|
|
298
298
|
import {
|
|
299
299
|
buildAndPushServerlessImage
|
|
300
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-3g4r09dd.js";
|
|
301
301
|
import {
|
|
302
302
|
ApplicationAutoScalingClient,
|
|
303
303
|
BedrockClient,
|
|
@@ -405,7 +405,7 @@ import {
|
|
|
405
405
|
waitForCloudInit,
|
|
406
406
|
waitForSsh,
|
|
407
407
|
wrapCloudInitUserData
|
|
408
|
-
} from "./chunk-
|
|
408
|
+
} from "./chunk-89kbfd6c.js";
|
|
409
409
|
import {
|
|
410
410
|
ABTestManager,
|
|
411
411
|
AI,
|
|
@@ -819,7 +819,7 @@ import {
|
|
|
819
819
|
withSecurity,
|
|
820
820
|
withTimeout,
|
|
821
821
|
xrayManager
|
|
822
|
-
} from "./chunk-
|
|
822
|
+
} from "./chunk-c6db5m63.js";
|
|
823
823
|
import {
|
|
824
824
|
EC2Client,
|
|
825
825
|
SSMClient
|