-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(vrl): add documentation for punycode encoding functions (#19794)
* docs(vrl): add documentation for punycode encoding functions Related: vectordotdev/vrl#672 * Allow IDN and punycode in spellchecker * Change IDN allow entry into lowercase * chore: expose component test utils (#19826) * chore(deps): Bump VRL to 0.11.0 (#19827) Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> * chore(ci): Bump aws-actions/configure-aws-credentials from 4.0.1 to 4.0.2 (#19823) chore(ci): Bump aws-actions/configure-aws-credentials Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](aws-actions/configure-aws-credentials@v4.0.1...v4.0.2) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump the prost group with 1 update (#19830) Bumps the prost group with 1 update: [prost-reflect](https://github.com/andrewhickman/prost-reflect). Updates `prost-reflect` from 0.12.0 to 0.13.0 - [Changelog](https://github.com/andrewhickman/prost-reflect/blob/main/CHANGELOG.md) - [Commits](andrewhickman/prost-reflect@0.12.0...0.13.0) --- updated-dependencies: - dependency-name: prost-reflect dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prost ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update punycode encoding to be fallible in docs * Add failure reasons for punycode encoding * Fix typo in decode_punycode docs * Simplify error descriptions for punycode_encoding * Fix formatting of punycode_encoding cue files --------- Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
de628d8
commit 1e83c95
Showing
6 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -330,6 +330,7 @@ htmltest | |
https | ||
humungus | ||
icecream | ||
idn | ||
ifeq | ||
ifneq | ||
imobile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package metadata | ||
|
||
remap: functions: decode_punycode: { | ||
category: "Codec" | ||
description: """ | ||
Decodes a [punycode](\(urls.punycode)) encoded `value`, like an internationalized domain name ([IDN](\(urls.idn))). | ||
""" | ||
|
||
arguments: [ | ||
{ | ||
name: "value" | ||
description: "The string to decode." | ||
required: true | ||
type: ["string"] | ||
}, | ||
] | ||
internal_failure_reasons: [ | ||
"`value` is not valid `punycode`", | ||
] | ||
return: types: ["string"] | ||
|
||
examples: [ | ||
{ | ||
title: "Decode a punycode encoded internationalized domain name" | ||
source: """ | ||
decode_punycode!("www.xn--caf-dma.com") | ||
""" | ||
return: "www.café.com" | ||
}, | ||
{ | ||
title: "Decode an ASCII only string" | ||
source: """ | ||
decode_punycode!("www.cafe.com") | ||
""" | ||
return: "www.cafe.com" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package metadata | ||
|
||
remap: functions: encode_punycode: { | ||
category: "Codec" | ||
description: """ | ||
Encodes a `value` to [punycode](\(urls.punycode)). Useful for internationalized domain names ([IDN](\(urls.idn))). | ||
""" | ||
|
||
arguments: [ | ||
{ | ||
name: "value" | ||
description: "The string to encode." | ||
required: true | ||
type: ["string"] | ||
}, | ||
] | ||
internal_failure_reasons: [ | ||
"`value` can not be encoded to `punycode`", | ||
] | ||
return: types: ["string"] | ||
|
||
examples: [ | ||
{ | ||
title: "Encode an internationalized domain name" | ||
source: """ | ||
encode_punycode!("www.café.com") | ||
""" | ||
return: "www.xn--caf-dma.com" | ||
}, | ||
{ | ||
title: "Encode an internationalized domain name with mixed case" | ||
source: """ | ||
encode_punycode!("www.CAFé.com") | ||
""" | ||
return: "www.xn--caf-dma.com" | ||
}, | ||
{ | ||
title: "Encode an ASCII only string" | ||
source: """ | ||
encode_punycode!("www.cafe.com") | ||
""" | ||
return: "www.cafe.com" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters