@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.
@@ -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}.`;
@@ -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}.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.1176+5c41af06",
3
+ "version": "1.0.0-dev.1178+6b5574a3",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",