@things-factory/board-test 5.0.11 → 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/dist-server/migrations/1558006505982-SeedGroup.js +6 -7
- package/dist-server/migrations/1558006505982-SeedGroup.js.map +1 -1
- package/dist-server/migrations/1558006512362-SeedBoard.js +8 -9
- package/dist-server/migrations/1558006512362-SeedBoard.js.map +1 -1
- package/dist-server/migrations/1558009487900-SeedPlayGroup.js +7 -8
- package/dist-server/migrations/1558009487900-SeedPlayGroup.js.map +1 -1
- package/dist-server/migrations/1563869152824-TestLabels.js +8 -9
- package/dist-server/migrations/1563869152824-TestLabels.js.map +1 -1
- package/dist-server/migrations/1564039750397-SampleBoards.js +13 -14
- package/dist-server/migrations/1564039750397-SampleBoards.js.map +1 -1
- package/dist-server/migrations/1564139332891-SampleFonts.js +6 -7
- package/dist-server/migrations/1564139332891-SampleFonts.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/migrations/1558006505982-SeedGroup.ts +4 -4
- package/server/migrations/1558006512362-SeedBoard.ts +6 -6
- package/server/migrations/1558009487900-SeedPlayGroup.ts +4 -4
- package/server/migrations/1563869152824-TestLabels.ts +6 -6
- package/server/migrations/1564039750397-SampleBoards.ts +10 -10
- package/server/migrations/1564139332891-SampleFonts.ts +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Domain } from '@things-factory/shell'
|
|
2
|
+
|
|
4
3
|
import { Group } from '@things-factory/board-service'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const SEED_GROUP = [
|
|
7
7
|
{
|
|
@@ -22,7 +22,7 @@ export class SeedGroup1558006505982 implements MigrationInterface {
|
|
|
22
22
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
23
23
|
const repository = getRepository(Group)
|
|
24
24
|
const domainRepository = getRepository(Domain)
|
|
25
|
-
const domain = await domainRepository.
|
|
25
|
+
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
26
26
|
|
|
27
27
|
return await Promise.all(
|
|
28
28
|
SEED_GROUP.map(async group => {
|
|
@@ -39,7 +39,7 @@ export class SeedGroup1558006505982 implements MigrationInterface {
|
|
|
39
39
|
|
|
40
40
|
return await Promise.all(
|
|
41
41
|
SEED_GROUP.reverse().map(async group => {
|
|
42
|
-
let record = await repository.
|
|
42
|
+
let record = await repository.findOneBy({ name: group.name })
|
|
43
43
|
await repository.remove(record)
|
|
44
44
|
})
|
|
45
45
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
|
|
3
|
+
import { Board, Group } from '@things-factory/board-service'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const SEED_BOARD = []
|
|
7
7
|
|
|
@@ -9,10 +9,10 @@ export class Board1558006512362 implements MigrationInterface {
|
|
|
9
9
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
10
10
|
const repository = getRepository(Board)
|
|
11
11
|
const domainRepository = getRepository(Domain)
|
|
12
|
-
const domain = await domainRepository.
|
|
12
|
+
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
13
13
|
|
|
14
14
|
const groupRepository = getRepository(Group)
|
|
15
|
-
const group = await groupRepository.
|
|
15
|
+
const group = await groupRepository.findOneBy({ name: 'SAMPLE' })
|
|
16
16
|
|
|
17
17
|
return await Promise.all(
|
|
18
18
|
SEED_BOARD.map(async board => {
|
|
@@ -30,7 +30,7 @@ export class Board1558006512362 implements MigrationInterface {
|
|
|
30
30
|
|
|
31
31
|
return await Promise.all(
|
|
32
32
|
SEED_BOARD.reverse().map(async board => {
|
|
33
|
-
let record = await repository.
|
|
33
|
+
let record = await repository.findOneBy({ name: board.name })
|
|
34
34
|
await repository.remove(record)
|
|
35
35
|
})
|
|
36
36
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Domain } from '@things-factory/shell'
|
|
2
|
+
|
|
4
3
|
import { Board, PlayGroup } from '@things-factory/board-service'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const SEED_PLAY_GROUP = []
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ export class SeedPlayGroup1558009487900 implements MigrationInterface {
|
|
|
9
9
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
10
10
|
const repository = getRepository(PlayGroup)
|
|
11
11
|
const domainRepository = getRepository(Domain)
|
|
12
|
-
const domain = await domainRepository.
|
|
12
|
+
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
13
13
|
|
|
14
14
|
const boardRepository = getRepository(Board)
|
|
15
15
|
const boards = await boardRepository.find()
|
|
@@ -30,7 +30,7 @@ export class SeedPlayGroup1558009487900 implements MigrationInterface {
|
|
|
30
30
|
|
|
31
31
|
return await Promise.all(
|
|
32
32
|
SEED_PLAY_GROUP.reverse().map(async group => {
|
|
33
|
-
let record = await repository.
|
|
33
|
+
let record = await repository.findOneBy({ name: group.name })
|
|
34
34
|
|
|
35
35
|
// TODO remove cascade
|
|
36
36
|
await repository.remove(record)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
|
|
3
|
+
import { Board, Group } from '@things-factory/board-service'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const LABEL_BOARD = [
|
|
7
7
|
{
|
|
@@ -37,10 +37,10 @@ export class TestLabels1558006512362 implements MigrationInterface {
|
|
|
37
37
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
38
38
|
const repository = getRepository(Board)
|
|
39
39
|
const domainRepository = getRepository(Domain)
|
|
40
|
-
const domain = await domainRepository.
|
|
40
|
+
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
41
41
|
|
|
42
42
|
const groupRepository = getRepository(Group)
|
|
43
|
-
const group = await groupRepository.
|
|
43
|
+
const group = await groupRepository.findOneBy({ name: 'LABEL' })
|
|
44
44
|
|
|
45
45
|
return await Promise.all(
|
|
46
46
|
LABEL_BOARD.map(async board => {
|
|
@@ -58,7 +58,7 @@ export class TestLabels1558006512362 implements MigrationInterface {
|
|
|
58
58
|
|
|
59
59
|
return await Promise.all(
|
|
60
60
|
LABEL_BOARD.reverse().map(async board => {
|
|
61
|
-
let record = await repository.
|
|
61
|
+
let record = await repository.findOneBy({ name: board.name })
|
|
62
62
|
await repository.remove(record)
|
|
63
63
|
})
|
|
64
64
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
|
|
3
|
+
import { Board, Group, PlayGroup } from '@things-factory/board-service'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const WAREHOUSE_BOARD = [
|
|
7
7
|
{
|
|
@@ -156,12 +156,12 @@ export class SampleBoards1564039750397 implements MigrationInterface {
|
|
|
156
156
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
157
157
|
const repository = getRepository(Board)
|
|
158
158
|
const domainRepository = getRepository(Domain)
|
|
159
|
-
const domain = await domainRepository.
|
|
159
|
+
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
160
160
|
|
|
161
161
|
const playGroupRepository = getRepository(PlayGroup)
|
|
162
162
|
|
|
163
163
|
const groupRepository = getRepository(Group)
|
|
164
|
-
const warehouseGroup = await groupRepository.
|
|
164
|
+
const warehouseGroup = await groupRepository.findOneBy({ name: 'WAREHOUSE' })
|
|
165
165
|
|
|
166
166
|
var playGroups = {}
|
|
167
167
|
var allBoards = [...DASHBOARD_BOARD, ...LOGISTICS_BOARD, ...WAREHOUSE_BOARD]
|
|
@@ -179,7 +179,7 @@ export class SampleBoards1564039750397 implements MigrationInterface {
|
|
|
179
179
|
|
|
180
180
|
await repository.save(WAREHOUSE_BOARD)
|
|
181
181
|
|
|
182
|
-
const dashboardGroup = await groupRepository.
|
|
182
|
+
const dashboardGroup = await groupRepository.findOneBy({ name: 'DASHBOARD' })
|
|
183
183
|
|
|
184
184
|
DASHBOARD_BOARD.forEach(board => {
|
|
185
185
|
Object.defineProperty(board, 'domain', { value: domain })
|
|
@@ -187,7 +187,7 @@ export class SampleBoards1564039750397 implements MigrationInterface {
|
|
|
187
187
|
})
|
|
188
188
|
await repository.save(DASHBOARD_BOARD)
|
|
189
189
|
|
|
190
|
-
const logisticsGroup = await groupRepository.
|
|
190
|
+
const logisticsGroup = await groupRepository.findOneBy({ name: 'LOGISTICS' })
|
|
191
191
|
|
|
192
192
|
LOGISTICS_BOARD.forEach(async board => {
|
|
193
193
|
Object.defineProperty(board, 'domain', { value: domain })
|
|
@@ -211,21 +211,21 @@ export class SampleBoards1564039750397 implements MigrationInterface {
|
|
|
211
211
|
|
|
212
212
|
await Promise.all(
|
|
213
213
|
WAREHOUSE_BOARD.reverse().map(async board => {
|
|
214
|
-
let record = await repository.
|
|
214
|
+
let record = await repository.findOneBy({ name: board.name })
|
|
215
215
|
await repository.remove(record)
|
|
216
216
|
})
|
|
217
217
|
)
|
|
218
218
|
|
|
219
219
|
await Promise.all(
|
|
220
220
|
DASHBOARD_BOARD.reverse().map(async board => {
|
|
221
|
-
let record = await repository.
|
|
221
|
+
let record = await repository.findOneBy({ name: board.name })
|
|
222
222
|
await repository.remove(record)
|
|
223
223
|
})
|
|
224
224
|
)
|
|
225
225
|
|
|
226
226
|
await Promise.all(
|
|
227
227
|
LOGISTICS_BOARD.reverse().map(async board => {
|
|
228
|
-
let record = await repository.
|
|
228
|
+
let record = await repository.findOneBy({ name: board.name })
|
|
229
229
|
await repository.remove(record)
|
|
230
230
|
})
|
|
231
231
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Domain } from '@things-factory/shell'
|
|
2
|
+
|
|
4
3
|
import { Font } from '@things-factory/font-base'
|
|
4
|
+
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
5
|
|
|
6
6
|
const FONTS = [
|
|
7
7
|
{
|
|
@@ -73,7 +73,7 @@ export class SampleFonts1564139332891 implements MigrationInterface {
|
|
|
73
73
|
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
74
74
|
const repository = getRepository(Font)
|
|
75
75
|
const domainRepository = getRepository(Domain)
|
|
76
|
-
const domain = await domainRepository.
|
|
76
|
+
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
77
77
|
|
|
78
78
|
FONTS.forEach(async font => {
|
|
79
79
|
Object.defineProperty(font, 'domain', { value: domain })
|
|
@@ -87,7 +87,7 @@ export class SampleFonts1564139332891 implements MigrationInterface {
|
|
|
87
87
|
|
|
88
88
|
return await Promise.all(
|
|
89
89
|
FONTS.reverse().map(async font => {
|
|
90
|
-
let record = await repository.
|
|
90
|
+
let record = await repository.findOneBy({ name: font.name })
|
|
91
91
|
|
|
92
92
|
// TODO remove cascade
|
|
93
93
|
await repository.remove(record)
|