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

webdetta

Package Overview
Dependencies
Maintainers
0
Versions
479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdetta - npm Package Compare versions

Comparing version 0.0.60 to 0.0.61

src/sdk/client.js

2

package.json
{
"name": "webdetta",
"version": "0.0.60",
"version": "0.0.61",
"author": "Fedot Kriutchenko <fodyadev@gmail.com>",

@@ -5,0 +5,0 @@ "description": "",

import { safe } from '../common/func.js';
import { Api } from '../sdk/api.js';
import { SdkServer } from '../sdk/index.js';
import { Api } from '../sdk/common.js';
import { SdkServer } from '../sdk/server.js';
import bytes from 'bytes';

@@ -9,2 +9,3 @@ import express from 'express';

import http from 'http';
import https from 'https';
import httpProxy from 'http-proxy';

@@ -27,6 +28,7 @@ import WSS from './wss.js';

const Server = () => {
let isSecure = false;
const Server = (options={}) => {
const isSecure = ['key', 'cert', 'pfx'].some(k => k in options);
const app = express();
const server = http.createServer(app);
const server = (isSecure ? https : http).createServer(options, app);
const proxy = httpProxy.createProxyServer({ ws: true });

@@ -49,3 +51,3 @@ const wss = WSS({ server });

httpApi: (path, methods) => {
httpPostApi: (path, methods) => {
path = path.replace(/\/$/, '') + '/:name';

@@ -86,3 +88,3 @@ const api = Api.HTTP(methods);

const { serverMethods, clientCode } = SdkServer(methods);
const handler = SdkServer.httpHandler({ isSecure, clientCode })
const handler = SdkServer.clientCodeGetHandler({ isSecure, clientCode });
instance.httpHandler.get(path, handler);

@@ -89,0 +91,0 @@ instance.wsApi(path, serverMethods);

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