@things-factory/auth-base 7.1.17 → 7.1.20

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.20",
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": "b8381954019a1057a32c23379277c45447708d84"
50
50
  }
@@ -73,7 +73,10 @@ export class Appliance {
73
73
  ? 'longtext'
74
74
  : DATABASE_TYPE == 'oracle'
75
75
  ? 'clob'
76
- : 'varchar'
76
+ : DATABASE_TYPE == 'mssql'
77
+ ? 'nvarchar'
78
+ : 'varchar',
79
+ length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined
77
80
  })
78
81
  @Field({ nullable: true })
79
82
  @Directive('@privilege(category: "security", privilege: "query", domainOwnerGranted: true)')
@@ -99,7 +99,10 @@ export class Application {
99
99
  ? 'longtext'
100
100
  : DATABASE_TYPE == 'oracle'
101
101
  ? 'clob'
102
- : 'varchar'
102
+ : DATABASE_TYPE == 'mssql'
103
+ ? 'nvarchar'
104
+ : 'varchar',
105
+ length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined
103
106
  })
104
107
  @Field({ nullable: true })
105
108
  @Directive('@privilege(category: "security", privilege: "query", domainOwnerGranted: true)')
@@ -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,15 @@ 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
+ : DATABASE_TYPE == 'mssql'
79
+ ? 'nvarchar'
80
+ : 'varchar',
81
+ length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined
62
82
  })
63
83
  password: string
64
84
 
@@ -89,7 +109,12 @@ export class User {
89
109
  ssoId: string
90
110
 
91
111
  @Column({
92
- type: DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb' ? 'enum' : DATABASE_TYPE == 'oracle' ? 'varchar2' : 'smallint',
112
+ type:
113
+ DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
114
+ ? 'enum'
115
+ : DATABASE_TYPE == 'oracle'
116
+ ? 'varchar2'
117
+ : 'varchar',
93
118
  enum: UserStatus,
94
119
  default: UserStatus.INACTIVE
95
120
  })