@bolt-foundry/gambit-core 0.5.3-dev
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/_dnt.polyfills.d.ts +12 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +15 -0
- package/esm/_dnt.shims.d.ts +6 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts +6 -0
- package/esm/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.1.3/_utils.js +18 -0
- package/esm/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts +322 -0
- package/esm/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.1.3/deep_merge.js +95 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts +11 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/_formats.js +28 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts +5 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/_shared.js +8 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts +32 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/any.js +48 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts +30 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/json.js +35 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts +30 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/toml.js +36 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts +7 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/types.js +3 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts +33 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +39 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +12 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/os.js +5 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +7 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/basename.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/common.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/constants.js +46 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/format.js +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +235 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/relative.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/common.js +33 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/constants.js +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/dirname.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/format.js +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/from_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +83 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/is_glob.js +42 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/join_globs.js +34 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/mod.js +216 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/normalize.js +32 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/parse.js +39 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/_util.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/basename.js +52 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/constants.js +14 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +64 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/extname.js +93 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/format.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +21 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join.js +45 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +58 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +32 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/parse.js +115 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/relative.js +106 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +59 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +27 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +20 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/relative.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/resolve.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/types.js +3 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/_util.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/basename.js +47 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/constants.js +14 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +113 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/extname.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/format.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +38 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join.js +77 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +41 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +135 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +32 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/parse.js +176 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/relative.js +131 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +154 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +34 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +49 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +753 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/parse.js +25 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts +33 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_chars.js +48 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts +66 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_loader_state.js +1427 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts +44 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_schema.js +117 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/binary.js +103 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/bool.js +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/float.js +96 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/int.js +159 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/map.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/merge.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/nil.js +22 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/omap.js +29 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.js +19 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.js +30 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/seq.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/set.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/str.js +9 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.js +81 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.js +20 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_type.js +6 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts +4 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/_utils.js +13 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts +76 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.0.10/parse.js +93 -0
- package/esm/mod.d.ts +51 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +20 -0
- package/esm/package.json +3 -0
- package/esm/src/constants.d.ts +15 -0
- package/esm/src/constants.d.ts.map +1 -0
- package/esm/src/constants.js +20 -0
- package/esm/src/definitions.d.ts +11 -0
- package/esm/src/definitions.d.ts.map +1 -0
- package/esm/src/definitions.js +14 -0
- package/esm/src/loader.d.ts +4 -0
- package/esm/src/loader.d.ts.map +1 -0
- package/esm/src/loader.js +179 -0
- package/esm/src/markdown.d.ts +5 -0
- package/esm/src/markdown.d.ts.map +1 -0
- package/esm/src/markdown.js +307 -0
- package/esm/src/openai_compat.d.ts +63 -0
- package/esm/src/openai_compat.d.ts.map +1 -0
- package/esm/src/openai_compat.js +272 -0
- package/esm/src/providers/openrouter.d.ts +8 -0
- package/esm/src/providers/openrouter.d.ts.map +1 -0
- package/esm/src/providers/openrouter.js +168 -0
- package/esm/src/render.d.ts +51 -0
- package/esm/src/render.d.ts.map +1 -0
- package/esm/src/render.js +188 -0
- package/esm/src/runtime.d.ts +35 -0
- package/esm/src/runtime.d.ts.map +1 -0
- package/esm/src/runtime.js +1368 -0
- package/esm/src/schema.d.ts +8 -0
- package/esm/src/schema.d.ts.map +1 -0
- package/esm/src/schema.js +45 -0
- package/esm/src/state.d.ts +34 -0
- package/esm/src/state.d.ts.map +1 -0
- package/esm/src/state.js +22 -0
- package/esm/src/types.d.ts +318 -0
- package/esm/src/types.d.ts.map +1 -0
- package/esm/src/types.js +1 -0
- package/package.json +32 -0
- package/script/_dnt.polyfills.d.ts +12 -0
- package/script/_dnt.polyfills.d.ts.map +1 -0
- package/script/_dnt.polyfills.js +16 -0
- package/script/_dnt.shims.d.ts +6 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +65 -0
- package/script/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts +6 -0
- package/script/deps/jsr.io/@std/collections/1.1.3/_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/collections/1.1.3/_utils.js +21 -0
- package/script/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts +322 -0
- package/script/deps/jsr.io/@std/collections/1.1.3/deep_merge.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/collections/1.1.3/deep_merge.js +98 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts +11 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/_formats.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/_formats.js +31 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts +5 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/_shared.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/_shared.js +11 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts +32 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/any.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/any.js +51 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts +30 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/json.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/json.js +38 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts +30 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/toml.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/toml.js +39 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts +7 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/types.js +4 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts +33 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/front-matter/1.0.9/yaml.js +42 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts +2 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/_os.js +38 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts +3 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.12/os.js +8 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/assert_path.js +10 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts +4 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/basename.js +45 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/common.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/common.js +26 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts +40 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/constants.js +49 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/dirname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/dirname.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts +4 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/format.js +23 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/from_file_url.js +12 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts +35 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/glob_to_reg_exp.js +238 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/normalize_string.js +80 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/relative.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/relative.js +12 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/strip_trailing_separators.js +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/_common/to_file_url.js +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts +27 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/basename.js +38 -0
- package/script/deps/jsr.io/@std/path/1.1.4/common.d.ts +28 -0
- package/script/deps/jsr.io/@std/path/1.1.4/common.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/common.js +36 -0
- package/script/deps/jsr.io/@std/path/1.1.4/constants.d.ts +15 -0
- package/script/deps/jsr.io/@std/path/1.1.4/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/constants.js +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/dirname.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/dirname.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/extname.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/format.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/format.js +30 -0
- package/script/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/from_file_url.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts +77 -0
- package/script/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/glob_to_regexp.js +86 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_glob.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/is_glob.js +45 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts +23 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join.js +32 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts +28 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join_globs.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/join_globs.js +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/mod.d.ts +213 -0
- package/script/deps/jsr.io/@std/path/1.1.4/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/mod.js +232 -0
- package/script/deps/jsr.io/@std/path/1.1.4/normalize.d.ts +26 -0
- package/script/deps/jsr.io/@std/path/1.1.4/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/normalize.js +35 -0
- package/script/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts +29 -0
- package/script/deps/jsr.io/@std/path/1.1.4/normalize_glob.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/normalize_glob.js +38 -0
- package/script/deps/jsr.io/@std/path/1.1.4/parse.d.ts +35 -0
- package/script/deps/jsr.io/@std/path/1.1.4/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/parse.js +42 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts +2 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/_util.js +11 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts +39 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/basename.js +55 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts +13 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/constants.js +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts +30 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/dirname.js +67 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/extname.js +96 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts +24 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/format.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts +16 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/from_file_url.js +24 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts +72 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/glob_to_regexp.js +85 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/is_absolute.js +26 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join.js +48 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join_globs.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/join_globs.js +43 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize.js +61 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/normalize_glob.js +35 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts +25 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/parse.js +118 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/relative.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/relative.js +109 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/resolve.js +85 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_file_url.js +30 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts +16 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/posix/to_namespaced_path.js +23 -0
- package/script/deps/jsr.io/@std/path/1.1.4/relative.d.ts +24 -0
- package/script/deps/jsr.io/@std/path/1.1.4/relative.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/relative.js +33 -0
- package/script/deps/jsr.io/@std/path/1.1.4/resolve.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/resolve.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/resolve.js +33 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts +21 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/to_namespaced_path.js +32 -0
- package/script/deps/jsr.io/@std/path/1.1.4/types.d.ts +38 -0
- package/script/deps/jsr.io/@std/path/1.1.4/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/types.js +4 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts +4 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/_util.js +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts +22 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/basename.js +50 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts +13 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/constants.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/constants.js +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/dirname.js +116 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/extname.js +85 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts +24 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/format.js +31 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/from_file_url.js +33 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts +71 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/glob_to_regexp.js +85 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/is_absolute.js +41 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts +18 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join.js +80 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts +21 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join_globs.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/join_globs.js +44 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts +19 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize.js +138 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts +20 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/normalize_glob.js +35 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts +25 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/parse.js +179 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts +23 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/relative.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/relative.js +134 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/resolve.js +180 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_file_url.js +37 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts +17 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/path/1.1.4/windows/to_namespaced_path.js +52 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +781 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/parse.js +28 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts +33 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_chars.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_chars.js +55 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts +66 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_loader_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_loader_state.js +1431 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts +44 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_schema.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_schema.js +121 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/binary.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/binary.js +106 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/bool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/bool.js +35 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/float.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/float.js +99 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/int.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/int.js +162 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/map.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/map.js +17 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/merge.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/merge.js +13 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/nil.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/nil.js +25 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/omap.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/omap.js +32 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/pairs.js +22 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/regexp.js +33 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/seq.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/seq.js +13 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/set.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/set.js +17 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/str.js +12 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/timestamp.js +84 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type/undefined.js +23 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts +32 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_type.js +7 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts +4 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/_utils.js +18 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts +76 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.0.10/parse.js +97 -0
- package/script/mod.d.ts +51 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +30 -0
- package/script/package.json +3 -0
- package/script/src/constants.d.ts +15 -0
- package/script/src/constants.d.ts.map +1 -0
- package/script/src/constants.js +23 -0
- package/script/src/definitions.d.ts +11 -0
- package/script/src/definitions.d.ts.map +1 -0
- package/script/src/definitions.js +20 -0
- package/script/src/loader.d.ts +4 -0
- package/script/src/loader.d.ts.map +1 -0
- package/script/src/loader.js +206 -0
- package/script/src/markdown.d.ts +5 -0
- package/script/src/markdown.d.ts.map +1 -0
- package/script/src/markdown.js +335 -0
- package/script/src/openai_compat.d.ts +63 -0
- package/script/src/openai_compat.d.ts.map +1 -0
- package/script/src/openai_compat.js +276 -0
- package/script/src/providers/openrouter.d.ts +8 -0
- package/script/src/providers/openrouter.d.ts.map +1 -0
- package/script/src/providers/openrouter.js +197 -0
- package/script/src/render.d.ts +51 -0
- package/script/src/render.d.ts.map +1 -0
- package/script/src/render.js +192 -0
- package/script/src/runtime.d.ts +35 -0
- package/script/src/runtime.d.ts.map +1 -0
- package/script/src/runtime.js +1395 -0
- package/script/src/schema.d.ts +8 -0
- package/script/src/schema.d.ts.map +1 -0
- package/script/src/schema.js +51 -0
- package/script/src/state.d.ts +34 -0
- package/script/src/state.d.ts.map +1 -0
- package/script/src/state.js +49 -0
- package/script/src/types.d.ts +318 -0
- package/script/src/types.d.ts.map +1 -0
- package/script/src/types.js +2 -0
|
@@ -0,0 +1,1431 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Ported from js-yaml v3.13.1:
|
|
3
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
6
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
7
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
8
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
9
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10
|
+
};
|
|
11
|
+
var _LoaderState_instances, _LoaderState_createError;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.LoaderState = void 0;
|
|
14
|
+
const _chars_js_1 = require("./_chars.js");
|
|
15
|
+
const _schema_js_1 = require("./_schema.js");
|
|
16
|
+
const _utils_js_1 = require("./_utils.js");
|
|
17
|
+
const CONTEXT_FLOW_IN = 1;
|
|
18
|
+
const CONTEXT_FLOW_OUT = 2;
|
|
19
|
+
const CONTEXT_BLOCK_IN = 3;
|
|
20
|
+
const CONTEXT_BLOCK_OUT = 4;
|
|
21
|
+
const CHOMPING_CLIP = 1;
|
|
22
|
+
const CHOMPING_STRIP = 2;
|
|
23
|
+
const CHOMPING_KEEP = 3;
|
|
24
|
+
const PATTERN_NON_PRINTABLE =
|
|
25
|
+
// deno-lint-ignore no-control-regex
|
|
26
|
+
/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
27
|
+
const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
|
28
|
+
const PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
|
|
29
|
+
const PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
|
|
30
|
+
const PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
31
|
+
const ESCAPED_HEX_LENGTHS = new Map([
|
|
32
|
+
[0x78, 2], // x
|
|
33
|
+
[0x75, 4], // u
|
|
34
|
+
[0x55, 8], // U
|
|
35
|
+
]);
|
|
36
|
+
const SIMPLE_ESCAPE_SEQUENCES = new Map([
|
|
37
|
+
[0x30, "\x00"], // 0
|
|
38
|
+
[0x61, "\x07"], // a
|
|
39
|
+
[0x62, "\x08"], // b
|
|
40
|
+
[0x74, "\x09"], // t
|
|
41
|
+
[0x09, "\x09"], // Tab
|
|
42
|
+
[0x6e, "\x0A"], // n
|
|
43
|
+
[0x76, "\x0B"], // v
|
|
44
|
+
[0x66, "\x0C"], // f
|
|
45
|
+
[0x72, "\x0D"], // r
|
|
46
|
+
[0x65, "\x1B"], // e
|
|
47
|
+
[0x20, " "], // Space
|
|
48
|
+
[0x22, '"'], // "
|
|
49
|
+
[0x2f, "/"], // /
|
|
50
|
+
[0x5c, "\\"], // \
|
|
51
|
+
[0x4e, "\x85"], // N
|
|
52
|
+
[0x5f, "\xA0"], // _
|
|
53
|
+
[0x4c, "\u2028"], // L
|
|
54
|
+
[0x50, "\u2029"], // P
|
|
55
|
+
]);
|
|
56
|
+
/**
|
|
57
|
+
* Converts a hexadecimal character code to its decimal value.
|
|
58
|
+
*/
|
|
59
|
+
function hexCharCodeToNumber(charCode) {
|
|
60
|
+
// Check if the character code is in the range for '0' to '9'
|
|
61
|
+
if (0x30 <= charCode && charCode <= 0x39)
|
|
62
|
+
return charCode - 0x30; // Convert '0'-'9' to 0-9
|
|
63
|
+
// Normalize the character code to lowercase if it's a letter
|
|
64
|
+
const lc = charCode | 0x20;
|
|
65
|
+
// Check if the character code is in the range for 'a' to 'f'
|
|
66
|
+
if (0x61 <= lc && lc <= 0x66)
|
|
67
|
+
return lc - 0x61 + 10; // Convert 'a'-'f' to 10-15
|
|
68
|
+
return -1;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Converts a decimal character code to its decimal value.
|
|
72
|
+
*/
|
|
73
|
+
function decimalCharCodeToNumber(charCode) {
|
|
74
|
+
// Check if the character code is in the range for '0' to '9'
|
|
75
|
+
if (0x30 <= charCode && charCode <= 0x39)
|
|
76
|
+
return charCode - 0x30; // Convert '0'-'9' to 0-9
|
|
77
|
+
return -1;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Converts a Unicode code point to a string.
|
|
81
|
+
*/
|
|
82
|
+
function codepointToChar(codepoint) {
|
|
83
|
+
// Check if the code point is within the Basic Multilingual Plane (BMP)
|
|
84
|
+
if (codepoint <= 0xffff)
|
|
85
|
+
return String.fromCharCode(codepoint); // Convert BMP code point to character
|
|
86
|
+
// Encode UTF-16 surrogate pair for code points beyond BMP
|
|
87
|
+
// Reference: https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
|
|
88
|
+
return String.fromCharCode(((codepoint - 0x010000) >> 10) + 0xd800, // High surrogate
|
|
89
|
+
((codepoint - 0x010000) & 0x03ff) + 0xdc00);
|
|
90
|
+
}
|
|
91
|
+
const INDENT = 4;
|
|
92
|
+
const MAX_LENGTH = 75;
|
|
93
|
+
const DELIMITERS = "\x00\r\n\x85\u2028\u2029";
|
|
94
|
+
function getSnippet(buffer, position) {
|
|
95
|
+
if (!buffer)
|
|
96
|
+
return null;
|
|
97
|
+
let start = position;
|
|
98
|
+
let end = position;
|
|
99
|
+
let head = "";
|
|
100
|
+
let tail = "";
|
|
101
|
+
while (start > 0 && !DELIMITERS.includes(buffer.charAt(start - 1))) {
|
|
102
|
+
start--;
|
|
103
|
+
if (position - start > MAX_LENGTH / 2 - 1) {
|
|
104
|
+
head = " ... ";
|
|
105
|
+
start += 5;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
while (end < buffer.length && !DELIMITERS.includes(buffer.charAt(end))) {
|
|
110
|
+
end++;
|
|
111
|
+
if (end - position > MAX_LENGTH / 2 - 1) {
|
|
112
|
+
tail = " ... ";
|
|
113
|
+
end -= 5;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const snippet = buffer.slice(start, end);
|
|
118
|
+
const indent = " ".repeat(INDENT);
|
|
119
|
+
const caretIndent = " ".repeat(INDENT + position - start + head.length);
|
|
120
|
+
return `${indent + head + snippet + tail}\n${caretIndent}^`;
|
|
121
|
+
}
|
|
122
|
+
function markToString(buffer, position, line, column) {
|
|
123
|
+
let where = `at line ${line + 1}, column ${column + 1}`;
|
|
124
|
+
const snippet = getSnippet(buffer, position);
|
|
125
|
+
if (snippet)
|
|
126
|
+
where += `:\n${snippet}`;
|
|
127
|
+
return where;
|
|
128
|
+
}
|
|
129
|
+
class LoaderState {
|
|
130
|
+
constructor(input, { schema = _schema_js_1.DEFAULT_SCHEMA, onWarning, allowDuplicateKeys = false, }) {
|
|
131
|
+
_LoaderState_instances.add(this);
|
|
132
|
+
Object.defineProperty(this, "input", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
configurable: true,
|
|
135
|
+
writable: true,
|
|
136
|
+
value: void 0
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(this, "length", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
configurable: true,
|
|
141
|
+
writable: true,
|
|
142
|
+
value: void 0
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(this, "lineIndent", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
configurable: true,
|
|
147
|
+
writable: true,
|
|
148
|
+
value: 0
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(this, "lineStart", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
configurable: true,
|
|
153
|
+
writable: true,
|
|
154
|
+
value: 0
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(this, "position", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
configurable: true,
|
|
159
|
+
writable: true,
|
|
160
|
+
value: 0
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(this, "line", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
configurable: true,
|
|
165
|
+
writable: true,
|
|
166
|
+
value: 0
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(this, "onWarning", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
configurable: true,
|
|
171
|
+
writable: true,
|
|
172
|
+
value: void 0
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(this, "allowDuplicateKeys", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
configurable: true,
|
|
177
|
+
writable: true,
|
|
178
|
+
value: void 0
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(this, "implicitTypes", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
configurable: true,
|
|
183
|
+
writable: true,
|
|
184
|
+
value: void 0
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(this, "typeMap", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
configurable: true,
|
|
189
|
+
writable: true,
|
|
190
|
+
value: void 0
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(this, "checkLineBreaks", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
configurable: true,
|
|
195
|
+
writable: true,
|
|
196
|
+
value: false
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(this, "tagMap", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
configurable: true,
|
|
201
|
+
writable: true,
|
|
202
|
+
value: new Map()
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(this, "anchorMap", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
configurable: true,
|
|
207
|
+
writable: true,
|
|
208
|
+
value: new Map()
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(this, "tag", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
configurable: true,
|
|
213
|
+
writable: true,
|
|
214
|
+
value: void 0
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(this, "anchor", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
configurable: true,
|
|
219
|
+
writable: true,
|
|
220
|
+
value: void 0
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(this, "kind", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
configurable: true,
|
|
225
|
+
writable: true,
|
|
226
|
+
value: void 0
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(this, "result", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
configurable: true,
|
|
231
|
+
writable: true,
|
|
232
|
+
value: ""
|
|
233
|
+
});
|
|
234
|
+
this.input = input;
|
|
235
|
+
this.onWarning = onWarning;
|
|
236
|
+
this.allowDuplicateKeys = allowDuplicateKeys;
|
|
237
|
+
this.implicitTypes = schema.implicitTypes;
|
|
238
|
+
this.typeMap = schema.typeMap;
|
|
239
|
+
this.length = input.length;
|
|
240
|
+
this.readIndent();
|
|
241
|
+
}
|
|
242
|
+
skipWhitespaces() {
|
|
243
|
+
let ch = this.peek();
|
|
244
|
+
while ((0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
245
|
+
ch = this.next();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
skipComment() {
|
|
249
|
+
let ch = this.peek();
|
|
250
|
+
if (ch !== _chars_js_1.SHARP)
|
|
251
|
+
return;
|
|
252
|
+
ch = this.next();
|
|
253
|
+
while (ch !== 0 && !(0, _chars_js_1.isEOL)(ch)) {
|
|
254
|
+
ch = this.next();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
readIndent() {
|
|
258
|
+
let char = this.peek();
|
|
259
|
+
while (char === _chars_js_1.SPACE) {
|
|
260
|
+
this.lineIndent += 1;
|
|
261
|
+
char = this.next();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
peek(offset = 0) {
|
|
265
|
+
return this.input.charCodeAt(this.position + offset);
|
|
266
|
+
}
|
|
267
|
+
next() {
|
|
268
|
+
this.position += 1;
|
|
269
|
+
return this.peek();
|
|
270
|
+
}
|
|
271
|
+
dispatchWarning(message) {
|
|
272
|
+
const error = __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, message);
|
|
273
|
+
this.onWarning?.(error);
|
|
274
|
+
}
|
|
275
|
+
yamlDirectiveHandler(args) {
|
|
276
|
+
if (args.length !== 1) {
|
|
277
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: YAML directive accepts exactly one argument");
|
|
278
|
+
}
|
|
279
|
+
const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
280
|
+
if (match === null) {
|
|
281
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: ill-formed argument");
|
|
282
|
+
}
|
|
283
|
+
const major = parseInt(match[1], 10);
|
|
284
|
+
const minor = parseInt(match[2], 10);
|
|
285
|
+
if (major !== 1) {
|
|
286
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: unacceptable YAML version");
|
|
287
|
+
}
|
|
288
|
+
this.checkLineBreaks = minor < 2;
|
|
289
|
+
if (minor !== 1 && minor !== 2) {
|
|
290
|
+
this.dispatchWarning("Cannot handle YAML directive: unsupported YAML version");
|
|
291
|
+
}
|
|
292
|
+
return args[0] ?? null;
|
|
293
|
+
}
|
|
294
|
+
tagDirectiveHandler(args) {
|
|
295
|
+
if (args.length !== 2) {
|
|
296
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot handle tag directive: directive accepts exactly two arguments, received ${args.length}`);
|
|
297
|
+
}
|
|
298
|
+
const handle = args[0];
|
|
299
|
+
const prefix = args[1];
|
|
300
|
+
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
301
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot handle tag directive: ill-formed handle (first argument) in "${handle}"`);
|
|
302
|
+
}
|
|
303
|
+
if (this.tagMap.has(handle)) {
|
|
304
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot handle tag directive: previously declared suffix for "${handle}" tag handle`);
|
|
305
|
+
}
|
|
306
|
+
if (!PATTERN_TAG_URI.test(prefix)) {
|
|
307
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle tag directive: ill-formed tag prefix (second argument) of the TAG directive");
|
|
308
|
+
}
|
|
309
|
+
this.tagMap.set(handle, prefix);
|
|
310
|
+
}
|
|
311
|
+
captureSegment(start, end, checkJson) {
|
|
312
|
+
if (start < end) {
|
|
313
|
+
const result = this.input.slice(start, end);
|
|
314
|
+
if (checkJson) {
|
|
315
|
+
for (let position = 0; position < result.length; position++) {
|
|
316
|
+
const character = result.charCodeAt(position);
|
|
317
|
+
if (!(character === 0x09 ||
|
|
318
|
+
(0x20 <= character && character <= 0x10ffff))) {
|
|
319
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Expected valid JSON character: received "${character}"`);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
else if (PATTERN_NON_PRINTABLE.test(result)) {
|
|
324
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Stream contains non-printable characters");
|
|
325
|
+
}
|
|
326
|
+
this.result += result;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
readBlockSequence(nodeIndent) {
|
|
330
|
+
let detected = false;
|
|
331
|
+
const tag = this.tag;
|
|
332
|
+
const anchor = this.anchor;
|
|
333
|
+
const result = [];
|
|
334
|
+
if (this.anchor !== null && typeof this.anchor !== "undefined") {
|
|
335
|
+
this.anchorMap.set(this.anchor, result);
|
|
336
|
+
}
|
|
337
|
+
let ch = this.peek();
|
|
338
|
+
while (ch !== 0) {
|
|
339
|
+
if (ch !== _chars_js_1.MINUS) {
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
const following = this.peek(1);
|
|
343
|
+
if (!(0, _chars_js_1.isWhiteSpaceOrEOL)(following)) {
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
detected = true;
|
|
347
|
+
this.position++;
|
|
348
|
+
if (this.skipSeparationSpace(true, -1)) {
|
|
349
|
+
if (this.lineIndent <= nodeIndent) {
|
|
350
|
+
result.push(null);
|
|
351
|
+
ch = this.peek();
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
const line = this.line;
|
|
356
|
+
this.composeNode({
|
|
357
|
+
parentIndent: nodeIndent,
|
|
358
|
+
nodeContext: CONTEXT_BLOCK_IN,
|
|
359
|
+
allowToSeek: false,
|
|
360
|
+
allowCompact: true,
|
|
361
|
+
});
|
|
362
|
+
result.push(this.result);
|
|
363
|
+
this.skipSeparationSpace(true, -1);
|
|
364
|
+
ch = this.peek();
|
|
365
|
+
if ((this.line === line || this.lineIndent > nodeIndent) && ch !== 0) {
|
|
366
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block sequence: bad indentation of a sequence entry");
|
|
367
|
+
}
|
|
368
|
+
else if (this.lineIndent < nodeIndent) {
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if (detected) {
|
|
373
|
+
this.tag = tag;
|
|
374
|
+
this.anchor = anchor;
|
|
375
|
+
this.kind = "sequence";
|
|
376
|
+
this.result = result;
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
mergeMappings(destination, source, overridableKeys) {
|
|
382
|
+
if (!(0, _utils_js_1.isObject)(source)) {
|
|
383
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot merge mappings: the provided source object is unacceptable");
|
|
384
|
+
}
|
|
385
|
+
for (const [key, value] of Object.entries(source)) {
|
|
386
|
+
if (Object.hasOwn(destination, key))
|
|
387
|
+
continue;
|
|
388
|
+
Object.defineProperty(destination, key, {
|
|
389
|
+
value,
|
|
390
|
+
writable: true,
|
|
391
|
+
enumerable: true,
|
|
392
|
+
configurable: true,
|
|
393
|
+
});
|
|
394
|
+
overridableKeys.add(key);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
storeMappingPair(result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {
|
|
398
|
+
// The output is a plain object here, so keys can only be strings.
|
|
399
|
+
// We need to convert keyNode to a string, but doing so can hang the process
|
|
400
|
+
// (deeply nested arrays that explode exponentially using aliases).
|
|
401
|
+
if (Array.isArray(keyNode)) {
|
|
402
|
+
keyNode = Array.prototype.slice.call(keyNode);
|
|
403
|
+
for (let index = 0; index < keyNode.length; index++) {
|
|
404
|
+
if (Array.isArray(keyNode[index])) {
|
|
405
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot store mapping pair: nested arrays are not supported inside keys");
|
|
406
|
+
}
|
|
407
|
+
if (typeof keyNode === "object" && (0, _utils_js_1.isPlainObject)(keyNode[index])) {
|
|
408
|
+
keyNode[index] = "[object Object]";
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
// Avoid code execution in load() via toString property
|
|
413
|
+
// (still use its own toString for arrays, timestamps,
|
|
414
|
+
// and whatever user schema extensions happen to have @@toStringTag)
|
|
415
|
+
if (typeof keyNode === "object" && (0, _utils_js_1.isPlainObject)(keyNode)) {
|
|
416
|
+
keyNode = "[object Object]";
|
|
417
|
+
}
|
|
418
|
+
keyNode = String(keyNode);
|
|
419
|
+
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
420
|
+
if (Array.isArray(valueNode)) {
|
|
421
|
+
for (let index = 0; index < valueNode.length; index++) {
|
|
422
|
+
this.mergeMappings(result, valueNode[index], overridableKeys);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
this.mergeMappings(result, valueNode, overridableKeys);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
if (!this.allowDuplicateKeys &&
|
|
431
|
+
!overridableKeys.has(keyNode) &&
|
|
432
|
+
Object.hasOwn(result, keyNode)) {
|
|
433
|
+
this.line = startLine || this.line;
|
|
434
|
+
this.position = startPos || this.position;
|
|
435
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot store mapping pair: duplicated key");
|
|
436
|
+
}
|
|
437
|
+
Object.defineProperty(result, keyNode, {
|
|
438
|
+
value: valueNode,
|
|
439
|
+
writable: true,
|
|
440
|
+
enumerable: true,
|
|
441
|
+
configurable: true,
|
|
442
|
+
});
|
|
443
|
+
overridableKeys.delete(keyNode);
|
|
444
|
+
}
|
|
445
|
+
return result;
|
|
446
|
+
}
|
|
447
|
+
readLineBreak() {
|
|
448
|
+
const ch = this.peek();
|
|
449
|
+
if (ch === _chars_js_1.LINE_FEED) {
|
|
450
|
+
this.position++;
|
|
451
|
+
}
|
|
452
|
+
else if (ch === _chars_js_1.CARRIAGE_RETURN) {
|
|
453
|
+
this.position++;
|
|
454
|
+
if (this.peek() === _chars_js_1.LINE_FEED) {
|
|
455
|
+
this.position++;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read line: line break not found");
|
|
460
|
+
}
|
|
461
|
+
this.line += 1;
|
|
462
|
+
this.lineStart = this.position;
|
|
463
|
+
}
|
|
464
|
+
skipSeparationSpace(allowComments, checkIndent) {
|
|
465
|
+
let lineBreaks = 0;
|
|
466
|
+
let ch = this.peek();
|
|
467
|
+
while (ch !== 0) {
|
|
468
|
+
this.skipWhitespaces();
|
|
469
|
+
ch = this.peek();
|
|
470
|
+
if (allowComments) {
|
|
471
|
+
this.skipComment();
|
|
472
|
+
ch = this.peek();
|
|
473
|
+
}
|
|
474
|
+
if ((0, _chars_js_1.isEOL)(ch)) {
|
|
475
|
+
this.readLineBreak();
|
|
476
|
+
ch = this.peek();
|
|
477
|
+
lineBreaks++;
|
|
478
|
+
this.lineIndent = 0;
|
|
479
|
+
this.readIndent();
|
|
480
|
+
ch = this.peek();
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (checkIndent !== -1 &&
|
|
487
|
+
lineBreaks !== 0 &&
|
|
488
|
+
this.lineIndent < checkIndent) {
|
|
489
|
+
this.dispatchWarning("deficient indentation");
|
|
490
|
+
}
|
|
491
|
+
return lineBreaks;
|
|
492
|
+
}
|
|
493
|
+
testDocumentSeparator() {
|
|
494
|
+
let ch = this.peek();
|
|
495
|
+
// Condition this.position === this.lineStart is tested
|
|
496
|
+
// in parent on each call, for efficiency. No needs to test here again.
|
|
497
|
+
if ((ch === _chars_js_1.MINUS || ch === _chars_js_1.DOT) &&
|
|
498
|
+
ch === this.peek(1) &&
|
|
499
|
+
ch === this.peek(2)) {
|
|
500
|
+
ch = this.peek(3);
|
|
501
|
+
if (ch === 0 || (0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
502
|
+
return true;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return false;
|
|
506
|
+
}
|
|
507
|
+
writeFoldedLines(count) {
|
|
508
|
+
if (count === 1) {
|
|
509
|
+
this.result += " ";
|
|
510
|
+
}
|
|
511
|
+
else if (count > 1) {
|
|
512
|
+
this.result += "\n".repeat(count - 1);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
readPlainScalar(nodeIndent, withinFlowCollection) {
|
|
516
|
+
const kind = this.kind;
|
|
517
|
+
const result = this.result;
|
|
518
|
+
let ch = this.peek();
|
|
519
|
+
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(ch) ||
|
|
520
|
+
(0, _chars_js_1.isFlowIndicator)(ch) ||
|
|
521
|
+
ch === _chars_js_1.SHARP ||
|
|
522
|
+
ch === _chars_js_1.AMPERSAND ||
|
|
523
|
+
ch === _chars_js_1.ASTERISK ||
|
|
524
|
+
ch === _chars_js_1.EXCLAMATION ||
|
|
525
|
+
ch === _chars_js_1.VERTICAL_LINE ||
|
|
526
|
+
ch === _chars_js_1.GREATER_THAN ||
|
|
527
|
+
ch === _chars_js_1.SINGLE_QUOTE ||
|
|
528
|
+
ch === _chars_js_1.DOUBLE_QUOTE ||
|
|
529
|
+
ch === _chars_js_1.PERCENT ||
|
|
530
|
+
ch === _chars_js_1.COMMERCIAL_AT ||
|
|
531
|
+
ch === _chars_js_1.GRAVE_ACCENT) {
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
534
|
+
let following;
|
|
535
|
+
if (ch === _chars_js_1.QUESTION || ch === _chars_js_1.MINUS) {
|
|
536
|
+
following = this.peek(1);
|
|
537
|
+
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(following) ||
|
|
538
|
+
(withinFlowCollection && (0, _chars_js_1.isFlowIndicator)(following))) {
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
this.kind = "scalar";
|
|
543
|
+
this.result = "";
|
|
544
|
+
let captureEnd = this.position;
|
|
545
|
+
let captureStart = this.position;
|
|
546
|
+
let hasPendingContent = false;
|
|
547
|
+
let line = 0;
|
|
548
|
+
while (ch !== 0) {
|
|
549
|
+
if (ch === _chars_js_1.COLON) {
|
|
550
|
+
following = this.peek(1);
|
|
551
|
+
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(following) ||
|
|
552
|
+
(withinFlowCollection && (0, _chars_js_1.isFlowIndicator)(following))) {
|
|
553
|
+
break;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
else if (ch === _chars_js_1.SHARP) {
|
|
557
|
+
const preceding = this.peek(-1);
|
|
558
|
+
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(preceding)) {
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
else if ((this.position === this.lineStart && this.testDocumentSeparator()) ||
|
|
563
|
+
(withinFlowCollection && (0, _chars_js_1.isFlowIndicator)(ch))) {
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
else if ((0, _chars_js_1.isEOL)(ch)) {
|
|
567
|
+
line = this.line;
|
|
568
|
+
const lineStart = this.lineStart;
|
|
569
|
+
const lineIndent = this.lineIndent;
|
|
570
|
+
this.skipSeparationSpace(false, -1);
|
|
571
|
+
if (this.lineIndent >= nodeIndent) {
|
|
572
|
+
hasPendingContent = true;
|
|
573
|
+
ch = this.peek();
|
|
574
|
+
continue;
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
this.position = captureEnd;
|
|
578
|
+
this.line = line;
|
|
579
|
+
this.lineStart = lineStart;
|
|
580
|
+
this.lineIndent = lineIndent;
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
if (hasPendingContent) {
|
|
585
|
+
this.captureSegment(captureStart, captureEnd, false);
|
|
586
|
+
this.writeFoldedLines(this.line - line);
|
|
587
|
+
captureStart = captureEnd = this.position;
|
|
588
|
+
hasPendingContent = false;
|
|
589
|
+
}
|
|
590
|
+
if (!(0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
591
|
+
captureEnd = this.position + 1;
|
|
592
|
+
}
|
|
593
|
+
ch = this.next();
|
|
594
|
+
}
|
|
595
|
+
this.captureSegment(captureStart, captureEnd, false);
|
|
596
|
+
if (this.result) {
|
|
597
|
+
return true;
|
|
598
|
+
}
|
|
599
|
+
this.kind = kind;
|
|
600
|
+
this.result = result;
|
|
601
|
+
return false;
|
|
602
|
+
}
|
|
603
|
+
readSingleQuotedScalar(nodeIndent) {
|
|
604
|
+
let ch = this.peek();
|
|
605
|
+
if (ch !== _chars_js_1.SINGLE_QUOTE) {
|
|
606
|
+
return false;
|
|
607
|
+
}
|
|
608
|
+
this.kind = "scalar";
|
|
609
|
+
this.result = "";
|
|
610
|
+
this.position++;
|
|
611
|
+
let captureStart = this.position;
|
|
612
|
+
let captureEnd = this.position;
|
|
613
|
+
ch = this.peek();
|
|
614
|
+
while (ch !== 0) {
|
|
615
|
+
if (ch === _chars_js_1.SINGLE_QUOTE) {
|
|
616
|
+
this.captureSegment(captureStart, this.position, true);
|
|
617
|
+
ch = this.next();
|
|
618
|
+
if (ch === _chars_js_1.SINGLE_QUOTE) {
|
|
619
|
+
captureStart = this.position;
|
|
620
|
+
this.position++;
|
|
621
|
+
captureEnd = this.position;
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
return true;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
else if ((0, _chars_js_1.isEOL)(ch)) {
|
|
628
|
+
this.captureSegment(captureStart, captureEnd, true);
|
|
629
|
+
this.writeFoldedLines(this.skipSeparationSpace(false, nodeIndent));
|
|
630
|
+
captureStart = captureEnd = this.position;
|
|
631
|
+
}
|
|
632
|
+
else if (this.position === this.lineStart &&
|
|
633
|
+
this.testDocumentSeparator()) {
|
|
634
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the document within a single quoted scalar");
|
|
635
|
+
}
|
|
636
|
+
else {
|
|
637
|
+
this.position++;
|
|
638
|
+
captureEnd = this.position;
|
|
639
|
+
}
|
|
640
|
+
ch = this.peek();
|
|
641
|
+
}
|
|
642
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the stream within a single quoted scalar");
|
|
643
|
+
}
|
|
644
|
+
readDoubleQuotedScalar(nodeIndent) {
|
|
645
|
+
let ch = this.peek();
|
|
646
|
+
if (ch !== _chars_js_1.DOUBLE_QUOTE) {
|
|
647
|
+
return false;
|
|
648
|
+
}
|
|
649
|
+
this.kind = "scalar";
|
|
650
|
+
this.result = "";
|
|
651
|
+
this.position++;
|
|
652
|
+
let captureEnd = this.position;
|
|
653
|
+
let captureStart = this.position;
|
|
654
|
+
let tmp;
|
|
655
|
+
ch = this.peek();
|
|
656
|
+
while (ch !== 0) {
|
|
657
|
+
if (ch === _chars_js_1.DOUBLE_QUOTE) {
|
|
658
|
+
this.captureSegment(captureStart, this.position, true);
|
|
659
|
+
this.position++;
|
|
660
|
+
return true;
|
|
661
|
+
}
|
|
662
|
+
if (ch === _chars_js_1.BACKSLASH) {
|
|
663
|
+
this.captureSegment(captureStart, this.position, true);
|
|
664
|
+
ch = this.next();
|
|
665
|
+
if ((0, _chars_js_1.isEOL)(ch)) {
|
|
666
|
+
this.skipSeparationSpace(false, nodeIndent);
|
|
667
|
+
}
|
|
668
|
+
else if (ch < 256 && SIMPLE_ESCAPE_SEQUENCES.has(ch)) {
|
|
669
|
+
this.result += SIMPLE_ESCAPE_SEQUENCES.get(ch);
|
|
670
|
+
this.position++;
|
|
671
|
+
}
|
|
672
|
+
else if ((tmp = ESCAPED_HEX_LENGTHS.get(ch) ?? 0) > 0) {
|
|
673
|
+
let hexLength = tmp;
|
|
674
|
+
let hexResult = 0;
|
|
675
|
+
for (; hexLength > 0; hexLength--) {
|
|
676
|
+
ch = this.next();
|
|
677
|
+
if ((tmp = hexCharCodeToNumber(ch)) >= 0) {
|
|
678
|
+
hexResult = (hexResult << 4) + tmp;
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
681
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read double quoted scalar: expected hexadecimal character");
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
this.result += codepointToChar(hexResult);
|
|
685
|
+
this.position++;
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read double quoted scalar: unknown escape sequence");
|
|
689
|
+
}
|
|
690
|
+
captureStart = captureEnd = this.position;
|
|
691
|
+
}
|
|
692
|
+
else if ((0, _chars_js_1.isEOL)(ch)) {
|
|
693
|
+
this.captureSegment(captureStart, captureEnd, true);
|
|
694
|
+
this.writeFoldedLines(this.skipSeparationSpace(false, nodeIndent));
|
|
695
|
+
captureStart = captureEnd = this.position;
|
|
696
|
+
}
|
|
697
|
+
else if (this.position === this.lineStart &&
|
|
698
|
+
this.testDocumentSeparator()) {
|
|
699
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the document within a double quoted scalar");
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
this.position++;
|
|
703
|
+
captureEnd = this.position;
|
|
704
|
+
}
|
|
705
|
+
ch = this.peek();
|
|
706
|
+
}
|
|
707
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Unexpected end of the stream within a double quoted scalar");
|
|
708
|
+
}
|
|
709
|
+
readFlowCollection(nodeIndent) {
|
|
710
|
+
let ch = this.peek();
|
|
711
|
+
let terminator;
|
|
712
|
+
let isMapping = true;
|
|
713
|
+
let result = {};
|
|
714
|
+
if (ch === _chars_js_1.LEFT_SQUARE_BRACKET) {
|
|
715
|
+
terminator = _chars_js_1.RIGHT_SQUARE_BRACKET;
|
|
716
|
+
isMapping = false;
|
|
717
|
+
result = [];
|
|
718
|
+
}
|
|
719
|
+
else if (ch === _chars_js_1.LEFT_CURLY_BRACKET) {
|
|
720
|
+
terminator = _chars_js_1.RIGHT_CURLY_BRACKET;
|
|
721
|
+
}
|
|
722
|
+
else {
|
|
723
|
+
return false;
|
|
724
|
+
}
|
|
725
|
+
if (this.anchor !== null && typeof this.anchor !== "undefined") {
|
|
726
|
+
this.anchorMap.set(this.anchor, result);
|
|
727
|
+
}
|
|
728
|
+
ch = this.next();
|
|
729
|
+
const tag = this.tag;
|
|
730
|
+
const anchor = this.anchor;
|
|
731
|
+
let readNext = true;
|
|
732
|
+
let valueNode = null;
|
|
733
|
+
let keyNode = null;
|
|
734
|
+
let keyTag = null;
|
|
735
|
+
let isExplicitPair = false;
|
|
736
|
+
let isPair = false;
|
|
737
|
+
let following = 0;
|
|
738
|
+
let line = 0;
|
|
739
|
+
const overridableKeys = new Set();
|
|
740
|
+
while (ch !== 0) {
|
|
741
|
+
this.skipSeparationSpace(true, nodeIndent);
|
|
742
|
+
ch = this.peek();
|
|
743
|
+
if (ch === terminator) {
|
|
744
|
+
this.position++;
|
|
745
|
+
this.tag = tag;
|
|
746
|
+
this.anchor = anchor;
|
|
747
|
+
this.kind = isMapping ? "mapping" : "sequence";
|
|
748
|
+
this.result = result;
|
|
749
|
+
return true;
|
|
750
|
+
}
|
|
751
|
+
if (!readNext) {
|
|
752
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read flow collection: missing comma between flow collection entries");
|
|
753
|
+
}
|
|
754
|
+
keyTag = keyNode = valueNode = null;
|
|
755
|
+
isPair = isExplicitPair = false;
|
|
756
|
+
if (ch === _chars_js_1.QUESTION) {
|
|
757
|
+
following = this.peek(1);
|
|
758
|
+
if ((0, _chars_js_1.isWhiteSpaceOrEOL)(following)) {
|
|
759
|
+
isPair = isExplicitPair = true;
|
|
760
|
+
this.position++;
|
|
761
|
+
this.skipSeparationSpace(true, nodeIndent);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
line = this.line;
|
|
765
|
+
this.composeNode({
|
|
766
|
+
parentIndent: nodeIndent,
|
|
767
|
+
nodeContext: CONTEXT_FLOW_IN,
|
|
768
|
+
allowToSeek: false,
|
|
769
|
+
allowCompact: true,
|
|
770
|
+
});
|
|
771
|
+
keyTag = this.tag || null;
|
|
772
|
+
keyNode = this.result;
|
|
773
|
+
this.skipSeparationSpace(true, nodeIndent);
|
|
774
|
+
ch = this.peek();
|
|
775
|
+
if ((isExplicitPair || this.line === line) && ch === _chars_js_1.COLON) {
|
|
776
|
+
isPair = true;
|
|
777
|
+
ch = this.next();
|
|
778
|
+
this.skipSeparationSpace(true, nodeIndent);
|
|
779
|
+
this.composeNode({
|
|
780
|
+
parentIndent: nodeIndent,
|
|
781
|
+
nodeContext: CONTEXT_FLOW_IN,
|
|
782
|
+
allowToSeek: false,
|
|
783
|
+
allowCompact: true,
|
|
784
|
+
});
|
|
785
|
+
valueNode = this.result;
|
|
786
|
+
}
|
|
787
|
+
if (isMapping) {
|
|
788
|
+
this.storeMappingPair(result, overridableKeys, keyTag, keyNode, valueNode);
|
|
789
|
+
}
|
|
790
|
+
else if (isPair) {
|
|
791
|
+
result.push(this.storeMappingPair({}, overridableKeys, keyTag, keyNode, valueNode));
|
|
792
|
+
}
|
|
793
|
+
else {
|
|
794
|
+
result.push(keyNode);
|
|
795
|
+
}
|
|
796
|
+
this.skipSeparationSpace(true, nodeIndent);
|
|
797
|
+
ch = this.peek();
|
|
798
|
+
if (ch === _chars_js_1.COMMA) {
|
|
799
|
+
readNext = true;
|
|
800
|
+
ch = this.next();
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
readNext = false;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read flow collection: unexpected end of the stream within a flow collection");
|
|
807
|
+
}
|
|
808
|
+
// Handles block scaler styles: e.g. '|', '>', '|-' and '>-'.
|
|
809
|
+
// https://yaml.org/spec/1.2.2/#81-block-scalar-styles
|
|
810
|
+
readBlockScalar(nodeIndent) {
|
|
811
|
+
let chomping = CHOMPING_CLIP;
|
|
812
|
+
let didReadContent = false;
|
|
813
|
+
let detectedIndent = false;
|
|
814
|
+
let textIndent = nodeIndent;
|
|
815
|
+
let emptyLines = 0;
|
|
816
|
+
let atMoreIndented = false;
|
|
817
|
+
let ch = this.peek();
|
|
818
|
+
let folding = false;
|
|
819
|
+
if (ch === _chars_js_1.VERTICAL_LINE) {
|
|
820
|
+
folding = false;
|
|
821
|
+
}
|
|
822
|
+
else if (ch === _chars_js_1.GREATER_THAN) {
|
|
823
|
+
folding = true;
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
return false;
|
|
827
|
+
}
|
|
828
|
+
this.kind = "scalar";
|
|
829
|
+
this.result = "";
|
|
830
|
+
let tmp = 0;
|
|
831
|
+
while (ch !== 0) {
|
|
832
|
+
ch = this.next();
|
|
833
|
+
if (ch === _chars_js_1.PLUS || ch === _chars_js_1.MINUS) {
|
|
834
|
+
if (CHOMPING_CLIP === chomping) {
|
|
835
|
+
chomping = ch === _chars_js_1.PLUS ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
836
|
+
}
|
|
837
|
+
else {
|
|
838
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: chomping mode identifier repeated");
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
else if ((tmp = decimalCharCodeToNumber(ch)) >= 0) {
|
|
842
|
+
if (tmp === 0) {
|
|
843
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: indentation width must be greater than 0");
|
|
844
|
+
}
|
|
845
|
+
else if (!detectedIndent) {
|
|
846
|
+
textIndent = nodeIndent + tmp - 1;
|
|
847
|
+
detectedIndent = true;
|
|
848
|
+
}
|
|
849
|
+
else {
|
|
850
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: indentation width identifier repeated");
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
break;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if ((0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
858
|
+
this.skipWhitespaces();
|
|
859
|
+
this.skipComment();
|
|
860
|
+
ch = this.peek();
|
|
861
|
+
}
|
|
862
|
+
while (ch !== 0) {
|
|
863
|
+
this.readLineBreak();
|
|
864
|
+
this.lineIndent = 0;
|
|
865
|
+
ch = this.peek();
|
|
866
|
+
while ((!detectedIndent || this.lineIndent < textIndent) &&
|
|
867
|
+
ch === _chars_js_1.SPACE) {
|
|
868
|
+
this.lineIndent++;
|
|
869
|
+
ch = this.next();
|
|
870
|
+
}
|
|
871
|
+
if (!detectedIndent && this.lineIndent > textIndent) {
|
|
872
|
+
textIndent = this.lineIndent;
|
|
873
|
+
}
|
|
874
|
+
if ((0, _chars_js_1.isEOL)(ch)) {
|
|
875
|
+
emptyLines++;
|
|
876
|
+
continue;
|
|
877
|
+
}
|
|
878
|
+
// End of the scalar.
|
|
879
|
+
if (this.lineIndent < textIndent) {
|
|
880
|
+
// Perform the chomping.
|
|
881
|
+
if (chomping === CHOMPING_KEEP) {
|
|
882
|
+
this.result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
|
|
883
|
+
}
|
|
884
|
+
else if (chomping === CHOMPING_CLIP) {
|
|
885
|
+
if (didReadContent) {
|
|
886
|
+
// i.e. only if the scalar is not empty.
|
|
887
|
+
this.result += "\n";
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
// Break this `while` cycle and go to the function's epilogue.
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
// Folded style: use fancy rules to handle line breaks.
|
|
894
|
+
if (folding) {
|
|
895
|
+
// Lines starting with white space characters (more-indented lines) are not folded.
|
|
896
|
+
if ((0, _chars_js_1.isWhiteSpace)(ch)) {
|
|
897
|
+
atMoreIndented = true;
|
|
898
|
+
// except for the first content line (cf. Example 8.1)
|
|
899
|
+
this.result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
|
|
900
|
+
// End of more-indented block.
|
|
901
|
+
}
|
|
902
|
+
else if (atMoreIndented) {
|
|
903
|
+
atMoreIndented = false;
|
|
904
|
+
this.result += "\n".repeat(emptyLines + 1);
|
|
905
|
+
// Just one line break - perceive as the same line.
|
|
906
|
+
}
|
|
907
|
+
else if (emptyLines === 0) {
|
|
908
|
+
if (didReadContent) {
|
|
909
|
+
// i.e. only if we have already read some scalar content.
|
|
910
|
+
this.result += " ";
|
|
911
|
+
}
|
|
912
|
+
// Several line breaks - perceive as different lines.
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
this.result += "\n".repeat(emptyLines);
|
|
916
|
+
}
|
|
917
|
+
// Literal style: just add exact number of line breaks between content lines.
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
// Keep all line breaks except the header line break.
|
|
921
|
+
this.result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
|
|
922
|
+
}
|
|
923
|
+
didReadContent = true;
|
|
924
|
+
detectedIndent = true;
|
|
925
|
+
emptyLines = 0;
|
|
926
|
+
const captureStart = this.position;
|
|
927
|
+
while (!(0, _chars_js_1.isEOL)(ch) && ch !== 0) {
|
|
928
|
+
ch = this.next();
|
|
929
|
+
}
|
|
930
|
+
this.captureSegment(captureStart, this.position, false);
|
|
931
|
+
}
|
|
932
|
+
return true;
|
|
933
|
+
}
|
|
934
|
+
readBlockMapping(nodeIndent, flowIndent) {
|
|
935
|
+
const tag = this.tag;
|
|
936
|
+
const anchor = this.anchor;
|
|
937
|
+
const result = {};
|
|
938
|
+
const overridableKeys = new Set();
|
|
939
|
+
let allowCompact = false;
|
|
940
|
+
let line;
|
|
941
|
+
let pos;
|
|
942
|
+
let keyTag = null;
|
|
943
|
+
let keyNode = null;
|
|
944
|
+
let valueNode = null;
|
|
945
|
+
let atExplicitKey = false;
|
|
946
|
+
let detected = false;
|
|
947
|
+
if (this.anchor !== null && typeof this.anchor !== "undefined") {
|
|
948
|
+
this.anchorMap.set(this.anchor, result);
|
|
949
|
+
}
|
|
950
|
+
let ch = this.peek();
|
|
951
|
+
while (ch !== 0) {
|
|
952
|
+
const following = this.peek(1);
|
|
953
|
+
line = this.line; // Save the current line.
|
|
954
|
+
pos = this.position;
|
|
955
|
+
//
|
|
956
|
+
// Explicit notation case. There are two separate blocks:
|
|
957
|
+
// first for the key (denoted by "?") and second for the value (denoted by ":")
|
|
958
|
+
//
|
|
959
|
+
if ((ch === _chars_js_1.QUESTION || ch === _chars_js_1.COLON) && (0, _chars_js_1.isWhiteSpaceOrEOL)(following)) {
|
|
960
|
+
if (ch === _chars_js_1.QUESTION) {
|
|
961
|
+
if (atExplicitKey) {
|
|
962
|
+
this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
|
|
963
|
+
keyTag = null;
|
|
964
|
+
keyNode = null;
|
|
965
|
+
valueNode = null;
|
|
966
|
+
}
|
|
967
|
+
detected = true;
|
|
968
|
+
atExplicitKey = true;
|
|
969
|
+
allowCompact = true;
|
|
970
|
+
}
|
|
971
|
+
else if (atExplicitKey) {
|
|
972
|
+
// i.e. 0x3A/* : */ === character after the explicit key.
|
|
973
|
+
atExplicitKey = false;
|
|
974
|
+
allowCompact = true;
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block as explicit mapping pair is incomplete: a key node is missed or followed by a non-tabulated empty line");
|
|
978
|
+
}
|
|
979
|
+
this.position += 1;
|
|
980
|
+
ch = following;
|
|
981
|
+
//
|
|
982
|
+
// Implicit notation case. Flow-style node as the key first, then ":", and the value.
|
|
983
|
+
//
|
|
984
|
+
}
|
|
985
|
+
else if (this.composeNode({
|
|
986
|
+
parentIndent: flowIndent,
|
|
987
|
+
nodeContext: CONTEXT_FLOW_OUT,
|
|
988
|
+
allowToSeek: false,
|
|
989
|
+
allowCompact: true,
|
|
990
|
+
})) {
|
|
991
|
+
if (this.line === line) {
|
|
992
|
+
ch = this.peek();
|
|
993
|
+
this.skipWhitespaces();
|
|
994
|
+
ch = this.peek();
|
|
995
|
+
if (ch === _chars_js_1.COLON) {
|
|
996
|
+
ch = this.next();
|
|
997
|
+
if (!(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
998
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");
|
|
999
|
+
}
|
|
1000
|
+
if (atExplicitKey) {
|
|
1001
|
+
this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
|
|
1002
|
+
keyTag = null;
|
|
1003
|
+
keyNode = null;
|
|
1004
|
+
valueNode = null;
|
|
1005
|
+
}
|
|
1006
|
+
detected = true;
|
|
1007
|
+
atExplicitKey = false;
|
|
1008
|
+
allowCompact = false;
|
|
1009
|
+
keyTag = this.tag;
|
|
1010
|
+
keyNode = this.result;
|
|
1011
|
+
}
|
|
1012
|
+
else if (detected) {
|
|
1013
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read an implicit mapping pair: missing colon");
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
this.tag = tag;
|
|
1017
|
+
this.anchor = anchor;
|
|
1018
|
+
return true; // Keep the result of `composeNode`.
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
else if (detected) {
|
|
1022
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read a block mapping entry: a multiline key may not be an implicit key");
|
|
1023
|
+
}
|
|
1024
|
+
else {
|
|
1025
|
+
this.tag = tag;
|
|
1026
|
+
this.anchor = anchor;
|
|
1027
|
+
return true; // Keep the result of `composeNode`.
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
break; // Reading is done. Go to the epilogue.
|
|
1032
|
+
}
|
|
1033
|
+
//
|
|
1034
|
+
// Common reading code for both explicit and implicit notations.
|
|
1035
|
+
//
|
|
1036
|
+
if (this.line === line || this.lineIndent > nodeIndent) {
|
|
1037
|
+
if (this.composeNode({
|
|
1038
|
+
parentIndent: nodeIndent,
|
|
1039
|
+
nodeContext: CONTEXT_BLOCK_OUT,
|
|
1040
|
+
allowToSeek: true,
|
|
1041
|
+
allowCompact,
|
|
1042
|
+
})) {
|
|
1043
|
+
if (atExplicitKey) {
|
|
1044
|
+
keyNode = this.result;
|
|
1045
|
+
}
|
|
1046
|
+
else {
|
|
1047
|
+
valueNode = this.result;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
if (!atExplicitKey) {
|
|
1051
|
+
this.storeMappingPair(result, overridableKeys, keyTag, keyNode, valueNode, line, pos);
|
|
1052
|
+
keyTag = keyNode = valueNode = null;
|
|
1053
|
+
}
|
|
1054
|
+
this.skipSeparationSpace(true, -1);
|
|
1055
|
+
ch = this.peek();
|
|
1056
|
+
}
|
|
1057
|
+
if (this.lineIndent > nodeIndent && ch !== 0) {
|
|
1058
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read block: bad indentation of a mapping entry");
|
|
1059
|
+
}
|
|
1060
|
+
else if (this.lineIndent < nodeIndent) {
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
//
|
|
1065
|
+
// Epilogue.
|
|
1066
|
+
//
|
|
1067
|
+
// Special case: last mapping's node contains only the key in explicit notation.
|
|
1068
|
+
if (atExplicitKey) {
|
|
1069
|
+
this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
|
|
1070
|
+
}
|
|
1071
|
+
// Expose the resulting mapping.
|
|
1072
|
+
if (detected) {
|
|
1073
|
+
this.tag = tag;
|
|
1074
|
+
this.anchor = anchor;
|
|
1075
|
+
this.kind = "mapping";
|
|
1076
|
+
this.result = result;
|
|
1077
|
+
}
|
|
1078
|
+
return detected;
|
|
1079
|
+
}
|
|
1080
|
+
readTagProperty() {
|
|
1081
|
+
let isVerbatim = false;
|
|
1082
|
+
let isNamed = false;
|
|
1083
|
+
let tagHandle = "";
|
|
1084
|
+
let tagName;
|
|
1085
|
+
let ch = this.peek();
|
|
1086
|
+
if (ch !== _chars_js_1.EXCLAMATION)
|
|
1087
|
+
return false;
|
|
1088
|
+
if (this.tag !== null) {
|
|
1089
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: duplication of a tag property");
|
|
1090
|
+
}
|
|
1091
|
+
ch = this.next();
|
|
1092
|
+
if (ch === _chars_js_1.SMALLER_THAN) {
|
|
1093
|
+
isVerbatim = true;
|
|
1094
|
+
ch = this.next();
|
|
1095
|
+
}
|
|
1096
|
+
else if (ch === _chars_js_1.EXCLAMATION) {
|
|
1097
|
+
isNamed = true;
|
|
1098
|
+
tagHandle = "!!";
|
|
1099
|
+
ch = this.next();
|
|
1100
|
+
}
|
|
1101
|
+
else {
|
|
1102
|
+
tagHandle = "!";
|
|
1103
|
+
}
|
|
1104
|
+
let position = this.position;
|
|
1105
|
+
if (isVerbatim) {
|
|
1106
|
+
do {
|
|
1107
|
+
ch = this.next();
|
|
1108
|
+
} while (ch !== 0 && ch !== _chars_js_1.GREATER_THAN);
|
|
1109
|
+
if (this.position < this.length) {
|
|
1110
|
+
tagName = this.input.slice(position, this.position);
|
|
1111
|
+
ch = this.next();
|
|
1112
|
+
}
|
|
1113
|
+
else {
|
|
1114
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: unexpected end of stream");
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
else {
|
|
1118
|
+
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
1119
|
+
if (ch === _chars_js_1.EXCLAMATION) {
|
|
1120
|
+
if (!isNamed) {
|
|
1121
|
+
tagHandle = this.input.slice(position - 1, this.position + 1);
|
|
1122
|
+
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
|
1123
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: named tag handle contains invalid characters");
|
|
1124
|
+
}
|
|
1125
|
+
isNamed = true;
|
|
1126
|
+
position = this.position + 1;
|
|
1127
|
+
}
|
|
1128
|
+
else {
|
|
1129
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: tag suffix cannot contain an exclamation mark");
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
ch = this.next();
|
|
1133
|
+
}
|
|
1134
|
+
tagName = this.input.slice(position, this.position);
|
|
1135
|
+
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
|
1136
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read tag property: tag suffix cannot contain flow indicator characters");
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
if (tagName && !PATTERN_TAG_URI.test(tagName)) {
|
|
1140
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read tag property: invalid characters in tag name "${tagName}"`);
|
|
1141
|
+
}
|
|
1142
|
+
if (isVerbatim) {
|
|
1143
|
+
this.tag = tagName;
|
|
1144
|
+
}
|
|
1145
|
+
else if (this.tagMap.has(tagHandle)) {
|
|
1146
|
+
this.tag = this.tagMap.get(tagHandle) + tagName;
|
|
1147
|
+
}
|
|
1148
|
+
else if (tagHandle === "!") {
|
|
1149
|
+
this.tag = `!${tagName}`;
|
|
1150
|
+
}
|
|
1151
|
+
else if (tagHandle === "!!") {
|
|
1152
|
+
this.tag = `tag:yaml.org,2002:${tagName}`;
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read tag property: undeclared tag handle "${tagHandle}"`);
|
|
1156
|
+
}
|
|
1157
|
+
return true;
|
|
1158
|
+
}
|
|
1159
|
+
readAnchorProperty() {
|
|
1160
|
+
let ch = this.peek();
|
|
1161
|
+
if (ch !== _chars_js_1.AMPERSAND)
|
|
1162
|
+
return false;
|
|
1163
|
+
if (this.anchor !== null) {
|
|
1164
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read anchor property: duplicate anchor property");
|
|
1165
|
+
}
|
|
1166
|
+
ch = this.next();
|
|
1167
|
+
const position = this.position;
|
|
1168
|
+
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch) && !(0, _chars_js_1.isFlowIndicator)(ch)) {
|
|
1169
|
+
ch = this.next();
|
|
1170
|
+
}
|
|
1171
|
+
if (this.position === position) {
|
|
1172
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read anchor property: name of an anchor node must contain at least one character");
|
|
1173
|
+
}
|
|
1174
|
+
this.anchor = this.input.slice(position, this.position);
|
|
1175
|
+
return true;
|
|
1176
|
+
}
|
|
1177
|
+
readAlias() {
|
|
1178
|
+
if (this.peek() !== _chars_js_1.ASTERISK)
|
|
1179
|
+
return false;
|
|
1180
|
+
let ch = this.next();
|
|
1181
|
+
const position = this.position;
|
|
1182
|
+
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch) && !(0, _chars_js_1.isFlowIndicator)(ch)) {
|
|
1183
|
+
ch = this.next();
|
|
1184
|
+
}
|
|
1185
|
+
if (this.position === position) {
|
|
1186
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read alias: alias name must contain at least one character");
|
|
1187
|
+
}
|
|
1188
|
+
const alias = this.input.slice(position, this.position);
|
|
1189
|
+
if (!this.anchorMap.has(alias)) {
|
|
1190
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot read alias: unidentified alias "${alias}"`);
|
|
1191
|
+
}
|
|
1192
|
+
this.result = this.anchorMap.get(alias);
|
|
1193
|
+
this.skipSeparationSpace(true, -1);
|
|
1194
|
+
return true;
|
|
1195
|
+
}
|
|
1196
|
+
composeNode({ parentIndent, nodeContext, allowToSeek, allowCompact }) {
|
|
1197
|
+
let indentStatus = 1; // 1: this>parent, 0: this=parent, -1: this<parent
|
|
1198
|
+
let atNewLine = false;
|
|
1199
|
+
let hasContent = false;
|
|
1200
|
+
let type;
|
|
1201
|
+
this.tag = null;
|
|
1202
|
+
this.anchor = null;
|
|
1203
|
+
this.kind = null;
|
|
1204
|
+
this.result = null;
|
|
1205
|
+
const allowBlockScalars = CONTEXT_BLOCK_OUT === nodeContext ||
|
|
1206
|
+
CONTEXT_BLOCK_IN === nodeContext;
|
|
1207
|
+
let allowBlockCollections = allowBlockScalars;
|
|
1208
|
+
const allowBlockStyles = allowBlockScalars;
|
|
1209
|
+
if (allowToSeek) {
|
|
1210
|
+
if (this.skipSeparationSpace(true, -1)) {
|
|
1211
|
+
atNewLine = true;
|
|
1212
|
+
if (this.lineIndent > parentIndent) {
|
|
1213
|
+
indentStatus = 1;
|
|
1214
|
+
}
|
|
1215
|
+
else if (this.lineIndent === parentIndent) {
|
|
1216
|
+
indentStatus = 0;
|
|
1217
|
+
}
|
|
1218
|
+
else if (this.lineIndent < parentIndent) {
|
|
1219
|
+
indentStatus = -1;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
if (indentStatus === 1) {
|
|
1224
|
+
while (this.readTagProperty() || this.readAnchorProperty()) {
|
|
1225
|
+
if (this.skipSeparationSpace(true, -1)) {
|
|
1226
|
+
atNewLine = true;
|
|
1227
|
+
allowBlockCollections = allowBlockStyles;
|
|
1228
|
+
if (this.lineIndent > parentIndent) {
|
|
1229
|
+
indentStatus = 1;
|
|
1230
|
+
}
|
|
1231
|
+
else if (this.lineIndent === parentIndent) {
|
|
1232
|
+
indentStatus = 0;
|
|
1233
|
+
}
|
|
1234
|
+
else if (this.lineIndent < parentIndent) {
|
|
1235
|
+
indentStatus = -1;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
else {
|
|
1239
|
+
allowBlockCollections = false;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
if (allowBlockCollections) {
|
|
1244
|
+
allowBlockCollections = atNewLine || allowCompact;
|
|
1245
|
+
}
|
|
1246
|
+
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
|
|
1247
|
+
const cond = CONTEXT_FLOW_IN === nodeContext ||
|
|
1248
|
+
CONTEXT_FLOW_OUT === nodeContext;
|
|
1249
|
+
const flowIndent = cond ? parentIndent : parentIndent + 1;
|
|
1250
|
+
const blockIndent = this.position - this.lineStart;
|
|
1251
|
+
if (indentStatus === 1) {
|
|
1252
|
+
if ((allowBlockCollections &&
|
|
1253
|
+
(this.readBlockSequence(blockIndent) ||
|
|
1254
|
+
this.readBlockMapping(blockIndent, flowIndent))) ||
|
|
1255
|
+
this.readFlowCollection(flowIndent)) {
|
|
1256
|
+
hasContent = true;
|
|
1257
|
+
}
|
|
1258
|
+
else {
|
|
1259
|
+
if ((allowBlockScalars && this.readBlockScalar(flowIndent)) ||
|
|
1260
|
+
this.readSingleQuotedScalar(flowIndent) ||
|
|
1261
|
+
this.readDoubleQuotedScalar(flowIndent)) {
|
|
1262
|
+
hasContent = true;
|
|
1263
|
+
}
|
|
1264
|
+
else if (this.readAlias()) {
|
|
1265
|
+
hasContent = true;
|
|
1266
|
+
if (this.tag !== null || this.anchor !== null) {
|
|
1267
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot compose node: alias node should not have any properties");
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
else if (this.readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
1271
|
+
hasContent = true;
|
|
1272
|
+
if (this.tag === null) {
|
|
1273
|
+
this.tag = "?";
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
if (this.anchor !== null) {
|
|
1277
|
+
this.anchorMap.set(this.anchor, this.result);
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
else if (indentStatus === 0) {
|
|
1282
|
+
// Special case: block sequences are allowed to have same indentation level as the parent.
|
|
1283
|
+
// http://www.yaml.org/spec/1.2/spec.html#id2799784
|
|
1284
|
+
hasContent = allowBlockCollections &&
|
|
1285
|
+
this.readBlockSequence(blockIndent);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
if (this.tag !== null && this.tag !== "!") {
|
|
1289
|
+
if (this.tag === "?") {
|
|
1290
|
+
for (let typeIndex = 0; typeIndex < this.implicitTypes.length; typeIndex++) {
|
|
1291
|
+
type = this.implicitTypes[typeIndex];
|
|
1292
|
+
// Implicit resolving is not allowed for non-scalar types, and '?'
|
|
1293
|
+
// non-specific tag is only assigned to plain scalars. So, it isn't
|
|
1294
|
+
// needed to check for 'kind' conformity.
|
|
1295
|
+
if (type.resolve(this.result)) {
|
|
1296
|
+
// `state.result` updated in resolver if matched
|
|
1297
|
+
this.result = type.construct(this.result);
|
|
1298
|
+
this.tag = type.tag;
|
|
1299
|
+
if (this.anchor !== null) {
|
|
1300
|
+
this.anchorMap.set(this.anchor, this.result);
|
|
1301
|
+
}
|
|
1302
|
+
break;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
else if (this.typeMap[this.kind ?? "fallback"].has(this.tag)) {
|
|
1307
|
+
const map = this.typeMap[this.kind ?? "fallback"];
|
|
1308
|
+
type = map.get(this.tag);
|
|
1309
|
+
if (this.result !== null && type.kind !== this.kind) {
|
|
1310
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Unacceptable node kind for !<${this.tag}> tag: it should be "${type.kind}", not "${this.kind}"`);
|
|
1311
|
+
}
|
|
1312
|
+
if (!type.resolve(this.result)) {
|
|
1313
|
+
// `state.result` updated in resolver if matched
|
|
1314
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot resolve a node with !<${this.tag}> explicit tag`);
|
|
1315
|
+
}
|
|
1316
|
+
else {
|
|
1317
|
+
this.result = type.construct(this.result);
|
|
1318
|
+
if (this.anchor !== null) {
|
|
1319
|
+
this.anchorMap.set(this.anchor, this.result);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
else {
|
|
1324
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, `Cannot resolve unknown tag !<${this.tag}>`);
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
return this.tag !== null || this.anchor !== null || hasContent;
|
|
1328
|
+
}
|
|
1329
|
+
readDirectives() {
|
|
1330
|
+
let hasDirectives = false;
|
|
1331
|
+
let version = null;
|
|
1332
|
+
let ch = this.peek();
|
|
1333
|
+
while (ch !== 0) {
|
|
1334
|
+
this.skipSeparationSpace(true, -1);
|
|
1335
|
+
ch = this.peek();
|
|
1336
|
+
if (this.lineIndent > 0 || ch !== _chars_js_1.PERCENT) {
|
|
1337
|
+
break;
|
|
1338
|
+
}
|
|
1339
|
+
hasDirectives = true;
|
|
1340
|
+
ch = this.next();
|
|
1341
|
+
let position = this.position;
|
|
1342
|
+
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
1343
|
+
ch = this.next();
|
|
1344
|
+
}
|
|
1345
|
+
const directiveName = this.input.slice(position, this.position);
|
|
1346
|
+
const directiveArgs = [];
|
|
1347
|
+
if (directiveName.length < 1) {
|
|
1348
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: directive name length must be greater than zero");
|
|
1349
|
+
}
|
|
1350
|
+
while (ch !== 0) {
|
|
1351
|
+
this.skipWhitespaces();
|
|
1352
|
+
this.skipComment();
|
|
1353
|
+
ch = this.peek();
|
|
1354
|
+
if ((0, _chars_js_1.isEOL)(ch))
|
|
1355
|
+
break;
|
|
1356
|
+
position = this.position;
|
|
1357
|
+
while (ch !== 0 && !(0, _chars_js_1.isWhiteSpaceOrEOL)(ch)) {
|
|
1358
|
+
ch = this.next();
|
|
1359
|
+
}
|
|
1360
|
+
directiveArgs.push(this.input.slice(position, this.position));
|
|
1361
|
+
}
|
|
1362
|
+
if (ch !== 0)
|
|
1363
|
+
this.readLineBreak();
|
|
1364
|
+
switch (directiveName) {
|
|
1365
|
+
case "YAML":
|
|
1366
|
+
if (version !== null) {
|
|
1367
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot handle YAML directive: duplication of %YAML directive");
|
|
1368
|
+
}
|
|
1369
|
+
version = this.yamlDirectiveHandler(directiveArgs);
|
|
1370
|
+
break;
|
|
1371
|
+
case "TAG":
|
|
1372
|
+
this.tagDirectiveHandler(directiveArgs);
|
|
1373
|
+
break;
|
|
1374
|
+
default:
|
|
1375
|
+
this.dispatchWarning(`unknown document directive "${directiveName}"`);
|
|
1376
|
+
break;
|
|
1377
|
+
}
|
|
1378
|
+
ch = this.peek();
|
|
1379
|
+
}
|
|
1380
|
+
return hasDirectives;
|
|
1381
|
+
}
|
|
1382
|
+
readDocument() {
|
|
1383
|
+
const documentStart = this.position;
|
|
1384
|
+
this.checkLineBreaks = false;
|
|
1385
|
+
this.tagMap = new Map();
|
|
1386
|
+
this.anchorMap = new Map();
|
|
1387
|
+
const hasDirectives = this.readDirectives();
|
|
1388
|
+
this.skipSeparationSpace(true, -1);
|
|
1389
|
+
if (this.lineIndent === 0 &&
|
|
1390
|
+
this.peek() === _chars_js_1.MINUS &&
|
|
1391
|
+
this.peek(1) === _chars_js_1.MINUS &&
|
|
1392
|
+
this.peek(2) === _chars_js_1.MINUS) {
|
|
1393
|
+
this.position += 3;
|
|
1394
|
+
this.skipSeparationSpace(true, -1);
|
|
1395
|
+
}
|
|
1396
|
+
else if (hasDirectives) {
|
|
1397
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: directives end mark is expected");
|
|
1398
|
+
}
|
|
1399
|
+
this.composeNode({
|
|
1400
|
+
parentIndent: this.lineIndent - 1,
|
|
1401
|
+
nodeContext: CONTEXT_BLOCK_OUT,
|
|
1402
|
+
allowToSeek: false,
|
|
1403
|
+
allowCompact: true,
|
|
1404
|
+
});
|
|
1405
|
+
this.skipSeparationSpace(true, -1);
|
|
1406
|
+
if (this.checkLineBreaks &&
|
|
1407
|
+
PATTERN_NON_ASCII_LINE_BREAKS.test(this.input.slice(documentStart, this.position))) {
|
|
1408
|
+
this.dispatchWarning("non-ASCII line breaks are interpreted as content");
|
|
1409
|
+
}
|
|
1410
|
+
if (this.position === this.lineStart && this.testDocumentSeparator()) {
|
|
1411
|
+
if (this.peek() === _chars_js_1.DOT) {
|
|
1412
|
+
this.position += 3;
|
|
1413
|
+
this.skipSeparationSpace(true, -1);
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
else if (this.position < this.length - 1) {
|
|
1417
|
+
throw __classPrivateFieldGet(this, _LoaderState_instances, "m", _LoaderState_createError).call(this, "Cannot read document: end of the stream or a document separator is expected");
|
|
1418
|
+
}
|
|
1419
|
+
return this.result;
|
|
1420
|
+
}
|
|
1421
|
+
*readDocuments() {
|
|
1422
|
+
while (this.position < this.length - 1) {
|
|
1423
|
+
yield this.readDocument();
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
exports.LoaderState = LoaderState;
|
|
1428
|
+
_LoaderState_instances = new WeakSet(), _LoaderState_createError = function _LoaderState_createError(message) {
|
|
1429
|
+
const mark = markToString(this.input, this.position, this.line, this.position - this.lineStart);
|
|
1430
|
+
return new SyntaxError(`${message} ${mark}`);
|
|
1431
|
+
};
|