@effect-app/vue 4.0.0-beta.18 → 4.0.0-beta.180
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/CHANGELOG.md +1224 -0
- package/dist/commander.d.ts +370 -0
- package/dist/commander.d.ts.map +1 -0
- package/dist/commander.js +591 -0
- package/dist/confirm.d.ts +19 -0
- package/dist/confirm.d.ts.map +1 -0
- package/dist/confirm.js +24 -0
- package/dist/errorReporter.d.ts +4 -4
- package/dist/errorReporter.d.ts.map +1 -1
- package/dist/errorReporter.js +12 -18
- package/dist/form.d.ts +13 -4
- package/dist/form.d.ts.map +1 -1
- package/dist/form.js +41 -12
- package/dist/index.d.ts +1 -1
- package/dist/intl.d.ts +15 -0
- package/dist/intl.d.ts.map +1 -0
- package/dist/intl.js +9 -0
- package/dist/lib.d.ts +6 -8
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +34 -7
- package/dist/makeClient.d.ts +148 -290
- package/dist/makeClient.d.ts.map +1 -1
- package/dist/makeClient.js +205 -361
- package/dist/makeContext.d.ts +1 -1
- package/dist/makeContext.d.ts.map +1 -1
- package/dist/makeIntl.d.ts +1 -1
- package/dist/makeIntl.d.ts.map +1 -1
- package/dist/makeUseCommand.d.ts +8 -0
- package/dist/makeUseCommand.d.ts.map +1 -0
- package/dist/makeUseCommand.js +13 -0
- package/dist/mutate.d.ts +57 -25
- package/dist/mutate.d.ts.map +1 -1
- package/dist/mutate.js +160 -33
- package/dist/query.d.ts +11 -15
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +19 -27
- package/dist/routeParams.d.ts +1 -1
- package/dist/runtime.d.ts +5 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +27 -17
- package/dist/toast.d.ts +46 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +32 -0
- package/dist/withToast.d.ts +26 -0
- package/dist/withToast.d.ts.map +1 -0
- package/dist/withToast.js +49 -0
- package/eslint.config.mjs +2 -2
- package/examples/streamMutation.ts +83 -0
- package/package.json +48 -48
- package/src/{experimental/commander.ts → commander.ts} +930 -255
- package/src/{experimental/confirm.ts → confirm.ts} +10 -14
- package/src/errorReporter.ts +62 -74
- package/src/form.ts +55 -16
- package/src/intl.ts +12 -0
- package/src/lib.ts +46 -13
- package/src/makeClient.ts +570 -1038
- package/src/{experimental/makeUseCommand.ts → makeUseCommand.ts} +3 -3
- package/src/mutate.ts +306 -72
- package/src/query.ts +39 -50
- package/src/runtime.ts +39 -18
- package/src/{experimental/toast.ts → toast.ts} +11 -25
- package/src/{experimental/withToast.ts → withToast.ts} +15 -6
- package/test/Mutation.test.ts +130 -10
- package/test/dist/form.test.d.ts.map +1 -1
- package/test/dist/lib.test.d.ts.map +1 -0
- package/test/dist/streamFinal.test.d.ts.map +1 -0
- package/test/dist/stubs.d.ts +3144 -117
- package/test/dist/stubs.d.ts.map +1 -1
- package/test/dist/stubs.js +132 -25
- package/test/form-validation-errors.test.ts +23 -19
- package/test/form.test.ts +20 -2
- package/test/lib.test.ts +240 -0
- package/test/makeClient.test.ts +241 -38
- package/test/streamFinal.test.ts +110 -0
- package/test/stubs.ts +172 -42
- package/tsconfig.examples.json +20 -0
- package/tsconfig.json +0 -1
- package/tsconfig.json.bak +5 -2
- package/tsconfig.src.json +34 -34
- package/tsconfig.test.json +2 -2
- package/vitest.config.ts +5 -5
- package/dist/experimental/commander.d.ts +0 -359
- package/dist/experimental/commander.d.ts.map +0 -1
- package/dist/experimental/commander.js +0 -557
- package/dist/experimental/confirm.d.ts +0 -19
- package/dist/experimental/confirm.d.ts.map +0 -1
- package/dist/experimental/confirm.js +0 -28
- package/dist/experimental/intl.d.ts +0 -16
- package/dist/experimental/intl.d.ts.map +0 -1
- package/dist/experimental/intl.js +0 -5
- package/dist/experimental/makeUseCommand.d.ts +0 -8
- package/dist/experimental/makeUseCommand.d.ts.map +0 -1
- package/dist/experimental/makeUseCommand.js +0 -13
- package/dist/experimental/toast.d.ts +0 -47
- package/dist/experimental/toast.d.ts.map +0 -1
- package/dist/experimental/toast.js +0 -41
- package/dist/experimental/withToast.d.ts +0 -25
- package/dist/experimental/withToast.d.ts.map +0 -1
- package/dist/experimental/withToast.js +0 -45
- package/src/experimental/intl.ts +0 -9
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { asResult, type MissingDependencies, reportRuntimeError } from "@effect-app/vue"
|
|
2
|
+
import { asResult, deepToRaw, type MissingDependencies, reportRuntimeError } from "@effect-app/vue"
|
|
3
3
|
import { reportMessage } from "@effect-app/vue/errorReporter"
|
|
4
|
-
import { Cause, Effect, type Exit, type Fiber, flow, Layer, Match, MutableHashMap, Option, Predicate, S
|
|
4
|
+
import { Cause, Context, Effect, type Exit, type Fiber, flow, Layer, Match, MutableHashMap, Option, Predicate, S } from "effect-app"
|
|
5
5
|
import { SupportedErrors } from "effect-app/client"
|
|
6
6
|
import { OperationFailure, OperationSuccess } from "effect-app/Operations"
|
|
7
7
|
import { isGeneratorFunction, wrapEffect } from "effect-app/utils"
|
|
8
|
+
import { type Refinement } from "effect/Predicate"
|
|
8
9
|
import { type AsyncResult } from "effect/unstable/reactivity/AsyncResult"
|
|
9
10
|
import { type FormatXMLElementFn, type PrimitiveType } from "intl-messageformat"
|
|
10
|
-
import { computed, type ComputedRef, reactive, ref } from "vue"
|
|
11
|
+
import { computed, type ComputedRef, reactive, ref, toRaw } from "vue"
|
|
11
12
|
import { Confirm } from "./confirm.js"
|
|
12
13
|
import { I18n } from "./intl.js"
|
|
13
14
|
import { WithToast } from "./withToast.js"
|
|
@@ -66,7 +67,7 @@ export const DefaultIntl = {
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
export class CommandContext extends
|
|
70
|
+
export class CommandContext extends Context.Service<CommandContext, {
|
|
70
71
|
id: string
|
|
71
72
|
i18nKey: string
|
|
72
73
|
action: string
|
|
@@ -96,7 +97,7 @@ export declare namespace Commander {
|
|
|
96
97
|
& NonGen<RT, Id, I18nKey, State>
|
|
97
98
|
& CommandContextLocal<Id, I18nKey>
|
|
98
99
|
& {
|
|
99
|
-
state:
|
|
100
|
+
state: Context.Service<`Commander.Command.${Id}.state`, State>
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
export type CommanderFn<RT, Id extends string, I18nKey extends string, State extends IntlRecord | undefined> =
|
|
@@ -116,7 +117,7 @@ export declare namespace Commander {
|
|
|
116
117
|
& GenWrap<RT, Id, I18nCustomKey, I, A, E, R, State>
|
|
117
118
|
& NonGenWrap<RT, Id, I18nCustomKey, I, A, E, R, State>
|
|
118
119
|
& {
|
|
119
|
-
state:
|
|
120
|
+
state: Context.Service<`Commander.Command.${Id}.state`, State>
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
export interface CommandContextLocal<Id extends string, I18nKey extends string> {
|
|
@@ -188,6 +189,8 @@ export declare namespace Commander {
|
|
|
188
189
|
state: State
|
|
189
190
|
}
|
|
190
191
|
|
|
192
|
+
type ArgForCombinator<Arg> = [Arg] extends [void] ? undefined : NoInfer<Arg>
|
|
193
|
+
|
|
191
194
|
type CommandOutHelper<
|
|
192
195
|
Arg,
|
|
193
196
|
Eff extends Effect.Effect<any, any, any>,
|
|
@@ -241,7 +244,7 @@ export declare namespace Commander {
|
|
|
241
244
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
242
245
|
: never
|
|
243
246
|
>,
|
|
244
|
-
arg:
|
|
247
|
+
arg: ArgForCombinator<Arg>,
|
|
245
248
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
246
249
|
) => A
|
|
247
250
|
): CommandOutHelper<Arg, A, Id, I18nKey, State>
|
|
@@ -263,10 +266,14 @@ export declare namespace Commander {
|
|
|
263
266
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
264
267
|
: never
|
|
265
268
|
>,
|
|
266
|
-
arg:
|
|
269
|
+
arg: ArgForCombinator<Arg>,
|
|
267
270
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
268
271
|
) => A,
|
|
269
|
-
b: (
|
|
272
|
+
b: (
|
|
273
|
+
_: A,
|
|
274
|
+
arg: ArgForCombinator<Arg>,
|
|
275
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
276
|
+
) => B
|
|
270
277
|
): CommandOutHelper<Arg, B, Id, I18nKey, State>
|
|
271
278
|
<
|
|
272
279
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -287,11 +294,19 @@ export declare namespace Commander {
|
|
|
287
294
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
288
295
|
: never
|
|
289
296
|
>,
|
|
290
|
-
arg:
|
|
297
|
+
arg: ArgForCombinator<Arg>,
|
|
291
298
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
292
299
|
) => A,
|
|
293
|
-
b: (
|
|
294
|
-
|
|
300
|
+
b: (
|
|
301
|
+
_: A,
|
|
302
|
+
arg: ArgForCombinator<Arg>,
|
|
303
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
304
|
+
) => B,
|
|
305
|
+
c: (
|
|
306
|
+
_: B,
|
|
307
|
+
arg: ArgForCombinator<Arg>,
|
|
308
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
309
|
+
) => C
|
|
295
310
|
): CommandOutHelper<Arg, C, Id, I18nKey, State>
|
|
296
311
|
<
|
|
297
312
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -313,12 +328,24 @@ export declare namespace Commander {
|
|
|
313
328
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
314
329
|
: never
|
|
315
330
|
>,
|
|
316
|
-
arg:
|
|
331
|
+
arg: ArgForCombinator<Arg>,
|
|
317
332
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
318
333
|
) => A,
|
|
319
|
-
b: (
|
|
320
|
-
|
|
321
|
-
|
|
334
|
+
b: (
|
|
335
|
+
_: A,
|
|
336
|
+
arg: ArgForCombinator<Arg>,
|
|
337
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
338
|
+
) => B,
|
|
339
|
+
c: (
|
|
340
|
+
_: B,
|
|
341
|
+
arg: ArgForCombinator<Arg>,
|
|
342
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
343
|
+
) => C,
|
|
344
|
+
d: (
|
|
345
|
+
_: C,
|
|
346
|
+
arg: ArgForCombinator<Arg>,
|
|
347
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
348
|
+
) => D
|
|
322
349
|
): CommandOutHelper<Arg, D, Id, I18nKey, State>
|
|
323
350
|
<
|
|
324
351
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -341,13 +368,29 @@ export declare namespace Commander {
|
|
|
341
368
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
342
369
|
: never
|
|
343
370
|
>,
|
|
344
|
-
arg:
|
|
371
|
+
arg: ArgForCombinator<Arg>,
|
|
345
372
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
346
373
|
) => A,
|
|
347
|
-
b: (
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
374
|
+
b: (
|
|
375
|
+
_: A,
|
|
376
|
+
arg: ArgForCombinator<Arg>,
|
|
377
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
378
|
+
) => B,
|
|
379
|
+
c: (
|
|
380
|
+
_: B,
|
|
381
|
+
arg: ArgForCombinator<Arg>,
|
|
382
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
383
|
+
) => C,
|
|
384
|
+
d: (
|
|
385
|
+
_: C,
|
|
386
|
+
arg: ArgForCombinator<Arg>,
|
|
387
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
388
|
+
) => D,
|
|
389
|
+
e: (
|
|
390
|
+
_: D,
|
|
391
|
+
arg: ArgForCombinator<Arg>,
|
|
392
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
393
|
+
) => E
|
|
351
394
|
): CommandOutHelper<Arg, E, Id, I18nKey, State>
|
|
352
395
|
<
|
|
353
396
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -371,14 +414,34 @@ export declare namespace Commander {
|
|
|
371
414
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
372
415
|
: never
|
|
373
416
|
>,
|
|
374
|
-
arg:
|
|
417
|
+
arg: ArgForCombinator<Arg>,
|
|
375
418
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
376
419
|
) => A,
|
|
377
|
-
b: (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
420
|
+
b: (
|
|
421
|
+
_: A,
|
|
422
|
+
arg: ArgForCombinator<Arg>,
|
|
423
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
424
|
+
) => B,
|
|
425
|
+
c: (
|
|
426
|
+
_: B,
|
|
427
|
+
arg: ArgForCombinator<Arg>,
|
|
428
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
429
|
+
) => C,
|
|
430
|
+
d: (
|
|
431
|
+
_: C,
|
|
432
|
+
arg: ArgForCombinator<Arg>,
|
|
433
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
434
|
+
) => D,
|
|
435
|
+
e: (
|
|
436
|
+
_: D,
|
|
437
|
+
arg: ArgForCombinator<Arg>,
|
|
438
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
439
|
+
) => E,
|
|
440
|
+
f: (
|
|
441
|
+
_: E,
|
|
442
|
+
arg: ArgForCombinator<Arg>,
|
|
443
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
444
|
+
) => F
|
|
382
445
|
): CommandOutHelper<Arg, F, Id, I18nKey, State>
|
|
383
446
|
<
|
|
384
447
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -403,15 +466,39 @@ export declare namespace Commander {
|
|
|
403
466
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
404
467
|
: never
|
|
405
468
|
>,
|
|
406
|
-
arg:
|
|
469
|
+
arg: ArgForCombinator<Arg>,
|
|
407
470
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
408
471
|
) => A,
|
|
409
|
-
b: (
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
472
|
+
b: (
|
|
473
|
+
_: A,
|
|
474
|
+
arg: ArgForCombinator<Arg>,
|
|
475
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
476
|
+
) => B,
|
|
477
|
+
c: (
|
|
478
|
+
_: B,
|
|
479
|
+
arg: ArgForCombinator<Arg>,
|
|
480
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
481
|
+
) => C,
|
|
482
|
+
d: (
|
|
483
|
+
_: C,
|
|
484
|
+
arg: ArgForCombinator<Arg>,
|
|
485
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
486
|
+
) => D,
|
|
487
|
+
e: (
|
|
488
|
+
_: D,
|
|
489
|
+
arg: ArgForCombinator<Arg>,
|
|
490
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
491
|
+
) => E,
|
|
492
|
+
f: (
|
|
493
|
+
_: E,
|
|
494
|
+
arg: ArgForCombinator<Arg>,
|
|
495
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
496
|
+
) => F,
|
|
497
|
+
g: (
|
|
498
|
+
_: F,
|
|
499
|
+
arg: ArgForCombinator<Arg>,
|
|
500
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
501
|
+
) => G
|
|
415
502
|
): CommandOutHelper<Arg, G, Id, I18nKey, State>
|
|
416
503
|
<
|
|
417
504
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -437,16 +524,44 @@ export declare namespace Commander {
|
|
|
437
524
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
438
525
|
: never
|
|
439
526
|
>,
|
|
440
|
-
arg:
|
|
527
|
+
arg: ArgForCombinator<Arg>,
|
|
441
528
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
442
529
|
) => A,
|
|
443
|
-
b: (
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
530
|
+
b: (
|
|
531
|
+
_: A,
|
|
532
|
+
arg: ArgForCombinator<Arg>,
|
|
533
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
534
|
+
) => B,
|
|
535
|
+
c: (
|
|
536
|
+
_: B,
|
|
537
|
+
arg: ArgForCombinator<Arg>,
|
|
538
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
539
|
+
) => C,
|
|
540
|
+
d: (
|
|
541
|
+
_: C,
|
|
542
|
+
arg: ArgForCombinator<Arg>,
|
|
543
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
544
|
+
) => D,
|
|
545
|
+
e: (
|
|
546
|
+
_: D,
|
|
547
|
+
arg: ArgForCombinator<Arg>,
|
|
548
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
549
|
+
) => E,
|
|
550
|
+
f: (
|
|
551
|
+
_: E,
|
|
552
|
+
arg: ArgForCombinator<Arg>,
|
|
553
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
554
|
+
) => F,
|
|
555
|
+
g: (
|
|
556
|
+
_: F,
|
|
557
|
+
arg: ArgForCombinator<Arg>,
|
|
558
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
559
|
+
) => G,
|
|
560
|
+
h: (
|
|
561
|
+
_: G,
|
|
562
|
+
arg: ArgForCombinator<Arg>,
|
|
563
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
564
|
+
) => H
|
|
450
565
|
): CommandOutHelper<Arg, H, Id, I18nKey, State>
|
|
451
566
|
<
|
|
452
567
|
Eff extends Effect.Yieldable<any, any, any, any>,
|
|
@@ -473,17 +588,49 @@ export declare namespace Commander {
|
|
|
473
588
|
: [Eff] extends [Effect.Yieldable<any, infer _A, infer _E, infer R>] ? R
|
|
474
589
|
: never
|
|
475
590
|
>,
|
|
476
|
-
arg:
|
|
591
|
+
arg: ArgForCombinator<Arg>,
|
|
477
592
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
478
593
|
) => A,
|
|
479
|
-
b: (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
594
|
+
b: (
|
|
595
|
+
_: A,
|
|
596
|
+
arg: ArgForCombinator<Arg>,
|
|
597
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
598
|
+
) => B,
|
|
599
|
+
c: (
|
|
600
|
+
_: B,
|
|
601
|
+
arg: ArgForCombinator<Arg>,
|
|
602
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
603
|
+
) => C,
|
|
604
|
+
d: (
|
|
605
|
+
_: C,
|
|
606
|
+
arg: ArgForCombinator<Arg>,
|
|
607
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
608
|
+
) => D,
|
|
609
|
+
e: (
|
|
610
|
+
_: D,
|
|
611
|
+
arg: ArgForCombinator<Arg>,
|
|
612
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
613
|
+
) => E,
|
|
614
|
+
f: (
|
|
615
|
+
_: E,
|
|
616
|
+
arg: ArgForCombinator<Arg>,
|
|
617
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
618
|
+
) => F,
|
|
619
|
+
g: (
|
|
620
|
+
_: F,
|
|
621
|
+
arg: ArgForCombinator<Arg>,
|
|
622
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
623
|
+
) => G,
|
|
624
|
+
h: (
|
|
625
|
+
_: G,
|
|
626
|
+
arg: ArgForCombinator<Arg>,
|
|
627
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
628
|
+
) => H,
|
|
629
|
+
i: (
|
|
630
|
+
_: H,
|
|
631
|
+
arg: ArgForCombinator<Arg>,
|
|
632
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
633
|
+
) => I
|
|
487
634
|
): CommandOutHelper<Arg, I, Id, I18nKey, State>
|
|
488
635
|
}
|
|
489
636
|
|
|
@@ -500,7 +647,11 @@ export declare namespace Commander {
|
|
|
500
647
|
Arg = void
|
|
501
648
|
>(
|
|
502
649
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
503
|
-
a: (
|
|
650
|
+
a: (
|
|
651
|
+
_: A,
|
|
652
|
+
arg: ArgForCombinator<Arg>,
|
|
653
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
654
|
+
) => Eff
|
|
504
655
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
505
656
|
<
|
|
506
657
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -509,8 +660,16 @@ export declare namespace Commander {
|
|
|
509
660
|
Arg = void
|
|
510
661
|
>(
|
|
511
662
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
512
|
-
a: (
|
|
513
|
-
|
|
663
|
+
a: (
|
|
664
|
+
_: A,
|
|
665
|
+
arg: ArgForCombinator<Arg>,
|
|
666
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
667
|
+
) => B,
|
|
668
|
+
b: (
|
|
669
|
+
_: B,
|
|
670
|
+
arg: ArgForCombinator<Arg>,
|
|
671
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
672
|
+
) => Eff
|
|
514
673
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
515
674
|
<
|
|
516
675
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -520,9 +679,21 @@ export declare namespace Commander {
|
|
|
520
679
|
Arg = void
|
|
521
680
|
>(
|
|
522
681
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
523
|
-
a: (
|
|
524
|
-
|
|
525
|
-
|
|
682
|
+
a: (
|
|
683
|
+
_: A,
|
|
684
|
+
arg: ArgForCombinator<Arg>,
|
|
685
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
686
|
+
) => B,
|
|
687
|
+
b: (
|
|
688
|
+
_: B,
|
|
689
|
+
arg: ArgForCombinator<Arg>,
|
|
690
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
691
|
+
) => C,
|
|
692
|
+
c: (
|
|
693
|
+
_: C,
|
|
694
|
+
arg: ArgForCombinator<Arg>,
|
|
695
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
696
|
+
) => Eff
|
|
526
697
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
527
698
|
<
|
|
528
699
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -533,10 +704,26 @@ export declare namespace Commander {
|
|
|
533
704
|
Arg = void
|
|
534
705
|
>(
|
|
535
706
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
536
|
-
a: (
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
707
|
+
a: (
|
|
708
|
+
_: A,
|
|
709
|
+
arg: ArgForCombinator<Arg>,
|
|
710
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
711
|
+
) => B,
|
|
712
|
+
b: (
|
|
713
|
+
_: B,
|
|
714
|
+
arg: ArgForCombinator<Arg>,
|
|
715
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
716
|
+
) => C,
|
|
717
|
+
c: (
|
|
718
|
+
_: C,
|
|
719
|
+
arg: ArgForCombinator<Arg>,
|
|
720
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
721
|
+
) => D,
|
|
722
|
+
d: (
|
|
723
|
+
_: D,
|
|
724
|
+
arg: ArgForCombinator<Arg>,
|
|
725
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
726
|
+
) => Eff
|
|
540
727
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
541
728
|
<
|
|
542
729
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -548,11 +735,31 @@ export declare namespace Commander {
|
|
|
548
735
|
Arg = void
|
|
549
736
|
>(
|
|
550
737
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
551
|
-
a: (
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
738
|
+
a: (
|
|
739
|
+
_: A,
|
|
740
|
+
arg: ArgForCombinator<Arg>,
|
|
741
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
742
|
+
) => B,
|
|
743
|
+
b: (
|
|
744
|
+
_: B,
|
|
745
|
+
arg: ArgForCombinator<Arg>,
|
|
746
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
747
|
+
) => C,
|
|
748
|
+
c: (
|
|
749
|
+
_: C,
|
|
750
|
+
arg: ArgForCombinator<Arg>,
|
|
751
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
752
|
+
) => D,
|
|
753
|
+
d: (
|
|
754
|
+
_: D,
|
|
755
|
+
arg: ArgForCombinator<Arg>,
|
|
756
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
757
|
+
) => E,
|
|
758
|
+
e: (
|
|
759
|
+
_: E,
|
|
760
|
+
arg: ArgForCombinator<Arg>,
|
|
761
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
762
|
+
) => Eff
|
|
556
763
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
557
764
|
<
|
|
558
765
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -565,12 +772,36 @@ export declare namespace Commander {
|
|
|
565
772
|
Arg = void
|
|
566
773
|
>(
|
|
567
774
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
568
|
-
a: (
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
775
|
+
a: (
|
|
776
|
+
_: A,
|
|
777
|
+
arg: ArgForCombinator<Arg>,
|
|
778
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
779
|
+
) => B,
|
|
780
|
+
b: (
|
|
781
|
+
_: B,
|
|
782
|
+
arg: ArgForCombinator<Arg>,
|
|
783
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
784
|
+
) => C,
|
|
785
|
+
c: (
|
|
786
|
+
_: C,
|
|
787
|
+
arg: ArgForCombinator<Arg>,
|
|
788
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
789
|
+
) => D,
|
|
790
|
+
d: (
|
|
791
|
+
_: D,
|
|
792
|
+
arg: ArgForCombinator<Arg>,
|
|
793
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
794
|
+
) => E,
|
|
795
|
+
e: (
|
|
796
|
+
_: E,
|
|
797
|
+
arg: ArgForCombinator<Arg>,
|
|
798
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
799
|
+
) => F,
|
|
800
|
+
f: (
|
|
801
|
+
_: F,
|
|
802
|
+
arg: ArgForCombinator<Arg>,
|
|
803
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
804
|
+
) => Eff
|
|
574
805
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
575
806
|
<
|
|
576
807
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -584,13 +815,41 @@ export declare namespace Commander {
|
|
|
584
815
|
Arg = void
|
|
585
816
|
>(
|
|
586
817
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
587
|
-
a: (
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
818
|
+
a: (
|
|
819
|
+
_: A,
|
|
820
|
+
arg: ArgForCombinator<Arg>,
|
|
821
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
822
|
+
) => B,
|
|
823
|
+
b: (
|
|
824
|
+
_: B,
|
|
825
|
+
arg: ArgForCombinator<Arg>,
|
|
826
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
827
|
+
) => C,
|
|
828
|
+
c: (
|
|
829
|
+
_: C,
|
|
830
|
+
arg: ArgForCombinator<Arg>,
|
|
831
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
832
|
+
) => D,
|
|
833
|
+
d: (
|
|
834
|
+
_: D,
|
|
835
|
+
arg: ArgForCombinator<Arg>,
|
|
836
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
837
|
+
) => E,
|
|
838
|
+
e: (
|
|
839
|
+
_: E,
|
|
840
|
+
arg: ArgForCombinator<Arg>,
|
|
841
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
842
|
+
) => F,
|
|
843
|
+
f: (
|
|
844
|
+
_: F,
|
|
845
|
+
arg: ArgForCombinator<Arg>,
|
|
846
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
847
|
+
) => G,
|
|
848
|
+
g: (
|
|
849
|
+
_: G,
|
|
850
|
+
arg: ArgForCombinator<Arg>,
|
|
851
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
852
|
+
) => Eff
|
|
594
853
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
595
854
|
<
|
|
596
855
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -605,14 +864,46 @@ export declare namespace Commander {
|
|
|
605
864
|
Arg = void
|
|
606
865
|
>(
|
|
607
866
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
608
|
-
a: (
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
867
|
+
a: (
|
|
868
|
+
_: A,
|
|
869
|
+
arg: ArgForCombinator<Arg>,
|
|
870
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
871
|
+
) => B,
|
|
872
|
+
b: (
|
|
873
|
+
_: B,
|
|
874
|
+
arg: ArgForCombinator<Arg>,
|
|
875
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
876
|
+
) => C,
|
|
877
|
+
c: (
|
|
878
|
+
_: C,
|
|
879
|
+
arg: ArgForCombinator<Arg>,
|
|
880
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
881
|
+
) => D,
|
|
882
|
+
d: (
|
|
883
|
+
_: D,
|
|
884
|
+
arg: ArgForCombinator<Arg>,
|
|
885
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
886
|
+
) => E,
|
|
887
|
+
e: (
|
|
888
|
+
_: E,
|
|
889
|
+
arg: ArgForCombinator<Arg>,
|
|
890
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
891
|
+
) => F,
|
|
892
|
+
f: (
|
|
893
|
+
_: F,
|
|
894
|
+
arg: ArgForCombinator<Arg>,
|
|
895
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
896
|
+
) => G,
|
|
897
|
+
g: (
|
|
898
|
+
_: G,
|
|
899
|
+
arg: ArgForCombinator<Arg>,
|
|
900
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
901
|
+
) => H,
|
|
902
|
+
h: (
|
|
903
|
+
_: H,
|
|
904
|
+
arg: ArgForCombinator<Arg>,
|
|
905
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
906
|
+
) => Eff
|
|
616
907
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
617
908
|
<
|
|
618
909
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -628,15 +919,51 @@ export declare namespace Commander {
|
|
|
628
919
|
Arg = void
|
|
629
920
|
>(
|
|
630
921
|
body: (arg: Arg, ctx: CommandContextLocal2<Id, I18nKey, State>) => A,
|
|
631
|
-
a: (
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
922
|
+
a: (
|
|
923
|
+
_: A,
|
|
924
|
+
arg: ArgForCombinator<Arg>,
|
|
925
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
926
|
+
) => B,
|
|
927
|
+
b: (
|
|
928
|
+
_: B,
|
|
929
|
+
arg: ArgForCombinator<Arg>,
|
|
930
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
931
|
+
) => C,
|
|
932
|
+
c: (
|
|
933
|
+
_: C,
|
|
934
|
+
arg: ArgForCombinator<Arg>,
|
|
935
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
936
|
+
) => D,
|
|
937
|
+
d: (
|
|
938
|
+
_: D,
|
|
939
|
+
arg: ArgForCombinator<Arg>,
|
|
940
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
941
|
+
) => E,
|
|
942
|
+
e: (
|
|
943
|
+
_: E,
|
|
944
|
+
arg: ArgForCombinator<Arg>,
|
|
945
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
946
|
+
) => F,
|
|
947
|
+
f: (
|
|
948
|
+
_: F,
|
|
949
|
+
arg: ArgForCombinator<Arg>,
|
|
950
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
951
|
+
) => G,
|
|
952
|
+
g: (
|
|
953
|
+
_: G,
|
|
954
|
+
arg: ArgForCombinator<Arg>,
|
|
955
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
956
|
+
) => H,
|
|
957
|
+
h: (
|
|
958
|
+
_: H,
|
|
959
|
+
arg: ArgForCombinator<Arg>,
|
|
960
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
961
|
+
) => I,
|
|
962
|
+
i: (
|
|
963
|
+
_: H,
|
|
964
|
+
arg: ArgForCombinator<Arg>,
|
|
965
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
966
|
+
) => Eff
|
|
640
967
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
641
968
|
}
|
|
642
969
|
|
|
@@ -669,7 +996,7 @@ export declare namespace Commander {
|
|
|
669
996
|
EEff,
|
|
670
997
|
REff
|
|
671
998
|
>,
|
|
672
|
-
arg:
|
|
999
|
+
arg: ArgForCombinator<Arg>,
|
|
673
1000
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
674
1001
|
) => A
|
|
675
1002
|
): CommandOutHelper<Arg, A, Id, I18nKey, State>
|
|
@@ -683,10 +1010,14 @@ export declare namespace Commander {
|
|
|
683
1010
|
EEff,
|
|
684
1011
|
REff
|
|
685
1012
|
>,
|
|
686
|
-
arg:
|
|
1013
|
+
arg: ArgForCombinator<Arg>,
|
|
687
1014
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
688
1015
|
) => A,
|
|
689
|
-
b: (
|
|
1016
|
+
b: (
|
|
1017
|
+
_: A,
|
|
1018
|
+
arg: ArgForCombinator<Arg>,
|
|
1019
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1020
|
+
) => B
|
|
690
1021
|
): CommandOutHelper<Arg, B, Id, I18nKey, State>
|
|
691
1022
|
<
|
|
692
1023
|
A,
|
|
@@ -699,11 +1030,19 @@ export declare namespace Commander {
|
|
|
699
1030
|
EEff,
|
|
700
1031
|
REff
|
|
701
1032
|
>,
|
|
702
|
-
arg:
|
|
1033
|
+
arg: ArgForCombinator<Arg>,
|
|
703
1034
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
704
1035
|
) => A,
|
|
705
|
-
b: (
|
|
706
|
-
|
|
1036
|
+
b: (
|
|
1037
|
+
_: A,
|
|
1038
|
+
arg: ArgForCombinator<Arg>,
|
|
1039
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1040
|
+
) => B,
|
|
1041
|
+
c: (
|
|
1042
|
+
_: B,
|
|
1043
|
+
arg: ArgForCombinator<Arg>,
|
|
1044
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1045
|
+
) => C
|
|
707
1046
|
): CommandOutHelper<Arg, C, Id, I18nKey, State>
|
|
708
1047
|
<
|
|
709
1048
|
A,
|
|
@@ -717,12 +1056,24 @@ export declare namespace Commander {
|
|
|
717
1056
|
EEff,
|
|
718
1057
|
REff
|
|
719
1058
|
>,
|
|
720
|
-
arg:
|
|
1059
|
+
arg: ArgForCombinator<Arg>,
|
|
721
1060
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
722
1061
|
) => A,
|
|
723
|
-
b: (
|
|
724
|
-
|
|
725
|
-
|
|
1062
|
+
b: (
|
|
1063
|
+
_: A,
|
|
1064
|
+
arg: ArgForCombinator<Arg>,
|
|
1065
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1066
|
+
) => B,
|
|
1067
|
+
c: (
|
|
1068
|
+
_: B,
|
|
1069
|
+
arg: ArgForCombinator<Arg>,
|
|
1070
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1071
|
+
) => C,
|
|
1072
|
+
d: (
|
|
1073
|
+
_: C,
|
|
1074
|
+
arg: ArgForCombinator<Arg>,
|
|
1075
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1076
|
+
) => D
|
|
726
1077
|
): CommandOutHelper<Arg, D, Id, I18nKey, State>
|
|
727
1078
|
<
|
|
728
1079
|
A,
|
|
@@ -737,13 +1088,29 @@ export declare namespace Commander {
|
|
|
737
1088
|
EEff,
|
|
738
1089
|
REff
|
|
739
1090
|
>,
|
|
740
|
-
arg:
|
|
1091
|
+
arg: ArgForCombinator<Arg>,
|
|
741
1092
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
742
1093
|
) => A,
|
|
743
|
-
b: (
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
1094
|
+
b: (
|
|
1095
|
+
_: A,
|
|
1096
|
+
arg: ArgForCombinator<Arg>,
|
|
1097
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1098
|
+
) => B,
|
|
1099
|
+
c: (
|
|
1100
|
+
_: B,
|
|
1101
|
+
arg: ArgForCombinator<Arg>,
|
|
1102
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1103
|
+
) => C,
|
|
1104
|
+
d: (
|
|
1105
|
+
_: C,
|
|
1106
|
+
arg: ArgForCombinator<Arg>,
|
|
1107
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1108
|
+
) => D,
|
|
1109
|
+
e: (
|
|
1110
|
+
_: D,
|
|
1111
|
+
arg: ArgForCombinator<Arg>,
|
|
1112
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1113
|
+
) => E
|
|
747
1114
|
): CommandOutHelper<Arg, E, Id, I18nKey, State>
|
|
748
1115
|
<
|
|
749
1116
|
A,
|
|
@@ -759,14 +1126,34 @@ export declare namespace Commander {
|
|
|
759
1126
|
EEff,
|
|
760
1127
|
REff
|
|
761
1128
|
>,
|
|
762
|
-
arg:
|
|
1129
|
+
arg: ArgForCombinator<Arg>,
|
|
763
1130
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
764
1131
|
) => A,
|
|
765
|
-
b: (
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
1132
|
+
b: (
|
|
1133
|
+
_: A,
|
|
1134
|
+
arg: ArgForCombinator<Arg>,
|
|
1135
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1136
|
+
) => B,
|
|
1137
|
+
c: (
|
|
1138
|
+
_: B,
|
|
1139
|
+
arg: ArgForCombinator<Arg>,
|
|
1140
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1141
|
+
) => C,
|
|
1142
|
+
d: (
|
|
1143
|
+
_: C,
|
|
1144
|
+
arg: ArgForCombinator<Arg>,
|
|
1145
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1146
|
+
) => D,
|
|
1147
|
+
e: (
|
|
1148
|
+
_: D,
|
|
1149
|
+
arg: ArgForCombinator<Arg>,
|
|
1150
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1151
|
+
) => E,
|
|
1152
|
+
f: (
|
|
1153
|
+
_: E,
|
|
1154
|
+
arg: ArgForCombinator<Arg>,
|
|
1155
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1156
|
+
) => F
|
|
770
1157
|
): CommandOutHelper<Arg, F, Id, I18nKey, State>
|
|
771
1158
|
<
|
|
772
1159
|
A,
|
|
@@ -783,15 +1170,39 @@ export declare namespace Commander {
|
|
|
783
1170
|
EEff,
|
|
784
1171
|
REff
|
|
785
1172
|
>,
|
|
786
|
-
arg:
|
|
1173
|
+
arg: ArgForCombinator<Arg>,
|
|
787
1174
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
788
1175
|
) => A,
|
|
789
|
-
b: (
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1176
|
+
b: (
|
|
1177
|
+
_: A,
|
|
1178
|
+
arg: ArgForCombinator<Arg>,
|
|
1179
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1180
|
+
) => B,
|
|
1181
|
+
c: (
|
|
1182
|
+
_: B,
|
|
1183
|
+
arg: ArgForCombinator<Arg>,
|
|
1184
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1185
|
+
) => C,
|
|
1186
|
+
d: (
|
|
1187
|
+
_: C,
|
|
1188
|
+
arg: ArgForCombinator<Arg>,
|
|
1189
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1190
|
+
) => D,
|
|
1191
|
+
e: (
|
|
1192
|
+
_: D,
|
|
1193
|
+
arg: ArgForCombinator<Arg>,
|
|
1194
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1195
|
+
) => E,
|
|
1196
|
+
f: (
|
|
1197
|
+
_: E,
|
|
1198
|
+
arg: ArgForCombinator<Arg>,
|
|
1199
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1200
|
+
) => F,
|
|
1201
|
+
g: (
|
|
1202
|
+
_: F,
|
|
1203
|
+
arg: ArgForCombinator<Arg>,
|
|
1204
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1205
|
+
) => G
|
|
795
1206
|
): CommandOutHelper<Arg, G, Id, I18nKey, State>
|
|
796
1207
|
<A, B, C, D, E, F, G, H extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>>(
|
|
797
1208
|
a: (
|
|
@@ -800,16 +1211,44 @@ export declare namespace Commander {
|
|
|
800
1211
|
EEff,
|
|
801
1212
|
REff
|
|
802
1213
|
>,
|
|
803
|
-
arg:
|
|
1214
|
+
arg: ArgForCombinator<Arg>,
|
|
804
1215
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
805
1216
|
) => A,
|
|
806
|
-
b: (
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
1217
|
+
b: (
|
|
1218
|
+
_: A,
|
|
1219
|
+
arg: ArgForCombinator<Arg>,
|
|
1220
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1221
|
+
) => B,
|
|
1222
|
+
c: (
|
|
1223
|
+
_: B,
|
|
1224
|
+
arg: ArgForCombinator<Arg>,
|
|
1225
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1226
|
+
) => C,
|
|
1227
|
+
d: (
|
|
1228
|
+
_: C,
|
|
1229
|
+
arg: ArgForCombinator<Arg>,
|
|
1230
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1231
|
+
) => D,
|
|
1232
|
+
e: (
|
|
1233
|
+
_: D,
|
|
1234
|
+
arg: ArgForCombinator<Arg>,
|
|
1235
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1236
|
+
) => E,
|
|
1237
|
+
f: (
|
|
1238
|
+
_: E,
|
|
1239
|
+
arg: ArgForCombinator<Arg>,
|
|
1240
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1241
|
+
) => F,
|
|
1242
|
+
g: (
|
|
1243
|
+
_: F,
|
|
1244
|
+
arg: ArgForCombinator<Arg>,
|
|
1245
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1246
|
+
) => G,
|
|
1247
|
+
h: (
|
|
1248
|
+
_: G,
|
|
1249
|
+
arg: ArgForCombinator<Arg>,
|
|
1250
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1251
|
+
) => H
|
|
813
1252
|
): CommandOutHelper<Arg, H, Id, I18nKey, State>
|
|
814
1253
|
<A, B, C, D, E, F, G, H, I extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>>(
|
|
815
1254
|
a: (
|
|
@@ -818,17 +1257,49 @@ export declare namespace Commander {
|
|
|
818
1257
|
EEff,
|
|
819
1258
|
REff
|
|
820
1259
|
>,
|
|
821
|
-
arg:
|
|
1260
|
+
arg: ArgForCombinator<Arg>,
|
|
822
1261
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
823
1262
|
) => A,
|
|
824
|
-
b: (
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
1263
|
+
b: (
|
|
1264
|
+
_: A,
|
|
1265
|
+
arg: ArgForCombinator<Arg>,
|
|
1266
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1267
|
+
) => B,
|
|
1268
|
+
c: (
|
|
1269
|
+
_: B,
|
|
1270
|
+
arg: ArgForCombinator<Arg>,
|
|
1271
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1272
|
+
) => C,
|
|
1273
|
+
d: (
|
|
1274
|
+
_: C,
|
|
1275
|
+
arg: ArgForCombinator<Arg>,
|
|
1276
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1277
|
+
) => D,
|
|
1278
|
+
e: (
|
|
1279
|
+
_: D,
|
|
1280
|
+
arg: ArgForCombinator<Arg>,
|
|
1281
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1282
|
+
) => E,
|
|
1283
|
+
f: (
|
|
1284
|
+
_: E,
|
|
1285
|
+
arg: ArgForCombinator<Arg>,
|
|
1286
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1287
|
+
) => F,
|
|
1288
|
+
g: (
|
|
1289
|
+
_: F,
|
|
1290
|
+
arg: ArgForCombinator<Arg>,
|
|
1291
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1292
|
+
) => G,
|
|
1293
|
+
h: (
|
|
1294
|
+
_: G,
|
|
1295
|
+
arg: ArgForCombinator<Arg>,
|
|
1296
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1297
|
+
) => H,
|
|
1298
|
+
i: (
|
|
1299
|
+
_: H,
|
|
1300
|
+
arg: ArgForCombinator<Arg>,
|
|
1301
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1302
|
+
) => I
|
|
832
1303
|
): CommandOutHelper<Arg, I, Id, I18nKey, State>
|
|
833
1304
|
}
|
|
834
1305
|
|
|
@@ -854,7 +1325,7 @@ export declare namespace Commander {
|
|
|
854
1325
|
EEff,
|
|
855
1326
|
REff
|
|
856
1327
|
>,
|
|
857
|
-
arg:
|
|
1328
|
+
arg: ArgForCombinator<Arg>,
|
|
858
1329
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
859
1330
|
) => Eff
|
|
860
1331
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
@@ -869,10 +1340,14 @@ export declare namespace Commander {
|
|
|
869
1340
|
EEff,
|
|
870
1341
|
REff
|
|
871
1342
|
>,
|
|
872
|
-
arg:
|
|
1343
|
+
arg: ArgForCombinator<Arg>,
|
|
873
1344
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
874
1345
|
) => B,
|
|
875
|
-
b: (
|
|
1346
|
+
b: (
|
|
1347
|
+
_: B,
|
|
1348
|
+
arg: ArgForCombinator<Arg>,
|
|
1349
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1350
|
+
) => Eff
|
|
876
1351
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
877
1352
|
<
|
|
878
1353
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -886,11 +1361,19 @@ export declare namespace Commander {
|
|
|
886
1361
|
EEff,
|
|
887
1362
|
REff
|
|
888
1363
|
>,
|
|
889
|
-
arg:
|
|
1364
|
+
arg: ArgForCombinator<Arg>,
|
|
890
1365
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
891
1366
|
) => B,
|
|
892
|
-
b: (
|
|
893
|
-
|
|
1367
|
+
b: (
|
|
1368
|
+
_: B,
|
|
1369
|
+
arg: ArgForCombinator<Arg>,
|
|
1370
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1371
|
+
) => C,
|
|
1372
|
+
c: (
|
|
1373
|
+
_: C,
|
|
1374
|
+
arg: ArgForCombinator<Arg>,
|
|
1375
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1376
|
+
) => Eff
|
|
894
1377
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
895
1378
|
<
|
|
896
1379
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -905,12 +1388,24 @@ export declare namespace Commander {
|
|
|
905
1388
|
EEff,
|
|
906
1389
|
REff
|
|
907
1390
|
>,
|
|
908
|
-
arg:
|
|
1391
|
+
arg: ArgForCombinator<Arg>,
|
|
909
1392
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
910
1393
|
) => B,
|
|
911
|
-
b: (
|
|
912
|
-
|
|
913
|
-
|
|
1394
|
+
b: (
|
|
1395
|
+
_: B,
|
|
1396
|
+
arg: ArgForCombinator<Arg>,
|
|
1397
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1398
|
+
) => C,
|
|
1399
|
+
c: (
|
|
1400
|
+
_: C,
|
|
1401
|
+
arg: ArgForCombinator<Arg>,
|
|
1402
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1403
|
+
) => D,
|
|
1404
|
+
d: (
|
|
1405
|
+
_: D,
|
|
1406
|
+
arg: ArgForCombinator<Arg>,
|
|
1407
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1408
|
+
) => Eff
|
|
914
1409
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
915
1410
|
<
|
|
916
1411
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -926,13 +1421,29 @@ export declare namespace Commander {
|
|
|
926
1421
|
EEff,
|
|
927
1422
|
REff
|
|
928
1423
|
>,
|
|
929
|
-
arg:
|
|
1424
|
+
arg: ArgForCombinator<Arg>,
|
|
930
1425
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
931
1426
|
) => B,
|
|
932
|
-
b: (
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
1427
|
+
b: (
|
|
1428
|
+
_: B,
|
|
1429
|
+
arg: ArgForCombinator<Arg>,
|
|
1430
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1431
|
+
) => C,
|
|
1432
|
+
c: (
|
|
1433
|
+
_: C,
|
|
1434
|
+
arg: ArgForCombinator<Arg>,
|
|
1435
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1436
|
+
) => D,
|
|
1437
|
+
d: (
|
|
1438
|
+
_: D,
|
|
1439
|
+
arg: ArgForCombinator<Arg>,
|
|
1440
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1441
|
+
) => E,
|
|
1442
|
+
e: (
|
|
1443
|
+
_: E,
|
|
1444
|
+
arg: ArgForCombinator<Arg>,
|
|
1445
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1446
|
+
) => Eff
|
|
936
1447
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
937
1448
|
<
|
|
938
1449
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -949,14 +1460,34 @@ export declare namespace Commander {
|
|
|
949
1460
|
EEff,
|
|
950
1461
|
REff
|
|
951
1462
|
>,
|
|
952
|
-
arg:
|
|
1463
|
+
arg: ArgForCombinator<Arg>,
|
|
953
1464
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
954
1465
|
) => B,
|
|
955
|
-
b: (
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1466
|
+
b: (
|
|
1467
|
+
_: B,
|
|
1468
|
+
arg: ArgForCombinator<Arg>,
|
|
1469
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1470
|
+
) => C,
|
|
1471
|
+
c: (
|
|
1472
|
+
_: C,
|
|
1473
|
+
arg: ArgForCombinator<Arg>,
|
|
1474
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1475
|
+
) => D,
|
|
1476
|
+
d: (
|
|
1477
|
+
_: D,
|
|
1478
|
+
arg: ArgForCombinator<Arg>,
|
|
1479
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1480
|
+
) => E,
|
|
1481
|
+
e: (
|
|
1482
|
+
_: E,
|
|
1483
|
+
arg: ArgForCombinator<Arg>,
|
|
1484
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1485
|
+
) => F,
|
|
1486
|
+
f: (
|
|
1487
|
+
_: F,
|
|
1488
|
+
arg: ArgForCombinator<Arg>,
|
|
1489
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1490
|
+
) => Eff
|
|
960
1491
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
961
1492
|
<
|
|
962
1493
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -974,15 +1505,39 @@ export declare namespace Commander {
|
|
|
974
1505
|
EEff,
|
|
975
1506
|
REff
|
|
976
1507
|
>,
|
|
977
|
-
arg:
|
|
1508
|
+
arg: ArgForCombinator<Arg>,
|
|
978
1509
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
979
1510
|
) => B,
|
|
980
|
-
b: (
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1511
|
+
b: (
|
|
1512
|
+
_: B,
|
|
1513
|
+
arg: ArgForCombinator<Arg>,
|
|
1514
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1515
|
+
) => C,
|
|
1516
|
+
c: (
|
|
1517
|
+
_: C,
|
|
1518
|
+
arg: ArgForCombinator<Arg>,
|
|
1519
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1520
|
+
) => D,
|
|
1521
|
+
d: (
|
|
1522
|
+
_: D,
|
|
1523
|
+
arg: ArgForCombinator<Arg>,
|
|
1524
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1525
|
+
) => E,
|
|
1526
|
+
e: (
|
|
1527
|
+
_: E,
|
|
1528
|
+
arg: ArgForCombinator<Arg>,
|
|
1529
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1530
|
+
) => F,
|
|
1531
|
+
f: (
|
|
1532
|
+
_: F,
|
|
1533
|
+
arg: ArgForCombinator<Arg>,
|
|
1534
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1535
|
+
) => G,
|
|
1536
|
+
g: (
|
|
1537
|
+
_: G,
|
|
1538
|
+
arg: ArgForCombinator<Arg>,
|
|
1539
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1540
|
+
) => Eff
|
|
986
1541
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
987
1542
|
<
|
|
988
1543
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -1001,16 +1556,44 @@ export declare namespace Commander {
|
|
|
1001
1556
|
EEff,
|
|
1002
1557
|
REff
|
|
1003
1558
|
>,
|
|
1004
|
-
arg:
|
|
1559
|
+
arg: ArgForCombinator<Arg>,
|
|
1005
1560
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1006
1561
|
) => B,
|
|
1007
|
-
b: (
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1562
|
+
b: (
|
|
1563
|
+
_: B,
|
|
1564
|
+
arg: ArgForCombinator<Arg>,
|
|
1565
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1566
|
+
) => C,
|
|
1567
|
+
c: (
|
|
1568
|
+
_: C,
|
|
1569
|
+
arg: ArgForCombinator<Arg>,
|
|
1570
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1571
|
+
) => D,
|
|
1572
|
+
d: (
|
|
1573
|
+
_: D,
|
|
1574
|
+
arg: ArgForCombinator<Arg>,
|
|
1575
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1576
|
+
) => E,
|
|
1577
|
+
e: (
|
|
1578
|
+
_: E,
|
|
1579
|
+
arg: ArgForCombinator<Arg>,
|
|
1580
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1581
|
+
) => F,
|
|
1582
|
+
f: (
|
|
1583
|
+
_: F,
|
|
1584
|
+
arg: ArgForCombinator<Arg>,
|
|
1585
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1586
|
+
) => G,
|
|
1587
|
+
g: (
|
|
1588
|
+
_: G,
|
|
1589
|
+
arg: ArgForCombinator<Arg>,
|
|
1590
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1591
|
+
) => H,
|
|
1592
|
+
h: (
|
|
1593
|
+
_: H,
|
|
1594
|
+
arg: ArgForCombinator<Arg>,
|
|
1595
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1596
|
+
) => Eff
|
|
1014
1597
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
1015
1598
|
<
|
|
1016
1599
|
Eff extends Effect.Effect<any, any, RT | CommandContext | `Commander.Command.${Id}.state`>,
|
|
@@ -1030,59 +1613,120 @@ export declare namespace Commander {
|
|
|
1030
1613
|
EEff,
|
|
1031
1614
|
REff
|
|
1032
1615
|
>,
|
|
1033
|
-
arg:
|
|
1616
|
+
arg: ArgForCombinator<Arg>,
|
|
1034
1617
|
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1035
1618
|
) => B,
|
|
1036
|
-
b: (
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1619
|
+
b: (
|
|
1620
|
+
_: B,
|
|
1621
|
+
arg: ArgForCombinator<Arg>,
|
|
1622
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1623
|
+
) => C,
|
|
1624
|
+
c: (
|
|
1625
|
+
_: C,
|
|
1626
|
+
arg: ArgForCombinator<Arg>,
|
|
1627
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1628
|
+
) => D,
|
|
1629
|
+
d: (
|
|
1630
|
+
_: D,
|
|
1631
|
+
arg: ArgForCombinator<Arg>,
|
|
1632
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1633
|
+
) => E,
|
|
1634
|
+
e: (
|
|
1635
|
+
_: E,
|
|
1636
|
+
arg: ArgForCombinator<Arg>,
|
|
1637
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1638
|
+
) => F,
|
|
1639
|
+
f: (
|
|
1640
|
+
_: F,
|
|
1641
|
+
arg: ArgForCombinator<Arg>,
|
|
1642
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1643
|
+
) => G,
|
|
1644
|
+
g: (
|
|
1645
|
+
_: G,
|
|
1646
|
+
arg: ArgForCombinator<Arg>,
|
|
1647
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1648
|
+
) => H,
|
|
1649
|
+
h: (
|
|
1650
|
+
_: H,
|
|
1651
|
+
arg: ArgForCombinator<Arg>,
|
|
1652
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1653
|
+
) => I,
|
|
1654
|
+
i: (
|
|
1655
|
+
_: H,
|
|
1656
|
+
arg: ArgForCombinator<Arg>,
|
|
1657
|
+
ctx: CommandContextLocal2<NoInfer<Id>, NoInfer<I18nKey>, NoInfer<State>>
|
|
1658
|
+
) => Eff
|
|
1044
1659
|
): CommandOutHelper<Arg, Eff, Id, I18nKey, State>
|
|
1045
1660
|
}
|
|
1046
1661
|
}
|
|
1047
1662
|
|
|
1048
1663
|
type ErrorRenderer<E, Args extends readonly any[]> = (e: E, action: string, ...args: Args) => string | undefined
|
|
1049
1664
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1665
|
+
type RegisteredErrorRenderer<A> = {
|
|
1666
|
+
guard: Refinement<unknown, A>
|
|
1667
|
+
render: (guarded: A) => string | undefined
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
export class CommanderErrorRenderers extends Context.Reference("Commander.ErrorRenderers", {
|
|
1671
|
+
defaultValue: () => [] as RegisteredErrorRenderer<any>[]
|
|
1672
|
+
}) {}
|
|
1673
|
+
|
|
1674
|
+
export const makeRegisteredErrorRenderer = <A>(
|
|
1675
|
+
guard: Predicate.Refinement<unknown, A>,
|
|
1676
|
+
render: (guarded: A) => string | undefined
|
|
1677
|
+
): RegisteredErrorRenderer<A> => ({
|
|
1678
|
+
guard,
|
|
1679
|
+
render
|
|
1680
|
+
})
|
|
1681
|
+
|
|
1682
|
+
const renderErrorMaker = Effect.gen(function*() {
|
|
1683
|
+
const { intl } = yield* I18n
|
|
1684
|
+
const registeredRenderers = yield* CommanderErrorRenderers
|
|
1685
|
+
return (
|
|
1686
|
+
<E, Args extends readonly any[]>(action: string, errorRenderer?: ErrorRenderer<E, Args>) =>
|
|
1687
|
+
(e: E, ...args: Args): string => {
|
|
1688
|
+
if (errorRenderer) {
|
|
1689
|
+
const m = errorRenderer(e, action, ...args)
|
|
1690
|
+
if (m !== undefined) {
|
|
1691
|
+
return m
|
|
1692
|
+
}
|
|
1058
1693
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
if ("message" in e) {
|
|
1063
|
-
return `${e.message}`
|
|
1694
|
+
for (const entry of registeredRenderers) {
|
|
1695
|
+
if (!entry.guard(e)) {
|
|
1696
|
+
continue
|
|
1064
1697
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1698
|
+
const m = entry.render(e)
|
|
1699
|
+
if (m !== undefined) {
|
|
1700
|
+
return m
|
|
1067
1701
|
}
|
|
1068
1702
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
SchemaError: (e) => {
|
|
1078
|
-
console.warn(e.toString())
|
|
1079
|
-
return intl.formatMessage({ id: "validation.failed" })
|
|
1703
|
+
if (!S.is(SupportedErrors)(e) && !S.isSchemaError(e)) {
|
|
1704
|
+
if (typeof e === "object" && e !== null) {
|
|
1705
|
+
if ("message" in e) {
|
|
1706
|
+
return `${e.message}`
|
|
1707
|
+
}
|
|
1708
|
+
if ("_tag" in e) {
|
|
1709
|
+
return `${e._tag}`
|
|
1710
|
+
}
|
|
1080
1711
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1712
|
+
return ""
|
|
1713
|
+
}
|
|
1714
|
+
const e2: SupportedErrors | S.SchemaError = e
|
|
1715
|
+
return Match.value(e2).pipe(
|
|
1716
|
+
Match.tags({
|
|
1717
|
+
NotFoundError: (e) => {
|
|
1718
|
+
return intl.formatMessage({ id: "handle.not_found" }, { type: e.type, id: e.id })
|
|
1719
|
+
},
|
|
1720
|
+
SchemaError: (e) => {
|
|
1721
|
+
console.warn(e.toString())
|
|
1722
|
+
return intl.formatMessage({ id: "validation.failed" })
|
|
1723
|
+
}
|
|
1724
|
+
}),
|
|
1725
|
+
Match.orElse((e) => `${e.message ?? e._tag ?? e}`)
|
|
1726
|
+
)
|
|
1727
|
+
}
|
|
1728
|
+
)
|
|
1729
|
+
})
|
|
1086
1730
|
|
|
1087
1731
|
const defaultFailureMessageHandler = <E, Args extends Array<unknown>, AME, AMR>(
|
|
1088
1732
|
actionMaker:
|
|
@@ -1105,23 +1749,28 @@ const defaultFailureMessageHandler = <E, Args extends Array<unknown>, AME, AMR>(
|
|
|
1105
1749
|
error: "" // TODO consider again Cause.pretty(cause), // will be reported to Sentry/Otel anyway.. and we shouldn't bother users with error dumps?
|
|
1106
1750
|
}
|
|
1107
1751
|
),
|
|
1108
|
-
onSome: (e) =>
|
|
1109
|
-
|
|
1752
|
+
onSome: (e) => {
|
|
1753
|
+
const rendered = renderError(action, errorRenderer)(e, ...args)
|
|
1754
|
+
return S.is(OperationFailure)(e)
|
|
1110
1755
|
? {
|
|
1111
1756
|
level: "warn" as const,
|
|
1112
|
-
message:
|
|
1757
|
+
message: `${
|
|
1758
|
+
intl.formatMessage(
|
|
1113
1759
|
{ id: "handle.with_warnings" },
|
|
1114
1760
|
{ action }
|
|
1115
|
-
)
|
|
1116
|
-
|
|
1117
|
-
: ""
|
|
1761
|
+
)
|
|
1762
|
+
}${rendered ? "\n" + rendered : ""}`
|
|
1118
1763
|
}
|
|
1119
|
-
:
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1764
|
+
: {
|
|
1765
|
+
level: "warn" as const,
|
|
1766
|
+
message: `${
|
|
1767
|
+
intl.formatMessage(
|
|
1768
|
+
{ id: "handle.with_errors" },
|
|
1769
|
+
{ action }
|
|
1770
|
+
)
|
|
1771
|
+
}:\n` + rendered
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1125
1774
|
})
|
|
1126
1775
|
})
|
|
1127
1776
|
|
|
@@ -1168,6 +1817,17 @@ export const CommanderStatic = {
|
|
|
1168
1817
|
CommandContext,
|
|
1169
1818
|
(c) => ({ ...c, action: update(c.action, ...input) })
|
|
1170
1819
|
),
|
|
1820
|
+
registerErrorRenderer: <A>(
|
|
1821
|
+
guard: Predicate.Refinement<unknown, A>,
|
|
1822
|
+
render: (guarded: A) => string | undefined
|
|
1823
|
+
) =>
|
|
1824
|
+
Layer.effect(
|
|
1825
|
+
CommanderErrorRenderers,
|
|
1826
|
+
Effect.gen(function*() {
|
|
1827
|
+
const current = yield* CommanderErrorRenderers
|
|
1828
|
+
return [...current, makeRegisteredErrorRenderer(guard, render)]
|
|
1829
|
+
})
|
|
1830
|
+
),
|
|
1171
1831
|
defaultFailureMessageHandler,
|
|
1172
1832
|
renderError: renderErrorMaker,
|
|
1173
1833
|
/**
|
|
@@ -1186,17 +1846,29 @@ export const CommanderStatic = {
|
|
|
1186
1846
|
/**
|
|
1187
1847
|
* if true, previous toasts with this key will be replaced
|
|
1188
1848
|
*/
|
|
1189
|
-
stableToastId?:
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1849
|
+
stableToastId?:
|
|
1850
|
+
| undefined
|
|
1851
|
+
| true
|
|
1852
|
+
| string
|
|
1853
|
+
| ((id: string, arg: NoInfer<Args>[0], ctx: NoInfer<Args>[1]) => true | string | undefined)
|
|
1854
|
+
errorRenderer?: (e: E, action: string, arg: NoInfer<Args>[0], ctx: NoInfer<Args>[1]) => string | undefined
|
|
1855
|
+
showSpanInfo?: false
|
|
1856
|
+
onWaiting?:
|
|
1857
|
+
| null
|
|
1858
|
+
| undefined
|
|
1859
|
+
| string
|
|
1860
|
+
| ((id: string, arg: NoInfer<Args>[0], ctx: NoInfer<Args>[1]) => string | null | undefined)
|
|
1861
|
+
onSuccess?:
|
|
1862
|
+
| null
|
|
1863
|
+
| undefined
|
|
1864
|
+
| string
|
|
1865
|
+
| ((a: A, action: string, arg: NoInfer<Args>[0], ctx: NoInfer<Args>[1]) => string | null | undefined)
|
|
1193
1866
|
}
|
|
1194
1867
|
) =>
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
Effect.gen(function*() {
|
|
1868
|
+
Effect.fnUntraced(function*(
|
|
1869
|
+
self: Effect.Effect<A, E, R>,
|
|
1870
|
+
...args: Args
|
|
1871
|
+
) {
|
|
1200
1872
|
const cc = yield* CommandContext
|
|
1201
1873
|
const { intl } = yield* I18n
|
|
1202
1874
|
const withToast = yield* WithToast
|
|
@@ -1243,9 +1915,10 @@ export const CommanderStatic = {
|
|
|
1243
1915
|
+ (S.is(OperationSuccess)(a) && a.message ? "\n" + a.message : "")),
|
|
1244
1916
|
onFailure: defaultFailureMessageHandler(
|
|
1245
1917
|
hasCustomFailure ? intl.formatMessage({ id: customFailure }, cc.state) : cc.action,
|
|
1246
|
-
options?.errorRenderer
|
|
1918
|
+
options?.errorRenderer as ErrorRenderer<E, Args> | undefined
|
|
1247
1919
|
),
|
|
1248
|
-
stableToastId
|
|
1920
|
+
stableToastId,
|
|
1921
|
+
...options?.showSpanInfo === false ? { showSpanInfo: options.showSpanInfo } : {}
|
|
1249
1922
|
})(_, ...args)
|
|
1250
1923
|
)
|
|
1251
1924
|
}),
|
|
@@ -1323,7 +1996,7 @@ const getStateValues = <const Id extends string, const I18nKey extends string, S
|
|
|
1323
1996
|
// class preserves JSDoc throughout..
|
|
1324
1997
|
export class CommanderImpl<RT, RTHooks> {
|
|
1325
1998
|
constructor(
|
|
1326
|
-
private readonly rt:
|
|
1999
|
+
private readonly rt: Context.Context<RT>,
|
|
1327
2000
|
private readonly intl: I18n,
|
|
1328
2001
|
private readonly hooks: Layer.Layer<RTHooks, never, RT>
|
|
1329
2002
|
) {
|
|
@@ -1385,7 +2058,7 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1385
2058
|
}
|
|
1386
2059
|
|
|
1387
2060
|
const key = `Commander.Command.${id}.state` as const
|
|
1388
|
-
const stateTag =
|
|
2061
|
+
const stateTag = Context.Service<typeof key, State>(key)
|
|
1389
2062
|
|
|
1390
2063
|
const makeContext_ = () => this.makeContext(id, { ...options, state: state?.value })
|
|
1391
2064
|
const initialContext = makeContext_()
|
|
@@ -1479,10 +2152,11 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1479
2152
|
const computeAllowed = options?.allowed
|
|
1480
2153
|
const allowed = computeAllowed ? computed(() => computeAllowed(id, state)) : true
|
|
1481
2154
|
|
|
1482
|
-
const rt = Effect.
|
|
2155
|
+
const rt = Effect.context<RT | RTHooks>().pipe(Effect.provide(this.hooks)).pipe(Effect.runSyncWith(this.rt))
|
|
1483
2156
|
const runFork = Effect.runForkWith(rt)
|
|
1484
2157
|
|
|
1485
2158
|
const handle = Object.assign((arg: Arg) => {
|
|
2159
|
+
arg = toRaw(arg) // remove outside vue proxy bs
|
|
1486
2160
|
// we capture the call site stack here
|
|
1487
2161
|
const limit = Error.stackTraceLimit
|
|
1488
2162
|
Error.stackTraceLimit = 2
|
|
@@ -1513,15 +2187,17 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1513
2187
|
}
|
|
1514
2188
|
}
|
|
1515
2189
|
|
|
1516
|
-
const command = currentState.pipe(Effect.flatMap((state) =>
|
|
1517
|
-
|
|
2190
|
+
const command = currentState.pipe(Effect.flatMap((state) => {
|
|
2191
|
+
const rawArg = deepToRaw(arg)
|
|
2192
|
+
const rawState = deepToRaw(state)
|
|
2193
|
+
return Effect.withSpan(
|
|
1518
2194
|
exec(arg, { ...context.value, state } as any),
|
|
1519
2195
|
id,
|
|
1520
2196
|
{
|
|
1521
2197
|
captureStackTrace,
|
|
1522
2198
|
attributes: {
|
|
1523
|
-
input:
|
|
1524
|
-
state,
|
|
2199
|
+
input: rawArg,
|
|
2200
|
+
state: rawState,
|
|
1525
2201
|
action: initialContext.action,
|
|
1526
2202
|
label: initialContext.label,
|
|
1527
2203
|
id: initialContext.id,
|
|
@@ -1529,7 +2205,7 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1529
2205
|
}
|
|
1530
2206
|
}
|
|
1531
2207
|
)
|
|
1532
|
-
))
|
|
2208
|
+
}))
|
|
1533
2209
|
|
|
1534
2210
|
return runFork(command)
|
|
1535
2211
|
}, { action, label })
|
|
@@ -1654,7 +2330,7 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1654
2330
|
id: Id | { id: Id },
|
|
1655
2331
|
options?: FnOptions<Id, I18nKey, State>
|
|
1656
2332
|
): Commander.Gen<RT | RTHooks, Id, I18nKey, State> & Commander.NonGen<RT | RTHooks, Id, I18nKey, State> & {
|
|
1657
|
-
state:
|
|
2333
|
+
state: Context.Service<`Commander.Command.${Id}.state`, State>
|
|
1658
2334
|
} =>
|
|
1659
2335
|
Object.assign(
|
|
1660
2336
|
(
|
|
@@ -1679,13 +2355,13 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1679
2355
|
},
|
|
1680
2356
|
makeBaseInfo(typeof id === "string" ? id : id.id, options),
|
|
1681
2357
|
{
|
|
1682
|
-
state:
|
|
2358
|
+
state: Context.Service<`Commander.Command.${Id}.state`, State>(
|
|
1683
2359
|
`Commander.Command.${typeof id === "string" ? id : id.id}.state`
|
|
1684
2360
|
)
|
|
1685
2361
|
}
|
|
1686
2362
|
)
|
|
1687
2363
|
|
|
1688
|
-
/** @
|
|
2364
|
+
/** @deprecated */
|
|
1689
2365
|
alt2: <
|
|
1690
2366
|
const Id extends string,
|
|
1691
2367
|
MutArg,
|
|
@@ -1737,7 +2413,6 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1737
2413
|
)), baseInfo) as any
|
|
1738
2414
|
}
|
|
1739
2415
|
|
|
1740
|
-
/** @experimental */
|
|
1741
2416
|
alt = this.makeCommand as unknown as <
|
|
1742
2417
|
const Id extends string,
|
|
1743
2418
|
const I18nKey extends string = Id,
|
|
@@ -1815,7 +2490,7 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1815
2490
|
},
|
|
1816
2491
|
makeBaseInfo(mutation.id, options),
|
|
1817
2492
|
{
|
|
1818
|
-
state:
|
|
2493
|
+
state: Context.Service<`Commander.Command.${Id}.state`, State>(
|
|
1819
2494
|
`Commander.Command.${mutation.id}.state`
|
|
1820
2495
|
)
|
|
1821
2496
|
}
|
|
@@ -1823,10 +2498,10 @@ export class CommanderImpl<RT, RTHooks> {
|
|
|
1823
2498
|
}
|
|
1824
2499
|
|
|
1825
2500
|
// @effect-diagnostics-next-line missingEffectServiceDependency:off
|
|
1826
|
-
export class Commander extends
|
|
2501
|
+
export class Commander extends Context.Service<Commander>()("Commander", {
|
|
1827
2502
|
make: Effect.gen(function*() {
|
|
1828
2503
|
const i18n = yield* I18n
|
|
1829
|
-
return <RT, RTHooks>(rt:
|
|
2504
|
+
return <RT, RTHooks>(rt: Context.Context<RT>, rtHooks: Layer.Layer<RTHooks, never, RT>) =>
|
|
1830
2505
|
new CommanderImpl(rt, i18n, rtHooks)
|
|
1831
2506
|
})
|
|
1832
2507
|
}) {
|