effect-start 0.25.0 → 0.27.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.
Files changed (174) hide show
  1. package/package.json +20 -86
  2. package/src/Entity.ts +6 -6
  3. package/src/FileRouterCodegen.ts +4 -4
  4. package/src/FileSystem.ts +4 -8
  5. package/src/RouteHook.ts +1 -1
  6. package/src/RouteSse.ts +3 -3
  7. package/src/SqlIntrospect.ts +2 -2
  8. package/src/Start.ts +102 -2
  9. package/src/Values.ts +11 -0
  10. package/src/bun/BunRoute.ts +1 -1
  11. package/src/bun/BunRuntime.ts +5 -5
  12. package/src/hyper/HyperHtml.ts +11 -7
  13. package/src/hyper/jsx.d.ts +1 -1
  14. package/src/lint/plugin.js +174 -4
  15. package/src/sql/SqlClient.ts +355 -0
  16. package/src/sql/bun/index.ts +117 -50
  17. package/src/sql/index.ts +1 -1
  18. package/src/sql/libsql/index.ts +91 -77
  19. package/src/sql/libsql/libsql.d.ts +4 -1
  20. package/src/sql/mssql/index.ts +141 -108
  21. package/src/sql/mssql/mssql.d.ts +1 -0
  22. package/src/testing/TestLogger.ts +4 -4
  23. package/src/x/tailwind/compile.ts +6 -14
  24. package/dist/ChildProcess.js +0 -42
  25. package/dist/Commander.js +0 -410
  26. package/dist/ContentNegotiation.js +0 -465
  27. package/dist/Cookies.js +0 -371
  28. package/dist/Development.js +0 -94
  29. package/dist/Effectify.js +0 -27
  30. package/dist/Entity.js +0 -289
  31. package/dist/Fetch.js +0 -192
  32. package/dist/FilePathPattern.js +0 -97
  33. package/dist/FileRouter.js +0 -204
  34. package/dist/FileRouterCodegen.js +0 -298
  35. package/dist/FileSystem.js +0 -132
  36. package/dist/Http.js +0 -107
  37. package/dist/PathPattern.js +0 -451
  38. package/dist/PlatformError.js +0 -40
  39. package/dist/PlatformRuntime.js +0 -71
  40. package/dist/Route.js +0 -143
  41. package/dist/RouteBody.js +0 -92
  42. package/dist/RouteError.js +0 -76
  43. package/dist/RouteHook.js +0 -64
  44. package/dist/RouteHttp.js +0 -367
  45. package/dist/RouteHttpTracer.js +0 -90
  46. package/dist/RouteMount.js +0 -86
  47. package/dist/RouteSchema.js +0 -271
  48. package/dist/RouteSse.js +0 -94
  49. package/dist/RouteTree.js +0 -119
  50. package/dist/RouteTrie.js +0 -179
  51. package/dist/SchemaExtra.js +0 -99
  52. package/dist/Socket.js +0 -40
  53. package/dist/SqlIntrospect.js +0 -515
  54. package/dist/Start.js +0 -79
  55. package/dist/StartApp.js +0 -3
  56. package/dist/StreamExtra.js +0 -135
  57. package/dist/System.js +0 -38
  58. package/dist/TuplePathPattern.js +0 -74
  59. package/dist/Unique.js +0 -226
  60. package/dist/Values.js +0 -52
  61. package/dist/bun/BunBundle.js +0 -186
  62. package/dist/bun/BunChildProcessSpawner.js +0 -142
  63. package/dist/bun/BunImportTrackerPlugin.js +0 -91
  64. package/dist/bun/BunRoute.js +0 -157
  65. package/dist/bun/BunRuntime.js +0 -41
  66. package/dist/bun/BunServer.js +0 -285
  67. package/dist/bun/BunVirtualFilesPlugin.js +0 -54
  68. package/dist/bun/_BunEnhancedResolve.js +0 -127
  69. package/dist/bun/index.js +0 -5
  70. package/dist/bundler/Bundle.js +0 -92
  71. package/dist/bundler/BundleFiles.js +0 -154
  72. package/dist/bundler/BundleRoute.js +0 -62
  73. package/dist/client/Overlay.js +0 -33
  74. package/dist/client/ScrollState.js +0 -106
  75. package/dist/client/index.js +0 -97
  76. package/dist/console/Console.js +0 -42
  77. package/dist/console/ConsoleErrors.js +0 -211
  78. package/dist/console/ConsoleLogger.js +0 -56
  79. package/dist/console/ConsoleMetrics.js +0 -72
  80. package/dist/console/ConsoleProcess.js +0 -59
  81. package/dist/console/ConsoleStore.js +0 -72
  82. package/dist/console/ConsoleTracer.js +0 -107
  83. package/dist/console/Simulation.js +0 -784
  84. package/dist/console/index.js +0 -3
  85. package/dist/console/routes/tree.js +0 -30
  86. package/dist/datastar/actions/fetch.js +0 -536
  87. package/dist/datastar/actions/peek.js +0 -13
  88. package/dist/datastar/actions/setAll.js +0 -19
  89. package/dist/datastar/actions/toggleAll.js +0 -19
  90. package/dist/datastar/attributes/attr.js +0 -49
  91. package/dist/datastar/attributes/bind.js +0 -194
  92. package/dist/datastar/attributes/class.js +0 -54
  93. package/dist/datastar/attributes/computed.js +0 -25
  94. package/dist/datastar/attributes/effect.js +0 -10
  95. package/dist/datastar/attributes/indicator.js +0 -33
  96. package/dist/datastar/attributes/init.js +0 -27
  97. package/dist/datastar/attributes/jsonSignals.js +0 -33
  98. package/dist/datastar/attributes/on.js +0 -81
  99. package/dist/datastar/attributes/onIntersect.js +0 -53
  100. package/dist/datastar/attributes/onInterval.js +0 -31
  101. package/dist/datastar/attributes/onSignalPatch.js +0 -51
  102. package/dist/datastar/attributes/ref.js +0 -11
  103. package/dist/datastar/attributes/show.js +0 -32
  104. package/dist/datastar/attributes/signals.js +0 -18
  105. package/dist/datastar/attributes/style.js +0 -57
  106. package/dist/datastar/attributes/text.js +0 -29
  107. package/dist/datastar/engine.js +0 -1145
  108. package/dist/datastar/index.js +0 -25
  109. package/dist/datastar/utils.js +0 -250
  110. package/dist/datastar/watchers/patchElements.js +0 -486
  111. package/dist/datastar/watchers/patchSignals.js +0 -14
  112. package/dist/experimental/EncryptedCookies.js +0 -328
  113. package/dist/experimental/index.js +0 -1
  114. package/dist/hyper/Hyper.js +0 -28
  115. package/dist/hyper/HyperHtml.js +0 -165
  116. package/dist/hyper/HyperNode.js +0 -13
  117. package/dist/hyper/HyperRoute.js +0 -45
  118. package/dist/hyper/html.js +0 -30
  119. package/dist/hyper/index.js +0 -5
  120. package/dist/hyper/jsx-runtime.js +0 -14
  121. package/dist/index.js +0 -8
  122. package/dist/node/NodeFileSystem.js +0 -675
  123. package/dist/node/NodeUtils.js +0 -23
  124. package/dist/sql/Sql.js +0 -8
  125. package/dist/sql/bun/index.js +0 -142
  126. package/dist/sql/index.js +0 -1
  127. package/dist/sql/libsql/index.js +0 -156
  128. package/dist/sql/mssql/docker.js +0 -110
  129. package/dist/sql/mssql/index.js +0 -194
  130. package/dist/testing/TestLogger.js +0 -42
  131. package/dist/testing/index.js +0 -2
  132. package/dist/testing/utils.js +0 -61
  133. package/dist/x/cloudflare/CloudflareTunnel.js +0 -63
  134. package/dist/x/cloudflare/index.js +0 -1
  135. package/dist/x/tailscale/TailscaleTunnel.js +0 -94
  136. package/dist/x/tailscale/index.js +0 -1
  137. package/dist/x/tailwind/TailwindPlugin.js +0 -294
  138. package/dist/x/tailwind/compile.js +0 -210
  139. package/dist/x/tailwind/plugin.js +0 -17
  140. package/src/console/Console.ts +0 -42
  141. package/src/console/ConsoleErrors.ts +0 -213
  142. package/src/console/ConsoleLogger.ts +0 -56
  143. package/src/console/ConsoleMetrics.ts +0 -72
  144. package/src/console/ConsoleProcess.ts +0 -59
  145. package/src/console/ConsoleStore.ts +0 -187
  146. package/src/console/ConsoleTracer.ts +0 -107
  147. package/src/console/Simulation.ts +0 -814
  148. package/src/console/console.html +0 -340
  149. package/src/console/index.ts +0 -3
  150. package/src/console/routes/errors/route.tsx +0 -97
  151. package/src/console/routes/fiberDetail.tsx +0 -54
  152. package/src/console/routes/fibers/route.tsx +0 -45
  153. package/src/console/routes/git/route.tsx +0 -64
  154. package/src/console/routes/layout.tsx +0 -4
  155. package/src/console/routes/logs/route.tsx +0 -77
  156. package/src/console/routes/metrics/route.tsx +0 -36
  157. package/src/console/routes/route.tsx +0 -8
  158. package/src/console/routes/routes/route.tsx +0 -30
  159. package/src/console/routes/services/route.tsx +0 -21
  160. package/src/console/routes/system/route.tsx +0 -43
  161. package/src/console/routes/traceDetail.tsx +0 -22
  162. package/src/console/routes/traces/route.tsx +0 -81
  163. package/src/console/routes/tree.ts +0 -30
  164. package/src/console/ui/Errors.tsx +0 -76
  165. package/src/console/ui/Fibers.tsx +0 -321
  166. package/src/console/ui/Git.tsx +0 -182
  167. package/src/console/ui/Logs.tsx +0 -46
  168. package/src/console/ui/Metrics.tsx +0 -78
  169. package/src/console/ui/Routes.tsx +0 -125
  170. package/src/console/ui/Services.tsx +0 -273
  171. package/src/console/ui/Shell.tsx +0 -62
  172. package/src/console/ui/System.tsx +0 -131
  173. package/src/console/ui/Traces.tsx +0 -426
  174. package/src/sql/Sql.ts +0 -51
package/dist/Cookies.js DELETED
@@ -1,371 +0,0 @@
1
- /*
2
- * Minimal Cookies management adapted from @effect/platform
3
- * We'll aim for full compatbility when it stabilizes.
4
- */
5
- import * as Duration from "effect/Duration"
6
- import * as Inspectable from "effect/Inspectable"
7
- import * as Option from "effect/Option"
8
- import * as Pipeable from "effect/Pipeable"
9
- import * as Predicate from "effect/Predicate"
10
-
11
- export const TypeId = Symbol.for("effect-start/Cookies")
12
-
13
- export const isCookies = (u) => Predicate.hasProperty(u, TypeId)
14
-
15
- export const CookieTypeId = Symbol.for("effect-start/Cookies/Cookie")
16
-
17
- const CookiesProto = {
18
- [TypeId]: TypeId,
19
- ...Inspectable.BaseProto,
20
- toJSON() {
21
- return {
22
- _id: "effect-start/Cookies",
23
- cookies: Object.fromEntries(Object.entries(this.cookies).map(([k, v]) => [k, v.toJSON()])),
24
- }
25
- },
26
- pipe() {
27
- return Pipeable.pipeArguments(this, arguments)
28
- },
29
- }
30
-
31
- const CookieProto = {
32
- [CookieTypeId]: CookieTypeId,
33
- ...Inspectable.BaseProto,
34
- toJSON() {
35
- return {
36
- _id: "effect-start/Cookies/Cookie",
37
- name: this.name,
38
- value: this.value,
39
- options: this.options,
40
- }
41
- },
42
- }
43
-
44
- const makeCookiesFromRecord = (cookies) => {
45
- const self = Object.create(CookiesProto)
46
- self.cookies = cookies
47
- return self
48
- }
49
-
50
- const cookieFromParts = (
51
- name,
52
- value,
53
- valueEncoded,
54
- options,
55
- ) =>
56
- Object.assign(Object.create(CookieProto), {
57
- name,
58
- value,
59
- valueEncoded,
60
- options,
61
- })
62
-
63
- export const empty = makeCookiesFromRecord({})
64
-
65
- export const fromIterable = (cookies) => {
66
- const record = {}
67
- for (const cookie of cookies) {
68
- record[cookie.name] = cookie
69
- }
70
- return makeCookiesFromRecord(record)
71
- }
72
-
73
- export const fromSetCookie = (headers) => {
74
- const arrayHeaders = typeof headers === "string" ? [headers] : headers
75
- const cookies = []
76
- for (const header of arrayHeaders) {
77
- const cookie = parseSetCookie(header.trim())
78
- if (Option.isSome(cookie)) {
79
- cookies.push(cookie.value)
80
- }
81
- }
82
- return fromIterable(cookies)
83
- }
84
-
85
- export const unsafeMakeCookie = (
86
- name,
87
- value,
88
- options,
89
- ) => cookieFromParts(name, value, encodeURIComponent(value), options)
90
-
91
- export const isEmpty = (self) => {
92
- for (const _ in self.cookies) return false
93
- return true
94
- }
95
-
96
- export const get = (self, name) =>
97
- name in self.cookies ? Option.some(self.cookies[name]) : Option.none()
98
-
99
- export const getValue = (self, name) =>
100
- Option.map(get(self, name), (cookie) => cookie.value)
101
-
102
- export const setCookie = (self, cookie) =>
103
- makeCookiesFromRecord({ ...self.cookies, [cookie.name]: cookie })
104
-
105
- export const unsafeSet = (
106
- self,
107
- name,
108
- value,
109
- options,
110
- ) => setCookie(self, unsafeMakeCookie(name, value, options))
111
-
112
- export const unsafeSetAll = (
113
- self,
114
- cookies,
115
- ) => {
116
- const record = { ...self.cookies }
117
- for (const [name, value, options] of cookies) {
118
- record[name] = unsafeMakeCookie(name, value, options)
119
- }
120
- return makeCookiesFromRecord(record)
121
- }
122
-
123
- export const remove = (self, name) => {
124
- const { [name]: _, ...rest } = self.cookies
125
- return makeCookiesFromRecord(rest)
126
- }
127
-
128
- export const merge = (self, that) =>
129
- makeCookiesFromRecord({ ...self.cookies, ...that.cookies })
130
-
131
- export function serializeCookie(self) {
132
- let str = self.name + "=" + self.valueEncoded
133
-
134
- if (self.options === undefined) {
135
- return str
136
- }
137
- const options = self.options
138
-
139
- if (options.maxAge !== undefined) {
140
- const maxAge = Duration.toSeconds(options.maxAge)
141
- str += "; Max-Age=" + Math.trunc(maxAge)
142
- }
143
-
144
- if (options.domain !== undefined) {
145
- str += "; Domain=" + options.domain
146
- }
147
-
148
- if (options.path !== undefined) {
149
- str += "; Path=" + options.path
150
- }
151
-
152
- if (options.priority !== undefined) {
153
- switch (options.priority) {
154
- case "low":
155
- str += "; Priority=Low"
156
- break
157
- case "medium":
158
- str += "; Priority=Medium"
159
- break
160
- case "high":
161
- str += "; Priority=High"
162
- break
163
- }
164
- }
165
-
166
- if (options.expires !== undefined) {
167
- str += "; Expires=" + options.expires.toUTCString()
168
- }
169
-
170
- if (options.httpOnly) {
171
- str += "; HttpOnly"
172
- }
173
-
174
- if (options.secure) {
175
- str += "; Secure"
176
- }
177
-
178
- if (options.partitioned) {
179
- str += "; Partitioned"
180
- }
181
-
182
- if (options.sameSite !== undefined) {
183
- switch (options.sameSite) {
184
- case "lax":
185
- str += "; SameSite=Lax"
186
- break
187
- case "strict":
188
- str += "; SameSite=Strict"
189
- break
190
- case "none":
191
- str += "; SameSite=None"
192
- break
193
- }
194
- }
195
-
196
- return str
197
- }
198
-
199
- export const toCookieHeader = (self) =>
200
- Object.values(self.cookies)
201
- .map((cookie) => `${cookie.name}=${cookie.valueEncoded}`)
202
- .join("; ")
203
-
204
- export const toRecord = (self) => {
205
- const record = {}
206
- for (const cookie of Object.values(self.cookies)) {
207
- record[cookie.name] = cookie.value
208
- }
209
- return record
210
- }
211
-
212
- export const toSetCookieHeaders = (self) =>
213
- Object.values(self.cookies).map(serializeCookie)
214
-
215
- export function parseHeader(header) {
216
- const result = {}
217
-
218
- const strLen = header.length
219
- let pos = 0
220
- let terminatorPos = 0
221
-
222
- while (true) {
223
- if (terminatorPos === strLen) break
224
- terminatorPos = header.indexOf(";", pos)
225
- if (terminatorPos === -1) terminatorPos = strLen
226
-
227
- let eqIdx = header.indexOf("=", pos)
228
- if (eqIdx === -1) break
229
- if (eqIdx > terminatorPos) {
230
- pos = terminatorPos + 1
231
- continue
232
- }
233
-
234
- const key = header.substring(pos, eqIdx++).trim()
235
- if (result[key] === undefined) {
236
- const val =
237
- header.charCodeAt(eqIdx) === 0x22
238
- ? header.substring(eqIdx + 1, terminatorPos - 1).trim()
239
- : header.substring(eqIdx, terminatorPos).trim()
240
-
241
- result[key] = !(val.indexOf("%") === -1) ? tryDecodeURIComponent(val) : val
242
- }
243
-
244
- pos = terminatorPos + 1
245
- }
246
-
247
- return result
248
- }
249
-
250
- // eslint-disable-next-line no-control-regex
251
- const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/
252
-
253
- function parseSetCookie(header) {
254
- const parts = header
255
- .split(";")
256
- .map((_) => _.trim())
257
- .filter((_) => _ !== "")
258
- if (parts.length === 0) {
259
- return Option.none()
260
- }
261
-
262
- const firstEqual = parts[0].indexOf("=")
263
- if (firstEqual === -1) {
264
- return Option.none()
265
- }
266
- const name = parts[0].slice(0, firstEqual)
267
- if (!fieldContentRegExp.test(name)) {
268
- return Option.none()
269
- }
270
-
271
- const valueEncoded = parts[0].slice(firstEqual + 1)
272
- const value = tryDecodeURIComponent(valueEncoded)
273
-
274
- if (parts.length === 1) {
275
- return Option.some(cookieFromParts(name, value, valueEncoded))
276
- }
277
-
278
- const options = {}
279
-
280
- for (let i = 1; i < parts.length; i++) {
281
- const part = parts[i]
282
- const equalIndex = part.indexOf("=")
283
- const key = equalIndex === -1 ? part : part.slice(0, equalIndex).trim()
284
- const value = equalIndex === -1 ? undefined : part.slice(equalIndex + 1).trim()
285
-
286
- switch (key.toLowerCase()) {
287
- case "domain": {
288
- if (value === undefined) break
289
- const domain = value.trim().replace(/^\./, "")
290
- if (domain) options.domain = domain
291
- break
292
- }
293
- case "expires": {
294
- if (value === undefined) break
295
- const date = new Date(value)
296
- if (!isNaN(date.getTime())) options.expires = date
297
- break
298
- }
299
- case "max-age": {
300
- if (value === undefined) break
301
- const maxAge = parseInt(value, 10)
302
- if (!isNaN(maxAge)) options.maxAge = Duration.seconds(maxAge)
303
- break
304
- }
305
- case "path": {
306
- if (value === undefined) break
307
- if (value[0] === "/") options.path = value
308
- break
309
- }
310
- case "priority": {
311
- if (value === undefined) break
312
- switch (value.toLowerCase()) {
313
- case "low":
314
- options.priority = "low"
315
- break
316
- case "medium":
317
- options.priority = "medium"
318
- break
319
- case "high":
320
- options.priority = "high"
321
- break
322
- }
323
- break
324
- }
325
- case "httponly": {
326
- options.httpOnly = true
327
- break
328
- }
329
- case "secure": {
330
- options.secure = true
331
- break
332
- }
333
- case "partitioned": {
334
- options.partitioned = true
335
- break
336
- }
337
- case "samesite": {
338
- if (value === undefined) break
339
- switch (value.toLowerCase()) {
340
- case "lax":
341
- options.sameSite = "lax"
342
- break
343
- case "strict":
344
- options.sameSite = "strict"
345
- break
346
- case "none":
347
- options.sameSite = "none"
348
- break
349
- }
350
- break
351
- }
352
- }
353
- }
354
-
355
- return Option.some(
356
- cookieFromParts(
357
- name,
358
- value,
359
- valueEncoded,
360
- Object.keys(options).length > 0 ? options : undefined,
361
- ),
362
- )
363
- }
364
-
365
- const tryDecodeURIComponent = (str) => {
366
- try {
367
- return decodeURIComponent(str)
368
- } catch {
369
- return str
370
- }
371
- }
@@ -1,94 +0,0 @@
1
- import * as FileSystem from "./FileSystem.js"
2
- import * as Context from "effect/Context"
3
- import * as Effect from "effect/Effect"
4
- import * as Function from "effect/Function"
5
- import * as GlobalValue from "effect/GlobalValue"
6
- import * as Layer from "effect/Layer"
7
- import * as Option from "effect/Option"
8
- import * as PubSub from "effect/PubSub"
9
- import * as Stream from "effect/Stream"
10
-
11
- const devState = GlobalValue.globalValue(Symbol.for("effect-start/Development"), () => ({
12
- count: 0,
13
- pubsub: null,
14
- }))
15
-
16
- /** @internal */
17
- export const _resetForTesting = () => {
18
- devState.count = 0
19
- devState.pubsub = null
20
- }
21
-
22
- export class Development extends Context.Tag("effect-start/Development")() {}
23
-
24
- const SOURCE_FILENAME = /\.(tsx?|jsx?|html?|css|json)$/
25
-
26
- export const filterSourceFiles = (event) => {
27
- return SOURCE_FILENAME.test(event.path)
28
- }
29
-
30
- export const filterDirectory = (event) => {
31
- return event.path.endsWith("/")
32
- }
33
-
34
- export const watchSource = (opts) => {
35
- const baseDir = opts?.path ?? process.cwd()
36
- const customFilter = opts?.filter
37
-
38
- return Function.pipe(
39
- Stream.unwrap(
40
- Effect.map(FileSystem.FileSystem, (fs) =>
41
- fs.watch(baseDir, { recursive: opts?.recursive ?? true }),
42
- ),
43
- ),
44
- customFilter ? Stream.filter(customFilter) : Function.identity,
45
- Stream.rechunk(1),
46
- Stream.throttle({
47
- units: 1,
48
- cost: () => 1,
49
- duration: "400 millis",
50
- strategy: "enforce",
51
- }),
52
- )
53
- }
54
-
55
- export const watch = (opts) =>
56
- Effect.gen(function* () {
57
- devState.count++
58
-
59
- if (devState.count === 1) {
60
- const pubsub = yield* PubSub.unbounded()
61
- devState.pubsub = pubsub
62
-
63
- yield* Function.pipe(
64
- watchSource({
65
- path: opts?.path,
66
- recursive: opts?.recursive,
67
- filter: opts?.filter ?? filterSourceFiles,
68
- }),
69
- Stream.runForEach((event) => PubSub.publish(pubsub, event)),
70
- Effect.fork,
71
- )
72
- } else {
73
- yield* PubSub.publish(devState.pubsub, { _tag: "Reload" })
74
- }
75
-
76
- return { events: devState.pubsub }
77
- })
78
-
79
- export const layerWatch = (opts) => Layer.scoped(Development, watch(opts))
80
-
81
- export const option = Effect.serviceOption(Development)
82
-
83
- export const stream = () =>
84
- Stream.unwrap(
85
- Function.pipe(
86
- option,
87
- Effect.map(
88
- Option.match({
89
- onNone: () => Stream.empty,
90
- onSome: (dev) => Stream.fromPubSub(dev.events),
91
- }),
92
- ),
93
- ),
94
- )
package/dist/Effectify.js DELETED
@@ -1,27 +0,0 @@
1
- /*
2
- * Adapted from @effect/platform
3
- */
4
- import * as Effect from "effect/Effect"
5
-
6
- export const effectify = ((
7
- fn,
8
- onError,
9
- onSyncError,
10
- ) =>
11
- (...args) =>
12
- Effect.async((resume) => {
13
- try {
14
- fn(
15
- ...args,
16
- (err, result) => {
17
- if (err) {
18
- resume(Effect.fail(onError ? onError(err, args) : err))
19
- } else {
20
- resume(Effect.succeed(result))
21
- }
22
- },
23
- )
24
- } catch (err) {
25
- resume(onSyncError ? Effect.fail(onSyncError(err, args)) : Effect.die(err))
26
- }
27
- }))