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

@friendsofshopware/app-server-sdk-hono

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@friendsofshopware/app-server-sdk-hono - npm Package Compare versions

Comparing version 0.0.34 to 0.0.35

8

esm/mod.js

@@ -23,2 +23,3 @@ import { HTTPException } from "hono/http-exception";

}
// @ts-ignore
ctx.set("app", app);

@@ -28,2 +29,3 @@ await next();

hono.use(cfg.appPath, async (ctx, next) => {
// @ts-ignore
const app = ctx.get("app");

@@ -46,10 +48,13 @@ // Don't validate signature for registration

}
// @ts-ignore
ctx.set("shop", context.shop);
// @ts-ignore
ctx.set("context", context);
await next();
const cloned = ctx.res.clone();
await ctx.get("app").signer.signResponse(cloned, ctx.get("shop").getShopSecret());
await app.signer.signResponse(cloned, context.shop.getShopSecret());
ctx.header("shopware-app-signature", cloned.headers.get("shopware-app-signature"));
});
hono.get(cfg.registrationUrl, async (ctx) => {
// @ts-ignore
const app = ctx.get("app");

@@ -66,2 +71,3 @@ try {

hono.post(cfg.registerConfirmationUrl, async (ctx) => {
// @ts-ignore
const app = ctx.get("app");

@@ -68,0 +74,0 @@ try {

2

package.json

@@ -5,3 +5,3 @@ {

"name": "@friendsofshopware/app-server-sdk-hono",
"version": "0.0.34",
"version": "0.0.35",
"description": "Hono Integration for Shopware App Server SDK",

@@ -8,0 +8,0 @@ "license": "MIT",

import type { Context as HonoContext, Hono } from "hono";
import { AppServer, Context, ShopInterface, ShopRepositoryInterface } from "@friendsofshopware/app-server-sdk";
import { ShopRepositoryInterface } from "@friendsofshopware/app-server-sdk";
interface MiddlewareConfig {

@@ -12,10 +12,3 @@ appName: string;

}
type Variables = {
app: AppServer;
shop: ShopInterface;
context: Context;
};
export declare function configureAppServer(hono: Hono<{
Variables: Variables;
}>, cfg: MiddlewareConfig): void;
export declare function configureAppServer(hono: Hono, cfg: MiddlewareConfig): void;
export {};
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