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

@squared-functions/core

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squared-functions/core - npm Package Compare versions

Comparing version 3.1.5 to 3.2.0

39

index.js

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

/* @squared-functions/core 3.1.5
/* @squared-functions/core 3.2.0
https://github.com/anpham6/squared-functions */

@@ -7,4 +7,7 @@

exports.Module = exports.Host = void 0;
const types_1 = require("../types");
const module_1 = require("../module");
exports.Module = module_1.default;
const permission_1 = require("../file-manager/permission");
let PERMISSION = null;
class Host extends module_1.default {

@@ -17,2 +20,35 @@ constructor() {

}
static loadSettings(settings, permission) {
super.loadSettings(settings);
if (permission && (0, types_1.isPlainObject)(settings.permission)) {
const { disk_read, disk_write, unc_read, unc_write } = settings.permission;
PERMISSION = new permission_1.default();
if (permission.disk_read) {
PERMISSION.setDiskRead(disk_read);
}
if (permission.disk_write) {
PERMISSION.setDiskWrite(disk_write);
}
if (permission.unc_read) {
PERMISSION.setUNCRead(unc_read);
}
if (permission.unc_write) {
PERMISSION.setUNCWrite(unc_write);
}
Object.freeze(PERMISSION);
}
}
static createPermission(accessAll) {
const permission = new permission_1.default();
if (accessAll) {
permission.setDiskRead('**');
permission.setDiskWrite('**');
permission.setUNCRead('**');
permission.setUNCWrite('**');
}
return permission;
}
static getPermissionFromSettings() {
return PERMISSION;
}
restart(...args) { }

@@ -73,2 +109,3 @@ find(name) {

exports.Host = Host;
Object.freeze(PERMISSION = Host.createPermission(true));
if (typeof module !== 'undefined') {

@@ -75,0 +112,0 @@ module.exports = { Module: module_1.default, Host };

6

package.json
{
"name": "@squared-functions/core",
"version": "3.1.5",
"version": "3.2.0",
"description": "Core modules for squared-functions",

@@ -18,6 +18,6 @@ "main": "index.js",

"dependencies": {
"@squared-functions/module": "3.1.5",
"@squared-functions/types": "3.1.5",
"@squared-functions/module": "3.2.0",
"@squared-functions/types": "3.2.0",
"uuid": "^8.3.2"
}
}
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