@bolt-foundry/gambit 0.8.1 → 0.8.5-rc.10

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.
Files changed (293) hide show
  1. package/CHANGELOG.md +150 -2
  2. package/README.md +109 -23
  3. package/esm/_dnt.polyfills.d.ts +17 -0
  4. package/esm/_dnt.polyfills.d.ts.map +1 -1
  5. package/esm/_dnt.polyfills.js +123 -0
  6. package/esm/deps/jsr.io/@std/collections/1.1.6/deep_merge.d.ts +322 -0
  7. package/esm/deps/jsr.io/@std/collections/1.1.6/deep_merge.d.ts.map +1 -0
  8. package/esm/deps/jsr.io/@std/collections/1.1.6/deep_merge.js +105 -0
  9. package/esm/deps/jsr.io/@std/fs/1.0.23/_create_walk_entry.d.ts +14 -0
  10. package/esm/deps/jsr.io/@std/fs/1.0.23/_create_walk_entry.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/fs/1.0.23/_create_walk_entry.js +34 -0
  12. package/esm/deps/jsr.io/@std/fs/1.0.23/_get_file_info_type.d.ts +13 -0
  13. package/esm/deps/jsr.io/@std/fs/1.0.23/_get_file_info_type.d.ts.map +1 -0
  14. package/esm/deps/jsr.io/@std/fs/1.0.23/_get_file_info_type.js +18 -0
  15. package/esm/deps/jsr.io/@std/fs/1.0.23/_is_same_path.d.ts +10 -0
  16. package/esm/deps/jsr.io/@std/fs/1.0.23/_is_same_path.d.ts.map +1 -0
  17. package/esm/deps/jsr.io/@std/fs/1.0.23/_is_same_path.js +17 -0
  18. package/esm/deps/jsr.io/@std/fs/1.0.23/_is_subdir.d.ts +12 -0
  19. package/esm/deps/jsr.io/@std/fs/1.0.23/_is_subdir.d.ts.map +1 -0
  20. package/esm/deps/jsr.io/@std/fs/1.0.23/_is_subdir.js +25 -0
  21. package/esm/deps/jsr.io/@std/fs/1.0.23/_to_path_string.d.ts +9 -0
  22. package/esm/deps/jsr.io/@std/fs/1.0.23/_to_path_string.d.ts.map +1 -0
  23. package/esm/deps/jsr.io/@std/fs/1.0.23/_to_path_string.js +13 -0
  24. package/esm/deps/jsr.io/@std/fs/1.0.23/copy.d.ts +117 -0
  25. package/esm/deps/jsr.io/@std/fs/1.0.23/copy.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/fs/1.0.23/copy.js +313 -0
  27. package/esm/deps/jsr.io/@std/fs/1.0.23/empty_dir.d.ts +48 -0
  28. package/esm/deps/jsr.io/@std/fs/1.0.23/empty_dir.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/fs/1.0.23/empty_dir.js +87 -0
  30. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_dir.d.ts +49 -0
  31. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_dir.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_dir.js +102 -0
  33. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_file.d.ts +47 -0
  34. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_file.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_file.js +90 -0
  36. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_link.d.ts +49 -0
  37. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_link.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_link.js +61 -0
  39. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.d.ts +70 -0
  40. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.js +156 -0
  42. package/esm/deps/jsr.io/@std/fs/1.0.23/eol.d.ts +52 -0
  43. package/esm/deps/jsr.io/@std/fs/1.0.23/eol.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/fs/1.0.23/eol.js +67 -0
  45. package/esm/deps/jsr.io/@std/fs/1.0.23/exists.d.ts +218 -0
  46. package/esm/deps/jsr.io/@std/fs/1.0.23/exists.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@std/fs/1.0.23/exists.js +271 -0
  48. package/esm/deps/jsr.io/@std/fs/1.0.23/expand_glob.d.ts +267 -0
  49. package/esm/deps/jsr.io/@std/fs/1.0.23/expand_glob.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@std/fs/1.0.23/expand_glob.js +442 -0
  51. package/esm/deps/jsr.io/@std/fs/1.0.23/mod.d.ts +29 -0
  52. package/esm/deps/jsr.io/@std/fs/1.0.23/mod.d.ts.map +1 -0
  53. package/esm/deps/jsr.io/@std/fs/1.0.23/mod.js +29 -0
  54. package/esm/deps/jsr.io/@std/fs/1.0.23/move.d.ts +86 -0
  55. package/esm/deps/jsr.io/@std/fs/1.0.23/move.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@std/fs/1.0.23/move.js +142 -0
  57. package/esm/deps/jsr.io/@std/fs/1.0.23/walk.d.ts +777 -0
  58. package/esm/deps/jsr.io/@std/fs/1.0.23/walk.d.ts.map +1 -0
  59. package/esm/deps/jsr.io/@std/fs/1.0.23/walk.js +846 -0
  60. package/esm/deps/jsr.io/@std/json/1.0.3/types.d.ts +7 -0
  61. package/esm/deps/jsr.io/@std/json/1.0.3/types.d.ts.map +1 -0
  62. package/esm/deps/jsr.io/@std/json/1.0.3/types.js +3 -0
  63. package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts +20 -0
  64. package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts.map +1 -0
  65. package/esm/deps/jsr.io/@std/jsonc/1.0.2/mod.js +21 -0
  66. package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts +21 -0
  67. package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts.map +1 -0
  68. package/esm/deps/jsr.io/@std/jsonc/1.0.2/parse.js +320 -0
  69. package/esm/deps/jsr.io/@std/path/1.1.4/constants.d.ts +1 -1
  70. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
  71. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/toml/1.0.11/_parser.js +753 -0
  73. package/esm/deps/jsr.io/@std/toml/1.0.11/mod.d.ts +109 -0
  74. package/esm/deps/jsr.io/@std/toml/1.0.11/mod.d.ts.map +1 -0
  75. package/esm/deps/jsr.io/@std/toml/1.0.11/mod.js +110 -0
  76. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
  77. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
  78. package/esm/deps/jsr.io/@std/toml/1.0.11/parse.js +25 -0
  79. package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts +35 -0
  80. package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts.map +1 -0
  81. package/esm/deps/jsr.io/@std/toml/1.0.11/stringify.js +283 -0
  82. package/esm/gambit/simulator-ui/dist/bundle.js +12670 -5471
  83. package/esm/gambit/simulator-ui/dist/bundle.js.map +4 -4
  84. package/esm/gambit/simulator-ui/dist/favicon.ico +0 -0
  85. package/esm/mod.d.ts +21 -7
  86. package/esm/mod.d.ts.map +1 -1
  87. package/esm/mod.js +14 -4
  88. package/esm/src/cli_utils.d.ts +1 -0
  89. package/esm/src/cli_utils.d.ts.map +1 -1
  90. package/esm/src/cli_utils.js +52 -4
  91. package/esm/src/default_runtime.d.ts +46 -0
  92. package/esm/src/default_runtime.d.ts.map +1 -0
  93. package/esm/src/default_runtime.js +415 -0
  94. package/esm/src/durable_streams.js +26 -1
  95. package/esm/src/model_matchers.d.ts +10 -0
  96. package/esm/src/model_matchers.d.ts.map +1 -0
  97. package/esm/src/model_matchers.js +26 -0
  98. package/esm/src/openai_compat.d.ts +74 -0
  99. package/esm/src/openai_compat.d.ts.map +1 -0
  100. package/esm/src/openai_compat.js +329 -0
  101. package/esm/src/project_config.d.ts +47 -0
  102. package/esm/src/project_config.d.ts.map +1 -0
  103. package/esm/src/project_config.js +134 -0
  104. package/esm/src/providers/codex.d.ts +37 -0
  105. package/esm/src/providers/codex.d.ts.map +1 -0
  106. package/esm/src/providers/codex.js +810 -0
  107. package/esm/src/providers/google.d.ts +18 -0
  108. package/esm/src/providers/google.d.ts.map +1 -0
  109. package/esm/src/providers/google.js +428 -0
  110. package/esm/src/providers/ollama.d.ts +19 -0
  111. package/esm/src/providers/ollama.d.ts.map +1 -0
  112. package/esm/src/providers/ollama.js +789 -0
  113. package/esm/src/providers/openrouter.d.ts +26 -0
  114. package/esm/src/providers/openrouter.d.ts.map +1 -0
  115. package/esm/src/providers/openrouter.js +886 -0
  116. package/esm/src/providers/router.d.ts +19 -0
  117. package/esm/src/providers/router.d.ts.map +1 -0
  118. package/esm/src/providers/router.js +93 -0
  119. package/esm/src/server.d.ts +11 -0
  120. package/esm/src/server.d.ts.map +1 -1
  121. package/esm/src/server.js +3927 -689
  122. package/esm/src/server_feedback_grading_routes.d.ts +32 -0
  123. package/esm/src/server_feedback_grading_routes.d.ts.map +1 -0
  124. package/esm/src/server_feedback_grading_routes.js +305 -0
  125. package/esm/src/server_helpers.d.ts +4 -0
  126. package/esm/src/server_helpers.d.ts.map +1 -0
  127. package/esm/src/server_helpers.js +46 -0
  128. package/esm/src/server_session_store.d.ts +87 -0
  129. package/esm/src/server_session_store.d.ts.map +1 -0
  130. package/esm/src/server_session_store.js +873 -0
  131. package/esm/src/server_types.d.ts +110 -0
  132. package/esm/src/server_types.d.ts.map +1 -0
  133. package/esm/src/server_types.js +1 -0
  134. package/esm/src/server_ui_routes.d.ts +33 -0
  135. package/esm/src/server_ui_routes.d.ts.map +1 -0
  136. package/esm/src/server_ui_routes.js +136 -0
  137. package/esm/src/session_artifacts.d.ts +22 -0
  138. package/esm/src/session_artifacts.d.ts.map +1 -0
  139. package/esm/src/session_artifacts.js +243 -0
  140. package/esm/src/trace.d.ts.map +1 -1
  141. package/esm/src/trace.js +8 -5
  142. package/esm/src/workspace.d.ts +19 -0
  143. package/esm/src/workspace.d.ts.map +1 -0
  144. package/esm/src/workspace.js +162 -0
  145. package/esm/src/workspace_contract.d.ts +78 -0
  146. package/esm/src/workspace_contract.d.ts.map +1 -0
  147. package/esm/src/workspace_contract.js +76 -0
  148. package/package.json +3 -2
  149. package/script/_dnt.polyfills.d.ts +17 -0
  150. package/script/_dnt.polyfills.d.ts.map +1 -1
  151. package/script/_dnt.polyfills.js +123 -0
  152. package/script/deps/jsr.io/@std/collections/1.1.6/deep_merge.d.ts +322 -0
  153. package/script/deps/jsr.io/@std/collections/1.1.6/deep_merge.d.ts.map +1 -0
  154. package/script/deps/jsr.io/@std/collections/1.1.6/deep_merge.js +108 -0
  155. package/script/deps/jsr.io/@std/fs/1.0.23/_create_walk_entry.d.ts +14 -0
  156. package/script/deps/jsr.io/@std/fs/1.0.23/_create_walk_entry.d.ts.map +1 -0
  157. package/script/deps/jsr.io/@std/fs/1.0.23/_create_walk_entry.js +71 -0
  158. package/script/deps/jsr.io/@std/fs/1.0.23/_get_file_info_type.d.ts +13 -0
  159. package/script/deps/jsr.io/@std/fs/1.0.23/_get_file_info_type.d.ts.map +1 -0
  160. package/script/deps/jsr.io/@std/fs/1.0.23/_get_file_info_type.js +21 -0
  161. package/script/deps/jsr.io/@std/fs/1.0.23/_is_same_path.d.ts +10 -0
  162. package/script/deps/jsr.io/@std/fs/1.0.23/_is_same_path.d.ts.map +1 -0
  163. package/script/deps/jsr.io/@std/fs/1.0.23/_is_same_path.js +20 -0
  164. package/script/deps/jsr.io/@std/fs/1.0.23/_is_subdir.d.ts +12 -0
  165. package/script/deps/jsr.io/@std/fs/1.0.23/_is_subdir.d.ts.map +1 -0
  166. package/script/deps/jsr.io/@std/fs/1.0.23/_is_subdir.js +28 -0
  167. package/script/deps/jsr.io/@std/fs/1.0.23/_to_path_string.d.ts +9 -0
  168. package/script/deps/jsr.io/@std/fs/1.0.23/_to_path_string.d.ts.map +1 -0
  169. package/script/deps/jsr.io/@std/fs/1.0.23/_to_path_string.js +16 -0
  170. package/script/deps/jsr.io/@std/fs/1.0.23/copy.d.ts +117 -0
  171. package/script/deps/jsr.io/@std/fs/1.0.23/copy.d.ts.map +1 -0
  172. package/script/deps/jsr.io/@std/fs/1.0.23/copy.js +350 -0
  173. package/script/deps/jsr.io/@std/fs/1.0.23/empty_dir.d.ts +48 -0
  174. package/script/deps/jsr.io/@std/fs/1.0.23/empty_dir.d.ts.map +1 -0
  175. package/script/deps/jsr.io/@std/fs/1.0.23/empty_dir.js +124 -0
  176. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_dir.d.ts +49 -0
  177. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_dir.d.ts.map +1 -0
  178. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_dir.js +139 -0
  179. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_file.d.ts +47 -0
  180. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_file.d.ts.map +1 -0
  181. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_file.js +127 -0
  182. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_link.d.ts +49 -0
  183. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_link.d.ts.map +1 -0
  184. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_link.js +98 -0
  185. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.d.ts +70 -0
  186. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.d.ts.map +1 -0
  187. package/script/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.js +193 -0
  188. package/script/deps/jsr.io/@std/fs/1.0.23/eol.d.ts +52 -0
  189. package/script/deps/jsr.io/@std/fs/1.0.23/eol.d.ts.map +1 -0
  190. package/script/deps/jsr.io/@std/fs/1.0.23/eol.js +105 -0
  191. package/script/deps/jsr.io/@std/fs/1.0.23/exists.d.ts +218 -0
  192. package/script/deps/jsr.io/@std/fs/1.0.23/exists.d.ts.map +1 -0
  193. package/script/deps/jsr.io/@std/fs/1.0.23/exists.js +308 -0
  194. package/script/deps/jsr.io/@std/fs/1.0.23/expand_glob.d.ts +267 -0
  195. package/script/deps/jsr.io/@std/fs/1.0.23/expand_glob.d.ts.map +1 -0
  196. package/script/deps/jsr.io/@std/fs/1.0.23/expand_glob.js +479 -0
  197. package/script/deps/jsr.io/@std/fs/1.0.23/mod.d.ts +29 -0
  198. package/script/deps/jsr.io/@std/fs/1.0.23/mod.d.ts.map +1 -0
  199. package/script/deps/jsr.io/@std/fs/1.0.23/mod.js +45 -0
  200. package/script/deps/jsr.io/@std/fs/1.0.23/move.d.ts +86 -0
  201. package/script/deps/jsr.io/@std/fs/1.0.23/move.d.ts.map +1 -0
  202. package/script/deps/jsr.io/@std/fs/1.0.23/move.js +179 -0
  203. package/script/deps/jsr.io/@std/fs/1.0.23/walk.d.ts +777 -0
  204. package/script/deps/jsr.io/@std/fs/1.0.23/walk.d.ts.map +1 -0
  205. package/script/deps/jsr.io/@std/fs/1.0.23/walk.js +883 -0
  206. package/script/deps/jsr.io/@std/json/1.0.3/types.d.ts +7 -0
  207. package/script/deps/jsr.io/@std/json/1.0.3/types.d.ts.map +1 -0
  208. package/script/deps/jsr.io/@std/json/1.0.3/types.js +4 -0
  209. package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts +20 -0
  210. package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.d.ts.map +1 -0
  211. package/script/deps/jsr.io/@std/jsonc/1.0.2/mod.js +37 -0
  212. package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts +21 -0
  213. package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.d.ts.map +1 -0
  214. package/script/deps/jsr.io/@std/jsonc/1.0.2/parse.js +323 -0
  215. package/script/deps/jsr.io/@std/path/1.1.4/constants.d.ts +1 -1
  216. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts +93 -0
  217. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.d.ts.map +1 -0
  218. package/script/deps/jsr.io/@std/toml/1.0.11/_parser.js +781 -0
  219. package/script/deps/jsr.io/@std/toml/1.0.11/mod.d.ts +109 -0
  220. package/script/deps/jsr.io/@std/toml/1.0.11/mod.d.ts.map +1 -0
  221. package/script/deps/jsr.io/@std/toml/1.0.11/mod.js +126 -0
  222. package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts +21 -0
  223. package/script/deps/jsr.io/@std/toml/1.0.11/parse.d.ts.map +1 -0
  224. package/script/deps/jsr.io/@std/toml/1.0.11/parse.js +28 -0
  225. package/script/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts +35 -0
  226. package/script/deps/jsr.io/@std/toml/1.0.11/stringify.d.ts.map +1 -0
  227. package/script/deps/jsr.io/@std/toml/1.0.11/stringify.js +286 -0
  228. package/script/gambit/simulator-ui/dist/bundle.js +12670 -5471
  229. package/script/gambit/simulator-ui/dist/bundle.js.map +4 -4
  230. package/script/gambit/simulator-ui/dist/favicon.ico +0 -0
  231. package/script/mod.d.ts +21 -7
  232. package/script/mod.d.ts.map +1 -1
  233. package/script/mod.js +22 -7
  234. package/script/src/cli_utils.d.ts +1 -0
  235. package/script/src/cli_utils.d.ts.map +1 -1
  236. package/script/src/cli_utils.js +52 -3
  237. package/script/src/default_runtime.d.ts +46 -0
  238. package/script/src/default_runtime.d.ts.map +1 -0
  239. package/script/src/default_runtime.js +452 -0
  240. package/script/src/durable_streams.js +26 -1
  241. package/script/src/model_matchers.d.ts +10 -0
  242. package/script/src/model_matchers.d.ts.map +1 -0
  243. package/script/src/model_matchers.js +29 -0
  244. package/script/src/openai_compat.d.ts +74 -0
  245. package/script/src/openai_compat.d.ts.map +1 -0
  246. package/script/src/openai_compat.js +366 -0
  247. package/script/src/project_config.d.ts +47 -0
  248. package/script/src/project_config.d.ts.map +1 -0
  249. package/script/src/project_config.js +173 -0
  250. package/script/src/providers/codex.d.ts +37 -0
  251. package/script/src/providers/codex.d.ts.map +1 -0
  252. package/script/src/providers/codex.js +850 -0
  253. package/script/src/providers/google.d.ts +18 -0
  254. package/script/src/providers/google.d.ts.map +1 -0
  255. package/script/src/providers/google.js +435 -0
  256. package/script/src/providers/ollama.d.ts +19 -0
  257. package/script/src/providers/ollama.d.ts.map +1 -0
  258. package/script/src/providers/ollama.js +831 -0
  259. package/script/src/providers/openrouter.d.ts +26 -0
  260. package/script/src/providers/openrouter.d.ts.map +1 -0
  261. package/script/src/providers/openrouter.js +926 -0
  262. package/script/src/providers/router.d.ts +19 -0
  263. package/script/src/providers/router.d.ts.map +1 -0
  264. package/script/src/providers/router.js +96 -0
  265. package/script/src/server.d.ts +11 -0
  266. package/script/src/server.d.ts.map +1 -1
  267. package/script/src/server.js +3931 -693
  268. package/script/src/server_feedback_grading_routes.d.ts +32 -0
  269. package/script/src/server_feedback_grading_routes.d.ts.map +1 -0
  270. package/script/src/server_feedback_grading_routes.js +343 -0
  271. package/script/src/server_helpers.d.ts +4 -0
  272. package/script/src/server_helpers.d.ts.map +1 -0
  273. package/script/src/server_helpers.js +84 -0
  274. package/script/src/server_session_store.d.ts +87 -0
  275. package/script/src/server_session_store.d.ts.map +1 -0
  276. package/script/src/server_session_store.js +910 -0
  277. package/script/src/server_types.d.ts +110 -0
  278. package/script/src/server_types.d.ts.map +1 -0
  279. package/script/src/server_types.js +2 -0
  280. package/script/src/server_ui_routes.d.ts +33 -0
  281. package/script/src/server_ui_routes.d.ts.map +1 -0
  282. package/script/src/server_ui_routes.js +173 -0
  283. package/script/src/session_artifacts.d.ts +22 -0
  284. package/script/src/session_artifacts.d.ts.map +1 -0
  285. package/script/src/session_artifacts.js +279 -0
  286. package/script/src/trace.d.ts.map +1 -1
  287. package/script/src/trace.js +8 -5
  288. package/script/src/workspace.d.ts +19 -0
  289. package/script/src/workspace.d.ts.map +1 -0
  290. package/script/src/workspace.js +199 -0
  291. package/script/src/workspace_contract.d.ts +78 -0
  292. package/script/src/workspace_contract.d.ts.map +1 -0
  293. package/script/src/workspace_contract.js +84 -0
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Asynchronously ensures that the directory exists, like
3
+ * {@linkcode https://www.ibm.com/docs/en/aix/7.3?topic=m-mkdir-command#mkdir__row-d3e133766 | mkdir -p}.
4
+ *
5
+ * If the directory already exists, this function does nothing. If the directory
6
+ * does not exist, it is created.
7
+ *
8
+ * Requires `--allow-read` and `--allow-write` permissions.
9
+ *
10
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
11
+ * for more information on Deno's permissions system.
12
+ *
13
+ * @param dir The path of the directory to ensure, as a string or URL.
14
+ *
15
+ * @returns A promise that resolves once the directory exists.
16
+ *
17
+ * @example Usage
18
+ * ```ts ignore
19
+ * import { ensureDir } from "@std/fs/ensure-dir";
20
+ *
21
+ * await ensureDir("./bar");
22
+ * ```
23
+ */
24
+ export declare function ensureDir(dir: string | URL): Promise<void>;
25
+ /**
26
+ * Synchronously ensures that the directory exists, like
27
+ * {@linkcode https://www.ibm.com/docs/en/aix/7.3?topic=m-mkdir-command#mkdir__row-d3e133766 | mkdir -p}.
28
+ *
29
+ * If the directory already exists, this function does nothing. If the directory
30
+ * does not exist, it is created.
31
+ *
32
+ * Requires `--allow-read` and `--allow-write` permissions.
33
+ *
34
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
35
+ * for more information on Deno's permissions system.
36
+ *
37
+ * @param dir The path of the directory to ensure, as a string or URL.
38
+ *
39
+ * @returns A void value that returns once the directory exists.
40
+ *
41
+ * @example Usage
42
+ * ```ts ignore
43
+ * import { ensureDirSync } from "@std/fs/ensure-dir";
44
+ *
45
+ * ensureDirSync("./bar");
46
+ * ```
47
+ */
48
+ export declare function ensureDirSync(dir: string | URL): void;
49
+ //# sourceMappingURL=ensure_dir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_dir.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.23/ensure_dir.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,iBAuBhD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,QAuB9C"}
@@ -0,0 +1,139 @@
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.ensureDir = ensureDir;
37
+ exports.ensureDirSync = ensureDirSync;
38
+ // Copyright 2018-2026 the Deno authors. MIT license.
39
+ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
40
+ const _get_file_info_type_js_1 = require("./_get_file_info_type.js");
41
+ /**
42
+ * Asynchronously ensures that the directory exists, like
43
+ * {@linkcode https://www.ibm.com/docs/en/aix/7.3?topic=m-mkdir-command#mkdir__row-d3e133766 | mkdir -p}.
44
+ *
45
+ * If the directory already exists, this function does nothing. If the directory
46
+ * does not exist, it is created.
47
+ *
48
+ * Requires `--allow-read` and `--allow-write` permissions.
49
+ *
50
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
51
+ * for more information on Deno's permissions system.
52
+ *
53
+ * @param dir The path of the directory to ensure, as a string or URL.
54
+ *
55
+ * @returns A promise that resolves once the directory exists.
56
+ *
57
+ * @example Usage
58
+ * ```ts ignore
59
+ * import { ensureDir } from "@std/fs/ensure-dir";
60
+ *
61
+ * await ensureDir("./bar");
62
+ * ```
63
+ */
64
+ async function ensureDir(dir) {
65
+ try {
66
+ const fileInfo = await dntShim.Deno.stat(dir);
67
+ throwIfNotDirectory(fileInfo);
68
+ return;
69
+ }
70
+ catch (err) {
71
+ if (!(err instanceof dntShim.Deno.errors.NotFound)) {
72
+ throw err;
73
+ }
74
+ }
75
+ // The dir doesn't exist. Create it.
76
+ // This can be racy. So we catch AlreadyExists and check stat again.
77
+ try {
78
+ await dntShim.Deno.mkdir(dir, { recursive: true });
79
+ }
80
+ catch (err) {
81
+ if (!(err instanceof dntShim.Deno.errors.AlreadyExists)) {
82
+ throw err;
83
+ }
84
+ const fileInfo = await dntShim.Deno.stat(dir);
85
+ throwIfNotDirectory(fileInfo);
86
+ }
87
+ }
88
+ /**
89
+ * Synchronously ensures that the directory exists, like
90
+ * {@linkcode https://www.ibm.com/docs/en/aix/7.3?topic=m-mkdir-command#mkdir__row-d3e133766 | mkdir -p}.
91
+ *
92
+ * If the directory already exists, this function does nothing. If the directory
93
+ * does not exist, it is created.
94
+ *
95
+ * Requires `--allow-read` and `--allow-write` permissions.
96
+ *
97
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
98
+ * for more information on Deno's permissions system.
99
+ *
100
+ * @param dir The path of the directory to ensure, as a string or URL.
101
+ *
102
+ * @returns A void value that returns once the directory exists.
103
+ *
104
+ * @example Usage
105
+ * ```ts ignore
106
+ * import { ensureDirSync } from "@std/fs/ensure-dir";
107
+ *
108
+ * ensureDirSync("./bar");
109
+ * ```
110
+ */
111
+ function ensureDirSync(dir) {
112
+ try {
113
+ const fileInfo = dntShim.Deno.statSync(dir);
114
+ throwIfNotDirectory(fileInfo);
115
+ return;
116
+ }
117
+ catch (err) {
118
+ if (!(err instanceof dntShim.Deno.errors.NotFound)) {
119
+ throw err;
120
+ }
121
+ }
122
+ // The dir doesn't exist. Create it.
123
+ // This can be racy. So we catch AlreadyExists and check stat again.
124
+ try {
125
+ dntShim.Deno.mkdirSync(dir, { recursive: true });
126
+ }
127
+ catch (err) {
128
+ if (!(err instanceof dntShim.Deno.errors.AlreadyExists)) {
129
+ throw err;
130
+ }
131
+ const fileInfo = dntShim.Deno.statSync(dir);
132
+ throwIfNotDirectory(fileInfo);
133
+ }
134
+ }
135
+ function throwIfNotDirectory(fileInfo) {
136
+ if (!fileInfo.isDirectory) {
137
+ throw new Error(`Failed to ensure directory exists: expected 'dir', got '${(0, _get_file_info_type_js_1.getFileInfoType)(fileInfo)}'`);
138
+ }
139
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Asynchronously ensures that the file exists.
3
+ *
4
+ * If the file already exists, this function does nothing. If the parent
5
+ * directories for the file do not exist, they are created.
6
+ *
7
+ * Requires `--allow-read` and `--allow-write` permissions.
8
+ *
9
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
10
+ * for more information on Deno's permissions system.
11
+ *
12
+ * @param filePath The path of the file to ensure, as a string or URL.
13
+ *
14
+ * @returns A void promise that resolves once the file exists.
15
+ *
16
+ * @example Usage
17
+ * ```ts ignore
18
+ * import { ensureFile } from "@std/fs/ensure-file";
19
+ *
20
+ * await ensureFile("./folder/targetFile.dat");
21
+ * ```
22
+ */
23
+ export declare function ensureFile(filePath: string | URL): Promise<void>;
24
+ /**
25
+ * Synchronously ensures that the file exists.
26
+ *
27
+ * If the file already exists, this function does nothing. If the parent
28
+ * directories for the file do not exist, they are created.
29
+ *
30
+ * Requires `--allow-read` and `--allow-write` permissions.
31
+ *
32
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
33
+ * for more information on Deno's permissions system.
34
+ *
35
+ * @param filePath The path of the file to ensure, as a string or URL.
36
+ *
37
+ * @returns A void value that returns once the file exists.
38
+ *
39
+ * @example Usage
40
+ * ```ts ignore
41
+ * import { ensureFileSync } from "@std/fs/ensure-file";
42
+ *
43
+ * ensureFileSync("./folder/targetFile.dat");
44
+ * ```
45
+ */
46
+ export declare function ensureFileSync(filePath: string | URL): void;
47
+ //# sourceMappingURL=ensure_file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_file.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.23/ensure_file.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBtE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAsB3D"}
@@ -0,0 +1,127 @@
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.ensureFile = ensureFile;
37
+ exports.ensureFileSync = ensureFileSync;
38
+ // Copyright 2018-2026 the Deno authors. MIT license.
39
+ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
40
+ const dirname_js_1 = require("../../path/1.1.4/dirname.js");
41
+ const ensure_dir_js_1 = require("./ensure_dir.js");
42
+ const _get_file_info_type_js_1 = require("./_get_file_info_type.js");
43
+ const _to_path_string_js_1 = require("./_to_path_string.js");
44
+ /**
45
+ * Asynchronously ensures that the file exists.
46
+ *
47
+ * If the file already exists, this function does nothing. If the parent
48
+ * directories for the file do not exist, they are created.
49
+ *
50
+ * Requires `--allow-read` and `--allow-write` permissions.
51
+ *
52
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
53
+ * for more information on Deno's permissions system.
54
+ *
55
+ * @param filePath The path of the file to ensure, as a string or URL.
56
+ *
57
+ * @returns A void promise that resolves once the file exists.
58
+ *
59
+ * @example Usage
60
+ * ```ts ignore
61
+ * import { ensureFile } from "@std/fs/ensure-file";
62
+ *
63
+ * await ensureFile("./folder/targetFile.dat");
64
+ * ```
65
+ */
66
+ async function ensureFile(filePath) {
67
+ try {
68
+ // if file exists
69
+ const stat = await dntShim.Deno.lstat(filePath);
70
+ if (!stat.isFile) {
71
+ throw new Error(`Failed to ensure file exists: expected 'file', got '${(0, _get_file_info_type_js_1.getFileInfoType)(stat)}'`);
72
+ }
73
+ }
74
+ catch (err) {
75
+ // if file not exists
76
+ if (err instanceof dntShim.Deno.errors.NotFound) {
77
+ // ensure dir exists
78
+ await (0, ensure_dir_js_1.ensureDir)((0, dirname_js_1.dirname)((0, _to_path_string_js_1.toPathString)(filePath)));
79
+ // create file
80
+ await dntShim.Deno.writeFile(filePath, new Uint8Array());
81
+ return;
82
+ }
83
+ throw err;
84
+ }
85
+ }
86
+ /**
87
+ * Synchronously ensures that the file exists.
88
+ *
89
+ * If the file already exists, this function does nothing. If the parent
90
+ * directories for the file do not exist, they are created.
91
+ *
92
+ * Requires `--allow-read` and `--allow-write` permissions.
93
+ *
94
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
95
+ * for more information on Deno's permissions system.
96
+ *
97
+ * @param filePath The path of the file to ensure, as a string or URL.
98
+ *
99
+ * @returns A void value that returns once the file exists.
100
+ *
101
+ * @example Usage
102
+ * ```ts ignore
103
+ * import { ensureFileSync } from "@std/fs/ensure-file";
104
+ *
105
+ * ensureFileSync("./folder/targetFile.dat");
106
+ * ```
107
+ */
108
+ function ensureFileSync(filePath) {
109
+ try {
110
+ // if file exists
111
+ const stat = dntShim.Deno.lstatSync(filePath);
112
+ if (!stat.isFile) {
113
+ throw new Error(`Failed to ensure file exists: expected 'file', got '${(0, _get_file_info_type_js_1.getFileInfoType)(stat)}'`);
114
+ }
115
+ }
116
+ catch (err) {
117
+ // if file not exists
118
+ if (err instanceof dntShim.Deno.errors.NotFound) {
119
+ // ensure dir exists
120
+ (0, ensure_dir_js_1.ensureDirSync)((0, dirname_js_1.dirname)((0, _to_path_string_js_1.toPathString)(filePath)));
121
+ // create file
122
+ dntShim.Deno.writeFileSync(filePath, new Uint8Array());
123
+ return;
124
+ }
125
+ throw err;
126
+ }
127
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Asynchronously ensures that the hard link exists.
3
+ *
4
+ * If the parent directories for the hard link do not exist, they are created.
5
+ *
6
+ * Requires `--allow-read` and `--allow-write` permissions.
7
+ *
8
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
9
+ * for more information on Deno's permissions system.
10
+ *
11
+ * @param src The source file path as a string or URL. Directory hard links are
12
+ * not allowed.
13
+ * @param dest The destination link path as a string or URL.
14
+ *
15
+ * @returns A void promise that resolves once the hard link exists.
16
+ *
17
+ * @example Usage
18
+ * ```ts ignore
19
+ * import { ensureLink } from "@std/fs/ensure-link";
20
+ *
21
+ * await ensureLink("./folder/targetFile.dat", "./folder/targetFile.link.dat");
22
+ * ```
23
+ */
24
+ export declare function ensureLink(src: string | URL, dest: string | URL): Promise<void>;
25
+ /**
26
+ * Synchronously ensures that the hard link exists.
27
+ *
28
+ * If the parent directories for the hard link do not exist, they are created.
29
+ *
30
+ * Requires `--allow-read` and `--allow-write` permissions.
31
+ *
32
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
33
+ * for more information on Deno's permissions system.
34
+ *
35
+ * @param src The source file path as a string or URL. Directory hard links are
36
+ * not allowed.
37
+ * @param dest The destination link path as a string or URL.
38
+ *
39
+ * @returns A void value that returns once the hard link exists.
40
+ *
41
+ * @example Usage
42
+ * ```ts ignore
43
+ * import { ensureLinkSync } from "@std/fs/ensure-link";
44
+ *
45
+ * ensureLinkSync("./folder/targetFile.dat", "./folder/targetFile.link.dat");
46
+ * ```
47
+ */
48
+ export declare function ensureLinkSync(src: string | URL, dest: string | URL): void;
49
+ //# sourceMappingURL=ensure_link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_link.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.23/ensure_link.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,iBAKrE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,QAKnE"}
@@ -0,0 +1,98 @@
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.ensureLink = ensureLink;
37
+ exports.ensureLinkSync = ensureLinkSync;
38
+ // Copyright 2018-2026 the Deno authors. MIT license.
39
+ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
40
+ const dirname_js_1 = require("../../path/1.1.4/dirname.js");
41
+ const ensure_dir_js_1 = require("./ensure_dir.js");
42
+ const _to_path_string_js_1 = require("./_to_path_string.js");
43
+ /**
44
+ * Asynchronously ensures that the hard link exists.
45
+ *
46
+ * If the parent directories for the hard link do not exist, they are created.
47
+ *
48
+ * Requires `--allow-read` and `--allow-write` permissions.
49
+ *
50
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
51
+ * for more information on Deno's permissions system.
52
+ *
53
+ * @param src The source file path as a string or URL. Directory hard links are
54
+ * not allowed.
55
+ * @param dest The destination link path as a string or URL.
56
+ *
57
+ * @returns A void promise that resolves once the hard link exists.
58
+ *
59
+ * @example Usage
60
+ * ```ts ignore
61
+ * import { ensureLink } from "@std/fs/ensure-link";
62
+ *
63
+ * await ensureLink("./folder/targetFile.dat", "./folder/targetFile.link.dat");
64
+ * ```
65
+ */
66
+ async function ensureLink(src, dest) {
67
+ dest = (0, _to_path_string_js_1.toPathString)(dest);
68
+ await (0, ensure_dir_js_1.ensureDir)((0, dirname_js_1.dirname)(dest));
69
+ await dntShim.Deno.link((0, _to_path_string_js_1.toPathString)(src), dest);
70
+ }
71
+ /**
72
+ * Synchronously ensures that the hard link exists.
73
+ *
74
+ * If the parent directories for the hard link do not exist, they are created.
75
+ *
76
+ * Requires `--allow-read` and `--allow-write` permissions.
77
+ *
78
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
79
+ * for more information on Deno's permissions system.
80
+ *
81
+ * @param src The source file path as a string or URL. Directory hard links are
82
+ * not allowed.
83
+ * @param dest The destination link path as a string or URL.
84
+ *
85
+ * @returns A void value that returns once the hard link exists.
86
+ *
87
+ * @example Usage
88
+ * ```ts ignore
89
+ * import { ensureLinkSync } from "@std/fs/ensure-link";
90
+ *
91
+ * ensureLinkSync("./folder/targetFile.dat", "./folder/targetFile.link.dat");
92
+ * ```
93
+ */
94
+ function ensureLinkSync(src, dest) {
95
+ dest = (0, _to_path_string_js_1.toPathString)(dest);
96
+ (0, ensure_dir_js_1.ensureDirSync)((0, dirname_js_1.dirname)(dest));
97
+ dntShim.Deno.linkSync((0, _to_path_string_js_1.toPathString)(src), dest);
98
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Asynchronously ensures that the link exists, and points to a valid file.
3
+ *
4
+ * If the parent directories for the link do not exist, they are created. If the
5
+ * link already exists, and it is not modified, this function does nothing. If
6
+ * the link already exists, and it does not point to the given target, an error
7
+ * is thrown.
8
+ *
9
+ * Requires `--allow-read` and `--allow-write` permissions.
10
+ *
11
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
12
+ * for more information on Deno's permissions system.
13
+ *
14
+ * @param target The source file path as a string or URL. If it is a relative path string, it have to be relative to the link path.
15
+ * @param linkName The destination link path as a string or URL.
16
+ *
17
+ * @returns A void promise that resolves once the link exists.
18
+ *
19
+ * @example Basic usage
20
+ * ```ts ignore
21
+ * import { ensureSymlink } from "@std/fs/ensure-symlink";
22
+ *
23
+ * // Ensures the link `./targetFile.link.dat` exists and points to `./targetFile.dat`
24
+ * await ensureSymlink("./targetFile.dat", "./targetFile.link.dat");
25
+ * ```
26
+ *
27
+ * @example Ensuring a link in a folder
28
+ * ```ts ignore
29
+ * import { ensureSymlink } from "@std/fs/ensure-symlink";
30
+ *
31
+ * // Ensures the link `./folder/targetFile.link.dat` exists and points to `./folder/targetFile.dat`
32
+ * await ensureSymlink("./targetFile.dat", "./folder/targetFile.link.dat");
33
+ * ```
34
+ */
35
+ export declare function ensureSymlink(target: string | URL, linkName: string | URL): Promise<void>;
36
+ /**
37
+ * Synchronously ensures that the link exists, and points to a valid file.
38
+ *
39
+ * If the parent directories for the link do not exist, they are created. If the
40
+ * link already exists, and it is not modified, this function does nothing. If
41
+ * the link already exists, and it does not point to the given target, an error
42
+ * is thrown.
43
+ *
44
+ * Requires `--allow-read` and `--allow-write` permissions.
45
+ *
46
+ * @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
47
+ * for more information on Deno's permissions system.
48
+ *
49
+ * @param target The source file path as a string or URL. If it is a relative path string, it have to be relative to the link path.
50
+ * @param linkName The destination link path as a string or URL.
51
+ * @returns A void value that returns once the link exists.
52
+ *
53
+ * @example Basic usage
54
+ * ```ts ignore
55
+ * import { ensureSymlinkSync } from "@std/fs/ensure-symlink";
56
+ *
57
+ * // Ensures the link `./targetFile.link.dat` exists and points to `./targetFile.dat`
58
+ * ensureSymlinkSync("./targetFile.dat", "./targetFile.link.dat");
59
+ * ```
60
+ *
61
+ * @example Ensuring a link in a folder
62
+ * ```ts ignore
63
+ * import { ensureSymlinkSync } from "@std/fs/ensure-symlink";
64
+ *
65
+ * // Ensures the link `./folder/targetFile.link.dat` exists and points to `./folder/targetFile.dat`
66
+ * ensureSymlinkSync("./targetFile.dat", "./folder/targetFile.link.dat");
67
+ * ```
68
+ */
69
+ export declare function ensureSymlinkSync(target: string | URL, linkName: string | URL): void;
70
+ //# sourceMappingURL=ensure_symlink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_symlink.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fs/1.0.23/ensure_symlink.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,GAAG,GAAG,EACpB,QAAQ,EAAE,MAAM,GAAG,GAAG,iBAyCvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,GAAG,GAAG,EACpB,QAAQ,EAAE,MAAM,GAAG,GAAG,QAyCvB"}