@effect-app/eslint-shared-config 0.4.1 → 0.5.0

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 (166) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/node_modules/@ben_12/eslint-plugin-dprint/dist/lib/dprint/yaml-config-schema.json +20 -0
  3. package/node_modules/@ben_12/eslint-plugin-dprint/package.json +12 -14
  4. package/node_modules/@dprint/formatter/README.md +29 -27
  5. package/node_modules/@dprint/formatter/esm/_dnt.test_polyfills.d.ts.map +1 -0
  6. package/node_modules/@dprint/formatter/esm/common.d.ts +6 -2
  7. package/node_modules/@dprint/formatter/esm/common.d.ts.map +1 -1
  8. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts.map +1 -0
  9. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts.map +1 -0
  10. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/assert.d.ts.map +1 -0
  11. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/assertion_error.d.ts.map +1 -0
  12. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +1 -0
  13. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/equals.d.ts.map +1 -0
  14. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/exists.d.ts.map +1 -0
  15. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/fail.d.ts.map +1 -0
  16. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/false.d.ts.map +1 -0
  17. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/greater.d.ts.map +1 -0
  18. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.d.ts.map +1 -0
  19. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts.map +1 -0
  20. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/is_error.d.ts.map +1 -0
  21. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/less.d.ts.map +1 -0
  22. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/less_or_equal.d.ts.map +1 -0
  23. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/match.d.ts.map +1 -0
  24. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/mod.d.ts.map +1 -0
  25. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts.map +1 -0
  26. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/not_instance_of.d.ts.map +1 -0
  27. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/not_match.d.ts.map +1 -0
  28. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.d.ts.map +1 -0
  29. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/object_match.d.ts.map +1 -0
  30. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/rejects.d.ts.map +1 -0
  31. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/strict_equals.d.ts.map +1 -0
  32. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/string_includes.d.ts.map +1 -0
  33. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/throws.d.ts.map +1 -0
  34. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/unimplemented.d.ts.map +1 -0
  35. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/1.0.16/unreachable.d.ts.map +1 -0
  36. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
  37. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
  38. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
  39. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
  40. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
  41. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
  42. package/node_modules/@dprint/formatter/esm/mod.d.ts +43 -1
  43. package/node_modules/@dprint/formatter/esm/mod.d.ts.map +1 -1
  44. package/node_modules/@dprint/formatter/esm/mod.js +106 -3
  45. package/node_modules/@dprint/formatter/esm/mod_test.d.ts.map +1 -1
  46. package/node_modules/@dprint/formatter/esm/v3.d.ts.map +1 -1
  47. package/node_modules/@dprint/formatter/esm/v3.js +4 -2
  48. package/node_modules/@dprint/formatter/esm/v4.d.ts.map +1 -1
  49. package/node_modules/@dprint/formatter/esm/v4.js +4 -2
  50. package/node_modules/@dprint/formatter/package.json +5 -2
  51. package/node_modules/@dprint/formatter/script/_dnt.test_polyfills.d.ts.map +1 -0
  52. package/node_modules/@dprint/formatter/script/common.d.ts +6 -2
  53. package/node_modules/@dprint/formatter/script/common.d.ts.map +1 -1
  54. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts.map +1 -0
  55. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts.map +1 -0
  56. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/assert.d.ts.map +1 -0
  57. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/assertion_error.d.ts.map +1 -0
  58. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +1 -0
  59. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/equals.d.ts.map +1 -0
  60. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/exists.d.ts.map +1 -0
  61. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/fail.d.ts.map +1 -0
  62. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/false.d.ts.map +1 -0
  63. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/greater.d.ts.map +1 -0
  64. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.d.ts.map +1 -0
  65. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts.map +1 -0
  66. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/is_error.d.ts.map +1 -0
  67. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/less.d.ts.map +1 -0
  68. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/less_or_equal.d.ts.map +1 -0
  69. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/match.d.ts.map +1 -0
  70. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/mod.d.ts.map +1 -0
  71. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts.map +1 -0
  72. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/not_instance_of.d.ts.map +1 -0
  73. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/not_match.d.ts.map +1 -0
  74. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.d.ts.map +1 -0
  75. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/object_match.d.ts.map +1 -0
  76. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/rejects.d.ts.map +1 -0
  77. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/strict_equals.d.ts.map +1 -0
  78. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/string_includes.d.ts.map +1 -0
  79. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/throws.d.ts.map +1 -0
  80. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/unimplemented.d.ts.map +1 -0
  81. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/1.0.16/unreachable.d.ts.map +1 -0
  82. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +1 -0
  83. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +1 -0
  84. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +1 -0
  85. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +1 -0
  86. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +1 -0
  87. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +1 -0
  88. package/node_modules/@dprint/formatter/script/mod.d.ts +43 -1
  89. package/node_modules/@dprint/formatter/script/mod.d.ts.map +1 -1
  90. package/node_modules/@dprint/formatter/script/mod.js +127 -14
  91. package/node_modules/@dprint/formatter/script/mod_test.d.ts.map +1 -1
  92. package/node_modules/@dprint/formatter/script/v3.d.ts.map +1 -1
  93. package/node_modules/@dprint/formatter/script/v3.js +6 -5
  94. package/node_modules/@dprint/formatter/script/v4.d.ts.map +1 -1
  95. package/node_modules/@dprint/formatter/script/v4.js +23 -12
  96. package/package.json +18 -18
  97. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert.d.ts.map +0 -1
  98. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.d.ts.map +0 -1
  99. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.d.ts.map +0 -1
  100. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map +0 -1
  101. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map +0 -1
  102. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map +0 -1
  103. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_greater.d.ts.map +0 -1
  104. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.d.ts.map +0 -1
  105. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.d.ts.map +0 -1
  106. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_is_error.d.ts.map +0 -1
  107. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map +0 -1
  108. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_less_or_equal.d.ts.map +0 -1
  109. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map +0 -1
  110. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.d.ts.map +0 -1
  111. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.d.ts.map +0 -1
  112. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_match.d.ts.map +0 -1
  113. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.d.ts.map +0 -1
  114. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_object_match.d.ts.map +0 -1
  115. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_rejects.d.ts.map +0 -1
  116. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.d.ts.map +0 -1
  117. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.d.ts.map +0 -1
  118. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map +0 -1
  119. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assertion_error.d.ts.map +0 -1
  120. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/equal.d.ts.map +0 -1
  121. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/fail.d.ts.map +0 -1
  122. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/mod.d.ts.map +0 -1
  123. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map +0 -1
  124. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map +0 -1
  125. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map +0 -1
  126. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/diff.d.ts.map +0 -1
  127. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map +0 -1
  128. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/format.d.ts.map +0 -1
  129. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/mod.d.ts.map +0 -1
  130. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/styles.d.ts.map +0 -1
  131. package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/types.d.ts.map +0 -1
  132. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert.d.ts.map +0 -1
  133. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.d.ts.map +0 -1
  134. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.d.ts.map +0 -1
  135. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map +0 -1
  136. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map +0 -1
  137. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map +0 -1
  138. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_greater.d.ts.map +0 -1
  139. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.d.ts.map +0 -1
  140. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.d.ts.map +0 -1
  141. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_is_error.d.ts.map +0 -1
  142. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map +0 -1
  143. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less_or_equal.d.ts.map +0 -1
  144. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map +0 -1
  145. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.d.ts.map +0 -1
  146. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.d.ts.map +0 -1
  147. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_match.d.ts.map +0 -1
  148. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.d.ts.map +0 -1
  149. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_object_match.d.ts.map +0 -1
  150. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_rejects.d.ts.map +0 -1
  151. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.d.ts.map +0 -1
  152. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.d.ts.map +0 -1
  153. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map +0 -1
  154. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assertion_error.d.ts.map +0 -1
  155. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/equal.d.ts.map +0 -1
  156. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/fail.d.ts.map +0 -1
  157. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/mod.d.ts.map +0 -1
  158. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map +0 -1
  159. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map +0 -1
  160. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map +0 -1
  161. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff.d.ts.map +0 -1
  162. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map +0 -1
  163. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/format.d.ts.map +0 -1
  164. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/mod.d.ts.map +0 -1
  165. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/styles.d.ts.map +0 -1
  166. package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/types.d.ts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dprint/formatter",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "Wasm formatter for dprint plugins.",
5
5
  "keywords": [
6
6
  "dprint",
@@ -29,8 +29,11 @@
29
29
  "test": "node test_runner.js"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^20.9.0",
32
+ "@types/node": "^25",
33
33
  "picocolors": "^1.0.0",
34
+ "@dprint/json": "^0.21.1",
35
+ "@dprint/markdown": "^0.20.0",
36
+ "@dprint/typescript": "^0.95.13",
34
37
  "@deno/shim-deno-test": "~0.5.0",
35
38
  "undici": "^4.12.1"
36
39
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_dnt.test_polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.test_polyfills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAgC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAGlE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB;;;;;;;;;;;;;;WAcG;QACH,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;;;;;;;;WAYG;QACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,GAAG,MAAM,CAAC;QACtE;;;;;;;;WAQG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;;;;;;;;;WAYG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;;;;;;;;;;WAYG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,KAAK,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACnD,UAAU,0BAA0B;IAClC,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACxD;AACD,UAAU,0BAA0B;IAClC,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC;CACtC;AACD,UAAU,kBACR,SAAQ,0BAA0B,EAAE,0BAA0B;CAC/D;AAiBD,eAAO,IAAI,6BAA6B,EA2BnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,6BAA6B,EA4DnC,0BAA0B,CAAC;AAMhC,eAAO,IAAI,oBAAoB,EAoB1B,kBAAkB,CAAC"}
@@ -42,14 +42,18 @@ export interface Formatter {
42
42
  * Gets the license text of the plugin.
43
43
  */
44
44
  getLicenseText(): string;
45
+ /**
46
+ * Sets the host formatter for formatting embedded code.
47
+ * @param formatWithHost - A function that formats embedded code blocks.
48
+ */
49
+ setHostFormatter(formatWithHost: ((request: FormatRequest) => string) | undefined): void;
45
50
  /**
46
51
  * Formats the specified file text.
47
52
  * @param request - Data to format.
48
- * @param formatWithHost - Host formatter.
49
53
  * @returns The formatted text.
50
54
  * @throws If there is an error formatting.
51
55
  */
52
- formatText(request: FormatRequest, formatWithHost?: (request: FormatRequest) => string): string;
56
+ formatText(request: FormatRequest): string;
53
57
  }
54
58
  /** Configuration specified for use across plugins. */
55
59
  export interface GlobalConfiguration {
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC,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AU,CAAC;IAC5B;;OAEG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IACxC;;OAEG;IACH,cAAc,IAAI,MAAM,CAAC;IACzB;;;OAGG;IACH,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa,KAAK,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;IACzF;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;CAC5C;AAED,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;CACjD;AAED,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,kCAAkC;AAClC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,QAmBb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,QAwBb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/equal.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAgHrD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAmBb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/exists.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAOlC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/greater.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMpE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAE9B,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAE9C,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,CA6BnC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/less.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMjE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/less_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/not_instance_of.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,EAET,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAClD,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAKjC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/not_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAYb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/object_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAE/B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAChC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,GAAG,CAAC,EAAE,MAAM,GACX,IAAI,CAUN"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/rejects.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,WAAW,CAAC,OAAO,CAAC,EAC9B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;AACpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,EAAE,EAAE,MAAM,WAAW,CAAC,OAAO,CAAC,EAE9B,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/strict_equals.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,CAAC,CAgCrB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/string_includes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/unimplemented.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGjD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.16/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.12/build_message.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ;AAClB;;;GAGG;AACH,UAAU,UAAQ,GACjB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAWvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CASrD;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAC1B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ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.12/format.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAG,CACtB,CAAC,EAAE,OAAO,EACV,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,KACE,MAAM,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAmBzC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.12/styles.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.12/types.ts"],"names":[],"mappings":"AAGA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B,CAAC"}
@@ -1,5 +1,47 @@
1
- import type { Formatter } from "./common.js";
1
+ import type { ConfigurationDiagnostic, FormatRequest, Formatter, GlobalConfiguration } from "./common.js";
2
2
  export type { ConfigurationDiagnostic, FileMatchingInfo, FormatRequest, Formatter, GlobalConfiguration, Host, PluginInfo, } from "./common.js";
3
+ /** A formatter returned from adding a plugin to a context. */
4
+ export interface ContextFormatter {
5
+ /** Formats the specified file text using this plugin. */
6
+ formatText(request: FormatRequest): string;
7
+ /** Gets the resolved configuration for this plugin. */
8
+ getResolvedConfig(): Record<string, unknown>;
9
+ /** Gets the configuration diagnostics for this plugin. */
10
+ getConfigDiagnostics(): ConfigurationDiagnostic[];
11
+ }
12
+ /** A context for managing multiple formatters with shared configuration. */
13
+ export interface FormatterContext {
14
+ /**
15
+ * Adds a plugin to the context.
16
+ * @param source - The buffer or Wasm module of the plugin (e.g., from `@dprint/json` getBuffer()).
17
+ * @param param - Plugin config.
18
+ * @returns A formatter for directly formatting with this plugin.
19
+ */
20
+ addPlugin(source: BufferSource | WebAssembly.Module, pluginConfig?: Record<string, unknown>): ContextFormatter;
21
+ /**
22
+ * Adds a plugin to the context.
23
+ * @param source - Source response object.
24
+ * @param pluginConfig - Plugin config.
25
+ * @returns A formatter for directly formatting with this plugin.
26
+ */
27
+ addPluginStreaming(source: ResponseLike, pluginConfig?: Record<string, unknown>): Promise<ContextFormatter>;
28
+ /**
29
+ * Formats the specified file text, automatically selecting the appropriate plugin.
30
+ * @param request - Data to format.
31
+ * @returns The formatted text.
32
+ * @throws If no plugin matches the file or there is an error formatting.
33
+ */
34
+ formatText(request: FormatRequest): string;
35
+ /**
36
+ * Gets all configuration diagnostics from all plugins.
37
+ */
38
+ getConfigDiagnostics(): ConfigurationDiagnostic[];
39
+ }
40
+ /**
41
+ * Creates a formatter context for managing multiple plugins with shared configuration.
42
+ * @param globalConfig - Global configuration shared across all plugins.
43
+ */
44
+ export declare function createContext(globalConfig?: GlobalConfiguration): FormatterContext;
3
45
  export interface ResponseLike {
4
46
  status: number;
5
47
  arrayBuffer(): Promise<BufferSource>;
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,IAAI,EACJ,UAAU,GACX,MAAM,aAAa,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CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,gBAAgB,CAAC;IAEpB;;;;;OAKG;IACH,kBAAkB,CAChB,MAAM,EAAE,YAAY,EACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;IAE3C;;OAEG;IACH,oBAAoB,IAAI,uBAAuB,EAAE,CAAC;CACnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,YAAY,GAAE,mBAAwB,GAAG,gBAAgB,CA6GtF;AAoBD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,OAAO,EAAE;QACP,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;KAClC,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,eAAe,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,GACpD,OAAO,CAAC,SAAS,CAAC,CAGpB;AAsBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,YAAY,GAAG,SAAS,CAG1E;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAkB9E"}
@@ -15,23 +15,140 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
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
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.createFromWasmModule = exports.createFromBuffer = exports.createStreaming = void 0;
36
+ exports.createContext = createContext;
37
+ exports.createStreaming = createStreaming;
38
+ exports.createFromBuffer = createFromBuffer;
39
+ exports.createFromWasmModule = createFromWasmModule;
27
40
  const v3 = __importStar(require("./v3.js"));
28
41
  const v4 = __importStar(require("./v4.js"));
42
+ /**
43
+ * Creates a formatter context for managing multiple plugins with shared configuration.
44
+ * @param globalConfig - Global configuration shared across all plugins.
45
+ */
46
+ function createContext(globalConfig = {}) {
47
+ const plugins = [];
48
+ function findPluginForFile(filePath) {
49
+ const fileName = getFileName(filePath);
50
+ const ext = getFileExtension(filePath);
51
+ // First try to match by exact file name
52
+ for (const plugin of plugins) {
53
+ if (plugin.fileNames.has(fileName)) {
54
+ return plugin;
55
+ }
56
+ }
57
+ // Then try to match by extension
58
+ if (ext) {
59
+ for (const plugin of plugins) {
60
+ if (plugin.fileExtensions.has(ext)) {
61
+ return plugin;
62
+ }
63
+ }
64
+ }
65
+ return undefined;
66
+ }
67
+ function createHostFormatter(currentPlugin) {
68
+ return (request) => {
69
+ const plugin = findPluginForFile(request.filePath);
70
+ if (plugin && plugin !== currentPlugin) {
71
+ return plugin.formatter.formatText(request);
72
+ }
73
+ // Return unchanged if no other plugin matches
74
+ return request.fileText;
75
+ };
76
+ }
77
+ return {
78
+ async addPluginStreaming(source, pluginConfig) {
79
+ const wasmModule = await createWasmModuleFromStreaming(source);
80
+ return this.addPlugin(wasmModule, pluginConfig);
81
+ },
82
+ addPlugin(source, pluginConfig = {}) {
83
+ const formatter = source instanceof WebAssembly.Module
84
+ ? createFromWasmModule(source)
85
+ : createFromBuffer(source);
86
+ // Set configuration
87
+ formatter.setConfig(globalConfig, pluginConfig);
88
+ // Get file matching info
89
+ const matchingInfo = formatter.getFileMatchingInfo();
90
+ const fileExtensions = new Set(matchingInfo.fileExtensions.map((ext) => ext.toLowerCase()));
91
+ const fileNames = new Set(matchingInfo.fileNames.map((name) => name.toLowerCase()));
92
+ const registered = {
93
+ formatter,
94
+ pluginConfig,
95
+ fileExtensions,
96
+ fileNames,
97
+ };
98
+ plugins.push(registered);
99
+ // Set up host formatter for this plugin
100
+ formatter.setHostFormatter(createHostFormatter(registered));
101
+ // Return a context-aware formatter
102
+ return {
103
+ formatText(request) {
104
+ return formatter.formatText(request);
105
+ },
106
+ getResolvedConfig() {
107
+ return formatter.getResolvedConfig();
108
+ },
109
+ getConfigDiagnostics() {
110
+ return formatter.getConfigDiagnostics();
111
+ },
112
+ };
113
+ },
114
+ formatText(request) {
115
+ const plugin = findPluginForFile(request.filePath);
116
+ if (!plugin) {
117
+ throw new Error(`No plugin found for file: ${request.filePath}. `
118
+ + `Registered plugins handle: ${plugins
119
+ .map((p) => [...p.fileExtensions].join(", "))
120
+ .join("; ")}`);
121
+ }
122
+ return plugin.formatter.formatText(request);
123
+ },
124
+ getConfigDiagnostics() {
125
+ return plugins.flatMap((p) => p.formatter.getConfigDiagnostics());
126
+ },
127
+ };
128
+ }
129
+ function getFileName(filePath) {
130
+ const lastSlash = Math.max(filePath.lastIndexOf("/"), filePath.lastIndexOf("\\"));
131
+ return (lastSlash >= 0 ? filePath.slice(lastSlash + 1) : filePath)
132
+ .toLowerCase();
133
+ }
134
+ function getFileExtension(filePath) {
135
+ const fileName = getFileName(filePath);
136
+ const lastDot = fileName.lastIndexOf(".");
137
+ if (lastDot > 0) {
138
+ return fileName.slice(lastDot + 1);
139
+ }
140
+ return undefined;
141
+ }
29
142
  /**
30
143
  * Creates a formatter from the specified streaming source.
31
144
  * @remarks This is the most efficient way to create a formatter.
32
145
  * @param response - The streaming source to create the formatter from.
33
146
  */
34
147
  async function createStreaming(responsePromise) {
148
+ const wasmModule = await createWasmModuleFromStreaming(responsePromise);
149
+ return createFromWasmModule(wasmModule);
150
+ }
151
+ async function createWasmModuleFromStreaming(responsePromise) {
35
152
  const response = await responsePromise;
36
153
  if (response.status !== 200) {
37
154
  throw new Error(`Unexpected status code: ${response.status}\n${await response.text()}`);
@@ -39,16 +156,14 @@ async function createStreaming(responsePromise) {
39
156
  if (typeof WebAssembly.instantiateStreaming === "function"
40
157
  && response.headers.get("content-type") === "application/wasm") {
41
158
  // deno-lint-ignore no-explicit-any
42
- const module = await WebAssembly.compileStreaming(response);
43
- return createFromWasmModule(module);
159
+ return await WebAssembly.compileStreaming(response);
44
160
  }
45
161
  else {
46
162
  // fallback for node.js or when the content type isn't application/wasm
47
163
  return response.arrayBuffer()
48
- .then((buffer) => createFromBuffer(buffer));
164
+ .then((buffer) => new WebAssembly.Module(buffer));
49
165
  }
50
166
  }
51
- exports.createStreaming = createStreaming;
52
167
  /**
53
168
  * Creates a formatter from the specified wasm module bytes.
54
169
  * @param wasmModuleBuffer - The buffer of the wasm module.
@@ -57,7 +172,6 @@ function createFromBuffer(wasmModuleBuffer) {
57
172
  const wasmModule = new WebAssembly.Module(wasmModuleBuffer);
58
173
  return createFromWasmModule(wasmModule);
59
174
  }
60
- exports.createFromBuffer = createFromBuffer;
61
175
  function createFromWasmModule(wasmModule) {
62
176
  const version = getModuleVersionOrThrow(wasmModule);
63
177
  if (version === 3) {
@@ -72,7 +186,6 @@ function createFromWasmModule(wasmModule) {
72
186
  return v4.createFromInstance(wasmInstance, host);
73
187
  }
74
188
  }
75
- exports.createFromWasmModule = createFromWasmModule;
76
189
  function getModuleVersionOrThrow(module) {
77
190
  const version = getModuleVersion(module);
78
191
  if (version == null) {
@@ -1 +1 @@
1
- {"version":3,"file":"mod_test.d.ts","sourceRoot":"","sources":["../src/mod_test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"mod_test.d.ts","sourceRoot":"","sources":["../src/mod_test.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"v3.d.ts","sourceRoot":"","sources":["../src/v3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAuB,IAAI,EAAc,MAAM,aAAa,CAAC;AAKnG;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAyEjC;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,WAAW,CAAC,QAAQ,EAClC,IAAI,EAAE,IAAI,GACT,SAAS,CAiIX"}
1
+ {"version":3,"file":"v3.d.ts","sourceRoot":"","sources":["../src/v3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAuB,IAAI,EAAc,MAAM,aAAa,CAAC;AAKnG;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAyEjC;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,WAAW,CAAC,QAAQ,EAClC,IAAI,EAAE,IAAI,GACT,SAAS,CAmIX"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFromInstance = exports.createHost = void 0;
3
+ exports.createHost = createHost;
4
+ exports.createFromInstance = createFromInstance;
4
5
  const decoder = new TextDecoder();
5
6
  const encoder = new TextEncoder();
6
7
  /**
@@ -77,7 +78,6 @@ function createHost() {
77
78
  },
78
79
  };
79
80
  }
80
- exports.createHost = createHost;
81
81
  function createFromInstance(wasmInstance, host) {
82
82
  host.setInstance(wasmInstance);
83
83
  // deno-lint-ignore no-explicit-any
@@ -129,12 +129,14 @@ function createFromInstance(wasmInstance, host) {
129
129
  const length = get_license_text();
130
130
  return receiveString(wasmInstance, length);
131
131
  },
132
- formatText(request, formatWithHost) {
132
+ setHostFormatter(formatWithHost) {
133
+ host.setHostFormatter(formatWithHost);
134
+ },
135
+ formatText(request) {
133
136
  if (request.bytesRange != null) {
134
137
  // not supported for v3
135
138
  return request.fileText;
136
139
  }
137
- host.setHostFormatter(formatWithHost);
138
140
  setConfigIfNotSet();
139
141
  if (request.overrideConfig != null) {
140
142
  if (pluginSchemaVersion === 2) {
@@ -175,7 +177,6 @@ function createFromInstance(wasmInstance, host) {
175
177
  configSet = true;
176
178
  }
177
179
  }
178
- exports.createFromInstance = createFromInstance;
179
180
  function sendString(wasmInstance, text) {
180
181
  // deno-lint-ignore no-explicit-any
181
182
  const exports = wasmInstance.exports;
@@ -1 +1 @@
1
- {"version":3,"file":"v4.d.ts","sourceRoot":"","sources":["../src/v4.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,SAAS,EAAuB,IAAI,EAAc,MAAM,aAAa,CAAC;AAMnG;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAuHjC;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,WAAW,CAAC,QAAQ,EAClC,IAAI,EAAE,IAAI,GACT,SAAS,CAmHX"}
1
+ {"version":3,"file":"v4.d.ts","sourceRoot":"","sources":["../src/v4.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,SAAS,EAAuB,IAAI,EAAc,MAAM,aAAa,CAAC;AAMnG;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAuHjC;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,WAAW,CAAC,QAAQ,EAClC,IAAI,EAAE,IAAI,GACT,SAAS,CAoHX"}
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
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
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.createFromInstance = exports.createHost = void 0;
36
+ exports.createHost = createHost;
37
+ exports.createFromInstance = createFromInstance;
27
38
  const dntShim = __importStar(require("./_dnt.shims.js"));
28
39
  const decoder = new TextDecoder();
29
40
  const encoder = new TextEncoder();
@@ -130,7 +141,6 @@ function createHost() {
130
141
  return decoder.decode(getWasmBufferAtPointer(instance, ptr, length));
131
142
  }
132
143
  }
133
- exports.createHost = createHost;
134
144
  function createFromInstance(wasmInstance, host) {
135
145
  host.setInstance(wasmInstance);
136
146
  // only a single config is supported in here atm
@@ -165,12 +175,14 @@ function createFromInstance(wasmInstance, host) {
165
175
  const length = get_license_text();
166
176
  return receiveString(length);
167
177
  },
168
- formatText(request, formatWithHost) {
178
+ setHostFormatter(formatWithHost) {
179
+ host.setHostFormatter(formatWithHost);
180
+ },
181
+ formatText(request) {
169
182
  if (request.bytesRange != null && format_range == null) {
170
183
  // plugin doesn't support range formatting
171
184
  return request.fileText;
172
185
  }
173
- host.setHostFormatter(formatWithHost);
174
186
  setConfigIfNotSet();
175
187
  if (request.overrideConfig != null) {
176
188
  sendString(JSON.stringify(request.overrideConfig));
@@ -218,7 +230,6 @@ function createFromInstance(wasmInstance, host) {
218
230
  return decoder.decode(getWasmBufferAtPointer(wasmInstance, ptr, length));
219
231
  }
220
232
  }
221
- exports.createFromInstance = createFromInstance;
222
233
  function getWasmBufferAtPointer(wasmInstance, pointer, length) {
223
234
  return new Uint8Array(
224
235
  // deno-lint-ignore no-explicit-any