@remix-run/node
Advanced tools
Comparing version 0.0.0-experimental-2ca98589 to 0.0.0-experimental-3e7c9258
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -53,3 +53,3 @@ * Copyright (c) Remix Software Inc. | ||
let arr = this._fields[name]; | ||
return (arr === null || arr === void 0 ? void 0 : arr.slice(-1)[0]) || null; | ||
return (arr === null || arr === void 0 ? void 0 : arr.slice(-1)[0]) ?? null; | ||
} | ||
@@ -56,0 +56,0 @@ |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
export { AbortController } from "abort-controller"; | ||
export { formatServerError } from "./errors"; | ||
export type { HeadersInit, RequestInfo, RequestInit, ResponseInit } from "./fetch"; | ||
export type { HeadersInit, RequestInfo, RequestInit, ResponseInit, } from "./fetch"; | ||
export { Headers, Request, Response, fetch } from "./fetch"; | ||
export { FormData } from "./formData"; | ||
export type { UploadHandler, UploadHandlerArgs } from "./formData"; | ||
export { installGlobals } from "./globals"; | ||
export { parseMultipartFormData as unstable_parseMultipartFormData } from "./parseMultipartFormData"; | ||
export { createFileSessionStorage } from "./sessions/fileStorage"; | ||
export { createFileUploadHandler as unstable_createFileUploadHandler, NodeOnDiskFile } from "./upload/fileUploadHandler"; | ||
export { createFileUploadHandler as unstable_createFileUploadHandler, NodeOnDiskFile, } from "./upload/fileUploadHandler"; | ||
export { createMemoryUploadHandler as unstable_createMemoryUploadHandler } from "./upload/memoryUploadHandler"; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -15,4 +15,4 @@ * Copyright (c) Remix Software Inc. | ||
var sourceMapSupport = require('source-map-support'); | ||
var abortController = require('abort-controller'); | ||
var errors = require('./errors.js'); | ||
var fetch = require('./fetch.js'); | ||
@@ -27,4 +27,8 @@ var formData = require('./formData.js'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var sourceMapSupport__default = /*#__PURE__*/_interopDefaultLegacy(sourceMapSupport); | ||
sourceMapSupport__default["default"].install(); | ||
Object.defineProperty(exports, 'AbortController', { | ||
@@ -34,3 +38,2 @@ enumerable: true, | ||
}); | ||
exports.formatServerError = errors.formatServerError; | ||
exports.Request = fetch.Request; | ||
@@ -37,0 +40,0 @@ exports.fetch = fetch.fetch; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
@@ -1,1 +0,2 @@ | ||
export { createFileSessionStorage, unstable_createFileUploadHandler, unstable_createMemoryUploadHandler, unstable_parseMultipartFormData } from "@remix-run/node"; | ||
export { createFileSessionStorage, unstable_createFileUploadHandler, unstable_createMemoryUploadHandler, unstable_parseMultipartFormData, } from "@remix-run/node"; | ||
export type { UploadHandler, UploadHandlerArgs } from "@remix-run/node"; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
{ | ||
"name": "@remix-run/node", | ||
"description": "Node.js platform abstractions for Remix", | ||
"version": "0.0.0-experimental-2ca98589", | ||
"version": "0.0.0-experimental-3e7c9258", | ||
"license": "MIT", | ||
"module": "./esm/index.js", | ||
"types": "./index.d.ts", | ||
"repository": { | ||
@@ -17,3 +15,3 @@ "type": "git", | ||
"dependencies": { | ||
"@remix-run/server-runtime": "0.0.0-experimental-2ca98589", | ||
"@remix-run/server-runtime": "0.0.0-experimental-3e7c9258", | ||
"@types/busboy": "^0.3.1", | ||
@@ -28,9 +26,10 @@ "@types/node-fetch": "^2.5.12", | ||
"node-fetch": "^2.6.1", | ||
"source-map": "^0.7.3" | ||
"source-map-support": "^0.5.21" | ||
}, | ||
"devDependencies": { | ||
"@types/blob-stream": "^0.1.30", | ||
"@types/cookie-signature": "^1.0.3" | ||
"@types/cookie-signature": "^1.0.3", | ||
"@types/source-map-support": "^0.5.4" | ||
}, | ||
"sideEffects": false | ||
} |
@@ -5,3 +5,8 @@ /// <reference types="node" /> | ||
import { FormData as NodeFormData } from "./formData"; | ||
/** | ||
* Allows you to handle multipart forms (file uploads) for your app. | ||
* | ||
* @see https://remix.run/api/remix#parsemultipartformdata-node | ||
*/ | ||
export declare function parseMultipartFormData(request: Request, uploadHandler: UploadHandler): Promise<FormData>; | ||
export declare function internalParseFormData(contentType: string, body: string | Buffer | Readable, abortController?: AbortController, uploadHandler?: UploadHandler): Promise<NodeFormData>; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -23,2 +23,8 @@ * Copyright (c) Remix Software Inc. | ||
/** | ||
* Allows you to handle multipart forms (file uploads) for your app. | ||
* | ||
* @see https://remix.run/api/remix#parsemultipartformdata-node | ||
*/ | ||
function parseMultipartFormData(request, uploadHandler) { | ||
@@ -25,0 +31,0 @@ return request.formData(uploadHandler); |
@@ -18,4 +18,6 @@ import type { SessionStorage, SessionIdStorageStrategy } from "@remix-run/server-runtime"; | ||
* files may contain much more data than cookies. | ||
* | ||
* @see https://remix.run/api/remix#createfilesessionstorage-node | ||
*/ | ||
export declare function createFileSessionStorage({ cookie, dir }: FileSessionStorageOptions): SessionStorage; | ||
export declare function createFileSessionStorage({ cookie, dir, }: FileSessionStorageOptions): SessionStorage; | ||
export {}; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -46,2 +46,4 @@ * Copyright (c) Remix Software Inc. | ||
* files may contain much more data than cookies. | ||
* | ||
* @see https://remix.run/api/remix#createfilesessionstorage-node | ||
*/ | ||
@@ -48,0 +50,0 @@ function createFileSessionStorage({ |
@@ -46,3 +46,3 @@ /// <reference types="node" /> | ||
}; | ||
export declare function createFileUploadHandler({ directory, avoidFileConflicts, file, filter, maxFileSize }: FileUploadHandlerOptions): UploadHandler; | ||
export declare function createFileUploadHandler({ directory, avoidFileConflicts, file, filter, maxFileSize, }: FileUploadHandlerOptions): UploadHandler; | ||
export declare class NodeOnDiskFile implements File { | ||
@@ -49,0 +49,0 @@ private filepath; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -17,3 +17,3 @@ * Copyright (c) Remix Software Inc. | ||
var fs = require('fs'); | ||
var fsp = require('fs/promises'); | ||
var promises = require('fs/promises'); | ||
var os = require('os'); | ||
@@ -34,3 +34,3 @@ var path = require('path'); | ||
for (let i = 1; await fsp.stat(uniqueFilepath).then(() => true).catch(() => false); i++) { | ||
for (let i = 1; await promises.stat(uniqueFilepath).then(() => true).catch(() => false); i++) { | ||
uniqueFilepath = (ext ? filepath.slice(0, -ext.length) : filepath) + `-${new Date().getTime()}${ext}`; | ||
@@ -94,3 +94,3 @@ } | ||
await fsp.mkdir(path.dirname(filepath), { | ||
await promises.mkdir(path.dirname(filepath), { | ||
recursive: true | ||
@@ -111,3 +111,3 @@ }).catch(() => {}); | ||
writeFileStream.removeAllListeners(); | ||
await fsp.rm(filepath, { | ||
await promises.rm(filepath, { | ||
force: true | ||
@@ -157,3 +157,3 @@ }).catch(() => {}); | ||
text() { | ||
return fsp.readFile(this.filepath, "utf-8"); | ||
return promises.readFile(this.filepath, "utf-8"); | ||
} | ||
@@ -160,0 +160,0 @@ |
@@ -21,2 +21,2 @@ import type { UploadHandler } from "../formData"; | ||
}; | ||
export declare function createMemoryUploadHandler({ filter, maxFileSize }: MemoryUploadHandlerOptions): UploadHandler; | ||
export declare function createMemoryUploadHandler({ filter, maxFileSize, }: MemoryUploadHandlerOptions): UploadHandler; |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/node v0.0.0-experimental-2ca98589 | ||
* @remix-run/node v0.0.0-experimental-3e7c9258 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
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
3
37988
3
28
1053
+ Addedsource-map-support@^0.5.21
+ Added@remix-run/server-runtime@0.0.0-experimental-3e7c9258(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-support@0.5.21(transitive)
- Removedsource-map@^0.7.3
- Removed@remix-run/server-runtime@0.0.0-experimental-2ca98589(transitive)
Updated@remix-run/server-runtime@0.0.0-experimental-3e7c9258