@effectionx/worker 0.3.1 → 0.4.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.
- package/dist/message-channel.d.ts.map +1 -0
- package/dist/mod.d.ts +4 -0
- package/dist/mod.d.ts.map +1 -0
- package/{esm → dist}/mod.js +1 -0
- package/dist/test-simple-worker.d.ts +2 -0
- package/dist/test-simple-worker.d.ts.map +1 -0
- package/dist/test-simple-worker.js +11 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts.map +1 -0
- package/{esm → dist}/worker-main.d.ts +1 -1
- package/dist/worker-main.d.ts.map +1 -0
- package/{esm → dist}/worker-main.js +34 -16
- package/dist/worker.d.ts.map +1 -0
- package/{esm → dist}/worker.js +3 -4
- package/message-channel.ts +13 -0
- package/mod.ts +3 -0
- package/package.json +22 -16
- package/test-assets/boom-result-worker.ts +5 -0
- package/test-assets/boom-worker.ts +7 -0
- package/test-assets/counter-worker.ts +15 -0
- package/test-assets/crash-worker.ts +1 -0
- package/test-assets/echo-worker.ts +7 -0
- package/test-assets/result-worker.ts +5 -0
- package/test-assets/shutdown-worker.ts +24 -0
- package/test-assets/suspend-worker.ts +4 -0
- package/test-simple-worker.ts +12 -0
- package/tsconfig.json +20 -0
- package/types.ts +38 -0
- package/worker-main.ts +248 -0
- package/worker.test.ts +179 -0
- package/worker.ts +159 -0
- package/esm/_dnt.shims.d.ts +0 -2
- package/esm/_dnt.shims.d.ts.map +0 -1
- package/esm/_dnt.shims.js +0 -57
- package/esm/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/almost_equals.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/array_includes.js +0 -46
- package/esm/deps/jsr.io/@std/assert/1.0.16/assert.d.ts +0 -16
- package/esm/deps/jsr.io/@std/assert/1.0.16/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/assert.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.16/assertion_error.d.ts +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.16/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/assertion_error.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.16/equal.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/equal.js +0 -186
- package/esm/deps/jsr.io/@std/assert/1.0.16/equals.d.ts +0 -35
- package/esm/deps/jsr.io/@std/assert/1.0.16/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/equals.js +0 -59
- package/esm/deps/jsr.io/@std/assert/1.0.16/exists.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.16/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/exists.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.16/fail.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.16/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/fail.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/false.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.16/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/false.js +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.16/greater.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/greater.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/instance_of.js +0 -52
- package/esm/deps/jsr.io/@std/assert/1.0.16/is_error.d.ts +0 -25
- package/esm/deps/jsr.io/@std/assert/1.0.16/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/is_error.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.16/less.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.16/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/less.js +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.16/less_or_equal.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/less_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.16/match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.16/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.16/mod.d.ts +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.16/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/mod.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts +0 -21
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_equals.js +0 -33
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_instance_of.d.ts +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_instance_of.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_match.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.16/object_match.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.16/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/object_match.js +0 -167
- package/esm/deps/jsr.io/@std/assert/1.0.16/rejects.d.ts +0 -42
- package/esm/deps/jsr.io/@std/assert/1.0.16/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/rejects.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.16/strict_equals.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.16/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/strict_equals.js +0 -58
- package/esm/deps/jsr.io/@std/assert/1.0.16/string_includes.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.16/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/string_includes.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.16/throws.d.ts +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.16/throws.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/throws.js +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.16/unimplemented.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.16/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/unimplemented.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/unreachable.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.16/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.16/unreachable.js +0 -20
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +0 -80
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.12/build_message.js +0 -116
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts +0 -140
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff.js +0 -276
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts +0 -99
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.12/diff_str.js +0 -182
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts +0 -29
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.12/format.js +0 -70
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts +0 -159
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.12/styles.js +0 -207
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts +0 -25
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.12/types.js +0 -3
- package/esm/message-channel.d.ts.map +0 -1
- package/esm/mod.d.ts +0 -3
- package/esm/mod.d.ts.map +0 -1
- package/esm/package.json +0 -3
- package/esm/types.d.ts.map +0 -1
- package/esm/worker-main.d.ts.map +0 -1
- package/esm/worker.d.ts.map +0 -1
- package/script/_dnt.shims.d.ts +0 -2
- package/script/_dnt.shims.d.ts.map +0 -1
- package/script/_dnt.shims.js +0 -60
- package/script/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.16/almost_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/almost_equals.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.16/array_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/array_includes.js +0 -49
- package/script/deps/jsr.io/@std/assert/1.0.16/assert.d.ts +0 -16
- package/script/deps/jsr.io/@std/assert/1.0.16/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/assert.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.16/assertion_error.d.ts +0 -26
- package/script/deps/jsr.io/@std/assert/1.0.16/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/assertion_error.js +0 -34
- package/script/deps/jsr.io/@std/assert/1.0.16/equal.d.ts +0 -17
- package/script/deps/jsr.io/@std/assert/1.0.16/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/equal.js +0 -222
- package/script/deps/jsr.io/@std/assert/1.0.16/equals.d.ts +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.16/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/equals.js +0 -62
- package/script/deps/jsr.io/@std/assert/1.0.16/exists.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.16/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/exists.js +0 -30
- package/script/deps/jsr.io/@std/assert/1.0.16/fail.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.16/fail.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/fail.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.16/false.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.16/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/false.js +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.16/greater.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.16/greater.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/greater.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/greater_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/instance_of.js +0 -55
- package/script/deps/jsr.io/@std/assert/1.0.16/is_error.d.ts +0 -25
- package/script/deps/jsr.io/@std/assert/1.0.16/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/is_error.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.16/less.d.ts +0 -19
- package/script/deps/jsr.io/@std/assert/1.0.16/less.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/less.js +0 -31
- package/script/deps/jsr.io/@std/assert/1.0.16/less_or_equal.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.16/less_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/less_or_equal.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.16/match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.16/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.16/mod.d.ts +0 -44
- package/script/deps/jsr.io/@std/assert/1.0.16/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/mod.js +0 -61
- package/script/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts +0 -21
- package/script/deps/jsr.io/@std/assert/1.0.16/not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/not_equals.js +0 -36
- package/script/deps/jsr.io/@std/assert/1.0.16/not_instance_of.d.ts +0 -20
- package/script/deps/jsr.io/@std/assert/1.0.16/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/not_instance_of.js +0 -32
- package/script/deps/jsr.io/@std/assert/1.0.16/not_match.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.16/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/not_match.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/not_strict_equals.js +0 -35
- package/script/deps/jsr.io/@std/assert/1.0.16/object_match.d.ts +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.16/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/object_match.js +0 -170
- package/script/deps/jsr.io/@std/assert/1.0.16/rejects.d.ts +0 -42
- package/script/deps/jsr.io/@std/assert/1.0.16/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/rejects.js +0 -56
- package/script/deps/jsr.io/@std/assert/1.0.16/strict_equals.d.ts +0 -24
- package/script/deps/jsr.io/@std/assert/1.0.16/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/strict_equals.js +0 -61
- package/script/deps/jsr.io/@std/assert/1.0.16/string_includes.d.ts +0 -18
- package/script/deps/jsr.io/@std/assert/1.0.16/string_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/string_includes.js +0 -29
- package/script/deps/jsr.io/@std/assert/1.0.16/throws.d.ts +0 -45
- package/script/deps/jsr.io/@std/assert/1.0.16/throws.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/throws.js +0 -47
- package/script/deps/jsr.io/@std/assert/1.0.16/unimplemented.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.16/unimplemented.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/unimplemented.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.16/unreachable.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.16/unreachable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.16/unreachable.js +0 -23
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts +0 -80
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.12/build_message.js +0 -121
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.d.ts +0 -140
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.12/diff.js +0 -283
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts +0 -99
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.12/diff_str.js +0 -188
- package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts +0 -29
- package/script/deps/jsr.io/@std/internal/1.0.12/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.12/format.js +0 -106
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.d.ts +0 -159
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.12/styles.js +0 -252
- package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts +0 -25
- package/script/deps/jsr.io/@std/internal/1.0.12/types.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.12/types.js +0 -4
- package/script/message-channel.d.ts +0 -3
- package/script/message-channel.d.ts.map +0 -1
- package/script/message-channel.js +0 -16
- package/script/mod.d.ts +0 -3
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -18
- package/script/package.json +0 -3
- package/script/types.d.ts +0 -33
- package/script/types.d.ts.map +0 -1
- package/script/types.js +0 -2
- package/script/worker-main.d.ts +0 -84
- package/script/worker-main.d.ts.map +0 -1
- package/script/worker-main.js +0 -190
- package/script/worker.d.ts +0 -63
- package/script/worker.d.ts.map +0 -1
- package/script/worker.js +0 -124
- /package/{esm → dist}/message-channel.d.ts +0 -0
- /package/{esm → dist}/message-channel.js +0 -0
- /package/{esm → dist}/types.d.ts +0 -0
- /package/{esm → dist}/types.js +0 -0
- /package/{esm → dist}/worker.d.ts +0 -0
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the style of text to be printed to bold.
|
|
3
|
-
*
|
|
4
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
5
|
-
*
|
|
6
|
-
* @param str Text to make bold
|
|
7
|
-
*
|
|
8
|
-
* @returns Bold text for printing
|
|
9
|
-
*
|
|
10
|
-
* @example Usage
|
|
11
|
-
* ```ts no-assert
|
|
12
|
-
* import { bold } from "@std/internal/styles";
|
|
13
|
-
*
|
|
14
|
-
* console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function bold(str: string): string;
|
|
18
|
-
/**
|
|
19
|
-
* Sets the color of text to be printed to red.
|
|
20
|
-
*
|
|
21
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
22
|
-
*
|
|
23
|
-
* @param str Text to make red
|
|
24
|
-
*
|
|
25
|
-
* @returns Red text for printing
|
|
26
|
-
*
|
|
27
|
-
* @example Usage
|
|
28
|
-
* ```ts no-assert
|
|
29
|
-
* import { red } from "@std/internal/styles";
|
|
30
|
-
*
|
|
31
|
-
* console.log(red("Hello, world!")); // Prints "Hello, world!" in red
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function red(str: string): string;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the color of text to be printed to green.
|
|
37
|
-
*
|
|
38
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
39
|
-
*
|
|
40
|
-
* @param str Text to make green
|
|
41
|
-
*
|
|
42
|
-
* @returns Green text for print
|
|
43
|
-
*
|
|
44
|
-
* @example Usage
|
|
45
|
-
* ```ts no-assert
|
|
46
|
-
* import { green } from "@std/internal/styles";
|
|
47
|
-
*
|
|
48
|
-
* console.log(green("Hello, world!")); // Prints "Hello, world!" in green
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export declare function green(str: string): string;
|
|
52
|
-
/**
|
|
53
|
-
* Sets the color of text to be printed to yellow.
|
|
54
|
-
*
|
|
55
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
56
|
-
*
|
|
57
|
-
* @param str Text to make yellow
|
|
58
|
-
*
|
|
59
|
-
* @returns Yellow text for print
|
|
60
|
-
*
|
|
61
|
-
* @example Usage
|
|
62
|
-
* ```ts no-assert
|
|
63
|
-
* import { yellow } from "@std/internal/styles";
|
|
64
|
-
*
|
|
65
|
-
* console.log(yellow("Hello, world!")); // Prints "Hello, world!" in yellow
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
export declare function yellow(str: string): string;
|
|
69
|
-
/**
|
|
70
|
-
* Sets the color of text to be printed to white.
|
|
71
|
-
*
|
|
72
|
-
* @param str Text to make white
|
|
73
|
-
*
|
|
74
|
-
* @returns White text for print
|
|
75
|
-
*
|
|
76
|
-
* @example Usage
|
|
77
|
-
* ```ts no-assert
|
|
78
|
-
* import { white } from "@std/internal/styles";
|
|
79
|
-
*
|
|
80
|
-
* console.log(white("Hello, world!")); // Prints "Hello, world!" in white
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
export declare function white(str: string): string;
|
|
84
|
-
/**
|
|
85
|
-
* Sets the color of text to be printed to gray.
|
|
86
|
-
*
|
|
87
|
-
* @param str Text to make gray
|
|
88
|
-
*
|
|
89
|
-
* @returns Gray text for print
|
|
90
|
-
*
|
|
91
|
-
* @example Usage
|
|
92
|
-
* ```ts no-assert
|
|
93
|
-
* import { gray } from "@std/internal/styles";
|
|
94
|
-
*
|
|
95
|
-
* console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
export declare function gray(str: string): string;
|
|
99
|
-
/**
|
|
100
|
-
* Sets the color of text to be printed to bright-black.
|
|
101
|
-
*
|
|
102
|
-
* @param str Text to make bright-black
|
|
103
|
-
*
|
|
104
|
-
* @returns Bright-black text for print
|
|
105
|
-
*
|
|
106
|
-
* @example Usage
|
|
107
|
-
* ```ts no-assert
|
|
108
|
-
* import { brightBlack } from "@std/internal/styles";
|
|
109
|
-
*
|
|
110
|
-
* console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
export declare function brightBlack(str: string): string;
|
|
114
|
-
/**
|
|
115
|
-
* Sets the background color of text to be printed to red.
|
|
116
|
-
*
|
|
117
|
-
* @param str Text to make its background red
|
|
118
|
-
*
|
|
119
|
-
* @returns Red background text for print
|
|
120
|
-
*
|
|
121
|
-
* @example Usage
|
|
122
|
-
* ```ts no-assert
|
|
123
|
-
* import { bgRed } from "@std/internal/styles";
|
|
124
|
-
*
|
|
125
|
-
* console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
export declare function bgRed(str: string): string;
|
|
129
|
-
/**
|
|
130
|
-
* Sets the background color of text to be printed to green.
|
|
131
|
-
*
|
|
132
|
-
* @param str Text to make its background green
|
|
133
|
-
*
|
|
134
|
-
* @returns Green background text for print
|
|
135
|
-
*
|
|
136
|
-
* @example Usage
|
|
137
|
-
* ```ts no-assert
|
|
138
|
-
* import { bgGreen } from "@std/internal/styles";
|
|
139
|
-
*
|
|
140
|
-
* console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
|
|
141
|
-
* ```
|
|
142
|
-
*/
|
|
143
|
-
export declare function bgGreen(str: string): string;
|
|
144
|
-
/**
|
|
145
|
-
* Remove ANSI escape codes from the string.
|
|
146
|
-
*
|
|
147
|
-
* @param string Text to remove ANSI escape codes from
|
|
148
|
-
*
|
|
149
|
-
* @returns Text without ANSI escape codes
|
|
150
|
-
*
|
|
151
|
-
* @example Usage
|
|
152
|
-
* ```ts no-assert
|
|
153
|
-
* import { red, stripAnsiCode } from "@std/internal/styles";
|
|
154
|
-
*
|
|
155
|
-
* console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
|
|
156
|
-
* ```
|
|
157
|
-
*/
|
|
158
|
-
export declare function stripAnsiCode(string: string): string;
|
|
159
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
2
|
-
// This module is browser compatible.
|
|
3
|
-
// A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
|
|
4
|
-
// on npm.
|
|
5
|
-
// This code is vendored from `fmt/colors.ts`.
|
|
6
|
-
// deno-lint-ignore no-explicit-any
|
|
7
|
-
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
8
|
-
const { Deno } = dntShim.dntGlobalThis;
|
|
9
|
-
const noColor = typeof Deno?.noColor === "boolean"
|
|
10
|
-
? Deno.noColor
|
|
11
|
-
: false;
|
|
12
|
-
const enabled = !noColor;
|
|
13
|
-
function code(open, close) {
|
|
14
|
-
return {
|
|
15
|
-
open: `\x1b[${open.join(";")}m`,
|
|
16
|
-
close: `\x1b[${close}m`,
|
|
17
|
-
regexp: new RegExp(`\\x1b\\[${close}m`, "g"),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function run(str, code) {
|
|
21
|
-
return enabled
|
|
22
|
-
? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
|
|
23
|
-
: str;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Sets the style of text to be printed to bold.
|
|
27
|
-
*
|
|
28
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
29
|
-
*
|
|
30
|
-
* @param str Text to make bold
|
|
31
|
-
*
|
|
32
|
-
* @returns Bold text for printing
|
|
33
|
-
*
|
|
34
|
-
* @example Usage
|
|
35
|
-
* ```ts no-assert
|
|
36
|
-
* import { bold } from "@std/internal/styles";
|
|
37
|
-
*
|
|
38
|
-
* console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export function bold(str) {
|
|
42
|
-
return run(str, code([1], 22));
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Sets the color of text to be printed to red.
|
|
46
|
-
*
|
|
47
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
48
|
-
*
|
|
49
|
-
* @param str Text to make red
|
|
50
|
-
*
|
|
51
|
-
* @returns Red text for printing
|
|
52
|
-
*
|
|
53
|
-
* @example Usage
|
|
54
|
-
* ```ts no-assert
|
|
55
|
-
* import { red } from "@std/internal/styles";
|
|
56
|
-
*
|
|
57
|
-
* console.log(red("Hello, world!")); // Prints "Hello, world!" in red
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export function red(str) {
|
|
61
|
-
return run(str, code([31], 39));
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Sets the color of text to be printed to green.
|
|
65
|
-
*
|
|
66
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
67
|
-
*
|
|
68
|
-
* @param str Text to make green
|
|
69
|
-
*
|
|
70
|
-
* @returns Green text for print
|
|
71
|
-
*
|
|
72
|
-
* @example Usage
|
|
73
|
-
* ```ts no-assert
|
|
74
|
-
* import { green } from "@std/internal/styles";
|
|
75
|
-
*
|
|
76
|
-
* console.log(green("Hello, world!")); // Prints "Hello, world!" in green
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
export function green(str) {
|
|
80
|
-
return run(str, code([32], 39));
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Sets the color of text to be printed to yellow.
|
|
84
|
-
*
|
|
85
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
86
|
-
*
|
|
87
|
-
* @param str Text to make yellow
|
|
88
|
-
*
|
|
89
|
-
* @returns Yellow text for print
|
|
90
|
-
*
|
|
91
|
-
* @example Usage
|
|
92
|
-
* ```ts no-assert
|
|
93
|
-
* import { yellow } from "@std/internal/styles";
|
|
94
|
-
*
|
|
95
|
-
* console.log(yellow("Hello, world!")); // Prints "Hello, world!" in yellow
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
export function yellow(str) {
|
|
99
|
-
return run(str, code([33], 39));
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Sets the color of text to be printed to white.
|
|
103
|
-
*
|
|
104
|
-
* @param str Text to make white
|
|
105
|
-
*
|
|
106
|
-
* @returns White text for print
|
|
107
|
-
*
|
|
108
|
-
* @example Usage
|
|
109
|
-
* ```ts no-assert
|
|
110
|
-
* import { white } from "@std/internal/styles";
|
|
111
|
-
*
|
|
112
|
-
* console.log(white("Hello, world!")); // Prints "Hello, world!" in white
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
export function white(str) {
|
|
116
|
-
return run(str, code([37], 39));
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Sets the color of text to be printed to gray.
|
|
120
|
-
*
|
|
121
|
-
* @param str Text to make gray
|
|
122
|
-
*
|
|
123
|
-
* @returns Gray text for print
|
|
124
|
-
*
|
|
125
|
-
* @example Usage
|
|
126
|
-
* ```ts no-assert
|
|
127
|
-
* import { gray } from "@std/internal/styles";
|
|
128
|
-
*
|
|
129
|
-
* console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
export function gray(str) {
|
|
133
|
-
return brightBlack(str);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Sets the color of text to be printed to bright-black.
|
|
137
|
-
*
|
|
138
|
-
* @param str Text to make bright-black
|
|
139
|
-
*
|
|
140
|
-
* @returns Bright-black text for print
|
|
141
|
-
*
|
|
142
|
-
* @example Usage
|
|
143
|
-
* ```ts no-assert
|
|
144
|
-
* import { brightBlack } from "@std/internal/styles";
|
|
145
|
-
*
|
|
146
|
-
* console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
export function brightBlack(str) {
|
|
150
|
-
return run(str, code([90], 39));
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Sets the background color of text to be printed to red.
|
|
154
|
-
*
|
|
155
|
-
* @param str Text to make its background red
|
|
156
|
-
*
|
|
157
|
-
* @returns Red background text for print
|
|
158
|
-
*
|
|
159
|
-
* @example Usage
|
|
160
|
-
* ```ts no-assert
|
|
161
|
-
* import { bgRed } from "@std/internal/styles";
|
|
162
|
-
*
|
|
163
|
-
* console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
|
|
164
|
-
* ```
|
|
165
|
-
*/
|
|
166
|
-
export function bgRed(str) {
|
|
167
|
-
return run(str, code([41], 49));
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Sets the background color of text to be printed to green.
|
|
171
|
-
*
|
|
172
|
-
* @param str Text to make its background green
|
|
173
|
-
*
|
|
174
|
-
* @returns Green background text for print
|
|
175
|
-
*
|
|
176
|
-
* @example Usage
|
|
177
|
-
* ```ts no-assert
|
|
178
|
-
* import { bgGreen } from "@std/internal/styles";
|
|
179
|
-
*
|
|
180
|
-
* console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
|
|
181
|
-
* ```
|
|
182
|
-
*/
|
|
183
|
-
export function bgGreen(str) {
|
|
184
|
-
return run(str, code([42], 49));
|
|
185
|
-
}
|
|
186
|
-
// https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
|
|
187
|
-
const ANSI_PATTERN = new RegExp([
|
|
188
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
189
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))",
|
|
190
|
-
].join("|"), "g");
|
|
191
|
-
/**
|
|
192
|
-
* Remove ANSI escape codes from the string.
|
|
193
|
-
*
|
|
194
|
-
* @param string Text to remove ANSI escape codes from
|
|
195
|
-
*
|
|
196
|
-
* @returns Text without ANSI escape codes
|
|
197
|
-
*
|
|
198
|
-
* @example Usage
|
|
199
|
-
* ```ts no-assert
|
|
200
|
-
* import { red, stripAnsiCode } from "@std/internal/styles";
|
|
201
|
-
*
|
|
202
|
-
* console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
|
|
203
|
-
* ```
|
|
204
|
-
*/
|
|
205
|
-
export function stripAnsiCode(string) {
|
|
206
|
-
return string.replace(ANSI_PATTERN, "");
|
|
207
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** Ways that lines in a diff can be different. */
|
|
2
|
-
export type DiffType = DiffResult<unknown>["type"];
|
|
3
|
-
/**
|
|
4
|
-
* Represents the result of a diff operation.
|
|
5
|
-
* @typeParam T The type of the value in the diff result.
|
|
6
|
-
*/
|
|
7
|
-
export type DiffResult<T> = ChangedDiffResult<T> | CommonDiffResult<T>;
|
|
8
|
-
/**
|
|
9
|
-
* Represents the result of a common diff operation.
|
|
10
|
-
* @typeParam T The type of the value in the diff result.
|
|
11
|
-
*/
|
|
12
|
-
export type CommonDiffResult<T> = {
|
|
13
|
-
type: "common" | "truncation";
|
|
14
|
-
value: T;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Represents the result of a changed diff operation.
|
|
18
|
-
* @typeParam T The type of the value in the diff result.
|
|
19
|
-
*/
|
|
20
|
-
export type ChangedDiffResult<T> = {
|
|
21
|
-
type: "removed" | "added";
|
|
22
|
-
value: T;
|
|
23
|
-
details?: DiffResult<T>[];
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-channel.d.ts","sourceRoot":"","sources":["../src/message-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,WAAW,CAAC;AAErD,wBAAgB,iBAAiB,IAAI,SAAS,CAAC,cAAc,CAAC,CAU7D"}
|
package/esm/mod.d.ts
DELETED
package/esm/mod.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
package/esm/package.json
DELETED
package/esm/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,MAAM,aAAa,CAAC,KAAK,EAAE,KAAK,IAAI;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;CACb,GAAG;IACF,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,WAAW,CAAC;CACvB,GAAG;IACF,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK;IACpD;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK,EAAE,KAAK;IAC1C,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;CACpE"}
|
package/esm/worker-main.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker-main.d.ts","sourceRoot":"","sources":["../src/worker-main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAOL,KAAK,SAAS,EAGd,KAAK,IAAI,EACV,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAiB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAC3D,IAAI,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,SAAS,CAAC,OAAO,CAAC,GAC5E,OAAO,CAAC,IAAI,CAAC,CAqEf;AAED,KAAK,GAAG,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAC3B,KAAK,OAAO,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC;AACrD,KAAK,QAAQ,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AACrD,KAAK,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAC/C,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAEzD,KAAK,WAAW,GAAG,GAAG,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAEpE,UAAU,iBAAkB,SAAQ,WAAW,CAAC,WAAW,CAAC;IAC1D,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;IACnC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC;IAC7B,SAAS,IAAI,WAAW,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAkEvE"}
|
package/esm/worker.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,SAAS,EAKf,MAAM,WAAW,CAAC;AAInB;;;;;;GAMG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CACnD,SAAQ,SAAS,CAAC,OAAO,CAAC;IAC1B,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EACpD,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,OAAO,CAAC,EAAE,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,GACzC,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAgElD"}
|
package/script/_dnt.shims.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gCAA2C,CAAC"}
|
package/script/_dnt.shims.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dntGlobalThis = void 0;
|
|
4
|
-
const dntGlobals = {};
|
|
5
|
-
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
6
|
-
function createMergeProxy(baseObj, extObj) {
|
|
7
|
-
return new Proxy(baseObj, {
|
|
8
|
-
get(_target, prop, _receiver) {
|
|
9
|
-
if (prop in extObj) {
|
|
10
|
-
return extObj[prop];
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return baseObj[prop];
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
set(_target, prop, value) {
|
|
17
|
-
if (prop in extObj) {
|
|
18
|
-
delete extObj[prop];
|
|
19
|
-
}
|
|
20
|
-
baseObj[prop] = value;
|
|
21
|
-
return true;
|
|
22
|
-
},
|
|
23
|
-
deleteProperty(_target, prop) {
|
|
24
|
-
let success = false;
|
|
25
|
-
if (prop in extObj) {
|
|
26
|
-
delete extObj[prop];
|
|
27
|
-
success = true;
|
|
28
|
-
}
|
|
29
|
-
if (prop in baseObj) {
|
|
30
|
-
delete baseObj[prop];
|
|
31
|
-
success = true;
|
|
32
|
-
}
|
|
33
|
-
return success;
|
|
34
|
-
},
|
|
35
|
-
ownKeys(_target) {
|
|
36
|
-
const baseKeys = Reflect.ownKeys(baseObj);
|
|
37
|
-
const extKeys = Reflect.ownKeys(extObj);
|
|
38
|
-
const extKeysSet = new Set(extKeys);
|
|
39
|
-
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
40
|
-
},
|
|
41
|
-
defineProperty(_target, prop, desc) {
|
|
42
|
-
if (prop in extObj) {
|
|
43
|
-
delete extObj[prop];
|
|
44
|
-
}
|
|
45
|
-
Reflect.defineProperty(baseObj, prop, desc);
|
|
46
|
-
return true;
|
|
47
|
-
},
|
|
48
|
-
getOwnPropertyDescriptor(_target, prop) {
|
|
49
|
-
if (prop in extObj) {
|
|
50
|
-
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
has(_target, prop) {
|
|
57
|
-
return prop in extObj || prop in baseObj;
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
3
|
-
* through a given tolerance. It can be used to take into account IEEE-754
|
|
4
|
-
* double-precision floating-point representation limitations. If the values
|
|
5
|
-
* are not almost equal then throw.
|
|
6
|
-
*
|
|
7
|
-
* The default tolerance is one hundred thousandth of a percent of the
|
|
8
|
-
* expected value.
|
|
9
|
-
*
|
|
10
|
-
* @example Usage
|
|
11
|
-
* ```ts ignore
|
|
12
|
-
* import { assertAlmostEquals } from "@std/assert";
|
|
13
|
-
*
|
|
14
|
-
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
15
|
-
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
16
|
-
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
17
|
-
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
18
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
19
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @param actual The actual value to compare.
|
|
23
|
-
* @param expected The expected value to compare.
|
|
24
|
-
* @param tolerance The tolerance to consider the values almost equal. The
|
|
25
|
-
* default is one hundred thousandth of a percent of the expected value.
|
|
26
|
-
* @param msg The optional message to include in the error.
|
|
27
|
-
*/
|
|
28
|
-
export declare function assertAlmostEquals(actual: number, expected: number, tolerance?: number, msg?: string): void;
|
|
29
|
-
//# sourceMappingURL=almost_equals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertAlmostEquals = assertAlmostEquals;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
-
/**
|
|
8
|
-
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
9
|
-
* through a given tolerance. It can be used to take into account IEEE-754
|
|
10
|
-
* double-precision floating-point representation limitations. If the values
|
|
11
|
-
* are not almost equal then throw.
|
|
12
|
-
*
|
|
13
|
-
* The default tolerance is one hundred thousandth of a percent of the
|
|
14
|
-
* expected value.
|
|
15
|
-
*
|
|
16
|
-
* @example Usage
|
|
17
|
-
* ```ts ignore
|
|
18
|
-
* import { assertAlmostEquals } from "@std/assert";
|
|
19
|
-
*
|
|
20
|
-
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
21
|
-
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
22
|
-
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
23
|
-
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
24
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
25
|
-
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param actual The actual value to compare.
|
|
29
|
-
* @param expected The expected value to compare.
|
|
30
|
-
* @param tolerance The tolerance to consider the values almost equal. The
|
|
31
|
-
* default is one hundred thousandth of a percent of the expected value.
|
|
32
|
-
* @param msg The optional message to include in the error.
|
|
33
|
-
*/
|
|
34
|
-
function assertAlmostEquals(actual, expected, tolerance, msg) {
|
|
35
|
-
if (Object.is(actual, expected)) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const delta = Math.abs(expected - actual);
|
|
39
|
-
if (tolerance === undefined) {
|
|
40
|
-
tolerance = isFinite(expected) ? Math.abs(expected * 1e-7) : 1e-7;
|
|
41
|
-
}
|
|
42
|
-
if (delta <= tolerance) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
46
|
-
const f = (n) => Number.isInteger(n) ? n : n.toExponential();
|
|
47
|
-
throw new assertion_error_js_1.AssertionError(`Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
|
|
48
|
-
delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`);
|
|
49
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** An array-like object (`Array`, `Uint8Array`, `NodeList`, etc.) that is not a string */
|
|
2
|
-
export type ArrayLikeArg<T> = ArrayLike<T> & object;
|
|
3
|
-
/**
|
|
4
|
-
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
5
|
-
* an error will be thrown.
|
|
6
|
-
*
|
|
7
|
-
* Type parameter can be specified to ensure values under comparison have the
|
|
8
|
-
* same type.
|
|
9
|
-
*
|
|
10
|
-
* @example Usage
|
|
11
|
-
* ```ts ignore
|
|
12
|
-
* import { assertArrayIncludes } from "@std/assert";
|
|
13
|
-
*
|
|
14
|
-
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
15
|
-
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @typeParam T The type of the elements in the array to compare.
|
|
19
|
-
* @param actual The array-like object to check for.
|
|
20
|
-
* @param expected The array-like object to check for.
|
|
21
|
-
* @param msg The optional message to display if the assertion fails.
|
|
22
|
-
*/
|
|
23
|
-
export declare function assertArrayIncludes<T>(actual: ArrayLikeArg<T>, expected: ArrayLikeArg<T>, msg?: string): void;
|
|
24
|
-
//# sourceMappingURL=array_includes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assertArrayIncludes = assertArrayIncludes;
|
|
4
|
-
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
5
|
-
// This module is browser compatible.
|
|
6
|
-
const equal_js_1 = require("./equal.js");
|
|
7
|
-
const format_js_1 = require("../../internal/1.0.12/format.js");
|
|
8
|
-
const assertion_error_js_1 = require("./assertion_error.js");
|
|
9
|
-
/**
|
|
10
|
-
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
11
|
-
* an error will be thrown.
|
|
12
|
-
*
|
|
13
|
-
* Type parameter can be specified to ensure values under comparison have the
|
|
14
|
-
* same type.
|
|
15
|
-
*
|
|
16
|
-
* @example Usage
|
|
17
|
-
* ```ts ignore
|
|
18
|
-
* import { assertArrayIncludes } from "@std/assert";
|
|
19
|
-
*
|
|
20
|
-
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
21
|
-
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @typeParam T The type of the elements in the array to compare.
|
|
25
|
-
* @param actual The array-like object to check for.
|
|
26
|
-
* @param expected The array-like object to check for.
|
|
27
|
-
* @param msg The optional message to display if the assertion fails.
|
|
28
|
-
*/
|
|
29
|
-
function assertArrayIncludes(actual, expected, msg) {
|
|
30
|
-
const missing = [];
|
|
31
|
-
for (let i = 0; i < expected.length; i++) {
|
|
32
|
-
let found = false;
|
|
33
|
-
for (let j = 0; j < actual.length; j++) {
|
|
34
|
-
if ((0, equal_js_1.equal)(expected[i], actual[j])) {
|
|
35
|
-
found = true;
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (!found) {
|
|
40
|
-
missing.push(expected[i]);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (missing.length === 0) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
47
|
-
msg = `Expected actual: "${(0, format_js_1.format)(actual)}" to include: "${(0, format_js_1.format)(expected)}"${msgSuffix}\nmissing: ${(0, format_js_1.format)(missing)}`;
|
|
48
|
-
throw new assertion_error_js_1.AssertionError(msg);
|
|
49
|
-
}
|