@bolt-foundry/gambit 0.8.3 → 0.8.5-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -2
- package/README.md +79 -16
- package/esm/_dnt.polyfills.d.ts +17 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +122 -0
- package/esm/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts +322 -0
- package/esm/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.1.5/deep_merge.js +105 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts +14 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.js +34 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts +13 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.js +18 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts +10 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_is_same_path.js +17 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts +12 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_is_subdir.js +25 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts +9 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/_to_path_string.js +13 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/copy.d.ts +117 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/copy.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/copy.js +313 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts +48 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/empty_dir.js +87 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts +49 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_dir.js +102 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts +47 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_file.js +90 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts +49 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_link.js +61 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts +70 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.js +156 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/eol.d.ts +52 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/eol.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/eol.js +67 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/exists.d.ts +218 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/exists.js +271 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts +267 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/expand_glob.js +442 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/mod.d.ts +29 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/mod.js +29 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/move.d.ts +86 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/move.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/move.js +142 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/walk.d.ts +777 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/walk.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/1.0.22/walk.js +846 -0
- package/esm/deps/jsr.io/@std/json/1.0.2/types.d.ts +5 -0
- package/esm/deps/jsr.io/@std/json/1.0.2/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/json/1.0.2/types.js +3 -0
- package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts +20 -0
- package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.js +21 -0
- package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts +21 -0
- package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.js +320 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +753 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/mod.d.ts +109 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/mod.js +110 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/parse.js +25 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts +35 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.js +283 -0
- package/esm/gambit/simulator-ui/dist/bundle.js +10639 -4629
- package/esm/gambit/simulator-ui/dist/bundle.js.map +4 -4
- package/esm/mod.d.ts +13 -3
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +8 -2
- package/esm/src/cli_utils.d.ts +1 -0
- package/esm/src/cli_utils.d.ts.map +1 -1
- package/esm/src/cli_utils.js +13 -1
- package/esm/src/default_runtime.d.ts +46 -0
- package/esm/src/default_runtime.d.ts.map +1 -0
- package/esm/src/default_runtime.js +415 -0
- package/esm/src/durable_streams.js +26 -1
- package/esm/src/model_matchers.d.ts +10 -0
- package/esm/src/model_matchers.d.ts.map +1 -0
- package/esm/src/model_matchers.js +26 -0
- package/esm/src/openai_compat.d.ts +12 -1
- package/esm/src/openai_compat.d.ts.map +1 -1
- package/esm/src/openai_compat.js +53 -1
- package/esm/src/project_config.d.ts +47 -0
- package/esm/src/project_config.d.ts.map +1 -0
- package/esm/src/project_config.js +134 -0
- package/esm/src/providers/codex.d.ts +37 -0
- package/esm/src/providers/codex.d.ts.map +1 -0
- package/esm/src/providers/codex.js +810 -0
- package/esm/src/providers/google.d.ts +3 -1
- package/esm/src/providers/google.d.ts.map +1 -1
- package/esm/src/providers/google.js +82 -6
- package/esm/src/providers/ollama.d.ts +3 -1
- package/esm/src/providers/ollama.d.ts.map +1 -1
- package/esm/src/providers/ollama.js +238 -15
- package/esm/src/providers/openrouter.d.ts +6 -2
- package/esm/src/providers/openrouter.d.ts.map +1 -1
- package/esm/src/providers/openrouter.js +260 -23
- package/esm/src/providers/router.d.ts +19 -0
- package/esm/src/providers/router.d.ts.map +1 -0
- package/esm/src/providers/router.js +93 -0
- package/esm/src/server.d.ts +9 -0
- package/esm/src/server.d.ts.map +1 -1
- package/esm/src/server.js +3186 -652
- package/esm/src/server_feedback_grading_routes.d.ts +32 -0
- package/esm/src/server_feedback_grading_routes.d.ts.map +1 -0
- package/esm/src/server_feedback_grading_routes.js +305 -0
- package/esm/src/server_helpers.d.ts +4 -0
- package/esm/src/server_helpers.d.ts.map +1 -0
- package/esm/src/server_helpers.js +46 -0
- package/esm/src/server_session_store.d.ts +87 -0
- package/esm/src/server_session_store.d.ts.map +1 -0
- package/esm/src/server_session_store.js +873 -0
- package/esm/src/server_types.d.ts +110 -0
- package/esm/src/server_types.d.ts.map +1 -0
- package/esm/src/server_types.js +1 -0
- package/esm/src/server_ui_routes.d.ts +33 -0
- package/esm/src/server_ui_routes.d.ts.map +1 -0
- package/esm/src/server_ui_routes.js +135 -0
- package/esm/src/session_artifacts.d.ts +22 -0
- package/esm/src/session_artifacts.d.ts.map +1 -0
- package/esm/src/session_artifacts.js +243 -0
- package/esm/src/trace.d.ts.map +1 -1
- package/esm/src/trace.js +6 -3
- package/esm/src/workspace.d.ts +19 -0
- package/esm/src/workspace.d.ts.map +1 -0
- package/esm/src/workspace.js +164 -0
- package/esm/src/workspace_contract.d.ts +76 -0
- package/esm/src/workspace_contract.d.ts.map +1 -0
- package/esm/src/workspace_contract.js +74 -0
- package/package.json +2 -2
- package/script/_dnt.polyfills.d.ts +17 -0
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +122 -0
- package/script/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts +322 -0
- package/script/deps/jsr.io/@std/collections/1.1.5/deep_merge.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/collections/1.1.5/deep_merge.js +108 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts +14 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.js +71 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts +13 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.js +21 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts +10 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_is_same_path.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_is_same_path.js +20 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts +12 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_is_subdir.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_is_subdir.js +28 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts +9 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_to_path_string.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/_to_path_string.js +16 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/copy.d.ts +117 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/copy.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/copy.js +350 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts +48 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/empty_dir.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/empty_dir.js +124 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts +49 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_dir.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_dir.js +139 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts +47 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_file.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_file.js +127 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts +49 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_link.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_link.js +98 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts +70 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/ensure_symlink.js +193 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/eol.d.ts +52 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/eol.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/eol.js +105 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/exists.d.ts +218 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/exists.js +308 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts +267 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/expand_glob.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/expand_glob.js +479 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/mod.d.ts +29 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/mod.js +45 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/move.d.ts +86 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/move.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/move.js +179 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/walk.d.ts +777 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/walk.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/1.0.22/walk.js +883 -0
- package/script/deps/jsr.io/@std/json/1.0.2/types.d.ts +5 -0
- package/script/deps/jsr.io/@std/json/1.0.2/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/json/1.0.2/types.js +4 -0
- package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts +20 -0
- package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.js +37 -0
- package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts +21 -0
- package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.js +323 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +781 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/mod.d.ts +109 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/mod.js +126 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/parse.js +28 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts +35 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/toml/1.0.11/stringify.js +286 -0
- package/script/gambit/simulator-ui/dist/bundle.js +10639 -4629
- package/script/gambit/simulator-ui/dist/bundle.js.map +4 -4
- package/script/mod.d.ts +13 -3
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +14 -5
- package/script/src/cli_utils.d.ts +1 -0
- package/script/src/cli_utils.d.ts.map +1 -1
- package/script/src/cli_utils.js +14 -1
- package/script/src/default_runtime.d.ts +46 -0
- package/script/src/default_runtime.d.ts.map +1 -0
- package/script/src/default_runtime.js +452 -0
- package/script/src/durable_streams.js +26 -1
- package/script/src/model_matchers.d.ts +10 -0
- package/script/src/model_matchers.d.ts.map +1 -0
- package/script/src/model_matchers.js +29 -0
- package/script/src/openai_compat.d.ts +12 -1
- package/script/src/openai_compat.d.ts.map +1 -1
- package/script/src/openai_compat.js +85 -0
- package/script/src/project_config.d.ts +47 -0
- package/script/src/project_config.d.ts.map +1 -0
- package/script/src/project_config.js +173 -0
- package/script/src/providers/codex.d.ts +37 -0
- package/script/src/providers/codex.d.ts.map +1 -0
- package/script/src/providers/codex.js +850 -0
- package/script/src/providers/google.d.ts +3 -1
- package/script/src/providers/google.d.ts.map +1 -1
- package/script/src/providers/google.js +82 -6
- package/script/src/providers/ollama.d.ts +3 -1
- package/script/src/providers/ollama.d.ts.map +1 -1
- package/script/src/providers/ollama.js +238 -15
- package/script/src/providers/openrouter.d.ts +6 -2
- package/script/src/providers/openrouter.d.ts.map +1 -1
- package/script/src/providers/openrouter.js +260 -23
- package/script/src/providers/router.d.ts +19 -0
- package/script/src/providers/router.d.ts.map +1 -0
- package/script/src/providers/router.js +96 -0
- package/script/src/server.d.ts +9 -0
- package/script/src/server.d.ts.map +1 -1
- package/script/src/server.js +3193 -659
- package/script/src/server_feedback_grading_routes.d.ts +32 -0
- package/script/src/server_feedback_grading_routes.d.ts.map +1 -0
- package/script/src/server_feedback_grading_routes.js +343 -0
- package/script/src/server_helpers.d.ts +4 -0
- package/script/src/server_helpers.d.ts.map +1 -0
- package/script/src/server_helpers.js +84 -0
- package/script/src/server_session_store.d.ts +87 -0
- package/script/src/server_session_store.d.ts.map +1 -0
- package/script/src/server_session_store.js +910 -0
- package/script/src/server_types.d.ts +110 -0
- package/script/src/server_types.d.ts.map +1 -0
- package/script/src/server_types.js +2 -0
- package/script/src/server_ui_routes.d.ts +33 -0
- package/script/src/server_ui_routes.d.ts.map +1 -0
- package/script/src/server_ui_routes.js +172 -0
- package/script/src/session_artifacts.d.ts +22 -0
- package/script/src/session_artifacts.d.ts.map +1 -0
- package/script/src/session_artifacts.js +279 -0
- package/script/src/trace.d.ts.map +1 -1
- package/script/src/trace.js +6 -3
- package/script/src/workspace.d.ts +19 -0
- package/script/src/workspace.d.ts.map +1 -0
- package/script/src/workspace.js +201 -0
- package/script/src/workspace_contract.d.ts +76 -0
- package/script/src/workspace_contract.d.ts.map +1 -0
- package/script/src/workspace_contract.js +82 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merges the two given records, recursively merging any nested records with the
|
|
3
|
+
* second collection overriding the first in case of conflict.
|
|
4
|
+
*
|
|
5
|
+
* For arrays, maps and sets, a merging strategy can be specified to either
|
|
6
|
+
* `replace` values, or `merge` them instead.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam T Type of the first record
|
|
9
|
+
*
|
|
10
|
+
* @param record First record to merge.
|
|
11
|
+
* @param other Second record to merge.
|
|
12
|
+
* @param options Merging options.
|
|
13
|
+
*
|
|
14
|
+
* @returns A new record with the merged values.
|
|
15
|
+
*
|
|
16
|
+
* @example Merge objects
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
19
|
+
* import { assertEquals } from "@std/assert";
|
|
20
|
+
*
|
|
21
|
+
* const a = { foo: true };
|
|
22
|
+
* const b = { foo: { bar: true } };
|
|
23
|
+
*
|
|
24
|
+
* const result = deepMerge(a, b);
|
|
25
|
+
*
|
|
26
|
+
* const expected = { foo: { bar: true } };
|
|
27
|
+
*
|
|
28
|
+
* assertEquals(result, expected);
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example Merge arrays
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
34
|
+
* import { assertEquals } from "@std/assert";
|
|
35
|
+
*
|
|
36
|
+
* const a = { foo: [1, 2] };
|
|
37
|
+
* const b = { foo: [3, 4] };
|
|
38
|
+
*
|
|
39
|
+
* const result = deepMerge(a, b);
|
|
40
|
+
*
|
|
41
|
+
* const expected = { foo: [1, 2, 3, 4] };
|
|
42
|
+
*
|
|
43
|
+
* assertEquals(result, expected);
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example Merge maps
|
|
47
|
+
* ```ts
|
|
48
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
49
|
+
* import { assertEquals } from "@std/assert";
|
|
50
|
+
*
|
|
51
|
+
* const a = { foo: new Map([["a", 1]]) };
|
|
52
|
+
* const b = { foo: new Map([["b", 2]]) };
|
|
53
|
+
*
|
|
54
|
+
* const result = deepMerge(a, b);
|
|
55
|
+
*
|
|
56
|
+
* const expected = { foo: new Map([["a", 1], ["b", 2]]) };
|
|
57
|
+
*
|
|
58
|
+
* assertEquals(result, expected);
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example Merge sets
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
64
|
+
* import { assertEquals } from "@std/assert";
|
|
65
|
+
*
|
|
66
|
+
* const a = { foo: new Set([1]) };
|
|
67
|
+
* const b = { foo: new Set([2]) };
|
|
68
|
+
*
|
|
69
|
+
* const result = deepMerge(a, b);
|
|
70
|
+
*
|
|
71
|
+
* const expected = { foo: new Set([1, 2]) };
|
|
72
|
+
*
|
|
73
|
+
* assertEquals(result, expected);
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example Merge with custom options
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
79
|
+
* import { assertEquals } from "@std/assert";
|
|
80
|
+
*
|
|
81
|
+
* const a = { foo: [1, 2] };
|
|
82
|
+
* const b = { foo: [3, 4] };
|
|
83
|
+
*
|
|
84
|
+
* const result = deepMerge(a, b, { arrays: "replace" });
|
|
85
|
+
*
|
|
86
|
+
* const expected = { foo: [3, 4] };
|
|
87
|
+
*
|
|
88
|
+
* assertEquals(result, expected);
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare function deepMerge<T extends Record<PropertyKey, unknown>>(record: Partial<Readonly<T>>, other: Partial<Readonly<T>>, options?: Readonly<DeepMergeOptions>): T;
|
|
92
|
+
/**
|
|
93
|
+
* Merges the two given records, recursively merging any nested records with the
|
|
94
|
+
* second collection overriding the first in case of conflict.
|
|
95
|
+
*
|
|
96
|
+
* For arrays, maps and sets, a merging strategy can be specified to either
|
|
97
|
+
* `replace` values, or `merge` them instead.
|
|
98
|
+
*
|
|
99
|
+
* @typeParam T Type of the first record
|
|
100
|
+
* @typeParam U Type of the second record
|
|
101
|
+
* @typeParam Options Merging options
|
|
102
|
+
*
|
|
103
|
+
* @param record First record to merge.
|
|
104
|
+
* @param other Second record to merge.
|
|
105
|
+
* @param options Merging options.
|
|
106
|
+
*
|
|
107
|
+
* @returns A new record with the merged values.
|
|
108
|
+
*
|
|
109
|
+
* @example Merge objects
|
|
110
|
+
* ```ts
|
|
111
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
112
|
+
* import { assertEquals } from "@std/assert";
|
|
113
|
+
*
|
|
114
|
+
* const a = { foo: true };
|
|
115
|
+
* const b = { foo: { bar: true } };
|
|
116
|
+
*
|
|
117
|
+
* const result = deepMerge(a, b);
|
|
118
|
+
*
|
|
119
|
+
* const expected = { foo: { bar: true } };
|
|
120
|
+
*
|
|
121
|
+
* assertEquals(result, expected);
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* @example Merge arrays
|
|
125
|
+
* ```ts
|
|
126
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
127
|
+
* import { assertEquals } from "@std/assert";
|
|
128
|
+
*
|
|
129
|
+
* const a = { foo: [1, 2] };
|
|
130
|
+
* const b = { foo: [3, 4] };
|
|
131
|
+
*
|
|
132
|
+
* const result = deepMerge(a, b);
|
|
133
|
+
*
|
|
134
|
+
* const expected = { foo: [1, 2, 3, 4] };
|
|
135
|
+
*
|
|
136
|
+
* assertEquals(result, expected);
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @example Merge maps
|
|
140
|
+
* ```ts
|
|
141
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
142
|
+
* import { assertEquals } from "@std/assert";
|
|
143
|
+
*
|
|
144
|
+
* const a = { foo: new Map([["a", 1]]) };
|
|
145
|
+
* const b = { foo: new Map([["b", 2]]) };
|
|
146
|
+
*
|
|
147
|
+
* const result = deepMerge(a, b);
|
|
148
|
+
*
|
|
149
|
+
* const expected = { foo: new Map([["a", 1], ["b", 2]]) };
|
|
150
|
+
*
|
|
151
|
+
* assertEquals(result, expected);
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @example Merge sets
|
|
155
|
+
* ```ts
|
|
156
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
157
|
+
* import { assertEquals } from "@std/assert";
|
|
158
|
+
*
|
|
159
|
+
* const a = { foo: new Set([1]) };
|
|
160
|
+
* const b = { foo: new Set([2]) };
|
|
161
|
+
*
|
|
162
|
+
* const result = deepMerge(a, b);
|
|
163
|
+
*
|
|
164
|
+
* const expected = { foo: new Set([1, 2]) };
|
|
165
|
+
*
|
|
166
|
+
* assertEquals(result, expected);
|
|
167
|
+
* ```
|
|
168
|
+
*
|
|
169
|
+
* @example Merge with custom options
|
|
170
|
+
* ```ts
|
|
171
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
|
172
|
+
* import { assertEquals } from "@std/assert";
|
|
173
|
+
*
|
|
174
|
+
* const a = { foo: [1, 2] };
|
|
175
|
+
* const b = { foo: [3, 4] };
|
|
176
|
+
*
|
|
177
|
+
* const result = deepMerge(a, b, { arrays: "replace" });
|
|
178
|
+
*
|
|
179
|
+
* const expected = { foo: [3, 4] };
|
|
180
|
+
*
|
|
181
|
+
* assertEquals(result, expected);
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
export declare function deepMerge<T extends Record<PropertyKey, unknown>, U extends Record<PropertyKey, unknown>, Options extends DeepMergeOptions>(record: Readonly<T>, other: Readonly<U>, options?: Readonly<Options>): DeepMerge<T, U, Options>;
|
|
185
|
+
/** Merging strategy */
|
|
186
|
+
export type MergingStrategy = "replace" | "merge";
|
|
187
|
+
/** Options for {@linkcode deepMerge}. */
|
|
188
|
+
export type DeepMergeOptions = {
|
|
189
|
+
/**
|
|
190
|
+
* Merging strategy for arrays
|
|
191
|
+
*
|
|
192
|
+
* @default {"merge"}
|
|
193
|
+
*/
|
|
194
|
+
arrays?: MergingStrategy;
|
|
195
|
+
/**
|
|
196
|
+
* Merging strategy for maps.
|
|
197
|
+
*
|
|
198
|
+
* @default {"merge"}
|
|
199
|
+
*/
|
|
200
|
+
maps?: MergingStrategy;
|
|
201
|
+
/**
|
|
202
|
+
* Merging strategy for sets.
|
|
203
|
+
*
|
|
204
|
+
* @default {"merge"}
|
|
205
|
+
*/
|
|
206
|
+
sets?: MergingStrategy;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* How does recursive typing works ?
|
|
210
|
+
*
|
|
211
|
+
* Deep merging process is handled through `DeepMerge<T, U, Options>` type.
|
|
212
|
+
* If both T and U are Records, we recursively merge them,
|
|
213
|
+
* else we treat them as primitives.
|
|
214
|
+
*
|
|
215
|
+
* Merging process is handled through `Merge<T, U>` type, in which
|
|
216
|
+
* we remove all maps, sets, arrays and records so we can handle them
|
|
217
|
+
* separately depending on merging strategy:
|
|
218
|
+
*
|
|
219
|
+
* Merge<
|
|
220
|
+
* {foo: string},
|
|
221
|
+
* {bar: string, baz: Set<unknown>},
|
|
222
|
+
* > // "foo" and "bar" will be handled with `MergeRightOmitComplexes`
|
|
223
|
+
* // "baz" will be handled with `MergeAll*` type
|
|
224
|
+
*
|
|
225
|
+
* `MergeRightOmitComplexes<T, U>` will do the above: all T's
|
|
226
|
+
* exclusive keys will be kept, though common ones with U will have their
|
|
227
|
+
* typing overridden instead:
|
|
228
|
+
*
|
|
229
|
+
* MergeRightOmitComplexes<
|
|
230
|
+
* {foo: string, baz: number},
|
|
231
|
+
* {foo: boolean, bar: string}
|
|
232
|
+
* > // {baz: number, foo: boolean, bar: string}
|
|
233
|
+
* // "baz" was kept from T
|
|
234
|
+
* // "foo" was overridden by U's typing
|
|
235
|
+
* // "bar" was added from U
|
|
236
|
+
*
|
|
237
|
+
* For Maps, Arrays, Sets and Records, we use `MergeAll*<T, U>` utility
|
|
238
|
+
* types. They will extract relevant data structure from both T and U
|
|
239
|
+
* (providing that both have same data data structure, except for typing).
|
|
240
|
+
*
|
|
241
|
+
* From these, `*ValueType<T>` will extract values (and keys) types to be
|
|
242
|
+
* able to create a new data structure with an union typing from both
|
|
243
|
+
* data structure of T and U:
|
|
244
|
+
*
|
|
245
|
+
* MergeAllSets<
|
|
246
|
+
* {foo: Set<number>},
|
|
247
|
+
* {foo: Set<string>}
|
|
248
|
+
* > // `SetValueType` will extract "number" for T
|
|
249
|
+
* // `SetValueType` will extract "string" for U
|
|
250
|
+
* // `MergeAllSets` will infer type as Set<number|string>
|
|
251
|
+
* // Process is similar for Maps, Arrays, and Sets
|
|
252
|
+
*
|
|
253
|
+
* `DeepMerge<T, U, Options>` is taking a third argument to be handle to
|
|
254
|
+
* infer final typing depending on merging strategy:
|
|
255
|
+
*
|
|
256
|
+
* & (Options extends { sets: "replace" } ? PartialByType<U, Set<unknown>>
|
|
257
|
+
* : MergeAllSets<T, U>)
|
|
258
|
+
*
|
|
259
|
+
* In the above line, if "Options" have its merging strategy for Sets set to
|
|
260
|
+
* "replace", instead of performing merging of Sets type, it will take the
|
|
261
|
+
* typing from right operand (U) instead, effectively replacing the typing.
|
|
262
|
+
*
|
|
263
|
+
* An additional note, we use `ExpandRecursively<T>` utility type to expand
|
|
264
|
+
* the resulting typing and hide all the typing logic of deep merging so it is
|
|
265
|
+
* more user friendly.
|
|
266
|
+
*/
|
|
267
|
+
/** Force intellisense to expand the typing to hide merging typings */
|
|
268
|
+
export type ExpandRecursively<T> = T extends Record<PropertyKey, unknown> ? T extends infer O ? {
|
|
269
|
+
[K in keyof O]: ExpandRecursively<O[K]>;
|
|
270
|
+
} : never : T;
|
|
271
|
+
/** Filter of keys matching a given type */
|
|
272
|
+
export type PartialByType<T, U> = {
|
|
273
|
+
[K in keyof T as T[K] extends U ? K : never]: T[K];
|
|
274
|
+
};
|
|
275
|
+
/** Get set values type */
|
|
276
|
+
export type SetValueType<T> = T extends Set<infer V> ? V : never;
|
|
277
|
+
/** Merge all sets types definitions from keys present in both objects */
|
|
278
|
+
export type MergeAllSets<T, U, X = PartialByType<T, Set<unknown>>, Y = PartialByType<U, Set<unknown>>, Z = {
|
|
279
|
+
[K in keyof X & keyof Y]: Set<SetValueType<X[K]> | SetValueType<Y[K]>>;
|
|
280
|
+
}> = Z;
|
|
281
|
+
/** Get array values type */
|
|
282
|
+
export type ArrayValueType<T> = T extends Array<infer V> ? V : never;
|
|
283
|
+
/** Merge all arrays types definitions from keys present in both objects */
|
|
284
|
+
export type MergeAllArrays<T, U, X = PartialByType<T, Array<unknown>>, Y = PartialByType<U, Array<unknown>>, Z = {
|
|
285
|
+
[K in keyof X & keyof Y]: Array<ArrayValueType<X[K]> | ArrayValueType<Y[K]>>;
|
|
286
|
+
}> = Z;
|
|
287
|
+
/** Get map values types */
|
|
288
|
+
export type MapKeyType<T> = T extends Map<infer K, unknown> ? K : never;
|
|
289
|
+
/** Get map values types */
|
|
290
|
+
export type MapValueType<T> = T extends Map<unknown, infer V> ? V : never;
|
|
291
|
+
/** Merge all maps types definitions from keys present in both objects */
|
|
292
|
+
export type MergeAllMaps<T, U, X = PartialByType<T, Map<unknown, unknown>>, Y = PartialByType<U, Map<unknown, unknown>>, Z = {
|
|
293
|
+
[K in keyof X & keyof Y]: Map<MapKeyType<X[K]> | MapKeyType<Y[K]>, MapValueType<X[K]> | MapValueType<Y[K]>>;
|
|
294
|
+
}> = Z;
|
|
295
|
+
/** Merge all records types definitions from keys present in both objects */
|
|
296
|
+
export type MergeAllRecords<T, U, Options, X = PartialByType<T, Record<PropertyKey, unknown>>, Y = PartialByType<U, Record<PropertyKey, unknown>>, Z = {
|
|
297
|
+
[K in keyof X & keyof Y]: DeepMerge<X[K], Y[K], Options>;
|
|
298
|
+
}> = Z;
|
|
299
|
+
/** Exclude map, sets and array from type */
|
|
300
|
+
export type OmitComplexes<T> = Omit<T, keyof PartialByType<T, Map<unknown, unknown> | Set<unknown> | Array<unknown> | Record<PropertyKey, unknown>>>;
|
|
301
|
+
/** Object with keys in either T or U but not in both */
|
|
302
|
+
export type ObjectXorKeys<T, U, X = Omit<T, keyof U> & Omit<U, keyof T>, Y = {
|
|
303
|
+
[K in keyof X]: X[K];
|
|
304
|
+
}> = Y;
|
|
305
|
+
/** Merge two objects, with left precedence */
|
|
306
|
+
export type MergeRightOmitComplexes<T, U, X = ObjectXorKeys<T, U> & OmitComplexes<{
|
|
307
|
+
[K in keyof U]: U[K];
|
|
308
|
+
}>> = X;
|
|
309
|
+
/** Merge two objects */
|
|
310
|
+
export type Merge<T, U, Options, X = MergeRightOmitComplexes<T, U> & MergeAllRecords<T, U, Options> & (Options extends {
|
|
311
|
+
sets: "replace";
|
|
312
|
+
} ? PartialByType<U, Set<unknown>> : MergeAllSets<T, U>) & (Options extends {
|
|
313
|
+
arrays: "replace";
|
|
314
|
+
} ? PartialByType<U, Array<unknown>> : MergeAllArrays<T, U>) & (Options extends {
|
|
315
|
+
maps: "replace";
|
|
316
|
+
} ? PartialByType<U, Map<unknown, unknown>> : MergeAllMaps<T, U>)> = ExpandRecursively<X>;
|
|
317
|
+
/** Merge deeply two objects */
|
|
318
|
+
export type DeepMerge<T, U, Options = Record<string, MergingStrategy>> = [
|
|
319
|
+
T,
|
|
320
|
+
U
|
|
321
|
+
] extends [Record<PropertyKey, unknown>, Record<PropertyKey, unknown>] ? Merge<T, U, Options> : T | U;
|
|
322
|
+
//# sourceMappingURL=deep_mer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wB;AACxB,MAAM,MAAM,KAAK,CACf,CAAC,EACD,CAAC,EACD,OAAO,EACP,CAAC,GACG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC7B,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAC9B,CAAC,OAAO,SAAS;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,GACnE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACrB,CAAC,OAAO,SAAS;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GAAG,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,GACvE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACvB,CAAC,OAAO,SAAS;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAClC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GACvC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IACvB,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAEzB,+BAA+B;AAC/B,MAAM,MAAM,SAAS,CACnB,CAAC,EACD,CAAC,EACD,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,IAGzC;IAAC,CAAC;IAAE,CAAC;CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,GACvE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAEpB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.deepMerge = deepMerge;
|
|
6
|
+
/** Default merging options - cached to avoid object allocation on each call */
|
|
7
|
+
const DEFAULT_OPTIONS = {
|
|
8
|
+
arrays: "merge",
|
|
9
|
+
sets: "merge",
|
|
10
|
+
maps: "merge",
|
|
11
|
+
};
|
|
12
|
+
function deepMerge(record, other, options) {
|
|
13
|
+
return deepMergeInternal(record, other, new Set(), options ?? DEFAULT_OPTIONS);
|
|
14
|
+
}
|
|
15
|
+
function deepMergeInternal(record, other, seen, options) {
|
|
16
|
+
const result = {};
|
|
17
|
+
const keys = new Set([
|
|
18
|
+
...getKeys(record),
|
|
19
|
+
...getKeys(other),
|
|
20
|
+
]);
|
|
21
|
+
// Iterate through each key of other object and use correct merging strategy
|
|
22
|
+
for (const key of keys) {
|
|
23
|
+
// Skip to prevent Object.prototype.__proto__ accessor property calls on non-Deno platforms
|
|
24
|
+
if (key === "__proto__") {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
const a = record[key];
|
|
28
|
+
if (!Object.hasOwn(other, key)) {
|
|
29
|
+
result[key] = a;
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const b = other[key];
|
|
33
|
+
if (isNonNullObject(a) && isNonNullObject(b) && !seen.has(a) && !seen.has(b)) {
|
|
34
|
+
seen.add(a);
|
|
35
|
+
seen.add(b);
|
|
36
|
+
result[key] = mergeObjects(a, b, seen, options);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
// Override value
|
|
40
|
+
result[key] = b;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
function mergeObjects(left, right, seen, options) {
|
|
45
|
+
// Recursively merge mergeable objects
|
|
46
|
+
if (isMergeable(left) && isMergeable(right)) {
|
|
47
|
+
return deepMergeInternal(left, right, seen, options);
|
|
48
|
+
}
|
|
49
|
+
if (isIterable(left) && isIterable(right)) {
|
|
50
|
+
// Handle arrays
|
|
51
|
+
if ((Array.isArray(left)) && (Array.isArray(right))) {
|
|
52
|
+
if (options.arrays === "merge") {
|
|
53
|
+
return left.concat(right);
|
|
54
|
+
}
|
|
55
|
+
return right;
|
|
56
|
+
}
|
|
57
|
+
// Handle maps
|
|
58
|
+
if ((left instanceof Map) && (right instanceof Map)) {
|
|
59
|
+
if (options.maps === "merge") {
|
|
60
|
+
const result = new Map(left);
|
|
61
|
+
for (const [k, v] of right) {
|
|
62
|
+
result.set(k, v);
|
|
63
|
+
}
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
return right;
|
|
67
|
+
}
|
|
68
|
+
// Handle sets
|
|
69
|
+
if ((left instanceof Set) && (right instanceof Set)) {
|
|
70
|
+
if (options.sets === "merge") {
|
|
71
|
+
const result = new Set(left);
|
|
72
|
+
for (const v of right) {
|
|
73
|
+
result.add(v);
|
|
74
|
+
}
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
return right;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return right;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Test whether a value is mergeable or not
|
|
84
|
+
* Builtins that look like objects, null and user defined classes
|
|
85
|
+
* are not considered mergeable (it means that reference will be copied)
|
|
86
|
+
*/
|
|
87
|
+
function isMergeable(value) {
|
|
88
|
+
return Object.getPrototypeOf(value) === Object.prototype;
|
|
89
|
+
}
|
|
90
|
+
function isIterable(value) {
|
|
91
|
+
return typeof value[Symbol.iterator] === "function";
|
|
92
|
+
}
|
|
93
|
+
function isNonNullObject(value) {
|
|
94
|
+
return value !== null && typeof value === "object";
|
|
95
|
+
}
|
|
96
|
+
function getKeys(record) {
|
|
97
|
+
const keys = Object.keys(record);
|
|
98
|
+
const symbols = Object.getOwnPropertySymbols(record);
|
|
99
|
+
// Fast path: most objects have no symbol keys
|
|
100
|
+
if (symbols.length === 0)
|
|
101
|
+
return keys;
|
|
102
|
+
for (const sym of symbols) {
|
|
103
|
+
if (Object.prototype.propertyIsEnumerable.call(record, sym)) {
|
|
104
|
+
keys.push(sym);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return keys;
|
|
108
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
2
|
+
/**
|
|
3
|
+
* Walk entry for {@linkcode walk}, {@linkcode walkSync},
|
|
4
|
+
* {@linkcode expandGlob} and {@linkcode expandGlobSync}.
|
|
5
|
+
*/
|
|
6
|
+
export interface WalkEntry extends dntShim.Deno.DirEntry {
|
|
7
|
+
/** Full path of the entry. */
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
10
|
+
/** Create {@linkcode WalkEntry} for the `path` synchronously. */
|
|
11
|
+
export declare function createWalkEntrySync(path: string | URL): WalkEntry;
|
|
12
|
+
/** Create {@linkcode WalkEntry} for the `path` asynchronously. */
|
|
13
|
+
export declare function createWalkEntry(path: string | URL): Promise<WalkEntry>;
|
|
14
|
+
//# sourceMappingURL=_create_walk_entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_create_walk_entry.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.22/_create_walk_entry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAOxD;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,OAAO,CAAC,IAAI,CAAC,QAAQ;IACtD,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iEAAiE;AACjE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAYjE;AAED,kEAAkE;AAClE,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAY5E"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createWalkEntrySync = createWalkEntrySync;
|
|
37
|
+
exports.createWalkEntry = createWalkEntry;
|
|
38
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
39
|
+
// Copyright the Browserify authors. MIT License.
|
|
40
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
41
|
+
const basename_js_1 = require("../../path/1.1.4/basename.js");
|
|
42
|
+
const normalize_js_1 = require("../../path/1.1.4/normalize.js");
|
|
43
|
+
const _to_path_string_js_1 = require("./_to_path_string.js");
|
|
44
|
+
/** Create {@linkcode WalkEntry} for the `path` synchronously. */
|
|
45
|
+
function createWalkEntrySync(path) {
|
|
46
|
+
path = (0, _to_path_string_js_1.toPathString)(path);
|
|
47
|
+
path = (0, normalize_js_1.normalize)(path);
|
|
48
|
+
const name = (0, basename_js_1.basename)(path);
|
|
49
|
+
const info = dntShim.Deno.statSync(path);
|
|
50
|
+
return {
|
|
51
|
+
path,
|
|
52
|
+
name,
|
|
53
|
+
isFile: info.isFile,
|
|
54
|
+
isDirectory: info.isDirectory,
|
|
55
|
+
isSymlink: info.isSymlink,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** Create {@linkcode WalkEntry} for the `path` asynchronously. */
|
|
59
|
+
async function createWalkEntry(path) {
|
|
60
|
+
path = (0, _to_path_string_js_1.toPathString)(path);
|
|
61
|
+
path = (0, normalize_js_1.normalize)(path);
|
|
62
|
+
const name = (0, basename_js_1.basename)(path);
|
|
63
|
+
const info = await dntShim.Deno.stat(path);
|
|
64
|
+
return {
|
|
65
|
+
path,
|
|
66
|
+
name,
|
|
67
|
+
isFile: info.isFile,
|
|
68
|
+
isDirectory: info.isDirectory,
|
|
69
|
+
isSymlink: info.isSymlink,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
2
|
+
export type PathType = "file" | "dir" | "symlink";
|
|
3
|
+
/**
|
|
4
|
+
* Get a human readable file type string.
|
|
5
|
+
*
|
|
6
|
+
* @param file File information, as returned by {@linkcode Deno.stat} or
|
|
7
|
+
* {@linkcode Deno.lstat}.
|
|
8
|
+
*
|
|
9
|
+
* @returns The file type as a string, or `undefined` if the file type is
|
|
10
|
+
* unknown.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getFileInfoType(fileInfo: dntShim.Deno.FileInfo): PathType | undefined;
|
|
13
|
+
//# sourceMappingURL=_get_file_info_type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_get_file_info_type.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.22/_get_file_info_type.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAGxD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC;AAElD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAQrF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileInfoType = getFileInfoType;
|
|
4
|
+
/**
|
|
5
|
+
* Get a human readable file type string.
|
|
6
|
+
*
|
|
7
|
+
* @param file File information, as returned by {@linkcode Deno.stat} or
|
|
8
|
+
* {@linkcode Deno.lstat}.
|
|
9
|
+
*
|
|
10
|
+
* @returns The file type as a string, or `undefined` if the file type is
|
|
11
|
+
* unknown.
|
|
12
|
+
*/
|
|
13
|
+
function getFileInfoType(fileInfo) {
|
|
14
|
+
return fileInfo.isFile
|
|
15
|
+
? "file"
|
|
16
|
+
: fileInfo.isDirectory
|
|
17
|
+
? "dir"
|
|
18
|
+
: fileInfo.isSymlink
|
|
19
|
+
? "symlink"
|
|
20
|
+
: undefined;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if two paths are the same.
|
|
3
|
+
*
|
|
4
|
+
* @param src Source file path as a string or URL.
|
|
5
|
+
* @param dest Destination file path as a string or URL.
|
|
6
|
+
*
|
|
7
|
+
* @returns `true` if the paths are the same, `false` otherwise.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isSamePath(src: string | URL, dest: string | URL): boolean;
|
|
10
|
+
//# sourceMappingURL=_is_same_path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_is_same_path.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.22/_is_same_path.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,EAAE,MAAM,GAAG,GAAG,GACjB,OAAO,CAKT"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isSamePath = isSamePath;
|
|
6
|
+
const resolve_js_1 = require("../../path/1.1.4/resolve.js");
|
|
7
|
+
const _to_path_string_js_1 = require("./_to_path_string.js");
|
|
8
|
+
/**
|
|
9
|
+
* Checks if two paths are the same.
|
|
10
|
+
*
|
|
11
|
+
* @param src Source file path as a string or URL.
|
|
12
|
+
* @param dest Destination file path as a string or URL.
|
|
13
|
+
*
|
|
14
|
+
* @returns `true` if the paths are the same, `false` otherwise.
|
|
15
|
+
*/
|
|
16
|
+
function isSamePath(src, dest) {
|
|
17
|
+
src = (0, _to_path_string_js_1.toPathString)(src);
|
|
18
|
+
dest = (0, _to_path_string_js_1.toPathString)(dest);
|
|
19
|
+
return (0, resolve_js_1.resolve)(src) === (0, resolve_js_1.resolve)(dest);
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether `src` is a sub-directory of `dest`.
|
|
3
|
+
*
|
|
4
|
+
* @param src Source file path as a string or URL.
|
|
5
|
+
* @param dest Destination file path as a string or URL.
|
|
6
|
+
* @param sep Path separator. Defaults to `\\` for Windows and `/` for other
|
|
7
|
+
* platforms.
|
|
8
|
+
*
|
|
9
|
+
* @returns `true` if `src` is a sub-directory of `dest`, `false` otherwise.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isSubdir(src: string | URL, dest: string | URL, sep?: "/" | "\\"): boolean;
|
|
12
|
+
//# sourceMappingURL=_is_subdir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_is_subdir.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.22/_is_subdir.ts"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,EAAE,MAAM,GAAG,GAAG,EAClB,GAAG,aAAY,GACd,OAAO,CAYT"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
3
|
+
// Copyright the Browserify authors. MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isSubdir = isSubdir;
|
|
6
|
+
const resolve_js_1 = require("../../path/1.1.4/resolve.js");
|
|
7
|
+
const constants_js_1 = require("../../path/1.1.4/constants.js");
|
|
8
|
+
const _to_path_string_js_1 = require("./_to_path_string.js");
|
|
9
|
+
/**
|
|
10
|
+
* Checks whether `src` is a sub-directory of `dest`.
|
|
11
|
+
*
|
|
12
|
+
* @param src Source file path as a string or URL.
|
|
13
|
+
* @param dest Destination file path as a string or URL.
|
|
14
|
+
* @param sep Path separator. Defaults to `\\` for Windows and `/` for other
|
|
15
|
+
* platforms.
|
|
16
|
+
*
|
|
17
|
+
* @returns `true` if `src` is a sub-directory of `dest`, `false` otherwise.
|
|
18
|
+
*/
|
|
19
|
+
function isSubdir(src, dest, sep = constants_js_1.SEPARATOR) {
|
|
20
|
+
src = (0, _to_path_string_js_1.toPathString)(src);
|
|
21
|
+
dest = (0, _to_path_string_js_1.toPathString)(dest);
|
|
22
|
+
if ((0, resolve_js_1.resolve)(src) === (0, resolve_js_1.resolve)(dest)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const srcArray = src.split(sep);
|
|
26
|
+
const destArray = dest.split(sep);
|
|
27
|
+
return srcArray.every((current, i) => destArray[i] === current);
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_to_path_string.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.22/_to_path_string.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,GAAG,GAAG,GACpB,MAAM,CAER"}
|