@wtfalch/foundry 0.22.4 → 0.22.5
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/plan/diff.js +8 -2
- package/package.json +1 -1
package/dist/plan/diff.js
CHANGED
|
@@ -47,8 +47,10 @@ function resourceKey(system, kind, key) {
|
|
|
47
47
|
* - A DNS record written before edge held rows: a tunnel hostname foundry
|
|
48
48
|
* published that points at a tunnel, or the mail records of the recorded
|
|
49
49
|
* mail domain.
|
|
50
|
+
* - A DNS record named as one of the platform's own hostnames: a platform
|
|
51
|
+
* service's hostname, or the mail server's own host.
|
|
50
52
|
*/
|
|
51
|
-
function madeByFoundry(org, r, recordedIds, recordedValues) {
|
|
53
|
+
function madeByFoundry(org, r, recordedIds, recordedValues, platformNames) {
|
|
52
54
|
if (PROVIDER_KINDS[r.system]?.includes(r.kind) && recordedValues.has(r.key))
|
|
53
55
|
return true;
|
|
54
56
|
if (r.system === 'coolify') {
|
|
@@ -63,6 +65,8 @@ function madeByFoundry(org, r, recordedIds, recordedValues) {
|
|
|
63
65
|
const name = typeof r.config.name === 'string' ? r.config.name.toLowerCase() : '';
|
|
64
66
|
if (name === '')
|
|
65
67
|
return false;
|
|
68
|
+
if (platformNames.has(name))
|
|
69
|
+
return true;
|
|
66
70
|
const type = r.config.type;
|
|
67
71
|
const content = typeof r.config.content === 'string' ? r.config.content.toLowerCase() : '';
|
|
68
72
|
const tunnelHostnames = (recordedIds[CLOUDFLARE_TUNNEL_DNS_HOSTNAMES_SCOPE_KEY] ?? '')
|
|
@@ -431,9 +435,11 @@ export function computePlanDetail(org, live, recordedIds = {}, agoraHost = NO_AG
|
|
|
431
435
|
const recordedValues = new Set(Object.values(recordedIds));
|
|
432
436
|
for (const own of ['', org.id, org.slug, org.domain ?? ''])
|
|
433
437
|
recordedValues.delete(own);
|
|
438
|
+
const platformNames = new Set([...(options.platformHostnames ?? []), platformReadiness.mailHost?.mailHost ?? ''].map((h) => h.toLowerCase()));
|
|
439
|
+
platformNames.delete('');
|
|
434
440
|
const unmanaged = live
|
|
435
441
|
.filter((r) => !claimed.has(resourceKey(r.system, r.kind, r.key)))
|
|
436
|
-
.filter((r) => !madeByFoundry(org, r, recordedIds, recordedValues))
|
|
442
|
+
.filter((r) => !madeByFoundry(org, r, recordedIds, recordedValues, platformNames))
|
|
437
443
|
.map((r) => ({
|
|
438
444
|
description: `${r.system} ${r.kind} "${liveResourceName(r)}" is live but not named by the declared org`,
|
|
439
445
|
}));
|