New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@remix-run/cloudflare-pages

Package Overview
Dependencies
Maintainers
2
Versions
1028
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remix-run/cloudflare-pages - npm Package Compare versions

Comparing version 0.0.0-experimental-9e5da5b0 to 0.0.0-experimental-a04f3d18

6

esm/index.js
/**
* @remix-run/cloudflare-pages v0.0.0-experimental-9e5da5b0
* @remix-run/cloudflare-pages v0.0.0-experimental-a04f3d18
*

@@ -11,6 +11,2 @@ * Copyright (c) Remix Software Inc.

*/
import { installGlobals } from './globals.js';
export { createCloudflareKVSessionStorage } from './sessions/cloudflareKVSessionStorage.js';
export { createPagesFunctionHandler, createRequestHandler } from './worker.js';
installGlobals();

19

esm/worker.js
/**
* @remix-run/cloudflare-pages v0.0.0-experimental-9e5da5b0
* @remix-run/cloudflare-pages v0.0.0-experimental-a04f3d18
*

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

*/
import { createRequestHandler as createRequestHandler$1 } from '@remix-run/server-runtime';
import { createRequestHandler as createRequestHandler$1 } from '@remix-run/cloudflare';
/**
* A function that returns the value to use as `context` in route `loader` and
* `action` functions.
*
* You can think of this as an escape hatch that allows you to pass
* environment/platform-specific values through to your loader/action.
*/
function createRequestHandler({

@@ -19,4 +27,3 @@ build,

}) {
let platform = {};
let handleRequest = createRequestHandler$1(build, platform, mode);
let handleRequest = createRequestHandler$1(build, mode);
return context => {

@@ -32,3 +39,3 @@ let loadContext = typeof getLoadContext === "function" ? getLoadContext(context) : undefined;

}) {
const handleRequest = createRequestHandler({
let handleRequest = createRequestHandler({
build,

@@ -39,3 +46,3 @@ getLoadContext,

const handleFetch = async context => {
let handleFetch = async context => {
let response; // https://github.com/cloudflare/wrangler2/issues/117

@@ -42,0 +49,0 @@

@@ -1,3 +0,2 @@

export { createCloudflareKVSessionStorage } from "./sessions/cloudflareKVSessionStorage";
export type { createPagesFunctionHandlerParams } from "./worker";
export type { createPagesFunctionHandlerParams, GetLoadContextFunction, RequestHandler, } from "./worker";
export { createPagesFunctionHandler, createRequestHandler } from "./worker";
/**
* @remix-run/cloudflare-pages v0.0.0-experimental-9e5da5b0
* @remix-run/cloudflare-pages v0.0.0-experimental-a04f3d18
*

@@ -15,10 +15,7 @@ * Copyright (c) Remix Software Inc.

var globals = require('./globals.js');
var cloudflareKVSessionStorage = require('./sessions/cloudflareKVSessionStorage.js');
var worker = require('./worker.js');
globals.installGlobals();
exports.createCloudflareKVSessionStorage = cloudflareKVSessionStorage.createCloudflareKVSessionStorage;
exports.createPagesFunctionHandler = worker.createPagesFunctionHandler;
exports.createRequestHandler = worker.createRequestHandler;
/**
* @remix-run/cloudflare-pages v0.0.0-experimental-9e5da5b0
* @remix-run/cloudflare-pages v0.0.0-experimental-a04f3d18
*

@@ -11,2 +11,2 @@ * Copyright (c) Remix Software Inc.

*/
export { createCloudflareKVSessionStorage } from '@remix-run/cloudflare-pages';
export { createCloudflareKVSessionStorage } from '@remix-run/cloudflare';

@@ -1,1 +0,1 @@

export { createCloudflareKVSessionStorage } from "@remix-run/cloudflare-pages";
export { createCloudflareKVSessionStorage } from "@remix-run/cloudflare";
/**
* @remix-run/cloudflare-pages v0.0.0-experimental-9e5da5b0
* @remix-run/cloudflare-pages v0.0.0-experimental-a04f3d18
*

@@ -15,3 +15,3 @@ * Copyright (c) Remix Software Inc.

var cloudflarePages = require('@remix-run/cloudflare-pages');
var cloudflare = require('@remix-run/cloudflare');

@@ -22,3 +22,3 @@

enumerable: true,
get: function () { return cloudflarePages.createCloudflareKVSessionStorage; }
get: function () { return cloudflare.createCloudflareKVSessionStorage; }
});
{
"name": "@remix-run/cloudflare-pages",
"description": "Cloudflare Pages request handler for Remix",
"version": "0.0.0-experimental-9e5da5b0",
"version": "0.0.0-experimental-a04f3d18",
"license": "MIT",

@@ -17,11 +17,11 @@ "main": "./index.js",

"dependencies": {
"@remix-run/server-runtime": "0.0.0-experimental-9e5da5b0"
"@remix-run/cloudflare": "0.0.0-experimental-a04f3d18"
},
"peerDependencies": {
"@cloudflare/workers-types": "^3.2.0"
"@cloudflare/workers-types": "^3.0.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^3.2.0",
"@cloudflare/workers-types": "^3.4.0",
"@types/mime": "^2.0.3"
}
}

@@ -8,3 +8,3 @@ # Welcome to Remix!

```sh
$ npx create-remix@latest
npx create-remix@latest
```

@@ -11,0 +11,0 @@

/// <reference types="@cloudflare/workers-types" />
import type { ServerBuild, AppLoadContext } from "@remix-run/server-runtime";
import type { AppLoadContext, ServerBuild } from "@remix-run/cloudflare";
/**
* A function that returns the value to use as `context` in route `loader` and
* `action` functions.
*
* You can think of this as an escape hatch that allows you to pass
* environment/platform-specific values through to your loader/action.
*/
export declare type GetLoadContextFunction<Env = any> = (context: EventContext<Env, any, any>) => AppLoadContext;
export declare type RequestHandler<Env = any> = PagesFunction<Env>;
export interface createPagesFunctionHandlerParams<Env = any> {
build: ServerBuild;
getLoadContext?: (context: EventContext<Env, any, any>) => AppLoadContext;
getLoadContext?: GetLoadContextFunction<Env>;
mode?: string;
}
export declare function createRequestHandler<Env = any>({ build, getLoadContext, mode, }: createPagesFunctionHandlerParams<Env>): PagesFunction<Env>;
export declare function createRequestHandler<Env = any>({ build, getLoadContext, mode, }: createPagesFunctionHandlerParams<Env>): RequestHandler<Env>;
export declare function createPagesFunctionHandler<Env = any>({ build, getLoadContext, mode, }: createPagesFunctionHandlerParams<Env>): (context: EventContext<Env, any, any>) => Promise<Response>;
/**
* @remix-run/cloudflare-pages v0.0.0-experimental-9e5da5b0
* @remix-run/cloudflare-pages v0.0.0-experimental-a04f3d18
*

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

var serverRuntime = require('@remix-run/server-runtime');
var cloudflare = require('@remix-run/cloudflare');
/**
* A function that returns the value to use as `context` in route `loader` and
* `action` functions.
*
* You can think of this as an escape hatch that allows you to pass
* environment/platform-specific values through to your loader/action.
*/
function createRequestHandler({

@@ -23,4 +31,3 @@ build,

}) {
let platform = {};
let handleRequest = serverRuntime.createRequestHandler(build, platform, mode);
let handleRequest = cloudflare.createRequestHandler(build, mode);
return context => {

@@ -36,3 +43,3 @@ let loadContext = typeof getLoadContext === "function" ? getLoadContext(context) : undefined;

}) {
const handleRequest = createRequestHandler({
let handleRequest = createRequestHandler({
build,

@@ -43,3 +50,3 @@ getLoadContext,

const handleFetch = async context => {
let handleFetch = async context => {
let response; // https://github.com/cloudflare/wrangler2/issues/117

@@ -46,0 +53,0 @@

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