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

@shopify/remix-oxygen

Package Overview
Dependencies
Maintainers
24
Versions
797
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/remix-oxygen - npm Package Compare versions

Comparing version 0.0.0-next-ab45234-20230412073308 to 0.0.0-next-b9ab8eb-20230605223347

7

dist/development/index.js

@@ -54,2 +54,3 @@ import { createCookieFactory, createCookieSessionStorageFactory, createSessionStorageFactory, createMemorySessionStorageFactory, createRequestHandler as createRequestHandler$1 } from '@remix-run/server-runtime';

mode,
poweredByHeader = true,
getLoadContext

@@ -59,6 +60,10 @@ }) {

return async (request) => {
return handleRequest(
const response = await handleRequest(
request,
await getLoadContext?.(request)
);
if (poweredByHeader) {
response.headers.append("powered-by", "Shopify, Hydrogen");
}
return response;
};

@@ -65,0 +70,0 @@ }

3

dist/production/index.d.ts

@@ -10,5 +10,6 @@ import * as _remix_run_server_runtime from '@remix-run/server-runtime';

declare function createRequestHandler<Context = unknown>({ build, mode, getLoadContext, }: {
declare function createRequestHandler<Context = unknown>({ build, mode, poweredByHeader, getLoadContext, }: {
build: ServerBuild;
mode?: string;
poweredByHeader?: boolean;
getLoadContext?: (request: Request) => Promise<Context> | Context;

@@ -15,0 +16,0 @@ }): (request: Request) => Promise<Response>;

import { createCookieFactory, createCookieSessionStorageFactory, createSessionStorageFactory, createMemorySessionStorageFactory, createRequestHandler } from '@remix-run/server-runtime';
export { MaxPartSizeExceededError, createSession, defer, isCookie, isSession, json, redirect, unstable_composeUploadHandlers, unstable_createMemoryUploadHandler, unstable_parseMultipartFormData } from '@remix-run/server-runtime';
var s=new TextEncoder,c=async(e,t)=>{let r=await p(t,["sign"]),o=s.encode(e),n=await crypto.subtle.sign("HMAC",r,o),a=btoa(String.fromCharCode(...new Uint8Array(n))).replace(/=+$/,"");return e+"."+a},u=async(e,t)=>{let r=e.lastIndexOf("."),o=e.slice(0,r),n=e.slice(r+1),a=await p(t,["verify"]),l=s.encode(o),g=y(atob(n));return await crypto.subtle.verify("HMAC",a,g,l)?o:!1};async function p(e,t){return await crypto.subtle.importKey("raw",s.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t)}function y(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}var i=createCookieFactory({sign:c,unsign:u}),f=createCookieSessionStorageFactory(i),d=createSessionStorageFactory(i),H=createMemorySessionStorageFactory(d);function F({build:e,mode:t,getLoadContext:r}){let o=createRequestHandler(e,t);return async n=>o(n,await r?.(n))}function M(e){return e.headers.get("oxygen-buyer-ip")??void 0}function A(e){let t=e.headers;return {requestGroupId:t.get("request-id"),buyerIp:t.get("oxygen-buyer-ip"),cookie:t.get("cookie")}}
var i=new TextEncoder,u=async(e,t)=>{let r=await d(t,["sign"]),o=i.encode(e),a=await crypto.subtle.sign("HMAC",r,o),n=btoa(String.fromCharCode(...new Uint8Array(a))).replace(/=+$/,"");return e+"."+n},p=async(e,t)=>{let r=e.lastIndexOf("."),o=e.slice(0,r),a=e.slice(r+1),n=await d(t,["verify"]),s=i.encode(o),y=g(atob(a));return await crypto.subtle.verify("HMAC",n,y,s)?o:!1};async function d(e,t){return await crypto.subtle.importKey("raw",i.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t)}function g(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}var c=createCookieFactory({sign:u,unsign:p}),f=createCookieSessionStorageFactory(c),l=createSessionStorageFactory(c),H=createMemorySessionStorageFactory(l);function F({build:e,mode:t,poweredByHeader:r=!0,getLoadContext:o}){let a=createRequestHandler(e,t);return async n=>{let s=await a(n,await o?.(n));return r&&s.headers.append("powered-by","Shopify, Hydrogen"),s}}function M(e){return e.headers.get("oxygen-buyer-ip")??void 0}function A(e){let t=e.headers;return {requestGroupId:t.get("request-id"),buyerIp:t.get("oxygen-buyer-ip"),cookie:t.get("cookie")}}
export { i as createCookie, f as createCookieSessionStorage, H as createMemorySessionStorage, F as createRequestHandler, d as createSessionStorage, M as getBuyerIp, A as getStorefrontHeaders };
export { c as createCookie, f as createCookieSessionStorage, H as createMemorySessionStorage, F as createRequestHandler, l as createSessionStorage, M as getBuyerIp, A as getStorefrontHeaders };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.js.map

@@ -8,4 +8,4 @@ {

"type": "module",
"version": "0.0.0-next-ab45234-20230412073308",
"license": "SEE LICENSE IN LICENSE.md",
"version": "0.0.0-next-b9ab8eb-20230605223347",
"license": "MIT",
"main": "dist/index.cjs",

@@ -12,0 +12,0 @@ "module": "dist/production/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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