@things-factory/operato-board 5.0.14 → 6.0.0-alpha.3

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,11 +1,11 @@
1
1
  {
2
2
  "name": "@things-factory/operato-board",
3
- "version": "5.0.14",
3
+ "version": "6.0.0-alpha.3",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
7
7
  "license": "MIT",
8
- "author": "heartyoh",
8
+ "author": "heartyoh <heartyoh@hatiolab.com>",
9
9
  "description": "App for dashboarding",
10
10
  "publishConfig": {
11
11
  "access": "public",
@@ -78,38 +78,38 @@
78
78
  "@operato/shell": "^1.0.1",
79
79
  "@operato/styles": "^1.0.0",
80
80
  "@operato/utils": "^1.0.1",
81
- "@things-factory/apptool-ui": "^5.0.14",
82
- "@things-factory/auth-ui": "^5.0.14",
83
- "@things-factory/board-service": "^5.0.14",
84
- "@things-factory/board-ui": "^5.0.14",
85
- "@things-factory/context-ui": "^5.0.14",
86
- "@things-factory/export-ui": "^5.0.14",
87
- "@things-factory/fav-base": "^5.0.14",
88
- "@things-factory/font-base": "^5.0.14",
89
- "@things-factory/form-ui": "^5.0.1",
90
- "@things-factory/help": "^5.0.14",
91
- "@things-factory/i18n-base": "^5.0.14",
92
- "@things-factory/import-ui": "^5.0.14",
93
- "@things-factory/integration-notification": "^5.0.14",
94
- "@things-factory/integration-ui": "^5.0.14",
95
- "@things-factory/layout-ui": "^5.0.1",
96
- "@things-factory/more-ui": "^5.0.14",
97
- "@things-factory/notification": "^5.0.14",
98
- "@things-factory/oauth2-client": "^5.0.14",
99
- "@things-factory/offline-ui": "^5.0.14",
81
+ "@things-factory/apptool-ui": "^6.0.0-alpha.3",
82
+ "@things-factory/auth-ui": "^6.0.0-alpha.3",
83
+ "@things-factory/board-service": "^6.0.0-alpha.3",
84
+ "@things-factory/board-ui": "^6.0.0-alpha.3",
85
+ "@things-factory/context-ui": "^6.0.0-alpha.3",
86
+ "@things-factory/export-ui": "^6.0.0-alpha.3",
87
+ "@things-factory/fav-base": "^6.0.0-alpha.3",
88
+ "@things-factory/font-base": "^6.0.0-alpha.3",
89
+ "@things-factory/form-ui": "^6.0.0-alpha.3",
90
+ "@things-factory/help": "^6.0.0-alpha.3",
91
+ "@things-factory/i18n-base": "^6.0.0-alpha.3",
92
+ "@things-factory/import-ui": "^6.0.0-alpha.3",
93
+ "@things-factory/integration-notification": "^6.0.0-alpha.3",
94
+ "@things-factory/integration-ui": "^6.0.0-alpha.3",
95
+ "@things-factory/layout-ui": "^6.0.0-alpha.3",
96
+ "@things-factory/more-ui": "^6.0.0-alpha.3",
97
+ "@things-factory/notification": "^6.0.0-alpha.3",
98
+ "@things-factory/oauth2-client": "^6.0.0-alpha.3",
99
+ "@things-factory/offline-ui": "^6.0.0-alpha.3",
100
100
  "@things-factory/operato-license-checker": "^3.1.0",
101
- "@things-factory/pdf": "^5.0.11",
102
- "@things-factory/print-service": "^5.0.14",
103
- "@things-factory/print-ui": "^5.0.14",
104
- "@things-factory/resource-ui": "^5.0.14",
105
- "@things-factory/scene-google-map": "^5.0.14",
106
- "@things-factory/scene-visualizer": "^5.0.14",
107
- "@things-factory/setting-ui": "^5.0.14",
108
- "@things-factory/system-ui": "^5.0.14"
101
+ "@things-factory/pdf": "^6.0.0-alpha.3",
102
+ "@things-factory/print-service": "^6.0.0-alpha.3",
103
+ "@things-factory/print-ui": "^6.0.0-alpha.3",
104
+ "@things-factory/resource-ui": "^6.0.0-alpha.3",
105
+ "@things-factory/scene-google-map": "^6.0.0-alpha.3",
106
+ "@things-factory/scene-visualizer": "^6.0.0-alpha.3",
107
+ "@things-factory/setting-ui": "^6.0.0-alpha.3",
108
+ "@things-factory/system-ui": "^6.0.0-alpha.3"
109
109
  },
110
110
  "devDependencies": {
111
- "@things-factory/board-test": "^5.0.14",
112
- "@things-factory/builder": "^5.0.8"
111
+ "@things-factory/board-test": "^6.0.0-alpha.3",
112
+ "@things-factory/builder": "^6.0.0-alpha.3"
113
113
  },
114
- "gitHead": "9ceaa39746fcf42953e429fab2001353cd821ded"
114
+ "gitHead": "1e273b6485662da938cae8fdca035d994ef4a95d"
115
115
  }
@@ -1,7 +1,7 @@
1
- import { getRepository, MigrationInterface, QueryRunner } from 'typeorm'
1
+ import { MigrationInterface, QueryRunner } from 'typeorm'
2
2
 
3
3
  import { Privilege, Role, User } from '@things-factory/auth-base'
4
- import { Domain } from '@things-factory/shell'
4
+ import { Domain, getRepository } from '@things-factory/shell'
5
5
 
6
6
  const PRIVILEGES_SEED = {
7
7
  modeller: [
@@ -149,7 +149,7 @@ export class SeedRole1610516350460 implements MigrationInterface {
149
149
  const userRepository = getRepository(User)
150
150
 
151
151
  let users: User[] = await userRepository.find({ where: { userType: 'admin' }, relations: ['domains'] })
152
- let domain: Domain = await getRepository(Domain).findOne({
152
+ let domain: Domain = await getRepository(Domain).findOneBy({
153
153
  name: 'SYSTEM'
154
154
  })
155
155
 
@@ -201,7 +201,7 @@ export class SeedRole1610516350460 implements MigrationInterface {
201
201
  public async down(queryRunner: QueryRunner): Promise<any> {
202
202
  const repository = getRepository(Role)
203
203
  const privilegeRepository = getRepository(Privilege)
204
- const domain: Domain = await getRepository(Domain).findOne({
204
+ const domain: Domain = await getRepository(Domain).findOneBy({
205
205
  name: 'SYSTEM'
206
206
  })
207
207
 
@@ -1,10 +1,11 @@
1
- import { Resolver, Query, Args, Ctx } from 'type-graphql'
2
- import { getRepository } from 'typeorm'
3
- import { ListParam, buildQuery } from '@things-factory/shell'
1
+ import { Args, Ctx, Query, Resolver } from 'type-graphql'
2
+
4
3
  import { Board } from '@things-factory/board-service'
4
+ import { config } from '@things-factory/env'
5
5
  import { Favorite } from '@things-factory/fav-base'
6
+ import { buildQuery, getRepository, ListParam } from '@things-factory/shell'
7
+
6
8
  import { BoardFavorite, BoardFavoriteList } from './board-favorite-type'
7
- import { config } from '@things-factory/env'
8
9
 
9
10
  const ORMCONFIG = config.get('ormconfig', {})
10
11
  const DATABASE_TYPE = ORMCONFIG.type
@@ -12,7 +13,7 @@ const DATABASE_TYPE = ORMCONFIG.type
12
13
  @Resolver(BoardFavorite)
13
14
  export class BoardFavoriteQuery {
14
15
  @Query(returns => BoardFavoriteList, { description: 'To fetch multiple BoardFavorites' })
15
- async favoriteBoards(@Args() params: ListParam, @Ctx() context: any): Promise<BoardFavoriteList> {
16
+ async favoriteBoards(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<BoardFavoriteList> {
16
17
  const { user } = context.state
17
18
 
18
19
  const queryBuilder = getRepository(Board).createQueryBuilder()
@@ -1,8 +1,8 @@
1
1
  import { Arg, Ctx, Query, Resolver } from 'type-graphql'
2
- import { getRepository } from 'typeorm'
3
2
 
4
3
  import { Board } from '@things-factory/board-service'
5
4
  import { checkTarget, doSomething, getPermission } from '@things-factory/operato-license-checker'
5
+ import { getRepository } from '@things-factory/shell'
6
6
 
7
7
  import { LicenseError } from '../../errors/license-error'
8
8
  import { DomainSecret } from '../domain-secret/domain-secret'
@@ -13,16 +13,16 @@ const crypto = require('crypto')
13
13
  @Resolver(Board)
14
14
  export class BoardResolver {
15
15
  @Query(returns => [String], { description: 'Board Usage Permissions' })
16
- boardPermissions(@Ctx() context: any): string[] {
16
+ boardPermissions(@Ctx() context: ResolverContext): string[] {
17
17
  return (getPermission('Permissions For Board Usage') || 'Modeller, Viewer').split(',').map(p => p.trim())
18
18
  }
19
19
 
20
20
  @Query(returns => Board, { description: 'To fetch a board' })
21
- async board(@Arg('id') id: string, @Ctx() context: any): Promise<Board> {
21
+ async board(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Board> {
22
22
  const { domain } = context.state
23
23
 
24
24
  var board = await getRepository(Board).findOne({
25
- where: { domain, id }
25
+ where: { domain: { id: domain.id }, id }
26
26
  })
27
27
  if (domain) {
28
28
  // 1. check domainSecret is over limit quantity or not
@@ -1,7 +1,7 @@
1
1
  import { Arg, Directive, Mutation, Resolver } from 'type-graphql'
2
- import { getRepository, Repository } from 'typeorm'
2
+ import { Repository } from 'typeorm'
3
3
 
4
- import { Domain, DomainPatch } from '@things-factory/shell'
4
+ import { Domain, DomainPatch, getRepository } from '@things-factory/shell'
5
5
  import { slugger } from '@things-factory/utils'
6
6
 
7
7
  @Resolver(Domain)
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- accessTokenCookieKey: 'access_token.board',
3
- licenseKey:
4
- '5eyJMaWNlbnNlIFR5cGUiOiJFdmFsdWF0aW9uIiwiUHVyY2hhc2UgRGF0ZSI6IjIwMjIuMDcuMjIiLCJFeHBpcmF0aW9uIERhdGUiOiIyMDIyLjEwLjIyIiwiSG9zdCBBZGRyZXNzIjoiVU5MSU1JVEVEIiwiTWF4IFRhcmdldCBDb3VudCI6MCwiTWF4IERvbWFpbiBDb3VudCI6MCwiUGVybWlzc2lvbnMgRm9yIEJvYXJkIFVzYWdlIjoiVmlld2VyLCBNb2RlbGxlciIsIktleSI6IkF4Z3FIQTQzSGdzQVFCb0xLeU1kRlFrYURUc1pDQ29qQzAwbUVnSXBJakVURWpaVkl3Z1ZPeE1aSGhBV0VnUUhBUVFUQmlJaUtSQVNEaGtJSHdrckRpSktJeFFWRmdVVUp3RW1TU0FlR0JnREdUSUhERTBtTVFFcEx4UXJKQjFJQ0JvTk94a0lLeEFpSkNNWUZqd2pGaWdCSmxrakNCVTdGUm83RVFzaktoOElHUllZR2hFaFdpTUpEVHNTREQ4Y0hEVTdGd3dYRWh3ckFBaEpHQW9jQmg4YklnRU1UUWdMQWhVbUhSSTJHVlVJSGhrSUd4NERBQnMzSmkwWkZ4WVZFaElwVUFvSUlCWUdMaDRNQ3lNakt4VVZEd2dmSWhsWkNnb0tUQVV2Q0EwTlRoOEdFRDh2R0Nza0pWWVRDUmc5SHhzZUVSWTNDQXNaUEFjSUhnUURUQWd2REVzY0hqSWJEUklhQ3dBWkVBc1JBQ1VaIn0=67424',
5
- storage: {
6
- type: 's3',
7
- accessKeyId: 'AKIAQAYF6R4N7RSOCEMD',
8
- secretAccessKey: 'n14c8n42prH68oizEIrLbf50I5Edx3RZtU73jkrN',
9
- bucketName: 'aidoop-r',
10
- region: 'ap-northeast-2'
11
- },
12
- email: {
13
- host: 'smtp.office365.com', // your sender-email smtp host
14
- port: 587, // smtp server port
15
- secure: false, // true for 465, false for other ports
16
- auth: {
17
- user: 'noreply@hatiolab.com',
18
- pass: 'h@ti0LAB1008' // generated ethereal password
19
- },
20
- secureConnection: false,
21
- tls: {
22
- ciphers: 'SSLv3'
23
- }
24
- },
25
- googleFontAPIKey: 'AIzaSyAdNzZGpGL_kh4jWwFwaXP4o0bObFIfCZQ'
26
- }
@@ -1,5 +0,0 @@
1
- var licenseKey = require('./config/license').Key
2
- module.exports = {
3
- protocol: 'http',
4
- licenseKey: licenseKey
5
- }