spana-test 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/agent/index.js +15 -15
- package/dist/api/app.d.ts +1 -0
- package/dist/api/app.d.ts.map +1 -1
- package/dist/api/expect.d.ts +25 -11
- package/dist/api/expect.d.ts.map +1 -1
- package/dist/{app-LGNFQMU7.js → app-ZSRJ3VFR.js} +3 -3
- package/dist/{appium-2PJWZXJI.js → appium-LOAWWZXA.js} +9 -9
- package/dist/build-info-KFFGVWDQ.js +9 -0
- package/dist/build-info.d.ts +5 -0
- package/dist/build-info.d.ts.map +1 -0
- package/dist/build-info.json +4 -0
- package/dist/channels/cdp-client.d.ts +36 -1
- package/dist/channels/cdp-client.d.ts.map +1 -1
- package/dist/channels/dom-channel.d.ts +14 -2
- package/dist/channels/dom-channel.d.ts.map +1 -1
- package/dist/{chunk-7K24Q7V3.js → chunk-26XIUSVS.js} +129 -29
- package/dist/chunk-26XIUSVS.js.map +1 -0
- package/dist/{chunk-E67QUGT3.js → chunk-2SDRH7ST.js} +7 -14
- package/dist/chunk-2SDRH7ST.js.map +1 -0
- package/dist/{chunk-NR4QAM5W.js → chunk-2TK77LXY.js} +18 -16
- package/dist/chunk-2TK77LXY.js.map +1 -0
- package/dist/{chunk-AP5SGSO7.js → chunk-42D5LOGH.js} +8 -8
- package/dist/{chunk-6X2SK2XO.js → chunk-5NZPLX2Y.js} +4 -5
- package/dist/chunk-5NZPLX2Y.js.map +1 -0
- package/dist/{chunk-CQ67PB3R.js → chunk-6GLL6SMP.js} +2 -2
- package/dist/{chunk-44U3F2RY.js → chunk-7GDO4XAI.js} +214 -6
- package/dist/chunk-7GDO4XAI.js.map +1 -0
- package/dist/{chunk-IJWAAODK.js → chunk-7QJY2HJO.js} +2 -2
- package/dist/{chunk-DNWVDGKS.js → chunk-GBV3XDWM.js} +8 -8
- package/dist/{chunk-C7HZJIGQ.js → chunk-HX2PKESI.js} +2 -2
- package/dist/{chunk-NC32K762.js → chunk-QNCTEV2P.js} +14 -14
- package/dist/{chunk-FLPPA2XY.js → chunk-VWOTHDSE.js} +9 -4
- package/dist/chunk-VWOTHDSE.js.map +1 -0
- package/dist/chunk-XLHJCJ4O.js +15 -0
- package/dist/chunk-XLHJCJ4O.js.map +1 -0
- package/dist/{chunk-G4ZUJCEN.js → chunk-XORHAB3R.js} +101 -47
- package/dist/chunk-XORHAB3R.js.map +1 -0
- package/dist/{chunk-C2YM5GNF.js → chunk-XUKBM64A.js} +3 -3
- package/dist/{chunk-FZ7EMXIM.js → chunk-XZQGSUV7.js} +10 -8
- package/dist/chunk-XZQGSUV7.js.map +1 -0
- package/dist/{chunk-3ONT32BO.js → chunk-ZVUIG6A4.js} +30 -24
- package/dist/{chunk-3ONT32BO.js.map → chunk-ZVUIG6A4.js.map} +1 -1
- package/dist/cli.js +16 -15
- package/dist/cli.js.map +1 -1
- package/dist/{config-loader-MX232REU.js → config-loader-IDIKOQ4T.js} +3 -3
- package/dist/{console-OHKVJLW3.js → console-Z7F7X3WY.js} +40 -39
- package/dist/console-Z7F7X3WY.js.map +1 -0
- package/dist/{doctor-command-YTT5SMQW.js → doctor-command-2PSDOREK.js} +7 -7
- package/dist/{driver-X4FWTDNU.js → driver-TNQ6HSID.js} +6 -6
- package/dist/{driver-AN3I4H6O.js → driver-TTJVCWCD.js} +7 -7
- package/dist/drivers/appium/android.d.ts +1 -1
- package/dist/drivers/appium/ios.d.ts +1 -1
- package/dist/drivers/cdp-browser.d.ts +1 -1
- package/dist/drivers/cdp-browser.d.ts.map +1 -1
- package/dist/drivers/device-controls.d.ts +1 -1
- package/dist/drivers/electrobun.d.ts +1 -1
- package/dist/drivers/electron.d.ts +1 -1
- package/dist/drivers/playwright.d.ts +2 -1
- package/dist/drivers/playwright.d.ts.map +1 -1
- package/dist/drivers/raw-driver.d.ts +2 -1
- package/dist/drivers/uiautomator2/driver.d.ts +1 -1
- package/dist/drivers/wasm.d.ts +1 -1
- package/dist/drivers/wda/driver.d.ts +1 -1
- package/dist/{electrobun-OUTYOM5G.js → electrobun-6ZJ6QFVQ.js} +5 -5
- package/dist/errors.d.ts +12 -12
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -45
- package/dist/index.js.map +1 -1
- package/dist/{json-QVHG6I3O.js → json-RNYQ54R7.js} +8 -7
- package/dist/json-RNYQ54R7.js.map +1 -0
- package/dist/{local-UWIYOREU.js → local-E6FJI3QK.js} +5 -5
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/{playwright-KBWUBU5S.js → playwright-LS35WXQ6.js} +6 -6
- package/dist/report/console.d.ts +2 -0
- package/dist/report/console.d.ts.map +1 -1
- package/dist/report/json.d.ts +5 -1
- package/dist/report/json.d.ts.map +1 -1
- package/dist/runtime/local.d.ts.map +1 -1
- package/dist/runtime/web-server.d.ts.map +1 -1
- package/dist/schemas/config.d.ts +39 -484
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/device.d.ts +1 -1
- package/dist/schemas/element.d.ts +1 -1
- package/dist/schemas/selector.d.ts +1 -1
- package/dist/{server-CWCMC244.js → server-A6Y6ZMET.js} +2 -2
- package/dist/{server-BS3O4WVU.js → server-D3HOIPQE.js} +16 -16
- package/dist/{session-YWYRRXXR.js → session-2VIEKA6A.js} +16 -16
- package/dist/session-2VIEKA6A.js.map +1 -0
- package/dist/smart/auto-wait.d.ts +1 -1
- package/dist/smart/channel-resolver.d.ts +1 -1
- package/dist/smart/channel-resolver.d.ts.map +1 -1
- package/dist/smart/coordinator.d.ts +6 -2
- package/dist/smart/coordinator.d.ts.map +1 -1
- package/dist/smart/hierarchy-cache.d.ts +1 -1
- package/dist/studio/context.d.ts +1 -1
- package/dist/studio/effect-handler.d.ts +3 -1
- package/dist/{studio-command-XJDGLNAJ.js → studio-command-SPHIXFIW.js} +2 -2
- package/dist/{test-command-3IRGNEPB.js → test-command-OYMJNT23.js} +19 -19
- package/dist/vendor/effect/Array.d.ts +841 -0
- package/dist/vendor/effect/BigDecimal.d.ts +227 -0
- package/dist/vendor/effect/Brand.d.ts +71 -0
- package/dist/vendor/effect/ByteSize.d.ts +218 -0
- package/dist/vendor/effect/Cache.d.ts +104 -0
- package/dist/vendor/effect/Cause.d.ts +242 -0
- package/dist/vendor/effect/Channel.d.ts +1004 -0
- package/dist/vendor/effect/Chunk.d.ts +499 -0
- package/dist/vendor/effect/Clock.d.ts +31 -0
- package/dist/vendor/effect/Combiner.d.ts +23 -0
- package/dist/vendor/effect/Context.d.ts +167 -0
- package/dist/vendor/effect/Cron.d.ts +79 -0
- package/dist/vendor/effect/Data.d.ts +146 -0
- package/dist/vendor/effect/DateTime.d.ts +554 -0
- package/dist/vendor/effect/Deferred.d.ts +135 -0
- package/dist/vendor/effect/Differ.d.ts +8 -0
- package/dist/vendor/effect/Duration.d.ts +270 -0
- package/dist/vendor/effect/Effect.d.ts +2606 -0
- package/dist/vendor/effect/Equal.d.ts +20 -0
- package/dist/vendor/effect/Equivalence.d.ts +55 -0
- package/dist/vendor/effect/ExecutionPlan.d.ts +131 -0
- package/dist/vendor/effect/Exit.d.ts +114 -0
- package/dist/vendor/effect/Fiber.d.ts +90 -0
- package/dist/vendor/effect/FileSystem.d.ts +227 -0
- package/dist/vendor/effect/Filter.d.ts +133 -0
- package/dist/vendor/effect/Formatter.d.ts +13 -0
- package/dist/vendor/effect/Function.d.ts +91 -0
- package/dist/vendor/effect/Graph.d.ts +638 -0
- package/dist/vendor/effect/HKT.d.ts +30 -0
- package/dist/vendor/effect/Hash.d.ts +31 -0
- package/dist/vendor/effect/HashMap.d.ts +225 -0
- package/dist/vendor/effect/HashSet.d.ts +122 -0
- package/dist/vendor/effect/Inspectable.d.ts +25 -0
- package/dist/vendor/effect/JsonPatch.d.ts +26 -0
- package/dist/vendor/effect/JsonSchema.d.ts +43 -0
- package/dist/vendor/effect/LICENSE +21 -0
- package/dist/vendor/effect/Latch.d.ts +48 -0
- package/dist/vendor/effect/Layer.d.ts +273 -0
- package/dist/vendor/effect/LogLevel.d.ts +46 -0
- package/dist/vendor/effect/Logger.d.ts +106 -0
- package/dist/vendor/effect/ManagedRuntime.d.ts +52 -0
- package/dist/vendor/effect/Metric.d.ts +266 -0
- package/dist/vendor/effect/MutableHashMap.d.ts +80 -0
- package/dist/vendor/effect/MutableList.d.ts +52 -0
- package/dist/vendor/effect/MutableRef.d.ts +76 -0
- package/dist/vendor/effect/NonEmptyIterable.d.ts +9 -0
- package/dist/vendor/effect/Optic.d.ts +155 -0
- package/dist/vendor/effect/Option.d.ts +380 -0
- package/dist/vendor/effect/Order.d.ts +110 -0
- package/dist/vendor/effect/Ordering.d.ts +24 -0
- package/dist/vendor/effect/Path.d.ts +44 -0
- package/dist/vendor/effect/Pipeable.d.ts +38 -0
- package/dist/vendor/effect/PlatformError.d.ts +63 -0
- package/dist/vendor/effect/Predicate.d.ts +227 -0
- package/dist/vendor/effect/PrimaryKey.d.ts +11 -0
- package/dist/vendor/effect/PubSub.d.ts +229 -0
- package/dist/vendor/effect/Pull.d.ts +54 -0
- package/dist/vendor/effect/Queue.d.ts +212 -0
- package/dist/vendor/effect/Rational.d.ts +212 -0
- package/dist/vendor/effect/Record.d.ts +247 -0
- package/dist/vendor/effect/Redactable.d.ts +14 -0
- package/dist/vendor/effect/Redacted.d.ts +34 -0
- package/dist/vendor/effect/Reducer.d.ts +13 -0
- package/dist/vendor/effect/References.d.ts +53 -0
- package/dist/vendor/effect/Request.d.ts +106 -0
- package/dist/vendor/effect/RequestResolver.d.ts +159 -0
- package/dist/vendor/effect/Result.d.ts +285 -0
- package/dist/vendor/effect/Schedule.d.ts +172 -0
- package/dist/vendor/effect/Scheduler.d.ts +45 -0
- package/dist/vendor/effect/Schema.d.ts +3205 -0
- package/dist/vendor/effect/SchemaAST.d.ts +356 -0
- package/dist/vendor/effect/SchemaGetter.d.ts +181 -0
- package/dist/vendor/effect/SchemaIssue.d.ts +147 -0
- package/dist/vendor/effect/SchemaParser.d.ts +57 -0
- package/dist/vendor/effect/SchemaRepresentation.d.ts +563 -0
- package/dist/vendor/effect/SchemaTransformation.d.ts +155 -0
- package/dist/vendor/effect/Scope.d.ts +69 -0
- package/dist/vendor/effect/SemVer.d.ts +209 -0
- package/dist/vendor/effect/SemVerRange.d.ts +74 -0
- package/dist/vendor/effect/Semaphore.d.ts +87 -0
- package/dist/vendor/effect/Sink.d.ts +337 -0
- package/dist/vendor/effect/StandardSchema.d.ts +112 -0
- package/dist/vendor/effect/Stream.d.ts +1762 -0
- package/dist/vendor/effect/Struct.d.ts +162 -0
- package/dist/vendor/effect/Take.d.ts +8 -0
- package/dist/vendor/effect/Tracer.d.ts +150 -0
- package/dist/vendor/effect/TxRef.d.ts +40 -0
- package/dist/vendor/effect/Types.d.ts +139 -0
- package/dist/vendor/effect/Unify.d.ts +50 -0
- package/dist/vendor/effect/Utils.d.ts +31 -0
- package/dist/vendor/effect/crypto/Aead.d.ts +72 -0
- package/dist/vendor/effect/crypto/Cipher.d.ts +54 -0
- package/dist/vendor/effect/crypto/CryptoError.d.ts +81 -0
- package/dist/vendor/effect/crypto/Digest.d.ts +32 -0
- package/dist/vendor/effect/crypto/KeyAgreement.d.ts +80 -0
- package/dist/vendor/effect/crypto/KeyFormat.d.ts +82 -0
- package/dist/vendor/effect/crypto/KeyWrap.d.ts +97 -0
- package/dist/vendor/effect/crypto/Mac.d.ts +56 -0
- package/dist/vendor/effect/crypto/SecureRandom.d.ts +63 -0
- package/dist/vendor/effect/crypto/Signature.d.ts +122 -0
- package/dist/vendor/effect/crypto/WebCrypto.d.ts +18 -0
- package/dist/vendor/effect/http/Cookies.d.ts +185 -0
- package/dist/vendor/effect/http/Headers.d.ts +144 -0
- package/dist/vendor/effect/http/UrlParams.d.ts +122 -0
- package/dist/vendor/effect/internal/schemaError.d.ts +3 -0
- package/dist/vendor/effect/net/Dns.d.ts +166 -0
- package/dist/vendor/effect/net/Host.d.ts +80 -0
- package/dist/vendor/effect/net/IpInterface.d.ts +65 -0
- package/dist/vendor/effect/net/IpNetwork.d.ts +89 -0
- package/dist/vendor/effect/net/NetAddress.d.ts +350 -0
- package/dist/vendor/effect/persistence/KeyValueStore.d.ts +138 -0
- package/dist/vendor/effect/persistence/Persistable.d.ts +56 -0
- package/dist/vendor/effect/persistence/Persistence.d.ts +83 -0
- package/dist/vendor/effect/persistence/Redis.d.ts +98 -0
- package/dist/vendor/effect/reactivity/Reactivity.d.ts +59 -0
- package/dist/vendor/effect/sql/SqlClient.d.ts +121 -0
- package/dist/vendor/effect/sql/SqlConnection.d.ts +26 -0
- package/dist/vendor/effect/sql/SqlError.d.ts +186 -0
- package/dist/vendor/effect/sql/Statement.d.ts +225 -0
- package/native/win32-x64/spana_native.dll +0 -0
- package/package.json +4 -3
- package/dist/chunk-44U3F2RY.js.map +0 -1
- package/dist/chunk-6X2SK2XO.js.map +0 -1
- package/dist/chunk-7K24Q7V3.js.map +0 -1
- package/dist/chunk-E67QUGT3.js.map +0 -1
- package/dist/chunk-FLPPA2XY.js.map +0 -1
- package/dist/chunk-FZ7EMXIM.js.map +0 -1
- package/dist/chunk-G4ZUJCEN.js.map +0 -1
- package/dist/chunk-NR4QAM5W.js.map +0 -1
- package/dist/console-OHKVJLW3.js.map +0 -1
- package/dist/json-QVHG6I3O.js.map +0 -1
- /package/dist/{app-LGNFQMU7.js.map → app-ZSRJ3VFR.js.map} +0 -0
- /package/dist/{appium-2PJWZXJI.js.map → appium-LOAWWZXA.js.map} +0 -0
- /package/dist/{config-loader-MX232REU.js.map → build-info-KFFGVWDQ.js.map} +0 -0
- /package/dist/{chunk-AP5SGSO7.js.map → chunk-42D5LOGH.js.map} +0 -0
- /package/dist/{chunk-CQ67PB3R.js.map → chunk-6GLL6SMP.js.map} +0 -0
- /package/dist/{chunk-IJWAAODK.js.map → chunk-7QJY2HJO.js.map} +0 -0
- /package/dist/{chunk-DNWVDGKS.js.map → chunk-GBV3XDWM.js.map} +0 -0
- /package/dist/{chunk-C7HZJIGQ.js.map → chunk-HX2PKESI.js.map} +0 -0
- /package/dist/{chunk-NC32K762.js.map → chunk-QNCTEV2P.js.map} +0 -0
- /package/dist/{chunk-C2YM5GNF.js.map → chunk-XUKBM64A.js.map} +0 -0
- /package/dist/{driver-AN3I4H6O.js.map → config-loader-IDIKOQ4T.js.map} +0 -0
- /package/dist/{doctor-command-YTT5SMQW.js.map → doctor-command-2PSDOREK.js.map} +0 -0
- /package/dist/{driver-X4FWTDNU.js.map → driver-TNQ6HSID.js.map} +0 -0
- /package/dist/{electrobun-OUTYOM5G.js.map → driver-TTJVCWCD.js.map} +0 -0
- /package/dist/{local-UWIYOREU.js.map → electrobun-6ZJ6QFVQ.js.map} +0 -0
- /package/dist/{playwright-KBWUBU5S.js.map → local-E6FJI3QK.js.map} +0 -0
- /package/dist/{server-CWCMC244.js.map → playwright-LS35WXQ6.js.map} +0 -0
- /package/dist/{session-YWYRRXXR.js.map → server-A6Y6ZMET.js.map} +0 -0
- /package/dist/{server-BS3O4WVU.js.map → server-D3HOIPQE.js.map} +0 -0
- /package/dist/{studio-command-XJDGLNAJ.js.map → studio-command-SPHIXFIW.js.map} +0 -0
- /package/dist/{test-command-3IRGNEPB.js.map → test-command-OYMJNT23.js.map} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
|
|
2
|
+
import type { NonEmptyReadonlyArray } from "./Array.ts";
|
|
3
|
+
import * as Context from "./Context.ts";
|
|
4
|
+
import * as Cron from "./Cron.ts";
|
|
5
|
+
import type * as DateTime from "./DateTime.ts";
|
|
6
|
+
import * as Duration from "./Duration.ts";
|
|
7
|
+
import type { Effect } from "./Effect.ts";
|
|
8
|
+
import { type Pipeable } from "./Pipeable.ts";
|
|
9
|
+
import * as Pull from "./Pull.ts";
|
|
10
|
+
import * as Result from "./Result.ts";
|
|
11
|
+
import type { Contravariant, Covariant, UnionToIntersection } from "./Types.ts";
|
|
12
|
+
declare const TypeId = "~effect/Schedule";
|
|
13
|
+
|
|
14
|
+
export interface Schedule<out Output, in Input = unknown, out Error = never, out Env = never> extends Schedule.Variance<Output, Input, Error, Env>, Pipeable {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface InputMetadata<Input> {
|
|
18
|
+
readonly input: Input;
|
|
19
|
+
readonly attempt: number;
|
|
20
|
+
readonly start: number;
|
|
21
|
+
readonly now: number;
|
|
22
|
+
readonly elapsed: number;
|
|
23
|
+
readonly elapsedSincePrevious: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Metadata<Output = unknown, Input = unknown> extends InputMetadata<Input> {
|
|
27
|
+
readonly output: Output;
|
|
28
|
+
readonly duration: Duration.Duration;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare const CurrentMetadata: Context.Reference<Metadata<unknown, unknown>>;
|
|
32
|
+
|
|
33
|
+
export declare namespace Schedule {
|
|
34
|
+
|
|
35
|
+
interface Variance<out Output, in Input, out Error, out Env> {
|
|
36
|
+
readonly [TypeId]: VarianceStruct<Output, Input, Error, Env>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface VarianceStruct<out Output, in Input, out Error, out Env> {
|
|
40
|
+
readonly _Out: Covariant<Output>;
|
|
41
|
+
readonly _In: Contravariant<Input>;
|
|
42
|
+
readonly _Error: Covariant<Error>;
|
|
43
|
+
readonly _Env: Covariant<Env>;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type Output<S> = S extends Schedule<infer Output, any, any, any> ? Output : never;
|
|
48
|
+
|
|
49
|
+
export type Input<S> = S extends Schedule<any, infer Input, any, any> ? Input : never;
|
|
50
|
+
|
|
51
|
+
export type Error<S> = S extends Schedule<any, any, infer Error, any> ? Error : never;
|
|
52
|
+
|
|
53
|
+
export type Env<S> = S extends Schedule<any, any, any, infer Env> ? Env : never;
|
|
54
|
+
|
|
55
|
+
export declare const isSchedule: (u: unknown) => u is Schedule<unknown, never, unknown, unknown>;
|
|
56
|
+
|
|
57
|
+
export declare const fromStep: <Input, Output, EnvX, Error, ErrorX, Env>(step: Effect<(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>, Error, Env>) => Schedule<Output, Input, Error | Pull.ExcludeDone<ErrorX>, Env | EnvX>;
|
|
58
|
+
|
|
59
|
+
export declare const fromStepWithMetadata: <Input, Output, EnvX, ErrorX, Error, Env>(step: Effect<(options: InputMetadata<Input>) => Pull.Pull<[Output, Duration.Duration], ErrorX, Output, EnvX>, Error, Env>) => Schedule<Output, Input, Error | Pull.ExcludeDone<ErrorX>, Env | EnvX>;
|
|
60
|
+
|
|
61
|
+
export declare const toStep: <Output, Input, Error, Env>(schedule: Schedule<Output, Input, Error, Env>) => Effect<(now: number, input: Input) => Pull.Pull<[Output, Duration.Duration], Error, Output, Env>, never, Env>;
|
|
62
|
+
|
|
63
|
+
export declare const toStepWithMetadata: <Output, Input, Error, Env>(schedule: Schedule<Output, Input, Error, Env>) => Effect<(input: Input) => Pull.Pull<Metadata<Output, Input>, Error, Output, Env>, never, Env>;
|
|
64
|
+
|
|
65
|
+
export declare const toStepWithSleep: <Output, Input, Error, Env>(schedule: Schedule<Output, Input, Error, Env>) => Effect<(input: Input) => Pull.Pull<Output, Error, Output, Env>, never, Env>;
|
|
66
|
+
|
|
67
|
+
export declare const addDelay: {
|
|
68
|
+
|
|
69
|
+
<Output, Input, Error2 = never, Env2 = never>(f: (metadata: Metadata<Output, Input>) => Effect<Duration.Input, Error2, Env2>): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
70
|
+
|
|
71
|
+
<Output, Input, Error, Env, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, f: (metadata: Metadata<Output, Input>) => Effect<Duration.Input, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export declare const concat: {
|
|
75
|
+
|
|
76
|
+
<Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output | Output2, Input & Input2, Error | Error2, Env | Env2>;
|
|
77
|
+
|
|
78
|
+
<Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Output | Output2, Input & Input2, Error | Error2, Env | Env2>;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export declare const concatResult: {
|
|
82
|
+
|
|
83
|
+
<Output2, Input2, Error2, Env2>(other: Schedule<Output2, Input2, Error2, Env2>): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Result.Result<Output2, Output>, Input & Input2, Error | Error2, Env | Env2>;
|
|
84
|
+
|
|
85
|
+
<Output, Input, Error, Env, Output2, Input2, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, other: Schedule<Output2, Input2, Error2, Env2>): Schedule<Result.Result<Output2, Output>, Input & Input2, Error | Error2, Env | Env2>;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export declare const max: <const Schedules extends NonEmptyReadonlyArray<Schedule<any, any, any, any>>>(schedules: Schedules) => Schedule<Duration.Duration, UnionToIntersection<Input<Schedules[number]>>, Error<Schedules[number]>, Env<Schedules[number]>>;
|
|
89
|
+
|
|
90
|
+
export declare const cron: {
|
|
91
|
+
|
|
92
|
+
(expression: Cron.Cron): Schedule<Duration.Duration, unknown, Cron.CronParseError>;
|
|
93
|
+
|
|
94
|
+
(expression: string, tz?: string | DateTime.TimeZone, options?: {
|
|
95
|
+
readonly onDstOverlap?: Cron.DstOverlapPolicy | undefined;
|
|
96
|
+
}): Schedule<Duration.Duration, unknown, Cron.CronParseError>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export declare const duration: (durationInput: Duration.Input) => Schedule<Duration.Duration>;
|
|
100
|
+
|
|
101
|
+
export declare const during: (duration: Duration.Input) => Schedule<Duration.Duration>;
|
|
102
|
+
|
|
103
|
+
export declare const min: <const Schedules extends NonEmptyReadonlyArray<Schedule<any, any, any, any>>>(schedules: Schedules) => Schedule<Duration.Duration, UnionToIntersection<Input<Schedules[number]>>, Error<Schedules[number]>, Env<Schedules[number]>>;
|
|
104
|
+
|
|
105
|
+
export declare const exponential: (base: Duration.Input, factor?: number) => Schedule<Duration.Duration>;
|
|
106
|
+
|
|
107
|
+
export declare const fibonacci: (one: Duration.Input) => Schedule<Duration.Duration>;
|
|
108
|
+
|
|
109
|
+
export declare const fixed: (interval: Duration.Input) => Schedule<number>;
|
|
110
|
+
|
|
111
|
+
export declare const map: {
|
|
112
|
+
|
|
113
|
+
<Input, Output, Output2, Error2 = never, Env2 = never>(f: (metadata: Metadata<Output, Input>) => Output2 | Effect<Output2, Error2, Env2>): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output2, Input, Error | Error2, Env | Env2>;
|
|
114
|
+
|
|
115
|
+
<Output, Input, Error, Env, Output2, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, f: (metadata: Metadata<Output, Input>) => Output2 | Effect<Output2, Error2, Env2>): Schedule<Output2, Input, Error | Error2, Env | Env2>;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export declare const modifyDelay: {
|
|
119
|
+
|
|
120
|
+
<Output, Input, Error2 = never, Env2 = never>(f: (metadata: Metadata<Output, Input>) => Effect<Duration.Input, Error2, Env2>): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
121
|
+
|
|
122
|
+
<Output, Input, Error, Env, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, f: (metadata: Metadata<Output, Input>) => Effect<Duration.Input, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export declare const jittered: <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
|
|
126
|
+
|
|
127
|
+
export declare const passthrough: <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Input, Input, Error, Env>;
|
|
128
|
+
|
|
129
|
+
export declare const recurs: (times: number) => Schedule<number>;
|
|
130
|
+
|
|
131
|
+
export declare const spaced: (duration: Duration.Input) => Schedule<number>;
|
|
132
|
+
|
|
133
|
+
export declare const tap: {
|
|
134
|
+
|
|
135
|
+
<Output, Input, X, Error2, Env2>(f: (metadata: Metadata<Output, Input>) => Effect<X, Error2, Env2>): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
136
|
+
|
|
137
|
+
<Output, Input, Error, Env, X, Error2, Env2>(self: Schedule<Output, Input, Error, Env>, f: (metadata: Metadata<Output, Input>) => Effect<X, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export declare const upTo: {
|
|
141
|
+
|
|
142
|
+
(options: {
|
|
143
|
+
readonly duration?: Duration.Input | undefined;
|
|
144
|
+
readonly times?: number | undefined;
|
|
145
|
+
}): <Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error, Env>;
|
|
146
|
+
|
|
147
|
+
<Output, Input, Error, Env>(self: Schedule<Output, Input, Error, Env>, options: {
|
|
148
|
+
readonly duration?: Duration.Input | undefined;
|
|
149
|
+
readonly times?: number | undefined;
|
|
150
|
+
}): Schedule<Output, Input, Error, Env>;
|
|
151
|
+
};
|
|
152
|
+
declare const while_: {
|
|
153
|
+
<Input, Output, Meta extends Metadata<Output, Input>>(predicate: (metadata: Metadata<Output, Input>) => metadata is Meta): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Meta["output"], Meta["input"], Error, Env>;
|
|
154
|
+
<Input, Output, Error2 = never, Env2 = never>(predicate: (metadata: Metadata<Output, Input>) => boolean | Effect<boolean, Error2, Env2>): <Error, Env>(self: Schedule<Output, Input, Error, Env>) => Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
155
|
+
<Output, Input, Error, Env, Meta extends Metadata<Output, Input>>(self: Schedule<Output, Input, Error, Env>, predicate: (metadata: Metadata<Output, Input>) => metadata is Meta): Schedule<Meta["output"], Meta["input"], Error, Env>;
|
|
156
|
+
<Output, Input, Error, Env, Error2 = never, Env2 = never>(self: Schedule<Output, Input, Error, Env>, predicate: (metadata: Metadata<Output, Input>) => boolean | Effect<boolean, Error2, Env2>): Schedule<Output, Input, Error | Error2, Env | Env2>;
|
|
157
|
+
};
|
|
158
|
+
export {
|
|
159
|
+
|
|
160
|
+
while_ as while };
|
|
161
|
+
|
|
162
|
+
export declare const windowed: (interval: Duration.Input) => Schedule<number>;
|
|
163
|
+
|
|
164
|
+
export declare const forever: Schedule<number>;
|
|
165
|
+
|
|
166
|
+
export declare const once: Schedule<void>;
|
|
167
|
+
declare const identity_: <A>() => Schedule<A, A>;
|
|
168
|
+
export {
|
|
169
|
+
|
|
170
|
+
identity_ as identity };
|
|
171
|
+
|
|
172
|
+
export declare const setInputType: <T>() => <Output, Error, Env>(self: Schedule<Output, T, Error, Env>) => Schedule<Output, T, Error, Env>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
import * as Context from "./Context.ts";
|
|
3
|
+
import type * as Fiber from "./Fiber.ts";
|
|
4
|
+
|
|
5
|
+
export interface Scheduler {
|
|
6
|
+
readonly executionMode: "sync" | "async";
|
|
7
|
+
shouldYield(fiber: Fiber.Fiber<unknown, unknown>): boolean;
|
|
8
|
+
makeDispatcher(): SchedulerDispatcher;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SchedulerDispatcher {
|
|
12
|
+
scheduleTask(task: () => void, priority: number): void;
|
|
13
|
+
flush(): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare const Scheduler: Context.Reference<Scheduler>;
|
|
17
|
+
|
|
18
|
+
export declare class MixedScheduler implements Scheduler {
|
|
19
|
+
readonly executionMode: "sync" | "async";
|
|
20
|
+
readonly setImmediate: (f: () => void) => () => void;
|
|
21
|
+
constructor(executionMode?: "sync" | "async", setImmediateFn?: (f: () => void) => () => void);
|
|
22
|
+
|
|
23
|
+
shouldYield(fiber: Fiber.Fiber<unknown, unknown>): boolean;
|
|
24
|
+
|
|
25
|
+
makeDispatcher(): MixedSchedulerDispatcher;
|
|
26
|
+
}
|
|
27
|
+
declare class MixedSchedulerDispatcher implements SchedulerDispatcher {
|
|
28
|
+
private tasks;
|
|
29
|
+
private running;
|
|
30
|
+
readonly setImmediate: (f: () => void) => () => void;
|
|
31
|
+
constructor(setImmediateFn?: (f: () => void) => () => void);
|
|
32
|
+
|
|
33
|
+
scheduleTask(task: () => void, priority: number): void;
|
|
34
|
+
|
|
35
|
+
afterScheduled: () => void;
|
|
36
|
+
|
|
37
|
+
runTasks(): void;
|
|
38
|
+
|
|
39
|
+
flush(): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare const MaxOpsBeforeYield: Context.Reference<number>;
|
|
43
|
+
|
|
44
|
+
export declare const PreventSchedulerYield: Context.Reference<boolean>;
|
|
45
|
+
export {};
|