@gbraver-burst-network/browser-sdk 1.14.0 → 1.15.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.
@@ -79,9 +79,9 @@ class BrowserSDKImpl {
79
79
  /** @override */
80
80
  getUserName() {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
- var _a;
82
+ var _a, _b;
83
83
  const userAttributes = yield (0, auth_1.fetchUserAttributes)();
84
- return (_a = userAttributes === null || userAttributes === void 0 ? void 0 : userAttributes.preferred_username) !== null && _a !== void 0 ? _a : "";
84
+ return (_b = (_a = userAttributes.preferred_username) !== null && _a !== void 0 ? _a : userAttributes.email) !== null && _b !== void 0 ? _b : "";
85
85
  });
86
86
  }
87
87
  /** @override */
@@ -89,7 +89,7 @@ class BrowserSDKImpl {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
90
  var _a;
91
91
  const userAttributes = yield (0, auth_1.fetchUserAttributes)();
92
- return (_a = userAttributes === null || userAttributes === void 0 ? void 0 : userAttributes.picture) !== null && _a !== void 0 ? _a : "";
92
+ return (_a = userAttributes.picture) !== null && _a !== void 0 ? _a : null;
93
93
  });
94
94
  }
95
95
  /** @override */
@@ -97,7 +97,7 @@ class BrowserSDKImpl {
97
97
  return __awaiter(this, void 0, void 0, function* () {
98
98
  var _a;
99
99
  const userAttributes = yield (0, auth_1.fetchUserAttributes)();
100
- return (_a = userAttributes === null || userAttributes === void 0 ? void 0 : userAttributes.email) !== null && _a !== void 0 ? _a : "";
100
+ return (_a = userAttributes.email) !== null && _a !== void 0 ? _a : "";
101
101
  });
102
102
  }
103
103
  /** @override */
@@ -10,9 +10,9 @@ export interface UserNameGet {
10
10
  export interface UserPictureGet {
11
11
  /**
12
12
  * ユーザ画像URLを取得する
13
- * @returns ユーザ画像URL
13
+ * @returns ユーザ画像URL、未設定の場合はnull
14
14
  */
15
- getUserPictureURL(): Promise<string>;
15
+ getUserPictureURL(): Promise<string | null>;
16
16
  }
17
17
  /** ユーザメールアドレス取得 */
18
18
  export interface UserMailGet {
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "@gbraver-burst-network/browser-sdk",
3
3
  "description": "gbraver burst browser sdk",
4
- "version": "1.14.0",
4
+ "version": "1.15.1",
5
5
  "author": "Y.Takeuchi",
6
6
  "bugs": {
7
7
  "url": "https://github.com/kaidouji85/gbraver-burst-network/issues",
8
8
  "email": "kaidouji85@gmail.com"
9
9
  },
10
10
  "dependencies": {
11
- "aws-amplify": "^6.3.8",
11
+ "aws-amplify": "^6.4.3",
12
12
  "gbraver-burst-core": "^1.31.1",
13
13
  "rxjs": "^7.8.1",
14
14
  "zod": "^3.23.8"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/jest": "^29.5.12",
18
- "dependency-cruiser": "^16.3.3",
18
+ "dependency-cruiser": "^16.3.10",
19
19
  "eslint": "^8.57.0",
20
20
  "eslint-plugin-jest": "^28.6.0",
21
- "eslint-plugin-simple-import-sort": "^12.1.0",
21
+ "eslint-plugin-simple-import-sort": "^12.1.1",
22
22
  "jest": "^29.7.0",
23
23
  "npm-run-all": "^4.1.5",
24
- "prettier": "3.3.2",
25
- "rimraf": "^5.0.7",
26
- "ts-jest": "^29.1.5",
27
- "typescript-eslint": "^7.14.1",
28
- "webpack": "^5.92.1",
24
+ "prettier": "3.3.3",
25
+ "rimraf": "^6.0.1",
26
+ "ts-jest": "^29.2.3",
27
+ "typescript-eslint": "^7.17.0",
28
+ "webpack": "^5.93.0",
29
29
  "webpack-cli": "^5.1.4"
30
30
  },
31
31
  "files": [