@stacksjs/ts-cloud 0.5.13 → 0.5.15
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/aws/cloudwatch.d.ts +22 -1
- package/dist/bin/cli.js +622 -621
- package/dist/deploy/dashboard-data-server.d.ts +8 -0
- package/dist/deploy/dashboard-data.d.ts +5 -49
- package/dist/index.js +7 -0
- package/dist/ui/index.html +1 -1
- package/dist/ui/server/backups.html +995 -0
- package/dist/ui/server/deployments.html +995 -0
- package/dist/ui/server/metrics.html +995 -0
- package/dist/ui/server/services.html +995 -0
- package/dist/ui/server/sites.html +995 -0
- package/dist/ui/server/ssh-keys.html +995 -0
- package/dist/ui/server/workers.html +995 -0
- package/dist/ui/serverless/assets.html +1 -1
- package/dist/ui/serverless/cost.html +1 -1
- package/dist/ui/serverless/data.html +1 -1
- package/dist/ui/serverless/deployments.html +1 -1
- package/dist/ui/serverless/firewall.html +1 -1
- package/dist/ui/serverless/functions.html +1 -1
- package/dist/ui/serverless/metrics.html +1 -1
- package/dist/ui/serverless/queues.html +1 -1
- package/dist/ui/serverless/scheduler.html +1 -1
- package/dist/ui/serverless/secrets.html +1 -1
- package/dist/ui/serverless.html +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve REAL server-dashboard data for a provisioned compute box. Runs a small
|
|
3
|
+
* metrics script over the active driver (SSM/SSH), parses the KEY=VALUE output,
|
|
4
|
+
* and derives sites/SSH/workers from the cloud config. Everything is best-effort:
|
|
5
|
+
* if no box is reachable it returns null and the dashboard renders sample data.
|
|
6
|
+
*/
|
|
7
|
+
import type { CloudConfig, EnvironmentType } from '@ts-cloud/core';
|
|
8
|
+
export declare function resolveServerDashboardData(config: CloudConfig, environment: EnvironmentType): Promise<Record<string, any> | null>;
|
|
@@ -2,55 +2,11 @@
|
|
|
2
2
|
* Resolve REAL dashboard data for the management UI from live AWS reads, shaped
|
|
3
3
|
* to what the stx dashboard pages consume. `cloud dashboard:build` serializes
|
|
4
4
|
* this to `TSCLOUD_DASHBOARD_DATA` and the pages' `<script server>` blocks read
|
|
5
|
-
* it at build time (falling back to representative sample data per-field
|
|
6
|
-
* value isn't present).
|
|
5
|
+
* it at build time (falling back to representative sample data per-field/per-page
|
|
6
|
+
* when a value isn't present). Every gather is wrapped so one failing source only
|
|
7
|
+
* drops its own slice — the rest still render live. See `ui/pages/*`.
|
|
7
8
|
*/
|
|
8
9
|
import type { CloudConfig, EnvironmentType } from '@ts-cloud/core';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
env: string;
|
|
13
|
-
region: string;
|
|
14
|
-
runtime: string;
|
|
15
|
-
url: string;
|
|
16
|
-
build: string;
|
|
17
|
-
deployedAt: string;
|
|
18
|
-
};
|
|
19
|
-
maintenance: {
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
};
|
|
22
|
-
metrics: {
|
|
23
|
-
invocations: number;
|
|
24
|
-
errorRatePct: number;
|
|
25
|
-
p95Ms: number;
|
|
26
|
-
coldStartPct: number;
|
|
27
|
-
concurrency: number;
|
|
28
|
-
estCostUsd: number;
|
|
29
|
-
};
|
|
30
|
-
functions: Array<{
|
|
31
|
-
key: string;
|
|
32
|
-
name: string;
|
|
33
|
-
version: string;
|
|
34
|
-
memory: number;
|
|
35
|
-
timeout: number;
|
|
36
|
-
runtime: string;
|
|
37
|
-
invocations: number;
|
|
38
|
-
errors: number;
|
|
39
|
-
p95: number;
|
|
40
|
-
status: string;
|
|
41
|
-
provisioned?: string;
|
|
42
|
-
}>;
|
|
43
|
-
queues: Array<{
|
|
44
|
-
name: string;
|
|
45
|
-
visible: number;
|
|
46
|
-
inFlight: number;
|
|
47
|
-
processed: number;
|
|
48
|
-
dlq: number;
|
|
49
|
-
}>;
|
|
50
|
-
scheduler: {
|
|
51
|
-
enabled: boolean;
|
|
52
|
-
expression: string;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/** Gather a live snapshot of the serverless app for the dashboard. */
|
|
10
|
+
/** A loosely-typed bag — the pages read named slices, missing ones fall back. */
|
|
11
|
+
export type DashboardData = Record<string, any>;
|
|
56
12
|
export declare function resolveDashboardData(config: CloudConfig, environment: EnvironmentType): Promise<DashboardData>;
|
package/dist/index.js
CHANGED
|
@@ -83786,8 +83786,15 @@ async function runRemoteCommand(config6, environment, command) {
|
|
|
83786
83786
|
// src/deploy/index.ts
|
|
83787
83787
|
await init_serverless_image();
|
|
83788
83788
|
|
|
83789
|
+
// src/deploy/dashboard-data.ts
|
|
83790
|
+
init_cloudformation();
|
|
83791
|
+
await init_dist2();
|
|
83792
|
+
|
|
83789
83793
|
// src/aws/cloudwatch.ts
|
|
83790
83794
|
init_client();
|
|
83795
|
+
|
|
83796
|
+
// src/deploy/dashboard-data.ts
|
|
83797
|
+
init_s3();
|
|
83791
83798
|
// src/drivers/factory.ts
|
|
83792
83799
|
await init_dist2();
|
|
83793
83800
|
|