@alemonjs/bubble 2.1.7 → 2.1.8

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.
package/lib/config.d.ts CHANGED
@@ -14,4 +14,4 @@ export declare const platform = "bubble";
14
14
  export declare const getBubbleConfig: () => Options & {
15
15
  [key: string]: any;
16
16
  };
17
- export declare const getMaster: (UserId: string) => boolean;
17
+ export declare const getMaster: (UserId: string) => readonly [boolean, string];
package/lib/config.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isMaster, getConfigValue } from 'alemonjs';
1
+ import { isMaster, createUserHashKey, getConfigValue } from 'alemonjs';
2
2
  import { GATEWAY_URL, API_URL, CDN_URL } from './sdk/api.js';
3
3
 
4
4
  const platform = 'bubble';
@@ -20,7 +20,12 @@ const getBubbleConfig = () => {
20
20
  return config;
21
21
  };
22
22
  const getMaster = (UserId) => {
23
- return isMaster(UserId, platform);
23
+ const isMasterUser = isMaster(UserId, platform);
24
+ const UserKey = createUserHashKey({
25
+ Platform: platform,
26
+ UserId
27
+ });
28
+ return [isMasterUser, UserKey];
24
29
  };
25
30
 
26
31
  export { getBubbleConfig, getMaster, platform };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/bubble",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "bubble platform",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -62,5 +62,5 @@
62
62
  "type": "git",
63
63
  "url": "https://github.com/lemonade-lab/alemonjs.git"
64
64
  },
65
- "gitHead": "e50477125586204c6e56a8ecfe3391136f5fe74b"
65
+ "gitHead": "8cee61f217e7e72eebc4342513e32232da05167a"
66
66
  }