@things-factory/auth-base 7.1.17 → 7.1.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-base",
3
- "version": "7.1.17",
3
+ "version": "7.1.19",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -46,5 +46,5 @@
46
46
  "passport-jwt": "^4.0.0",
47
47
  "passport-local": "^1.0.0"
48
48
  },
49
- "gitHead": "e2c3b48b423e53a87c46071ab058e651482b6628"
49
+ "gitHead": "f0e77af98e54782375ac4410c897f75a3eb9b3c6"
50
50
  }
@@ -2,7 +2,19 @@ import crypto from 'crypto'
2
2
  import jwt from 'jsonwebtoken'
3
3
  import { Directive, Field, ID, ObjectType } from 'type-graphql'
4
4
  import { GraphQLEmailAddress } from 'graphql-scalars'
5
- import { Column, CreateDateColumn, Entity, Index, JoinTable, ManyToMany, ManyToOne, OneToMany, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
5
+ import {
6
+ Column,
7
+ CreateDateColumn,
8
+ Entity,
9
+ Index,
10
+ JoinTable,
11
+ ManyToMany,
12
+ ManyToOne,
13
+ OneToMany,
14
+ PrimaryGeneratedColumn,
15
+ RelationId,
16
+ UpdateDateColumn
17
+ } from 'typeorm'
6
18
 
7
19
  import { config } from '@things-factory/env'
8
20
  import { Domain, getRepository } from '@things-factory/shell'
@@ -58,7 +70,12 @@ export class User {
58
70
  @Directive('@privilege(category: "security", privilege: "query", domainOwnerGranted: true)')
59
71
  @Column({
60
72
  nullable: true,
61
- type: DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'longtext' : DATABASE_TYPE == 'oracle' ? 'clob' : 'varchar'
73
+ type:
74
+ DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
75
+ ? 'longtext'
76
+ : DATABASE_TYPE == 'oracle'
77
+ ? 'clob'
78
+ : 'varchar'
62
79
  })
63
80
  password: string
64
81
 
@@ -89,7 +106,12 @@ export class User {
89
106
  ssoId: string
90
107
 
91
108
  @Column({
92
- type: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'enum' : DATABASE_TYPE == 'oracle' ? 'varchar2' : 'smallint',
109
+ type:
110
+ DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
111
+ ? 'enum'
112
+ : DATABASE_TYPE == 'oracle'
113
+ ? 'varchar2'
114
+ : 'varchar',
93
115
  enum: UserStatus,
94
116
  default: UserStatus.INACTIVE
95
117
  })