Skip to content

Commit 4752b9c

Browse files
author
Anivar A Aravind
committed
Add PURL built-in functions to metadata and capabilities
The builtin_metadata.json and capabilities.json files are auto-generated and need to be updated when new built-in functions are added. This commit includes the metadata for purl.is_valid and purl.parse functions. Signed-off-by: Anivar A Aravind <[email protected]>
1 parent c655afe commit 4752b9c

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

builtin_metadata.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
"json.marshal",
6363
"json.marshal_with_options",
6464
"json.unmarshal",
65+
"purl.is_valid",
66+
"purl.parse",
6567
"urlquery.decode",
6668
"urlquery.decode_object",
6769
"urlquery.encode",
@@ -17075,6 +17077,46 @@
1707517077
},
1707617078
"wasm": false
1707717079
},
17080+
"purl.is_valid": {
17081+
"args": [
17082+
{
17083+
"description": "Package URL string to validate",
17084+
"name": "purl",
17085+
"type": "string"
17086+
}
17087+
],
17088+
"available": [
17089+
"edge"
17090+
],
17091+
"description": "Validates that the input is a valid Package URL (PURL).",
17092+
"introduced": "edge",
17093+
"result": {
17094+
"description": "`true` if `purl` is a valid Package URL; `false` otherwise",
17095+
"name": "result",
17096+
"type": "boolean"
17097+
},
17098+
"wasm": false
17099+
},
17100+
"purl.parse": {
17101+
"args": [
17102+
{
17103+
"description": "Package URL string to parse",
17104+
"name": "purl",
17105+
"type": "string"
17106+
}
17107+
],
17108+
"available": [
17109+
"edge"
17110+
],
17111+
"description": "Parses a Package URL (PURL) string into its components.",
17112+
"introduced": "edge",
17113+
"result": {
17114+
"description": "object containing PURL components: type, namespace, name, version, qualifiers, subpath",
17115+
"name": "result",
17116+
"type": "object[string: any]"
17117+
},
17118+
"wasm": false
17119+
},
1707817120
"rand.intn": {
1707917121
"args": [
1708017122
{

capabilities.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,6 +3460,42 @@
34603460
"type": "function"
34613461
}
34623462
},
3463+
{
3464+
"name": "purl.is_valid",
3465+
"decl": {
3466+
"args": [
3467+
{
3468+
"type": "string"
3469+
}
3470+
],
3471+
"result": {
3472+
"type": "boolean"
3473+
},
3474+
"type": "function"
3475+
}
3476+
},
3477+
{
3478+
"name": "purl.parse",
3479+
"decl": {
3480+
"args": [
3481+
{
3482+
"type": "string"
3483+
}
3484+
],
3485+
"result": {
3486+
"dynamic": {
3487+
"key": {
3488+
"type": "string"
3489+
},
3490+
"value": {
3491+
"type": "any"
3492+
}
3493+
},
3494+
"type": "object"
3495+
},
3496+
"type": "function"
3497+
}
3498+
},
34633499
{
34643500
"name": "rand.intn",
34653501
"decl": {

0 commit comments

Comments
 (0)