@abtnode/constant 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +22 -4
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -56,6 +56,12 @@ const RBAC_CONFIG = {
56
56
  passport: true,
57
57
  ci: true,
58
58
  },
59
+ {
60
+ name: 'blocklet',
61
+ title: 'Blocklet',
62
+ // passport: true, // TODO enable this when we support access key for manage single blocklet
63
+ ci: true, // do not issue this passport to human
64
+ },
59
65
  {
60
66
  name: NODE_SERVICES.AUTH_SERVICE,
61
67
  title: 'Auth Service',
@@ -95,6 +101,10 @@ const RBAC_CONFIG = {
95
101
  name: 'mutate_team',
96
102
  description: 'Manage team data(members/roles/permissions) for Blocklet Server and blocklets',
97
103
  },
104
+ {
105
+ name: 'manage_blocklet',
106
+ description: 'Manage a single blocklet',
107
+ },
98
108
  {
99
109
  name: 'query_blocklet',
100
110
  description: 'View store and installed blocklets, including blocklet runtime configuration, domains and urls',
@@ -160,6 +170,7 @@ const RBAC_CONFIG = {
160
170
  '@abtnode/auth-service': ['query_team', 'mutate_team'],
161
171
  ci: ['query_blocklet', 'mutate_blocklet'],
162
172
  certificate: ['query_certificate', 'mutate_certificate'],
173
+ blocklet: ['query_team', 'mutate_team', 'manage_blocklet'],
163
174
  }),
164
175
  };
165
176
 
@@ -179,6 +190,12 @@ const EVENTS = {
179
190
  USER_UPDATED: 'user.updated',
180
191
  };
181
192
 
193
+ const WHO_CAN_ACCESS = {
194
+ OWNER: 'owner',
195
+ INVITED: 'invited',
196
+ ALL: 'all',
197
+ };
198
+
182
199
  module.exports = Object.freeze({
183
200
  // Blocklet Server
184
201
  NODE_MODES: Object.freeze({
@@ -274,11 +291,10 @@ module.exports = Object.freeze({
274
291
 
275
292
  // Time and dates
276
293
  DAY_IN_MS,
277
- DAEMON_MAX_MEM_LIMIT_IN_MB: 600,
278
- PROXY_MAX_MEM_LIMIT_IN_MB: 300,
294
+ DAEMON_MAX_MEM_LIMIT_IN_MB: 800,
295
+ PROXY_MAX_MEM_LIMIT_IN_MB: 800,
279
296
  BLOCKLET_MAX_MEM_LIMIT_IN_MB: 300,
280
- CERTIFICATE_EXPIRES_OFFSET: 8 * DAY_IN_MS,
281
- CERTIFICATE_EXPIRES_WARNING_OFFSET: 7 * DAY_IN_MS,
297
+ CERTIFICATE_EXPIRES_OFFSET: 10 * DAY_IN_MS,
282
298
  ROUTING_RULE_TYPES: Object.freeze({
283
299
  NONE: 'none',
284
300
  DAEMON: 'daemon',
@@ -306,4 +322,6 @@ module.exports = Object.freeze({
306
322
 
307
323
  // EVENTS
308
324
  EVENTS,
325
+
326
+ WHO_CAN_ACCESS,
309
327
  });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.7.0",
6
+ "version": "1.7.1",
7
7
  "description": "ABT Node constants",
8
8
  "main": "index.js",
9
9
  "files": [
@@ -20,5 +20,5 @@
20
20
  "devDependencies": {
21
21
  "jest": "^27.4.5"
22
22
  },
23
- "gitHead": "fc949a5e8a1017fbe17533d3bd78b166c7dad132"
23
+ "gitHead": "5d7efb21dd09f90206251fb74601ca37b0ef84bf"
24
24
  }