repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

commit
db7f509
parent
8137f72
author
Eric Bower
date
2023-03-28 03:51:20 +0000 UTC
chore: getting ready for initial release
21 files changed,  +284, -69
M npm.ts
A .github/workflows/test.yml
+31, -0
 1@@ -0,0 +1,31 @@
 2+name: test
 3+
 4+on:
 5+  push:
 6+    branches: main
 7+  pull_request:
 8+    branches: main
 9+
10+permissions:
11+  contents: read
12+
13+jobs:
14+  test:
15+    runs-on: ubuntu-latest
16+    steps:
17+      - name: checkout
18+        uses: actions/checkout@v3
19+
20+      - name: setup deno
21+        uses: denoland/setup-deno@v1
22+        with:
23+          deno-version: v1.x
24+
25+      - name: format
26+        run: deno fmt --check
27+
28+      - name: lint
29+        run: deno lint
30+
31+      - name: test
32+        run: deno test
M context.ts
+1, -1
1@@ -7,6 +7,6 @@ export const ErrContext = createContext<Channel<Error, void>>(
2 );
3 
4 export function* contextualize(context: string, value: unknown) {
5-  let frame = yield* getframe();
6+  const frame = yield* getframe();
7   frame.context[context] = value;
8 }
A deno.json
+16, -0
 1@@ -0,0 +1,16 @@
 2+{
 3+  "lint": {
 4+    "files": {
 5+      "exclude": ["npm/", "examples/"]
 6+    },
 7+    "rules": {
 8+      "tags": ["recommended"],
 9+      "exclude": ["no-explicit-any", "require-yield"]
10+    }
11+  },
12+  "fmt": {
13+    "files": {
14+      "exclude": ["npm/", "examples/"]
15+    }
16+  }
17+}
A deno.lock
+145, -0
  1@@ -0,0 +1,145 @@
  2+{
  3+  "version": "2",
  4+  "remote": {
  5+    "https://deno.land/std@0.106.0/_util/assert.ts": "2f868145a042a11d5ad0a3c748dcf580add8a0dbc0e876eaa0026303a5488f58",
  6+    "https://deno.land/std@0.106.0/_util/os.ts": "dfb186cc4e968c770ab6cc3288bd65f4871be03b93beecae57d657232ecffcac",
  7+    "https://deno.land/std@0.106.0/fs/_util.ts": "f2ce811350236ea8c28450ed822a5f42a0892316515b1cd61321dec13569c56b",
  8+    "https://deno.land/std@0.106.0/fs/ensure_dir.ts": "b7c103dc41a3d1dbbb522bf183c519c37065fdc234831a4a0f7d671b1ed5fea7",
  9+    "https://deno.land/std@0.106.0/fs/expand_glob.ts": "73e7b13f01097b04ed782b3d63863379b718417417758ba622e282b1e5300b91",
 10+    "https://deno.land/std@0.106.0/fs/walk.ts": "b91c655c60d048035f9cae0e6177991ab3245e786e3ab7d20a5b60012edf2126",
 11+    "https://deno.land/std@0.106.0/path/_constants.ts": "1247fee4a79b70c89f23499691ef169b41b6ccf01887a0abd131009c5581b853",
 12+    "https://deno.land/std@0.106.0/path/_interface.ts": "1fa73b02aaa24867e481a48492b44f2598cd9dfa513c7b34001437007d3642e4",
 13+    "https://deno.land/std@0.106.0/path/_util.ts": "2e06a3b9e79beaf62687196bd4b60a4c391d862cfa007a20fc3a39f778ba073b",
 14+    "https://deno.land/std@0.106.0/path/common.ts": "eaf03d08b569e8a87e674e4e265e099f237472b6fd135b3cbeae5827035ea14a",
 15+    "https://deno.land/std@0.106.0/path/glob.ts": "3b84af55c53febacf6afe214c095624b22a56b6f57d7312157479cc783a0de65",
 16+    "https://deno.land/std@0.106.0/path/mod.ts": "4465dc494f271b02569edbb4a18d727063b5dbd6ed84283ff906260970a15d12",
 17+    "https://deno.land/std@0.106.0/path/posix.ts": "b81974c768d298f8dcd2c720229639b3803ca4a241fa9a355c762fa2bc5ef0c1",
 18+    "https://deno.land/std@0.106.0/path/separator.ts": "8fdcf289b1b76fd726a508f57d3370ca029ae6976fcde5044007f062e643ff1c",
 19+    "https://deno.land/std@0.106.0/path/win32.ts": "f4a3d4a3f2c9fe894da046d5eac48b5e789a0ebec5152b2c0985efe96a9f7ae1",
 20+    "https://deno.land/std@0.111.0/_util/assert.ts": "2f868145a042a11d5ad0a3c748dcf580add8a0dbc0e876eaa0026303a5488f58",
 21+    "https://deno.land/std@0.111.0/_util/os.ts": "dfb186cc4e968c770ab6cc3288bd65f4871be03b93beecae57d657232ecffcac",
 22+    "https://deno.land/std@0.111.0/bytes/bytes_list.ts": "3bff6a09c72b2e0b1e92e29bd3b135053894196cca07a2bba842901073efe5cb",
 23+    "https://deno.land/std@0.111.0/bytes/equals.ts": "69f55fdbd45c71f920c1a621e6c0865dc780cd8ae34e0f5e55a9497b70c31c1b",
 24+    "https://deno.land/std@0.111.0/bytes/mod.ts": "fedb80b8da2e7ad8dd251148e65f92a04c73d6c5a430b7d197dc39588c8dda6f",
 25+    "https://deno.land/std@0.111.0/fmt/colors.ts": "8368ddf2d48dfe413ffd04cdbb7ae6a1009cf0dccc9c7ff1d76259d9c61a0621",
 26+    "https://deno.land/std@0.111.0/fs/_util.ts": "f2ce811350236ea8c28450ed822a5f42a0892316515b1cd61321dec13569c56b",
 27+    "https://deno.land/std@0.111.0/fs/ensure_dir.ts": "b7c103dc41a3d1dbbb522bf183c519c37065fdc234831a4a0f7d671b1ed5fea7",
 28+    "https://deno.land/std@0.111.0/hash/sha256.ts": "bd85257c68d1fdd9da8457284c4fbb04efa9f4f2229b5f41a638d5b71a3a8d5c",
 29+    "https://deno.land/std@0.111.0/io/buffer.ts": "fdf93ba9e5d20ff3369e2c42443efd89131f8a73066f7f59c033cc588a0e2cfe",
 30+    "https://deno.land/std@0.111.0/io/types.d.ts": "89a27569399d380246ca7cdd9e14d5e68459f11fb6110790cc5ecbd4ee7f3215",
 31+    "https://deno.land/std@0.111.0/path/_constants.ts": "1247fee4a79b70c89f23499691ef169b41b6ccf01887a0abd131009c5581b853",
 32+    "https://deno.land/std@0.111.0/path/_interface.ts": "1fa73b02aaa24867e481a48492b44f2598cd9dfa513c7b34001437007d3642e4",
 33+    "https://deno.land/std@0.111.0/path/_util.ts": "2e06a3b9e79beaf62687196bd4b60a4c391d862cfa007a20fc3a39f778ba073b",
 34+    "https://deno.land/std@0.111.0/path/common.ts": "f41a38a0719a1e85aa11c6ba3bea5e37c15dd009d705bd8873f94c833568cbc4",
 35+    "https://deno.land/std@0.111.0/path/glob.ts": "ea87985765b977cc284b92771003b2070c440e0807c90e1eb0ff3e095911a820",
 36+    "https://deno.land/std@0.111.0/path/mod.ts": "4465dc494f271b02569edbb4a18d727063b5dbd6ed84283ff906260970a15d12",
 37+    "https://deno.land/std@0.111.0/path/posix.ts": "34349174b9cd121625a2810837a82dd8b986bbaaad5ade690d1de75bbb4555b2",
 38+    "https://deno.land/std@0.111.0/path/separator.ts": "8fdcf289b1b76fd726a508f57d3370ca029ae6976fcde5044007f062e643ff1c",
 39+    "https://deno.land/std@0.111.0/path/win32.ts": "11549e8c6df8307a8efcfa47ad7b2a75da743eac7d4c89c9723a944661c8bd2e",
 40+    "https://deno.land/std@0.111.0/streams/conversion.ts": "fe0059ed9d3c53eda4ba44eb71a6a9acb98c5fdb5ba1b6c6ab28004724c7641b",
 41+    "https://deno.land/std@0.119.0/_util/assert.ts": "2f868145a042a11d5ad0a3c748dcf580add8a0dbc0e876eaa0026303a5488f58",
 42+    "https://deno.land/std@0.119.0/_util/os.ts": "dfb186cc4e968c770ab6cc3288bd65f4871be03b93beecae57d657232ecffcac",
 43+    "https://deno.land/std@0.119.0/fmt/colors.ts": "8368ddf2d48dfe413ffd04cdbb7ae6a1009cf0dccc9c7ff1d76259d9c61a0621",
 44+    "https://deno.land/std@0.119.0/fs/empty_dir.ts": "5f08b263dd064dc7917c4bbeb13de0f5505a664b9cdfe312fa86e7518cfaeb84",
 45+    "https://deno.land/std@0.119.0/fs/expand_glob.ts": "f6f64ef54addcc84c9012d6dfcf66d39ecc2565e40c4d2b7644d585fe4d12a04",
 46+    "https://deno.land/std@0.119.0/fs/walk.ts": "31464d75099aa3fc7764212576a8772dfabb2692783e6eabb910f874a26eac54",
 47+    "https://deno.land/std@0.119.0/path/_constants.ts": "1247fee4a79b70c89f23499691ef169b41b6ccf01887a0abd131009c5581b853",
 48+    "https://deno.land/std@0.119.0/path/_interface.ts": "1fa73b02aaa24867e481a48492b44f2598cd9dfa513c7b34001437007d3642e4",
 49+    "https://deno.land/std@0.119.0/path/_util.ts": "2e06a3b9e79beaf62687196bd4b60a4c391d862cfa007a20fc3a39f778ba073b",
 50+    "https://deno.land/std@0.119.0/path/common.ts": "f41a38a0719a1e85aa11c6ba3bea5e37c15dd009d705bd8873f94c833568cbc4",
 51+    "https://deno.land/std@0.119.0/path/glob.ts": "ea87985765b977cc284b92771003b2070c440e0807c90e1eb0ff3e095911a820",
 52+    "https://deno.land/std@0.119.0/path/mod.ts": "4465dc494f271b02569edbb4a18d727063b5dbd6ed84283ff906260970a15d12",
 53+    "https://deno.land/std@0.119.0/path/posix.ts": "34349174b9cd121625a2810837a82dd8b986bbaaad5ade690d1de75bbb4555b2",
 54+    "https://deno.land/std@0.119.0/path/separator.ts": "8fdcf289b1b76fd726a508f57d3370ca029ae6976fcde5044007f062e643ff1c",
 55+    "https://deno.land/std@0.119.0/path/win32.ts": "11549e8c6df8307a8efcfa47ad7b2a75da743eac7d4c89c9723a944661c8bd2e",
 56+    "https://deno.land/std@0.129.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37",
 57+    "https://deno.land/std@0.129.0/testing/_diff.ts": "9d849cd6877694152e01775b2d93f9d6b7aef7e24bfe3bfafc4d7a1ac8e9f392",
 58+    "https://deno.land/std@0.129.0/testing/asserts.ts": "0a95d9e8076dd3e7f0eeb605a67c148078b4b11f4abcd5eef115b0361b0736a2",
 59+    "https://deno.land/std@0.158.0/fmt/colors.ts": "ff7dc9c9f33a72bd48bc24b21bbc1b4545d8494a431f17894dbc5fe92a938fc4",
 60+    "https://deno.land/std@0.158.0/testing/_diff.ts": "a23e7fc2b4d8daa3e158fa06856bedf5334ce2a2831e8bf9e509717f455adb2c",
 61+    "https://deno.land/std@0.158.0/testing/_format.ts": "cd11136e1797791045e639e9f0f4640d5b4166148796cad37e6ef75f7d7f3832",
 62+    "https://deno.land/std@0.158.0/testing/asserts.ts": "8696c488bc98d8d175e74dc652a0ffbc7fca93858da01edc57ed33c1148345da",
 63+    "https://deno.land/std@0.163.0/testing/_test_suite.ts": "2d07073d5460a4e3ec50c55ae822cd9bd136926d7363091379947fef9c73c3e4",
 64+    "https://deno.land/std@0.163.0/testing/bdd.ts": "35060cefd9cc21b414f4d89453b3551a3d52ec50aeff25db432503c5485b2f72",
 65+    "https://deno.land/std@0.97.0/fmt/colors.ts": "db22b314a2ae9430ae7460ce005e0a7130e23ae1c999157e3bb77cf55800f7e4",
 66+    "https://deno.land/std@0.97.0/testing/_diff.ts": "961eaf6d9f5b0a8556c9d835bbc6fa74f5addd7d3b02728ba7936ff93364f7a3",
 67+    "https://deno.land/std@0.97.0/testing/asserts.ts": "341292d12eebc44be4c3c2ca101ba8b6b5859cef2fa69d50c217f9d0bfbcfd1f",
 68+    "https://deno.land/x/code_block_writer@11.0.0/comment_char.ts": "22b66890bbdf7a2d59777ffd8231710c1fda1c11fadada67632a596937a1a314",
 69+    "https://deno.land/x/code_block_writer@11.0.0/mod.ts": "dc43d56c3487bae02886a09754fb09c607da4ea866817e80f3e60632f3391d70",
 70+    "https://deno.land/x/code_block_writer@11.0.0/utils/string_utils.ts": "60cb4ec8bd335bf241ef785ccec51e809d576ff8e8d29da43d2273b69ce2a6ff",
 71+    "https://deno.land/x/continuation@0.1.5/mod.ts": "690def2735046367b3e1b4bc6e51b5912f2ed09c41c7df7a55c060f23720ad33",
 72+    "https://deno.land/x/deno_cache@0.2.1/auth_tokens.ts": "01b94d25abd974153a3111653998b9a43c66d84a0e4b362fc5f4bbbf40a6e0f7",
 73+    "https://deno.land/x/deno_cache@0.2.1/cache.ts": "67e301c20161546fea45405316314f4c3d85cc7a367b2fb72042903f308f55b7",
 74+    "https://deno.land/x/deno_cache@0.2.1/deno_dir.ts": "e4dc68da5641aa337bcc06fb1df28fcb086b366dcbea7d8aaed7ac7c853fedb1",
 75+    "https://deno.land/x/deno_cache@0.2.1/deps.ts": "2ebaba0ad86fff8b9027c6afd4c3909a17cd8bf8c9e263151c980c15c56a18ee",
 76+    "https://deno.land/x/deno_cache@0.2.1/dirs.ts": "e07003fabed7112375d4a50040297aae768f9d06bb6c2655ca46880653b576b4",
 77+    "https://deno.land/x/deno_cache@0.2.1/disk_cache.ts": "d7a361f0683a032bcca28513a7bbedc28c77cfcc6719e6f6cea156c0ff1108df",
 78+    "https://deno.land/x/deno_cache@0.2.1/file_fetcher.ts": "352702994c190c45215f3b8086621e117e88bc2174b020faefb5eca653d71d6a",
 79+    "https://deno.land/x/deno_cache@0.2.1/http_cache.ts": "af1500149496e2d0acadec24569e2a9c86a3f600cceef045dcf6f5ce8de72b3a",
 80+    "https://deno.land/x/deno_cache@0.2.1/mod.ts": "709ab9d1068be5fd77b020b33e7a9394f1e9b453553b1e2336b72c90283cf3c0",
 81+    "https://deno.land/x/deno_cache@0.2.1/util.ts": "652479928551259731686686ff2df6f26bc04e8e4d311137b2bf3bc10f779f48",
 82+    "https://deno.land/x/deno_graph@0.6.0/lib/deno_graph.generated.js": "3e1cccd6376d4ad0ea789d66aa0f6b19f737fa8da37b5e6185ef5c269c974f54",
 83+    "https://deno.land/x/deno_graph@0.6.0/lib/loader.ts": "13a11c1dea0d85e0ad211be77217b8c06138bbb916afef6f50a04cca415084a9",
 84+    "https://deno.land/x/deno_graph@0.6.0/lib/media_type.ts": "36be751aa63d6ae36475b90dca5fae8fd7c3a77cf13684c48cf23a85ee607b31",
 85+    "https://deno.land/x/deno_graph@0.6.0/lib/snippets/deno_graph-1c138d6136337537/src/deno_apis.js": "f13f2678d875372cf8489ceb7124623a39fa5bf8de8ee1ec722dbb2ec5ec7845",
 86+    "https://deno.land/x/deno_graph@0.6.0/lib/types.d.ts": "68cb232e02a984658b40ffaf6cafb979a06fbfdce7f5bd4c7a83ed1a32a07687",
 87+    "https://deno.land/x/deno_graph@0.6.0/mod.ts": "8fe3d39bdcb273adfb41a0bafbbaabec4c6fe6c611b47fed8f46f218edb37e8e",
 88+    "https://deno.land/x/dnt@0.17.0/lib/compiler.ts": "b741c149adaa3ed87877324ce4365fbb66e8ecbfb5bc417495dcb1ac2936f9ff",
 89+    "https://deno.land/x/dnt@0.17.0/lib/compiler_transforms.ts": "b14a398776f08d57a3a011c8c4b5a6a557032c4b125264f86f7877d3f0eef657",
 90+    "https://deno.land/x/dnt@0.17.0/lib/mod.deps.ts": "d6c6eb09013c471584bc271261ed896d9f0f6552620ac7d1d65cb46e57841236",
 91+    "https://deno.land/x/dnt@0.17.0/lib/npm_ignore.ts": "36fe32008cd71e995bc08569d2b43e8fba816cbada82fa37d1fe52358d5a2e17",
 92+    "https://deno.land/x/dnt@0.17.0/lib/package_json.ts": "c8ea56c948fa2379de2a1cf76d335d1b1c70a8c122e1d11932a84f4b70905275",
 93+    "https://deno.land/x/dnt@0.17.0/lib/pkg/dnt_wasm.js": "fc7ae54f777566ef7769825491cb868da9f92ec4453326c075ce1b3b2bdf06f3",
 94+    "https://deno.land/x/dnt@0.17.0/lib/pkg/dnt_wasm_bg.ts": "51742660365970445ca1e010d340085c7b1188166cc7cdb0d2ba72b3328f276d",
 95+    "https://deno.land/x/dnt@0.17.0/lib/pkg/snippets/dnt-wasm-a15ef721fa5290c5/helpers.js": "2f623f83602d4fbb30caa63444b10e35b45e9c2b267e49585ec9bb790a4888d8",
 96+    "https://deno.land/x/dnt@0.17.0/lib/shims.ts": "f9f7defa1cadaec4f04f47ac62757ffa47f83b4a5825fe68cbbfcf14086fcce7",
 97+    "https://deno.land/x/dnt@0.17.0/lib/test_runner/get_test_runner_code.ts": "5fe5543c8479b5f17c58db4d994de3f3d573e3ca7e4c32c7cf8e338e8e900ba7",
 98+    "https://deno.land/x/dnt@0.17.0/lib/test_runner/test_runner.ts": "fc93277907a49bdc098237619da7ff6898547f6f25b71c026375a81efbc8907b",
 99+    "https://deno.land/x/dnt@0.17.0/lib/transform.deps.ts": "0b86d5ad77af5b53ad72308fbf5b694abea1f0593652a662be7529ae60c540cb",
100+    "https://deno.land/x/dnt@0.17.0/lib/types.ts": "8506b5ced3921a6ac2a1d5a2bb381bfdbf818c68207f14a1a1fffbf48ee95886",
101+    "https://deno.land/x/dnt@0.17.0/lib/utils.ts": "d2681d634dfa6bd4ad2a32ad15bd419f6f1f895e06c0bf479455fbf1c5f49cd9",
102+    "https://deno.land/x/dnt@0.17.0/mod.ts": "1cd16a64fa1861d624d6e9e02eaa0dfa733f8e2101686fb90e05bbb96ce5221d",
103+    "https://deno.land/x/dnt@0.17.0/transform.ts": "0b1dc1fdf860b594fb50a3aee54bc8c22220f4601f1d227f4113b9b4c0c5166f",
104+    "https://deno.land/x/effection@3.0.0-alpha.6/mod.ts": "b443a1e17d89f59ad847b1d1efc90465f81891d8e55c04c063d0c1c6c80dd7ed",
105+    "https://deno.land/x/expect@v0.3.0/expect.ts": "5e6717eddc9df376f7b2c9be6403e016130bb2edbb1acd261a2d6ea9608ee196",
106+    "https://deno.land/x/expect@v0.3.0/matchers.ts": "a37ef4577739247af77a852cdcd69484f999a41ad86ec16bb63a88a7a47a2372",
107+    "https://deno.land/x/expect@v0.3.0/mock.ts": "562d4b1d735d15b0b8e935f342679096b64fe452f86e96714fe8616c0c884914",
108+    "https://deno.land/x/expect@v0.3.0/mod.ts": "0304d2430e1e96ba669a8495e24ba606dcc3d152e1f81aaa8da898cea24e36c2",
109+    "https://deno.land/x/ts_morph@13.0.0/bootstrap/mod.ts": "b53aad517f106c4079971fcd4a81ab79fadc40b50061a3ab2b741a09119d51e9",
110+    "https://deno.land/x/ts_morph@13.0.0/bootstrap/ts_morph_bootstrap.d.ts": "1dd46307a28a8e689ce214cb0fe260a280e7ecbaceb6fbae3cbcaa8a25a9fd3f",
111+    "https://deno.land/x/ts_morph@13.0.0/bootstrap/ts_morph_bootstrap.js": "5b0c39c5a35d1445bfccfda2a31bf6235e269aacc304b2c6f21ec6fb3c346b26",
112+    "https://deno.land/x/ts_morph@13.0.0/common/DenoRuntime.ts": "b9ac7200ac980c1aea503cf8302e6581c8ddcdc3dbca850d0dd5a43969d7d16e",
113+    "https://deno.land/x/ts_morph@13.0.0/common/mod.ts": "01985d2ee7da8d1caee318a9d07664774fbee4e31602bc2bb6bb62c3489555ed",
114+    "https://deno.land/x/ts_morph@13.0.0/common/ts_morph_common.d.ts": "32345569d0356af0870227ca7cbc61a25d7f5e9e6b47ec2b3dca267f8f711840",
115+    "https://deno.land/x/ts_morph@13.0.0/common/ts_morph_common.js": "7a63dede12ac30195099f42a07f8ae139799738351ed66e34d872e842d2ca687",
116+    "https://deno.land/x/ts_morph@13.0.0/common/typescript.d.ts": "bbfbfa714a8f9fdf10e9483b4abd82ccb546fc0fc069ad80d0a254fa40930e98",
117+    "https://deno.land/x/ts_morph@13.0.0/common/typescript.js": "dca27ae23ee7eaa46a03e7e7216755186a4c5aff76273e0a66d30358be0e121b",
118+    "https://esm.sh/react@18.2.0": "742d8246041966ba1137ec8c60888c35882a9d2478bce63583875f86c1e3687c",
119+    "https://esm.sh/stable/react@18.2.0/deno/react.mjs": "a5a73ee24acca4744ee22c51d9357f31968d1f684ce253bde222b4e26d09f49f",
120+    "https://esm.sh/v113/@types/prop-types@15.7.5/index.d.ts": "6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea",
121+    "https://esm.sh/v113/@types/react@18.0.28/global.d.ts": "bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f",
122+    "https://esm.sh/v113/@types/react@18.0.28/index.d.ts": "bb79735dbe388c3c7446e3436a22e8161ff87b4eed1932a97dc08e5edc1ab798",
123+    "https://esm.sh/v113/@types/scheduler@0.16.3/tracing.d.ts": "f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",
124+    "https://esm.sh/v113/csstype@3.1.1/index.d.ts": "1c29793071152b207c01ea1954e343be9a44d85234447b2b236acae9e709a383",
125+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/abort-signal.ts": "31224b5f61f1ef58a2acf72bfc1cb9c9bf589f15c263b6555eb06f1b49f77b54",
126+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/async.ts": "c3eae4b79fdd0338ca77915bea79e7df142293a55903c0ef774f5cf633b20171",
127+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/callback.ts": "db306b0b8860cb40dc8e47f18467b24161cfa1bbc7f99fc15fbdd4665fa02a88",
128+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/channel.ts": "ee820fb6bb716ec1c964ac8dea80ffc065a52a940a99cd72b8ae9f7aeca3a665",
129+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/context.ts": "2b7bcdb756adc12f6f431a250435492d8010e2eec9f75e0dacfdaeb68cd8559a",
130+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/deps.ts": "91062b4b97089a8cf36550d4f9605d325a0fd19bebc72d15524481a3b56ea669",
131+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/first.ts": "480621c722e8578c392d690647841785f333397f4eea32df2ecae47de5885279",
132+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/future.ts": "b8c222e9c6952be2dd66cad9c5737a5080f0ca37c9df9e986abd80fdea43ee97",
133+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/instructions.ts": "5ff5c044e2184552972536ddc5de0b8967610c9886e7ee4dd6077b52bff709a5",
134+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/lazy.ts": "92ea526c5ad7d88290f2a87168e038d482f97421379508d85cf2e049ee60639b",
135+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/log.ts": "312b6fb4226be5554b945bc9eb7b05ed7b2dd53dd139ca86971bef256eb78997",
136+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/mod.ts": "d10ab86eaa29695fc3ba4714d2788d85939c78e6b00184e659433ef8ae52384f",
137+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/run.ts": "5c1eb89e19246ee4d47ec55c1b7b88842366151c1caabd5f3144b3d59e9d30db",
138+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/run/block.ts": "50d8b1e85690f957abb4b1c4345e98c78c111c71edc8f5ff96a5a4d39f62e8a2",
139+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/run/create.ts": "be9139af2fbe15908256d2d159dec8dca079f94cf02d488074c94fa26fc651fa",
140+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/run/event-stream.ts": "8c6d40bf315652535a85aa02a61256678dc4e537a4fb436fbe5fecdad794c076",
141+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/run/frame.ts": "01296da446da0c23527fc6242eb0a007dc2d3d1cd590d589f647cb571f96a364",
142+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/run/scope.ts": "3b24605305f033778307b327f14f8f1e9b7c5badf7791bd37eb3b25826f023e5",
143+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/sleep.ts": "d7000c05ace8143efd80f1e35243f5521316bc334e4051afe692e1a0c7268304",
144+    "https://raw.githubusercontent.com/cowboyd/instructional-effection/v0.0.3/types.ts": "f6ac6ddd71a6464c78a0fb64c189903a148d97973e673868b9be98d4d8dd42d9"
145+  }
146+}
M deps.ts
+1, -1
1@@ -1,3 +1,3 @@
2 import React from "https://esm.sh/react@18.2.0";
3 export { React };
4-export * from "../mod.ts";
5+export * from "https://deno.land/x/effection@3.0.0-alpha.6/mod.ts";
M examples/basic/app.tsx
+5, -5
 1@@ -9,9 +9,9 @@ import {
 2 } from "react-redux";
 3 
 4 // run `make npm` in `saga/` folder first
 5-import { ErrContext, forEach, go } from "../../npm/src/saga/mod";
 6-import { createFxMiddleware, take } from "../../npm/src/saga/redux";
 7-import { Provider } from "../../npm/src/saga/react";
 8+import { ErrContext, forEach, go, keepAlive } from "../../npm/src/mod";
 9+import { createFxMiddleware, take, supervise } from "../../npm/src/redux";
10+import { Provider } from "../../npm/src/react";
11 
12 interface User {
13   id: string;
14@@ -82,7 +82,7 @@ function main() {
15     });
16   }
17 
18-  fx.run([users, mailboxes, logErrors]);
19+  fx.run(() => keepAlive([users, mailboxes, logErrors]));
20 
21   const domNode = document.getElementById("root");
22   const root = createRoot(domNode);
23@@ -91,7 +91,7 @@ function main() {
24       <Provider scope={fx.scope}>
25         <App id="1" />
26       </Provider>
27-    </ReduxProvider>,
28+    </ReduxProvider>
29   );
30 }
31 
M fx/call.ts
+9, -13
 1@@ -5,16 +5,14 @@ import { ErrContext } from "../context.ts";
 2 
 3 export interface ResultOk<T> {
 4   type: "ok";
 5+  ok: true;
 6   value: T;
 7-  isOk: true;
 8-  isErr: false;
 9 }
10 
11 export interface ResultErr {
12   type: "err";
13-  value: Error;
14-  isOk: false;
15-  isErr: true;
16+  ok: false;
17+  error: Error;
18 }
19 
20 export type Result<T> = ResultOk<T> | ResultErr;
21@@ -22,18 +20,16 @@ export type Result<T> = ResultOk<T> | ResultErr;
22 export function Ok<T>(value: T): ResultOk<T> {
23   return {
24     type: "ok",
25+    ok: true,
26     value,
27-    isOk: true,
28-    isErr: false,
29   };
30 }
31 
32-export function Err(value: Error): ResultErr {
33+export function Err(error: Error): ResultErr {
34   return {
35     type: "err",
36-    value,
37-    isOk: false,
38-    isErr: true,
39+    ok: false,
40+    error,
41   };
42 }
43 
44@@ -70,7 +66,7 @@ export function* go<T>(op: OpFn<T>): Operation<Task<Result<T>>> {
45     try {
46       return Ok(yield* call(op));
47     } catch (error) {
48-      let { input } = yield* ErrContext;
49+      const { input } = yield* ErrContext;
50       yield* input.send(error);
51       return Err(error);
52     }
53@@ -82,7 +78,7 @@ export function* safe<T>(opFn: OpFn<T>): Operation<Result<T>> {
54     const value = yield* call(opFn);
55     return Ok(value);
56   } catch (error) {
57-    let { input } = yield* ErrContext;
58+    const { input } = yield* ErrContext;
59     yield* input.send(error);
60     return Err(error);
61   }
M fx/mod.ts
+1, -0
1@@ -6,3 +6,4 @@ export * from "./race.ts";
2 export * from "./once.ts";
3 export * from "./emit.ts";
4 export * from "./request.ts";
5+export * from "./watch.ts";
M fx/race.ts
+2, -2
 1@@ -13,14 +13,14 @@ export function race<T>(operations: OpFn<T>[]): Operation<T> {
 2     );
 3 
 4     const winner = yield* action<T>(function* (resolve) {
 5-      for (let task of tasks) {
 6+      for (const task of tasks) {
 7         yield* spawn(function* () {
 8           resolve(yield* task);
 9         });
10       }
11     });
12 
13-    for (let task of tasks) {
14+    for (const task of tasks) {
15       if (task !== winner) {
16         yield* spawn(() => task.halt());
17       }
A fx/watch.ts
+16, -0
 1@@ -0,0 +1,16 @@
 2+import { OpFn } from "../types.ts";
 3+
 4+import { safe } from "./call.ts";
 5+import { all } from "./all.ts";
 6+
 7+export function supervise<T>(op: OpFn<T>) {
 8+  return function* () {
 9+    while (true) {
10+      yield* safe(op);
11+    }
12+  };
13+}
14+
15+export function* keepAlive(ops: OpFn[]) {
16+  return yield* all(ops.map(supervise));
17+}
M iter.ts
+1, -1
1@@ -21,7 +21,7 @@ export function* map<T, R>(
2   each: (value: T) => Operation<R>,
3 ): Operation<R[]> {
4   const results: R[] = [];
5-  for (let value of values) {
6+  for (const value of values) {
7     results.push(yield* each(value));
8   }
9   return results;
M npm.ts
+1, -1
1@@ -2,7 +2,7 @@ import { build, emptyDir } from "https://deno.land/x/dnt@0.17.0/mod.ts";
2 import { assert } from "https://deno.land/std@0.129.0/testing/asserts.ts";
3 await emptyDir("./npm");
4 
5-let version = Deno.env.get("NPM_VERSION");
6+const version = Deno.env.get("NPM_VERSION");
7 assert(version, "NPM_VERSION is required to build npm package");
8 
9 await build({
M react.ts
+1, -1
1@@ -34,7 +34,7 @@ export function useDispatchFx() {
2   const scope = useScope();
3   return (action: Action) =>
4     scope.run(function* () {
5-      let { input } = yield* ActionContext;
6+      const { input } = yield* ActionContext;
7       yield* input.send(action);
8     });
9 }
M redux.ts
+6, -14
 1@@ -1,8 +1,8 @@
 2-import type { Channel, Operation, Scope } from "./deps.ts";
 3+import type { Channel, Scope } from "./deps.ts";
 4 import { createChannel, createContext, createScope } from "./deps.ts";
 5 import { contextualize } from "./context.ts";
 6-import { all, emit, once, safe } from "./fx/mod.ts";
 7-import type { Action, StoreLike } from "./types.ts";
 8+import { call, emit, once } from "./fx/mod.ts";
 9+import type { Action, OpFn, StoreLike } from "./types.ts";
10 import { ActionPattern } from "./matcher.ts";
11 
12 export const ActionContext = createContext<Channel<Action, void>>(
13@@ -31,18 +31,10 @@ export function* put(action: Action | Action[]) {
14   });
15 }
16 
17-function supervise(op: () => Operation<void>) {
18-  return function* keepAlive() {
19-    while (true) {
20-      yield* safe(op);
21-    }
22-  };
23-}
24-
25 export function createFxMiddleware(scope: Scope = createScope()) {
26-  function run(ops: (() => Operation<void>)[]) {
27+  function run<T>(op: OpFn<T>) {
28     const task = scope.run(function* runner() {
29-      yield* all(ops.map(supervise));
30+      yield* call(op);
31     });
32 
33     return task;
34@@ -50,7 +42,7 @@ export function createFxMiddleware(scope: Scope = createScope()) {
35 
36   function middleware<S = unknown, T = unknown>(store: StoreLike<S>) {
37     scope.run(function* () {
38-      yield* contextualize("store", store);
39+      yield* contextualize("redux:store", store);
40     });
41 
42     return (next: (a: Action) => T) => (action: Action) => {
A test.ts
+2, -0
1@@ -0,0 +1,2 @@
2+export { describe, it } from "https://deno.land/std@0.163.0/testing/bdd.ts";
3+export { expect } from "https://deno.land/x/expect@v0.3.0/mod.ts";
M test/all.test.ts
+27, -9
 1@@ -1,8 +1,25 @@
 2-import { createFuture, run, sleep, spawn } from "../deps.ts";
 3-import { describe, expect, it } from "../../test/suite.ts";
 4+import { Operation, run, sleep, spawn } from "../deps.ts";
 5+import { describe, expect, it } from "../test.ts";
 6 
 7 import { all } from "../mod.ts";
 8 
 9+interface Defer<T> {
10+  promise: Operation<T>;
11+  resolve: (t: T) => void;
12+  reject: (t: Error) => void;
13+}
14+
15+function defer<T>(): Defer<T> {
16+  let resolve;
17+  let reject;
18+  const promise = new Promise<T>((res, rej) => {
19+    resolve = res;
20+    reject = rej;
21+  });
22+
23+  return { resolve, reject, promise } as any;
24+}
25+
26 describe("all()", () => {
27   it("should return empty array", async () => {
28     let actual;
29@@ -13,7 +30,7 @@ describe("all()", () => {
30   });
31 
32   it("should resolve all async items", async () => {
33-    const two = createFuture<number>();
34+    const two = defer();
35 
36     function* one() {
37       yield* sleep(5);
38@@ -25,7 +42,7 @@ describe("all()", () => {
39         yield* sleep(15);
40         two.resolve(2);
41       });
42-      return yield* all([one, () => two.future]);
43+      return yield* all([one, () => two.promise]);
44     });
45 
46     expect(result).toEqual([1, 2]);
47@@ -33,23 +50,24 @@ describe("all()", () => {
48 
49   it("should stop all operations when there is an error", async () => {
50     let actual: number[] = [];
51-    const one = createFuture<number>();
52-    const two = createFuture<number>();
53+    const one = defer<number>();
54+    const two = defer<number>();
55 
56     function* genFn() {
57       try {
58-        actual = yield* all([() => one.future, () => two.future]);
59+        actual = yield* all([() => one.promise, () => two.promise]);
60       } catch (err) {
61         actual = [err];
62       }
63     }
64 
65-    one.reject(new Error("error"));
66+    const err = new Error("error");
67+    one.reject(err);
68     two.resolve(1);
69 
70     await run(genFn);
71 
72-    const expected = [new Error("error")];
73+    const expected = [err];
74     expect(actual).toEqual(expected);
75   });
76 });
M test/call.test.ts
+1, -1
1@@ -1,4 +1,4 @@
2-import { describe, expect, it } from "../../test/suite.ts";
3+import { describe, expect, it } from "../test.ts";
4 
5 import { run } from "../deps.ts";
6 import { call } from "../mod.ts";
M test/middleware.test.ts
+11, -15
 1@@ -1,4 +1,4 @@
 2-import { describe, expect, it } from "../../test/suite.ts";
 3+import { describe, expect, it } from "../test.ts";
 4 
 5 import { call } from "../mod.ts";
 6 import { createFxMiddleware, select } from "../redux.ts";
 7@@ -30,24 +30,20 @@ it(tests, "should be able to grab values from store", async () => {
 8   const store = createStore({ user: { id: "1" } });
 9   const { run, middleware } = createFxMiddleware();
10   middleware(store);
11-  await run([
12-    function* () {
13-      const actual = yield* select((s: TestState) => s["user"]);
14-      expect(actual).toEqual({ id: "1" });
15-    },
16-  ]);
17+  await run(function* () {
18+    const actual = yield* select((s: TestState) => s.user);
19+    expect(actual).toEqual({ id: "1" });
20+  });
21 });
22 
23 it(tests, "should be able to grab store from a nested call", async () => {
24   const store = createStore({ user: { id: "2" } });
25   const { run, middleware } = createFxMiddleware();
26   middleware(store);
27-  await run([
28-    function* () {
29-      const actual = yield* call(function* () {
30-        return yield* select((s: TestState) => s["user"]);
31-      });
32-      expect(actual).toEqual({ id: "2" });
33-    },
34-  ]);
35+  await run(function* () {
36+    const actual = yield* call(function* () {
37+      return yield* select((s: TestState) => s.user);
38+    });
39+    expect(actual).toEqual({ id: "2" });
40+  });
41 });
M test/put.test.ts
+2, -2
 1@@ -1,4 +1,4 @@
 2-import { describe, expect, it } from "../../test/suite.ts";
 3+import { describe, expect, it } from "../test.ts";
 4 
 5 import { run, sleep, spawn } from "../deps.ts";
 6 import { ActionContext, put, take } from "../redux.ts";
 7@@ -6,7 +6,7 @@ import { ActionContext, put, take } from "../redux.ts";
 8 const putTests = describe("put()");
 9 
10 it(putTests, "should send actions through channel", async () => {
11-  let actual: string[] = [];
12+  const actual: string[] = [];
13 
14   function* genFn(arg: string) {
15     yield* spawn(function* () {
M test/take.test.ts
+1, -2
 1@@ -1,4 +1,4 @@
 2-import { describe, expect, it } from "../../test/suite.ts";
 3+import { describe, expect, it } from "../test.ts";
 4 
 5 import { run, sleep, spawn } from "../deps.ts";
 6 import { put, take } from "../redux.ts";
 7@@ -112,6 +112,5 @@ it(takeTests, "take from default channel", async () => {
 8     },
 9     "auto ended",
10   ];
11-  console.log(actual);
12   expect(actual).toEqual(expected);
13 });
M types.ts
+4, -1
 1@@ -5,7 +5,10 @@ export interface Action<P = any> {
 2   type: ActionType;
 3   payload?: P;
 4 }
 5-export type OpFn<T> = (() => Operation<T>) | (() => PromiseLike<T>) | (() => T);
 6+export type OpFn<T = unknown> =
 7+  | (() => Operation<T>)
 8+  | (() => PromiseLike<T>)
 9+  | (() => T);
10 
11 export interface StoreLike<S = unknown> {
12   getState: () => S;