@effect-app/eslint-shared-config 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/node_modules/@dprint/formatter/LICENSE +21 -0
- package/node_modules/@dprint/formatter/README.md +70 -0
- package/node_modules/@dprint/formatter/esm/_dnt.shims.d.ts +2 -0
- package/node_modules/@dprint/formatter/esm/_dnt.shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/_dnt.shims.js +57 -0
- package/node_modules/@dprint/formatter/esm/_dnt.test_shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/common.d.ts +80 -0
- package/node_modules/@dprint/formatter/esm/common.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/common.js +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_greater.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_is_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_less_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_object_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_rejects.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assertion_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/fail.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/diff.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/format.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/styles.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/types.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/mod.d.ts +23 -0
- package/node_modules/@dprint/formatter/esm/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/mod.js +84 -0
- package/node_modules/@dprint/formatter/esm/mod_test.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/package.json +3 -0
- package/node_modules/@dprint/formatter/esm/v3.d.ts +7 -0
- package/node_modules/@dprint/formatter/esm/v3.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/v3.js +216 -0
- package/node_modules/@dprint/formatter/esm/v4.d.ts +7 -0
- package/node_modules/@dprint/formatter/esm/v4.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/v4.js +198 -0
- package/node_modules/@dprint/formatter/package.json +38 -0
- package/node_modules/@dprint/formatter/script/_dnt.shims.d.ts +2 -0
- package/node_modules/@dprint/formatter/script/_dnt.shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/_dnt.shims.js +60 -0
- package/node_modules/@dprint/formatter/script/_dnt.test_shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/common.d.ts +80 -0
- package/node_modules/@dprint/formatter/script/common.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/common.js +2 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_greater.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_is_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_object_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_rejects.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assertion_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/fail.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/format.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/styles.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/types.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/mod.d.ts +23 -0
- package/node_modules/@dprint/formatter/script/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/mod.js +113 -0
- package/node_modules/@dprint/formatter/script/mod_test.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/package.json +3 -0
- package/node_modules/@dprint/formatter/script/v3.d.ts +7 -0
- package/node_modules/@dprint/formatter/script/v3.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/v3.js +221 -0
- package/node_modules/@dprint/formatter/script/v4.d.ts +7 -0
- package/node_modules/@dprint/formatter/script/v4.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/v4.js +226 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/package.json +3 -1
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_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":"assert_less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_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"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAOb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;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":"assert_not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,EAET,cAAc,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACzC,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAKjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_not_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAQb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;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":"assert_object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_object_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;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,CA+EN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_rejects.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_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,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACrC,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;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,CA+BrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAOb"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_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,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACrC,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;;;;;;;OAUG;gBACS,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/equal.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CA8FrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/unimplemented.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGjD"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAElD"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.0/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,CASvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CASrD;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,OAAO,GAAE,mBAAwB,GAChC,MAAM,EAAE,CAsBV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.0/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAanD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CASvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,CAAC,EAAE,EACN,CAAC,EAAE,CAAC,EAAE,EACN,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,GACzB,KAAK,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAgCD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,aAAa,GACnB,aAAa,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAwEvD"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.0/diff_str.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAW/C;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.0/format.ts"],"names":[],"mappings":"AAuBA,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAezC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.0/mod.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.0/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.0/types.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,6BAA6B;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,+BAA+B;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Formatter } from "./common.js";
|
|
2
|
+
export type { ConfigurationDiagnostic, FileMatchingInfo, FormatRequest, Formatter, GlobalConfiguration, Host, PluginInfo, } from "./common.js";
|
|
3
|
+
export interface ResponseLike {
|
|
4
|
+
status: number;
|
|
5
|
+
arrayBuffer(): Promise<BufferSource>;
|
|
6
|
+
text(): Promise<string>;
|
|
7
|
+
headers: {
|
|
8
|
+
get(name: string): string | null;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates a formatter from the specified streaming source.
|
|
13
|
+
* @remarks This is the most efficient way to create a formatter.
|
|
14
|
+
* @param response - The streaming source to create the formatter from.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createStreaming(responsePromise: Promise<ResponseLike> | ResponseLike): Promise<Formatter>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a formatter from the specified wasm module bytes.
|
|
19
|
+
* @param wasmModuleBuffer - The buffer of the wasm module.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createFromBuffer(wasmModuleBuffer: BufferSource): Formatter;
|
|
22
|
+
export declare function createFromWasmModule(wasmModule: WebAssembly.Module): Formatter;
|
|
23
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +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,CAAC;AAErB,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,CAmBpB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,YAAY,GAAG,SAAS,CAG1E;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAkB9E"}
|
|
@@ -0,0 +1,113 @@
|
|
|
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 (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
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.createFromWasmModule = exports.createFromBuffer = exports.createStreaming = void 0;
|
|
27
|
+
const v3 = __importStar(require("./v3.js"));
|
|
28
|
+
const v4 = __importStar(require("./v4.js"));
|
|
29
|
+
/**
|
|
30
|
+
* Creates a formatter from the specified streaming source.
|
|
31
|
+
* @remarks This is the most efficient way to create a formatter.
|
|
32
|
+
* @param response - The streaming source to create the formatter from.
|
|
33
|
+
*/
|
|
34
|
+
async function createStreaming(responsePromise) {
|
|
35
|
+
const response = await responsePromise;
|
|
36
|
+
if (response.status !== 200) {
|
|
37
|
+
throw new Error(`Unexpected status code: ${response.status}\n${await response.text()}`);
|
|
38
|
+
}
|
|
39
|
+
if (typeof WebAssembly.instantiateStreaming === "function"
|
|
40
|
+
&& response.headers.get("content-type") === "application/wasm") {
|
|
41
|
+
// deno-lint-ignore no-explicit-any
|
|
42
|
+
const module = await WebAssembly.compileStreaming(response);
|
|
43
|
+
return createFromWasmModule(module);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// fallback for node.js or when the content type isn't application/wasm
|
|
47
|
+
return response.arrayBuffer()
|
|
48
|
+
.then((buffer) => createFromBuffer(buffer));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.createStreaming = createStreaming;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a formatter from the specified wasm module bytes.
|
|
54
|
+
* @param wasmModuleBuffer - The buffer of the wasm module.
|
|
55
|
+
*/
|
|
56
|
+
function createFromBuffer(wasmModuleBuffer) {
|
|
57
|
+
const wasmModule = new WebAssembly.Module(wasmModuleBuffer);
|
|
58
|
+
return createFromWasmModule(wasmModule);
|
|
59
|
+
}
|
|
60
|
+
exports.createFromBuffer = createFromBuffer;
|
|
61
|
+
function createFromWasmModule(wasmModule) {
|
|
62
|
+
const version = getModuleVersionOrThrow(wasmModule);
|
|
63
|
+
if (version === 3) {
|
|
64
|
+
const host = v3.createHost();
|
|
65
|
+
const wasmInstance = new WebAssembly.Instance(wasmModule, host.createImportObject());
|
|
66
|
+
return v3.createFromInstance(wasmInstance, host);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
const _assert4 = version;
|
|
70
|
+
const host = v4.createHost();
|
|
71
|
+
const wasmInstance = new WebAssembly.Instance(wasmModule, host.createImportObject());
|
|
72
|
+
return v4.createFromInstance(wasmInstance, host);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.createFromWasmModule = createFromWasmModule;
|
|
76
|
+
function getModuleVersionOrThrow(module) {
|
|
77
|
+
const version = getModuleVersion(module);
|
|
78
|
+
if (version == null) {
|
|
79
|
+
throw new Error("Couldn't determine dprint plugin version. Maybe the js-formatter version is too old?");
|
|
80
|
+
}
|
|
81
|
+
else if (version === 3 || version === 4) {
|
|
82
|
+
return version;
|
|
83
|
+
}
|
|
84
|
+
else if (version > 4) {
|
|
85
|
+
throw new Error(`Unsupported new dprint plugin version '${version}'. Maybe the js-formatter version is too old?`);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
throw new Error(`Unsupported old dprint plugin version '${version}'. Please upgrade the plugin.`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function getModuleVersion(module) {
|
|
92
|
+
function getVersionFromExport(name) {
|
|
93
|
+
if (name === "get_plugin_schema_version") {
|
|
94
|
+
return 3;
|
|
95
|
+
}
|
|
96
|
+
const prefix = "dprint_plugin_version_";
|
|
97
|
+
if (name.startsWith(prefix)) {
|
|
98
|
+
const value = parseInt(name.substring(prefix.length), 10);
|
|
99
|
+
if (!isNaN(value)) {
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
const exports = WebAssembly.Module.exports(module);
|
|
106
|
+
for (const e of exports) {
|
|
107
|
+
const maybeVersion = getVersionFromExport(e.name);
|
|
108
|
+
if (maybeVersion != null) {
|
|
109
|
+
return maybeVersion;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod_test.d.ts","sourceRoot":"","sources":["../src/mod_test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Formatter, Host } from "./common.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates host for host formatting.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createHost(): Host;
|
|
6
|
+
export declare function createFromInstance(wasmInstance: WebAssembly.Instance, host: Host): Formatter;
|
|
7
|
+
//# sourceMappingURL=v3.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFromInstance = exports.createHost = void 0;
|
|
4
|
+
const decoder = new TextDecoder();
|
|
5
|
+
const encoder = new TextEncoder();
|
|
6
|
+
/**
|
|
7
|
+
* Creates host for host formatting.
|
|
8
|
+
*/
|
|
9
|
+
function createHost() {
|
|
10
|
+
let instance;
|
|
11
|
+
let hostFormatter = undefined;
|
|
12
|
+
let overrideConfig = {};
|
|
13
|
+
let filePath = "";
|
|
14
|
+
let formattedText = "";
|
|
15
|
+
let errorText = "";
|
|
16
|
+
return {
|
|
17
|
+
setInstance(wasmInstance) {
|
|
18
|
+
instance = wasmInstance;
|
|
19
|
+
},
|
|
20
|
+
setHostFormatter(formatWithHost) {
|
|
21
|
+
hostFormatter = formatWithHost;
|
|
22
|
+
},
|
|
23
|
+
createImportObject() {
|
|
24
|
+
let sharedBuffer = new Uint8Array(0);
|
|
25
|
+
let sharedBufferIndex = 0;
|
|
26
|
+
const resetSharedBuffer = (length) => {
|
|
27
|
+
sharedBuffer = new Uint8Array(length);
|
|
28
|
+
sharedBufferIndex = 0;
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
dprint: {
|
|
32
|
+
"host_clear_bytes": (length) => {
|
|
33
|
+
resetSharedBuffer(length);
|
|
34
|
+
},
|
|
35
|
+
"host_read_buffer": (pointer, length) => {
|
|
36
|
+
sharedBuffer.set(getWasmBufferAtPointer(instance, pointer, length), sharedBufferIndex);
|
|
37
|
+
sharedBufferIndex += length;
|
|
38
|
+
},
|
|
39
|
+
"host_write_buffer": (pointer, index, length) => {
|
|
40
|
+
getWasmBufferAtPointer(instance, pointer, length).set(sharedBuffer.slice(index, index + length));
|
|
41
|
+
},
|
|
42
|
+
"host_take_file_path": () => {
|
|
43
|
+
filePath = decoder.decode(sharedBuffer);
|
|
44
|
+
resetSharedBuffer(0);
|
|
45
|
+
},
|
|
46
|
+
"host_take_override_config": () => {
|
|
47
|
+
overrideConfig = JSON.parse(decoder.decode(sharedBuffer));
|
|
48
|
+
resetSharedBuffer(0);
|
|
49
|
+
},
|
|
50
|
+
"host_format": () => {
|
|
51
|
+
const fileText = decoder.decode(sharedBuffer);
|
|
52
|
+
try {
|
|
53
|
+
formattedText = hostFormatter?.({
|
|
54
|
+
filePath,
|
|
55
|
+
fileText,
|
|
56
|
+
overrideConfig,
|
|
57
|
+
}) ?? fileText;
|
|
58
|
+
return fileText === formattedText ? 0 : 1;
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
errorText = String(error);
|
|
62
|
+
return 2;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"host_get_formatted_text": () => {
|
|
66
|
+
sharedBuffer = encoder.encode(formattedText);
|
|
67
|
+
sharedBufferIndex = 0;
|
|
68
|
+
return sharedBuffer.length;
|
|
69
|
+
},
|
|
70
|
+
"host_get_error_text": () => {
|
|
71
|
+
sharedBuffer = encoder.encode(errorText);
|
|
72
|
+
sharedBufferIndex = 0;
|
|
73
|
+
return sharedBuffer.length;
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
exports.createHost = createHost;
|
|
81
|
+
function createFromInstance(wasmInstance, host) {
|
|
82
|
+
host.setInstance(wasmInstance);
|
|
83
|
+
// deno-lint-ignore no-explicit-any
|
|
84
|
+
const wasmExports = wasmInstance.exports;
|
|
85
|
+
const { get_plugin_schema_version, set_file_path, set_override_config, get_formatted_text, format, get_error_text, get_plugin_info, get_resolved_config, get_config_diagnostics, set_global_config, set_plugin_config, get_license_text, reset_config, } = wasmExports;
|
|
86
|
+
const pluginSchemaVersion = get_plugin_schema_version();
|
|
87
|
+
const expectedPluginSchemaVersion = 3;
|
|
88
|
+
if (pluginSchemaVersion !== 2
|
|
89
|
+
&& pluginSchemaVersion !== expectedPluginSchemaVersion) {
|
|
90
|
+
throw new Error(`Not compatible plugin. `
|
|
91
|
+
+ `Expected schema ${expectedPluginSchemaVersion}, `
|
|
92
|
+
+ `but plugin had ${pluginSchemaVersion}.`);
|
|
93
|
+
}
|
|
94
|
+
let configSet = false;
|
|
95
|
+
return {
|
|
96
|
+
setConfig(globalConfig, pluginConfig) {
|
|
97
|
+
setConfig(globalConfig, pluginConfig);
|
|
98
|
+
},
|
|
99
|
+
getConfigDiagnostics() {
|
|
100
|
+
setConfigIfNotSet();
|
|
101
|
+
const length = get_config_diagnostics();
|
|
102
|
+
return JSON.parse(receiveString(wasmInstance, length));
|
|
103
|
+
},
|
|
104
|
+
getResolvedConfig() {
|
|
105
|
+
setConfigIfNotSet();
|
|
106
|
+
const length = get_resolved_config();
|
|
107
|
+
return JSON.parse(receiveString(wasmInstance, length));
|
|
108
|
+
},
|
|
109
|
+
getFileMatchingInfo() {
|
|
110
|
+
const length = get_plugin_info();
|
|
111
|
+
const pluginInfo = JSON.parse(receiveString(wasmInstance, length));
|
|
112
|
+
return {
|
|
113
|
+
// deno-lint-ignore no-explicit-any
|
|
114
|
+
fileExtensions: pluginInfo.fileExtensions ?? [],
|
|
115
|
+
// deno-lint-ignore no-explicit-any
|
|
116
|
+
fileNames: pluginInfo.fileNames ?? [],
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
getPluginInfo() {
|
|
120
|
+
const length = get_plugin_info();
|
|
121
|
+
const pluginInfo = JSON.parse(receiveString(wasmInstance, length));
|
|
122
|
+
// deno-lint-ignore no-explicit-any
|
|
123
|
+
delete pluginInfo.fileNames;
|
|
124
|
+
// deno-lint-ignore no-explicit-any
|
|
125
|
+
delete pluginInfo.fileExtensions;
|
|
126
|
+
return pluginInfo;
|
|
127
|
+
},
|
|
128
|
+
getLicenseText() {
|
|
129
|
+
const length = get_license_text();
|
|
130
|
+
return receiveString(wasmInstance, length);
|
|
131
|
+
},
|
|
132
|
+
formatText(request, formatWithHost) {
|
|
133
|
+
if (request.bytesRange != null) {
|
|
134
|
+
// not supported for v3
|
|
135
|
+
return request.fileText;
|
|
136
|
+
}
|
|
137
|
+
host.setHostFormatter(formatWithHost);
|
|
138
|
+
setConfigIfNotSet();
|
|
139
|
+
if (request.overrideConfig != null) {
|
|
140
|
+
if (pluginSchemaVersion === 2) {
|
|
141
|
+
throw new Error("Cannot set the override configuration for this old plugin.");
|
|
142
|
+
}
|
|
143
|
+
sendString(wasmInstance, JSON.stringify(request.overrideConfig));
|
|
144
|
+
set_override_config();
|
|
145
|
+
}
|
|
146
|
+
sendString(wasmInstance, request.filePath);
|
|
147
|
+
set_file_path();
|
|
148
|
+
sendString(wasmInstance, request.fileText);
|
|
149
|
+
const responseCode = format();
|
|
150
|
+
switch (responseCode) {
|
|
151
|
+
case 0: // no change
|
|
152
|
+
return request.fileText;
|
|
153
|
+
case 1: // change
|
|
154
|
+
return receiveString(wasmInstance, get_formatted_text());
|
|
155
|
+
case 2: // error
|
|
156
|
+
throw new Error(receiveString(wasmInstance, get_error_text()));
|
|
157
|
+
default:
|
|
158
|
+
throw new Error(`Unexpected response code: ${responseCode}`);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
function setConfigIfNotSet() {
|
|
163
|
+
if (!configSet) {
|
|
164
|
+
setConfig({}, {});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function setConfig(globalConfig, pluginConfig) {
|
|
168
|
+
if (reset_config != null) {
|
|
169
|
+
reset_config();
|
|
170
|
+
}
|
|
171
|
+
sendString(wasmInstance, JSON.stringify(globalConfig));
|
|
172
|
+
set_global_config();
|
|
173
|
+
sendString(wasmInstance, JSON.stringify(pluginConfig));
|
|
174
|
+
set_plugin_config();
|
|
175
|
+
configSet = true;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
exports.createFromInstance = createFromInstance;
|
|
179
|
+
function sendString(wasmInstance, text) {
|
|
180
|
+
// deno-lint-ignore no-explicit-any
|
|
181
|
+
const exports = wasmInstance.exports;
|
|
182
|
+
const encodedText = encoder.encode(text);
|
|
183
|
+
const length = encodedText.length;
|
|
184
|
+
const memoryBufferSize = exports.get_wasm_memory_buffer_size();
|
|
185
|
+
const memoryBufferPointer = getWasmMemoryBufferPointer(wasmInstance);
|
|
186
|
+
exports.clear_shared_bytes(length);
|
|
187
|
+
let index = 0;
|
|
188
|
+
while (index < length) {
|
|
189
|
+
const writeCount = Math.min(length - index, memoryBufferSize);
|
|
190
|
+
const wasmBuffer = getWasmBufferAtPointer(wasmInstance, memoryBufferPointer, writeCount);
|
|
191
|
+
wasmBuffer.set(encodedText.slice(index, index + writeCount));
|
|
192
|
+
exports.add_to_shared_bytes_from_buffer(writeCount);
|
|
193
|
+
index += writeCount;
|
|
194
|
+
}
|
|
195
|
+
return length;
|
|
196
|
+
}
|
|
197
|
+
function receiveString(wasmInstance, length) {
|
|
198
|
+
// deno-lint-ignore no-explicit-any
|
|
199
|
+
const exports = wasmInstance.exports;
|
|
200
|
+
const memoryBufferSize = exports.get_wasm_memory_buffer_size();
|
|
201
|
+
const memoryBufferPointer = getWasmMemoryBufferPointer(wasmInstance);
|
|
202
|
+
const buffer = new Uint8Array(length);
|
|
203
|
+
let index = 0;
|
|
204
|
+
while (index < length) {
|
|
205
|
+
const readCount = Math.min(length - index, memoryBufferSize);
|
|
206
|
+
exports.set_buffer_with_shared_bytes(index, readCount);
|
|
207
|
+
const wasmBuffer = getWasmBufferAtPointer(wasmInstance, memoryBufferPointer, readCount);
|
|
208
|
+
buffer.set(wasmBuffer, index);
|
|
209
|
+
index += readCount;
|
|
210
|
+
}
|
|
211
|
+
return decoder.decode(buffer);
|
|
212
|
+
}
|
|
213
|
+
function getWasmMemoryBufferPointer(wasmInstance) {
|
|
214
|
+
// deno-lint-ignore no-explicit-any
|
|
215
|
+
return wasmInstance.exports.get_wasm_memory_buffer();
|
|
216
|
+
}
|
|
217
|
+
function getWasmBufferAtPointer(wasmInstance, pointer, length) {
|
|
218
|
+
return new Uint8Array(
|
|
219
|
+
// deno-lint-ignore no-explicit-any
|
|
220
|
+
wasmInstance.exports.memory.buffer, pointer, length);
|
|
221
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Formatter, Host } from "./common.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates host for host formatting.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createHost(): Host;
|
|
6
|
+
export declare function createFromInstance(wasmInstance: WebAssembly.Instance, host: Host): Formatter;
|
|
7
|
+
//# sourceMappingURL=v4.d.ts.map
|
|
@@ -0,0 +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"}
|