@distilled.cloud/render 1.0.0-rc.13 → 1.0.0-rc.15
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/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +3 -3
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js +3 -7
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +2 -6
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/render.d.ts +622 -128
- package/lib/services/render.d.ts.map +1 -1
- package/lib/services/render.js +921 -1177
- package/lib/services/render.js.map +1 -1
- package/package.json +12 -10
- package/src/credentials.ts +7 -8
- package/src/errors.ts +5 -8
- package/src/index.ts +2 -11
- package/src/pagination.ts +7 -19
- package/src/protocol.ts +26 -32
- package/src/retry.ts +2 -8
- package/src/services/render.ts +2493 -2815
- package/lib/response-validation.test.d.ts +0 -4
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -33
- package/lib/response-validation.test.js.map +0 -1
- package/src/response-validation.test.ts +0 -47
package/lib/credentials.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ export interface Config {
|
|
|
18
18
|
declare const Credentials_base: Context.ServiceClass<Credentials, "RenderCredentials", Effect.Effect<Config, never, never>>;
|
|
19
19
|
export declare class Credentials extends Credentials_base {
|
|
20
20
|
}
|
|
21
|
-
/** Layer from a
|
|
21
|
+
/** Layer from a redacted API key + optional base URL. */
|
|
22
22
|
export declare const fromApiKey: (config: {
|
|
23
|
-
readonly apiKey: string
|
|
23
|
+
readonly apiKey: Redacted.Redacted<string>;
|
|
24
24
|
readonly apiBaseUrl?: string;
|
|
25
25
|
}) => Layer.Layer<Credentials>;
|
|
26
26
|
/** Reads RENDER_API_KEY (required) and RENDER_API_BASE_URL (optional). */
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAEhE,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAEJ,yDAAyD;AACzD,eAAO,MAAM,UAAU,WAAY;IACjC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC;AAEJ,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAgBvD,CAAC"}
|
package/lib/credentials.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
1
2
|
/**
|
|
2
3
|
* Render credentials — hand-written.
|
|
3
4
|
*
|
|
@@ -10,13 +11,12 @@ import * as Context from "effect/Context";
|
|
|
10
11
|
import * as Effect from "effect/Effect";
|
|
11
12
|
import * as Layer from "effect/Layer";
|
|
12
13
|
import * as Redacted from "effect/Redacted";
|
|
13
|
-
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
14
14
|
export const DEFAULT_API_BASE_URL = "https://api.render.com/v1";
|
|
15
15
|
export class Credentials extends Context.Service()("RenderCredentials") {
|
|
16
16
|
}
|
|
17
|
-
/** Layer from a
|
|
17
|
+
/** Layer from a redacted API key + optional base URL. */
|
|
18
18
|
export const fromApiKey = (config) => Layer.succeed(Credentials, Effect.succeed({
|
|
19
|
-
apiKey:
|
|
19
|
+
apiKey: config.apiKey,
|
|
20
20
|
apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
|
|
21
21
|
}));
|
|
22
22
|
/** Reads RENDER_API_KEY (required) and RENDER_API_BASE_URL (optional). */
|
package/lib/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D;;;;;;;GAOG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAA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AAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAExC,6EAA6E;AAC7E,qBAAa,kBAAmB,SAAQ,uBAOR;CAAG;;;;;;;;;AAEnC,kCAAkC;AAClC,qBAAa,gBAAiB,SAAQ,qBAGN;CAAG"}
|
package/lib/errors.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* `catchTag` works against either.
|
|
9
9
|
*/
|
|
10
10
|
export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
|
|
11
|
-
import * as Schema from "effect/Schema";
|
|
12
11
|
import * as Category from "@distilled.cloud/core/category";
|
|
12
|
+
import * as Schema from "effect/Schema";
|
|
13
13
|
/** Unknown Render error — returned when nothing else matches the failure. */
|
|
14
14
|
export class UnknownRenderError extends Schema.TaggedError()("UnknownRenderError", {
|
|
15
15
|
code: Schema.optional(Schema.String),
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,6EAA6E;AAC7E,MAAM,OAAO,kBAAmB,SAAQ,MAAM,CAAC,WAAW,EAAsB,CAC9E,oBAAoB,EACpB;IACE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC,OAAO;CACrB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;CAAG;AAEnC,kCAAkC;AAClC,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,WAAW,EAAoB,CAAC,kBAAkB,EAAE;IAC/F,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
|
package/lib/index.d.ts
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
export * from "./credentials.ts";
|
|
16
16
|
export * from "./errors.ts";
|
|
17
17
|
export * as T from "./traits.ts";
|
|
18
|
-
export { RenderProtocol, type RenderOpError, type RenderOpContext
|
|
18
|
+
export { RenderProtocol, type RenderOpError, type RenderOpContext } from "./protocol.ts";
|
|
19
19
|
export { paginateCursor, paginateRender } from "./pagination.ts";
|
|
20
20
|
export * as Retry from "./retry.ts";
|
|
21
21
|
export * as Services from "./services/index.ts";
|
|
22
22
|
export * from "./services/render.ts";
|
|
23
|
-
export { BadRequest, Conflict, Forbidden, NotFound
|
|
23
|
+
export { BadRequest, Conflict, Forbidden, NotFound } from "./services/render.ts";
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAKhD,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export * from "./credentials.js";
|
|
16
16
|
export * from "./errors.js";
|
|
17
17
|
export * as T from "./traits.js";
|
|
18
|
-
export { RenderProtocol
|
|
18
|
+
export { RenderProtocol } from "./protocol.js";
|
|
19
19
|
export { paginateCursor, paginateRender } from "./pagination.js";
|
|
20
20
|
export * as Retry from "./retry.js";
|
|
21
21
|
export * as Services from "./services/index.js";
|
|
@@ -24,5 +24,5 @@ export * as Services from "./services/index.js";
|
|
|
24
24
|
// same-named shared ones from ./errors.ts — the ops actually raise the
|
|
25
25
|
// service-local classes.
|
|
26
26
|
export * from "./services/render.js";
|
|
27
|
-
export { BadRequest, Conflict, Forbidden, NotFound
|
|
27
|
+
export { BadRequest, Conflict, Forbidden, NotFound } from "./services/render.js";
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAA4C,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,4EAA4E;AAC5E,qEAAqE;AACrE,uEAAuE;AACvE,yBAAyB;AACzB,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
package/lib/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAa/D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,kBAkCvC,CAAC"}
|
package/lib/pagination.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Pagination from "@distilled.cloud/core/pagination";
|
|
1
2
|
/**
|
|
2
3
|
* Render pagination — hand-written.
|
|
3
4
|
*
|
|
@@ -9,7 +10,6 @@
|
|
|
9
10
|
*/
|
|
10
11
|
import * as Effect from "effect/Effect";
|
|
11
12
|
import * as Stream from "effect/Stream";
|
|
12
|
-
import * as Pagination from "@distilled.cloud/core/pagination";
|
|
13
13
|
export { paginateCursor } from "@distilled.cloud/core/pagination";
|
|
14
14
|
/**
|
|
15
15
|
* Walk forward with `cursor` set to the last item's `cursor` until a page
|
|
@@ -21,9 +21,7 @@ export const paginateRender = (operation, input, pagination) => {
|
|
|
21
21
|
return Stream.die(new Error("Render cursor pagination requires inputToken"));
|
|
22
22
|
}
|
|
23
23
|
const itemsPath = pagination.items ?? "body";
|
|
24
|
-
const startCursor = typeof input[inputToken] === "string"
|
|
25
|
-
? input[inputToken]
|
|
26
|
-
: undefined;
|
|
24
|
+
const startCursor = typeof input[inputToken] === "string" ? input[inputToken] : undefined;
|
|
27
25
|
return Stream.unfold({ cursor: startCursor, done: false }, (state) => Effect.gen(function* () {
|
|
28
26
|
if (state.done)
|
|
29
27
|
return undefined;
|
|
@@ -32,9 +30,7 @@ export const paginateRender = (operation, input, pagination) => {
|
|
|
32
30
|
...(state.cursor ? { [inputToken]: state.cursor } : {}),
|
|
33
31
|
};
|
|
34
32
|
const response = yield* operation(requestPayload);
|
|
35
|
-
const items = Array.isArray(response)
|
|
36
|
-
? response
|
|
37
|
-
: Pagination.getItems(response, itemsPath);
|
|
33
|
+
const items = Array.isArray(response) ? response : Pagination.getItems(response, itemsPath);
|
|
38
34
|
const last = items.at(-1);
|
|
39
35
|
const nextCursor = typeof last?.cursor === "string" ? last.cursor : undefined;
|
|
40
36
|
const stuckCursor = state.cursor !== undefined && nextCursor === state.cursor;
|
package/lib/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;IAC5F,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IACzC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,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9E,OAAO;YACL,QAAQ;YACR;gBACE,MAAM,EAAE,UAAU;gBAClB,IAAI,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,UAAU,KAAK,SAAS,IAAI,WAAW;aACpE;SACO,CAAC;IACb,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type * as Layer from "effect/Layer";
|
|
2
|
-
import type * as HttpClient from "effect/http/HttpClient";
|
|
3
|
-
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
4
1
|
import type * as API from "@distilled.cloud/core/api";
|
|
5
2
|
import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors";
|
|
3
|
+
import type * as HttpClient from "effect/http/HttpClient";
|
|
4
|
+
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
5
|
+
import type * as Layer from "effect/Layer";
|
|
6
6
|
import { Credentials } from "./credentials.ts";
|
|
7
7
|
import { UnknownRenderError, RenderParseError } from "./errors.ts";
|
|
8
8
|
/**
|
package/lib/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAmB5E,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,kBAAkB,GAClB,WAAW,GACX,eAAe,CAAC,eAAe,GAC/B,gBAAgB,CAAC;AAErB,yEAAyE;AACzE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAqBnD,CAAC"}
|
package/lib/protocol.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
|
|
1
2
|
/**
|
|
2
3
|
* RenderProtocol — hand-written.
|
|
3
4
|
*
|
|
@@ -16,7 +17,6 @@
|
|
|
16
17
|
*/
|
|
17
18
|
import * as Effect from "effect/Effect";
|
|
18
19
|
import * as Redacted from "effect/Redacted";
|
|
19
|
-
import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
|
|
20
20
|
import { Credentials } from "./credentials.js";
|
|
21
21
|
import { UnknownRenderError, RenderParseError } from "./errors.js";
|
|
22
22
|
export const RenderProtocol = makeRestProtocol({
|
|
@@ -34,11 +34,7 @@ export const RenderProtocol = makeRestProtocol({
|
|
|
34
34
|
// Render's error body is `{ message: string }` — the factory's default
|
|
35
35
|
// lenient envelope covers it.
|
|
36
36
|
unknownError: ({ code, message, body }) => new UnknownRenderError({
|
|
37
|
-
code: typeof code === "string"
|
|
38
|
-
? code
|
|
39
|
-
: code !== undefined
|
|
40
|
-
? String(code)
|
|
41
|
-
: undefined,
|
|
37
|
+
code: typeof code === "string" ? code : code !== undefined ? String(code) : undefined,
|
|
42
38
|
message,
|
|
43
39
|
body,
|
|
44
40
|
}),
|
package/lib/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAkBnE,MAAM,CAAC,MAAM,cAAc,GAA8B,gBAAgB,CAAS;IAChF,mEAAmE;IACnE,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;QACnC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC;IACxB,CAAC,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;IACpC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnB,aAAa,EAAE,UAAU,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,MAAM,EAAE,kBAAkB;KAC3B,CAAC;IACF,uEAAuE;IACvE,8BAA8B;IAC9B,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CACxC,IAAI,kBAAkB,CAAC;QACrB,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QACrF,OAAO;QACP,IAAI;KACL,CAAC;IACJ,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;CACvE,CAAC,CAAC"}
|
package/lib/retry.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Policy } from "@distilled.cloud/core/retry";
|
|
1
2
|
/**
|
|
2
3
|
* Render retry configuration.
|
|
3
4
|
*
|
|
@@ -15,7 +16,6 @@
|
|
|
15
16
|
*/
|
|
16
17
|
import * as Context from "effect/Context";
|
|
17
18
|
import * as Effect from "effect/Effect";
|
|
18
|
-
import { type Policy } from "@distilled.cloud/core/retry";
|
|
19
19
|
export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
20
20
|
declare const Retry_base: Context.ServiceClass<Retry, "RenderRetry", Policy>;
|
|
21
21
|
/** Context tag for configuring retry behavior of Render API calls. */
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,sEAAsE;AACtE,qBAAa,KAAM,SAAQ,UAA+C;CAAG;AAE7E,wEAAwE;AACxE,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAA+D,CAAC;AAEjF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
|
package/lib/retry.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { throttlingFactory, transientFactory } from "@distilled.cloud/core/retry";
|
|
1
2
|
/**
|
|
2
3
|
* Render retry configuration.
|
|
3
4
|
*
|
|
@@ -16,7 +17,6 @@
|
|
|
16
17
|
import * as Context from "effect/Context";
|
|
17
18
|
import * as Effect from "effect/Effect";
|
|
18
19
|
import * as Layer from "effect/Layer";
|
|
19
|
-
import { throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
20
20
|
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
21
21
|
/** Context tag for configuring retry behavior of Render API calls. */
|
|
22
22
|
export class Retry extends Context.Service()("RenderRetry") {
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1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