@remix-run/node 1.1.2 → 1.2.0

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/base64.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/cookieSigning.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/fetch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/formData.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -50,7 +50,7 @@ class NodeFormData {
50
50
 
51
51
  get(name) {
52
52
  let arr = this._fields[name];
53
- return (arr === null || arr === void 0 ? void 0 : arr.slice(-1)[0]) || null;
53
+ return (arr === null || arr === void 0 ? void 0 : arr.slice(-1)[0]) ?? null;
54
54
  }
55
55
 
56
56
  getAll(name) {
package/globals.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { formatServerError } from "./errors";
3
3
  export type { HeadersInit, RequestInfo, RequestInit, ResponseInit } from "./fetch";
4
4
  export { Headers, Request, Response, fetch } from "./fetch";
5
5
  export { FormData } from "./formData";
6
+ export type { UploadHandler, UploadHandlerArgs } from "./formData";
6
7
  export { installGlobals } from "./globals";
7
8
  export { parseMultipartFormData as unstable_parseMultipartFormData } from "./parseMultipartFormData";
8
9
  export { createFileSessionStorage } from "./sessions/fileStorage";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1 +1,2 @@
1
1
  export { createFileSessionStorage, unstable_createFileUploadHandler, unstable_createMemoryUploadHandler, unstable_parseMultipartFormData } from "@remix-run/node";
2
+ export type { UploadHandler, UploadHandlerArgs } from "@remix-run/node";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@remix-run/node",
3
3
  "description": "Node.js platform abstractions for Remix",
4
- "version": "1.1.2",
4
+ "version": "1.2.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "url": "https://github.com/remix-run/remix/issues"
13
13
  },
14
14
  "dependencies": {
15
- "@remix-run/server-runtime": "1.1.2",
15
+ "@remix-run/server-runtime": "1.2.0",
16
16
  "@types/busboy": "^0.3.1",
17
17
  "@types/node-fetch": "^2.5.12",
18
18
  "@web-std/file": "^3.0.0",
@@ -2,5 +2,10 @@
2
2
  import { Readable } from "stream";
3
3
  import type { UploadHandler } from "./formData";
4
4
  import { FormData as NodeFormData } from "./formData";
5
+ /**
6
+ * Allows you to handle multipart forms (file uploads) for your app.
7
+ *
8
+ * @see https://remix.run/api/remix#parsemultipartformdata-node
9
+ */
5
10
  export declare function parseMultipartFormData(request: Request, uploadHandler: UploadHandler): Promise<FormData>;
6
11
  export declare function internalParseFormData(contentType: string, body: string | Buffer | Readable, abortController?: AbortController, uploadHandler?: UploadHandler): Promise<NodeFormData>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -20,6 +20,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
20
20
 
21
21
  var Busboy__default = /*#__PURE__*/_interopDefaultLegacy(Busboy);
22
22
 
23
+ /**
24
+ * Allows you to handle multipart forms (file uploads) for your app.
25
+ *
26
+ * @see https://remix.run/api/remix#parsemultipartformdata-node
27
+ */
28
+
23
29
  function parseMultipartFormData(request, uploadHandler) {
24
30
  return request.formData(uploadHandler);
25
31
  }
@@ -15,6 +15,8 @@ interface FileSessionStorageOptions {
15
15
  *
16
16
  * The advantage of using this instead of cookie session storage is that
17
17
  * files may contain much more data than cookies.
18
+ *
19
+ * @see https://remix.run/api/remix#createfilesessionstorage-node
18
20
  */
19
21
  export declare function createFileSessionStorage({ cookie, dir }: FileSessionStorageOptions): SessionStorage;
20
22
  export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -43,6 +43,8 @@ var path__namespace = /*#__PURE__*/_interopNamespace(path);
43
43
  *
44
44
  * The advantage of using this instead of cookie session storage is that
45
45
  * files may contain much more data than cookies.
46
+ *
47
+ * @see https://remix.run/api/remix#createfilesessionstorage-node
46
48
  */
47
49
  function createFileSessionStorage({
48
50
  cookie,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/upload/meter.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.1.2
2
+ * @remix-run/node v1.2.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *