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

@abtnode/util

Package Overview
Dependencies
Maintainers
3
Versions
786
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtnode/util - npm Package Compare versions

Comparing version 1.1.15 to 1.1.16

112

lib/constants.js

@@ -8,27 +8,86 @@ const ROLES = Object.freeze({

const PERMISSIONS = Object.freeze({
session: ['query'],
webhook: ['query', 'mutate'],
notification: ['query', 'mutate'],
router: ['query', 'mutate'],
blocklet: ['query', 'mutate'],
node: ['query', 'mutate'],
team: ['query', 'mutate'],
});
const RBAC_CONFIG = {
roles: Object.freeze([
{
name: 'owner',
title: 'Owner',
},
{
name: 'admin',
title: 'Admin',
},
{
name: 'member',
title: 'Member',
},
{
name: 'guest',
title: 'Guest',
},
]),
permissions: Object.freeze([
{
name: 'query_node',
description: 'View dashboard, logs, and node settings',
},
{
name: 'mutate_node',
description: 'Update node settings',
},
{
name: 'query_team',
description: 'View members of node and blocklet',
},
{
name: 'mutate_team',
description: 'Manage members of node and blocklet',
},
{
name: 'query_blocklet',
description: 'View blocklets and marketplace',
},
{
name: 'mutate_blocklet',
description: 'Manage blocklets and marketplace',
},
{
name: 'query_router',
description: 'View service gateway and certificates',
},
{
name: 'mutate_router',
description: 'Manage service gateway and certificates',
},
{
name: 'query_notification',
description: 'View notifications',
},
{
name: 'mutate_notification',
description: 'Manage notifications',
},
{
name: 'query_webhook',
description: 'View webhooks',
},
{
name: 'mutate_webhook',
description: 'Manage webhooks',
},
]),
grants: Object.freeze({
[ROLES.GUEST]: [
'query_blocklet',
'query_router',
'query_webhook',
'query_notification',
'query_team',
'query_node',
],
[ROLES.MEMBER]: [ROLES.GUEST, 'mutate_blocklet', 'mutate_router', 'mutate_webhook', 'mutate_notification'],
[ROLES.ADMIN]: [ROLES.MEMBER, 'mutate_team', 'mutate_node'],
[ROLES.OWNER]: [ROLES.ADMIN],
}),
};
const GRANTS = Object.freeze({
[ROLES.GUEST]: [
'query_blocklet',
'query_router',
'query_webhook',
'query_notification',
'query_team',
'query_node',
'query_session',
],
[ROLES.MEMBER]: [ROLES.GUEST, 'mutate_blocklet', 'mutate_router', 'mutate_webhook', 'mutate_notification'],
[ROLES.ADMIN]: [ROLES.MEMBER, 'mutate_team', 'mutate_node'],
[ROLES.OWNER]: [ROLES.ADMIN],
});
const DAY_IN_MS = 24 * 60 * 60 * 1000;

@@ -66,3 +125,3 @@

WEB_WALLET_URL: 'https://web.abtwallet.io',
BLOCKLET_REGISTRY_URL: 'https://blocklet.arcblock.io',
BLOCKLET_REGISTRY_URL: 'https://booster.registry.arcblock.io',

@@ -119,4 +178,3 @@ DEFAULT_DASHBOARD_DOMAIN: '*.ip.abtnet.io',

ROLES,
PERMISSIONS,
GRANTS,
RBAC_CONFIG,

@@ -123,0 +181,0 @@ // Service

@@ -38,2 +38,3 @@ const fs = require('fs');

cancelToken: source.token,
timeout,
});

@@ -51,2 +52,6 @@ clearTimeout(timer);

if (response.data.complete === false) {
throw new Error('download incomplete');
}
return dest;

@@ -53,0 +58,0 @@ }, timeout);

@@ -6,3 +6,3 @@ {

},
"version": "1.1.15",
"version": "1.1.16",
"description": "ArcBlock's JavaScript utility",

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

},
"gitHead": "6203bb41fb2bed9b5dcfcfa3b14823b171f2b54b"
"gitHead": "87e7a2475cac5e9fec60ad153459771164d5a419"
}
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