@optique/core 1.0.0-dev.1176 → 1.0.0-dev.1178
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/valueparser.cjs +1 -1
- package/dist/valueparser.js +1 -1
- package/package.json +1 -1
package/dist/valueparser.cjs
CHANGED
|
@@ -1239,7 +1239,7 @@ function hostname(options) {
|
|
|
1239
1239
|
error: msg
|
|
1240
1240
|
};
|
|
1241
1241
|
}
|
|
1242
|
-
if (label === "*") continue;
|
|
1242
|
+
if (label === "*" && allowWildcard && input.startsWith("*.") && label === labels[0]) continue;
|
|
1243
1243
|
if (label.startsWith("-") || label.endsWith("-")) {
|
|
1244
1244
|
const errorMsg = options?.errors?.invalidHostname;
|
|
1245
1245
|
const msg = typeof errorMsg === "function" ? errorMsg(input) : errorMsg ?? require_message.message`Expected a valid hostname, but got ${input}.`;
|
package/dist/valueparser.js
CHANGED
|
@@ -1239,7 +1239,7 @@ function hostname(options) {
|
|
|
1239
1239
|
error: msg
|
|
1240
1240
|
};
|
|
1241
1241
|
}
|
|
1242
|
-
if (label === "*") continue;
|
|
1242
|
+
if (label === "*" && allowWildcard && input.startsWith("*.") && label === labels[0]) continue;
|
|
1243
1243
|
if (label.startsWith("-") || label.endsWith("-")) {
|
|
1244
1244
|
const errorMsg = options?.errors?.invalidHostname;
|
|
1245
1245
|
const msg = typeof errorMsg === "function" ? errorMsg(input) : errorMsg ?? message`Expected a valid hostname, but got ${input}.`;
|