ventojs 0.12.2 → 0.12.4
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.shims.d.ts +1 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.test_polyfills.d.ts.map +1 -0
- package/esm/_dnt.test_shims.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/_constants.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/_diff.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/_format.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assert.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assert.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assert_equals.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assert_is_error.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assert_throws.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assertion_error.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/assert/equal.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/collections/_utils.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/collections/deep_merge.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/fmt/colors.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/_formats.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/create_extractor.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/json.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/test.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/toml.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/front_matter/yaml.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/entities.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/html/entities.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/mod.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/html/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/assert_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/basename.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/basename.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/common.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/constants.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/constants.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/format.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/format.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/from_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize_string.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize_string.js +2 -2
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/relative.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_interface.d.ts +14 -1
- package/esm/deps/deno.land/std@0.221.0/path/_interface.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_os.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/_os.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/basename.js +9 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/common.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/constants.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/constants.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path}/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/dirname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/extname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/extname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/format.d.ts +4 -1
- package/esm/deps/deno.land/std@0.221.0/path/format.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/format.js +3 -1
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/from_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/from_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/glob_to_regexp.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path}/is_absolute.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/is_absolute.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/is_glob.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/join.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join_globs.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/join_globs.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/mod.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/normalize.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +19 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/_util.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/basename.js +9 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/common.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/constants.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/constants.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +15 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/dirname.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +16 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/extname.js +9 -0
- package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/format.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/format.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/from_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/is_absolute.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/join.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join.js +1 -1
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join_globs.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/mod.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/windows → std@0.221.0/path/posix}/normalize_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/parse.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/parse.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/relative.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/resolve.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/relative.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/resolve.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/resolve.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/to_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_namespaced_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/_util.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/_util.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/basename.js +9 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/common.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/common.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/constants.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/constants.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/dirname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/extname.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/extname.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/format.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/format.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/from_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path → std@0.221.0/path/windows}/is_absolute.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/is_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/join.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join_globs.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/mod.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/normalize.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1/path/posix → std@0.221.0/path/windows}/normalize_glob.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/parse.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/parse.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/relative.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/relative.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/resolve.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_file_url.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +1 -0
- package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/toml/_parser.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/toml/parse.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_error.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_loader/loader.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_loader/loader_state.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_mark.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_state.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/binary.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/bool.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/float.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/function.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/int.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/map.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/merge.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/nil.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/omap.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/pairs.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/regexp.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/seq.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/set.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/str.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_type/undefined.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/_utils.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/parse.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema/core.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema/default.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema/extended.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema/failsafe.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema/json.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/schema.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.221.0/yaml/type.d.ts.map +1 -0
- package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.d.ts +110 -0
- package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.d.ts.map +1 -0
- package/esm/deps/deno.land/x/astring@v1.8.6/src/astring.js +1159 -0
- package/esm/deps.d.ts +3 -2
- package/esm/deps.d.ts.map +1 -0
- package/esm/deps.js +2 -2
- package/esm/mod.d.ts +1 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/plugins/auto_trim.d.ts +1 -0
- package/esm/plugins/auto_trim.d.ts.map +1 -0
- package/esm/plugins/echo.d.ts +1 -0
- package/esm/plugins/echo.d.ts.map +1 -0
- package/esm/plugins/escape.d.ts +1 -0
- package/esm/plugins/escape.d.ts.map +1 -0
- package/esm/plugins/export.d.ts +1 -0
- package/esm/plugins/export.d.ts.map +1 -0
- package/esm/plugins/for.d.ts +1 -0
- package/esm/plugins/for.d.ts.map +1 -0
- package/esm/plugins/function.d.ts +1 -0
- package/esm/plugins/function.d.ts.map +1 -0
- package/esm/plugins/if.d.ts +1 -0
- package/esm/plugins/if.d.ts.map +1 -0
- package/esm/plugins/import.d.ts +1 -0
- package/esm/plugins/import.d.ts.map +1 -0
- package/esm/plugins/include.d.ts +1 -0
- package/esm/plugins/include.d.ts.map +1 -0
- package/esm/plugins/include.js +14 -6
- package/esm/plugins/js.d.ts +1 -0
- package/esm/plugins/js.d.ts.map +1 -0
- package/esm/plugins/layout.d.ts +1 -0
- package/esm/plugins/layout.d.ts.map +1 -0
- package/esm/plugins/set.d.ts +1 -0
- package/esm/plugins/set.d.ts.map +1 -0
- package/esm/plugins/trim.d.ts +1 -0
- package/esm/plugins/trim.d.ts.map +1 -0
- package/esm/plugins/unescape.d.ts +1 -0
- package/esm/plugins/unescape.d.ts.map +1 -0
- package/esm/src/environment.d.ts +55 -0
- package/esm/src/environment.d.ts.map +1 -0
- package/esm/src/environment.js +200 -0
- package/esm/src/js.d.ts +5 -0
- package/esm/src/js.d.ts.map +1 -0
- package/esm/src/js.js +150 -0
- package/esm/src/loader.d.ts +15 -0
- package/esm/src/loader.d.ts.map +1 -0
- package/esm/src/loader.js +19 -0
- package/esm/src/tokenizer.d.ts +14 -0
- package/esm/src/tokenizer.d.ts.map +1 -0
- package/esm/src/tokenizer.js +92 -0
- package/esm/src/transformer.d.ts +2 -0
- package/esm/src/transformer.d.ts.map +1 -0
- package/esm/src/transformer.js +196 -0
- package/esm/test/auto_trim.test.d.ts.map +1 -0
- package/esm/test/comment.test.d.ts.map +1 -0
- package/esm/test/compile.test.d.ts.map +1 -0
- package/esm/test/echo.test.d.ts.map +1 -0
- package/esm/test/escape.test.d.ts.map +1 -0
- package/esm/test/for.test.d.ts.map +1 -0
- package/esm/test/function.test.d.ts.map +1 -0
- package/esm/test/if.test.d.ts.map +1 -0
- package/esm/test/import.test.d.ts.map +1 -0
- package/esm/test/include.test.d.ts.map +1 -0
- package/esm/test/js.test.d.ts.map +1 -0
- package/esm/test/layout.test.d.ts.map +1 -0
- package/esm/test/print.test.d.ts.map +1 -0
- package/esm/test/safe.test.d.ts.map +1 -0
- package/esm/test/set.test.d.ts.map +1 -0
- package/esm/test/tokenizer.test.d.ts.map +1 -0
- package/esm/test/unescape.test.d.ts.map +1 -0
- package/esm/test/utils.d.ts.map +1 -0
- package/package.json +2 -2
- package/esm/deps/deno.land/std@0.219.1/path/basename.d.ts +0 -8
- package/esm/deps/deno.land/std@0.219.1/path/dirname.d.ts +0 -5
- package/esm/deps/deno.land/std@0.219.1/path/parse.d.ts +0 -6
- package/esm/deps/deno.land/std@0.219.1/path/parse.js +0 -12
- package/esm/deps/deno.land/std@0.219.1/path/posix/basename.d.ts +0 -8
- package/esm/deps/deno.land/std@0.219.1/path/windows/basename.d.ts +0 -8
- package/esm/deps/deno.land/std@0.219.1/path/windows/extname.d.ts +0 -6
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/entities.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/html/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
|
2
|
+
import { path } from "../deps.js";
|
|
3
|
+
export class FileLoader {
|
|
4
|
+
#root;
|
|
5
|
+
constructor(root) {
|
|
6
|
+
this.#root = root;
|
|
7
|
+
}
|
|
8
|
+
async load(file) {
|
|
9
|
+
return {
|
|
10
|
+
source: await dntShim.Deno.readTextFile(file),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
resolve(from, file) {
|
|
14
|
+
if (file.startsWith(".")) {
|
|
15
|
+
return path.join(path.dirname(from), file);
|
|
16
|
+
}
|
|
17
|
+
return path.join(this.#root, file);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type TokenType = "string" | "tag" | "filter" | "comment";
|
|
2
|
+
export type Token = [TokenType, string, number?];
|
|
3
|
+
export interface TokenizeResult {
|
|
4
|
+
tokens: Token[];
|
|
5
|
+
position: number;
|
|
6
|
+
error: Error | undefined;
|
|
7
|
+
}
|
|
8
|
+
export default function tokenize(source: string): TokenizeResult;
|
|
9
|
+
/**
|
|
10
|
+
* Parse a tag and return the indexes of the start and end brackets, and the filters between.
|
|
11
|
+
* For example: {{ tag |> filter1 |> filter2 }} => [2, 9, 20, 31]
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseTag(source: string): number[];
|
|
14
|
+
//# sourceMappingURL=tokenizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenizer.d.ts","sourceRoot":"","sources":["../../src/src/tokenizer.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAsF/D;AAWD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAiBjD"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import analyze from "./js.js";
|
|
2
|
+
export default function tokenize(source) {
|
|
3
|
+
const tokens = [];
|
|
4
|
+
let type = "string";
|
|
5
|
+
let position = 0;
|
|
6
|
+
try {
|
|
7
|
+
while (source.length > 0) {
|
|
8
|
+
if (type === "string") {
|
|
9
|
+
const index = source.indexOf("{{");
|
|
10
|
+
const code = index === -1 ? source : source.slice(0, index);
|
|
11
|
+
tokens.push([type, code, position]);
|
|
12
|
+
if (index === -1) {
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
position += index;
|
|
16
|
+
source = source.slice(index);
|
|
17
|
+
type = source.startsWith("{{#") ? "comment" : "tag";
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (type === "comment") {
|
|
21
|
+
source = source.slice(3);
|
|
22
|
+
const index = source.indexOf("#}}");
|
|
23
|
+
const comment = index === -1 ? source : source.slice(0, index);
|
|
24
|
+
tokens.push([type, comment, position]);
|
|
25
|
+
if (index === -1) {
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
position += index + 3;
|
|
29
|
+
source = source.slice(index + 3);
|
|
30
|
+
type = "string";
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (type === "tag") {
|
|
34
|
+
const indexes = parseTag(source);
|
|
35
|
+
const lastIndex = indexes.length - 1;
|
|
36
|
+
let tag;
|
|
37
|
+
indexes.reduce((prev, curr, index) => {
|
|
38
|
+
const code = source.slice(prev, curr - 2);
|
|
39
|
+
// Tag
|
|
40
|
+
if (index === 1) {
|
|
41
|
+
tag = [type, code, position];
|
|
42
|
+
tokens.push(tag);
|
|
43
|
+
return curr;
|
|
44
|
+
}
|
|
45
|
+
// Filters
|
|
46
|
+
tokens.push(["filter", code]);
|
|
47
|
+
return curr;
|
|
48
|
+
});
|
|
49
|
+
position += indexes[lastIndex];
|
|
50
|
+
source = source.slice(indexes[lastIndex]);
|
|
51
|
+
type = "string";
|
|
52
|
+
// Search the closing echo tag {{ /echo }}
|
|
53
|
+
if (tag?.[1].match(/^\-?\s*echo\s*\-?$/)) {
|
|
54
|
+
const end = source.match(/{{\-?\s*\/echo\s*\-?}}/);
|
|
55
|
+
if (!end) {
|
|
56
|
+
throw new Error("Unclosed echo tag");
|
|
57
|
+
}
|
|
58
|
+
const rawCode = source.slice(0, end.index);
|
|
59
|
+
tag[1] = `echo ${JSON.stringify(rawCode)}`;
|
|
60
|
+
const length = Number(end.index) + end[0].length;
|
|
61
|
+
source = source.slice(length);
|
|
62
|
+
position += length;
|
|
63
|
+
}
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
return { tokens, position, error };
|
|
70
|
+
}
|
|
71
|
+
return { tokens, position, error: undefined };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Parse a tag and return the indexes of the start and end brackets, and the filters between.
|
|
75
|
+
* For example: {{ tag |> filter1 |> filter2 }} => [2, 9, 20, 31]
|
|
76
|
+
*/
|
|
77
|
+
export function parseTag(source) {
|
|
78
|
+
const indexes = [2];
|
|
79
|
+
analyze(source, (type, index) => {
|
|
80
|
+
if (type === "close") {
|
|
81
|
+
indexes.push(index);
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (type === "new-filter") {
|
|
85
|
+
indexes.push(index);
|
|
86
|
+
}
|
|
87
|
+
else if (type === "unclosed") {
|
|
88
|
+
throw new Error("Unclosed tag");
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return indexes;
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../src/src/transformer.ts"],"names":[],"mappings":"AAkHA,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,MAAM,CA4HR"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
|
2
|
+
import { astring, meriyah, walker } from "../deps.js";
|
|
3
|
+
// List of identifiers that are in globalThis
|
|
4
|
+
// but should be accessed as templateState.identifier
|
|
5
|
+
const INCLUDE_GLOBAL = [
|
|
6
|
+
"name",
|
|
7
|
+
];
|
|
8
|
+
// List of identifiers that should be ignored
|
|
9
|
+
// when transforming the code
|
|
10
|
+
const DEFAULT_EXCLUDES = [
|
|
11
|
+
"globalThis",
|
|
12
|
+
"self",
|
|
13
|
+
"global",
|
|
14
|
+
"this",
|
|
15
|
+
"undefined",
|
|
16
|
+
"null",
|
|
17
|
+
];
|
|
18
|
+
// Tracks the scope of the code
|
|
19
|
+
// and the variables that should be ignored
|
|
20
|
+
class ScopeTracker {
|
|
21
|
+
scopes = [];
|
|
22
|
+
// The index of the global/function scope
|
|
23
|
+
globalScope = 0;
|
|
24
|
+
includes(val) {
|
|
25
|
+
for (let i = this.scopes.length - 1; i >= 0; i--) {
|
|
26
|
+
if (this.scopes[i].stack.includes(val)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
pushScope(global) {
|
|
33
|
+
if (global) {
|
|
34
|
+
this.globalScope = this.scopes.length;
|
|
35
|
+
}
|
|
36
|
+
const newScope = {
|
|
37
|
+
globalScope: this.globalScope,
|
|
38
|
+
stack: [],
|
|
39
|
+
};
|
|
40
|
+
this.scopes.push(newScope);
|
|
41
|
+
}
|
|
42
|
+
popScope() {
|
|
43
|
+
this.globalScope = this.scopes[this.scopes.length - 1].globalScope;
|
|
44
|
+
this.scopes.pop();
|
|
45
|
+
}
|
|
46
|
+
pushBinding(val, global) {
|
|
47
|
+
if (this.scopes.length === 0) {
|
|
48
|
+
this.scopes.push({ globalScope: this.globalScope, stack: [] });
|
|
49
|
+
}
|
|
50
|
+
if (global) {
|
|
51
|
+
this.scopes[this.globalScope].stack.push(val);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.scopes[this.scopes.length - 1].stack.push(val);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
pushPatternBinding(pattern, global) {
|
|
58
|
+
switch (pattern.type) {
|
|
59
|
+
case "Identifier":
|
|
60
|
+
this.pushBinding(pattern.name, global);
|
|
61
|
+
break;
|
|
62
|
+
case "RestElement":
|
|
63
|
+
this.pushPatternBinding(pattern.argument, global);
|
|
64
|
+
break;
|
|
65
|
+
case "ArrayPattern":
|
|
66
|
+
for (const element of pattern.elements) {
|
|
67
|
+
if (element) {
|
|
68
|
+
this.pushPatternBinding(element, global);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
case "ObjectPattern":
|
|
73
|
+
for (const prop of pattern.properties) {
|
|
74
|
+
if (prop.type === "RestElement") {
|
|
75
|
+
this.pushPatternBinding(prop.argument, global);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.pushPatternBinding(prop.value, global);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case "AssignmentPattern":
|
|
83
|
+
this.pushPatternBinding(pattern.left, global);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
pushPatternBindings(patterns, global) {
|
|
88
|
+
for (const pattern of patterns) {
|
|
89
|
+
this.pushPatternBinding(pattern, global);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export function transformTemplateCode(code, templateState) {
|
|
94
|
+
if (!code.trim()) {
|
|
95
|
+
return code;
|
|
96
|
+
}
|
|
97
|
+
const parsed = meriyah.parseScript(code, { module: true });
|
|
98
|
+
const tracker = new ScopeTracker();
|
|
99
|
+
const exclude = [
|
|
100
|
+
templateState,
|
|
101
|
+
...DEFAULT_EXCLUDES,
|
|
102
|
+
];
|
|
103
|
+
if (parsed.type !== "Program") {
|
|
104
|
+
throw new Error("Expected a program");
|
|
105
|
+
}
|
|
106
|
+
if (parsed.body.length === 0) {
|
|
107
|
+
throw new Error("Empty program");
|
|
108
|
+
}
|
|
109
|
+
// Transforms an identifier to a MemberExpression
|
|
110
|
+
// if it's not in the exclude list
|
|
111
|
+
//
|
|
112
|
+
// Example:
|
|
113
|
+
// Transforms {{ name }} to {{ id.name }}
|
|
114
|
+
function transformIdentifier(id) {
|
|
115
|
+
if ((!INCLUDE_GLOBAL.includes(id.name) &&
|
|
116
|
+
dntShim.dntGlobalThis[id.name] !== undefined) ||
|
|
117
|
+
exclude.includes(id.name) ||
|
|
118
|
+
tracker.includes(id.name) ||
|
|
119
|
+
id.name.startsWith("__")) {
|
|
120
|
+
return id;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
type: "MemberExpression",
|
|
124
|
+
object: {
|
|
125
|
+
type: "Identifier",
|
|
126
|
+
name: templateState,
|
|
127
|
+
},
|
|
128
|
+
optional: false,
|
|
129
|
+
computed: false,
|
|
130
|
+
property: id,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
walker.walk(parsed, {
|
|
134
|
+
enter(node) {
|
|
135
|
+
switch (node.type) {
|
|
136
|
+
// Track variable declarations
|
|
137
|
+
case "VariableDeclaration":
|
|
138
|
+
// "var" declarations are scoped to the function/global scope.
|
|
139
|
+
tracker.pushPatternBindings(node.declarations.map((d) => d.id), node.kind === "var");
|
|
140
|
+
break;
|
|
141
|
+
// Track function declarations, and
|
|
142
|
+
// function parameters.
|
|
143
|
+
// Also track the scope.
|
|
144
|
+
case "FunctionDeclaration":
|
|
145
|
+
case "FunctionExpression":
|
|
146
|
+
if (node.id) {
|
|
147
|
+
tracker.pushBinding(node.id.name);
|
|
148
|
+
}
|
|
149
|
+
tracker.pushScope(true);
|
|
150
|
+
tracker.pushPatternBindings(node.params);
|
|
151
|
+
break;
|
|
152
|
+
case "ArrowFunctionExpression":
|
|
153
|
+
tracker.pushScope();
|
|
154
|
+
tracker.pushPatternBindings(node.params);
|
|
155
|
+
break;
|
|
156
|
+
case "Property":
|
|
157
|
+
if (node.shorthand && node.key.type === "Identifier") {
|
|
158
|
+
this.replace({
|
|
159
|
+
type: "Property",
|
|
160
|
+
key: node.key,
|
|
161
|
+
value: transformIdentifier(node.key),
|
|
162
|
+
kind: "init",
|
|
163
|
+
computed: false,
|
|
164
|
+
method: false,
|
|
165
|
+
shorthand: false,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
leave(node, parent) {
|
|
172
|
+
switch (node.type) {
|
|
173
|
+
// Pop the scope when leaving a function
|
|
174
|
+
case "FunctionDeclaration":
|
|
175
|
+
case "FunctionExpression":
|
|
176
|
+
case "ArrowFunctionExpression":
|
|
177
|
+
tracker.popScope();
|
|
178
|
+
break;
|
|
179
|
+
case "Identifier":
|
|
180
|
+
// Don't transform identifiers that aren't at the start of a MemberExpression
|
|
181
|
+
// ie. don't transform `bar` or `baz` in `foo.bar.baz`
|
|
182
|
+
if (parent?.type === "MemberExpression" && parent.property === node) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
// Don't transform identifiers that are keys in an object
|
|
186
|
+
if (parent?.type === "Property" && parent.key === node) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this.replace(transformIdentifier(node));
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
const generated = astring.generate(parsed);
|
|
195
|
+
return generated;
|
|
196
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto_trim.test.d.ts","sourceRoot":"","sources":["../../src/test/auto_trim.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.test.d.ts","sourceRoot":"","sources":["../../src/test/comment.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.test.d.ts","sourceRoot":"","sources":["../../src/test/compile.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"echo.test.d.ts","sourceRoot":"","sources":["../../src/test/echo.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escape.test.d.ts","sourceRoot":"","sources":["../../src/test/escape.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"for.test.d.ts","sourceRoot":"","sources":["../../src/test/for.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.test.d.ts","sourceRoot":"","sources":["../../src/test/function.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"if.test.d.ts","sourceRoot":"","sources":["../../src/test/if.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.test.d.ts","sourceRoot":"","sources":["../../src/test/import.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include.test.d.ts","sourceRoot":"","sources":["../../src/test/include.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js.test.d.ts","sourceRoot":"","sources":["../../src/test/js.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.test.d.ts","sourceRoot":"","sources":["../../src/test/layout.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.test.d.ts","sourceRoot":"","sources":["../../src/test/print.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe.test.d.ts","sourceRoot":"","sources":["../../src/test/safe.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.test.d.ts","sourceRoot":"","sources":["../../src/test/set.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenizer.test.d.ts","sourceRoot":"","sources":["../../src/test/tokenizer.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unescape.test.d.ts","sourceRoot":"","sources":["../../src/test/unescape.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/test/utils.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,QAE9C;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,iBAkB9C;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,QAiB5C;AAED,qBAAa,UAAW,YAAW,MAAM;IACvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;gBAEvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIzC,IAAI,CAAC,IAAI,EAAE,MAAM;;;;;;;IAcjB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;CAO5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ventojs",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"description": "🌬 A minimal but powerful template engine",
|
|
5
5
|
"homepage": "https://vento.js.org/",
|
|
6
6
|
"repository": "github:oscarotero/vento",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"picocolors": "^1.0.0",
|
|
38
38
|
"@types/estree": "1.0.5"
|
|
39
39
|
},
|
|
40
|
-
"_generatedBy": "dnt@
|
|
40
|
+
"_generatedBy": "dnt@dev"
|
|
41
41
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return the last portion of a `path`.
|
|
3
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
4
|
-
*
|
|
5
|
-
* @param path - path to extract the name from.
|
|
6
|
-
* @param [suffix] - suffix to remove from extracted name.
|
|
7
|
-
*/
|
|
8
|
-
export declare function basename(path: string, suffix?: string): string;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
import { isWindows } from "./_os.js";
|
|
4
|
-
import { parse as posixParse } from "./posix/parse.js";
|
|
5
|
-
import { parse as windowsParse } from "./windows/parse.js";
|
|
6
|
-
/**
|
|
7
|
-
* Return a `ParsedPath` object of the `path`.
|
|
8
|
-
* @param path to process
|
|
9
|
-
*/
|
|
10
|
-
export function parse(path) {
|
|
11
|
-
return isWindows ? windowsParse(path) : posixParse(path);
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return the last portion of a `path`.
|
|
3
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
4
|
-
*
|
|
5
|
-
* @param path - path to extract the name from.
|
|
6
|
-
* @param [suffix] - suffix to remove from extracted name.
|
|
7
|
-
*/
|
|
8
|
-
export declare function basename(path: string, suffix?: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return the last portion of a `path`.
|
|
3
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
|
4
|
-
*
|
|
5
|
-
* @param path - path to extract the name from.
|
|
6
|
-
* @param [suffix] - suffix to remove from extracted name.
|
|
7
|
-
*/
|
|
8
|
-
export declare function basename(path: string, suffix?: string): string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/esm/deps/deno.land/{std@0.219.1 → std@0.221.0}/path/_common/strip_trailing_separators.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|