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,102 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
3
|
+
|
4
|
+
|
5
|
+
const input = dntShim.Deno.stdin;
|
6
|
+
const output = dntShim.Deno.stdout;
|
7
|
+
const encoder = new TextEncoder();
|
8
|
+
const decoder = new TextDecoder();
|
9
|
+
const LF = "\n".charCodeAt(0); // ^J - Enter on Linux
|
10
|
+
const CR = "\r".charCodeAt(0); // ^M - Enter on macOS and Windows (CRLF)
|
11
|
+
const BS = "\b".charCodeAt(0); // ^H - Backspace on Linux and Windows
|
12
|
+
const DEL = 0x7f; // ^? - Backspace on macOS
|
13
|
+
const CLR = encoder.encode("\r\u001b[K"); // Clear the current line
|
14
|
+
|
15
|
+
// The `cbreak` option is not supported on Windows
|
16
|
+
const setRawOptions = dntShim.Deno.build.os === "windows"
|
17
|
+
? undefined
|
18
|
+
: { cbreak: true };
|
19
|
+
|
20
|
+
/** Options for {@linkcode promptSecret}. */
|
21
|
+
export type PromptSecretOptions = {
|
22
|
+
/** A character to print instead of the user's input. */
|
23
|
+
mask?: string;
|
24
|
+
/** Clear the current line after the user's input. */
|
25
|
+
clear?: boolean;
|
26
|
+
};
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Shows the given message and waits for the user's input. Returns the user's input as string.
|
30
|
+
* This is similar to `prompt()` but it print user's input as `*` to prevent password from being shown.
|
31
|
+
* Use an empty `mask` if you don't want to show any character.
|
32
|
+
*
|
33
|
+
* @param message The prompt message to show to the user.
|
34
|
+
* @param options The options for the prompt.
|
35
|
+
* @returns The string that was entered or `null` if stdin is not a TTY.
|
36
|
+
*
|
37
|
+
* @example Usage
|
38
|
+
* ```ts no-eval
|
39
|
+
* import { promptSecret } from "@std/cli/prompt-secret";
|
40
|
+
*
|
41
|
+
* const password = promptSecret("Please provide the password:");
|
42
|
+
* if (password !== "some-password") {
|
43
|
+
* throw new Error("Access denied");
|
44
|
+
* }
|
45
|
+
* ```
|
46
|
+
*/
|
47
|
+
export function promptSecret(
|
48
|
+
message = "Secret",
|
49
|
+
options?: PromptSecretOptions,
|
50
|
+
): string | null {
|
51
|
+
const { mask = "*", clear } = options ?? {};
|
52
|
+
|
53
|
+
if (!input.isTerminal()) {
|
54
|
+
return null;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Make the output consistent with the built-in prompt()
|
58
|
+
message += " ";
|
59
|
+
const callback = !mask ? undefined : (n: number) => {
|
60
|
+
output.writeSync(CLR);
|
61
|
+
output.writeSync(encoder.encode(`${message}${mask.repeat(n)}`));
|
62
|
+
};
|
63
|
+
output.writeSync(encoder.encode(message));
|
64
|
+
|
65
|
+
dntShim.Deno.stdin.setRaw(true, setRawOptions);
|
66
|
+
try {
|
67
|
+
return readLineFromStdinSync(callback);
|
68
|
+
} finally {
|
69
|
+
if (clear) {
|
70
|
+
output.writeSync(CLR);
|
71
|
+
} else {
|
72
|
+
output.writeSync(encoder.encode("\n"));
|
73
|
+
}
|
74
|
+
dntShim.Deno.stdin.setRaw(false);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
// Slightly modified from Deno's runtime/js/41_prompt.js
|
79
|
+
// This implementation immediately break on CR or LF and accept callback.
|
80
|
+
// The original version waits LF when CR is received.
|
81
|
+
// https://github.com/denoland/deno/blob/e4593873a9c791238685dfbb45e64b4485884174/runtime/js/41_prompt.js#L52-L77
|
82
|
+
function readLineFromStdinSync(callback?: (n: number) => void): string {
|
83
|
+
const c = new Uint8Array(1);
|
84
|
+
const buf = [];
|
85
|
+
|
86
|
+
while (true) {
|
87
|
+
const n = input.readSync(c);
|
88
|
+
if (n === null || n === 0) {
|
89
|
+
break;
|
90
|
+
}
|
91
|
+
if (c[0] === CR || c[0] === LF) {
|
92
|
+
break;
|
93
|
+
}
|
94
|
+
if (c[0] === BS || c[0] === DEL) {
|
95
|
+
buf.pop();
|
96
|
+
} else {
|
97
|
+
buf.push(c[0]!);
|
98
|
+
}
|
99
|
+
if (callback) callback(buf.length);
|
100
|
+
}
|
101
|
+
return decoder.decode(new Uint8Array(buf));
|
102
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
// Ported from unicode_width rust crate, Copyright (c) 2015 The Rust Project Developers. MIT license.
|
4
|
+
|
5
|
+
import data from "./_data.js";
|
6
|
+
import { runLengthDecode } from "./_run_length.js";
|
7
|
+
|
8
|
+
let tables: Uint8Array[] | null = null;
|
9
|
+
function lookupWidth(cp: number) {
|
10
|
+
if (!tables) tables = data.tables.map(runLengthDecode);
|
11
|
+
const t1Offset = tables[0]![(cp >> 13) & 0xff]!;
|
12
|
+
const t2Offset = tables[1]![128 * t1Offset + ((cp >> 6) & 0x7f)]!;
|
13
|
+
const packedWidths = tables[2]![16 * t2Offset + ((cp >> 2) & 0xf)]!;
|
14
|
+
|
15
|
+
const width = (packedWidths >> (2 * (cp & 0b11))) & 0b11;
|
16
|
+
|
17
|
+
return width === 3 ? 1 : width;
|
18
|
+
}
|
19
|
+
|
20
|
+
const cache = new Map<string, number | null>();
|
21
|
+
function charWidth(char: string) {
|
22
|
+
if (cache.has(char)) return cache.get(char)!;
|
23
|
+
|
24
|
+
const codePoint = char.codePointAt(0)!;
|
25
|
+
let width: number | null = null;
|
26
|
+
|
27
|
+
if (codePoint < 0x7f) {
|
28
|
+
width = codePoint >= 0x20 ? 1 : codePoint === 0 ? 0 : null;
|
29
|
+
} else if (codePoint >= 0xa0) {
|
30
|
+
width = lookupWidth(codePoint);
|
31
|
+
} else {
|
32
|
+
width = null;
|
33
|
+
}
|
34
|
+
|
35
|
+
cache.set(char, width);
|
36
|
+
return width;
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Calculate the physical width of a string in a TTY-like environment. This is
|
41
|
+
* useful for cases such as calculating where a line-wrap will occur and
|
42
|
+
* underlining strings.
|
43
|
+
*
|
44
|
+
* The physical width is given by the number of columns required to display
|
45
|
+
* the string. The number of columns a given unicode character occupies can
|
46
|
+
* vary depending on the character itself.
|
47
|
+
*
|
48
|
+
* @param str The string to measure.
|
49
|
+
* @returns The unicode width of the string.
|
50
|
+
*
|
51
|
+
* @example Calculating the unicode width of a string
|
52
|
+
* ```ts
|
53
|
+
* import { unicodeWidth } from "@std/cli/unicode-width";
|
54
|
+
* import { assertEquals } from "@std/assert";
|
55
|
+
*
|
56
|
+
* assertEquals(unicodeWidth("hello world"), 11);
|
57
|
+
* assertEquals(unicodeWidth("天地玄黃宇宙洪荒"), 16);
|
58
|
+
* assertEquals(unicodeWidth("fullwidth"), 18);
|
59
|
+
* ```
|
60
|
+
*
|
61
|
+
* @example Calculating the unicode width of a color-encoded string
|
62
|
+
* ```ts
|
63
|
+
* import { unicodeWidth } from "@std/cli/unicode-width";
|
64
|
+
* import { stripAnsiCode } from "@std/fmt/colors";
|
65
|
+
* import { assertEquals } from "@std/assert";
|
66
|
+
*
|
67
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1b[36mголубой\x1b[39m")), 7);
|
68
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1b[31m紅色\x1b[39m")), 4);
|
69
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1B]8;;https://deno.land\x07🦕\x1B]8;;\x07")), 2);
|
70
|
+
* ```
|
71
|
+
*
|
72
|
+
* Use
|
73
|
+
* {@linkcode https://jsr.io/@std/fmt/doc/colors/~/stripAnsiCode | stripAnsiCode}
|
74
|
+
* to remove ANSI escape codes from a string before passing it to
|
75
|
+
* {@linkcode unicodeWidth}.
|
76
|
+
*/
|
77
|
+
export function unicodeWidth(str: string): number {
|
78
|
+
return [...str].map((ch) => charWidth(ch) ?? 0).reduce((a, b) => a + b, 0);
|
79
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
3
|
+
|
4
|
+
|
5
|
+
import { loadSync } from "./mod.js";
|
6
|
+
|
7
|
+
if (!(dntShim.Deno.readTextFileSync instanceof Function)) {
|
8
|
+
// Avoid errors that occur in deno deploy: https://github.com/denoland/deno_std/issues/1957
|
9
|
+
console.warn(
|
10
|
+
`Deno.readTextFileSync is not a function: No .env data was read.`,
|
11
|
+
);
|
12
|
+
} else {
|
13
|
+
loadSync({ export: true });
|
14
|
+
}
|
@@ -0,0 +1,251 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Parses and loads environment variables from a `.env` file into the current
|
5
|
+
* process, or stringify data into a `.env` file format.
|
6
|
+
*
|
7
|
+
* Note: The key needs to match the pattern /^[a-zA-Z_][a-zA-Z0-9_]*$/.
|
8
|
+
*
|
9
|
+
* ```ts no-eval
|
10
|
+
* // Automatically load environment variables from a `.env` file
|
11
|
+
* import "@std/dotenv/load";
|
12
|
+
* ```
|
13
|
+
*
|
14
|
+
* ```ts
|
15
|
+
* import { parse, stringify } from "@std/dotenv";
|
16
|
+
* import { assertEquals } from "@std/assert";
|
17
|
+
*
|
18
|
+
* assertEquals(parse("GREETING=hello world"), { GREETING: "hello world" });
|
19
|
+
* assertEquals(stringify({ GREETING: "hello world" }), "GREETING='hello world'");
|
20
|
+
* ```
|
21
|
+
*
|
22
|
+
* @module
|
23
|
+
*/
|
24
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
25
|
+
|
26
|
+
|
27
|
+
import { parse } from "./parse.js";
|
28
|
+
|
29
|
+
export * from "./stringify.js";
|
30
|
+
export * from "./parse.js";
|
31
|
+
|
32
|
+
/** Options for {@linkcode load} and {@linkcode loadSync}. */
|
33
|
+
export interface LoadOptions {
|
34
|
+
/**
|
35
|
+
* Optional path to `.env` file. To prevent the default value from being
|
36
|
+
* used, set to `null`.
|
37
|
+
*
|
38
|
+
* @default {"./.env"}
|
39
|
+
*/
|
40
|
+
envPath?: string | null;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Set to `true` to export all `.env` variables to the current processes
|
44
|
+
* environment. Variables are then accessible via `Deno.env.get(<key>)`.
|
45
|
+
*
|
46
|
+
* @default {false}
|
47
|
+
*/
|
48
|
+
export?: boolean;
|
49
|
+
}
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Works identically to {@linkcode load}, but synchronously.
|
53
|
+
*
|
54
|
+
* @example Usage
|
55
|
+
* ```ts no-eval
|
56
|
+
* import { loadSync } from "@std/dotenv";
|
57
|
+
*
|
58
|
+
* const conf = loadSync();
|
59
|
+
* ```
|
60
|
+
*
|
61
|
+
* @param options Options for loading the environment variables.
|
62
|
+
* @returns The parsed environment variables.
|
63
|
+
*/
|
64
|
+
export function loadSync(
|
65
|
+
options: LoadOptions = {},
|
66
|
+
): Record<string, string> {
|
67
|
+
const {
|
68
|
+
envPath = ".env",
|
69
|
+
export: _export = false,
|
70
|
+
} = options;
|
71
|
+
const conf = envPath ? parseFileSync(envPath) : {};
|
72
|
+
|
73
|
+
if (_export) {
|
74
|
+
for (const [key, value] of Object.entries(conf)) {
|
75
|
+
if (dntShim.Deno.env.get(key) !== undefined) continue;
|
76
|
+
dntShim.Deno.env.set(key, value);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
return conf;
|
81
|
+
}
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Load environment variables from a `.env` file. Loaded variables are accessible
|
85
|
+
* in a configuration object returned by the `load()` function, as well as optionally
|
86
|
+
* exporting them to the process environment using the `export` option.
|
87
|
+
*
|
88
|
+
* Inspired by the node modules {@linkcode https://github.com/motdotla/dotenv | dotenv}
|
89
|
+
* and {@linkcode https://github.com/motdotla/dotenv-expand | dotenv-expand}.
|
90
|
+
*
|
91
|
+
* Note: The key needs to match the pattern /^[a-zA-Z_][a-zA-Z0-9_]*$/.
|
92
|
+
*
|
93
|
+
* ## Basic usage
|
94
|
+
* ```sh
|
95
|
+
* # .env
|
96
|
+
* GREETING=hello world
|
97
|
+
* ```
|
98
|
+
*
|
99
|
+
* Then import the environment variables using the `load` function.
|
100
|
+
*
|
101
|
+
* @example Basic usage
|
102
|
+
* ```ts no-eval
|
103
|
+
* // app.ts
|
104
|
+
* import { load } from "@std/dotenv";
|
105
|
+
*
|
106
|
+
* console.log(await load({ export: true })); // { GREETING: "hello world" }
|
107
|
+
* console.log(Deno.env.get("GREETING")); // hello world
|
108
|
+
* ```
|
109
|
+
*
|
110
|
+
* Run this with `deno run --allow-read --allow-env app.ts`.
|
111
|
+
*
|
112
|
+
* .env files support blank lines, comments, multi-line values and more.
|
113
|
+
* See Parsing Rules below for more detail.
|
114
|
+
*
|
115
|
+
* ## Auto loading
|
116
|
+
* Import the `load.ts` module to auto-import from the `.env` file and into
|
117
|
+
* the process environment.
|
118
|
+
*
|
119
|
+
* @example Auto-loading
|
120
|
+
* ```ts no-eval
|
121
|
+
* // app.ts
|
122
|
+
* import "@std/dotenv/load";
|
123
|
+
*
|
124
|
+
* console.log(Deno.env.get("GREETING")); // hello world
|
125
|
+
* ```
|
126
|
+
*
|
127
|
+
* Run this with `deno run --allow-read --allow-env app.ts`.
|
128
|
+
*
|
129
|
+
* ## Files
|
130
|
+
* Dotenv supports a number of different files, all of which are optional.
|
131
|
+
* File names and paths are configurable.
|
132
|
+
*
|
133
|
+
* |File|Purpose|
|
134
|
+
* |----|-------|
|
135
|
+
* |.env|primary file for storing key-value environment entries
|
136
|
+
*
|
137
|
+
* ## Configuration
|
138
|
+
*
|
139
|
+
* Loading environment files comes with a number of options passed into
|
140
|
+
* the `load()` function, all of which are optional.
|
141
|
+
*
|
142
|
+
* |Option|Default|Description
|
143
|
+
* |------|-------|-----------
|
144
|
+
* |envPath|./.env|Path and filename of the `.env` file. Use null to prevent the .env file from being loaded.
|
145
|
+
* |export|false|When true, this will export all environment variables in the `.env` file to the process environment (e.g. for use by `Deno.env.get()`) but only if they are not already set. If a variable is already in the process, the `.env` value is ignored.
|
146
|
+
*
|
147
|
+
* ### Example configuration
|
148
|
+
*
|
149
|
+
* @example Using with options
|
150
|
+
* ```ts no-eval
|
151
|
+
* import { load } from "@std/dotenv";
|
152
|
+
*
|
153
|
+
* const conf = await load({
|
154
|
+
* envPath: "./.env_prod", // Uses .env_prod instead of .env
|
155
|
+
* export: true, // Exports all variables to the environment
|
156
|
+
* });
|
157
|
+
* ```
|
158
|
+
*
|
159
|
+
* ## Permissions
|
160
|
+
*
|
161
|
+
* At a minimum, loading the `.env` related files requires the `--allow-read` permission. Additionally, if
|
162
|
+
* you access the process environment, either through exporting your configuration or expanding variables
|
163
|
+
* in your `.env` file, you will need the `--allow-env` permission. E.g.
|
164
|
+
*
|
165
|
+
* ```sh
|
166
|
+
* deno run --allow-read=.env --allow-env=ENV1,ENV2 app.ts
|
167
|
+
* ```
|
168
|
+
*
|
169
|
+
* ## Parsing Rules
|
170
|
+
*
|
171
|
+
* The parsing engine currently supports the following rules:
|
172
|
+
*
|
173
|
+
* - Variables that already exist in the environment are not overridden with
|
174
|
+
* `export: true`
|
175
|
+
* - `BASIC=basic` becomes `{ BASIC: "basic" }`
|
176
|
+
* - empty lines are skipped
|
177
|
+
* - lines beginning with `#` are treated as comments
|
178
|
+
* - empty values become empty strings (`EMPTY=` becomes `{ EMPTY: "" }`)
|
179
|
+
* - single and double quoted values are escaped (`SINGLE_QUOTE='quoted'` becomes
|
180
|
+
* `{ SINGLE_QUOTE: "quoted" }`)
|
181
|
+
* - new lines are expanded in double quoted values (`MULTILINE="new\nline"`
|
182
|
+
* becomes
|
183
|
+
*
|
184
|
+
* ```
|
185
|
+
* { MULTILINE: "new\nline" }
|
186
|
+
* ```
|
187
|
+
*
|
188
|
+
* - inner quotes are maintained (think JSON) (`JSON={"foo": "bar"}` becomes
|
189
|
+
* `{ JSON: "{\"foo\": \"bar\"}" }`)
|
190
|
+
* - whitespace is removed from both ends of unquoted values (see more on
|
191
|
+
* {@linkcode https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim | trim})
|
192
|
+
* (`FOO= some value` becomes `{ FOO: "some value" }`)
|
193
|
+
* - whitespace is preserved on both ends of quoted values (`FOO=" some value "`
|
194
|
+
* becomes `{ FOO: " some value " }`)
|
195
|
+
* - dollar sign with an environment key in or without curly braces in unquoted
|
196
|
+
* values will expand the environment key (`KEY=$KEY` or `KEY=${KEY}` becomes
|
197
|
+
* `{ KEY: "<KEY_VALUE_FROM_ENV>" }`)
|
198
|
+
* - escaped dollar sign with an environment key in unquoted values will escape the
|
199
|
+
* environment key rather than expand (`KEY=\$KEY` becomes `{ KEY: "\\$KEY" }`)
|
200
|
+
* - colon and a minus sign with a default value(which can also be another expand
|
201
|
+
* value) in expanding construction in unquoted values will first attempt to
|
202
|
+
* expand the environment key. If it’s not found, then it will return the default
|
203
|
+
* value (`KEY=${KEY:-default}` If KEY exists it becomes
|
204
|
+
* `{ KEY: "<KEY_VALUE_FROM_ENV>" }` If not, then it becomes
|
205
|
+
* `{ KEY: "default" }`. Also there is possible to do this case
|
206
|
+
* `KEY=${NO_SUCH_KEY:-${EXISTING_KEY:-default}}` which becomes
|
207
|
+
* `{ KEY: "<EXISTING_KEY_VALUE_FROM_ENV>" }`)
|
208
|
+
*
|
209
|
+
* @param options The options
|
210
|
+
* @returns The parsed environment variables
|
211
|
+
*/
|
212
|
+
export async function load(
|
213
|
+
options: LoadOptions = {},
|
214
|
+
): Promise<Record<string, string>> {
|
215
|
+
const {
|
216
|
+
envPath = ".env",
|
217
|
+
export: _export = false,
|
218
|
+
} = options;
|
219
|
+
const conf = envPath ? await parseFile(envPath) : {};
|
220
|
+
|
221
|
+
if (_export) {
|
222
|
+
for (const [key, value] of Object.entries(conf)) {
|
223
|
+
if (dntShim.Deno.env.get(key) !== undefined) continue;
|
224
|
+
dntShim.Deno.env.set(key, value);
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
return conf;
|
229
|
+
}
|
230
|
+
|
231
|
+
function parseFileSync(
|
232
|
+
filepath: string,
|
233
|
+
): Record<string, string> {
|
234
|
+
try {
|
235
|
+
return parse(dntShim.Deno.readTextFileSync(filepath));
|
236
|
+
} catch (e) {
|
237
|
+
if (e instanceof dntShim.Deno.errors.NotFound) return {};
|
238
|
+
throw e;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
async function parseFile(
|
243
|
+
filepath: string,
|
244
|
+
): Promise<Record<string, string>> {
|
245
|
+
try {
|
246
|
+
return parse(await dntShim.Deno.readTextFile(filepath));
|
247
|
+
} catch (e) {
|
248
|
+
if (e instanceof dntShim.Deno.errors.NotFound) return {};
|
249
|
+
throw e;
|
250
|
+
}
|
251
|
+
}
|
@@ -0,0 +1,113 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
3
|
+
|
4
|
+
|
5
|
+
type LineParseResult = {
|
6
|
+
key: string;
|
7
|
+
unquoted: string;
|
8
|
+
interpolated: string;
|
9
|
+
notInterpolated: string;
|
10
|
+
};
|
11
|
+
|
12
|
+
type CharactersMap = { [key: string]: string };
|
13
|
+
|
14
|
+
const RE_KEY_VALUE =
|
15
|
+
/^\s*(?:export\s+)?(?<key>[^\s=#]+?)\s*=[\ \t]*('\n?(?<notInterpolated>(.|\n)*?)\n?'|"\n?(?<interpolated>(.|\n)*?)\n?"|(?<unquoted>[^\n#]*)) *#*.*$/gm;
|
16
|
+
|
17
|
+
const RE_VALID_KEY = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
18
|
+
|
19
|
+
const RE_EXPAND_VALUE =
|
20
|
+
/(\${(?<inBrackets>.+?)(\:-(?<inBracketsDefault>.+))?}|(?<!\\)\$(?<notInBrackets>\w+)(\:-(?<notInBracketsDefault>.+))?)/g;
|
21
|
+
|
22
|
+
function expandCharacters(str: string): string {
|
23
|
+
const charactersMap: CharactersMap = {
|
24
|
+
"\\n": "\n",
|
25
|
+
"\\r": "\r",
|
26
|
+
"\\t": "\t",
|
27
|
+
};
|
28
|
+
|
29
|
+
return str.replace(
|
30
|
+
/\\([nrt])/g,
|
31
|
+
($1: keyof CharactersMap): string => charactersMap[$1] ?? "",
|
32
|
+
);
|
33
|
+
}
|
34
|
+
|
35
|
+
function expand(str: string, variablesMap: { [key: string]: string }): string {
|
36
|
+
if (RE_EXPAND_VALUE.test(str)) {
|
37
|
+
return expand(
|
38
|
+
str.replace(RE_EXPAND_VALUE, function (...params) {
|
39
|
+
const {
|
40
|
+
inBrackets,
|
41
|
+
inBracketsDefault,
|
42
|
+
notInBrackets,
|
43
|
+
notInBracketsDefault,
|
44
|
+
} = params[params.length - 1];
|
45
|
+
const expandValue = inBrackets || notInBrackets;
|
46
|
+
const defaultValue = inBracketsDefault || notInBracketsDefault;
|
47
|
+
|
48
|
+
let value: string | undefined = variablesMap[expandValue];
|
49
|
+
if (value === undefined) {
|
50
|
+
value = dntShim.Deno.env.get(expandValue);
|
51
|
+
}
|
52
|
+
return value === undefined ? expand(defaultValue, variablesMap) : value;
|
53
|
+
}),
|
54
|
+
variablesMap,
|
55
|
+
);
|
56
|
+
} else {
|
57
|
+
return str;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Parse `.env` file output in an object.
|
63
|
+
*
|
64
|
+
* Note: The key needs to match the pattern /^[a-zA-Z_][a-zA-Z0-9_]*$/.
|
65
|
+
*
|
66
|
+
* @example Usage
|
67
|
+
* ```ts
|
68
|
+
* import { parse } from "@std/dotenv/parse";
|
69
|
+
* import { assertEquals } from "@std/assert";
|
70
|
+
*
|
71
|
+
* const env = parse("GREETING=hello world");
|
72
|
+
* assertEquals(env, { GREETING: "hello world" });
|
73
|
+
* ```
|
74
|
+
*
|
75
|
+
* @param text The text to parse.
|
76
|
+
* @returns The parsed object.
|
77
|
+
*/
|
78
|
+
export function parse(text: string): Record<string, string> {
|
79
|
+
const env: Record<string, string> = {};
|
80
|
+
|
81
|
+
let match;
|
82
|
+
const keysForExpandCheck = [];
|
83
|
+
|
84
|
+
while ((match = RE_KEY_VALUE.exec(text)) !== null) {
|
85
|
+
const { key, interpolated, notInterpolated, unquoted } = match
|
86
|
+
?.groups as LineParseResult;
|
87
|
+
|
88
|
+
if (!RE_VALID_KEY.test(key)) {
|
89
|
+
console.warn(
|
90
|
+
`Ignored the key "${key}" as it is not a valid identifier: The key need to match the pattern /^[a-zA-Z_][a-zA-Z0-9_]*$/.`,
|
91
|
+
);
|
92
|
+
continue;
|
93
|
+
}
|
94
|
+
|
95
|
+
if (unquoted) {
|
96
|
+
keysForExpandCheck.push(key);
|
97
|
+
}
|
98
|
+
|
99
|
+
env[key] = typeof notInterpolated === "string"
|
100
|
+
? notInterpolated
|
101
|
+
: typeof interpolated === "string"
|
102
|
+
? expandCharacters(interpolated)
|
103
|
+
: unquoted.trim();
|
104
|
+
}
|
105
|
+
|
106
|
+
//https://github.com/motdotla/dotenv-expand/blob/ed5fea5bf517a09fd743ce2c63150e88c8a5f6d1/lib/main.js#L23
|
107
|
+
const variablesMap = { ...env };
|
108
|
+
keysForExpandCheck.forEach((key) => {
|
109
|
+
env[key] = expand(env[key]!, variablesMap);
|
110
|
+
});
|
111
|
+
|
112
|
+
return env;
|
113
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Stringify an object into a valid `.env` file format.
|
6
|
+
*
|
7
|
+
* @example Usage
|
8
|
+
* ```ts
|
9
|
+
* import { stringify } from "@std/dotenv/stringify";
|
10
|
+
* import { assertEquals } from "@std/assert";
|
11
|
+
*
|
12
|
+
* const object = { GREETING: "hello world" };
|
13
|
+
* assertEquals(stringify(object), "GREETING='hello world'");
|
14
|
+
* ```
|
15
|
+
*
|
16
|
+
* @param object object to be stringified
|
17
|
+
* @returns string of object
|
18
|
+
*/
|
19
|
+
export function stringify(object: Record<string, string>): string {
|
20
|
+
const lines: string[] = [];
|
21
|
+
for (const [key, value] of Object.entries(object)) {
|
22
|
+
let quote;
|
23
|
+
|
24
|
+
let escapedValue = value ?? "";
|
25
|
+
if (key.startsWith("#")) {
|
26
|
+
console.warn(
|
27
|
+
`key starts with a '#' indicates a comment and is ignored: '${key}'`,
|
28
|
+
);
|
29
|
+
continue;
|
30
|
+
} else if (escapedValue.includes("\n") || escapedValue.includes("'")) {
|
31
|
+
// escape inner new lines
|
32
|
+
escapedValue = escapedValue.replaceAll("\n", "\\n");
|
33
|
+
quote = `"`;
|
34
|
+
} else if (escapedValue.match(/\W/)) {
|
35
|
+
quote = "'";
|
36
|
+
}
|
37
|
+
|
38
|
+
if (quote) {
|
39
|
+
// escape inner quotes
|
40
|
+
escapedValue = escapedValue.replaceAll(quote, `\\${quote}`);
|
41
|
+
escapedValue = `${quote}${escapedValue}${quote}`;
|
42
|
+
}
|
43
|
+
const line = `${key}=${escapedValue}`;
|
44
|
+
lines.push(line);
|
45
|
+
}
|
46
|
+
return lines.join("\n");
|
47
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
3
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
4
|
+
|
5
|
+
|
6
|
+
import { basename } from "../../path/1.0.8/basename.js";
|
7
|
+
import { normalize } from "../../path/1.0.8/normalize.js";
|
8
|
+
import { toPathString } from "./_to_path_string.js";
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Walk entry for {@linkcode walk}, {@linkcode walkSync},
|
12
|
+
* {@linkcode expandGlob} and {@linkcode expandGlobSync}.
|
13
|
+
*/
|
14
|
+
export interface WalkEntry extends dntShim.Deno.DirEntry {
|
15
|
+
/** Full path of the entry. */
|
16
|
+
path: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
/** Create {@linkcode WalkEntry} for the `path` synchronously. */
|
20
|
+
export function createWalkEntrySync(path: string | URL): WalkEntry {
|
21
|
+
path = toPathString(path);
|
22
|
+
path = normalize(path);
|
23
|
+
const name = basename(path);
|
24
|
+
const info = dntShim.Deno.statSync(path);
|
25
|
+
return {
|
26
|
+
path,
|
27
|
+
name,
|
28
|
+
isFile: info.isFile,
|
29
|
+
isDirectory: info.isDirectory,
|
30
|
+
isSymlink: info.isSymlink,
|
31
|
+
};
|
32
|
+
}
|
33
|
+
|
34
|
+
/** Create {@linkcode WalkEntry} for the `path` asynchronously. */
|
35
|
+
export async function createWalkEntry(path: string | URL): Promise<WalkEntry> {
|
36
|
+
path = toPathString(path);
|
37
|
+
path = normalize(path);
|
38
|
+
const name = basename(path);
|
39
|
+
const info = await dntShim.Deno.stat(path);
|
40
|
+
return {
|
41
|
+
path,
|
42
|
+
name,
|
43
|
+
isFile: info.isFile,
|
44
|
+
isDirectory: info.isDirectory,
|
45
|
+
isSymlink: info.isSymlink,
|
46
|
+
};
|
47
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// Copyright the Browserify authors. MIT License.
|
3
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
4
|
+
|
5
|
+
|
6
|
+
export type PathType = "file" | "dir" | "symlink";
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Get a human readable file type string.
|
10
|
+
*
|
11
|
+
* @param file File information, as returned by {@linkcode Deno.stat} or
|
12
|
+
* {@linkcode Deno.lstat}.
|
13
|
+
*
|
14
|
+
* @returns The file type as a string, or `undefined` if the file type is
|
15
|
+
* unknown.
|
16
|
+
*/
|
17
|
+
export function getFileInfoType(fileInfo: dntShim.Deno.FileInfo): PathType | undefined {
|
18
|
+
return fileInfo.isFile
|
19
|
+
? "file"
|
20
|
+
: fileInfo.isDirectory
|
21
|
+
? "dir"
|
22
|
+
: fileInfo.isSymlink
|
23
|
+
? "symlink"
|
24
|
+
: undefined;
|
25
|
+
}
|