@effect/platform
Advanced tools
Comparing version 0.13.7 to 0.13.8
@@ -166,2 +166,10 @@ /** | ||
*/ | ||
export declare const bearerToken: { | ||
(token: string): (self: ClientRequest) => ClientRequest; | ||
(self: ClientRequest, token: string): ClientRequest; | ||
}; | ||
/** | ||
* @since 1.0.0 | ||
* @category combinators | ||
*/ | ||
export declare const accept: { | ||
@@ -168,0 +176,0 @@ (mediaType: string): (self: ClientRequest) => ClientRequest; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.urlParamsBody = exports.updateUrl = exports.unsafeJsonBody = exports.uint8ArrayBody = exports.textBody = exports.streamBody = exports.setUrlParams = exports.setUrlParam = exports.setUrl = exports.setMethod = exports.setHeaders = exports.setHeader = exports.setBody = exports.schemaBody = exports.put = exports.prependUrl = exports.post = exports.patch = exports.options = exports.modify = exports.make = exports.jsonBody = exports.head = exports.get = exports.formDataBody = exports.fileBody = exports.effectBody = exports.del = exports.basicAuth = exports.appendUrlParams = exports.appendUrlParam = exports.appendUrl = exports.acceptJson = exports.accept = exports.TypeId = void 0; | ||
exports.urlParamsBody = exports.updateUrl = exports.unsafeJsonBody = exports.uint8ArrayBody = exports.textBody = exports.streamBody = exports.setUrlParams = exports.setUrlParam = exports.setUrl = exports.setMethod = exports.setHeaders = exports.setHeader = exports.setBody = exports.schemaBody = exports.put = exports.prependUrl = exports.post = exports.patch = exports.options = exports.modify = exports.make = exports.jsonBody = exports.head = exports.get = exports.formDataBody = exports.fileBody = exports.effectBody = exports.del = exports.bearerToken = exports.basicAuth = exports.appendUrlParams = exports.appendUrlParam = exports.appendUrl = exports.acceptJson = exports.accept = exports.TypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/internal/http/clientRequest")); | ||
@@ -99,2 +99,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
exports.basicAuth = basicAuth; | ||
const bearerToken = internal.bearerToken; | ||
/** | ||
* @since 1.0.0 | ||
* @category combinators | ||
*/ | ||
exports.bearerToken = bearerToken; | ||
const accept = internal.accept; | ||
@@ -101,0 +107,0 @@ /** |
@@ -91,2 +91,28 @@ /** | ||
*/ | ||
export declare const maxParts: FiberRef.FiberRef<Option.Option<number>>; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const withMaxParts: { | ||
(count: Option.Option<number>): <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>; | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>): Effect.Effect<R, E, A>; | ||
}; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const maxFields: FiberRef.FiberRef<Option.Option<number>>; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const withMaxFields: { | ||
(count: Option.Option<number>): <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>; | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>): Effect.Effect<R, E, A>; | ||
}; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const maxFieldSize: FiberRef.FiberRef<FileSystem.Size>; | ||
@@ -105,2 +131,15 @@ /** | ||
*/ | ||
export declare const maxFiles: FiberRef.FiberRef<Option.Option<number>>; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const withMaxFiles: { | ||
(count: Option.Option<number>): <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>; | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>): Effect.Effect<R, E, A>; | ||
}; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const maxFileSize: FiberRef.FiberRef<Option.Option<FileSystem.Size>>; | ||
@@ -107,0 +146,0 @@ /** |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.withMaxFileSize = exports.withMaxFieldSize = exports.withFieldMimeTypes = exports.toRecord = exports.schemaRecord = exports.schemaJson = exports.maxFileSize = exports.maxFieldSize = exports.filesSchema = exports.fieldMimeTypes = exports.TypeId = exports.FormDataError = exports.ErrorTypeId = void 0; | ||
exports.withMaxParts = exports.withMaxFiles = exports.withMaxFileSize = exports.withMaxFields = exports.withMaxFieldSize = exports.withFieldMimeTypes = exports.toRecord = exports.schemaRecord = exports.schemaJson = exports.maxParts = exports.maxFiles = exports.maxFileSize = exports.maxFields = exports.maxFieldSize = exports.filesSchema = exports.fieldMimeTypes = exports.TypeId = exports.FormDataError = exports.ErrorTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/internal/http/formData")); | ||
@@ -33,2 +33,26 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
exports.FormDataError = FormDataError; | ||
const maxParts = internal.maxParts; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
exports.maxParts = maxParts; | ||
const withMaxParts = internal.withMaxParts; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
exports.withMaxParts = withMaxParts; | ||
const maxFields = internal.maxFields; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
exports.maxFields = maxFields; | ||
const withMaxFields = internal.withMaxFields; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
exports.withMaxFields = withMaxFields; | ||
const maxFieldSize = internal.maxFieldSize; | ||
@@ -46,2 +70,14 @@ /** | ||
exports.withMaxFieldSize = withMaxFieldSize; | ||
const maxFiles = internal.maxFiles; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
exports.maxFiles = maxFiles; | ||
const withMaxFiles = internal.withMaxFiles; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
exports.withMaxFiles = withMaxFiles; | ||
const maxFileSize = internal.maxFileSize; | ||
@@ -48,0 +84,0 @@ /** |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as body from "@effect/platform/Http/Body"; | ||
import * as client from "@effect/platform/Http/Client"; | ||
import * as error from "@effect/platform/Http/ClientError"; | ||
import * as request from "@effect/platform/Http/ClientRequest"; | ||
import * as response from "@effect/platform/Http/ClientResponse"; | ||
import * as headers from "@effect/platform/Http/Headers"; | ||
import * as urlParams from "@effect/platform/Http/UrlParams"; | ||
export { | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Body](https://effect-ts.github.io/platform/platform/Http/Body.ts.html) | ||
* - Module: `@effect/platform/Http/Body` | ||
*/ | ||
export * as body from "@effect/platform/Http/Body"; | ||
body, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Client](https://effect-ts.github.io/platform/platform/Http/Client.ts.html) | ||
* - Module: `@effect/platform/Http/Client` | ||
*/ | ||
export * as client from "@effect/platform/Http/Client"; | ||
client, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ClientError](https://effect-ts.github.io/platform/platform/Http/ClientError.ts.html) | ||
* - Module: `@effect/platform/Http/ClientError` | ||
*/ | ||
export * as request from "@effect/platform/Http/ClientRequest"; | ||
error, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Headers](https://effect-ts.github.io/platform/platform/Http/Headers.ts.html) | ||
* - Module: `@effect/platform/Http/Headers` | ||
*/ | ||
export * as response from "@effect/platform/Http/ClientResponse"; | ||
headers, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ClientRequest](https://effect-ts.github.io/platform/platform/Http/ClientRequest.ts.html) | ||
* - Module: `@effect/platform/Http/ClientRequest` | ||
*/ | ||
export * as error from "@effect/platform/Http/ClientError"; | ||
request, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ClientResponse](https://effect-ts.github.io/platform/platform/Http/ClientResponse.ts.html) | ||
* - Module: `@effect/platform/Http/ClientResponse` | ||
*/ | ||
export * as headers from "@effect/platform/Http/Headers"; | ||
response, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/UrlParams](https://effect-ts.github.io/platform/platform/Http/UrlParams.ts.html) | ||
* - Module: `@effect/platform/Http/UrlParams` | ||
*/ | ||
export * as urlParams from "@effect/platform/Http/UrlParams"; | ||
urlParams }; | ||
//# sourceMappingURL=HttpClient.d.ts.map |
@@ -7,18 +7,18 @@ "use strict"; | ||
exports.urlParams = exports.response = exports.request = exports.headers = exports.error = exports.client = exports.body = void 0; | ||
var body_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Body")); | ||
exports.body = body_1; | ||
var client_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Client")); | ||
exports.client = client_1; | ||
var request_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientRequest")); | ||
exports.request = request_1; | ||
var response_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientResponse")); | ||
exports.response = response_1; | ||
var error_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientError")); | ||
exports.error = error_1; | ||
var headers_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Headers")); | ||
exports.headers = headers_1; | ||
var urlParams_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/UrlParams")); | ||
exports.urlParams = urlParams_1; | ||
var body = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Body")); | ||
exports.body = body; | ||
var client = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Client")); | ||
exports.client = client; | ||
var error = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientError")); | ||
exports.error = error; | ||
var request = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientRequest")); | ||
exports.request = request; | ||
var response = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ClientResponse")); | ||
exports.response = response; | ||
var headers = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Headers")); | ||
exports.headers = headers; | ||
var urlParams = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/UrlParams")); | ||
exports.urlParams = urlParams; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
//# sourceMappingURL=HttpClient.js.map |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as app from "@effect/platform/Http/App"; | ||
import * as body from "@effect/platform/Http/Body"; | ||
import * as formData from "@effect/platform/Http/FormData"; | ||
import * as headers from "@effect/platform/Http/Headers"; | ||
import * as middleware from "@effect/platform/Http/Middleware"; | ||
import * as router from "@effect/platform/Http/Router"; | ||
import * as error from "@effect/platform/Http/ServerError"; | ||
import * as request from "@effect/platform/Http/ServerRequest"; | ||
import * as response from "@effect/platform/Http/ServerResponse"; | ||
import * as urlParams from "@effect/platform/Http/UrlParams"; | ||
export { | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/App](https://effect-ts.github.io/platform/platform/Http/App.html) | ||
* - Module: `@effect/platform/Http/App` | ||
*/ | ||
export * as app from "@effect/platform/Http/App"; | ||
app, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Body](https://effect-ts.github.io/platform/platform/Http/Body.html) | ||
* - Module: `@effect/platform/Http/Body` | ||
*/ | ||
export * as middleware from "@effect/platform/Http/Middleware"; | ||
body, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ServerError](https://effect-ts.github.io/platform/platform/Http/ServerError.html) | ||
* - Module: `@effect/platform/Http/ServerError` | ||
*/ | ||
export * as request from "@effect/platform/Http/ServerRequest"; | ||
error, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/FormData](https://effect-ts.github.io/platform/platform/Http/FormData.html) | ||
* - Module: `@effect/platform/Http/FormData` | ||
*/ | ||
export * as response from "@effect/platform/Http/ServerResponse"; | ||
formData, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Headers](https://effect-ts.github.io/platform/platform/Http/Headers.html) | ||
* - Module: `@effect/platform/Http/Headers` | ||
*/ | ||
export * as error from "@effect/platform/Http/ServerError"; | ||
headers, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Middleware](https://effect-ts.github.io/platform/platform/Http/Middleware.html) | ||
* - Module: `@effect/platform/Http/Middleware` | ||
*/ | ||
export * as body from "@effect/platform/Http/Body"; | ||
middleware, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ServerRequest](https://effect-ts.github.io/platform/platform/Http/ServerRequest.html) | ||
* - Module: `@effect/platform/Http/ServerRequest` | ||
*/ | ||
export * as formData from "@effect/platform/Http/FormData"; | ||
request, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ServerResponse](https://effect-ts.github.io/platform/platform/Http/ServerResponse.html) | ||
* - Module: `@effect/platform/Http/ServerResponse` | ||
*/ | ||
export * as headers from "@effect/platform/Http/Headers"; | ||
response, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Router](https://effect-ts.github.io/platform/platform/Http/Router.html) | ||
* - Module: `@effect/platform/Http/Router` | ||
*/ | ||
export * as router from "@effect/platform/Http/Router"; | ||
router, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/UrlParams](https://effect-ts.github.io/platform/platform/Http/UrlParams.html) | ||
* - Module: `@effect/platform/Http/UrlParams` | ||
*/ | ||
export * as urlParams from "@effect/platform/Http/UrlParams"; | ||
urlParams }; | ||
//# sourceMappingURL=HttpServer.d.ts.map |
@@ -7,24 +7,24 @@ "use strict"; | ||
exports.urlParams = exports.router = exports.response = exports.request = exports.middleware = exports.headers = exports.formData = exports.error = exports.body = exports.app = void 0; | ||
var app_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/App")); | ||
exports.app = app_1; | ||
var middleware_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Middleware")); | ||
exports.middleware = middleware_1; | ||
var request_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerRequest")); | ||
exports.request = request_1; | ||
var response_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerResponse")); | ||
exports.response = response_1; | ||
var error_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerError")); | ||
exports.error = error_1; | ||
var body_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Body")); | ||
exports.body = body_1; | ||
var formData_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/FormData")); | ||
exports.formData = formData_1; | ||
var headers_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Headers")); | ||
exports.headers = headers_1; | ||
var router_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Router")); | ||
exports.router = router_1; | ||
var urlParams_1 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/UrlParams")); | ||
exports.urlParams = urlParams_1; | ||
var app = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/App")); | ||
exports.app = app; | ||
var body = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Body")); | ||
exports.body = body; | ||
var formData = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/FormData")); | ||
exports.formData = formData; | ||
var headers = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Headers")); | ||
exports.headers = headers; | ||
var middleware = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Middleware")); | ||
exports.middleware = middleware; | ||
var router = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/Router")); | ||
exports.router = router; | ||
var error = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerError")); | ||
exports.error = error; | ||
var request = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerRequest")); | ||
exports.request = request; | ||
var response = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerResponse")); | ||
exports.response = response; | ||
var urlParams = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/UrlParams")); | ||
exports.urlParams = urlParams; | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
//# sourceMappingURL=HttpServer.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.urlParamsBody = exports.updateUrl = exports.unsafeJsonBody = exports.uint8ArrayBody = exports.textBody = exports.streamBody = exports.setUrlParams = exports.setUrlParam = exports.setUrl = exports.setMethod = exports.setHeaders = exports.setHeader = exports.setBody = exports.schemaBody = exports.resolveBody = exports.put = exports.prependUrl = exports.post = exports.patch = exports.options = exports.modify = exports.make = exports.jsonBody = exports.isClientRequest = exports.head = exports.get = exports.formDataBody = exports.fileBody = exports.empty = exports.effectBody = exports.del = exports.basicAuth = exports.appendUrlParams = exports.appendUrlParam = exports.appendUrl = exports.acceptJson = exports.accept = exports.TypeId = void 0; | ||
exports.urlParamsBody = exports.updateUrl = exports.unsafeJsonBody = exports.uint8ArrayBody = exports.textBody = exports.streamBody = exports.setUrlParams = exports.setUrlParam = exports.setUrl = exports.setMethod = exports.setHeaders = exports.setHeader = exports.setBody = exports.schemaBody = exports.resolveBody = exports.put = exports.prependUrl = exports.post = exports.patch = exports.options = exports.modify = exports.make = exports.jsonBody = exports.isClientRequest = exports.head = exports.get = exports.formDataBody = exports.fileBody = exports.empty = exports.effectBody = exports.del = exports.bearerToken = exports.basicAuth = exports.appendUrlParams = exports.appendUrlParam = exports.appendUrl = exports.acceptJson = exports.accept = exports.TypeId = void 0; | ||
var _Function = /*#__PURE__*/require("@effect/data/Function"); | ||
@@ -104,2 +104,5 @@ var _Pipeable = /*#__PURE__*/require("@effect/data/Pipeable"); | ||
exports.basicAuth = basicAuth; | ||
const bearerToken = /*#__PURE__*/(0, _Function.dual)(2, (self, token) => setHeader(self, "Authorization", `Bearer ${token}`)); | ||
/** @internal */ | ||
exports.bearerToken = bearerToken; | ||
const accept = /*#__PURE__*/(0, _Function.dual)(2, (self, mediaType) => setHeader(self, "Accept", mediaType)); | ||
@@ -106,0 +109,0 @@ /** @internal */ |
@@ -1,8 +0,2 @@ | ||
import * as ReadonlyArray from "@effect/data/ReadonlyArray"; | ||
import * as Effect from "@effect/io/Effect"; | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export declare const withFieldMimeTypes: ((mimeTypes: ReadonlyArray<string>) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>) & (<R_1, E_1, A_1>(effect: Effect.Effect<R_1, E_1, A_1>, mimeTypes: ReadonlyArray<string>) => Effect.Effect<R_1, E_1, A_1>); | ||
export {}; | ||
//# sourceMappingURL=formData.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.withMaxFileSize = exports.withMaxFieldSize = exports.withFieldMimeTypes = exports.toRecord = exports.schemaRecord = exports.schemaJson = exports.maxFileSize = exports.maxFieldSize = exports.filesSchema = exports.fieldMimeTypes = exports.TypeId = exports.FormDataError = exports.ErrorTypeId = void 0; | ||
exports.withMaxParts = exports.withMaxFiles = exports.withMaxFileSize = exports.withMaxFields = exports.withMaxFieldSize = exports.withFieldMimeTypes = exports.toRecord = exports.schemaRecord = exports.schemaJson = exports.maxParts = exports.maxFiles = exports.maxFileSize = exports.maxFields = exports.maxFieldSize = exports.filesSchema = exports.fieldMimeTypes = exports.TypeId = exports.FormDataError = exports.ErrorTypeId = void 0; | ||
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk")); | ||
@@ -36,4 +36,10 @@ var Data = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Data")); | ||
exports.FormDataError = FormDataError; | ||
const maxFieldSize = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/maxFieldSize", () => FiberRef.unsafeMake(FileSystem.Size(1024 * 1024))); | ||
const maxParts = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/maxParts", () => FiberRef.unsafeMake(Option.none())); | ||
/** @internal */ | ||
exports.maxParts = maxParts; | ||
const withMaxParts = /*#__PURE__*/(0, _Function.dual)(2, (effect, count) => Effect.locally(effect, maxParts, count)); | ||
/** @internal */ | ||
exports.withMaxParts = withMaxParts; | ||
const maxFieldSize = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/maxFieldSize", () => FiberRef.unsafeMake(FileSystem.Size(10 * 1024 * 1024))); | ||
/** @internal */ | ||
exports.maxFieldSize = maxFieldSize; | ||
@@ -43,2 +49,14 @@ const withMaxFieldSize = /*#__PURE__*/(0, _Function.dual)(2, (effect, size) => Effect.locally(effect, maxFieldSize, FileSystem.Size(size))); | ||
exports.withMaxFieldSize = withMaxFieldSize; | ||
const maxFields = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/maxFields", () => FiberRef.unsafeMake(Option.none())); | ||
/** @internal */ | ||
exports.maxFields = maxFields; | ||
const withMaxFields = /*#__PURE__*/(0, _Function.dual)(2, (effect, count) => Effect.locally(effect, maxFields, count)); | ||
/** @internal */ | ||
exports.withMaxFields = withMaxFields; | ||
const maxFiles = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/maxFiles", () => FiberRef.unsafeMake(Option.none())); | ||
/** @internal */ | ||
exports.maxFiles = maxFiles; | ||
const withMaxFiles = /*#__PURE__*/(0, _Function.dual)(2, (effect, count) => Effect.locally(effect, maxFiles, count)); | ||
/** @internal */ | ||
exports.withMaxFiles = withMaxFiles; | ||
const maxFileSize = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/maxFileSize", () => FiberRef.unsafeMake(Option.none())); | ||
@@ -51,6 +69,3 @@ /** @internal */ | ||
const fieldMimeTypes = /*#__PURE__*/(0, _Global.globalValue)("@effect/platform/Http/FormData/fieldMimeTypes", () => FiberRef.unsafeMake(Chunk.make("application/json"))); | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
/** @internal */ | ||
exports.fieldMimeTypes = fieldMimeTypes; | ||
@@ -57,0 +72,0 @@ const withFieldMimeTypes = /*#__PURE__*/(0, _Function.dual)(2, (effect, mimeTypes) => Effect.locally(effect, fieldMimeTypes, Chunk.fromIterable(mimeTypes))); |
{ | ||
"name": "@effect/platform", | ||
"version": "0.13.7", | ||
"version": "0.13.8", | ||
"description": "Unified interfaces for common platform-specific services", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -188,2 +188,11 @@ /** | ||
*/ | ||
export const bearerToken: { | ||
(token: string): (self: ClientRequest) => ClientRequest | ||
(self: ClientRequest, token: string): ClientRequest | ||
} = internal.bearerToken | ||
/** | ||
* @since 1.0.0 | ||
* @category combinators | ||
*/ | ||
export const accept: { | ||
@@ -190,0 +199,0 @@ (mediaType: string): (self: ClientRequest) => ClientRequest |
@@ -106,2 +106,32 @@ /** | ||
*/ | ||
export const maxParts: FiberRef.FiberRef<Option.Option<number>> = internal.maxParts | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export const withMaxParts: { | ||
(count: Option.Option<number>): <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A> | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>): Effect.Effect<R, E, A> | ||
} = internal.withMaxParts | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export const maxFields: FiberRef.FiberRef<Option.Option<number>> = internal.maxFields | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export const withMaxFields: { | ||
(count: Option.Option<number>): <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A> | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>): Effect.Effect<R, E, A> | ||
} = internal.withMaxFields | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export const maxFieldSize: FiberRef.FiberRef<FileSystem.Size> = internal.maxFieldSize | ||
@@ -122,2 +152,17 @@ | ||
*/ | ||
export const maxFiles: FiberRef.FiberRef<Option.Option<number>> = internal.maxFiles | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export const withMaxFiles: { | ||
(count: Option.Option<number>): <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A> | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>): Effect.Effect<R, E, A> | ||
} = internal.withMaxFiles | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
export const maxFileSize: FiberRef.FiberRef<Option.Option<FileSystem.Size>> = internal.maxFileSize | ||
@@ -124,0 +169,0 @@ |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as body from "@effect/platform/Http/Body" | ||
import * as client from "@effect/platform/Http/Client" | ||
import * as error from "@effect/platform/Http/ClientError" | ||
import * as request from "@effect/platform/Http/ClientRequest" | ||
import * as response from "@effect/platform/Http/ClientResponse" | ||
import * as headers from "@effect/platform/Http/Headers" | ||
import * as urlParams from "@effect/platform/Http/UrlParams" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as body from "@effect/platform/Http/Body" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as client from "@effect/platform/Http/Client" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as request from "@effect/platform/Http/ClientRequest" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as response from "@effect/platform/Http/ClientResponse" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as error from "@effect/platform/Http/ClientError" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as headers from "@effect/platform/Http/Headers" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as urlParams from "@effect/platform/Http/UrlParams" | ||
export { | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Body](https://effect-ts.github.io/platform/platform/Http/Body.ts.html) | ||
* - Module: `@effect/platform/Http/Body` | ||
*/ | ||
body, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Client](https://effect-ts.github.io/platform/platform/Http/Client.ts.html) | ||
* - Module: `@effect/platform/Http/Client` | ||
*/ | ||
client, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ClientError](https://effect-ts.github.io/platform/platform/Http/ClientError.ts.html) | ||
* - Module: `@effect/platform/Http/ClientError` | ||
*/ | ||
error, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Headers](https://effect-ts.github.io/platform/platform/Http/Headers.ts.html) | ||
* - Module: `@effect/platform/Http/Headers` | ||
*/ | ||
headers, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ClientRequest](https://effect-ts.github.io/platform/platform/Http/ClientRequest.ts.html) | ||
* - Module: `@effect/platform/Http/ClientRequest` | ||
*/ | ||
request, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ClientResponse](https://effect-ts.github.io/platform/platform/Http/ClientResponse.ts.html) | ||
* - Module: `@effect/platform/Http/ClientResponse` | ||
*/ | ||
response, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/UrlParams](https://effect-ts.github.io/platform/platform/Http/UrlParams.ts.html) | ||
* - Module: `@effect/platform/Http/UrlParams` | ||
*/ | ||
urlParams | ||
} |
/** | ||
* @since 1.0.0 | ||
*/ | ||
import * as app from "@effect/platform/Http/App" | ||
import * as body from "@effect/platform/Http/Body" | ||
import * as formData from "@effect/platform/Http/FormData" | ||
import * as headers from "@effect/platform/Http/Headers" | ||
import * as middleware from "@effect/platform/Http/Middleware" | ||
import * as router from "@effect/platform/Http/Router" | ||
import * as error from "@effect/platform/Http/ServerError" | ||
import * as request from "@effect/platform/Http/ServerRequest" | ||
import * as response from "@effect/platform/Http/ServerResponse" | ||
import * as urlParams from "@effect/platform/Http/UrlParams" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as app from "@effect/platform/Http/App" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as middleware from "@effect/platform/Http/Middleware" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as request from "@effect/platform/Http/ServerRequest" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as response from "@effect/platform/Http/ServerResponse" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as error from "@effect/platform/Http/ServerError" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as body from "@effect/platform/Http/Body" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as formData from "@effect/platform/Http/FormData" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as headers from "@effect/platform/Http/Headers" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as router from "@effect/platform/Http/Router" | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export * as urlParams from "@effect/platform/Http/UrlParams" | ||
export { | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/App](https://effect-ts.github.io/platform/platform/Http/App.html) | ||
* - Module: `@effect/platform/Http/App` | ||
*/ | ||
app, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Body](https://effect-ts.github.io/platform/platform/Http/Body.html) | ||
* - Module: `@effect/platform/Http/Body` | ||
*/ | ||
body, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ServerError](https://effect-ts.github.io/platform/platform/Http/ServerError.html) | ||
* - Module: `@effect/platform/Http/ServerError` | ||
*/ | ||
error, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/FormData](https://effect-ts.github.io/platform/platform/Http/FormData.html) | ||
* - Module: `@effect/platform/Http/FormData` | ||
*/ | ||
formData, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Headers](https://effect-ts.github.io/platform/platform/Http/Headers.html) | ||
* - Module: `@effect/platform/Http/Headers` | ||
*/ | ||
headers, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Middleware](https://effect-ts.github.io/platform/platform/Http/Middleware.html) | ||
* - Module: `@effect/platform/Http/Middleware` | ||
*/ | ||
middleware, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ServerRequest](https://effect-ts.github.io/platform/platform/Http/ServerRequest.html) | ||
* - Module: `@effect/platform/Http/ServerRequest` | ||
*/ | ||
request, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/ServerResponse](https://effect-ts.github.io/platform/platform/Http/ServerResponse.html) | ||
* - Module: `@effect/platform/Http/ServerResponse` | ||
*/ | ||
response, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/Router](https://effect-ts.github.io/platform/platform/Http/Router.html) | ||
* - Module: `@effect/platform/Http/Router` | ||
*/ | ||
router, | ||
/** | ||
* @since 1.0.0 | ||
* | ||
* - Docs: [Http/UrlParams](https://effect-ts.github.io/platform/platform/Http/UrlParams.html) | ||
* - Module: `@effect/platform/Http/UrlParams` | ||
*/ | ||
urlParams | ||
} |
@@ -148,2 +148,8 @@ import { dual } from "@effect/data/Function" | ||
/** @internal */ | ||
export const bearerToken = dual< | ||
(token: string) => (self: ClientRequest.ClientRequest) => ClientRequest.ClientRequest, | ||
(self: ClientRequest.ClientRequest, token: string) => ClientRequest.ClientRequest | ||
>(2, (self, token) => setHeader(self, "Authorization", `Bearer ${token}`)) | ||
/** @internal */ | ||
export const accept = dual< | ||
@@ -150,0 +156,0 @@ (mediaType: string) => (self: ClientRequest.ClientRequest) => ClientRequest.ClientRequest, |
@@ -33,5 +33,17 @@ import * as Chunk from "@effect/data/Chunk" | ||
/** @internal */ | ||
export const maxParts: FiberRef.FiberRef<Option.Option<number>> = globalValue( | ||
"@effect/platform/Http/FormData/maxParts", | ||
() => FiberRef.unsafeMake(Option.none<number>()) | ||
) | ||
/** @internal */ | ||
export const withMaxParts = dual< | ||
(count: Option.Option<number>) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>, | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>) => Effect.Effect<R, E, A> | ||
>(2, (effect, count) => Effect.locally(effect, maxParts, count)) | ||
/** @internal */ | ||
export const maxFieldSize: FiberRef.FiberRef<FileSystem.Size> = globalValue( | ||
"@effect/platform/Http/FormData/maxFieldSize", | ||
() => FiberRef.unsafeMake(FileSystem.Size(1024 * 1024)) | ||
() => FiberRef.unsafeMake(FileSystem.Size(10 * 1024 * 1024)) | ||
) | ||
@@ -46,2 +58,26 @@ | ||
/** @internal */ | ||
export const maxFields: FiberRef.FiberRef<Option.Option<number>> = globalValue( | ||
"@effect/platform/Http/FormData/maxFields", | ||
() => FiberRef.unsafeMake(Option.none<number>()) | ||
) | ||
/** @internal */ | ||
export const withMaxFields = dual< | ||
(count: Option.Option<number>) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>, | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>) => Effect.Effect<R, E, A> | ||
>(2, (effect, count) => Effect.locally(effect, maxFields, count)) | ||
/** @internal */ | ||
export const maxFiles: FiberRef.FiberRef<Option.Option<number>> = globalValue( | ||
"@effect/platform/Http/FormData/maxFiles", | ||
() => FiberRef.unsafeMake(Option.none<number>()) | ||
) | ||
/** @internal */ | ||
export const withMaxFiles = dual< | ||
(count: Option.Option<number>) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>, | ||
<R, E, A>(effect: Effect.Effect<R, E, A>, count: Option.Option<number>) => Effect.Effect<R, E, A> | ||
>(2, (effect, count) => Effect.locally(effect, maxFiles, count)) | ||
/** @internal */ | ||
export const maxFileSize: FiberRef.FiberRef<Option.Option<FileSystem.Size>> = globalValue( | ||
@@ -64,6 +100,3 @@ "@effect/platform/Http/FormData/maxFileSize", | ||
/** | ||
* @since 1.0.0 | ||
* @category fiber refs | ||
*/ | ||
/** @internal */ | ||
export const withFieldMimeTypes = dual< | ||
@@ -70,0 +103,0 @@ (mimeTypes: ReadonlyArray<string>) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<R, E, A>, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
953504
16513