@composurecdk/route53 0.8.4 → 0.8.6
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/commonjs/ns-record-builder.d.ts +8 -3
- package/dist/commonjs/ns-record-builder.d.ts.map +1 -1
- package/dist/commonjs/ns-record-builder.js +7 -2
- package/dist/commonjs/ns-record-builder.js.map +1 -1
- package/dist/esm/ns-record-builder.d.ts +8 -3
- package/dist/esm/ns-record-builder.d.ts.map +1 -1
- package/dist/esm/ns-record-builder.js +7 -2
- package/dist/esm/ns-record-builder.js.map +1 -1
- package/package.json +15 -5
|
@@ -4,12 +4,17 @@ import { type IBuilder, type Lifecycle, type Resolvable } from "@composurecdk/co
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration properties for the Route53 NS record builder.
|
|
6
6
|
*
|
|
7
|
-
* Extends the CDK {@link NsRecordProps} but replaces `zone` with
|
|
8
|
-
* {@link Resolvable} so
|
|
7
|
+
* Extends the CDK {@link NsRecordProps} but replaces `zone` and `values` with
|
|
8
|
+
* {@link Resolvable}s so they can be wired from composed components. Making
|
|
9
|
+
* `values` resolvable lets a delegation record draw its name servers from a
|
|
10
|
+
* child hosted zone's `hostedZoneNameServers`, which is only known at build
|
|
11
|
+
* time.
|
|
9
12
|
*/
|
|
10
|
-
export interface NsRecordBuilderProps extends Omit<NsRecordProps, "zone"> {
|
|
13
|
+
export interface NsRecordBuilderProps extends Omit<NsRecordProps, "zone" | "values"> {
|
|
11
14
|
/** The hosted zone in which to create the record. */
|
|
12
15
|
zone?: Resolvable<IHostedZone>;
|
|
16
|
+
/** The fully-qualified name-server host names for the delegated subdomain. */
|
|
17
|
+
values?: Resolvable<string[]>;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* The build output of an {@link INsRecordBuilder}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ns-record-builder.d.ts","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[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AAM,CAAC,GAAG,qBAAqB;CAoC9F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,gBAAgB,CAGxD"}
|
|
@@ -15,7 +15,12 @@ class NsRecordBuilder {
|
|
|
15
15
|
throw new Error(`NsRecordBuilder "${id}" requires a recordName. ` +
|
|
16
16
|
`Call .recordName() with the delegated subdomain — the apex NS set is managed by Route53.`);
|
|
17
17
|
}
|
|
18
|
-
if (!values
|
|
18
|
+
if (!values) {
|
|
19
|
+
throw new Error(`NsRecordBuilder "${id}" requires non-empty values. ` +
|
|
20
|
+
`Call .values() with one or more fully-qualified name-server host names.`);
|
|
21
|
+
}
|
|
22
|
+
const resolvedValues = (0, core_1.resolve)(values, context);
|
|
23
|
+
if (resolvedValues.length === 0) {
|
|
19
24
|
throw new Error(`NsRecordBuilder "${id}" requires non-empty values. ` +
|
|
20
25
|
`Call .values() with one or more fully-qualified name-server host names.`);
|
|
21
26
|
}
|
|
@@ -23,7 +28,7 @@ class NsRecordBuilder {
|
|
|
23
28
|
...defaults_js_1.NS_RECORD_DEFAULTS,
|
|
24
29
|
...rest,
|
|
25
30
|
recordName,
|
|
26
|
-
values,
|
|
31
|
+
values: resolvedValues,
|
|
27
32
|
zone: (0, core_1.resolve)(zone, context),
|
|
28
33
|
};
|
|
29
34
|
const record = new aws_route53_1.NsRecord(scope, id, mergedProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ns-record-builder.js","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ns-record-builder.js","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[],"mappings":";;AA2FA,sDAGC;AA9FD,yDAAyF;AAEzF,6CAM4B;AAC5B,+CAAmD;AAoCnD,MAAM,eAAe;IACnB,KAAK,GAAkC,EAAE,CAAC;IAE1C,KAAK,CAAC,KAAiB,EAAE,EAAU,EAAE,OAAgC;QACnE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACzD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,oBAAoB,EAAE,sDAAsD,CAAC,CAAC;QAChG,CAAC;QACD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,oBAAoB,EAAE,2BAA2B;gBAC/C,0FAA0F,CAC7F,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,oBAAoB,EAAE,+BAA+B;gBACnD,yEAAyE,CAC5E,CAAC;QACJ,CAAC;QACD,MAAM,cAAc,GAAG,IAAA,cAAO,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CACb,oBAAoB,EAAE,+BAA+B;gBACnD,yEAAyE,CAC5E,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAAG;YAClB,GAAG,gCAAkB;YACrB,GAAG,IAAI;YACP,UAAU;YACV,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,IAAA,cAAO,EAAC,IAAI,EAAE,OAAO,CAAC;SACZ,CAAC;QAEnB,MAAM,MAAM,GAAG,IAAI,sBAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;QACpD,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF;AAED;;;;GAIG;AACH,SAAgB,qBAAqB;IACnC,+GAA+G;IAC/G,OAAO,IAAA,cAAO,EAAwC,eAAe,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -4,12 +4,17 @@ import { type IBuilder, type Lifecycle, type Resolvable } from "@composurecdk/co
|
|
|
4
4
|
/**
|
|
5
5
|
* Configuration properties for the Route53 NS record builder.
|
|
6
6
|
*
|
|
7
|
-
* Extends the CDK {@link NsRecordProps} but replaces `zone` with
|
|
8
|
-
* {@link Resolvable} so
|
|
7
|
+
* Extends the CDK {@link NsRecordProps} but replaces `zone` and `values` with
|
|
8
|
+
* {@link Resolvable}s so they can be wired from composed components. Making
|
|
9
|
+
* `values` resolvable lets a delegation record draw its name servers from a
|
|
10
|
+
* child hosted zone's `hostedZoneNameServers`, which is only known at build
|
|
11
|
+
* time.
|
|
9
12
|
*/
|
|
10
|
-
export interface NsRecordBuilderProps extends Omit<NsRecordProps, "zone"> {
|
|
13
|
+
export interface NsRecordBuilderProps extends Omit<NsRecordProps, "zone" | "values"> {
|
|
11
14
|
/** The hosted zone in which to create the record. */
|
|
12
15
|
zone?: Resolvable<IHostedZone>;
|
|
16
|
+
/** The fully-qualified name-server host names for the delegated subdomain. */
|
|
17
|
+
values?: Resolvable<string[]>;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* The build output of an {@link INsRecordBuilder}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ns-record-builder.d.ts","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,SAAS,EAEd,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAG5B
|
|
1
|
+
{"version":3,"file":"ns-record-builder.d.ts","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,SAAS,EAEd,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC;IAClF,qDAAqD;IACrD,IAAI,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAC/B,8EAA8E;IAC9E,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,8DAA8D;IAC9D,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED;;;;;;GAMG;AAEH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;AAE/E,cAAM,eAAgB,YAAW,SAAS,CAAC,qBAAqB,CAAC;IAC/D,KAAK,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAM;IAE1C,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,qBAAqB;CAoC9F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,gBAAgB,CAGxD"}
|
|
@@ -12,7 +12,12 @@ class NsRecordBuilder {
|
|
|
12
12
|
throw new Error(`NsRecordBuilder "${id}" requires a recordName. ` +
|
|
13
13
|
`Call .recordName() with the delegated subdomain — the apex NS set is managed by Route53.`);
|
|
14
14
|
}
|
|
15
|
-
if (!values
|
|
15
|
+
if (!values) {
|
|
16
|
+
throw new Error(`NsRecordBuilder "${id}" requires non-empty values. ` +
|
|
17
|
+
`Call .values() with one or more fully-qualified name-server host names.`);
|
|
18
|
+
}
|
|
19
|
+
const resolvedValues = resolve(values, context);
|
|
20
|
+
if (resolvedValues.length === 0) {
|
|
16
21
|
throw new Error(`NsRecordBuilder "${id}" requires non-empty values. ` +
|
|
17
22
|
`Call .values() with one or more fully-qualified name-server host names.`);
|
|
18
23
|
}
|
|
@@ -20,7 +25,7 @@ class NsRecordBuilder {
|
|
|
20
25
|
...NS_RECORD_DEFAULTS,
|
|
21
26
|
...rest,
|
|
22
27
|
recordName,
|
|
23
|
-
values,
|
|
28
|
+
values: resolvedValues,
|
|
24
29
|
zone: resolve(zone, context),
|
|
25
30
|
};
|
|
26
31
|
const record = new NsRecord(scope, id, mergedProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ns-record-builder.js","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,yBAAyB,CAAC;AAEzF,OAAO,EACL,OAAO,EAGP,OAAO,GAER,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ns-record-builder.js","sourceRoot":"","sources":["../../src/ns-record-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,yBAAyB,CAAC;AAEzF,OAAO,EACL,OAAO,EAGP,OAAO,GAER,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAoCnD,MAAM,eAAe;IACnB,KAAK,GAAkC,EAAE,CAAC;IAE1C,KAAK,CAAC,KAAiB,EAAE,EAAU,EAAE,OAAgC;QACnE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACzD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,oBAAoB,EAAE,sDAAsD,CAAC,CAAC;QAChG,CAAC;QACD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CACb,oBAAoB,EAAE,2BAA2B;gBAC/C,0FAA0F,CAC7F,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,oBAAoB,EAAE,+BAA+B;gBACnD,yEAAyE,CAC5E,CAAC;QACJ,CAAC;QACD,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CACb,oBAAoB,EAAE,+BAA+B;gBACnD,yEAAyE,CAC5E,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAAG;YAClB,GAAG,kBAAkB;YACrB,GAAG,IAAI;YACP,UAAU;YACV,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACZ,CAAC;QAEnB,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;QACpD,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,+GAA+G;IAC/G,OAAO,OAAO,CAAwC,eAAe,CAAC,CAAC;AACzE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composurecdk/route53",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Composable Route53 hosted zone and record builders with well-architected defaults",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,17 @@
|
|
|
20
20
|
"test": "vitest run --passWithNoTests",
|
|
21
21
|
"test:watch": "vitest"
|
|
22
22
|
},
|
|
23
|
-
"keywords": [
|
|
23
|
+
"keywords": [
|
|
24
|
+
"aws",
|
|
25
|
+
"cdk",
|
|
26
|
+
"aws-cdk",
|
|
27
|
+
"infrastructure-as-code",
|
|
28
|
+
"iac",
|
|
29
|
+
"composurecdk",
|
|
30
|
+
"route53",
|
|
31
|
+
"dns",
|
|
32
|
+
"hosted-zone"
|
|
33
|
+
],
|
|
24
34
|
"author": "Jason Duffett (https://github.com/laazyj)",
|
|
25
35
|
"license": "MIT",
|
|
26
36
|
"publishConfig": {
|
|
@@ -46,11 +56,11 @@
|
|
|
46
56
|
"constructs": "^10.0.0"
|
|
47
57
|
},
|
|
48
58
|
"devDependencies": {
|
|
49
|
-
"@types/node": "^25.9.
|
|
50
|
-
"aws-cdk-lib": "^2.
|
|
59
|
+
"@types/node": "^25.9.3",
|
|
60
|
+
"aws-cdk-lib": "^2.258.1",
|
|
51
61
|
"constructs": "^10.6.0",
|
|
52
62
|
"typescript": "^6.0.3",
|
|
53
|
-
"vitest": "^4.1.
|
|
63
|
+
"vitest": "^4.1.8"
|
|
54
64
|
},
|
|
55
65
|
"exports": {
|
|
56
66
|
"./package.json": "./package.json",
|