repos / starfx

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

commit
234f865
parent
5789408
author
Eric Bower
date
2023-05-21 18:39:35 +0000 UTC
chore: npm working!
2 files changed,  +59, -5
M npm.ts
M deps.ts
+9, -3
 1@@ -1,8 +1,8 @@
 2+import type { Result } from "https://deno.land/x/effection@3.0.0-alpha.7/mod.ts";
 3 export type {
 4   Channel,
 5   Instruction,
 6   Operation,
 7-  Result,
 8   Scope,
 9   Stream,
10   Task,
11@@ -12,10 +12,8 @@ export {
12   createChannel,
13   createContext,
14   createScope,
15-  Err,
16   expect,
17   getframe,
18-  Ok,
19   resource,
20   run,
21   sleep,
22@@ -23,6 +21,14 @@ export {
23   useAbortSignal,
24 } from "https://deno.land/x/effection@3.0.0-alpha.7/mod.ts";
25 
26+export type { Result };
27+export function Ok<T>(value: T): Result<T> {
28+  return { ok: true, value };
29+}
30+export function Err<T>(error: Error): Result<T> {
31+  return { ok: false, error };
32+}
33+
34 import React from "https://esm.sh/react@18.2.0";
35 export { React };
36 export {
M npm.ts
+50, -2
 1@@ -7,7 +7,7 @@ assert(version, "NPM_VERSION is required to build npm package");
 2 
 3 await build({
 4   entryPoints: [{
 5-    name: "./index",
 6+    name: ".",
 7     path: "index.ts",
 8   }, {
 9     name: "./react",
10@@ -19,10 +19,58 @@ await build({
11     name: "./query",
12     path: "./query/index.ts",
13   }],
14+  mappings: {
15+    "https://deno.land/x/effection@3.0.0-alpha.7/mod.ts": {
16+      name: "effection",
17+      version: "3.0.0-alpha.7",
18+    },
19+    "https://esm.sh/react@18.2.0": {
20+      name: "react",
21+      version: "^18.2.0",
22+      peerDependency: true,
23+    },
24+    "https://esm.sh/robodux@15.0.1?pin=v122": {
25+      name: "robodux",
26+      version: "^15.0.1",
27+    },
28+    "https://esm.sh/@reduxjs/toolkit@1.9.5?pin=v122": {
29+      name: "@reduxjs/toolkit",
30+      version: "^1.9.5",
31+    },
32+    "https://esm.sh/redux-batched-actions@0.5.0?pin=v122": {
33+      name: "redux-batched-actions",
34+      version: "^0.5.0",
35+    },
36+    "https://esm.sh/react-redux@8.0.5?pin=v122": {
37+      name: "react-redux",
38+      version: "^8.0.5",
39+    },
40+  },
41   outDir: "./npm",
42   shims: {
43     deno: false,
44-    undici: true,
45+    custom: [{
46+      package: {
47+        name: "node-fetch",
48+        version: "~3.3.1",
49+      },
50+      globalNames: [{
51+        name: "RequestInit",
52+        typeOnly: true,
53+      }, {
54+        name: "HeadersInit",
55+        typeOnly: true,
56+      }, {
57+        name: "URL",
58+        typeOnly: true,
59+      }, {
60+        name: "Response",
61+        typeOnly: true,
62+      }, {
63+        name: "Request",
64+        typeOnly: true,
65+      }],
66+    }],
67   },
68   test: false,
69   typeCheck: false,