structured-outputs 0.1.0-beta.1 → 0.1.0-beta.10
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,306 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
const FLAG_REGEXP = /^(?:-(?:(?<doubleDash>-)(?<negated>no-)?)?)(?<key>.+?)(?:=(?<value>.+?))?$/s;
|
4
|
+
const LETTER_REGEXP = /[A-Za-z]/;
|
5
|
+
const NUMBER_REGEXP = /-?\d+(\.\d*)?(e-?\d+)?$/;
|
6
|
+
const HYPHEN_REGEXP = /^(-|--)[^-]/;
|
7
|
+
const VALUE_REGEXP = /=(?<value>.+)/;
|
8
|
+
const FLAG_NAME_REGEXP = /^--[^=]+$/;
|
9
|
+
const SPECIAL_CHAR_REGEXP = /\W/;
|
10
|
+
const NON_WHITESPACE_REGEXP = /\S/;
|
11
|
+
function isNumber(string) {
|
12
|
+
return NON_WHITESPACE_REGEXP.test(string) && Number.isFinite(Number(string));
|
13
|
+
}
|
14
|
+
function setNested(object, keys, value, collect = false) {
|
15
|
+
keys = [...keys];
|
16
|
+
const key = keys.pop();
|
17
|
+
keys.forEach((key) => object = (object[key] ??= {}));
|
18
|
+
if (collect) {
|
19
|
+
const v = object[key];
|
20
|
+
if (Array.isArray(v)) {
|
21
|
+
v.push(value);
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
value = v ? [v, value] : [value];
|
25
|
+
}
|
26
|
+
object[key] = value;
|
27
|
+
}
|
28
|
+
function hasNested(object, keys) {
|
29
|
+
for (const key of keys) {
|
30
|
+
const value = object[key];
|
31
|
+
if (!Object.hasOwn(object, key))
|
32
|
+
return false;
|
33
|
+
object = value;
|
34
|
+
}
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
function aliasIsBoolean(aliasMap, booleanSet, key) {
|
38
|
+
const set = aliasMap.get(key);
|
39
|
+
if (set === undefined)
|
40
|
+
return false;
|
41
|
+
for (const alias of set)
|
42
|
+
if (booleanSet.has(alias))
|
43
|
+
return true;
|
44
|
+
return false;
|
45
|
+
}
|
46
|
+
function isBooleanString(value) {
|
47
|
+
return value === "true" || value === "false";
|
48
|
+
}
|
49
|
+
function parseBooleanString(value) {
|
50
|
+
return value !== "false";
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* Take a set of command line arguments, optionally with a set of options, and
|
54
|
+
* return an object representing the flags found in the passed arguments.
|
55
|
+
*
|
56
|
+
* By default, any arguments starting with `-` or `--` are considered boolean
|
57
|
+
* flags. If the argument name is followed by an equal sign (`=`) it is
|
58
|
+
* considered a key-value pair. Any arguments which could not be parsed are
|
59
|
+
* available in the `_` property of the returned object.
|
60
|
+
*
|
61
|
+
* By default, this module tries to determine the type of all arguments
|
62
|
+
* automatically and the return type of this function will have an index
|
63
|
+
* signature with `any` as value (`{ [x: string]: any }`).
|
64
|
+
*
|
65
|
+
* If the `string`, `boolean` or `collect` option is set, the return value of
|
66
|
+
* this function will be fully typed and the index signature of the return
|
67
|
+
* type will change to `{ [x: string]: unknown }`.
|
68
|
+
*
|
69
|
+
* Any arguments after `'--'` will not be parsed and will end up in `parsedArgs._`.
|
70
|
+
*
|
71
|
+
* Numeric-looking arguments will be returned as numbers unless `options.string`
|
72
|
+
* or `options.boolean` is set for that argument name.
|
73
|
+
*
|
74
|
+
* @param args An array of command line arguments.
|
75
|
+
* @param options Options for the parse function.
|
76
|
+
*
|
77
|
+
* @typeParam TArgs Type of result.
|
78
|
+
* @typeParam TDoubleDash Used by `TArgs` for the result.
|
79
|
+
* @typeParam TBooleans Used by `TArgs` for the result.
|
80
|
+
* @typeParam TStrings Used by `TArgs` for the result.
|
81
|
+
* @typeParam TCollectable Used by `TArgs` for the result.
|
82
|
+
* @typeParam TNegatable Used by `TArgs` for the result.
|
83
|
+
* @typeParam TDefaults Used by `TArgs` for the result.
|
84
|
+
* @typeParam TAliases Used by `TArgs` for the result.
|
85
|
+
* @typeParam TAliasArgNames Used by `TArgs` for the result.
|
86
|
+
* @typeParam TAliasNames Used by `TArgs` for the result.
|
87
|
+
*
|
88
|
+
* @return The parsed arguments.
|
89
|
+
*
|
90
|
+
* @example Usage
|
91
|
+
* ```ts
|
92
|
+
* import { parseArgs } from "@std/cli/parse-args";
|
93
|
+
* import { assertEquals } from "@std/assert";
|
94
|
+
*
|
95
|
+
* // For proper use, one should use `parseArgs(Deno.args)`
|
96
|
+
* assertEquals(parseArgs(["--foo", "--bar=baz", "./quux.txt"]), {
|
97
|
+
* foo: true,
|
98
|
+
* bar: "baz",
|
99
|
+
* _: ["./quux.txt"],
|
100
|
+
* });
|
101
|
+
* ```
|
102
|
+
*/
|
103
|
+
export function parseArgs(args, options) {
|
104
|
+
const { "--": doubleDash = false, alias = {}, boolean = false, default: defaults = {}, stopEarly = false, string = [], collect = [], negatable = [], unknown: unknownFn = (i) => i, } = options ?? {};
|
105
|
+
const aliasMap = new Map();
|
106
|
+
const booleanSet = new Set();
|
107
|
+
const stringSet = new Set();
|
108
|
+
const collectSet = new Set();
|
109
|
+
const negatableSet = new Set();
|
110
|
+
let allBools = false;
|
111
|
+
if (alias) {
|
112
|
+
for (const [key, value] of Object.entries(alias)) {
|
113
|
+
if (value === undefined) {
|
114
|
+
throw new TypeError("Alias value must be defined");
|
115
|
+
}
|
116
|
+
const aliases = Array.isArray(value) ? value : [value];
|
117
|
+
aliasMap.set(key, new Set(aliases));
|
118
|
+
aliases.forEach((alias) => aliasMap.set(alias, new Set([key, ...aliases.filter((it) => it !== alias)])));
|
119
|
+
}
|
120
|
+
}
|
121
|
+
if (boolean) {
|
122
|
+
if (typeof boolean === "boolean") {
|
123
|
+
allBools = boolean;
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
const booleanArgs = Array.isArray(boolean) ? boolean : [boolean];
|
127
|
+
for (const key of booleanArgs.filter(Boolean)) {
|
128
|
+
booleanSet.add(key);
|
129
|
+
aliasMap.get(key)?.forEach((al) => {
|
130
|
+
booleanSet.add(al);
|
131
|
+
});
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
if (string) {
|
136
|
+
const stringArgs = Array.isArray(string) ? string : [string];
|
137
|
+
for (const key of stringArgs.filter(Boolean)) {
|
138
|
+
stringSet.add(key);
|
139
|
+
aliasMap.get(key)?.forEach((al) => stringSet.add(al));
|
140
|
+
}
|
141
|
+
}
|
142
|
+
if (collect) {
|
143
|
+
const collectArgs = Array.isArray(collect) ? collect : [collect];
|
144
|
+
for (const key of collectArgs.filter(Boolean)) {
|
145
|
+
collectSet.add(key);
|
146
|
+
aliasMap.get(key)?.forEach((al) => collectSet.add(al));
|
147
|
+
}
|
148
|
+
}
|
149
|
+
if (negatable) {
|
150
|
+
const negatableArgs = Array.isArray(negatable) ? negatable : [negatable];
|
151
|
+
for (const key of negatableArgs.filter(Boolean)) {
|
152
|
+
negatableSet.add(key);
|
153
|
+
aliasMap.get(key)?.forEach((alias) => negatableSet.add(alias));
|
154
|
+
}
|
155
|
+
}
|
156
|
+
const argv = { _: [] };
|
157
|
+
function setArgument(key, value, arg, collect) {
|
158
|
+
if (!booleanSet.has(key) &&
|
159
|
+
!stringSet.has(key) &&
|
160
|
+
!aliasMap.has(key) &&
|
161
|
+
!(allBools && FLAG_NAME_REGEXP.test(arg)) &&
|
162
|
+
unknownFn?.(arg, key, value) === false) {
|
163
|
+
return;
|
164
|
+
}
|
165
|
+
if (typeof value === "string" && !stringSet.has(key)) {
|
166
|
+
value = isNumber(value) ? Number(value) : value;
|
167
|
+
}
|
168
|
+
const collectable = collect && collectSet.has(key);
|
169
|
+
setNested(argv, key.split("."), value, collectable);
|
170
|
+
aliasMap.get(key)?.forEach((key) => {
|
171
|
+
setNested(argv, key.split("."), value, collectable);
|
172
|
+
});
|
173
|
+
}
|
174
|
+
let notFlags = [];
|
175
|
+
// all args after "--" are not parsed
|
176
|
+
const index = args.indexOf("--");
|
177
|
+
if (index !== -1) {
|
178
|
+
notFlags = args.slice(index + 1);
|
179
|
+
args = args.slice(0, index);
|
180
|
+
}
|
181
|
+
argsLoop: for (let i = 0; i < args.length; i++) {
|
182
|
+
const arg = args[i];
|
183
|
+
const groups = arg.match(FLAG_REGEXP)?.groups;
|
184
|
+
if (groups) {
|
185
|
+
const { doubleDash, negated } = groups;
|
186
|
+
let key = groups.key;
|
187
|
+
let value = groups.value;
|
188
|
+
if (doubleDash) {
|
189
|
+
if (value) {
|
190
|
+
if (booleanSet.has(key))
|
191
|
+
value = parseBooleanString(value);
|
192
|
+
setArgument(key, value, arg, true);
|
193
|
+
continue;
|
194
|
+
}
|
195
|
+
if (negated) {
|
196
|
+
if (negatableSet.has(key)) {
|
197
|
+
setArgument(key, false, arg, false);
|
198
|
+
continue;
|
199
|
+
}
|
200
|
+
key = `no-${key}`;
|
201
|
+
}
|
202
|
+
const next = args[i + 1];
|
203
|
+
if (next) {
|
204
|
+
if (!booleanSet.has(key) &&
|
205
|
+
!allBools &&
|
206
|
+
!next.startsWith("-") &&
|
207
|
+
(!aliasMap.has(key) || !aliasIsBoolean(aliasMap, booleanSet, key))) {
|
208
|
+
value = next;
|
209
|
+
i++;
|
210
|
+
setArgument(key, value, arg, true);
|
211
|
+
continue;
|
212
|
+
}
|
213
|
+
if (isBooleanString(next)) {
|
214
|
+
value = parseBooleanString(next);
|
215
|
+
i++;
|
216
|
+
setArgument(key, value, arg, true);
|
217
|
+
continue;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
value = stringSet.has(key) ? "" : true;
|
221
|
+
setArgument(key, value, arg, true);
|
222
|
+
continue;
|
223
|
+
}
|
224
|
+
const letters = arg.slice(1, -1).split("");
|
225
|
+
for (const [j, letter] of letters.entries()) {
|
226
|
+
const next = arg.slice(j + 2);
|
227
|
+
if (next === "-") {
|
228
|
+
setArgument(letter, next, arg, true);
|
229
|
+
continue;
|
230
|
+
}
|
231
|
+
if (LETTER_REGEXP.test(letter)) {
|
232
|
+
const groups = VALUE_REGEXP.exec(next)?.groups;
|
233
|
+
if (groups) {
|
234
|
+
setArgument(letter, groups.value, arg, true);
|
235
|
+
continue argsLoop;
|
236
|
+
}
|
237
|
+
if (NUMBER_REGEXP.test(next)) {
|
238
|
+
setArgument(letter, next, arg, true);
|
239
|
+
continue argsLoop;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
if (letters[j + 1]?.match(SPECIAL_CHAR_REGEXP)) {
|
243
|
+
setArgument(letter, arg.slice(j + 2), arg, true);
|
244
|
+
continue argsLoop;
|
245
|
+
}
|
246
|
+
setArgument(letter, stringSet.has(letter) ? "" : true, arg, true);
|
247
|
+
}
|
248
|
+
key = arg.slice(-1);
|
249
|
+
if (key === "-")
|
250
|
+
continue;
|
251
|
+
const nextArg = args[i + 1];
|
252
|
+
if (nextArg) {
|
253
|
+
if (!HYPHEN_REGEXP.test(nextArg) &&
|
254
|
+
!booleanSet.has(key) &&
|
255
|
+
(!aliasMap.has(key) || !aliasIsBoolean(aliasMap, booleanSet, key))) {
|
256
|
+
setArgument(key, nextArg, arg, true);
|
257
|
+
i++;
|
258
|
+
continue;
|
259
|
+
}
|
260
|
+
if (isBooleanString(nextArg)) {
|
261
|
+
const value = parseBooleanString(nextArg);
|
262
|
+
setArgument(key, value, arg, true);
|
263
|
+
i++;
|
264
|
+
continue;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
setArgument(key, stringSet.has(key) ? "" : true, arg, true);
|
268
|
+
continue;
|
269
|
+
}
|
270
|
+
if (unknownFn?.(arg) !== false) {
|
271
|
+
argv._.push(stringSet.has("_") || !isNumber(arg) ? arg : Number(arg));
|
272
|
+
}
|
273
|
+
if (stopEarly) {
|
274
|
+
argv._.push(...args.slice(i + 1));
|
275
|
+
break;
|
276
|
+
}
|
277
|
+
}
|
278
|
+
for (const [key, value] of Object.entries(defaults)) {
|
279
|
+
const keys = key.split(".");
|
280
|
+
if (!hasNested(argv, keys)) {
|
281
|
+
setNested(argv, keys, value);
|
282
|
+
aliasMap.get(key)?.forEach((key) => setNested(argv, key.split("."), value));
|
283
|
+
}
|
284
|
+
}
|
285
|
+
for (const key of booleanSet.keys()) {
|
286
|
+
const keys = key.split(".");
|
287
|
+
if (!hasNested(argv, keys)) {
|
288
|
+
const value = collectSet.has(key) ? [] : false;
|
289
|
+
setNested(argv, keys, value);
|
290
|
+
}
|
291
|
+
}
|
292
|
+
for (const key of stringSet.keys()) {
|
293
|
+
const keys = key.split(".");
|
294
|
+
if (!hasNested(argv, keys) && collectSet.has(key)) {
|
295
|
+
setNested(argv, keys, []);
|
296
|
+
}
|
297
|
+
}
|
298
|
+
if (doubleDash) {
|
299
|
+
argv["--"] = notFlags;
|
300
|
+
}
|
301
|
+
else {
|
302
|
+
argv._.push(...notFlags);
|
303
|
+
}
|
304
|
+
return argv;
|
305
|
+
}
|
306
|
+
//# sourceMappingURL=parse_args.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parse_args.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/parse_args.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AA2WrC,MAAM,WAAW,GACf,6EAA6E,CAAC;AAChF,MAAM,aAAa,GAAG,UAAU,CAAC;AACjC,MA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AG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAClD,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,IAAgC,CAAC;AAC1C,CAAC"}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
3
|
+
const input = dntShim.Deno.stdin;
|
4
|
+
const output = dntShim.Deno.stdout;
|
5
|
+
const encoder = new TextEncoder();
|
6
|
+
const decoder = new TextDecoder();
|
7
|
+
const LF = "\n".charCodeAt(0); // ^J - Enter on Linux
|
8
|
+
const CR = "\r".charCodeAt(0); // ^M - Enter on macOS and Windows (CRLF)
|
9
|
+
const BS = "\b".charCodeAt(0); // ^H - Backspace on Linux and Windows
|
10
|
+
const DEL = 0x7f; // ^? - Backspace on macOS
|
11
|
+
const CLR = encoder.encode("\r\u001b[K"); // Clear the current line
|
12
|
+
// The `cbreak` option is not supported on Windows
|
13
|
+
const setRawOptions = dntShim.Deno.build.os === "windows"
|
14
|
+
? undefined
|
15
|
+
: { cbreak: true };
|
16
|
+
/**
|
17
|
+
* Shows the given message and waits for the user's input. Returns the user's input as string.
|
18
|
+
* This is similar to `prompt()` but it print user's input as `*` to prevent password from being shown.
|
19
|
+
* Use an empty `mask` if you don't want to show any character.
|
20
|
+
*
|
21
|
+
* @param message The prompt message to show to the user.
|
22
|
+
* @param options The options for the prompt.
|
23
|
+
* @returns The string that was entered or `null` if stdin is not a TTY.
|
24
|
+
*
|
25
|
+
* @example Usage
|
26
|
+
* ```ts no-eval
|
27
|
+
* import { promptSecret } from "@std/cli/prompt-secret";
|
28
|
+
*
|
29
|
+
* const password = promptSecret("Please provide the password:");
|
30
|
+
* if (password !== "some-password") {
|
31
|
+
* throw new Error("Access denied");
|
32
|
+
* }
|
33
|
+
* ```
|
34
|
+
*/
|
35
|
+
export function promptSecret(message = "Secret", options) {
|
36
|
+
const { mask = "*", clear } = options ?? {};
|
37
|
+
if (!input.isTerminal()) {
|
38
|
+
return null;
|
39
|
+
}
|
40
|
+
// Make the output consistent with the built-in prompt()
|
41
|
+
message += " ";
|
42
|
+
const callback = !mask ? undefined : (n) => {
|
43
|
+
output.writeSync(CLR);
|
44
|
+
output.writeSync(encoder.encode(`${message}${mask.repeat(n)}`));
|
45
|
+
};
|
46
|
+
output.writeSync(encoder.encode(message));
|
47
|
+
dntShim.Deno.stdin.setRaw(true, setRawOptions);
|
48
|
+
try {
|
49
|
+
return readLineFromStdinSync(callback);
|
50
|
+
}
|
51
|
+
finally {
|
52
|
+
if (clear) {
|
53
|
+
output.writeSync(CLR);
|
54
|
+
}
|
55
|
+
else {
|
56
|
+
output.writeSync(encoder.encode("\n"));
|
57
|
+
}
|
58
|
+
dntShim.Deno.stdin.setRaw(false);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
// Slightly modified from Deno's runtime/js/41_prompt.js
|
62
|
+
// This implementation immediately break on CR or LF and accept callback.
|
63
|
+
// The original version waits LF when CR is received.
|
64
|
+
// https://github.com/denoland/deno/blob/e4593873a9c791238685dfbb45e64b4485884174/runtime/js/41_prompt.js#L52-L77
|
65
|
+
function readLineFromStdinSync(callback) {
|
66
|
+
const c = new Uint8Array(1);
|
67
|
+
const buf = [];
|
68
|
+
while (true) {
|
69
|
+
const n = input.readSync(c);
|
70
|
+
if (n === null || n === 0) {
|
71
|
+
break;
|
72
|
+
}
|
73
|
+
if (c[0] === CR || c[0] === LF) {
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
if (c[0] === BS || c[0] === DEL) {
|
77
|
+
buf.pop();
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
buf.push(c[0]);
|
81
|
+
}
|
82
|
+
if (callback)
|
83
|
+
callback(buf.length);
|
84
|
+
}
|
85
|
+
return decoder.decode(new Uint8Array(buf));
|
86
|
+
}
|
87
|
+
//# sourceMappingURL=prompt_secret.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"prompt_secret.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/prompt_secret.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAGxD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACjC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AACnC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB;AACrD,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,yCAAyC;AACxE,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC;AACrE,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,0BAA0B;AAC5C,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,yBAAyB;AAEnE,kDAAkD;AAClD,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,SAAS;IACvD,CAAC,CAAC,SAAS;IACX,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,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BAAqB,CAAC,QAA8B;IAC3D,MAAM,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,GAAG,GAAG,EAAE,CAAC;IAEf,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM;QACR,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;YAC/B,MAAM;QACR,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YAChC,GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;QAClB,CAAC;QACD,IAAI,QAAQ;YAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
@@ -0,0 +1,75 @@
|
|
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
|
+
import data from "./_data.js";
|
5
|
+
import { runLengthDecode } from "./_run_length.js";
|
6
|
+
let tables = null;
|
7
|
+
function lookupWidth(cp) {
|
8
|
+
if (!tables)
|
9
|
+
tables = data.tables.map(runLengthDecode);
|
10
|
+
const t1Offset = tables[0][(cp >> 13) & 0xff];
|
11
|
+
const t2Offset = tables[1][128 * t1Offset + ((cp >> 6) & 0x7f)];
|
12
|
+
const packedWidths = tables[2][16 * t2Offset + ((cp >> 2) & 0xf)];
|
13
|
+
const width = (packedWidths >> (2 * (cp & 0b11))) & 0b11;
|
14
|
+
return width === 3 ? 1 : width;
|
15
|
+
}
|
16
|
+
const cache = new Map();
|
17
|
+
function charWidth(char) {
|
18
|
+
if (cache.has(char))
|
19
|
+
return cache.get(char);
|
20
|
+
const codePoint = char.codePointAt(0);
|
21
|
+
let width = null;
|
22
|
+
if (codePoint < 0x7f) {
|
23
|
+
width = codePoint >= 0x20 ? 1 : codePoint === 0 ? 0 : null;
|
24
|
+
}
|
25
|
+
else if (codePoint >= 0xa0) {
|
26
|
+
width = lookupWidth(codePoint);
|
27
|
+
}
|
28
|
+
else {
|
29
|
+
width = null;
|
30
|
+
}
|
31
|
+
cache.set(char, width);
|
32
|
+
return width;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Calculate the physical width of a string in a TTY-like environment. This is
|
36
|
+
* useful for cases such as calculating where a line-wrap will occur and
|
37
|
+
* underlining strings.
|
38
|
+
*
|
39
|
+
* The physical width is given by the number of columns required to display
|
40
|
+
* the string. The number of columns a given unicode character occupies can
|
41
|
+
* vary depending on the character itself.
|
42
|
+
*
|
43
|
+
* @param str The string to measure.
|
44
|
+
* @returns The unicode width of the string.
|
45
|
+
*
|
46
|
+
* @example Calculating the unicode width of a string
|
47
|
+
* ```ts
|
48
|
+
* import { unicodeWidth } from "@std/cli/unicode-width";
|
49
|
+
* import { assertEquals } from "@std/assert";
|
50
|
+
*
|
51
|
+
* assertEquals(unicodeWidth("hello world"), 11);
|
52
|
+
* assertEquals(unicodeWidth("天地玄黃宇宙洪荒"), 16);
|
53
|
+
* assertEquals(unicodeWidth("fullwidth"), 18);
|
54
|
+
* ```
|
55
|
+
*
|
56
|
+
* @example Calculating the unicode width of a color-encoded string
|
57
|
+
* ```ts
|
58
|
+
* import { unicodeWidth } from "@std/cli/unicode-width";
|
59
|
+
* import { stripAnsiCode } from "@std/fmt/colors";
|
60
|
+
* import { assertEquals } from "@std/assert";
|
61
|
+
*
|
62
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1b[36mголубой\x1b[39m")), 7);
|
63
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1b[31m紅色\x1b[39m")), 4);
|
64
|
+
* assertEquals(unicodeWidth(stripAnsiCode("\x1B]8;;https://deno.land\x07🦕\x1B]8;;\x07")), 2);
|
65
|
+
* ```
|
66
|
+
*
|
67
|
+
* Use
|
68
|
+
* {@linkcode https://jsr.io/@std/fmt/doc/colors/~/stripAnsiCode | stripAnsiCode}
|
69
|
+
* to remove ANSI escape codes from a string before passing it to
|
70
|
+
* {@linkcode unicodeWidth}.
|
71
|
+
*/
|
72
|
+
export function unicodeWidth(str) {
|
73
|
+
return [...str].map((ch) => charWidth(ch) ?? 0).reduce((a, b) => a + b, 0);
|
74
|
+
}
|
75
|
+
//# sourceMappingURL=unicode_width.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"unicode_width.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/cli/1.0.6/unicode_width.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AACrC,qGAAqG;AAErG,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,IAAI,MAAM,GAAwB,IAAI,CAAC;AACvC,SAAS,WAAW,CAAC,EAAU;IAC7B,IAAI,CAAC,MAAM;QAAE,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAE,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,GAAG,GAAG,QAAQ,GAAG,CAAC,CAAC,EAAE,IAA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AAC,GAAW;IACtC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
3
|
+
import { loadSync } from "./mod.js";
|
4
|
+
if (!(dntShim.Deno.readTextFileSync instanceof Function)) {
|
5
|
+
// Avoid errors that occur in deno deploy: https://github.com/denoland/deno_std/issues/1957
|
6
|
+
console.warn(`Deno.readTextFileSync is not a function: No .env data was read.`);
|
7
|
+
}
|
8
|
+
else {
|
9
|
+
loadSync({ export: true });
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=load.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/dotenv/0.225.2/load.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,YAAY,QAAQ,CAAC,EAAE,CAAC;IACzD,2FAA2F;IAC3F,OAAO,CAAC,IAAI,CACV,iEAAiE,CAClE,CAAC;AACJ,CAAC;KAAM,CAAC;IACN,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7B,CAAC"}
|