@codions/portta 0.0.0-develop.157.sha-ae5ce5e → 0.0.0-develop.159.sha-0da77d5
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/cli.js +39 -12
- package/dist/documentation.json +1 -1
- package/dist/host.js +1 -1
- package/dist/runtime/VERSION +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -20141,6 +20141,26 @@ function isLoopbackAddress(address) {
|
|
|
20141
20141
|
function isWildcardAddress(address) {
|
|
20142
20142
|
return address === "0.0.0.0" || address === "::";
|
|
20143
20143
|
}
|
|
20144
|
+
function isLoopbackIp(address) {
|
|
20145
|
+
return address === "::1" || /^127(\.\d{1,3}){3}$/.test(address);
|
|
20146
|
+
}
|
|
20147
|
+
function localhostDnsVerdict(addresses) {
|
|
20148
|
+
const hint = "see docs/product/guides/local-development.md#how-localhost-resolves";
|
|
20149
|
+
if (addresses.length === 0) return check2("dns.local", "warn", "local DNS", "could not confirm *.localhost resolution", hint);
|
|
20150
|
+
const stray = addresses.filter((address) => !isLoopbackIp(address));
|
|
20151
|
+
return stray.length === 0 ? check2("dns.local", "pass", "local DNS", "*.localhost resolves to loopback") : check2("dns.local", "warn", "local DNS", `*.localhost resolves to ${stray.join(", ")}, not loopback`, hint);
|
|
20152
|
+
}
|
|
20153
|
+
function loopbackDomainVerdict(domain2, resolved2, bind) {
|
|
20154
|
+
if (!isLoopbackIp(resolved2)) return null;
|
|
20155
|
+
const served = isWildcardAddress(bind) || bind === resolved2 || isLoopbackAddress(bind) && resolved2 === "127.0.0.1";
|
|
20156
|
+
return served ? check2("domain.reachable", "pass", "project hostnames", `*.${domain2} resolves to loopback, served on ${bind}`) : check2(
|
|
20157
|
+
"domain.reachable",
|
|
20158
|
+
"warn",
|
|
20159
|
+
"project hostnames",
|
|
20160
|
+
`*.${domain2} resolves to ${resolved2}, but Traefik listens on ${bind}`,
|
|
20161
|
+
"point the wildcard at an address Traefik listens on; see docs/product/guides/local-domains.md"
|
|
20162
|
+
);
|
|
20163
|
+
}
|
|
20144
20164
|
function publishesSensitivePort(published) {
|
|
20145
20165
|
return SENSITIVE_PORTS.some((port) => published.includes(`0.0.0.0:`) && published.includes(`->${port}`));
|
|
20146
20166
|
}
|
|
@@ -22364,7 +22384,7 @@ var init_package = __esm({
|
|
|
22364
22384
|
"package.json"() {
|
|
22365
22385
|
package_default = {
|
|
22366
22386
|
name: "@codions/portta",
|
|
22367
|
-
version: "0.0.0-develop.
|
|
22387
|
+
version: "0.0.0-develop.159.sha-0da77d5",
|
|
22368
22388
|
description: "Machine-first CLI for a shared Docker development gateway",
|
|
22369
22389
|
license: "MIT",
|
|
22370
22390
|
type: "module",
|
|
@@ -22438,7 +22458,7 @@ var init_version = __esm({
|
|
|
22438
22458
|
"use strict";
|
|
22439
22459
|
init_package();
|
|
22440
22460
|
CLI_VERSION = package_default.version;
|
|
22441
|
-
CLI_BUILD_DATE = true ? "2026-09-
|
|
22461
|
+
CLI_BUILD_DATE = true ? "2026-09-17T17:01:02Z" : void 0;
|
|
22442
22462
|
}
|
|
22443
22463
|
});
|
|
22444
22464
|
|
|
@@ -89799,7 +89819,7 @@ function createDaemonTaskflowHost(context) {
|
|
|
89799
89819
|
port: hostListen(env).port,
|
|
89800
89820
|
workflowBuiltinsDir: taskflowAssets(env).workflowBuiltinsDir,
|
|
89801
89821
|
version: env.PORTTA_VERSION || "0.0.0-local",
|
|
89802
|
-
buildDate: true ? "2026-09-
|
|
89822
|
+
buildDate: true ? "2026-09-17T17:01:02Z" : (/* @__PURE__ */ new Date()).toISOString(),
|
|
89803
89823
|
environmentStore: createEnvironmentStore(paths3.database),
|
|
89804
89824
|
hostEnvironmentProvider: new HostEnvironmentProvider(),
|
|
89805
89825
|
devContainerProvider: new DevContainerProvider(),
|
|
@@ -121127,14 +121147,7 @@ async function domainChecks(config3, env) {
|
|
|
121127
121147
|
const domain2 = config3.domain;
|
|
121128
121148
|
const panelExpose = env["PORTTA_WEB_EXPOSE"] || "local";
|
|
121129
121149
|
if (domain2 === "localhost" || domain2.endsWith(".localhost")) {
|
|
121130
|
-
|
|
121131
|
-
checks.push(probe.length > 0 ? check2("dns.local", "pass", "local DNS", "*.localhost resolves to loopback") : check2(
|
|
121132
|
-
"dns.local",
|
|
121133
|
-
"warn",
|
|
121134
|
-
"local DNS",
|
|
121135
|
-
"could not confirm *.localhost resolution",
|
|
121136
|
-
"see docs/product/guides/local-development.md if hostnames do not resolve"
|
|
121137
|
-
));
|
|
121150
|
+
checks.push(localhostDnsVerdict(await resolveIpv4("portta-probe.localhost")));
|
|
121138
121151
|
if (panelExpose !== "local") {
|
|
121139
121152
|
checks.push(check2(
|
|
121140
121153
|
"domain.reachable",
|
|
@@ -121150,6 +121163,8 @@ async function domainChecks(config3, env) {
|
|
|
121150
121163
|
const resolved2 = (await resolveIpv4(`portta-probe.${domain2}`))[0];
|
|
121151
121164
|
if (!resolved2) {
|
|
121152
121165
|
checks.push(check2("dns.wildcard", "fail", "wildcard DNS", `*.${domain2} does not resolve`, "portta dns setup"));
|
|
121166
|
+
} else if (isLoopbackIp(resolved2)) {
|
|
121167
|
+
checks.push(check2("dns.wildcard", "pass", "wildcard DNS", `*.${domain2} -> ${resolved2} (this machine)`));
|
|
121153
121168
|
} else {
|
|
121154
121169
|
const expected = env["PORTTA_PUBLIC_IP"] ?? "";
|
|
121155
121170
|
checks.push(!expected ? check2("dns.wildcard", "pass", "wildcard DNS", `*.${domain2} -> ${resolved2}`) : resolved2 === expected ? check2("dns.wildcard", "pass", "wildcard DNS", `*.${domain2} -> ${resolved2} (this host)`) : check2(
|
|
@@ -121161,7 +121176,19 @@ async function domainChecks(config3, env) {
|
|
|
121161
121176
|
));
|
|
121162
121177
|
}
|
|
121163
121178
|
const bind = config3.bindAddress;
|
|
121164
|
-
|
|
121179
|
+
const loopback = resolved2 ? loopbackDomainVerdict(domain2, resolved2, bind) : null;
|
|
121180
|
+
if (loopback) {
|
|
121181
|
+
checks.push(loopback);
|
|
121182
|
+
if (panelExpose !== "local") {
|
|
121183
|
+
checks.push(check2(
|
|
121184
|
+
"domain.reachable.remote",
|
|
121185
|
+
"warn",
|
|
121186
|
+
"project hostnames",
|
|
121187
|
+
`*.${domain2} resolves to loopback, and the panel is reached from elsewhere`,
|
|
121188
|
+
"point the wildcard at this host, or portta config set domain.mode auto"
|
|
121189
|
+
));
|
|
121190
|
+
}
|
|
121191
|
+
} else if (isLoopbackAddress(bind)) {
|
|
121165
121192
|
const publicIp = env["PORTTA_PUBLIC_IP"] ?? "";
|
|
121166
121193
|
const fix = publicIp && isPrivateAddress(publicIp) ? `portta config set gateway.bindAddress ${publicIp} serves them on that network only` : "portta public enable exposes the HTTP services that opted in";
|
|
121167
121194
|
checks.push(check2(
|