@effect/platform-node
Advanced tools
Comparing version 0.15.1 to 0.15.2
@@ -12,5 +12,6 @@ "use strict"; | ||
var ServerResponse = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/Http/ServerResponse")); | ||
var Mime = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("mime")); | ||
var _mime = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("mime")); | ||
var Fs = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("node:fs")); | ||
var _nodeStream = /*#__PURE__*/require("node:stream"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
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); } | ||
@@ -28,3 +29,3 @@ 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; } | ||
...headers, | ||
"content-type": headers["content-type"] ?? Mime.getType(path) ?? "application/octet-stream", | ||
"content-type": headers["content-type"] ?? _mime.default.getType(path) ?? "application/octet-stream", | ||
"content-length": contentLength.toString() | ||
@@ -40,3 +41,3 @@ }, | ||
...headers, | ||
"content-type": headers["content-type"] ?? Mime.getType(file.name) ?? "application/octet-stream", | ||
"content-type": headers["content-type"] ?? _mime.default.getType(file.name) ?? "application/octet-stream", | ||
"content-length": file.size.toString() | ||
@@ -43,0 +44,0 @@ }, |
{ | ||
"name": "@effect/platform-node", | ||
"version": "0.15.1", | ||
"version": "0.15.2", | ||
"description": "Unified interfaces for common platform-specific services", | ||
@@ -35,4 +35,4 @@ "license": "MIT", | ||
"@effect/stream": "^0.36.0", | ||
"@effect/platform": "^0.15.1" | ||
"@effect/platform": "^0.15.2" | ||
} | ||
} |
@@ -7,3 +7,3 @@ import { pipe } from "@effect/data/Function" | ||
import * as ServerResponse from "@effect/platform/Http/ServerResponse" | ||
import * as Mime from "mime" | ||
import Mime from "mime" | ||
import * as Fs from "node:fs" | ||
@@ -10,0 +10,0 @@ import { Readable } from "node:stream" |
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
467963
7390