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

framework222

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framework222 - npm Package Compare versions

Comparing version 1.0.33 to 1.0.34

src/client/component.tsx

24

dist/client/framework.d.ts
declare module "framework.client" {
export module FW {
class FrameworkClient {
private static _instance;
components: any;
socket: any;
constructor();
static getInstance(): FrameworkClient;
}
export class FrameworkClient {
private static _instance;
components: any;
socket: any;
constructor();
static getInstance(): FrameworkClient;
}
var g: FW.FrameworkClient;
export default g;
}
declare module "component.client" {
import * as React from 'react';
export module FW {
class ComponentClient<P, S> extends React.Component<P, S> {
constructor(props: any);
emit(message: string, data: any, component?: string): void;
}
export class ComponentClient<P, S> extends React.Component<P, S> {
constructor(props: any);
emit(message: string, data: any, component?: string): void;
}
}

@@ -14,39 +14,35 @@ var __extends = (this && this.__extends) || (function () {

Object.defineProperty(exports, "__esModule", { value: true });
var FW;
(function (FW) {
var FrameworkClient = (function () {
function FrameworkClient() {
if (FrameworkClient._instance) {
throw new Error("The Global is a singleton class and cannot be created!");
}
FrameworkClient._instance = this;
this.components = {};
this.socket = io.connect();
var onevent = this.socket.onevent;
this.socket.onevent = function (packet) {
var args = packet.data || [];
onevent.call(this, packet);
packet.data = ["*"].concat(args);
onevent.call(this, packet);
};
this.socket.on("*", function (message, data) {
var splittedMessage = message.split(':');
var component = splittedMessage[0];
var method = splittedMessage[1];
var componentInstance = this.components[component];
if (componentInstance != null) {
componentInstance[method](data);
}
}.bind(this));
var FrameworkClient = (function () {
function FrameworkClient() {
if (FrameworkClient._instance) {
throw new Error("The Global is a singleton class and cannot be created!");
}
FrameworkClient.getInstance = function () {
return FrameworkClient._instance;
FrameworkClient._instance = this;
this.components = {};
this.socket = io.connect();
var onevent = this.socket.onevent;
this.socket.onevent = function (packet) {
var args = packet.data || [];
onevent.call(this, packet);
packet.data = ["*"].concat(args);
onevent.call(this, packet);
};
FrameworkClient._instance = new FrameworkClient();
return FrameworkClient;
}());
FW.FrameworkClient = FrameworkClient;
})(FW = exports.FW || (exports.FW = {}));
var g = FW.FrameworkClient.getInstance();
exports.default = g;
this.socket.on("*", function (message, data) {
var splittedMessage = message.split(':');
var component = splittedMessage[0];
var method = splittedMessage[1];
var componentInstance = this.components[component];
if (componentInstance != null) {
componentInstance[method](data);
}
}.bind(this));
}
FrameworkClient.getInstance = function () {
return FrameworkClient._instance;
};
FrameworkClient._instance = new FrameworkClient();
return FrameworkClient;
}());
exports.FrameworkClient = FrameworkClient;
var g = FrameworkClient.getInstance();
});

@@ -56,16 +52,13 @@ define("component.client", ["require", "exports", "framework.client", "react"], function (require, exports, framework_client_1, React) {

Object.defineProperty(exports, "__esModule", { value: true });
var FW;
(function (FW) {
var ComponentClient = (function (_super) {
__extends(ComponentClient, _super);
function ComponentClient(props) {
return _super.call(this, props) || this;
}
ComponentClient.prototype.emit = function (message, data, component) {
framework_client_1.default.socket.emit(message, data);
};
return ComponentClient;
}(React.Component));
FW.ComponentClient = ComponentClient;
})(FW = exports.FW || (exports.FW = {}));
var ComponentClient = (function (_super) {
__extends(ComponentClient, _super);
function ComponentClient(props) {
return _super.call(this, props) || this;
}
ComponentClient.prototype.emit = function (message, data, component) {
framework_client_1.default.socket.emit(message, data);
};
return ComponentClient;
}(React.Component));
exports.ComponentClient = ComponentClient;
});
export * from './server/framework.server';
export * from './server/component.server';
import * as a from './client/framework';
export * from a.client
/// reference path='./client/framework';
import * as m from "framework.client";
import * as m2 from "component.client";
{
"name": "framework222",
"version": "1.0.33",
"version": "1.0.34",
"description": "framework",

@@ -5,0 +5,0 @@ "main": "dist/server/framework.server.js",

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