@distilled.cloud/typesense 1.0.0-rc.15 → 1.0.0-rc.17
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/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -42
- package/lib/errors.d.ts +12 -12
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -24
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -8
- package/lib/index.lazy.js +6 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -32
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -33
- package/lib/services/index.js +0 -2
- package/lib/services/typesense.d.ts +7 -342
- package/lib/services/typesense.d.ts.map +1 -1
- package/lib/services/typesense.js +110 -2632
- package/lib/services/typesense.js.map +1 -1
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/typesense.js +4 -0
- package/lib/traits.d.ts +1 -1
- package/lib/traits.js +1 -11
- package/package.json +12 -9
- package/src/credentials.ts +15 -14
- package/src/errors.ts +9 -13
- package/src/index.ts +1 -1
- package/src/protocol.ts +6 -9
- package/src/retry.ts +6 -4
- package/src/services/typesense.ts +2556 -3163
- package/src/traits.ts +1 -1
- package/lib/credentials.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/protocol.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/traits.js.map +0 -1
- /package/lib/{index.js.map → index.lazy.js.map} +0 -0
package/src/retry.ts
CHANGED
|
@@ -33,17 +33,19 @@ export {
|
|
|
33
33
|
} from "@distilled.cloud/core/retry";
|
|
34
34
|
|
|
35
35
|
/** Context tag for configuring retry behavior of Typesense API calls. */
|
|
36
|
-
export class Retry extends Context.Service<Retry, Policy>()("TypesenseRetry") {}
|
|
36
|
+
export class Retry extends /*@__PURE__*/ Context.Service<Retry, Policy>()("TypesenseRetry") {}
|
|
37
37
|
|
|
38
38
|
/** Provides a custom retry policy to every Typesense API call below it. */
|
|
39
39
|
export const policy = (optionsOrFactory: Policy) =>
|
|
40
40
|
Effect.provide(Layer.succeed(Retry, optionsOrFactory));
|
|
41
41
|
|
|
42
42
|
/** Disables all automatic retries. */
|
|
43
|
-
export const none = Effect.provide(
|
|
43
|
+
export const none = /*@__PURE__*/ Effect.provide(
|
|
44
|
+
/*@__PURE__*/ Layer.succeed(Retry, { while: () => false }),
|
|
45
|
+
);
|
|
44
46
|
|
|
45
47
|
/** Apply the throttling retry policy (retries throttling errors indefinitely). */
|
|
46
|
-
export const throttling = policy(throttlingFactory);
|
|
48
|
+
export const throttling = /*@__PURE__*/ policy(throttlingFactory);
|
|
47
49
|
|
|
48
50
|
/** Apply the transient retry policy (retries all transient errors indefinitely). */
|
|
49
|
-
export const transient = policy(transientFactory);
|
|
51
|
+
export const transient = /*@__PURE__*/ policy(transientFactory);
|