@effectionx/worker 0.1.2 → 0.2.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/esm/_dnt.shims.d.ts +2 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +57 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/almost_equals.d.ts +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/almost_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/almost_equals.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/array_includes.d.ts +24 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/array_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/array_includes.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assert.d.ts +16 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assert.js +22 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equal.d.ts +17 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equal.js +183 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equals.d.ts +35 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/equals.js +58 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/exists.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/exists.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/fail.d.ts +15 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/fail.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/fail.js +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/false.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/false.js +22 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/greater.d.ts +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/greater.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/greater.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/greater_or_equal.d.ts +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/greater_or_equal.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/instance_of.d.ts +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/instance_of.js +52 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/is_error.d.ts +25 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/is_error.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/less.d.ts +19 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/less.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/less.js +28 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/less_or_equal.d.ts +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/less_or_equal.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/match.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/match.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/mod.d.ts +44 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/mod.js +45 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_equals.d.ts +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_instance_of.d.ts +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_instance_of.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_match.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_match.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_strict_equals.d.ts +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/not_strict_equals.js +32 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/object_match.d.ts +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/object_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/object_match.js +167 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/rejects.d.ts +42 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/rejects.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/strict_equals.d.ts +24 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/strict_equals.js +57 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/string_includes.d.ts +18 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/string_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/string_includes.js +26 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/throws.d.ts +45 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/throws.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/throws.js +44 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unimplemented.d.ts +15 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unimplemented.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unimplemented.js +20 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.js +20 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/build_message.d.ts +82 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/build_message.js +110 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff.d.ts +140 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff.js +276 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff_str.d.ts +99 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/diff_str.js +182 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/format.d.ts +29 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/format.js +70 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/styles.d.ts +159 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/styles.js +207 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/types.d.ts +16 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.10/types.js +3 -0
- package/esm/worker.js +1 -1
- package/package.json +5 -1
- package/script/_dnt.shims.d.ts +2 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +60 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/almost_equals.d.ts +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/almost_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/almost_equals.js +49 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/array_includes.d.ts +24 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/array_includes.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/array_includes.js +49 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assert.d.ts +16 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assert.js +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +34 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equal.d.ts +17 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equal.js +219 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equals.d.ts +35 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/equals.js +61 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/exists.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/exists.js +30 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/fail.d.ts +15 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/fail.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/fail.js +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/false.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/false.js +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/greater.d.ts +20 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/greater.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/greater.js +32 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/greater_or_equal.d.ts +20 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/greater_or_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/greater_or_equal.js +32 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/instance_of.d.ts +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/instance_of.js +55 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/is_error.d.ts +25 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/is_error.js +56 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/less.d.ts +19 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/less.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/less.js +31 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/less_or_equal.d.ts +20 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/less_or_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/less_or_equal.js +32 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/match.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/match.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/mod.d.ts +44 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/mod.js +61 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_equals.d.ts +21 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_equals.js +36 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_instance_of.d.ts +20 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_instance_of.js +32 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_match.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_match.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_strict_equals.d.ts +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/not_strict_equals.js +35 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/object_match.d.ts +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/object_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/object_match.js +170 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/rejects.d.ts +42 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/rejects.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/rejects.js +56 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/strict_equals.d.ts +24 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/strict_equals.js +60 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/string_includes.d.ts +18 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/string_includes.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/string_includes.js +29 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/throws.d.ts +45 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/throws.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/throws.js +47 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unimplemented.d.ts +15 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unimplemented.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unimplemented.js +23 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.js +23 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/build_message.d.ts +82 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/build_message.js +115 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff.d.ts +140 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff.js +283 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff_str.d.ts +99 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/diff_str.js +188 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/format.d.ts +29 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/format.js +106 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/styles.d.ts +159 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/styles.js +252 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/types.d.ts +16 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.10/types.js +4 -0
- package/script/worker.js +2 -2
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
// A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
|
|
5
|
+
// on npm.
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.bold = bold;
|
|
41
|
+
exports.red = red;
|
|
42
|
+
exports.green = green;
|
|
43
|
+
exports.yellow = yellow;
|
|
44
|
+
exports.white = white;
|
|
45
|
+
exports.gray = gray;
|
|
46
|
+
exports.brightBlack = brightBlack;
|
|
47
|
+
exports.bgRed = bgRed;
|
|
48
|
+
exports.bgGreen = bgGreen;
|
|
49
|
+
exports.stripAnsiCode = stripAnsiCode;
|
|
50
|
+
// This code is vendored from `fmt/colors.ts`.
|
|
51
|
+
// deno-lint-ignore no-explicit-any
|
|
52
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
53
|
+
const { Deno } = dntShim.dntGlobalThis;
|
|
54
|
+
const noColor = typeof Deno?.noColor === "boolean"
|
|
55
|
+
? Deno.noColor
|
|
56
|
+
: false;
|
|
57
|
+
const enabled = !noColor;
|
|
58
|
+
function code(open, close) {
|
|
59
|
+
return {
|
|
60
|
+
open: `\x1b[${open.join(";")}m`,
|
|
61
|
+
close: `\x1b[${close}m`,
|
|
62
|
+
regexp: new RegExp(`\\x1b\\[${close}m`, "g"),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function run(str, code) {
|
|
66
|
+
return enabled
|
|
67
|
+
? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
|
|
68
|
+
: str;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Sets the style of text to be printed to bold.
|
|
72
|
+
*
|
|
73
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
|
74
|
+
*
|
|
75
|
+
* @param str Text to make bold
|
|
76
|
+
*
|
|
77
|
+
* @returns Bold text for printing
|
|
78
|
+
*
|
|
79
|
+
* @example Usage
|
|
80
|
+
* ```ts no-assert
|
|
81
|
+
* import { bold } from "@std/internal/styles";
|
|
82
|
+
*
|
|
83
|
+
* console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
function bold(str) {
|
|
87
|
+
return run(str, code([1], 22));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Sets the color of text to be printed to red.
|
|
91
|
+
*
|
|
92
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
|
93
|
+
*
|
|
94
|
+
* @param str Text to make red
|
|
95
|
+
*
|
|
96
|
+
* @returns Red text for printing
|
|
97
|
+
*
|
|
98
|
+
* @example Usage
|
|
99
|
+
* ```ts no-assert
|
|
100
|
+
* import { red } from "@std/internal/styles";
|
|
101
|
+
*
|
|
102
|
+
* console.log(red("Hello, world!")); // Prints "Hello, world!" in red
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
function red(str) {
|
|
106
|
+
return run(str, code([31], 39));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Sets the color of text to be printed to green.
|
|
110
|
+
*
|
|
111
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
|
112
|
+
*
|
|
113
|
+
* @param str Text to make green
|
|
114
|
+
*
|
|
115
|
+
* @returns Green text for print
|
|
116
|
+
*
|
|
117
|
+
* @example Usage
|
|
118
|
+
* ```ts no-assert
|
|
119
|
+
* import { green } from "@std/internal/styles";
|
|
120
|
+
*
|
|
121
|
+
* console.log(green("Hello, world!")); // Prints "Hello, world!" in green
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
function green(str) {
|
|
125
|
+
return run(str, code([32], 39));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Sets the color of text to be printed to yellow.
|
|
129
|
+
*
|
|
130
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
|
131
|
+
*
|
|
132
|
+
* @param str Text to make yellow
|
|
133
|
+
*
|
|
134
|
+
* @returns Yellow text for print
|
|
135
|
+
*
|
|
136
|
+
* @example Usage
|
|
137
|
+
* ```ts no-assert
|
|
138
|
+
* import { yellow } from "@std/internal/styles";
|
|
139
|
+
*
|
|
140
|
+
* console.log(yellow("Hello, world!")); // Prints "Hello, world!" in yellow
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
function yellow(str) {
|
|
144
|
+
return run(str, code([33], 39));
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sets the color of text to be printed to white.
|
|
148
|
+
*
|
|
149
|
+
* @param str Text to make white
|
|
150
|
+
*
|
|
151
|
+
* @returns White text for print
|
|
152
|
+
*
|
|
153
|
+
* @example Usage
|
|
154
|
+
* ```ts no-assert
|
|
155
|
+
* import { white } from "@std/internal/styles";
|
|
156
|
+
*
|
|
157
|
+
* console.log(white("Hello, world!")); // Prints "Hello, world!" in white
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
function white(str) {
|
|
161
|
+
return run(str, code([37], 39));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Sets the color of text to be printed to gray.
|
|
165
|
+
*
|
|
166
|
+
* @param str Text to make gray
|
|
167
|
+
*
|
|
168
|
+
* @returns Gray text for print
|
|
169
|
+
*
|
|
170
|
+
* @example Usage
|
|
171
|
+
* ```ts no-assert
|
|
172
|
+
* import { gray } from "@std/internal/styles";
|
|
173
|
+
*
|
|
174
|
+
* console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
function gray(str) {
|
|
178
|
+
return brightBlack(str);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Sets the color of text to be printed to bright-black.
|
|
182
|
+
*
|
|
183
|
+
* @param str Text to make bright-black
|
|
184
|
+
*
|
|
185
|
+
* @returns Bright-black text for print
|
|
186
|
+
*
|
|
187
|
+
* @example Usage
|
|
188
|
+
* ```ts no-assert
|
|
189
|
+
* import { brightBlack } from "@std/internal/styles";
|
|
190
|
+
*
|
|
191
|
+
* console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
function brightBlack(str) {
|
|
195
|
+
return run(str, code([90], 39));
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Sets the background color of text to be printed to red.
|
|
199
|
+
*
|
|
200
|
+
* @param str Text to make its background red
|
|
201
|
+
*
|
|
202
|
+
* @returns Red background text for print
|
|
203
|
+
*
|
|
204
|
+
* @example Usage
|
|
205
|
+
* ```ts no-assert
|
|
206
|
+
* import { bgRed } from "@std/internal/styles";
|
|
207
|
+
*
|
|
208
|
+
* console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
function bgRed(str) {
|
|
212
|
+
return run(str, code([41], 49));
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Sets the background color of text to be printed to green.
|
|
216
|
+
*
|
|
217
|
+
* @param str Text to make its background green
|
|
218
|
+
*
|
|
219
|
+
* @returns Green background text for print
|
|
220
|
+
*
|
|
221
|
+
* @example Usage
|
|
222
|
+
* ```ts no-assert
|
|
223
|
+
* import { bgGreen } from "@std/internal/styles";
|
|
224
|
+
*
|
|
225
|
+
* console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
function bgGreen(str) {
|
|
229
|
+
return run(str, code([42], 49));
|
|
230
|
+
}
|
|
231
|
+
// https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
|
|
232
|
+
const ANSI_PATTERN = new RegExp([
|
|
233
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
234
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))",
|
|
235
|
+
].join("|"), "g");
|
|
236
|
+
/**
|
|
237
|
+
* Remove ANSI escape codes from the string.
|
|
238
|
+
*
|
|
239
|
+
* @param string Text to remove ANSI escape codes from
|
|
240
|
+
*
|
|
241
|
+
* @returns Text without ANSI escape codes
|
|
242
|
+
*
|
|
243
|
+
* @example Usage
|
|
244
|
+
* ```ts no-assert
|
|
245
|
+
* import { red, stripAnsiCode } from "@std/internal/styles";
|
|
246
|
+
*
|
|
247
|
+
* console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
function stripAnsiCode(string) {
|
|
251
|
+
return string.replace(ANSI_PATTERN, "");
|
|
252
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Ways that lines in a diff can be different. */
|
|
2
|
+
export type DiffType = "removed" | "common" | "added";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the result of a diff operation.
|
|
5
|
+
*
|
|
6
|
+
* @typeParam T The type of the value in the diff result.
|
|
7
|
+
*/
|
|
8
|
+
export interface DiffResult<T> {
|
|
9
|
+
/** The type of the diff. */
|
|
10
|
+
type: DiffType;
|
|
11
|
+
/** The value of the diff. */
|
|
12
|
+
value: T;
|
|
13
|
+
/** The details of the diff. */
|
|
14
|
+
details?: DiffResult<T>[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.10/types.ts"],"names":[],"mappings":"AAGA,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"}
|
package/script/worker.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.workerMain = workerMain;
|
|
4
4
|
exports.useWorker = useWorker;
|
|
5
|
-
const
|
|
5
|
+
const mod_js_1 = require("./deps/jsr.io/@std/assert/1.0.14/mod.js");
|
|
6
6
|
const effection_1 = require("effection");
|
|
7
7
|
/**
|
|
8
8
|
* Entrypoint used in the worker that estaliblishes communication
|
|
@@ -175,7 +175,7 @@ function useWorker(url, options) {
|
|
|
175
175
|
};
|
|
176
176
|
worker.addEventListener("message", onclose);
|
|
177
177
|
let first = yield* subscription.next();
|
|
178
|
-
(0,
|
|
178
|
+
(0, mod_js_1.assert)(first.value.data.type === "open", `expected first message to arrive from worker to be of type "open", but was: ${first.value.data.type}`);
|
|
179
179
|
yield* (0, effection_1.spawn)(function* () {
|
|
180
180
|
let event = yield* (0, effection_1.once)(worker, "error");
|
|
181
181
|
event.preventDefault();
|