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

elysia

Package Overview
Dependencies
Maintainers
1
Versions
442
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elysia - npm Package Compare versions

Comparing version 1.2.0-exp.30 to 1.2.0-exp.31

2

dist/cjs/ws/index.d.ts

@@ -73,2 +73,2 @@ import type { ServerWebSocket, ServerWebSocketSendStatus, BufferSource, WebSocketHandler } from './bun';

}
export {};
export type { WSLocalHook } from './types';

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

"use strict";var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var c=(s,e)=>{for(var i in e)o(s,i,{get:e[i],enumerable:!0})},f=(s,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of S(e))!h.call(s,r)&&r!==i&&o(s,r,{get:()=>e[r],enumerable:!(t=u(e,r))||t.enumerable});return s};var p=s=>f(o({},"__esModule",{value:!0}),s);var l={};c(l,{ElysiaWS:()=>d,websocket:()=>a});module.exports=p(l);var b=require("../utils"),n=require("../error");const a={open(s){s.data.open?.(s)},message(s,e){s.data.message?.(s,e)},drain(s){s.data.drain?.(s)},close(s,e,i){s.data.close?.(s,e,i)}};class d{constructor(e,i,t=void 0){this.raw=e;this.data=i;this.body=t;this.validator=e.data?.validator,e.data.id?this.id=e.data.id:this.id=(0,b.randomId)().toString(),this.sendText=e.sendText.bind(this),this.sendBinary=e.sendBinary.bind(this),this.close=e.close.bind(this),this.terminate=e.terminate.bind(this),this.publishText=e.publishText.bind(this),this.publishBinary=e.publishBinary.bind(this),this.subscribe=e.subscribe.bind(e),this.unsubscribe=e.unsubscribe.bind(e),this.isSubscribed=e.isSubscribed.bind(e),this.cork=e.cork.bind(e),this.remoteAddress=e.remoteAddress,this.binaryType=e.binaryType,this.data=e.data,this.send=this.send.bind(this),this.ping=this.ping.bind(this),this.pong=this.pong.bind(this),this.publish=this.publish.bind(this)}send(e,i){if(Buffer.isBuffer(e))return this.raw.send(e,i);if(this.validator?.Check(e)===!1)throw new n.ValidationError("message",this.validator,e);return typeof e=="object"&&(e=JSON.stringify(e)),this.raw.send(e,i)}ping(e){if(Buffer.isBuffer(e))return this.raw.ping(e);if(this.validator?.Check(e)===!1)throw new n.ValidationError("message",this.validator,e);return typeof e=="object"&&(e=JSON.stringify(e)),this.raw.ping(e)}pong(e){if(Buffer.isBuffer(e))return this.raw.pong(e);if(this.validator?.Check(e)===!1)throw new n.ValidationError("message",this.validator,e);return typeof e=="object"&&(e=JSON.stringify(e)),this.raw.pong(e)}publish(e,i,t){if(Buffer.isBuffer(i))return this.raw.publish(e,i,t);if(this.validator?.Check(i)===!1)throw new n.ValidationError("message",this.validator,i);return typeof i=="object"&&(i=JSON.stringify(i)),this.raw.publish(e,i,t)}get readyState(){return this.raw.readyState}}0&&(module.exports={ElysiaWS,websocket});
"use strict";var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var c=(s,e)=>{for(var t in e)o(s,t,{get:e[t],enumerable:!0})},f=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of S(e))!h.call(s,r)&&r!==t&&o(s,r,{get:()=>e[r],enumerable:!(i=u(e,r))||i.enumerable});return s};var p=s=>f(o({},"__esModule",{value:!0}),s);var l={};c(l,{ElysiaWS:()=>d,websocket:()=>a});module.exports=p(l);var b=require("../utils"),n=require("../error");const a={open(s){s.data.open?.(s)},message(s,e){s.data.message?.(s,e)},drain(s){s.data.drain?.(s)},close(s,e,t){s.data.close?.(s,e,t)}};class d{constructor(e,t,i=void 0){this.raw=e;this.data=t;this.body=i;this.validator=e.data?.validator,e.data.id?this.id=e.data.id:this.id=(0,b.randomId)().toString(),this.sendText=e.sendText.bind(this),this.sendBinary=e.sendBinary.bind(this),this.close=e.close.bind(this),this.terminate=e.terminate.bind(this),this.publishText=e.publishText.bind(this),this.publishBinary=e.publishBinary.bind(this),this.subscribe=e.subscribe.bind(e),this.unsubscribe=e.unsubscribe.bind(e),this.isSubscribed=e.isSubscribed.bind(e),this.cork=e.cork.bind(e),this.remoteAddress=e.remoteAddress,this.binaryType=e.binaryType,this.data=e.data,this.send=this.send.bind(this),this.ping=this.ping.bind(this),this.pong=this.pong.bind(this),this.publish=this.publish.bind(this)}send(e,t){if(Buffer.isBuffer(e))return this.raw.send(e,t);if(this.validator?.Check(e)===!1)throw new n.ValidationError("message",this.validator,e);return typeof e=="object"&&(e=JSON.stringify(e)),this.raw.send(e,t)}ping(e){if(Buffer.isBuffer(e))return this.raw.ping(e);if(this.validator?.Check(e)===!1)throw new n.ValidationError("message",this.validator,e);return typeof e=="object"&&(e=JSON.stringify(e)),this.raw.ping(e)}pong(e){if(Buffer.isBuffer(e))return this.raw.pong(e);if(this.validator?.Check(e)===!1)throw new n.ValidationError("message",this.validator,e);return typeof e=="object"&&(e=JSON.stringify(e)),this.raw.pong(e)}publish(e,t,i){if(Buffer.isBuffer(t))return this.raw.publish(e,t,i);if(this.validator?.Check(t)===!1)throw new n.ValidationError("message",this.validator,t);return typeof t=="object"&&(t=JSON.stringify(t)),this.raw.publish(e,t,i)}get readyState(){return this.raw.readyState}}0&&(module.exports={ElysiaWS,websocket});

@@ -73,2 +73,2 @@ import type { ServerWebSocket, ServerWebSocketSendStatus, BufferSource, WebSocketHandler } from './bun';

}
export {};
export type { WSLocalHook } from './types';
{
"name": "elysia",
"description": "Ergonomic Framework for Human",
"version": "1.2.0-exp.30",
"version": "1.2.0-exp.31",
"author": {

@@ -6,0 +6,0 @@ "name": "saltyAom",

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