@ts-cloud/core 0.9.1 → 0.9.2
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 +63 -0
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1660,6 +1660,69 @@ export interface DnsConfig {
|
|
|
1660
1660
|
* instead of Route53
|
|
1661
1661
|
*/
|
|
1662
1662
|
provider?: 'route53' | 'cloudflare' | 'porkbun' | 'godaddy';
|
|
1663
|
+
/**
|
|
1664
|
+
* Records to publish on every deploy, alongside the address records ts-cloud
|
|
1665
|
+
* derives from `sites`.
|
|
1666
|
+
*
|
|
1667
|
+
* This is for the half of a zone a deploy cannot infer — mail (MX, SPF,
|
|
1668
|
+
* DMARC, autodiscover), domain-verification TXT records, third-party CNAMEs.
|
|
1669
|
+
* Those are exactly the records that go missing in a nameserver migration and
|
|
1670
|
+
* are not noticed until someone reports that mail stopped, because nothing in
|
|
1671
|
+
* a normal deploy touches or checks them. Declaring them here makes the zone
|
|
1672
|
+
* reproducible from the repo instead of from someone's memory of a dashboard.
|
|
1673
|
+
*
|
|
1674
|
+
* Reconciliation is **upsert-only**: ts-cloud never deletes a record it was
|
|
1675
|
+
* not asked to manage, because a zone routinely holds records owned by other
|
|
1676
|
+
* tools and people. The one exception is a policy TXT record (SPF, DMARC),
|
|
1677
|
+
* where a *second* record is not additive but a hard failure — see
|
|
1678
|
+
* {@link DnsRecordConfig}.
|
|
1679
|
+
*/
|
|
1680
|
+
records?: DnsRecordConfig[];
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* One record published by {@link DnsConfig.records}.
|
|
1684
|
+
*
|
|
1685
|
+
* How a record is matched against what already exists depends on its type,
|
|
1686
|
+
* because "the same record" means different things:
|
|
1687
|
+
*
|
|
1688
|
+
* - **A, AAAA, CNAME** — one value per name in practice, so an existing record
|
|
1689
|
+
* with this name and type is UPDATED.
|
|
1690
|
+
* - **MX, SRV, CAA, NS** — legitimately multi-valued, so a record is matched on
|
|
1691
|
+
* its content and only created when that exact value is absent. Undeclared
|
|
1692
|
+
* values at the same name are reported, never removed: a stray MX means split
|
|
1693
|
+
* mail delivery, which the operator must see, but deleting someone else's
|
|
1694
|
+
* record on a shared zone is worse.
|
|
1695
|
+
* - **TXT** — multi-valued in general (verification tokens sit beside each
|
|
1696
|
+
* other), EXCEPT for policy records. Two `v=spf1` records are not two
|
|
1697
|
+
* policies; they are a permerror, and receivers treat the domain as having no
|
|
1698
|
+
* usable SPF at all. Two `v=DMARC1` records are likewise ignored wholesale.
|
|
1699
|
+
* So a TXT whose value opens with a policy tag REPLACES the existing record
|
|
1700
|
+
* carrying that same tag, and any other TXT at that name is left untouched.
|
|
1701
|
+
*/
|
|
1702
|
+
export interface DnsRecordConfig {
|
|
1703
|
+
type: 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'SRV' | 'CAA' | 'NS';
|
|
1704
|
+
/**
|
|
1705
|
+
* Record name: `'@'` (or omitted) for the zone apex, a bare label such as
|
|
1706
|
+
* `'autodiscover'`, or a fully-qualified name. Bare labels are qualified with
|
|
1707
|
+
* the zone.
|
|
1708
|
+
*/
|
|
1709
|
+
name?: string;
|
|
1710
|
+
/** Record value. */
|
|
1711
|
+
content: string;
|
|
1712
|
+
/** TTL in seconds. @default 3600 */
|
|
1713
|
+
ttl?: number;
|
|
1714
|
+
/** Priority — required for MX, used by SRV. */
|
|
1715
|
+
priority?: number;
|
|
1716
|
+
/**
|
|
1717
|
+
* Cloudflare only: serve through the proxy. @default false
|
|
1718
|
+
*
|
|
1719
|
+
* Declared records default to DNS-only deliberately. Mail records cannot be
|
|
1720
|
+
* proxied at all, and a proxied `autodiscover` CNAME resolves to Cloudflare
|
|
1721
|
+
* rather than Microsoft and quietly breaks client auto-configuration.
|
|
1722
|
+
*/
|
|
1723
|
+
proxied?: boolean;
|
|
1724
|
+
/** Free-text note stored with the record where the provider supports it. */
|
|
1725
|
+
comment?: string;
|
|
1663
1726
|
}
|
|
1664
1727
|
export interface SecurityConfig {
|
|
1665
1728
|
waf?: WafConfig;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-cloud/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.2",
|
|
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.9.
|
|
34
|
+
"@ts-cloud/aws-types": "0.9.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "^7.0.2"
|