structured-outputs 0.1.0-beta.1 → 0.1.0-beta.11
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/F.js +1 -1
- package/esm/F.js.map +1 -1
- package/esm/_dnt.polyfills.js +124 -0
- package/esm/_dnt.polyfills.js.map +1 -0
- package/esm/_dnt.shims.js +62 -0
- package/esm/_dnt.shims.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/almost_equals.js +47 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/almost_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/array_includes.js +47 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/array_includes.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/assert.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/assert.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/assertion_error.js +31 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/assertion_error.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/equal.js +137 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/equals.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/exists.js +28 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/exists.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/fail.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/fail.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/false.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/false.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/greater.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/greater.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/greater_or_equal.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/greater_or_equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/instance_of.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/instance_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/is_error.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/is_error.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/less.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/less.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/less_or_equal.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/less_or_equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/match.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/mod.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_instance_of.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_instance_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_match.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_strict_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/not_strict_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/object_match.js +160 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/object_match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/rejects.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/rejects.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/strict_equals.js +58 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/strict_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/string_includes.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/string_includes.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/throws.js +45 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/throws.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/unimplemented.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/unimplemented.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/unreachable.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.7/unreachable.js.map +1 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/_data.js +18 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/_data.js.map +1 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/_run_length.js +35 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/_run_length.js.map +1 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/mod.js +19 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/parse_args.js +306 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/parse_args.js.map +1 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/prompt_secret.js +87 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/prompt_secret.js.map +1 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/unicode_width.js +75 -0
- package/esm/deps/jsr.io/@std/cli/1.0.6/unicode_width.js.map +1 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/load.js +11 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/load.js.map +1 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/mod.js +213 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/parse.js +75 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/parse.js.map +1 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/stringify.js +45 -0
- package/esm/deps/jsr.io/@std/dotenv/0.225.2/stringify.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.js +35 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.js +19 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_is_same_path.js +18 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_is_same_path.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_is_subdir.js +26 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_is_subdir.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_to_path_string.js +14 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/_to_path_string.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/copy.js +315 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/copy.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/empty_dir.js +88 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/empty_dir.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_dir.js +103 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_dir.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_file.js +91 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_file.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_link.js +62 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_link.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.js +122 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/eol.js +67 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/eol.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/exists.js +272 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/exists.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/expand_glob.js +417 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/expand_glob.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/mod.js +30 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/move.js +142 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/move.js.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/walk.js +847 -0
- package/esm/deps/jsr.io/@std/fs/1.0.5/walk.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +38 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +208 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js +8 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/assert_path.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js +41 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/basename.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/common.js +24 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/common.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js +47 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/constants.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/dirname.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/dirname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/format.js +20 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.js +10 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.js +235 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js +78 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/relative.js +10 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/relative.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js +20 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js +16 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.js +10 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/_os.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.js +37 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/basename.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/common.js +34 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/common.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/constants.js +18 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/constants.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/dirname.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/dirname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/extname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/format.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/from_file_url.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/from_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.js +84 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/is_absolute.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/is_glob.js +43 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/is_glob.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/join.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/join.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/join_globs.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/join_globs.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/mod.js +58 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize.js +34 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize_glob.js +36 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/normalize_glob.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/parse.js +40 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/parse.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js +9 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/_util.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js +50 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/basename.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/constants.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/constants.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/dirname.js +63 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/dirname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js +90 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/extname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/format.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.js +22 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.js +83 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js +24 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js +43 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join_globs.js +41 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/join_globs.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js +58 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.js +33 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/parse.js +116 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/parse.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/relative.js +107 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/relative.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/resolve.js +60 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/resolve.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js +28 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.js +21 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/relative.js +31 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/relative.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/resolve.js +31 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/resolve.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/to_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.js +30 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/types.js +4 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/types.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js +16 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/_util.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js +45 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/basename.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/constants.js +15 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/constants.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/dirname.js +113 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/dirname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js +82 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/extname.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/format.js +29 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.js +31 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.js +83 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js +39 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js +75 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join_globs.js +42 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/join_globs.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js +135 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.js +33 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/parse.js +177 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/parse.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/relative.js +132 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/relative.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/resolve.js +155 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/resolve.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js +35 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.js.map +1 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.js +50 -0
- package/esm/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.js.map +1 -0
- package/esm/main.js +80 -0
- package/esm/main.js.map +1 -0
- package/esm/mod.js +1 -0
- package/esm/mod.js.map +1 -1
- package/esm/util/displayCompletion.js +9 -0
- package/esm/util/displayCompletion.js.map +1 -0
- package/package.json +13 -3
- package/src/F.ts +9 -2
- package/src/_dnt.polyfills.ts +172 -0
- package/src/_dnt.shims.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/almost_equals.ts +55 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/array_includes.ts +57 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/assert.ts +23 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/assertion_error.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/equal.ts +152 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/equals.ts +52 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/exists.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/fail.ts +21 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/false.ts +26 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/greater.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/greater_or_equal.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/instance_of.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/is_error.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/less.ts +29 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/less_or_equal.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/mod.ts +47 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/not_equals.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/not_instance_of.ts +33 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/not_match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/not_strict_equals.ts +42 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/object_match.ts +202 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/rejects.ts +123 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/strict_equals.ts +67 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/string_includes.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/throws.ts +111 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/unimplemented.ts +21 -0
- package/src/deps/jsr.io/@std/assert/1.0.7/unreachable.ts +21 -0
- package/src/deps/jsr.io/@std/cli/1.0.6/_data.js +17 -0
- package/src/deps/jsr.io/@std/cli/1.0.6/_run_length.ts +41 -0
- package/src/deps/jsr.io/@std/cli/1.0.6/mod.ts +20 -0
- package/src/deps/jsr.io/@std/cli/1.0.6/parse_args.ts +776 -0
- package/src/deps/jsr.io/@std/cli/1.0.6/prompt_secret.ts +102 -0
- package/src/deps/jsr.io/@std/cli/1.0.6/unicode_width.ts +79 -0
- package/src/deps/jsr.io/@std/dotenv/0.225.2/load.ts +14 -0
- package/src/deps/jsr.io/@std/dotenv/0.225.2/mod.ts +251 -0
- package/src/deps/jsr.io/@std/dotenv/0.225.2/parse.ts +113 -0
- package/src/deps/jsr.io/@std/dotenv/0.225.2/stringify.ts +47 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.ts +47 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.ts +25 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/_is_same_path.ts +23 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/_is_subdir.ts +34 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/_to_path_string.ts +17 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/copy.ts +413 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/empty_dir.ts +91 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/ensure_dir.ts +110 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/ensure_file.ts +100 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/ensure_link.ts +66 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.ts +145 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/eol.ts +74 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/exists.ts +316 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/expand_glob.ts +538 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/mod.ts +31 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/move.ts +171 -0
- package/src/deps/jsr.io/@std/fs/1.0.5/walk.ts +956 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/assert_path.ts +10 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/basename.ts +53 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/common.ts +26 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/constants.ts +49 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/dirname.ts +9 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/format.ts +25 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.ts +12 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.ts +290 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/normalize.ts +9 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.ts +74 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/relative.ts +10 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.ts +25 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.ts +17 -0
- package/src/deps/jsr.io/@std/path/1.0.8/_os.ts +12 -0
- package/src/deps/jsr.io/@std/path/1.0.8/basename.ts +38 -0
- package/src/deps/jsr.io/@std/path/1.0.8/common.ts +35 -0
- package/src/deps/jsr.io/@std/path/1.0.8/constants.ts +18 -0
- package/src/deps/jsr.io/@std/path/1.0.8/dirname.ts +31 -0
- package/src/deps/jsr.io/@std/path/1.0.8/extname.ts +30 -0
- package/src/deps/jsr.io/@std/path/1.0.8/format.ts +30 -0
- package/src/deps/jsr.io/@std/path/1.0.8/from_file_url.ts +30 -0
- package/src/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.ts +94 -0
- package/src/deps/jsr.io/@std/path/1.0.8/is_absolute.ts +30 -0
- package/src/deps/jsr.io/@std/path/1.0.8/is_glob.ts +49 -0
- package/src/deps/jsr.io/@std/path/1.0.8/join.ts +31 -0
- package/src/deps/jsr.io/@std/path/1.0.8/join_globs.ts +42 -0
- package/src/deps/jsr.io/@std/path/1.0.8/mod.ts +58 -0
- package/src/deps/jsr.io/@std/path/1.0.8/normalize.ts +34 -0
- package/src/deps/jsr.io/@std/path/1.0.8/normalize_glob.ts +45 -0
- package/src/deps/jsr.io/@std/path/1.0.8/parse.ts +44 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/_util.ts +10 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/basename.ts +59 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/constants.ts +15 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/dirname.ts +70 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/extname.ts +92 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/format.ts +31 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.ts +25 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.ts +94 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.ts +25 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/join.ts +43 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/join_globs.ts +45 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/normalize.ts +62 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.ts +43 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/parse.ts +121 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/relative.ts +103 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/resolve.ts +71 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.ts +32 -0
- package/src/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.ts +21 -0
- package/src/deps/jsr.io/@std/path/1.0.8/relative.ts +32 -0
- package/src/deps/jsr.io/@std/path/1.0.8/resolve.ts +32 -0
- package/src/deps/jsr.io/@std/path/1.0.8/to_file_url.ts +30 -0
- package/src/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.ts +31 -0
- package/src/deps/jsr.io/@std/path/1.0.8/types.ts +40 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/_util.ts +28 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/basename.ts +51 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/constants.ts +15 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/dirname.ts +117 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/extname.ts +89 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/format.ts +31 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.ts +34 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.ts +92 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.ts +40 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/join.ts +75 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/join_globs.ts +46 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/normalize.ts +135 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.ts +43 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/parse.ts +184 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/relative.ts +128 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/resolve.ts +178 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.ts +38 -0
- package/src/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.ts +60 -0
- package/src/main.ts +106 -0
- package/src/mod.ts +2 -7
- package/src/util/displayCompletion.ts +12 -0
- package/{esm → types}/F.d.ts +2 -1
- package/{esm → types}/F.d.ts.map +1 -1
- package/types/_dnt.polyfills.d.ts +19 -0
- package/types/_dnt.polyfills.d.ts.map +1 -0
- package/types/_dnt.shims.d.ts +6 -0
- package/types/_dnt.shims.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/almost_equals.d.ts +29 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/almost_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/array_includes.d.ts +24 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/array_includes.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/assert.d.ts +16 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/assert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/assertion_error.d.ts +26 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/assertion_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/equal.d.ts +17 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/equals.d.ts +22 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/exists.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/exists.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/fail.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/fail.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/false.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/false.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/greater.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/greater.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/greater_or_equal.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/greater_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/instance_of.d.ts +23 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/instance_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/is_error.d.ts +25 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/is_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/less.d.ts +19 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/less.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/less_or_equal.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/less_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/match.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/mod.d.ts +44 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_equals.d.ts +21 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_instance_of.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_instance_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_match.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_strict_equals.d.ts +23 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/not_strict_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/object_match.d.ts +28 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/object_match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/rejects.d.ts +42 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/rejects.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/strict_equals.d.ts +24 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/strict_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/string_includes.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/string_includes.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/throws.d.ts +45 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/throws.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/unimplemented.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/unimplemented.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/unreachable.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.7/unreachable.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/_data.d.ts +9 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/_data.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/_run_length.d.ts +9 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/_run_length.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/mod.d.ts +18 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/parse_args.d.ts +229 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/parse_args.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/prompt_secret.d.ts +28 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/prompt_secret.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/unicode_width.d.ts +40 -0
- package/types/deps/jsr.io/@std/cli/1.0.6/unicode_width.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/load.d.ts +2 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/load.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/mod.d.ts +164 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/parse.d.ts +19 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/stringify.d.ts +17 -0
- package/types/deps/jsr.io/@std/dotenv/0.225.2/stringify.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.d.ts +14 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_create_walk_entry.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.d.ts +13 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_get_file_info_type.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_is_same_path.d.ts +10 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_is_same_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_is_subdir.d.ts +12 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_is_subdir.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_to_path_string.d.ts +9 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/_to_path_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/copy.d.ts +117 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/copy.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/empty_dir.d.ts +48 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/empty_dir.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_dir.d.ts +49 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_dir.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_file.d.ts +47 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_file.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_link.d.ts +49 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_link.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.d.ts +52 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/ensure_symlink.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/eol.d.ts +52 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/eol.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/exists.d.ts +218 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/exists.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/expand_glob.d.ts +267 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/expand_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/mod.d.ts +29 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/move.d.ts +86 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/move.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/walk.d.ts +777 -0
- package/types/deps/jsr.io/@std/fs/1.0.5/walk.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/assert_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts +4 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/common.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/common.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts +40 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/dirname.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/format.d.ts +4 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.d.ts +35 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/normalize_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/relative.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/strip_trailing_separators.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_common/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_os.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/_os.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/basename.d.ts +28 -0
- package/types/deps/jsr.io/@std/path/1.0.8/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/common.d.ts +28 -0
- package/types/deps/jsr.io/@std/path/1.0.8/common.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/constants.d.ts +15 -0
- package/types/deps/jsr.io/@std/path/1.0.8/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/dirname.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/extname.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/format.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/from_file_url.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.d.ts +77 -0
- package/types/deps/jsr.io/@std/path/1.0.8/glob_to_regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/is_absolute.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/is_glob.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/is_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join_globs.d.ts +28 -0
- package/types/deps/jsr.io/@std/path/1.0.8/join_globs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/mod.d.ts +54 -0
- package/types/deps/jsr.io/@std/path/1.0.8/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize.d.ts +27 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize_glob.d.ts +29 -0
- package/types/deps/jsr.io/@std/path/1.0.8/normalize_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/parse.d.ts +35 -0
- package/types/deps/jsr.io/@std/path/1.0.8/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/_util.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts +40 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/constants.d.ts +13 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts +32 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts +37 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/format.d.ts +24 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.d.ts +16 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.d.ts +72 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/glob_to_regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/is_absolute.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts +33 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join_globs.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/join_globs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts +40 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/normalize_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/parse.d.ts +25 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/relative.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/resolve.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.d.ts +16 -0
- package/types/deps/jsr.io/@std/path/1.0.8/posix/to_namespaced_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/relative.d.ts +24 -0
- package/types/deps/jsr.io/@std/path/1.0.8/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/resolve.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.d.ts +21 -0
- package/types/deps/jsr.io/@std/path/1.0.8/to_namespaced_path.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/types.d.ts +38 -0
- package/types/deps/jsr.io/@std/path/1.0.8/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts +4 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/_util.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/constants.d.ts +13 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/format.d.ts +24 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.d.ts +18 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/from_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.d.ts +71 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/glob_to_regexp.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/is_absolute.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join_globs.d.ts +21 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/join_globs.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts +22 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.d.ts +20 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/normalize_glob.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/parse.d.ts +25 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/relative.d.ts +23 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/relative.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/resolve.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/to_file_url.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.d.ts +17 -0
- package/types/deps/jsr.io/@std/path/1.0.8/windows/to_namespaced_path.d.ts.map +1 -0
- package/types/main.d.ts +4 -0
- package/types/main.d.ts.map +1 -0
- package/{esm → types}/mod.d.ts +1 -5
- package/types/mod.d.ts.map +1 -0
- package/types/util/displayCompletion.d.ts +3 -0
- package/types/util/displayCompletion.d.ts.map +1 -0
- package/esm/mod.d.ts.map +0 -1
- /package/{esm → types}/ResponseFormat.d.ts +0 -0
- /package/{esm → types}/ResponseFormat.d.ts.map +0 -0
- /package/{esm → types}/_base.d.ts +0 -0
- /package/{esm → types}/_base.d.ts.map +0 -0
- /package/{esm → types}/array.d.ts +0 -0
- /package/{esm → types}/array.d.ts.map +0 -0
- /package/{esm → types}/common.d.ts +0 -0
- /package/{esm → types}/common.d.ts.map +0 -0
- /package/{esm → types}/literal.d.ts +0 -0
- /package/{esm → types}/literal.d.ts.map +0 -0
- /package/{esm → types}/number.d.ts +0 -0
- /package/{esm → types}/number.d.ts.map +0 -0
- /package/{esm → types}/object.d.ts +0 -0
- /package/{esm → types}/object.d.ts.map +0 -0
- /package/{esm → types}/schema.d.ts +0 -0
- /package/{esm → types}/schema.d.ts.map +0 -0
- /package/{esm → types}/string.d.ts +0 -0
- /package/{esm → types}/string.d.ts.map +0 -0
- /package/{esm → types}/union.d.ts +0 -0
- /package/{esm → types}/union.d.ts.map +0 -0
@@ -0,0 +1,847 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// Documentation and interface for walk were adapted from Go
|
3
|
+
// https://golang.org/pkg/path/filepath/#Walk
|
4
|
+
// Copyright 2009 The Go Authors. All rights reserved. BSD license.
|
5
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
6
|
+
import { join } from "../../path/1.0.8/join.js";
|
7
|
+
import { toPathString } from "./_to_path_string.js";
|
8
|
+
import { createWalkEntry, createWalkEntrySync, } from "./_create_walk_entry.js";
|
9
|
+
function include(path, exts, match, skip) {
|
10
|
+
if (exts && !exts.some((ext) => path.endsWith(ext))) {
|
11
|
+
return false;
|
12
|
+
}
|
13
|
+
if (match && !match.some((pattern) => !!path.match(pattern))) {
|
14
|
+
return false;
|
15
|
+
}
|
16
|
+
if (skip && skip.some((pattern) => !!path.match(pattern))) {
|
17
|
+
return false;
|
18
|
+
}
|
19
|
+
return true;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Recursively walks through a directory and yields information about each file
|
23
|
+
* and directory encountered.
|
24
|
+
*
|
25
|
+
* The root path determines whether the file paths are relative or absolute.
|
26
|
+
* The root directory is included in the yielded entries.
|
27
|
+
*
|
28
|
+
* Requires `--allow-read` permission.
|
29
|
+
*
|
30
|
+
* @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
|
31
|
+
* for more information on Deno's permissions system.
|
32
|
+
*
|
33
|
+
* @param root The root directory to start the walk from, as a string or URL.
|
34
|
+
* @param options The options for the walk.
|
35
|
+
* @throws {Deno.errors.NotFound} If the root directory does not exist.
|
36
|
+
*
|
37
|
+
* @returns An async iterable iterator that yields the walk entry objects.
|
38
|
+
*
|
39
|
+
* @example Basic usage
|
40
|
+
*
|
41
|
+
* File structure:
|
42
|
+
* ```
|
43
|
+
* folder
|
44
|
+
* ├── script.ts
|
45
|
+
* └── foo.ts
|
46
|
+
* ```
|
47
|
+
*
|
48
|
+
* ```ts ignore
|
49
|
+
* import { walk } from "@std/fs/walk";
|
50
|
+
*
|
51
|
+
* await Array.fromAsync(walk("."));
|
52
|
+
* // [
|
53
|
+
* // {
|
54
|
+
* // path: ".",
|
55
|
+
* // name: ".",
|
56
|
+
* // isFile: false,
|
57
|
+
* // isDirectory: true,
|
58
|
+
* // isSymlink: false
|
59
|
+
* // },
|
60
|
+
* // {
|
61
|
+
* // path: "script.ts",
|
62
|
+
* // name: "script.ts",
|
63
|
+
* // isFile: true,
|
64
|
+
* // isDirectory: false,
|
65
|
+
* // isSymlink: false
|
66
|
+
* // },
|
67
|
+
* // {
|
68
|
+
* // path: "foo.ts",
|
69
|
+
* // name: "foo.ts",
|
70
|
+
* // isFile: true,
|
71
|
+
* // isDirectory: false,
|
72
|
+
* // isSymlink: false
|
73
|
+
* // },
|
74
|
+
* // ]
|
75
|
+
* ```
|
76
|
+
*
|
77
|
+
* @example Maximum file depth
|
78
|
+
*
|
79
|
+
* Setting the `maxDepth` option to `1` will only include the root directory and
|
80
|
+
* its immediate children.
|
81
|
+
*
|
82
|
+
* File structure:
|
83
|
+
* ```
|
84
|
+
* folder
|
85
|
+
* ├── script.ts
|
86
|
+
* └── foo
|
87
|
+
* └── bar.ts
|
88
|
+
* ```
|
89
|
+
*
|
90
|
+
* ```ts ignore
|
91
|
+
* import { walk } from "@std/fs/walk";
|
92
|
+
*
|
93
|
+
* await Array.fromAsync(walk(".", { maxDepth: 1 }));
|
94
|
+
* // [
|
95
|
+
* // {
|
96
|
+
* // path: ".",
|
97
|
+
* // name: ".",
|
98
|
+
* // isFile: false,
|
99
|
+
* // isDirectory: true,
|
100
|
+
* // isSymlink: false
|
101
|
+
* // },
|
102
|
+
* // {
|
103
|
+
* // path: "script.ts",
|
104
|
+
* // name: "script.ts",
|
105
|
+
* // isFile: true,
|
106
|
+
* // isDirectory: false,
|
107
|
+
* // isSymlink: false
|
108
|
+
* // },
|
109
|
+
* // {
|
110
|
+
* // path: "foo",
|
111
|
+
* // name: "foo",
|
112
|
+
* // isFile: false,
|
113
|
+
* // isDirectory: true,
|
114
|
+
* // isSymlink: false
|
115
|
+
* // },
|
116
|
+
* // ]
|
117
|
+
* ```
|
118
|
+
*
|
119
|
+
* @example Exclude files
|
120
|
+
*
|
121
|
+
* Setting the `includeFiles` option to `false` will exclude files.
|
122
|
+
*
|
123
|
+
* File structure:
|
124
|
+
* ```
|
125
|
+
* folder
|
126
|
+
* ├── script.ts
|
127
|
+
* └── foo
|
128
|
+
* ```
|
129
|
+
*
|
130
|
+
* ```ts ignore
|
131
|
+
* import { walk } from "@std/fs/walk";
|
132
|
+
*
|
133
|
+
* await Array.fromAsync(walk(".", { includeFiles: false }));
|
134
|
+
* // [
|
135
|
+
* // {
|
136
|
+
* // path: ".",
|
137
|
+
* // name: ".",
|
138
|
+
* // isFile: false,
|
139
|
+
* // isDirectory: true,
|
140
|
+
* // isSymlink: false
|
141
|
+
* // },
|
142
|
+
* // {
|
143
|
+
* // path: "foo",
|
144
|
+
* // name: "foo",
|
145
|
+
* // isFile: false,
|
146
|
+
* // isDirectory: true,
|
147
|
+
* // isSymlink: false,
|
148
|
+
* // },
|
149
|
+
* // ]
|
150
|
+
* ```
|
151
|
+
*
|
152
|
+
* @example Exclude directories
|
153
|
+
*
|
154
|
+
* Setting the `includeDirs` option to `false` will exclude directories.
|
155
|
+
*
|
156
|
+
* File structure:
|
157
|
+
* ```
|
158
|
+
* folder
|
159
|
+
* ├── script.ts
|
160
|
+
* └── foo
|
161
|
+
* ```
|
162
|
+
*
|
163
|
+
* ```ts ignore
|
164
|
+
* import { walk } from "@std/fs/walk";
|
165
|
+
*
|
166
|
+
* await Array.fromAsync(walk(".", { includeDirs: false }));
|
167
|
+
* // [
|
168
|
+
* // {
|
169
|
+
* // path: "script.ts",
|
170
|
+
* // name: "script.ts",
|
171
|
+
* // isFile: true,
|
172
|
+
* // isDirectory: false,
|
173
|
+
* // isSymlink: false
|
174
|
+
* // },
|
175
|
+
* // ]
|
176
|
+
* ```
|
177
|
+
*
|
178
|
+
* @example Exclude symbolic links
|
179
|
+
*
|
180
|
+
* Setting the `includeSymlinks` option to `false` will exclude symbolic links.
|
181
|
+
*
|
182
|
+
* File structure:
|
183
|
+
* ```
|
184
|
+
* folder
|
185
|
+
* ├── script.ts
|
186
|
+
* ├── foo
|
187
|
+
* └── link -> script.ts (symbolic link)
|
188
|
+
* ```
|
189
|
+
*
|
190
|
+
* ```ts ignore
|
191
|
+
* import { walk } from "@std/fs/walk";
|
192
|
+
*
|
193
|
+
* await Array.fromAsync(walk(".", { includeSymlinks: false }));
|
194
|
+
* // [
|
195
|
+
* // {
|
196
|
+
* // path: ".",
|
197
|
+
* // name: ".",
|
198
|
+
* // isFile: false,
|
199
|
+
* // isDirectory: true,
|
200
|
+
* // isSymlink: false
|
201
|
+
* // },
|
202
|
+
* // {
|
203
|
+
* // path: "script.ts",
|
204
|
+
* // name: "script.ts",
|
205
|
+
* // isFile: true,
|
206
|
+
* // isDirectory: false,
|
207
|
+
* // isSymlink: false
|
208
|
+
* // },
|
209
|
+
* // ]
|
210
|
+
* ```
|
211
|
+
*
|
212
|
+
* @example Follow symbolic links
|
213
|
+
*
|
214
|
+
* Setting the `followSymlinks` option to `true` will follow symbolic links,
|
215
|
+
* affecting the `path` property of the walk entry.
|
216
|
+
*
|
217
|
+
* File structure:
|
218
|
+
* ```
|
219
|
+
* folder
|
220
|
+
* ├── script.ts
|
221
|
+
* └── link -> script.ts (symbolic link)
|
222
|
+
* ```
|
223
|
+
*
|
224
|
+
* ```ts ignore
|
225
|
+
* import { walk } from "@std/fs/walk";
|
226
|
+
*
|
227
|
+
* await Array.fromAsync(walk(".", { followSymlinks: true }));
|
228
|
+
* // [
|
229
|
+
* // {
|
230
|
+
* // path: ".",
|
231
|
+
* // name: ".",
|
232
|
+
* // isFile: false,
|
233
|
+
* // isDirectory: true,
|
234
|
+
* // isSymlink: false
|
235
|
+
* // },
|
236
|
+
* // {
|
237
|
+
* // path: "script.ts",
|
238
|
+
* // name: "script.ts",
|
239
|
+
* // isFile: true,
|
240
|
+
* // isDirectory: false,
|
241
|
+
* // isSymlink: false
|
242
|
+
* // },
|
243
|
+
* // {
|
244
|
+
* // path: "script.ts",
|
245
|
+
* // name: "link",
|
246
|
+
* // isFile: true,
|
247
|
+
* // isDirectory: false,
|
248
|
+
* // isSymlink: true
|
249
|
+
* // },
|
250
|
+
* // ]
|
251
|
+
* ```
|
252
|
+
*
|
253
|
+
* @example Canonicalize symbolic links
|
254
|
+
*
|
255
|
+
* Setting the `canonicalize` option to `false` will canonicalize the path of
|
256
|
+
* the followed symbolic link. Meaning, the `path` property of the walk entry
|
257
|
+
* will be the path of the symbolic link itself.
|
258
|
+
*
|
259
|
+
* File structure:
|
260
|
+
* ```
|
261
|
+
* folder
|
262
|
+
* ├── script.ts
|
263
|
+
* └── link -> script.ts (symbolic link)
|
264
|
+
* ```
|
265
|
+
*
|
266
|
+
* ```ts ignore
|
267
|
+
* import { walk } from "@std/fs/walk";
|
268
|
+
*
|
269
|
+
* await Array.fromAsync(walk(".", { followSymlinks: true, canonicalize: true }));
|
270
|
+
* // [
|
271
|
+
* // {
|
272
|
+
* // path: ".",
|
273
|
+
* // name: ".",
|
274
|
+
* // isFile: false,
|
275
|
+
* // isDirectory: true,
|
276
|
+
* // isSymlink: false
|
277
|
+
* // },
|
278
|
+
* // {
|
279
|
+
* // path: "script.ts",
|
280
|
+
* // name: "script.ts",
|
281
|
+
* // isFile: true,
|
282
|
+
* // isDirectory: false,
|
283
|
+
* // isSymlink: false
|
284
|
+
* // },
|
285
|
+
* // {
|
286
|
+
* // path: "link",
|
287
|
+
* // name: "link",
|
288
|
+
* // isFile: true,
|
289
|
+
* // isDirectory: false,
|
290
|
+
* // isSymlink: true
|
291
|
+
* // },
|
292
|
+
* // ]
|
293
|
+
* ```
|
294
|
+
*
|
295
|
+
* @example Filter by file extensions
|
296
|
+
*
|
297
|
+
* Setting the `exts` option to `[".ts"]` or `["ts"]` will only include entries
|
298
|
+
* with the `.ts` file extension.
|
299
|
+
*
|
300
|
+
* File structure:
|
301
|
+
* ```
|
302
|
+
* folder
|
303
|
+
* ├── script.ts
|
304
|
+
* └── foo.js
|
305
|
+
* ```
|
306
|
+
*
|
307
|
+
* ```ts ignore
|
308
|
+
* import { walk } from "@std/fs/walk";
|
309
|
+
*
|
310
|
+
* await Array.fromAsync(walk(".", { exts: [".ts"] }));
|
311
|
+
* // [
|
312
|
+
* // {
|
313
|
+
* // path: "script.ts",
|
314
|
+
* // name: "script.ts",
|
315
|
+
* // isFile: true,
|
316
|
+
* // isDirectory: false,
|
317
|
+
* // isSymlink: false
|
318
|
+
* // },
|
319
|
+
* // ]
|
320
|
+
* ```
|
321
|
+
*
|
322
|
+
* @example Filter by regular expressions
|
323
|
+
*
|
324
|
+
* Setting the `match` option to `[/.s/]` will only include entries with the
|
325
|
+
* letter `s` in their name.
|
326
|
+
*
|
327
|
+
* File structure:
|
328
|
+
* ```
|
329
|
+
* folder
|
330
|
+
* ├── script.ts
|
331
|
+
* └── README.md
|
332
|
+
* ```
|
333
|
+
*
|
334
|
+
* ```ts ignore
|
335
|
+
* import { walk } from "@std/fs/walk";
|
336
|
+
*
|
337
|
+
* await Array.fromAsync(walk(".", { match: [/s/] }));
|
338
|
+
* // [
|
339
|
+
* // {
|
340
|
+
* // path: "script.ts",
|
341
|
+
* // name: "script.ts",
|
342
|
+
* // isFile: true,
|
343
|
+
* // isDirectory: false,
|
344
|
+
* // isSymlink: false
|
345
|
+
* // },
|
346
|
+
* // ]
|
347
|
+
* ```
|
348
|
+
*
|
349
|
+
* @example Exclude by regular expressions
|
350
|
+
*
|
351
|
+
* Setting the `skip` option to `[/.s/]` will exclude entries with the letter
|
352
|
+
* `s` in their name.
|
353
|
+
*
|
354
|
+
* File structure:
|
355
|
+
* ```
|
356
|
+
* folder
|
357
|
+
* ├── script.ts
|
358
|
+
* └── README.md
|
359
|
+
* ```
|
360
|
+
*
|
361
|
+
* ```ts ignore
|
362
|
+
* import { walk } from "@std/fs/walk";
|
363
|
+
*
|
364
|
+
* await Array.fromAsync(walk(".", { skip: [/s/] }));
|
365
|
+
* // [
|
366
|
+
* // {
|
367
|
+
* // path: "README.md",
|
368
|
+
* // name: "README.md",
|
369
|
+
* // isFile: true,
|
370
|
+
* // isDirectory: false,
|
371
|
+
* // isSymlink: false
|
372
|
+
* // },
|
373
|
+
* // ]
|
374
|
+
* ```
|
375
|
+
*/
|
376
|
+
export async function* walk(root, options) {
|
377
|
+
let { maxDepth = Infinity, includeFiles = true, includeDirs = true, includeSymlinks = true, followSymlinks = false, canonicalize = true, exts = undefined, match = undefined, skip = undefined, } = options ?? {};
|
378
|
+
if (maxDepth < 0) {
|
379
|
+
return;
|
380
|
+
}
|
381
|
+
root = toPathString(root);
|
382
|
+
if (exts) {
|
383
|
+
exts = exts.map((ext) => ext.startsWith(".") ? ext : `.${ext}`);
|
384
|
+
}
|
385
|
+
if (includeDirs && include(root, exts, match, skip)) {
|
386
|
+
yield await createWalkEntry(root);
|
387
|
+
}
|
388
|
+
if (maxDepth < 1 || !include(root, undefined, undefined, skip)) {
|
389
|
+
return;
|
390
|
+
}
|
391
|
+
for await (const entry of dntShim.Deno.readDir(root)) {
|
392
|
+
let path = join(root, entry.name);
|
393
|
+
let { isSymlink, isDirectory } = entry;
|
394
|
+
if (isSymlink) {
|
395
|
+
if (!followSymlinks) {
|
396
|
+
if (includeSymlinks && include(path, exts, match, skip)) {
|
397
|
+
yield { path, ...entry };
|
398
|
+
}
|
399
|
+
continue;
|
400
|
+
}
|
401
|
+
const realPath = await dntShim.Deno.realPath(path);
|
402
|
+
if (canonicalize) {
|
403
|
+
path = realPath;
|
404
|
+
}
|
405
|
+
// Caveat emptor: don't assume |path| is not a symlink. realpath()
|
406
|
+
// resolves symlinks but another process can replace the file system
|
407
|
+
// entity with a different type of entity before we call lstat().
|
408
|
+
({ isSymlink, isDirectory } = await dntShim.Deno.lstat(realPath));
|
409
|
+
}
|
410
|
+
if (isSymlink || isDirectory) {
|
411
|
+
const opts = {
|
412
|
+
maxDepth: maxDepth - 1,
|
413
|
+
includeFiles,
|
414
|
+
includeDirs,
|
415
|
+
includeSymlinks,
|
416
|
+
followSymlinks,
|
417
|
+
};
|
418
|
+
if (exts !== undefined) {
|
419
|
+
opts.exts = exts;
|
420
|
+
}
|
421
|
+
if (match !== undefined) {
|
422
|
+
opts.match = match;
|
423
|
+
}
|
424
|
+
if (skip !== undefined) {
|
425
|
+
opts.skip = skip;
|
426
|
+
}
|
427
|
+
yield* walk(path, opts);
|
428
|
+
}
|
429
|
+
else if (includeFiles && include(path, exts, match, skip)) {
|
430
|
+
yield { path, ...entry };
|
431
|
+
}
|
432
|
+
}
|
433
|
+
}
|
434
|
+
/**
|
435
|
+
* Recursively walks through a directory and yields information about each file
|
436
|
+
* and directory encountered.
|
437
|
+
*
|
438
|
+
* The root path determines whether the file paths is relative or absolute.
|
439
|
+
* The root directory is included in the yielded entries.
|
440
|
+
*
|
441
|
+
* Requires `--allow-read` permission.
|
442
|
+
*
|
443
|
+
* @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
|
444
|
+
* for more information on Deno's permissions system.
|
445
|
+
*
|
446
|
+
* @param root The root directory to start the walk from, as a string or URL.
|
447
|
+
* @param options The options for the walk.
|
448
|
+
*
|
449
|
+
* @returns A synchronous iterable iterator that yields the walk entry objects.
|
450
|
+
*
|
451
|
+
* @example Basic usage
|
452
|
+
*
|
453
|
+
* File structure:
|
454
|
+
* ```
|
455
|
+
* folder
|
456
|
+
* ├── script.ts
|
457
|
+
* └── foo.ts
|
458
|
+
* ```
|
459
|
+
*
|
460
|
+
* ```ts ignore
|
461
|
+
* import { walkSync } from "@std/fs/walk";
|
462
|
+
*
|
463
|
+
* Array.from(walkSync("."));
|
464
|
+
* // [
|
465
|
+
* // {
|
466
|
+
* // path: ".",
|
467
|
+
* // name: ".",
|
468
|
+
* // isFile: false,
|
469
|
+
* // isDirectory: true,
|
470
|
+
* // isSymlink: false
|
471
|
+
* // },
|
472
|
+
* // {
|
473
|
+
* // path: "script.ts",
|
474
|
+
* // name: "script.ts",
|
475
|
+
* // isFile: true,
|
476
|
+
* // isDirectory: false,
|
477
|
+
* // isSymlink: false
|
478
|
+
* // },
|
479
|
+
* // {
|
480
|
+
* // path: "foo.ts",
|
481
|
+
* // name: "foo.ts",
|
482
|
+
* // isFile: true,
|
483
|
+
* // isDirectory: false,
|
484
|
+
* // isSymlink: false
|
485
|
+
* // },
|
486
|
+
* // ]
|
487
|
+
* ```
|
488
|
+
*
|
489
|
+
* @example Maximum file depth
|
490
|
+
*
|
491
|
+
* Setting the `maxDepth` option to `1` will only include the root directory and
|
492
|
+
* its immediate children.
|
493
|
+
*
|
494
|
+
* File structure:
|
495
|
+
* ```
|
496
|
+
* folder
|
497
|
+
* ├── script.ts
|
498
|
+
* └── foo
|
499
|
+
* └── bar.ts
|
500
|
+
* ```
|
501
|
+
*
|
502
|
+
* ```ts ignore
|
503
|
+
* import { walkSync } from "@std/fs/walk";
|
504
|
+
*
|
505
|
+
* Array.from(walkSync(".", { maxDepth: 1 }));
|
506
|
+
* // [
|
507
|
+
* // {
|
508
|
+
* // path: ".",
|
509
|
+
* // name: ".",
|
510
|
+
* // isFile: false,
|
511
|
+
* // isDirectory: true,
|
512
|
+
* // isSymlink: false
|
513
|
+
* // },
|
514
|
+
* // {
|
515
|
+
* // path: "script.ts",
|
516
|
+
* // name: "script.ts",
|
517
|
+
* // isFile: true,
|
518
|
+
* // isDirectory: false,
|
519
|
+
* // isSymlink: false
|
520
|
+
* // },
|
521
|
+
* // {
|
522
|
+
* // path: "foo",
|
523
|
+
* // name: "foo",
|
524
|
+
* // isFile: false,
|
525
|
+
* // isDirectory: true,
|
526
|
+
* // isSymlink: false
|
527
|
+
* // },
|
528
|
+
* // ]
|
529
|
+
* ```
|
530
|
+
*
|
531
|
+
* @example Exclude files
|
532
|
+
*
|
533
|
+
* Setting the `includeFiles` option to `false` will exclude files.
|
534
|
+
*
|
535
|
+
* File structure:
|
536
|
+
* ```
|
537
|
+
* folder
|
538
|
+
* ├── script.ts
|
539
|
+
* └── foo
|
540
|
+
* ```
|
541
|
+
*
|
542
|
+
* ```ts ignore
|
543
|
+
* import { walkSync } from "@std/fs/walk";
|
544
|
+
*
|
545
|
+
* Array.from(walkSync(".", { includeFiles: false }));
|
546
|
+
* // [
|
547
|
+
* // {
|
548
|
+
* // path: ".",
|
549
|
+
* // name: ".",
|
550
|
+
* // isFile: false,
|
551
|
+
* // isDirectory: true,
|
552
|
+
* // isSymlink: false
|
553
|
+
* // },
|
554
|
+
* // {
|
555
|
+
* // path: "foo",
|
556
|
+
* // name: "foo",
|
557
|
+
* // isFile: false,
|
558
|
+
* // isDirectory: true,
|
559
|
+
* // isSymlink: false,
|
560
|
+
* // },
|
561
|
+
* // ]
|
562
|
+
* ```
|
563
|
+
*
|
564
|
+
* @example Exclude directories
|
565
|
+
*
|
566
|
+
* Setting the `includeDirs` option to `false` will exclude directories.
|
567
|
+
*
|
568
|
+
* File structure:
|
569
|
+
* ```
|
570
|
+
* folder
|
571
|
+
* ├── script.ts
|
572
|
+
* └── foo
|
573
|
+
* ```
|
574
|
+
*
|
575
|
+
* ```ts ignore
|
576
|
+
* import { walkSync } from "@std/fs/walk";
|
577
|
+
*
|
578
|
+
* Array.from(walkSync(".", { includeDirs: false }));
|
579
|
+
* // [
|
580
|
+
* // {
|
581
|
+
* // path: "script.ts",
|
582
|
+
* // name: "script.ts",
|
583
|
+
* // isFile: true,
|
584
|
+
* // isDirectory: false,
|
585
|
+
* // isSymlink: false
|
586
|
+
* // },
|
587
|
+
* // ]
|
588
|
+
* ```
|
589
|
+
*
|
590
|
+
* @example Exclude symbolic links
|
591
|
+
*
|
592
|
+
* Setting the `includeSymlinks` option to `false` will exclude symbolic links.
|
593
|
+
*
|
594
|
+
* File structure:
|
595
|
+
* ```
|
596
|
+
* folder
|
597
|
+
* ├── script.ts
|
598
|
+
* ├── foo
|
599
|
+
* └── link -> script.ts (symbolic link)
|
600
|
+
* ```
|
601
|
+
*
|
602
|
+
* ```ts ignore
|
603
|
+
* import { walkSync } from "@std/fs/walk";
|
604
|
+
*
|
605
|
+
* Array.from(walkSync(".", { includeSymlinks: false }));
|
606
|
+
* // [
|
607
|
+
* // {
|
608
|
+
* // path: ".",
|
609
|
+
* // name: ".",
|
610
|
+
* // isFile: false,
|
611
|
+
* // isDirectory: true,
|
612
|
+
* // isSymlink: false
|
613
|
+
* // },
|
614
|
+
* // {
|
615
|
+
* // path: "script.ts",
|
616
|
+
* // name: "script.ts",
|
617
|
+
* // isFile: true,
|
618
|
+
* // isDirectory: false,
|
619
|
+
* // isSymlink: false
|
620
|
+
* // },
|
621
|
+
* // ]
|
622
|
+
* ```
|
623
|
+
*
|
624
|
+
* @example Follow symbolic links
|
625
|
+
*
|
626
|
+
* Setting the `followSymlinks` option to `true` will follow symbolic links,
|
627
|
+
* affecting the `path` property of the walk entry.
|
628
|
+
*
|
629
|
+
* File structure:
|
630
|
+
* ```
|
631
|
+
* folder
|
632
|
+
* ├── script.ts
|
633
|
+
* └── link -> script.ts (symbolic link)
|
634
|
+
* ```
|
635
|
+
*
|
636
|
+
* ```ts ignore
|
637
|
+
* import { walkSync } from "@std/fs/walk";
|
638
|
+
*
|
639
|
+
* Array.from(walkSync(".", { followSymlinks: true }));
|
640
|
+
* // [
|
641
|
+
* // {
|
642
|
+
* // path: ".",
|
643
|
+
* // name: ".",
|
644
|
+
* // isFile: false,
|
645
|
+
* // isDirectory: true,
|
646
|
+
* // isSymlink: false
|
647
|
+
* // },
|
648
|
+
* // {
|
649
|
+
* // path: "script.ts",
|
650
|
+
* // name: "script.ts",
|
651
|
+
* // isFile: true,
|
652
|
+
* // isDirectory: false,
|
653
|
+
* // isSymlink: false
|
654
|
+
* // },
|
655
|
+
* // {
|
656
|
+
* // path: "script.ts",
|
657
|
+
* // name: "link",
|
658
|
+
* // isFile: true,
|
659
|
+
* // isDirectory: false,
|
660
|
+
* // isSymlink: true
|
661
|
+
* // },
|
662
|
+
* // ]
|
663
|
+
* ```
|
664
|
+
*
|
665
|
+
* @example Canonicalize symbolic links
|
666
|
+
*
|
667
|
+
* Setting the `canonicalize` option to `false` will canonicalize the path of
|
668
|
+
* the followed symbolic link. Meaning, the `path` property of the walk entry
|
669
|
+
* will be the path of the symbolic link itself.
|
670
|
+
*
|
671
|
+
* File structure:
|
672
|
+
* ```
|
673
|
+
* folder
|
674
|
+
* ├── script.ts
|
675
|
+
* └── link -> script.ts (symbolic link)
|
676
|
+
* ```
|
677
|
+
*
|
678
|
+
* ```ts ignore
|
679
|
+
* import { walkSync } from "@std/fs/walk";
|
680
|
+
*
|
681
|
+
* Array.from(walkSync(".", { followSymlinks: true, canonicalize: true }));
|
682
|
+
* // [
|
683
|
+
* // {
|
684
|
+
* // path: ".",
|
685
|
+
* // name: ".",
|
686
|
+
* // isFile: false,
|
687
|
+
* // isDirectory: true,
|
688
|
+
* // isSymlink: false
|
689
|
+
* // },
|
690
|
+
* // {
|
691
|
+
* // path: "script.ts",
|
692
|
+
* // name: "script.ts",
|
693
|
+
* // isFile: true,
|
694
|
+
* // isDirectory: false,
|
695
|
+
* // isSymlink: false
|
696
|
+
* // },
|
697
|
+
* // {
|
698
|
+
* // path: "link",
|
699
|
+
* // name: "link",
|
700
|
+
* // isFile: true,
|
701
|
+
* // isDirectory: false,
|
702
|
+
* // isSymlink: true
|
703
|
+
* // },
|
704
|
+
* // ]
|
705
|
+
* ```
|
706
|
+
*
|
707
|
+
* @example Filter by file extensions
|
708
|
+
*
|
709
|
+
* Setting the `exts` option to `[".ts"]` or `["ts"]` will only include entries
|
710
|
+
* with the `.ts` file extension.
|
711
|
+
*
|
712
|
+
* File structure:
|
713
|
+
* ```
|
714
|
+
* folder
|
715
|
+
* ├── script.ts
|
716
|
+
* └── foo.js
|
717
|
+
* ```
|
718
|
+
*
|
719
|
+
* ```ts ignore
|
720
|
+
* import { walkSync } from "@std/fs/walk";
|
721
|
+
*
|
722
|
+
* Array.from(walkSync(".", { exts: [".ts"] }));
|
723
|
+
* // [
|
724
|
+
* // {
|
725
|
+
* // path: "script.ts",
|
726
|
+
* // name: "script.ts",
|
727
|
+
* // isFile: true,
|
728
|
+
* // isDirectory: false,
|
729
|
+
* // isSymlink: false
|
730
|
+
* // },
|
731
|
+
* // ]
|
732
|
+
* ```
|
733
|
+
*
|
734
|
+
* @example Filter by regular expressions
|
735
|
+
*
|
736
|
+
* Setting the `match` option to `[/.s/]` will only include entries with the
|
737
|
+
* letter `s` in their name.
|
738
|
+
*
|
739
|
+
* File structure:
|
740
|
+
* ```
|
741
|
+
* folder
|
742
|
+
* ├── script.ts
|
743
|
+
* └── README.md
|
744
|
+
* ```
|
745
|
+
*
|
746
|
+
* ```ts ignore
|
747
|
+
* import { walkSync } from "@std/fs/walk";
|
748
|
+
*
|
749
|
+
* Array.from(walkSync(".", { match: [/s/] }));
|
750
|
+
* // [
|
751
|
+
* // {
|
752
|
+
* // path: "script.ts",
|
753
|
+
* // name: "script.ts",
|
754
|
+
* // isFile: true,
|
755
|
+
* // isDirectory: false,
|
756
|
+
* // isSymlink: false
|
757
|
+
* // },
|
758
|
+
* // ]
|
759
|
+
* ```
|
760
|
+
*
|
761
|
+
* @example Exclude by regular expressions
|
762
|
+
*
|
763
|
+
* Setting the `skip` option to `[/.s/]` will exclude entries with the letter
|
764
|
+
* `s` in their name.
|
765
|
+
*
|
766
|
+
* File structure:
|
767
|
+
* ```
|
768
|
+
* folder
|
769
|
+
* ├── script.ts
|
770
|
+
* └── README.md
|
771
|
+
* ```
|
772
|
+
*
|
773
|
+
* ```ts ignore
|
774
|
+
* import { walkSync } from "@std/fs/walk";
|
775
|
+
*
|
776
|
+
* Array.from(walkSync(".", { skip: [/s/] }));
|
777
|
+
* // [
|
778
|
+
* // {
|
779
|
+
* // path: "README.md",
|
780
|
+
* // name: "README.md",
|
781
|
+
* // isFile: true,
|
782
|
+
* // isDirectory: false,
|
783
|
+
* // isSymlink: false
|
784
|
+
* // },
|
785
|
+
* // ]
|
786
|
+
* ```
|
787
|
+
*/
|
788
|
+
export function* walkSync(root, options) {
|
789
|
+
let { maxDepth = Infinity, includeFiles = true, includeDirs = true, includeSymlinks = true, followSymlinks = false, canonicalize = true, exts = undefined, match = undefined, skip = undefined, } = options ?? {};
|
790
|
+
root = toPathString(root);
|
791
|
+
if (exts) {
|
792
|
+
exts = exts.map((ext) => ext.startsWith(".") ? ext : `.${ext}`);
|
793
|
+
}
|
794
|
+
if (maxDepth < 0) {
|
795
|
+
return;
|
796
|
+
}
|
797
|
+
if (includeDirs && include(root, exts, match, skip)) {
|
798
|
+
yield createWalkEntrySync(root);
|
799
|
+
}
|
800
|
+
if (maxDepth < 1 || !include(root, undefined, undefined, skip)) {
|
801
|
+
return;
|
802
|
+
}
|
803
|
+
const entries = dntShim.Deno.readDirSync(root);
|
804
|
+
for (const entry of entries) {
|
805
|
+
let path = join(root, entry.name);
|
806
|
+
let { isSymlink, isDirectory } = entry;
|
807
|
+
if (isSymlink) {
|
808
|
+
if (!followSymlinks) {
|
809
|
+
if (includeSymlinks && include(path, exts, match, skip)) {
|
810
|
+
yield { path, ...entry };
|
811
|
+
}
|
812
|
+
continue;
|
813
|
+
}
|
814
|
+
const realPath = dntShim.Deno.realPathSync(path);
|
815
|
+
if (canonicalize) {
|
816
|
+
path = realPath;
|
817
|
+
}
|
818
|
+
// Caveat emptor: don't assume |path| is not a symlink. realpath()
|
819
|
+
// resolves symlinks but another process can replace the file system
|
820
|
+
// entity with a different type of entity before we call lstat().
|
821
|
+
({ isSymlink, isDirectory } = dntShim.Deno.lstatSync(realPath));
|
822
|
+
}
|
823
|
+
if (isSymlink || isDirectory) {
|
824
|
+
const opts = {
|
825
|
+
maxDepth: maxDepth - 1,
|
826
|
+
includeFiles,
|
827
|
+
includeDirs,
|
828
|
+
includeSymlinks,
|
829
|
+
followSymlinks,
|
830
|
+
};
|
831
|
+
if (exts !== undefined) {
|
832
|
+
opts.exts = exts;
|
833
|
+
}
|
834
|
+
if (match !== undefined) {
|
835
|
+
opts.match = match;
|
836
|
+
}
|
837
|
+
if (skip !== undefined) {
|
838
|
+
opts.skip = skip;
|
839
|
+
}
|
840
|
+
yield* walkSync(path, opts);
|
841
|
+
}
|
842
|
+
else if (includeFiles && include(path, exts, match, skip)) {
|
843
|
+
yield { path, ...entry };
|
844
|
+
}
|
845
|
+
}
|
846
|
+
}
|
847
|
+
//# sourceMappingURL=walk.js.map
|