@veryfront/ext-yaml 0.1.1289-rc.26367 → 0.1.1289-rc.26375
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/esm/src/adapter.d.ts +2 -2
- package/esm/src/adapter.d.ts.map +1 -1
- package/esm/src/adapter.js +8 -3
- package/package.json +3 -3
package/esm/src/adapter.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { type SkillDocumentParserProvider, type YamlParseOptions, type YamlParse
|
|
|
3
3
|
* Decode one YAML document with `@std/yaml`-compatible failure behaviour.
|
|
4
4
|
*
|
|
5
5
|
* `yaml` reports most problems on the returned document instead of throwing,
|
|
6
|
-
* and
|
|
7
|
-
*
|
|
6
|
+
* and may also throw while converting aliases into JavaScript values.
|
|
7
|
+
* Parse and conversion failures are normalised so call sites keep the single `SyntaxError`
|
|
8
8
|
* contract they were written against.
|
|
9
9
|
*/
|
|
10
10
|
export declare function parseYamlSource(source: string, options?: YamlParseOptions): unknown;
|
package/esm/src/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/src/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAwDrC;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAET;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/src/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAwDrC;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAET;AAqDD,6DAA6D;AAC7D,wBAAgB,gBAAgB,IAAI,QAAQ,CAAC,kBAAkB,CAAC,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,wCAAwC,IAAI,QAAQ,CAClE,2BAA2B,CAC5B,CAOA"}
|
package/esm/src/adapter.js
CHANGED
|
@@ -57,8 +57,8 @@ function withoutPollutedValuePrototype(run) {
|
|
|
57
57
|
* Decode one YAML document with `@std/yaml`-compatible failure behaviour.
|
|
58
58
|
*
|
|
59
59
|
* `yaml` reports most problems on the returned document instead of throwing,
|
|
60
|
-
* and
|
|
61
|
-
*
|
|
60
|
+
* and may also throw while converting aliases into JavaScript values.
|
|
61
|
+
* Parse and conversion failures are normalised so call sites keep the single `SyntaxError`
|
|
62
62
|
* contract they were written against.
|
|
63
63
|
*/
|
|
64
64
|
export function parseYamlSource(source, options = {}) {
|
|
@@ -103,7 +103,12 @@ function decodeDocument(source, options) {
|
|
|
103
103
|
throw new SyntaxError(problem.message, { cause: problem });
|
|
104
104
|
if (jsonSchema)
|
|
105
105
|
assertJsonRepresentableTags(document);
|
|
106
|
-
|
|
106
|
+
try {
|
|
107
|
+
return document.toJS();
|
|
108
|
+
}
|
|
109
|
+
catch (cause) {
|
|
110
|
+
throw new SyntaxError(cause instanceof Error ? cause.message : String(cause), { cause });
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
113
|
/** Create the official `yaml`-backed general YAML parser. */
|
|
109
114
|
export function createYamlParser() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-yaml",
|
|
3
|
-
"version": "0.1.1289-rc.
|
|
3
|
+
"version": "0.1.1289-rc.26375",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-yaml",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"yaml": "2.9.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"veryfront": "^0.1.1289-rc.
|
|
53
|
+
"veryfront": "^0.1.1289-rc.26375"
|
|
54
54
|
},
|
|
55
55
|
"type": "module",
|
|
56
56
|
"types": "./esm/src/index.d.ts",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"NOTICE",
|
|
61
61
|
"README.md"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "ea46b7c1b9c87f371897e55b3c1197c02ae0c236"
|
|
64
64
|
}
|