wirejs-resources 0.1.183 → 0.1.185
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/config.d.ts +82 -3
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
export type RedirectRule = {
|
|
2
|
+
from: string;
|
|
3
|
+
to: string;
|
|
4
|
+
mode?: 'temporary' | 'permanent';
|
|
5
|
+
};
|
|
6
|
+
export type DeploymentDnsRecordType = 'A' | 'AAAA' | 'CAA' | 'CNAME' | 'MX' | 'NS' | 'PTR' | 'SPF' | 'SRV' | 'TXT';
|
|
7
|
+
export type DeploymentDnsRecord = {
|
|
8
|
+
/**
|
|
9
|
+
* Record name.
|
|
10
|
+
*
|
|
11
|
+
* Accepts either:
|
|
12
|
+
* - FQDN (for example `www.example.com`)
|
|
13
|
+
* - Relative host label (for example `www`, `_dmarc`, `@`) when `zoneDomain` is provided
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Route53 record type.
|
|
18
|
+
*/
|
|
19
|
+
type: DeploymentDnsRecordType;
|
|
20
|
+
/**
|
|
21
|
+
* Raw Route53 resource record values.
|
|
22
|
+
*
|
|
23
|
+
* Examples:
|
|
24
|
+
* - TXT: ['"v=spf1 include:_spf.google.com ~all"']
|
|
25
|
+
* - MX: ['10 mail.example.com.']
|
|
26
|
+
* - CNAME: ['ghs.googlehosted.com.']
|
|
27
|
+
*/
|
|
28
|
+
values: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Optional TTL for the record set.
|
|
31
|
+
* Defaults to 300 seconds.
|
|
32
|
+
*/
|
|
33
|
+
ttlSeconds?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Optional hosted-zone domain to create this record in.
|
|
36
|
+
*
|
|
37
|
+
* Required when `name` is not an FQDN.
|
|
38
|
+
*/
|
|
39
|
+
zoneDomain?: string;
|
|
40
|
+
};
|
|
1
41
|
export type DeploymentConfig = {
|
|
2
42
|
runtimeDesiredMemoryMB?: number;
|
|
3
43
|
runtimeTimeoutSeconds?: number;
|
|
@@ -26,17 +66,56 @@ export type DeploymentConfig = {
|
|
|
26
66
|
* {
|
|
27
67
|
* main: 'app.example.com',
|
|
28
68
|
* staging: ['staging.example.com', 'preview.example.com'],
|
|
29
|
-
* '*': '
|
|
69
|
+
* '*': '{branch}.example.com'
|
|
30
70
|
* }
|
|
31
71
|
*
|
|
32
72
|
* Template behavior:
|
|
33
|
-
* - Any
|
|
73
|
+
* - Any `{branch}` token in a selected domain value is replaced with the current
|
|
34
74
|
* branch id slug (lowercase, non-alphanumeric => `-`).
|
|
35
|
-
* - Example: BRANCH_ID='feature/login' + '
|
|
75
|
+
* - Example: BRANCH_ID='feature/login' + '{branch}.example.com' =>
|
|
36
76
|
* 'feature-login.example.com'.
|
|
77
|
+
* - Literal `*` values remain wildcard domains (for example '*.example.com').
|
|
37
78
|
*
|
|
38
79
|
* Branch resolution is handled by deployment providers (for CDK, using
|
|
39
80
|
* BRANCH_ID / GITHUB_REF_NAME).
|
|
40
81
|
*/
|
|
41
82
|
domainsByBranch?: Record<string, string | string[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Optional array of host redirects.
|
|
85
|
+
*
|
|
86
|
+
* Redirects are applied whenever their target domain is deployed.
|
|
87
|
+
* Both `from` and `to` fields support `{branch}` token substitution.
|
|
88
|
+
*
|
|
89
|
+
* Example:
|
|
90
|
+
* [
|
|
91
|
+
* { from: 'example.com', to: 'www.example.com', mode: 'permanent' },
|
|
92
|
+
* { from: 'help.example.com', to: 'support.example.com', mode: 'temporary' },
|
|
93
|
+
* { from: '{branch}.old.example.com', to: '{branch}.new.example.com' }
|
|
94
|
+
* ]
|
|
95
|
+
*
|
|
96
|
+
* Template behavior:
|
|
97
|
+
* - Any `{branch}` token in `from` or `to` is replaced with the current branch id slug.
|
|
98
|
+
* - Redirects remain stable across branches — they activate whenever their target domain is deployed.
|
|
99
|
+
*
|
|
100
|
+
* Behavior:
|
|
101
|
+
* - `mode: 'temporary'` (default) uses HTTP 307 — safe when destination might change.
|
|
102
|
+
* - `mode: 'permanent'` uses HTTP 308 — for durable canonical redirects.
|
|
103
|
+
* - Redirects are host-only and preserve path/query.
|
|
104
|
+
* - All `from` hosts are automatically included in domain aliases and certificates.
|
|
105
|
+
*/
|
|
106
|
+
redirects?: RedirectRule[];
|
|
107
|
+
/**
|
|
108
|
+
* Optional arbitrary Route53 DNS records.
|
|
109
|
+
*
|
|
110
|
+
* Use this when migrating existing DNS into CDK-managed infrastructure,
|
|
111
|
+
* including TXT/MX/CAA/CNAME and additional A/AAAA records.
|
|
112
|
+
*
|
|
113
|
+
* Notes:
|
|
114
|
+
* - Record values are passed directly to Route53 resource records.
|
|
115
|
+
* - Hosted zones are looked up automatically for FQDN names.
|
|
116
|
+
* - For relative names (for example `@`, `www`, `_acme-challenge`),
|
|
117
|
+
* provide `zoneDomain`.
|
|
118
|
+
* - Supports `{branch}` token substitution in `name`, `zoneDomain`, and `values`.
|
|
119
|
+
*/
|
|
120
|
+
dnsRecords?: DeploymentDnsRecord[];
|
|
42
121
|
};
|