@things-factory/board-test 8.0.0 → 9.0.0-beta.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/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/server/index.ts +0 -1
- package/server/migrations/1558006505982-SeedGroup.ts +0 -47
- package/server/migrations/1558006512362-SeedBoard.ts +0 -38
- package/server/migrations/1558009487900-SeedPlayGroup.ts +0 -40
- package/server/migrations/1563869152824-TestLabels.ts +0 -66
- package/server/migrations/1564039750397-SampleBoards.ts +0 -233
- package/server/migrations/1564139332891-SampleFonts.ts +0 -97
- package/server/migrations/index.ts +0 -9
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
|
|
3
|
-
import { Font } from '@things-factory/font-base'
|
|
4
|
-
import { Domain, getRepository } from '@things-factory/shell'
|
|
5
|
-
|
|
6
|
-
const FONTS = [
|
|
7
|
-
{
|
|
8
|
-
id: '5fdac0a1-e264-4c68-a133-df119a13f948',
|
|
9
|
-
name: 'Nanum Gothic',
|
|
10
|
-
provider: 'google',
|
|
11
|
-
uri: 'https://fonts.googleapis.com/css?family=Nanum+Gothic&display=swap',
|
|
12
|
-
active: true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: '5c8c413e-c964-499d-92c1-e6c13677a4d8',
|
|
16
|
-
name: 'Noto Sans KR',
|
|
17
|
-
provider: 'google',
|
|
18
|
-
uri: 'https://fonts.google.com/specimen/Noto+Sans+KR',
|
|
19
|
-
active: true
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: '1eda5e13-347f-4d6a-91d4-f483f855d8ef',
|
|
23
|
-
name: 'Nanum Myeongjo',
|
|
24
|
-
provider: 'google',
|
|
25
|
-
uri: 'https://fonts.google.com/specimen/Nanum+Myeongjo',
|
|
26
|
-
active: true
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: 'a262ac64-77f0-4e1e-a150-d8421584b804',
|
|
30
|
-
name: 'Nanum Gothic Coding',
|
|
31
|
-
provider: 'google',
|
|
32
|
-
uri: 'https://fonts.google.com/specimen/Nanum+Gothic+Coding',
|
|
33
|
-
active: true
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: '8eb5a086-5efc-4fcc-ad14-c6cda353689c',
|
|
37
|
-
name: 'Darker Grotesque',
|
|
38
|
-
provider: 'google',
|
|
39
|
-
uri: 'https://fonts.google.com/specimen/Darker+Grotesque',
|
|
40
|
-
active: true
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: '3905968d-28fe-496f-8834-4c2ca3cc947d',
|
|
44
|
-
name: 'Shadows Into Light',
|
|
45
|
-
provider: 'google',
|
|
46
|
-
uri: 'https://fonts.google.com/specimen/Shadows+Into+Light',
|
|
47
|
-
active: true
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 'd1759d48-8c5b-4567-8a4e-bcfa6e0d7bb6',
|
|
51
|
-
name: 'Ubuntu Condensed',
|
|
52
|
-
provider: 'google',
|
|
53
|
-
uri: 'https://fonts.google.com/specimen/Ubuntu+Condensed',
|
|
54
|
-
active: true
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: '21848dcd-dcc5-4614-be4c-cf79e1a693c2',
|
|
58
|
-
name: 'Gugi',
|
|
59
|
-
provider: 'google',
|
|
60
|
-
uri: 'https://fonts.google.com/specimen/Gugi',
|
|
61
|
-
active: true
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: 'd385d921-8d95-468e-a66a-99d3674e1bc8',
|
|
65
|
-
name: 'Dokdo',
|
|
66
|
-
provider: 'google',
|
|
67
|
-
uri: 'https://fonts.google.com/specimen/Dokdo',
|
|
68
|
-
active: true
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
export class SampleFonts1564139332891 implements MigrationInterface {
|
|
73
|
-
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
74
|
-
const repository = getRepository(Font)
|
|
75
|
-
const domainRepository = getRepository(Domain)
|
|
76
|
-
const domain = await domainRepository.findOneBy({ subdomain: 'system' })
|
|
77
|
-
|
|
78
|
-
FONTS.forEach(async font => {
|
|
79
|
-
Object.defineProperty(font, 'domain', { value: domain })
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
await repository.save(FONTS)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
public async down(queryRunner: QueryRunner): Promise<any> {
|
|
86
|
-
const repository = getRepository(Font)
|
|
87
|
-
|
|
88
|
-
return await Promise.all(
|
|
89
|
-
FONTS.reverse().map(async font => {
|
|
90
|
-
let record = await repository.findOneBy({ name: font.name })
|
|
91
|
-
|
|
92
|
-
// TODO remove cascade
|
|
93
|
-
await repository.remove(record)
|
|
94
|
-
})
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const glob = require('glob')
|
|
2
|
-
const path = require('path')
|
|
3
|
-
|
|
4
|
-
export var migrations = []
|
|
5
|
-
|
|
6
|
-
glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {
|
|
7
|
-
if (file.indexOf('index.js') !== -1) return
|
|
8
|
-
migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])
|
|
9
|
-
})
|