@stacksjs/ts-cloud 0.7.62 → 0.7.63
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 +242 -242
- package/dist/{chunk-vx2yva1a.js → chunk-0zbqbrqg.js} +8 -4
- package/dist/{chunk-ff77qy0c.js → chunk-t092y37p.js} +1 -1
- package/dist/deploy/index.js +2 -2
- package/dist/drivers/index.js +1 -1
- package/dist/drivers/shared/releases.d.ts +11 -0
- package/dist/index.js +2 -2
- package/dist/ui/access-denied.html +2 -2
- 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/integrations.html +2 -2
- 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/security.html +2 -2
- 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 +4 -4
- package/dist/ui/server/deployments.html +4 -4
- 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 +2 -2
- 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/data.html +4 -4
- package/dist/ui/serverless/deployments.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 +4 -4
- package/dist/ui/serverless/traces.html +4 -4
- package/dist/ui/serverless.html +3 -3
- package/package.json +3 -3
|
@@ -3832,6 +3832,12 @@ function buildResetReleaseDir(paths) {
|
|
|
3832
3832
|
"fi"
|
|
3833
3833
|
];
|
|
3834
3834
|
}
|
|
3835
|
+
function buildStrandedReleaseTrap(paths) {
|
|
3836
|
+
const live = `TS_CLOUD_TRAP_LIVE="$(readlink -f ${paths.current} 2>/dev/null || true)"`;
|
|
3837
|
+
const target = `TS_CLOUD_TRAP_TARGET="$(readlink -f ${paths.release} 2>/dev/null || echo ${paths.release})"`;
|
|
3838
|
+
const body = `if [ $? -ne 0 ]; then ${live}; ${target}; [ "$TS_CLOUD_TRAP_LIVE" = "$TS_CLOUD_TRAP_TARGET" ] || rm -rf ${paths.release}; fi`;
|
|
3839
|
+
return `trap '${body}' EXIT`;
|
|
3840
|
+
}
|
|
3835
3841
|
function buildIsReleaseLive(paths) {
|
|
3836
3842
|
return [
|
|
3837
3843
|
`TS_CLOUD_LIVE_PATH="$(readlink -f ${paths.current} 2>/dev/null || true)"`,
|
|
@@ -3964,8 +3970,7 @@ function buildSiteDeployScript(options) {
|
|
|
3964
3970
|
const stageRelease = [
|
|
3965
3971
|
"set -euo pipefail",
|
|
3966
3972
|
...buildDeployLock(paths),
|
|
3967
|
-
|
|
3968
|
-
`trap 'if [ $? -ne 0 ] && [ "$TS_CLOUD_IS_LIVE" != "yes" ]; then rm -rf ${paths.release}; fi' EXIT`,
|
|
3973
|
+
buildStrandedReleaseTrap(paths),
|
|
3969
3974
|
...artifactFetch,
|
|
3970
3975
|
...buildEnsureReleaseLayout(paths, sharedPaths),
|
|
3971
3976
|
...buildResetReleaseDir(paths),
|
|
@@ -4054,8 +4059,7 @@ function buildStaticSiteDeployScript(options) {
|
|
|
4054
4059
|
return [
|
|
4055
4060
|
"set -euo pipefail",
|
|
4056
4061
|
...buildDeployLock(paths),
|
|
4057
|
-
|
|
4058
|
-
`trap 'if [ $? -ne 0 ] && [ "$TS_CLOUD_IS_LIVE" != "yes" ]; then rm -rf ${paths.release}; fi' EXIT`,
|
|
4062
|
+
buildStrandedReleaseTrap(paths),
|
|
4059
4063
|
...artifactFetch,
|
|
4060
4064
|
...buildEnsureReleaseLayout(paths, []),
|
|
4061
4065
|
...buildResetReleaseDir(paths),
|
package/dist/deploy/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
synchronizeDashboardUsers,
|
|
33
33
|
trackDashboardOperation,
|
|
34
34
|
verifyStaticApiOrigin
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-t092y37p.js";
|
|
36
36
|
import {
|
|
37
37
|
deleteStaticSite,
|
|
38
38
|
deployStaticSite,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
shipsARelease,
|
|
66
66
|
siteInstallBase,
|
|
67
67
|
validateDeploymentConfig
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-0zbqbrqg.js";
|
|
69
69
|
import"../chunk-tq46tnxv.js";
|
|
70
70
|
import"../chunk-703nkybg.js";
|
|
71
71
|
import"../chunk-4cjrg98a.js";
|
package/dist/drivers/index.js
CHANGED
|
@@ -70,6 +70,17 @@ export declare function buildDeployLock(paths: ReleasePaths, waitSeconds?: numbe
|
|
|
70
70
|
* two renames, which is atomic enough that no request lands mid-swap.
|
|
71
71
|
*/
|
|
72
72
|
export declare function buildResetReleaseDir(paths: ReleasePaths): string[];
|
|
73
|
+
/**
|
|
74
|
+
* Remove a half-built release if the deploy fails before it went live.
|
|
75
|
+
*
|
|
76
|
+
* The check has to run *when the trap fires*, not when it is armed. A deploy
|
|
77
|
+
* arms this at the top and activates the release much later, so a value
|
|
78
|
+
* computed up front says "not live" for the rest of the script — and a failure
|
|
79
|
+
* in any step after activation would then delete the release the site had just
|
|
80
|
+
* started serving. Both paths are resolved at that moment for the reason in
|
|
81
|
+
* {@link buildIsReleaseLive}.
|
|
82
|
+
*/
|
|
83
|
+
export declare function buildStrandedReleaseTrap(paths: ReleasePaths): string;
|
|
73
84
|
/**
|
|
74
85
|
* Set `TS_CLOUD_IS_LIVE` to "yes" when `current` resolves to this release.
|
|
75
86
|
*
|
package/dist/index.js
CHANGED
|
@@ -285,7 +285,7 @@ import {
|
|
|
285
285
|
volumeCapabilities,
|
|
286
286
|
webhookEndpoint,
|
|
287
287
|
zeroCapacity
|
|
288
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-t092y37p.js";
|
|
289
289
|
import {
|
|
290
290
|
deleteStaticSite,
|
|
291
291
|
deployStaticSite,
|
|
@@ -398,7 +398,7 @@ import {
|
|
|
398
398
|
waitForCloudInit,
|
|
399
399
|
waitForSsh,
|
|
400
400
|
wrapCloudInitUserData
|
|
401
|
-
} from "./chunk-
|
|
401
|
+
} from "./chunk-0zbqbrqg.js";
|
|
402
402
|
import {
|
|
403
403
|
ABTestManager,
|
|
404
404
|
AI,
|