Add domain data type for bare domain names - #1045
Conversation
|
The changes in this PR will be included in the next version bump.
|
📦 Bundle size
dist/ only; native binaries are versioned separately and not counted here. |
There was a problem hiding this comment.
Important
The new validators accept an overlength wildcard hostname and the editor can reject domain values that the runtime accepts. Both should be aligned before merging.
Reviewed changes in the two commits through 4f84f3b, covering the runtime domain type, VS Code support, tests, docs, and release entries.
- Runtime type: Adds hostname validation, coercion, proxy placeholders, and options for wildcards, single-label names, IPv4 values, normalization, and regex matching.
- Editor support: Adds completion metadata and static diagnostics intended to mirror runtime domain validation.
- Coverage and docs: Adds runtime and editor tests, reference documentation, and package bump entries.
azure/gpt-5.6-sol | 𝕏
varlock
@varlock/native-helper-darwin
@varlock/native-helper-linux-arm64
@varlock/native-helper-linux-x64
@varlock/native-helper-win32-x64
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | 4f84f3b | Commit Preview URL Branch Preview URL |
Aug 27 2026, 10:24 PM |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review at 4f84f3b, covering the corrective commit and its regression tests.
- Counted wildcard length correctly: Changed runtime and editor validation to include the leading
*.in the 253-character domain limit and added exact boundary coverage. - Aligned editor regex semantics: Applied domain matching after normalization and preserved regex literal flags across domain, string, and URL diagnostics.
azure/gpt-5.6-sol | 𝕏



Adds a new
domaindata type for bare domain names (hostnames) likeexample.com, since this is a common config shape currently only coverable withurlorstring.Validates RFC 1123 hostname structure (label charset/length, 253-char total), and rejects values with a protocol, path, port, or credentials with errors pointing at
@type=url/@type=ipwhere appropriate. Requires at least two labels by default.Options:
allowWildcard: permit a leading*.label (certs, CORS)allowSingleLabel: permitlocalhost/ internal service namesallowIp: also accept an IPv4 address, for HOST-style vars (DB_HOST) that hold a hostname in one env and an IP in anothernormalize: lowercase before validationmatches: regex constraint, same syntax asstring/urlAlso generates proxy placeholders as
<seed>.invalid(reserved TLD), and includes VSCode extension support (completions + static value diagnostics), docs, and tests.Deliberately rejected for now: trailing-dot FQDNs, leading-dot cookie-domain form, IPv6 (incl. bracketed literals), and
host:portvalues.