@remix-run/cloudflare 1.3.3 → 1.3.5-pre.1

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/crypto.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { SignFunction, UnsignFunction } from "@remix-run/server-runtime";
2
+ export declare const sign: SignFunction;
3
+ export declare const unsign: UnsignFunction;
package/crypto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/cloudflare v1.3.3
2
+ * @remix-run/cloudflare v1.3.5-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/globals.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export {};
2
+ declare global {
3
+ interface ProcessEnv {
4
+ NODE_ENV: "development" | "production" | "test";
5
+ }
6
+ interface WorkerGlobalScope {
7
+ process: {
8
+ env: ProcessEnv;
9
+ };
10
+ }
11
+ }
@@ -0,0 +1,4 @@
1
+ export declare const createCookie: import("@remix-run/server-runtime").CreateCookieFunction;
2
+ export declare const createCookieSessionStorage: import("@remix-run/server-runtime").CreateCookieSessionStorageFunction;
3
+ export declare const createSessionStorage: import("@remix-run/server-runtime").CreateSessionStorageFunction;
4
+ export declare const createMemorySessionStorage: import("@remix-run/server-runtime").CreateMemorySessionStorageFunction;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/cloudflare v1.3.3
2
+ * @remix-run/cloudflare v1.3.5-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import "./globals";
2
+ export { createCloudflareKVSessionStorage } from "./sessions/cloudflareKVSessionStorage";
3
+ export { createCookie, createCookieSessionStorage, createMemorySessionStorage, createSessionStorage, } from "./implementations";
4
+ export { createRequestHandler, createSession, isCookie, isSession, json, redirect, } from "@remix-run/server-runtime";
5
+ export type { ActionFunction, AppData, AppLoadContext, CreateRequestHandlerFunction, Cookie, CookieOptions, CookieParseOptions, CookieSerializeOptions, CookieSignatureOptions, DataFunctionArgs, EntryContext, ErrorBoundaryComponent, HandleDataRequestFunction, HandleDocumentRequestFunction, HeadersFunction, HtmlLinkDescriptor, HtmlMetaDescriptor, LinkDescriptor, LinksFunction, LoaderFunction, MetaDescriptor, MetaFunction, PageLinkDescriptor, RequestHandler, RouteComponent, RouteHandle, ServerBuild, ServerEntryModule, Session, SessionData, SessionIdStorageStrategy, SessionStorage, } from "@remix-run/server-runtime";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/cloudflare v1.3.3
2
+ * @remix-run/cloudflare v1.3.5-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/cloudflare v1.3.3
2
+ * @remix-run/cloudflare v1.3.5-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -0,0 +1 @@
1
+ export { createCloudflareKVSessionStorage, createCookie, createSessionStorage, createCookieSessionStorage, createMemorySessionStorage, } from "@remix-run/cloudflare";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/cloudflare v1.3.3
2
+ * @remix-run/cloudflare v1.3.5-pre.1
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/cloudflare",
3
3
  "description": "Cloudflare platform abstractions for Remix",
4
- "version": "1.3.3",
4
+ "version": "1.3.5-pre.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -13,12 +13,12 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@cloudflare/kv-asset-handler": "^0.1.3",
16
- "@remix-run/server-runtime": "1.3.3"
16
+ "@remix-run/server-runtime": "1.3.5-pre.1"
17
17
  },
18
18
  "peerDependencies": {
19
- "@cloudflare/workers-types": "^2.2.2"
19
+ "@cloudflare/workers-types": "^2.0.0 || ^3.0.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@cloudflare/workers-types": "^2.2.2"
22
+ "@cloudflare/workers-types": "^3.4.0"
23
23
  }
24
24
  }
@@ -0,0 +1,21 @@
1
+ /// <reference types="@cloudflare/workers-types" />
2
+ import type { SessionStorage, SessionIdStorageStrategy } from "@remix-run/server-runtime";
3
+ interface CloudflareKVSessionStorageOptions {
4
+ /**
5
+ * The Cookie used to store the session id on the client, or options used
6
+ * to automatically create one.
7
+ */
8
+ cookie?: SessionIdStorageStrategy["cookie"];
9
+ /**
10
+ * The KVNamespace used to store the sessions.
11
+ */
12
+ kv: KVNamespace;
13
+ }
14
+ /**
15
+ * Creates a SessionStorage that stores session data in the Clouldflare KV Store.
16
+ *
17
+ * The advantage of using this instead of cookie session storage is that
18
+ * KV Store may contain much more data than cookies.
19
+ */
20
+ export declare function createCloudflareKVSessionStorage({ cookie, kv, }: CloudflareKVSessionStorageOptions): SessionStorage;
21
+ export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/cloudflare v1.3.3
2
+ * @remix-run/cloudflare v1.3.5-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *