Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remix-run/node

Package Overview
Dependencies
Maintainers
2
Versions
1035
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remix-run/node - npm Package Compare versions

Comparing version 0.0.0-experimental-65ba1bd2 to 0.0.0-experimental-7b47e562

magicExports/esm/remix.js

2

base64.js
/**
* @remix-run/node v0.0.0-experimental-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

/**
* @remix-run/node v0.0.0-experimental-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

/**
* @remix-run/node v0.0.0-experimental-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

/**
* @remix-run/node v0.0.0-experimental-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -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-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -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-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -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;

{
"name": "@remix-run/node",
"description": "Node.js platform abstractions for Remix",
"version": "0.0.0-experimental-65ba1bd2",
"version": "0.0.0-experimental-7b47e562",
"license": "MIT",

@@ -15,3 +15,3 @@ "repository": {

"dependencies": {
"@remix-run/server-runtime": "0.0.0-experimental-65ba1bd2",
"@remix-run/server-runtime": "0.0.0-experimental-7b47e562",
"@types/busboy": "^0.3.1",

@@ -26,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-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -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-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -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-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -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-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

/**
* @remix-run/node v0.0.0-experimental-65ba1bd2
* @remix-run/node v0.0.0-experimental-7b47e562
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc