@ts-cloud/core 0.13.0 → 0.14.0

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +47 -0
  2. package/package.json +2 -2
package/dist/types.d.ts CHANGED
@@ -1792,6 +1792,46 @@ export interface SftpConfig {
1792
1792
  /** System account the box server runs as. Defaults to `ts-sftp`. */
1793
1793
  serviceUser?: string;
1794
1794
  }
1795
+ /**
1796
+ * Zone settings reconciled on every deploy, where the provider has them.
1797
+ *
1798
+ * Cloudflare's defaults are not the right ones for an origin ts-cloud built.
1799
+ * A new zone lands on `ssl: 'full'`, which encrypts to the origin but does not
1800
+ * VALIDATE it — so anything that can get between the edge and the box can
1801
+ * present its own certificate and be believed. The origin here terminates a
1802
+ * real Let's Encrypt certificate, so `'strict'` costs nothing and closes that.
1803
+ *
1804
+ * Declared rather than defaulted. Turning `strict` on implicitly would be the
1805
+ * right call for a ts-cloud origin and the wrong one for a zone pointed at
1806
+ * something else — a self-signed appliance, a third-party host — where it
1807
+ * takes the site down on the next deploy. Saying it in config is cheap; having
1808
+ * a deploy silently change how TLS is verified is not.
1809
+ *
1810
+ * Only settings named here are touched. Anything else in the zone is left
1811
+ * alone, including things somebody set by hand.
1812
+ */
1813
+ export interface DnsZoneConfig {
1814
+ /**
1815
+ * TLS between the edge and the origin.
1816
+ *
1817
+ * - `strict` — encrypt AND validate the origin certificate. Correct for any
1818
+ * origin with a real certificate, which is every ts-cloud server deploy.
1819
+ * - `full` — encrypt without validating. Cloudflare's default for a new zone.
1820
+ * - `flexible` — plaintext to the origin. With an origin that redirects to
1821
+ * HTTPS this produces an infinite redirect loop, which is the single most
1822
+ * common way a Cloudflare migration appears to break the site.
1823
+ * - `off` — no TLS at the edge at all.
1824
+ */
1825
+ ssl?: 'off' | 'flexible' | 'full' | 'strict';
1826
+ /** Redirect http:// to https:// at the edge. */
1827
+ alwaysUseHttps?: boolean;
1828
+ /**
1829
+ * Oldest TLS version the edge will negotiate. `1.2` is the usual floor;
1830
+ * some plans reject anything above `1.0`, and a rejected setting is
1831
+ * reported rather than failing the deploy.
1832
+ */
1833
+ minTlsVersion?: '1.0' | '1.1' | '1.2' | '1.3';
1834
+ }
1795
1835
  /**
1796
1836
  * The registrar half of {@link DnsConfig}.
1797
1837
  */
@@ -1866,6 +1906,13 @@ export interface DnsConfig {
1866
1906
  * }
1867
1907
  */
1868
1908
  registrar?: DnsRegistrarConfig;
1909
+ /**
1910
+ * Zone settings to reconcile on every deploy — see {@link DnsZoneConfig}.
1911
+ *
1912
+ * Chiefly `ssl: 'strict'`, which a Cloudflare zone does not get by default
1913
+ * and which is the correct setting for an origin holding a real certificate.
1914
+ */
1915
+ zone?: DnsZoneConfig;
1869
1916
  /**
1870
1917
  * Records to publish on every deploy, alongside the address records ts-cloud
1871
1918
  * derives from `sites`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ts-cloud/core",
3
3
  "type": "module",
4
- "version": "0.13.0",
4
+ "version": "0.14.0",
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.13.0"
34
+ "@ts-cloud/aws-types": "0.14.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "^7.0.2"