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

remixd

Package Overview
Dependencies
Maintainers
4
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remixd - npm Package Compare versions

Comparing version 0.2.1-alpha.1 to 0.2.2-alpha.0

1

lib/bin/remixd.js

@@ -29,2 +29,3 @@ #!/usr/bin/env node

sharedFolderClient_1.setWebSocket(ws);
sharedFolderClient_1.setupNotifications(program.sharedFolder);
sharedFolderClient_1.sharedFolder(program.sharedFolder, program.readOnly || false);

@@ -31,0 +32,0 @@ });

10

lib/src/index.js
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var remixdClient_1 = require("./services/remixdClient");
var websocket_1 = require("./websocket");
var utils = require("./utils");
module.exports = {
Router: require('./router'),
utils: require('./utils'),
Websocket: websocket_1.default,
utils: utils,
services: {
sharedFolder: require('./services/sharedFolder')
sharedFolder: remixdClient_1.RemixdClient
}
};

@@ -21,2 +21,3 @@ import { PluginClient } from '@remixproject/plugin';

isFile(args: SharedFolderArgs): boolean;
setupNotifications(path: string): void;
}

@@ -19,4 +19,5 @@ "use strict";

var utils = require("../utils");
var chokidar = require("chokidar");
var fs = require("fs-extra");
var isbinaryfile = require('isbinaryfile');
var fs = require('fs-extra');
var RemixdClient = /** @class */ (function (_super) {

@@ -214,2 +215,35 @@ __extends(RemixdClient, _super);

};
RemixdClient.prototype.setupNotifications = function (path) {
var _this = this;
var absPath = utils.absolutePath('./', path);
if (!isRealPath(absPath))
return;
var watcher = chokidar.watch(path, { depth: 0, ignorePermissionErrors: true });
console.log('setup notifications for ' + path);
/* we can't listen on created file / folder
watcher.on('add', (f, stat) => {
isbinaryfile(f, (error, isBinary) => {
if (error) console.log(error)
console.log('add', f)
this.emit('created', { path: utils.relativePath(f, this.currentSharedFolder), isReadOnly: isBinary, isFolder: false })
})
})
watcher.on('addDir', (f, stat) => {
this.emit('created', { path: utils.relativePath(f, this.currentSharedFolder), isReadOnly: false, isFolder: true })
})
*/
watcher.on('change', function (f) {
if (_this.trackDownStreamUpdate[f]) {
delete _this.trackDownStreamUpdate[f];
return;
}
_this.emit('changed', utils.relativePath(f, _this.currentSharedFolder));
});
watcher.on('unlink', function (f) {
_this.emit('removed', utils.relativePath(f, _this.currentSharedFolder), false);
});
watcher.on('unlinkDir', function (f) {
_this.emit('removed', utils.relativePath(f, _this.currentSharedFolder), true);
});
};
return RemixdClient;

@@ -216,0 +250,0 @@ }(plugin_1.PluginClient));

{
"name": "remixd",
"version": "0.2.1-alpha.1",
"version": "0.2.2-alpha.0",
"description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)",

@@ -14,3 +14,3 @@ "main": "./lib/src/index.js",

"npip": "npip",
"lint": "eslint ./src --ext .ts",
"lint": "eslint ./src ./bin --ext .ts",
"build": "tsc -p ./ && chmod +x ./lib/bin/remixd.js",

@@ -38,8 +38,7 @@ "dev": "nodemon"

"@remixproject/plugin-ws": "0.3.0-alpha.1",
"chalk": "^4.0.0",
"chokidar": "^2.0.2",
"commander": "^2.20.3",
"fs-extra": "^3.0.1",
"isbinaryfile": "^3.0.2",
"ws": "^7.3.0"
"ws": "^7.3.0",
"chokidar": "^2.1.8",
"fs-extra": "^3.0.1"
},

@@ -53,2 +52,3 @@ "python": {

"devDependencies": {
"@types/fs-extra": "^9.0.1",
"@types/node": "^14.0.5",

@@ -55,0 +55,0 @@ "@types/ws": "^7.2.4",

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