ventojs 1.14.0 → 2.0.0-canary.0
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/CHANGELOG.md +24 -0
- package/README.md +2 -0
- package/browser.js +19 -0
- package/{esm/src → core}/environment.js +30 -32
- package/{esm/src → core}/errors.js +0 -7
- package/core/js.js +191 -0
- package/core/reserved.js +63 -0
- package/core/tokenizer.js +86 -0
- package/highlightjs-vento.js +24 -0
- package/{esm/src/loader.node.js → loaders/file.js} +5 -2
- package/loaders/memory.js +24 -0
- package/loaders/url.js +28 -0
- package/{esm/bare.js → mod.js} +7 -2
- package/package.json +167 -29
- package/{esm/plugins → plugins}/auto_trim.js +0 -1
- package/plugins/echo.js +31 -0
- package/plugins/escape.js +17 -0
- package/plugins/export.js +68 -0
- package/{esm/plugins → plugins}/for.js +6 -10
- package/plugins/import.js +58 -0
- package/plugins/include.js +35 -0
- package/plugins/mod.js +30 -0
- package/{esm/plugins → plugins}/set.js +4 -3
- package/plugins/unescape.js +25 -0
- package/prism-vento.js +26 -0
- package/types/browser.d.ts +8 -0
- package/{esm/src → types/core}/environment.d.ts +4 -6
- package/{esm/src → types/core}/errors.d.ts +0 -5
- package/types/core/js.d.ts +11 -0
- package/types/core/reserved.d.ts +2 -0
- package/{esm/src → types/core}/tokenizer.d.ts +1 -8
- package/{esm/src/loader.node.d.ts → types/loaders/file.d.ts} +5 -4
- package/types/loaders/memory.d.ts +11 -0
- package/types/loaders/url.d.ts +11 -0
- package/{esm/bare.d.ts → types/mod.d.ts} +1 -3
- package/{esm → types}/plugins/auto_trim.d.ts +2 -4
- package/types/plugins/echo.d.ts +2 -0
- package/types/plugins/escape.d.ts +2 -0
- package/types/plugins/export.d.ts +2 -0
- package/types/plugins/for.d.ts +2 -0
- package/types/plugins/function.d.ts +2 -0
- package/types/plugins/if.d.ts +2 -0
- package/types/plugins/import.d.ts +2 -0
- package/types/plugins/include.d.ts +2 -0
- package/types/plugins/js.d.ts +2 -0
- package/types/plugins/layout.d.ts +2 -0
- package/types/plugins/mod.d.ts +2 -0
- package/types/plugins/set.d.ts +2 -0
- package/types/plugins/trim.d.ts +4 -0
- package/types/plugins/unescape.d.ts +2 -0
- package/esm/_dnt.polyfills.d.ts +0 -12
- package/esm/_dnt.polyfills.d.ts.map +0 -1
- package/esm/_dnt.polyfills.js +0 -15
- package/esm/_dnt.shims.d.ts +0 -2
- package/esm/_dnt.shims.d.ts.map +0 -1
- package/esm/_dnt.shims.js +0 -57
- package/esm/_dnt.test_polyfills.d.ts.map +0 -1
- package/esm/_dnt.test_shims.d.ts.map +0 -1
- package/esm/bare.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/assert/_constants.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/assert/assert_equals.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/assert/assert_is_error.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/assert/assert_throws.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/assert/assertion_error.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/assert/equal.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/collections/_utils.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/collections/deep_merge.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/fmt/colors.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/_formats.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/create_extractor.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/json.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/mod.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/test.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/toml.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/front_matter/yaml.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/internal/diff.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/internal/format.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/internal/mod.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/toml/_parser.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/toml/parse.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_error.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_loader/loader.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_loader/loader_state.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_mark.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_state.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/binary.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/bool.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/float.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/function.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/int.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/map.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/merge.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/mod.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/nil.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/omap.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/pairs.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/regexp.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/seq.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/set.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/str.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/timestamp.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_type/undefined.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/_utils.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/parse.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema/core.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema/default.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema/extended.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema/failsafe.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema/json.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema/mod.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/schema.d.ts.map +0 -1
- package/esm/deps/deno.land/std@0.224.0/yaml/type.d.ts.map +0 -1
- package/esm/deps/jsr.io/@davidbonnet/astring/1.8.6/src/astring.d.ts +0 -110
- package/esm/deps/jsr.io/@davidbonnet/astring/1.8.6/src/astring.d.ts.map +0 -1
- package/esm/deps/jsr.io/@davidbonnet/astring/1.8.6/src/astring.js +0 -1159
- package/esm/deps/jsr.io/@std/html/1.0.3/entities.d.ts +0 -57
- package/esm/deps/jsr.io/@std/html/1.0.3/entities.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/html/1.0.3/entities.js +0 -92
- package/esm/deps/jsr.io/@std/html/1.0.3/mod.d.ts +0 -15
- package/esm/deps/jsr.io/@std/html/1.0.3/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/html/1.0.3/mod.js +0 -16
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +0 -7
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts +0 -4
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/common.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/common.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/common.js +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js +0 -46
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/dirname.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/dirname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/dirname.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/format.d.ts +0 -4
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/format.js +0 -19
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.d.ts +0 -3
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.d.ts +0 -35
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.js +0 -234
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +0 -77
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/relative.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/relative.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/relative.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +0 -19
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +0 -9
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.js +0 -36
- package/esm/deps/jsr.io/@std/path/1.0.8/common.d.ts +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/common.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/common.js +0 -33
- package/esm/deps/jsr.io/@std/path/1.0.8/constants.d.ts +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/constants.js +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/dirname.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/dirname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/dirname.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/format.d.ts +0 -22
- package/esm/deps/jsr.io/@std/path/1.0.8/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/format.js +0 -27
- package/esm/deps/jsr.io/@std/path/1.0.8/from_file_url.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/from_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.d.ts +0 -77
- package/esm/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.js +0 -83
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts +0 -22
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/is_glob.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/is_glob.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/is_glob.js +0 -42
- package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/join.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/join_globs.d.ts +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/join_globs.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/join_globs.js +0 -34
- package/esm/deps/jsr.io/@std/path/1.0.8/mod.d.ts +0 -54
- package/esm/deps/jsr.io/@std/path/1.0.8/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/mod.js +0 -57
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize.d.ts +0 -27
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize.js +0 -33
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize_glob.d.ts +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize_glob.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize_glob.js +0 -35
- package/esm/deps/jsr.io/@std/path/1.0.8/parse.d.ts +0 -35
- package/esm/deps/jsr.io/@std/path/1.0.8/parse.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/parse.js +0 -39
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js +0 -8
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js +0 -49
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/common.d.ts +0 -19
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/common.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/common.js +0 -24
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/constants.d.ts +0 -13
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/constants.js +0 -14
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts +0 -32
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/dirname.js +0 -62
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +0 -37
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js +0 -89
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/format.d.ts +0 -24
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/format.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.js +0 -21
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.d.ts +0 -72
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.js +0 -82
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_glob.d.ts +0 -2
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_glob.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_glob.js +0 -3
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +0 -33
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js +0 -42
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join_globs.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join_globs.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join_globs.js +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/mod.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/mod.js +0 -43
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +0 -40
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +0 -57
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.js +0 -32
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/parse.d.ts +0 -25
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/parse.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/parse.js +0 -115
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/relative.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/relative.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/relative.js +0 -106
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/resolve.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/resolve.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/resolve.js +0 -59
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts +0 -18
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +0 -27
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.d.ts +0 -16
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.js +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/relative.d.ts +0 -24
- package/esm/deps/jsr.io/@std/path/1.0.8/relative.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/relative.js +0 -30
- package/esm/deps/jsr.io/@std/path/1.0.8/resolve.d.ts +0 -22
- package/esm/deps/jsr.io/@std/path/1.0.8/resolve.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/resolve.js +0 -30
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.d.ts +0 -21
- package/esm/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.js +0 -29
- package/esm/deps/jsr.io/@std/path/1.0.8/types.d.ts +0 -38
- package/esm/deps/jsr.io/@std/path/1.0.8/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/types.js +0 -3
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts +0 -4
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js +0 -15
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js +0 -44
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/constants.d.ts +0 -13
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/constants.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/constants.js +0 -14
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/dirname.js +0 -112
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js +0 -81
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/format.d.ts +0 -24
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/format.js +0 -28
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.d.ts +0 -19
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.js +0 -30
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.d.ts +0 -71
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.js +0 -82
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +0 -38
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js +0 -74
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join_globs.d.ts +0 -21
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join_globs.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join_globs.js +0 -41
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +0 -22
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +0 -134
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.d.ts +0 -20
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.js +0 -32
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/parse.d.ts +0 -25
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/parse.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/parse.js +0 -176
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/relative.d.ts +0 -23
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/relative.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/relative.js +0 -131
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/resolve.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/resolve.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/resolve.js +0 -154
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts +0 -18
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +0 -34
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.d.ts +0 -17
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.js +0 -49
- package/esm/deps.d.ts +0 -8
- package/esm/deps.d.ts.map +0 -1
- package/esm/deps.js +0 -6
- package/esm/mod.d.ts +0 -9
- package/esm/mod.d.ts.map +0 -1
- package/esm/mod.js +0 -36
- package/esm/package.json +0 -3
- package/esm/plugins/auto_trim.d.ts.map +0 -1
- package/esm/plugins/echo.d.ts +0 -3
- package/esm/plugins/echo.d.ts.map +0 -1
- package/esm/plugins/echo.js +0 -13
- package/esm/plugins/escape.d.ts +0 -3
- package/esm/plugins/escape.d.ts.map +0 -1
- package/esm/plugins/escape.js +0 -7
- package/esm/plugins/export.d.ts +0 -3
- package/esm/plugins/export.d.ts.map +0 -1
- package/esm/plugins/export.js +0 -47
- package/esm/plugins/for.d.ts +0 -3
- package/esm/plugins/for.d.ts.map +0 -1
- package/esm/plugins/function.d.ts +0 -3
- package/esm/plugins/function.d.ts.map +0 -1
- package/esm/plugins/if.d.ts +0 -3
- package/esm/plugins/if.d.ts.map +0 -1
- package/esm/plugins/import.d.ts +0 -3
- package/esm/plugins/import.d.ts.map +0 -1
- package/esm/plugins/import.js +0 -17
- package/esm/plugins/include.d.ts +0 -3
- package/esm/plugins/include.d.ts.map +0 -1
- package/esm/plugins/include.js +0 -31
- package/esm/plugins/js.d.ts +0 -3
- package/esm/plugins/js.d.ts.map +0 -1
- package/esm/plugins/layout.d.ts +0 -3
- package/esm/plugins/layout.d.ts.map +0 -1
- package/esm/plugins/set.d.ts +0 -3
- package/esm/plugins/set.d.ts.map +0 -1
- package/esm/plugins/trim.d.ts +0 -5
- package/esm/plugins/trim.d.ts.map +0 -1
- package/esm/plugins/unescape.d.ts +0 -3
- package/esm/plugins/unescape.d.ts.map +0 -1
- package/esm/plugins/unescape.js +0 -7
- package/esm/src/environment.d.ts.map +0 -1
- package/esm/src/errors.d.ts.map +0 -1
- package/esm/src/js.d.ts +0 -5
- package/esm/src/js.d.ts.map +0 -1
- package/esm/src/js.js +0 -197
- package/esm/src/loader.node.d.ts.map +0 -1
- package/esm/src/tokenizer.d.ts.map +0 -1
- package/esm/src/tokenizer.js +0 -93
- package/esm/src/transformer.d.ts +0 -2
- package/esm/src/transformer.d.ts.map +0 -1
- package/esm/src/transformer.js +0 -218
- package/esm/test/auto_trim.test.d.ts.map +0 -1
- package/esm/test/comment.test.d.ts.map +0 -1
- package/esm/test/compile.test.d.ts.map +0 -1
- package/esm/test/echo.test.d.ts.map +0 -1
- package/esm/test/escape.test.d.ts.map +0 -1
- package/esm/test/for.test.d.ts.map +0 -1
- package/esm/test/function.test.d.ts.map +0 -1
- package/esm/test/if.test.d.ts.map +0 -1
- package/esm/test/import.test.d.ts.map +0 -1
- package/esm/test/include.test.d.ts.map +0 -1
- package/esm/test/js.test.d.ts.map +0 -1
- package/esm/test/layout.test.d.ts.map +0 -1
- package/esm/test/print.test.d.ts.map +0 -1
- package/esm/test/safe.test.d.ts.map +0 -1
- package/esm/test/set.test.d.ts.map +0 -1
- package/esm/test/tokenizer.test.d.ts.map +0 -1
- package/esm/test/unescape.test.d.ts.map +0 -1
- package/esm/test/utils.d.ts.map +0 -1
- package/esm/test/with.test.d.ts.map +0 -1
- /package/{esm/plugins → plugins}/function.js +0 -0
- /package/{esm/plugins → plugins}/if.js +0 -0
- /package/{esm/plugins → plugins}/js.js +0 -0
- /package/{esm/plugins → plugins}/layout.js +0 -0
- /package/{esm/plugins → plugins}/trim.js +0 -0
@@ -1,30 +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 { relative as posixRelative } from "./posix/relative.js";
|
5
|
-
import { relative as windowsRelative } from "./windows/relative.js";
|
6
|
-
/**
|
7
|
-
* Return the relative path from `from` to `to` based on current working
|
8
|
-
* directory.
|
9
|
-
*
|
10
|
-
* @example Usage
|
11
|
-
* ```ts
|
12
|
-
* import { relative } from "@std/path/relative";
|
13
|
-
* import { assertEquals } from "@std/assert";
|
14
|
-
*
|
15
|
-
* if (Deno.build.os === "windows") {
|
16
|
-
* const path = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb");
|
17
|
-
* assertEquals(path, "..\\..\\impl\\bbb");
|
18
|
-
* } else {
|
19
|
-
* const path = relative("/data/foobar/test/aaa", "/data/foobar/impl/bbb");
|
20
|
-
* assertEquals(path, "../../impl/bbb");
|
21
|
-
* }
|
22
|
-
* ```
|
23
|
-
*
|
24
|
-
* @param from Path in current working directory.
|
25
|
-
* @param to Path in current working directory.
|
26
|
-
* @returns The relative path from `from` to `to`.
|
27
|
-
*/
|
28
|
-
export function relative(from, to) {
|
29
|
-
return isWindows ? windowsRelative(from, to) : posixRelative(from, to);
|
30
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Resolves path segments into a path.
|
3
|
-
*
|
4
|
-
* @example Usage
|
5
|
-
* ```ts
|
6
|
-
* import { resolve } from "@std/path/resolve";
|
7
|
-
* import { assertEquals } from "@std/assert";
|
8
|
-
*
|
9
|
-
* if (Deno.build.os === "windows") {
|
10
|
-
* assertEquals(resolve("C:\\foo", "bar", "baz"), "C:\\foo\\bar\\baz");
|
11
|
-
* assertEquals(resolve("C:\\foo", "C:\\bar", "baz"), "C:\\bar\\baz");
|
12
|
-
* } else {
|
13
|
-
* assertEquals(resolve("/foo", "bar", "baz"), "/foo/bar/baz");
|
14
|
-
* assertEquals(resolve("/foo", "/bar", "baz"), "/bar/baz");
|
15
|
-
* }
|
16
|
-
* ```
|
17
|
-
*
|
18
|
-
* @param pathSegments Path segments to process to path.
|
19
|
-
* @returns The resolved path.
|
20
|
-
*/
|
21
|
-
export declare function resolve(...pathSegments: string[]): string;
|
22
|
-
//# sourceMappingURL=resolve.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/path/1.0.8/resolve.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CAAC,GAAG,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAIzD"}
|
@@ -1,30 +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 { resolve as posixResolve } from "./posix/resolve.js";
|
5
|
-
import { resolve as windowsResolve } from "./windows/resolve.js";
|
6
|
-
/**
|
7
|
-
* Resolves path segments into a path.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts
|
11
|
-
* import { resolve } from "@std/path/resolve";
|
12
|
-
* import { assertEquals } from "@std/assert";
|
13
|
-
*
|
14
|
-
* if (Deno.build.os === "windows") {
|
15
|
-
* assertEquals(resolve("C:\\foo", "bar", "baz"), "C:\\foo\\bar\\baz");
|
16
|
-
* assertEquals(resolve("C:\\foo", "C:\\bar", "baz"), "C:\\bar\\baz");
|
17
|
-
* } else {
|
18
|
-
* assertEquals(resolve("/foo", "bar", "baz"), "/foo/bar/baz");
|
19
|
-
* assertEquals(resolve("/foo", "/bar", "baz"), "/bar/baz");
|
20
|
-
* }
|
21
|
-
* ```
|
22
|
-
*
|
23
|
-
* @param pathSegments Path segments to process to path.
|
24
|
-
* @returns The resolved path.
|
25
|
-
*/
|
26
|
-
export function resolve(...pathSegments) {
|
27
|
-
return isWindows
|
28
|
-
? windowsResolve(...pathSegments)
|
29
|
-
: posixResolve(...pathSegments);
|
30
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
/**
|
3
|
-
* Converts a path string to a file URL.
|
4
|
-
*
|
5
|
-
* @example Usage
|
6
|
-
* ```ts
|
7
|
-
* import { toFileUrl } from "@std/path/to-file-url";
|
8
|
-
* import { assertEquals } from "@std/assert";
|
9
|
-
*
|
10
|
-
* if (Deno.build.os === "windows") {
|
11
|
-
* assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo"));
|
12
|
-
* assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo"));
|
13
|
-
* assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo"));
|
14
|
-
* } else {
|
15
|
-
* assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo"));
|
16
|
-
* }
|
17
|
-
* ```
|
18
|
-
*
|
19
|
-
* @param path Path to convert to file URL.
|
20
|
-
* @returns The file URL equivalent to the path.
|
21
|
-
*/
|
22
|
-
export declare function toFileUrl(path: string): URL;
|
23
|
-
//# sourceMappingURL=to_file_url.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"to_file_url.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/path/1.0.8/to_file_url.ts"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAE3C"}
|
@@ -1,28 +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 { toFileUrl as posixToFileUrl } from "./posix/to_file_url.js";
|
5
|
-
import { toFileUrl as windowsToFileUrl } from "./windows/to_file_url.js";
|
6
|
-
/**
|
7
|
-
* Converts a path string to a file URL.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts
|
11
|
-
* import { toFileUrl } from "@std/path/to-file-url";
|
12
|
-
* import { assertEquals } from "@std/assert";
|
13
|
-
*
|
14
|
-
* if (Deno.build.os === "windows") {
|
15
|
-
* assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo"));
|
16
|
-
* assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo"));
|
17
|
-
* assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo"));
|
18
|
-
* } else {
|
19
|
-
* assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo"));
|
20
|
-
* }
|
21
|
-
* ```
|
22
|
-
*
|
23
|
-
* @param path Path to convert to file URL.
|
24
|
-
* @returns The file URL equivalent to the path.
|
25
|
-
*/
|
26
|
-
export function toFileUrl(path) {
|
27
|
-
return isWindows ? windowsToFileUrl(path) : posixToFileUrl(path);
|
28
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Resolves path to a namespace path. This is a no-op on
|
3
|
-
* non-windows systems.
|
4
|
-
*
|
5
|
-
* @example Usage
|
6
|
-
* ```ts
|
7
|
-
* import { toNamespacedPath } from "@std/path/to-namespaced-path";
|
8
|
-
* import { assertEquals } from "@std/assert";
|
9
|
-
*
|
10
|
-
* if (Deno.build.os === "windows") {
|
11
|
-
* assertEquals(toNamespacedPath("C:\\foo\\bar"), "\\\\?\\C:\\foo\\bar");
|
12
|
-
* } else {
|
13
|
-
* assertEquals(toNamespacedPath("/foo/bar"), "/foo/bar");
|
14
|
-
* }
|
15
|
-
* ```
|
16
|
-
*
|
17
|
-
* @param path Path to resolve to namespace.
|
18
|
-
* @returns The resolved namespace path.
|
19
|
-
*/
|
20
|
-
export declare function toNamespacedPath(path: string): string;
|
21
|
-
//# sourceMappingURL=to_namespaced_path.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"to_namespaced_path.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD"}
|
@@ -1,29 +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 { toNamespacedPath as posixToNamespacedPath } from "./posix/to_namespaced_path.js";
|
5
|
-
import { toNamespacedPath as windowsToNamespacedPath } from "./windows/to_namespaced_path.js";
|
6
|
-
/**
|
7
|
-
* Resolves path to a namespace path. This is a no-op on
|
8
|
-
* non-windows systems.
|
9
|
-
*
|
10
|
-
* @example Usage
|
11
|
-
* ```ts
|
12
|
-
* import { toNamespacedPath } from "@std/path/to-namespaced-path";
|
13
|
-
* import { assertEquals } from "@std/assert";
|
14
|
-
*
|
15
|
-
* if (Deno.build.os === "windows") {
|
16
|
-
* assertEquals(toNamespacedPath("C:\\foo\\bar"), "\\\\?\\C:\\foo\\bar");
|
17
|
-
* } else {
|
18
|
-
* assertEquals(toNamespacedPath("/foo/bar"), "/foo/bar");
|
19
|
-
* }
|
20
|
-
* ```
|
21
|
-
*
|
22
|
-
* @param path Path to resolve to namespace.
|
23
|
-
* @returns The resolved namespace path.
|
24
|
-
*/
|
25
|
-
export function toNamespacedPath(path) {
|
26
|
-
return isWindows
|
27
|
-
? windowsToNamespacedPath(path)
|
28
|
-
: posixToNamespacedPath(path);
|
29
|
-
}
|
@@ -1,38 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* A parsed path object generated by path.parse() or consumed by path.format().
|
3
|
-
*
|
4
|
-
* @example
|
5
|
-
* ```ts
|
6
|
-
* import { parse } from "@std/path";
|
7
|
-
*
|
8
|
-
* const parsedPathObj = parse("c:\\path\\dir\\index.html");
|
9
|
-
* parsedPathObj.root; // "c:\\"
|
10
|
-
* parsedPathObj.dir; // "c:\\path\\dir"
|
11
|
-
* parsedPathObj.base; // "index.html"
|
12
|
-
* parsedPathObj.ext; // ".html"
|
13
|
-
* parsedPathObj.name; // "index"
|
14
|
-
* ```
|
15
|
-
*/
|
16
|
-
export interface ParsedPath {
|
17
|
-
/**
|
18
|
-
* The root of the path such as '/' or 'c:\'
|
19
|
-
*/
|
20
|
-
root: string;
|
21
|
-
/**
|
22
|
-
* The full directory path of the parent such as '/home/user/dir' or 'c:\path\dir'
|
23
|
-
*/
|
24
|
-
dir: string;
|
25
|
-
/**
|
26
|
-
* The file name including extension (if any) such as 'index.html'
|
27
|
-
*/
|
28
|
-
base: string;
|
29
|
-
/**
|
30
|
-
* The file extension (if any) such as '.html'
|
31
|
-
*/
|
32
|
-
ext: string;
|
33
|
-
/**
|
34
|
-
* The file name without extension (if any) such as 'index'
|
35
|
-
*/
|
36
|
-
name: string;
|
37
|
-
}
|
38
|
-
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/path/1.0.8/types.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_util.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.0.8/windows/_util.ts"],"names":[],"mappings":"AAcA,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKzD"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// Copyright the Browserify authors. MIT License.
|
3
|
-
// Ported from https://github.com/browserify/path-browserify/
|
4
|
-
// This module is browser compatible.
|
5
|
-
import { CHAR_BACKWARD_SLASH, CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, CHAR_UPPERCASE_A, CHAR_UPPERCASE_Z, } from "../_common/constants.js";
|
6
|
-
export function isPosixPathSeparator(code) {
|
7
|
-
return code === CHAR_FORWARD_SLASH;
|
8
|
-
}
|
9
|
-
export function isPathSeparator(code) {
|
10
|
-
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
11
|
-
}
|
12
|
-
export function isWindowsDeviceRoot(code) {
|
13
|
-
return ((code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z) ||
|
14
|
-
(code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z));
|
15
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Return the last portion of a `path`.
|
3
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
4
|
-
*
|
5
|
-
* @example Usage
|
6
|
-
* ```ts
|
7
|
-
* import { basename } from "@std/path/windows/basename";
|
8
|
-
* import { assertEquals } from "@std/assert";
|
9
|
-
*
|
10
|
-
* assertEquals(basename("C:\\user\\Documents\\"), "Documents");
|
11
|
-
* assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png");
|
12
|
-
* assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image");
|
13
|
-
* ```
|
14
|
-
*
|
15
|
-
* Note: If you are working with file URLs,
|
16
|
-
* use the new version of `basename` from `@std/path/windows/unstable-basename`.
|
17
|
-
*
|
18
|
-
* @param path The path to extract the name from.
|
19
|
-
* @param suffix The suffix to remove from extracted name.
|
20
|
-
* @returns The extracted name.
|
21
|
-
*/
|
22
|
-
export declare function basename(path: string, suffix?: string): string;
|
23
|
-
//# sourceMappingURL=basename.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"basename.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.0.8/windows/basename.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM,CAiB1D"}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { assertArgs, lastPathSegment, stripSuffix, } from "../_common/basename.js";
|
4
|
-
import { CHAR_COLON } from "../_common/constants.js";
|
5
|
-
import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
|
6
|
-
import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
|
7
|
-
/**
|
8
|
-
* Return the last portion of a `path`.
|
9
|
-
* Trailing directory separators are ignored, and optional suffix is removed.
|
10
|
-
*
|
11
|
-
* @example Usage
|
12
|
-
* ```ts
|
13
|
-
* import { basename } from "@std/path/windows/basename";
|
14
|
-
* import { assertEquals } from "@std/assert";
|
15
|
-
*
|
16
|
-
* assertEquals(basename("C:\\user\\Documents\\"), "Documents");
|
17
|
-
* assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png");
|
18
|
-
* assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image");
|
19
|
-
* ```
|
20
|
-
*
|
21
|
-
* Note: If you are working with file URLs,
|
22
|
-
* use the new version of `basename` from `@std/path/windows/unstable-basename`.
|
23
|
-
*
|
24
|
-
* @param path The path to extract the name from.
|
25
|
-
* @param suffix The suffix to remove from extracted name.
|
26
|
-
* @returns The extracted name.
|
27
|
-
*/
|
28
|
-
export function basename(path, suffix = "") {
|
29
|
-
assertArgs(path, suffix);
|
30
|
-
// Check for a drive letter prefix so as not to mistake the following
|
31
|
-
// path separator as an extra separator at the end of the path that can be
|
32
|
-
// disregarded
|
33
|
-
let start = 0;
|
34
|
-
if (path.length >= 2) {
|
35
|
-
const drive = path.charCodeAt(0);
|
36
|
-
if (isWindowsDeviceRoot(drive)) {
|
37
|
-
if (path.charCodeAt(1) === CHAR_COLON)
|
38
|
-
start = 2;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
const lastSegment = lastPathSegment(path, isPathSeparator, start);
|
42
|
-
const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator);
|
43
|
-
return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;
|
44
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* The character used to separate entries in the PATH environment variable.
|
3
|
-
*/
|
4
|
-
export declare const DELIMITER: ";";
|
5
|
-
/**
|
6
|
-
* The character used to separate components of a file path.
|
7
|
-
*/
|
8
|
-
export declare const SEPARATOR: "\\";
|
9
|
-
/**
|
10
|
-
* A regular expression that matches one or more path separators.
|
11
|
-
*/
|
12
|
-
export declare const SEPARATOR_PATTERN: RegExp;
|
13
|
-
//# sourceMappingURL=constants.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.0.8/windows/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,SAAS,KAAe,CAAC;AACtC;;GAEG;AACH,eAAO,MAAM,SAAS,MAAgB,CAAC;AACvC;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAW,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
/**
|
4
|
-
* The character used to separate entries in the PATH environment variable.
|
5
|
-
*/
|
6
|
-
export const DELIMITER = ";";
|
7
|
-
/**
|
8
|
-
* The character used to separate components of a file path.
|
9
|
-
*/
|
10
|
-
export const SEPARATOR = "\\";
|
11
|
-
/**
|
12
|
-
* A regular expression that matches one or more path separators.
|
13
|
-
*/
|
14
|
-
export const SEPARATOR_PATTERN = /[\\/]+/;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Return the directory path of a `path`.
|
3
|
-
*
|
4
|
-
* @example Usage
|
5
|
-
* ```ts
|
6
|
-
* import { dirname } from "@std/path/windows/dirname";
|
7
|
-
* import { assertEquals } from "@std/assert";
|
8
|
-
*
|
9
|
-
* const dir = dirname("C:\\foo\\bar\\baz.ext");
|
10
|
-
* assertEquals(dir, "C:\\foo\\bar");
|
11
|
-
* ```
|
12
|
-
*
|
13
|
-
* Note: If you are working with file URLs,
|
14
|
-
* use the new version of `dirname` from `@std/path/windows/unstable-dirname`.
|
15
|
-
*
|
16
|
-
* @param path The path to get the directory from.
|
17
|
-
* @returns The directory path.
|
18
|
-
*/
|
19
|
-
export declare function dirname(path: string): string;
|
20
|
-
//# sourceMappingURL=dirname.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"dirname.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.0.8/windows/dirname.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsF5C"}
|
@@ -1,112 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { assertArg } from "../_common/dirname.js";
|
4
|
-
import { CHAR_COLON } from "../_common/constants.js";
|
5
|
-
import { stripTrailingSeparators } from "../_common/strip_trailing_separators.js";
|
6
|
-
import { isPathSeparator, isPosixPathSeparator, isWindowsDeviceRoot, } from "./_util.js";
|
7
|
-
/**
|
8
|
-
* Return the directory path of a `path`.
|
9
|
-
*
|
10
|
-
* @example Usage
|
11
|
-
* ```ts
|
12
|
-
* import { dirname } from "@std/path/windows/dirname";
|
13
|
-
* import { assertEquals } from "@std/assert";
|
14
|
-
*
|
15
|
-
* const dir = dirname("C:\\foo\\bar\\baz.ext");
|
16
|
-
* assertEquals(dir, "C:\\foo\\bar");
|
17
|
-
* ```
|
18
|
-
*
|
19
|
-
* Note: If you are working with file URLs,
|
20
|
-
* use the new version of `dirname` from `@std/path/windows/unstable-dirname`.
|
21
|
-
*
|
22
|
-
* @param path The path to get the directory from.
|
23
|
-
* @returns The directory path.
|
24
|
-
*/
|
25
|
-
export function dirname(path) {
|
26
|
-
assertArg(path);
|
27
|
-
const len = path.length;
|
28
|
-
let rootEnd = -1;
|
29
|
-
let end = -1;
|
30
|
-
let matchedSlash = true;
|
31
|
-
let offset = 0;
|
32
|
-
const code = path.charCodeAt(0);
|
33
|
-
// Try to match a root
|
34
|
-
if (len > 1) {
|
35
|
-
if (isPathSeparator(code)) {
|
36
|
-
// Possible UNC root
|
37
|
-
rootEnd = offset = 1;
|
38
|
-
if (isPathSeparator(path.charCodeAt(1))) {
|
39
|
-
// Matched double path separator at beginning
|
40
|
-
let j = 2;
|
41
|
-
let last = j;
|
42
|
-
// Match 1 or more non-path separators
|
43
|
-
for (; j < len; ++j) {
|
44
|
-
if (isPathSeparator(path.charCodeAt(j)))
|
45
|
-
break;
|
46
|
-
}
|
47
|
-
if (j < len && j !== last) {
|
48
|
-
// Matched!
|
49
|
-
last = j;
|
50
|
-
// Match 1 or more path separators
|
51
|
-
for (; j < len; ++j) {
|
52
|
-
if (!isPathSeparator(path.charCodeAt(j)))
|
53
|
-
break;
|
54
|
-
}
|
55
|
-
if (j < len && j !== last) {
|
56
|
-
// Matched!
|
57
|
-
last = j;
|
58
|
-
// Match 1 or more non-path separators
|
59
|
-
for (; j < len; ++j) {
|
60
|
-
if (isPathSeparator(path.charCodeAt(j)))
|
61
|
-
break;
|
62
|
-
}
|
63
|
-
if (j === len) {
|
64
|
-
// We matched a UNC root only
|
65
|
-
return path;
|
66
|
-
}
|
67
|
-
if (j !== last) {
|
68
|
-
// We matched a UNC root with leftovers
|
69
|
-
// Offset by 1 to include the separator after the UNC root to
|
70
|
-
// treat it as a "normal root" on top of a (UNC) root
|
71
|
-
rootEnd = offset = j + 1;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
else if (isWindowsDeviceRoot(code)) {
|
78
|
-
// Possible device root
|
79
|
-
if (path.charCodeAt(1) === CHAR_COLON) {
|
80
|
-
rootEnd = offset = 2;
|
81
|
-
if (len > 2) {
|
82
|
-
if (isPathSeparator(path.charCodeAt(2)))
|
83
|
-
rootEnd = offset = 3;
|
84
|
-
}
|
85
|
-
}
|
86
|
-
}
|
87
|
-
}
|
88
|
-
else if (isPathSeparator(code)) {
|
89
|
-
// `path` contains just a path separator, exit early to avoid
|
90
|
-
// unnecessary work
|
91
|
-
return path;
|
92
|
-
}
|
93
|
-
for (let i = len - 1; i >= offset; --i) {
|
94
|
-
if (isPathSeparator(path.charCodeAt(i))) {
|
95
|
-
if (!matchedSlash) {
|
96
|
-
end = i;
|
97
|
-
break;
|
98
|
-
}
|
99
|
-
}
|
100
|
-
else {
|
101
|
-
// We saw the first non-path separator
|
102
|
-
matchedSlash = false;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
if (end === -1) {
|
106
|
-
if (rootEnd === -1)
|
107
|
-
return ".";
|
108
|
-
else
|
109
|
-
end = rootEnd;
|
110
|
-
}
|
111
|
-
return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
|
112
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Return the extension of the `path` with leading period.
|
3
|
-
*
|
4
|
-
* @example Usage
|
5
|
-
* ```ts
|
6
|
-
* import { extname } from "@std/path/windows/extname";
|
7
|
-
* import { assertEquals } from "@std/assert";
|
8
|
-
*
|
9
|
-
* const ext = extname("file.ts");
|
10
|
-
* assertEquals(ext, ".ts");
|
11
|
-
* ```
|
12
|
-
*
|
13
|
-
* Note: If you are working with file URLs,
|
14
|
-
* use the new version of `extname` from `@std/path/windows/unstable-extname`.
|
15
|
-
*
|
16
|
-
* @param path The path to get the extension from.
|
17
|
-
* @returns The extension of the `path`.
|
18
|
-
*/
|
19
|
-
export declare function extname(path: string): string;
|
20
|
-
//# sourceMappingURL=extname.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"extname.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.0.8/windows/extname.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA+D5C"}
|
@@ -1,81 +0,0 @@
|
|
1
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
-
// This module is browser compatible.
|
3
|
-
import { CHAR_COLON, CHAR_DOT } from "../_common/constants.js";
|
4
|
-
import { assertPath } from "../_common/assert_path.js";
|
5
|
-
import { isPathSeparator, isWindowsDeviceRoot } from "./_util.js";
|
6
|
-
/**
|
7
|
-
* Return the extension of the `path` with leading period.
|
8
|
-
*
|
9
|
-
* @example Usage
|
10
|
-
* ```ts
|
11
|
-
* import { extname } from "@std/path/windows/extname";
|
12
|
-
* import { assertEquals } from "@std/assert";
|
13
|
-
*
|
14
|
-
* const ext = extname("file.ts");
|
15
|
-
* assertEquals(ext, ".ts");
|
16
|
-
* ```
|
17
|
-
*
|
18
|
-
* Note: If you are working with file URLs,
|
19
|
-
* use the new version of `extname` from `@std/path/windows/unstable-extname`.
|
20
|
-
*
|
21
|
-
* @param path The path to get the extension from.
|
22
|
-
* @returns The extension of the `path`.
|
23
|
-
*/
|
24
|
-
export function extname(path) {
|
25
|
-
assertPath(path);
|
26
|
-
let start = 0;
|
27
|
-
let startDot = -1;
|
28
|
-
let startPart = 0;
|
29
|
-
let end = -1;
|
30
|
-
let matchedSlash = true;
|
31
|
-
// Track the state of characters (if any) we see before our first dot and
|
32
|
-
// after any path separator we find
|
33
|
-
let preDotState = 0;
|
34
|
-
// Check for a drive letter prefix so as not to mistake the following
|
35
|
-
// path separator as an extra separator at the end of the path that can be
|
36
|
-
// disregarded
|
37
|
-
if (path.length >= 2 &&
|
38
|
-
path.charCodeAt(1) === CHAR_COLON &&
|
39
|
-
isWindowsDeviceRoot(path.charCodeAt(0))) {
|
40
|
-
start = startPart = 2;
|
41
|
-
}
|
42
|
-
for (let i = path.length - 1; i >= start; --i) {
|
43
|
-
const code = path.charCodeAt(i);
|
44
|
-
if (isPathSeparator(code)) {
|
45
|
-
// If we reached a path separator that was not part of a set of path
|
46
|
-
// separators at the end of the string, stop now
|
47
|
-
if (!matchedSlash) {
|
48
|
-
startPart = i + 1;
|
49
|
-
break;
|
50
|
-
}
|
51
|
-
continue;
|
52
|
-
}
|
53
|
-
if (end === -1) {
|
54
|
-
// We saw the first non-path separator, mark this as the end of our
|
55
|
-
// extension
|
56
|
-
matchedSlash = false;
|
57
|
-
end = i + 1;
|
58
|
-
}
|
59
|
-
if (code === CHAR_DOT) {
|
60
|
-
// If this is our first dot, mark it as the start of our extension
|
61
|
-
if (startDot === -1)
|
62
|
-
startDot = i;
|
63
|
-
else if (preDotState !== 1)
|
64
|
-
preDotState = 1;
|
65
|
-
}
|
66
|
-
else if (startDot !== -1) {
|
67
|
-
// We saw a non-dot and non-path separator before our dot, so we should
|
68
|
-
// have a good chance at having a non-empty extension
|
69
|
-
preDotState = -1;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
if (startDot === -1 ||
|
73
|
-
end === -1 ||
|
74
|
-
// We saw a non-dot character immediately before the dot
|
75
|
-
preDotState === 0 ||
|
76
|
-
// The (right-most) trimmed path component is exactly '..'
|
77
|
-
(preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
|
78
|
-
return "";
|
79
|
-
}
|
80
|
-
return path.slice(startDot, end);
|
81
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import type { ParsedPath } from "../types.js";
|
2
|
-
/**
|
3
|
-
* Generate a path from `ParsedPath` object.
|
4
|
-
*
|
5
|
-
* @example Usage
|
6
|
-
* ```ts
|
7
|
-
* import { format } from "@std/path/windows/format";
|
8
|
-
* import { assertEquals } from "@std/assert";
|
9
|
-
*
|
10
|
-
* const path = format({
|
11
|
-
* root: "C:\\",
|
12
|
-
* dir: "C:\\path\\dir",
|
13
|
-
* base: "file.txt",
|
14
|
-
* ext: ".txt",
|
15
|
-
* name: "file"
|
16
|
-
* });
|
17
|
-
* assertEquals(path, "C:\\path\\dir\\file.txt");
|
18
|
-
* ```
|
19
|
-
*
|
20
|
-
* @param pathObject The path object to format.
|
21
|
-
* @returns The formatted path.
|
22
|
-
*/
|
23
|
-
export declare function format(pathObject: Partial<ParsedPath>): string;
|
24
|
-
//# sourceMappingURL=format.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/path/1.0.8/windows/format.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAG9D"}
|