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

@remix-run/deno

Package Overview
Dependencies
Maintainers
0
Versions
922
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remix-run/deno - npm Package Compare versions

Comparing version 0.0.0-nightly-3cd15dc-20220623 to 0.0.0-nightly-3d7966f52-20240916

CHANGELOG.md

13

fileStorage.ts
import * as path from "https://deno.land/std@0.128.0/path/mod.ts";
import type {
SessionData,
SessionIdStorageStrategy,

@@ -28,9 +29,9 @@ SessionStorage,

*/
export function createFileSessionStorage({
export function createFileSessionStorage<Data = SessionData, FlashData = Data>({
cookie,
dir,
}: FileSessionStorageOptions): SessionStorage {
}: FileSessionStorageOptions): SessionStorage<Data, FlashData> {
return createSessionStorage({
cookie,
async createData(data, expires) {
createData: async (data, expires) => {
const content = JSON.stringify({ data, expires });

@@ -68,3 +69,3 @@

},
async readData(id) {
readData: async (id) => {
try {

@@ -91,3 +92,3 @@ const file = getFile(dir, id);

},
async updateData(id, data, expires) {
updateData: async (id, data, expires) => {
const content = JSON.stringify({ data, expires });

@@ -98,3 +99,3 @@ const file = getFile(dir, id);

},
async deleteData(id) {
deleteData: async (id) => {
try {

@@ -101,0 +102,0 @@ await Deno.remove(getFile(dir, id));

@@ -17,10 +17,16 @@ import "./globals.ts";

export {
broadcastDevReady,
createSession,
defer,
isCookie,
isSession,
json,
logDevReady,
MaxPartSizeExceededError,
redirect,
redirectDocument,
replace,
unstable_composeUploadHandlers,
unstable_createMemoryUploadHandler,
unstable_data,
unstable_parseMultipartFormData,

@@ -31,3 +37,3 @@ } from "@remix-run/server-runtime";

ActionFunction,
AppData,
ActionFunctionArgs,
AppLoadContext,

@@ -39,24 +45,27 @@ Cookie,

CookieSignatureOptions,
CreateRequestHandlerFunction,
DataFunctionArgs,
EntryContext,
ErrorBoundaryComponent,
ErrorResponse,
Future,
HandleDataRequestFunction,
HandleDocumentRequestFunction,
HandleErrorFunction,
HeadersArgs,
HeadersFunction,
HtmlLinkDescriptor,
HtmlMetaDescriptor,
JsonFunction,
LinkDescriptor,
LinksFunction,
LoaderFunction,
LoaderFunctionArgs,
MemoryUploadHandlerFilterArgs,
MemoryUploadHandlerOptions,
MetaDescriptor,
MetaFunction,
PageLinkDescriptor,
RequestHandler,
RouteComponent,
RouteHandle,
SerializeFrom,
ServerBuild,
ServerEntryModule,
ServerRuntimeMetaArgs as MetaArgs,
ServerRuntimeMetaDescriptor as MetaDescriptor,
ServerRuntimeMetaFunction as MetaFunction,
Session,

@@ -66,4 +75,8 @@ SessionData,

SessionStorage,
SignFunction,
TypedDeferredData,
TypedResponse,
UnsignFunction,
UploadHandler,
UploadHandlerPart,
} from "@remix-run/server-runtime";

@@ -1,7 +0,22 @@

Copyright 2021 Remix Software Inc.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright (c) Remix Software Inc. 2020-2021
Copyright (c) Shopify Inc. 2022-2024
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{
"name": "@remix-run/deno",
"version": "0.0.0-nightly-3cd15dc-20220623",
"version": "0.0.0-nightly-3d7966f52-20240916",
"description": "Deno platform abstractions for Remix",
"homepage": "https://remix.run",
"main": "./index.ts",
"bugs": {

@@ -17,8 +18,16 @@ "url": "https://github.com/remix-run/remix/issues"

"dependencies": {
"@remix-run/server-runtime": "0.0.0-nightly-3cd15dc-20220623",
"@remix-run/server-runtime": "0.0.0-nightly-3d7966f52-20240916",
"mime": "^3.0.0"
},
"peerDependencies": {
"typescript": "^5.1.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"engines": {
"node": ">=14"
"node": ">=18.0.0"
}
}
}

@@ -5,3 +5,3 @@ # @remix-run/deno

For more, see the [Remix docs](https://remix.run/docs/).
For more, see the [Remix docs](https://remix.run/docs).

@@ -8,0 +8,0 @@ ## Install

import * as path from "https://deno.land/std@0.128.0/path/mod.ts";
import mime from "mime";
import { createRequestHandler as createRemixRequestHandler } from "@remix-run/server-runtime";
import type { ServerBuild } from "@remix-run/server-runtime";
import type { AppLoadContext, ServerBuild } from "@remix-run/server-runtime";

@@ -14,3 +14,5 @@ function defaultCacheControl(url: URL, assetsPublicPath = "/build/") {

export function createRequestHandler<Context = unknown>({
export function createRequestHandler<
Context extends AppLoadContext | undefined = undefined,
>({
build,

@@ -31,4 +33,4 @@ mode,

return handleRequest(request, loadContext);
} catch (e) {
console.error(e);
} catch (error: unknown) {
console.error(error);

@@ -86,3 +88,5 @@ return new Response("Internal Error", { status: 500 });

export function createRequestHandlerWithStaticFiles<Context = unknown>({
export function createRequestHandlerWithStaticFiles<
Context extends AppLoadContext | undefined = undefined,
>({
build,

@@ -110,3 +114,3 @@ mode,

return await serveStaticFiles(request, staticFiles);
} catch (error) {
} catch (error: unknown) {
if (!(error instanceof FileNotFoundError)) {

@@ -113,0 +117,0 @@ throw error;

import * as path from "https://deno.land/std@0.128.0/path/mod.ts";
import type {
SessionData,
SessionIdStorageStrategy,

@@ -28,9 +29,9 @@ SessionStorage,

*/
export function createFileSessionStorage({
export function createFileSessionStorage<Data = SessionData, FlashData = Data>({
cookie,
dir,
}: FileSessionStorageOptions): SessionStorage {
}: FileSessionStorageOptions): SessionStorage<Data, FlashData> {
return createSessionStorage({
cookie,
async createData(data, expires) {
createData: async (data, expires) => {
const content = JSON.stringify({ data, expires });

@@ -68,3 +69,3 @@

},
async readData(id) {
readData: async (id) => {
try {

@@ -91,3 +92,3 @@ const file = getFile(dir, id);

},
async updateData(id, data, expires) {
updateData: async (id, data, expires) => {
const content = JSON.stringify({ data, expires });

@@ -98,3 +99,3 @@ const file = getFile(dir, id);

},
async deleteData(id) {
deleteData: async (id) => {
try {

@@ -101,0 +102,0 @@ await Deno.remove(getFile(dir, id));

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