@remix-run/server-runtime
Advanced tools
Comparing version 1.3.5 to 1.4.0-pre.0
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -18,10 +18,5 @@ * Copyright (c) Remix Software Inc. | ||
const json = (data, init = {}) => { | ||
let responseInit = init; | ||
if (typeof init === "number") { | ||
responseInit = { | ||
status: init | ||
}; | ||
} | ||
let responseInit = typeof init === "number" ? { | ||
status: init | ||
} : init; | ||
let headers = new Headers(responseInit.headers); | ||
@@ -28,0 +23,0 @@ |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -14,3 +14,3 @@ * Copyright (c) Remix Software Inc. | ||
function createRoutes(manifest, parentId) { | ||
return Object.keys(manifest).filter(key => manifest[key].parentId === parentId).map(id => ({ ...manifest[id], | ||
return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route, | ||
children: createRoutes(manifest, id) | ||
@@ -17,0 +17,0 @@ })); |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -55,3 +55,3 @@ * Copyright (c) Remix Software Inc. | ||
if (request.method.toLowerCase() === "head") { | ||
if (request.method === "HEAD") { | ||
return new Response(null, { | ||
@@ -470,13 +470,16 @@ headers: response.headers, | ||
function isActionRequest(request) { | ||
let method = request.method.toLowerCase(); | ||
return method === "post" || method === "put" || method === "patch" || method === "delete"; | ||
} | ||
const validActionMethods = new Set(["POST", "PUT", "PATCH", "DELETE"]); | ||
function isHeadRequest(request) { | ||
return request.method.toLowerCase() === "head"; | ||
function isActionRequest({ | ||
method | ||
}) { | ||
return validActionMethods.has(method.toUpperCase()); | ||
} | ||
function isValidRequestMethod(request) { | ||
return request.method.toLowerCase() === "get" || isHeadRequest(request) || isActionRequest(request); | ||
const validRequestMethods = new Set(["GET", "HEAD", ...validActionMethods]); | ||
function isValidRequestMethod({ | ||
method | ||
}) { | ||
return validRequestMethods.has(method.toUpperCase()); | ||
} | ||
@@ -483,0 +486,0 @@ |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
{ | ||
"name": "@remix-run/server-runtime", | ||
"description": "Server runtime for Remix", | ||
"version": "1.3.5", | ||
"version": "1.4.0-pre.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "./index.js", |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -22,10 +22,5 @@ * Copyright (c) Remix Software Inc. | ||
const json = (data, init = {}) => { | ||
let responseInit = init; | ||
if (typeof init === "number") { | ||
responseInit = { | ||
status: init | ||
}; | ||
} | ||
let responseInit = typeof init === "number" ? { | ||
status: init | ||
} : init; | ||
let headers = new Headers(responseInit.headers); | ||
@@ -32,0 +27,0 @@ |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -18,3 +18,3 @@ * Copyright (c) Remix Software Inc. | ||
function createRoutes(manifest, parentId) { | ||
return Object.keys(manifest).filter(key => manifest[key].parentId === parentId).map(id => ({ ...manifest[id], | ||
return Object.entries(manifest).filter(([, route]) => route.parentId === parentId).map(([id, route]) => ({ ...route, | ||
children: createRoutes(manifest, id) | ||
@@ -21,0 +21,0 @@ })); |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -59,3 +59,3 @@ * Copyright (c) Remix Software Inc. | ||
if (request.method.toLowerCase() === "head") { | ||
if (request.method === "HEAD") { | ||
return new Response(null, { | ||
@@ -474,13 +474,16 @@ headers: response.headers, | ||
function isActionRequest(request) { | ||
let method = request.method.toLowerCase(); | ||
return method === "post" || method === "put" || method === "patch" || method === "delete"; | ||
} | ||
const validActionMethods = new Set(["POST", "PUT", "PATCH", "DELETE"]); | ||
function isHeadRequest(request) { | ||
return request.method.toLowerCase() === "head"; | ||
function isActionRequest({ | ||
method | ||
}) { | ||
return validActionMethods.has(method.toUpperCase()); | ||
} | ||
function isValidRequestMethod(request) { | ||
return request.method.toLowerCase() === "get" || isHeadRequest(request) || isActionRequest(request); | ||
const validRequestMethods = new Set(["GET", "HEAD", ...validActionMethods]); | ||
function isValidRequestMethod({ | ||
method | ||
}) { | ||
return validRequestMethods.has(method.toUpperCase()); | ||
} | ||
@@ -487,0 +490,0 @@ |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
/** | ||
* @remix-run/server-runtime v1.3.5 | ||
* @remix-run/server-runtime v1.4.0-pre.0 | ||
* | ||
@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc. |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
118287
3283
2