@stacksjs/ts-cloud 0.7.25 → 0.7.27
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 +140 -134
- package/dist/{chunk-11q3tpyf.js → chunk-9bn07hc8.js} +2 -2
- package/dist/{chunk-rwqzjjm4.js → chunk-arz8x67j.js} +13 -4
- package/dist/{chunk-3rpt9j1f.js → chunk-haw9g3zk.js} +21 -9
- package/dist/{chunk-x6y786pg.js → chunk-x5yfwpaf.js} +4 -4
- package/dist/{chunk-wc51as8q.js → chunk-zcx1x2bf.js} +1 -1
- package/dist/deploy/index.js +4 -4
- package/dist/drivers/index.js +2 -2
- package/dist/index.js +4 -4
- package/dist/ui/index.html +3 -3
- package/dist/ui/server/actions.html +3 -3
- package/dist/ui/server/backups.html +3 -3
- package/dist/ui/server/database.html +3 -3
- package/dist/ui/server/deployments.html +3 -3
- package/dist/ui/server/firewall.html +3 -3
- package/dist/ui/server/logs.html +3 -3
- package/dist/ui/server/services.html +3 -3
- package/dist/ui/server/sites.html +3 -3
- package/dist/ui/server/ssh-keys.html +3 -3
- package/dist/ui/server/team.html +3 -3
- package/dist/ui/server/terminal.html +3 -3
- package/dist/ui/server/workers.html +3 -3
- package/dist/ui/serverless/alarms.html +3 -3
- package/dist/ui/serverless/assets.html +3 -3
- package/dist/ui/serverless/data.html +3 -3
- package/dist/ui/serverless/deployments.html +3 -3
- package/dist/ui/serverless/functions.html +3 -3
- package/dist/ui/serverless/logs.html +3 -3
- package/dist/ui/serverless/queues.html +3 -3
- package/dist/ui/serverless/scheduler.html +3 -3
- package/dist/ui/serverless/secrets.html +3 -3
- package/dist/ui/serverless/traces.html +3 -3
- package/dist/ui/serverless.html +3 -3
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAndPushServerlessImage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-zcx1x2bf.js";
|
|
4
4
|
import"./chunk-hsk6fe6x.js";
|
|
5
|
-
import"./chunk-
|
|
5
|
+
import"./chunk-haw9g3zk.js";
|
|
6
6
|
import"./chunk-arsh1g5h.js";
|
|
7
7
|
import"./chunk-v0bahtg2.js";
|
|
8
8
|
export {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
resolveCloudProvider,
|
|
6
6
|
resolveManagementDashboardSites,
|
|
7
7
|
resolveProjectStackName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-haw9g3zk.js";
|
|
9
9
|
import {
|
|
10
10
|
EC2Client,
|
|
11
11
|
SSMClient
|
|
@@ -841,7 +841,13 @@ let files = []
|
|
|
841
841
|
try { files = readdirSync(dir).filter(n => n.endsWith('.json')).sort() } catch {}
|
|
842
842
|
for (const f of files) {
|
|
843
843
|
let frag
|
|
844
|
-
|
|
844
|
+
// Fragments are written atomically (temp + rename by ts-cloud), so a parse
|
|
845
|
+
// failure here means a genuinely corrupt fragment, not a mid-write read. Log
|
|
846
|
+
// it LOUD — a silent skip drops that app's whole host from the routing table,
|
|
847
|
+
// which then answers 404 until someone notices. We still continue so one bad
|
|
848
|
+
// fragment can't take every other app down, but the drop is now visible.
|
|
849
|
+
try { frag = JSON.parse(readFileSync(dir + '/' + f, 'utf8')) }
|
|
850
|
+
catch (err) { console.error('[rpx-assembler] SKIPPING malformed fragment ' + f + ' — its host(s) will 404 until fixed: ' + err); continue }
|
|
845
851
|
for (const p of frag.proxies ?? []) {
|
|
846
852
|
const key = p.id || (p.to + (p.path ?? ''))
|
|
847
853
|
if (seen.has(key)) continue
|
|
@@ -873,9 +879,12 @@ await startProxies(config)
|
|
|
873
879
|
}
|
|
874
880
|
function writeFileHeredoc(path, content, delimiter) {
|
|
875
881
|
return [
|
|
876
|
-
`
|
|
882
|
+
`__tsc_tmp="$(mktemp "${path}.XXXXXX")"`,
|
|
883
|
+
`cat > "$__tsc_tmp" <<'${delimiter}'`,
|
|
877
884
|
content,
|
|
878
|
-
delimiter
|
|
885
|
+
delimiter,
|
|
886
|
+
`mv -f "$__tsc_tmp" ${path}`,
|
|
887
|
+
`chmod 0644 ${path}`
|
|
879
888
|
];
|
|
880
889
|
}
|
|
881
890
|
function certDomainsForConfig(config) {
|
|
@@ -21907,6 +21907,16 @@ function apexOf(domain) {
|
|
|
21907
21907
|
const parts = domain.split(".").filter(Boolean);
|
|
21908
21908
|
return parts.length <= 2 ? domain : parts.slice(-2).join(".");
|
|
21909
21909
|
}
|
|
21910
|
+
function dashboardHostFor(domain, ownedDomains) {
|
|
21911
|
+
const apex = apexOf(domain);
|
|
21912
|
+
if (apex === domain)
|
|
21913
|
+
return `dashboard.${apex}`;
|
|
21914
|
+
for (const owned of ownedDomains) {
|
|
21915
|
+
if (owned === apex)
|
|
21916
|
+
return `dashboard.${apex}`;
|
|
21917
|
+
}
|
|
21918
|
+
return `dashboard.${domain}`;
|
|
21919
|
+
}
|
|
21910
21920
|
function collectDomains(config, environment) {
|
|
21911
21921
|
const candidates = [];
|
|
21912
21922
|
const dnsDomain = config.infrastructure?.dns?.domain;
|
|
@@ -21929,21 +21939,23 @@ function collectDomains(config, environment) {
|
|
|
21929
21939
|
function resolveDashboardDomain(config, environment, explicit) {
|
|
21930
21940
|
if (explicit)
|
|
21931
21941
|
return explicit;
|
|
21932
|
-
const
|
|
21942
|
+
const domains = collectDomains(config, environment);
|
|
21943
|
+
const base = domains[0];
|
|
21933
21944
|
if (!base)
|
|
21934
21945
|
return null;
|
|
21935
|
-
return
|
|
21946
|
+
return dashboardHostFor(base, domains);
|
|
21936
21947
|
}
|
|
21937
21948
|
function resolveDashboardDomains(config, environment, explicit) {
|
|
21938
21949
|
if (explicit)
|
|
21939
21950
|
return [explicit];
|
|
21940
|
-
const
|
|
21941
|
-
|
|
21942
|
-
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
|
|
21951
|
+
const domains = collectDomains(config, environment);
|
|
21952
|
+
const hosts = [];
|
|
21953
|
+
for (const d of domains) {
|
|
21954
|
+
const host = dashboardHostFor(d, domains);
|
|
21955
|
+
if (!hosts.includes(host))
|
|
21956
|
+
hosts.push(host);
|
|
21957
|
+
}
|
|
21958
|
+
return hosts;
|
|
21947
21959
|
}
|
|
21948
21960
|
function hasManagementDashboardSite(config) {
|
|
21949
21961
|
return Object.entries(config.sites ?? {}).some(([name, site]) => {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
step,
|
|
7
7
|
success,
|
|
8
8
|
warn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-zcx1x2bf.js";
|
|
10
10
|
import {
|
|
11
11
|
CloudWatchLogsClient,
|
|
12
12
|
CostExplorerClient,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveSiteKind,
|
|
29
29
|
resolveUiSource,
|
|
30
30
|
siteInstallBase
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-arz8x67j.js";
|
|
32
32
|
import {
|
|
33
33
|
artifactKey,
|
|
34
34
|
composeServerlessAppTemplate,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
resolveServerlessArtifactBucketName,
|
|
43
43
|
resolveServerlessAssetBucketName,
|
|
44
44
|
resolveServerlessRuntime
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-haw9g3zk.js";
|
|
46
46
|
import {
|
|
47
47
|
deployStaticSiteWithExternalDnsFull
|
|
48
48
|
} from "./chunk-d7p84vz5.js";
|
|
@@ -347,7 +347,7 @@ async function deployServerlessApp(config, environment, opts = {}) {
|
|
|
347
347
|
}
|
|
348
348
|
if (imageMode) {
|
|
349
349
|
step("Building + pushing container image");
|
|
350
|
-
const { buildAndPushServerlessImage } = await import("./chunk-
|
|
350
|
+
const { buildAndPushServerlessImage } = await import("./chunk-9bn07hc8.js");
|
|
351
351
|
const built = await buildAndPushServerlessImage({
|
|
352
352
|
app,
|
|
353
353
|
projectRoot,
|
package/dist/deploy/index.js
CHANGED
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
sanitizeCloudConfig,
|
|
13
13
|
setMaintenance,
|
|
14
14
|
startLocalDashboardServer
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-x5yfwpaf.js";
|
|
16
16
|
import {
|
|
17
17
|
buildAndPushServerlessImage
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-zcx1x2bf.js";
|
|
19
19
|
import"../chunk-b82pbxyp.js";
|
|
20
20
|
import"../chunk-hsk6fe6x.js";
|
|
21
21
|
import {
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
resolveUiSource,
|
|
31
31
|
siteInstallBase,
|
|
32
32
|
validateDeploymentConfig
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import"../chunk-
|
|
33
|
+
} from "../chunk-arz8x67j.js";
|
|
34
|
+
import"../chunk-haw9g3zk.js";
|
|
35
35
|
import"../chunk-93hjhs78.js";
|
|
36
36
|
import {
|
|
37
37
|
deleteStaticSite,
|
package/dist/drivers/index.js
CHANGED
|
@@ -48,8 +48,8 @@ import {
|
|
|
48
48
|
waitForCloudInit,
|
|
49
49
|
waitForSsh,
|
|
50
50
|
wrapCloudInitUserData
|
|
51
|
-
} from "../chunk-
|
|
52
|
-
import"../chunk-
|
|
51
|
+
} from "../chunk-arz8x67j.js";
|
|
52
|
+
import"../chunk-haw9g3zk.js";
|
|
53
53
|
import"../chunk-93hjhs78.js";
|
|
54
54
|
import"../chunk-qpj3edwz.js";
|
|
55
55
|
import"../chunk-vd87cpvn.js";
|
package/dist/index.js
CHANGED
|
@@ -55,10 +55,10 @@ import {
|
|
|
55
55
|
sanitizeCloudConfig,
|
|
56
56
|
setMaintenance,
|
|
57
57
|
startLocalDashboardServer
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-x5yfwpaf.js";
|
|
59
59
|
import {
|
|
60
60
|
buildAndPushServerlessImage
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-zcx1x2bf.js";
|
|
62
62
|
import {
|
|
63
63
|
CloudWatchLogsClient,
|
|
64
64
|
EFSClient,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
waitForCloudInit,
|
|
106
106
|
waitForSsh,
|
|
107
107
|
wrapCloudInitUserData
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-arz8x67j.js";
|
|
109
109
|
import {
|
|
110
110
|
ABTestManager,
|
|
111
111
|
AI,
|
|
@@ -506,7 +506,7 @@ import {
|
|
|
506
506
|
withSecurity,
|
|
507
507
|
withTimeout,
|
|
508
508
|
xrayManager
|
|
509
|
-
} from "./chunk-
|
|
509
|
+
} from "./chunk-haw9g3zk.js";
|
|
510
510
|
import {
|
|
511
511
|
EC2Client,
|
|
512
512
|
SSMClient
|