@technomoron/api-server-base 2.0.0-beta.1 → 2.0.0-beta.2

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.
@@ -126,7 +126,7 @@ class SequelizeOAuthStore extends base_js_1.OAuthStore {
126
126
  const existing = await this.clients.findByPk(input.clientId);
127
127
  const hashedSecret = input.clientSecret !== undefined && input.clientSecret !== null
128
128
  ? await bcryptjs_1.default.hash(input.clientSecret, this.bcryptRounds)
129
- : existing?.client_secret ?? '';
129
+ : (existing?.client_secret ?? '');
130
130
  const redirectUris = input.redirectUris ?? (existing ? decodeStringArray(existing.redirect_uris) : undefined);
131
131
  const scope = input.scope ?? (existing ? decodeStringArray(existing.scope) : undefined);
132
132
  const metadata = input.metadata ?? (existing ? parseMetadata(existing.metadata) : undefined);
@@ -35,7 +35,8 @@ class UserStore {
35
35
  toPublic(user) {
36
36
  const mapped = this.toPublicUser(user);
37
37
  if (mapped && typeof mapped === 'object') {
38
- const { password, ...rest } = mapped;
38
+ const { password: _password, ...rest } = mapped;
39
+ void _password;
39
40
  return rest;
40
41
  }
41
42
  return mapped;
@@ -116,7 +116,7 @@ export class SequelizeOAuthStore extends OAuthStore {
116
116
  const existing = await this.clients.findByPk(input.clientId);
117
117
  const hashedSecret = input.clientSecret !== undefined && input.clientSecret !== null
118
118
  ? await bcrypt.hash(input.clientSecret, this.bcryptRounds)
119
- : existing?.client_secret ?? '';
119
+ : (existing?.client_secret ?? '');
120
120
  const redirectUris = input.redirectUris ?? (existing ? decodeStringArray(existing.redirect_uris) : undefined);
121
121
  const scope = input.scope ?? (existing ? decodeStringArray(existing.scope) : undefined);
122
122
  const metadata = input.metadata ?? (existing ? parseMetadata(existing.metadata) : undefined);
@@ -29,7 +29,8 @@ export class UserStore {
29
29
  toPublic(user) {
30
30
  const mapped = this.toPublicUser(user);
31
31
  if (mapped && typeof mapped === 'object') {
32
- const { password, ...rest } = mapped;
32
+ const { password: _password, ...rest } = mapped;
33
+ void _password;
33
34
  return rest;
34
35
  }
35
36
  return mapped;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technomoron/api-server-base",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "Api Server Skeleton / Base Class",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.cjs",