@ts-cloud/core 0.7.104 → 0.7.108
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/types.d.ts +71 -43
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -426,16 +426,6 @@ export interface InfrastructureConfig {
|
|
|
426
426
|
*/
|
|
427
427
|
realtime?: RealtimeConfig;
|
|
428
428
|
dns?: DnsConfig;
|
|
429
|
-
/**
|
|
430
|
-
* Mail DNS for domains this deployment sends mail from.
|
|
431
|
-
*
|
|
432
|
-
* A domain that sends mail needs MX, SPF, DKIM and DMARC, and getting any of
|
|
433
|
-
* them wrong is invisible: mail lands in spam or is dropped by the receiver
|
|
434
|
-
* with nothing surfaced to the sender. Declaring it here lets the deploy
|
|
435
|
-
* publish the records rather than leaving them to be typed by hand and
|
|
436
|
-
* forgotten.
|
|
437
|
-
*/
|
|
438
|
-
mail?: MailConfig;
|
|
439
429
|
security?: SecurityConfig;
|
|
440
430
|
monitoring?: MonitoringConfig;
|
|
441
431
|
api?: ApiConfig;
|
|
@@ -851,39 +841,6 @@ export interface SharedPathSpec {
|
|
|
851
841
|
}
|
|
852
842
|
/** A shared path: a release-relative path, or {@link SharedPathSpec}. */
|
|
853
843
|
export type SharedPathEntry = string | SharedPathSpec;
|
|
854
|
-
/**
|
|
855
|
-
* Mail DNS provisioning for a deployment.
|
|
856
|
-
*
|
|
857
|
-
* Opt-in: absent means the deploy touches no mail records at all, which is the
|
|
858
|
-
* right default for the many apps that send nothing.
|
|
859
|
-
*/
|
|
860
|
-
export interface MailConfig {
|
|
861
|
-
/** Set false to keep the block for reference without publishing records. */
|
|
862
|
-
enabled?: boolean;
|
|
863
|
-
/** Mail server hostname that receives for these domains. */
|
|
864
|
-
host: string;
|
|
865
|
-
/**
|
|
866
|
-
* Domains to publish records for. Defaults to every site domain, since a
|
|
867
|
-
* deployment that sends mail almost always sends as the site it serves.
|
|
868
|
-
*/
|
|
869
|
-
domains?: string[];
|
|
870
|
-
/** Public IPv4 authorised in SPF. Defaults to the app server's own IP. */
|
|
871
|
-
ip?: string;
|
|
872
|
-
/** Extra SPF mechanisms, e.g. `include:amazonses.com`. */
|
|
873
|
-
spfIncludes?: string[];
|
|
874
|
-
/** DKIM selector. Convention is `default`. */
|
|
875
|
-
dkimSelector?: string;
|
|
876
|
-
/**
|
|
877
|
-
* DKIM public key, per domain. Omitting a domain skips only its DKIM record:
|
|
878
|
-
* publishing an empty key is worse than publishing none, because a broken
|
|
879
|
-
* signature is a stronger negative signal than an unsigned message.
|
|
880
|
-
*/
|
|
881
|
-
dkimPublicKeys?: Record<string, string>;
|
|
882
|
-
/** DMARC policy. `none` (report only) unless stated otherwise. */
|
|
883
|
-
dmarcPolicy?: 'none' | 'quarantine' | 'reject';
|
|
884
|
-
/** Address for aggregate DMARC reports. */
|
|
885
|
-
dmarcReportTo?: string;
|
|
886
|
-
}
|
|
887
844
|
export interface SiteConfig {
|
|
888
845
|
/**
|
|
889
846
|
* Directory to deploy.
|
|
@@ -2629,7 +2586,78 @@ export interface ComputeMonitoringConfig {
|
|
|
2629
2586
|
memPercent?: number;
|
|
2630
2587
|
/** Alert when root-filesystem usage percentage is ≥ this. @default 90 */
|
|
2631
2588
|
diskPercent?: number;
|
|
2589
|
+
/**
|
|
2590
|
+
* Monthly bandwidth allowance in TB (decimal, as providers quote it).
|
|
2591
|
+
*
|
|
2592
|
+
* Set it and the collector accumulates month-to-date rx+tx and warns once
|
|
2593
|
+
* {@link bandwidthPercent} of the allowance is used — before the provider's
|
|
2594
|
+
* overage mail. Omit (or 0) to skip bandwidth alerting entirely; the
|
|
2595
|
+
* accounting is still collected either way.
|
|
2596
|
+
*/
|
|
2597
|
+
bandwidthTb?: number;
|
|
2598
|
+
/** Alert when month-to-date bandwidth is ≥ this share of the allowance. @default 80 */
|
|
2599
|
+
bandwidthPercent?: number;
|
|
2632
2600
|
};
|
|
2601
|
+
/**
|
|
2602
|
+
* Endpoints reporting object-storage egress.
|
|
2603
|
+
*
|
|
2604
|
+
* Host network counters cannot see this. When an application redirects
|
|
2605
|
+
* downloads to object storage (or to a CDN in front of it), the bytes never
|
|
2606
|
+
* cross the host's NIC — the box can look idle while the bucket serves
|
|
2607
|
+
* terabytes, and the first sign of an overrun is the provider's invoice. The
|
|
2608
|
+
* only component that knows is the application doing the redirecting, so this
|
|
2609
|
+
* polls it and records what it reports.
|
|
2610
|
+
*
|
|
2611
|
+
* Each endpoint must return an {@link EgressReport}.
|
|
2612
|
+
*/
|
|
2613
|
+
egressEndpoints?: EgressEndpointConfig[];
|
|
2614
|
+
}
|
|
2615
|
+
/** An application endpoint reporting its own object-storage egress. */
|
|
2616
|
+
export interface EgressEndpointConfig {
|
|
2617
|
+
/** Short slug identifying this source in metrics (e.g. "registry"). */
|
|
2618
|
+
name: string;
|
|
2619
|
+
/** Absolute URL returning an {@link EgressReport} as JSON. */
|
|
2620
|
+
url: string;
|
|
2621
|
+
/**
|
|
2622
|
+
* Name of an environment variable holding a bearer token for the request.
|
|
2623
|
+
*
|
|
2624
|
+
* The variable name, never the token itself — config is committed, tokens are
|
|
2625
|
+
* not. Omit for a public endpoint.
|
|
2626
|
+
*/
|
|
2627
|
+
tokenEnv?: string;
|
|
2628
|
+
}
|
|
2629
|
+
/**
|
|
2630
|
+
* What an {@link EgressEndpointConfig} URL is expected to return.
|
|
2631
|
+
*
|
|
2632
|
+
* Every field is optional and validated on arrival: a partial or malformed
|
|
2633
|
+
* report degrades to fewer recorded series rather than failing the whole
|
|
2634
|
+
* telemetry collection, because losing host metrics to a bad egress endpoint
|
|
2635
|
+
* would be a bad trade.
|
|
2636
|
+
*
|
|
2637
|
+
* `days` is the valuable part. Reporting a per-day history rather than a single
|
|
2638
|
+
* running counter means the collector can replay it — any day missed while the
|
|
2639
|
+
* collector was down still lands, and re-collecting the same day is idempotent
|
|
2640
|
+
* rather than double-counted.
|
|
2641
|
+
*/
|
|
2642
|
+
export interface EgressReport {
|
|
2643
|
+
/** UTC day key (YYYY-MM-DD) the `today` figures describe. */
|
|
2644
|
+
today?: string;
|
|
2645
|
+
todayBytes?: number;
|
|
2646
|
+
/** UTC month key (YYYY-MM) the month-to-date figures describe. */
|
|
2647
|
+
month?: string;
|
|
2648
|
+
monthBytes?: number;
|
|
2649
|
+
/** Monthly allowance in bytes; 0 or absent when none is configured. */
|
|
2650
|
+
budgetBytes?: number;
|
|
2651
|
+
/** Share of the allowance consumed, or null when there is no allowance. */
|
|
2652
|
+
budgetUsedPercent?: number | null;
|
|
2653
|
+
/** Straight-line month-end projection in bytes. */
|
|
2654
|
+
projectedMonthBytes?: number;
|
|
2655
|
+
/** Per-day totals, oldest first. */
|
|
2656
|
+
days?: Array<{
|
|
2657
|
+
date: string;
|
|
2658
|
+
bytes: number;
|
|
2659
|
+
downloads?: number;
|
|
2660
|
+
}>;
|
|
2633
2661
|
}
|
|
2634
2662
|
/** Host firewall (UFW) configuration. See {@link ComputeConfig.firewall}. */
|
|
2635
2663
|
export interface ComputeFirewallConfig {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-cloud/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.108",
|
|
5
5
|
"description": "Core CloudFormation generation library for ts-cloud",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -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.108"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "^7.0.2"
|