bfg-common 1.1.45 → 1.1.47

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.
@@ -214,7 +214,7 @@
214
214
  view-name="migrate-vmkernel-adapter"
215
215
  width="956px"
216
216
  height="636px"
217
- :title="`esxi1.aobfg.ru - ${localization.migrateVmKernelNetworkAdapterTo} vSwitch0`"
217
+ :title="`esxi1.иридиум - ${localization.migrateVmKernelNetworkAdapterTo} vSwitch0`"
218
218
  :switch-name="diagramData.id"
219
219
  :networks-list="props.networksList"
220
220
  :switch-networks="diagramData.networks"
@@ -24,7 +24,7 @@ vi.stubGlobal('useNuxtApp', () => {
24
24
  id: 0,
25
25
  state: 2,
26
26
  type: 'host',
27
- text: 'hdev1.aobfg.ru',
27
+ text: 'hdev1.иридиум',
28
28
  CLUSTER: 'cluster01',
29
29
  shCpuUsage: 49,
30
30
  shdFreeMem: '',
@@ -82,7 +82,7 @@ vi.stubGlobal('useNuxtApp', () => {
82
82
  id: 2,
83
83
  state: 2,
84
84
  type: 'host',
85
- text: 'hdev3.aobfg.ru',
85
+ text: 'hdev3.иридиум',
86
86
  CLUSTER: 'cluster01',
87
87
  shCpuUsage: 0,
88
88
  shdFreeMem: '',
@@ -140,7 +140,7 @@ vi.stubGlobal('useNuxtApp', () => {
140
140
  id: 24,
141
141
  state: 2,
142
142
  type: 'host',
143
- text: 'hdev4.aobfg.ru',
143
+ text: 'hdev4.иридиум',
144
144
  CLUSTER: 'cluster02',
145
145
  shCpuUsage: 0,
146
146
  shdFreeMem: '',
@@ -198,7 +198,7 @@ vi.stubGlobal('useNuxtApp', () => {
198
198
  id: 25,
199
199
  state: 2,
200
200
  type: 'host',
201
- text: 'hdev5.aobfg.ru',
201
+ text: 'hdev5.иридиум',
202
202
  CLUSTER: 'cluster02',
203
203
  shCpuUsage: 0,
204
204
  shdFreeMem: '',
@@ -256,7 +256,7 @@ vi.stubGlobal('useNuxtApp', () => {
256
256
  id: 26,
257
257
  state: 2,
258
258
  type: 'host',
259
- text: 'hdev2.aobfg.ru',
259
+ text: 'hdev2.иридиум',
260
260
  CLUSTER: 'cluster02',
261
261
  shCpuUsage: 100,
262
262
  shdFreeMem: '',
@@ -317,7 +317,7 @@ vi.stubGlobal('useNuxtApp', () => {
317
317
  id: 24,
318
318
  state: 2,
319
319
  type: 'host',
320
- text: 'hdev4.aobfg.ru',
320
+ text: 'hdev4.иридиум',
321
321
  CLUSTER: 'cluster02',
322
322
  shCpuUsage: 0,
323
323
  shdFreeMem: '',
@@ -388,7 +388,7 @@ vi.stubGlobal('useNuxtApp', () => {
388
388
  // children: [
389
389
  // {
390
390
  // id: 24,
391
- // text: 'hdev4.aobfg.ru',
391
+ // text: 'hdev4.иридиум',
392
392
  // iconClassName: 'icon-host-connect',
393
393
  // type: 'host',
394
394
  // isActive: false,
@@ -399,7 +399,7 @@ vi.stubGlobal('useNuxtApp', () => {
399
399
  // },
400
400
  // {
401
401
  // id: 25,
402
- // text: 'hdev5.aobfg.ru',
402
+ // text: 'hdev5.иридиум',
403
403
  // iconClassName: 'icon-host-connect',
404
404
  // type: 'host',
405
405
  // isActive: false,
@@ -410,7 +410,7 @@ vi.stubGlobal('useNuxtApp', () => {
410
410
  // },
411
411
  // {
412
412
  // id: 26,
413
- // text: 'hdev2.aobfg.ru',
413
+ // text: 'hdev2.иридиум',
414
414
  // iconClassName: 'icon-host-connect',
415
415
  // type: 'host',
416
416
  // isActive: false,
@@ -425,7 +425,7 @@ vi.stubGlobal('useNuxtApp', () => {
425
425
  //
426
426
  // const selectedNode2 = {
427
427
  // id: 24,
428
- // text: 'hdev4.aobfg.ru',
428
+ // text: 'hdev4.иридиум',
429
429
  // iconClassName: 'icon-host-connect',
430
430
  // type: 'host',
431
431
  // isActive: true,
@@ -9,27 +9,27 @@ const compatibleHostsTable: API_UI_I_DataTable<I_CompatibleHostsTable[]> = {
9
9
  items: [
10
10
  {
11
11
  id: 1,
12
- host: 'esxi0.aobfg.ru',
12
+ host: 'esxi0.иридиум',
13
13
  cluster: 'Cluster00',
14
14
  },
15
15
  {
16
16
  id: 2,
17
- host: ' esxi0.aobfg.ru',
17
+ host: ' esxi0.иридиум',
18
18
  cluster: 'Cluster00',
19
19
  },
20
20
  {
21
21
  id: 3,
22
- host: 'esxi3.aobfg.ru',
22
+ host: 'esxi3.иридиум',
23
23
  cluster: 'Cluster00',
24
24
  },
25
25
  {
26
26
  id: 4,
27
- host: 'esxi4.aobfg.ru',
27
+ host: 'esxi4.иридиум',
28
28
  cluster: 'Cluster00',
29
29
  },
30
30
  {
31
31
  id: 5,
32
- host: 'esxi1.aobfg.ru',
32
+ host: 'esxi1.иридиум',
33
33
  cluster: 'Cluster01',
34
34
  },
35
35
  ],
@@ -40,21 +40,21 @@ const incompatibleHostsTable: API_UI_I_DataTable<I_IncompatibleHostsTable[]> = {
40
40
  items: [
41
41
  {
42
42
  id: 1,
43
- host: 'esxi0.aobfg.ru',
43
+ host: 'esxi0.иридиум',
44
44
  host_incompatibility_reason:
45
45
  'Kerberos is not supported as host is not in AD domain',
46
46
  cluster: 'Cluster00',
47
47
  },
48
48
  {
49
49
  id: 2,
50
- host: 'esxi0.aobfg.ru',
50
+ host: 'esxi0.иридиум',
51
51
  host_incompatibility_reason:
52
52
  'Kerberos is not supported as host is not in AD domain',
53
53
  cluster: 'Cluster00',
54
54
  },
55
55
  {
56
56
  id: 3,
57
- host: 'esxi0.aobfg.ru',
57
+ host: 'esxi0.иридиум',
58
58
  host_incompatibility_reason:
59
59
  'Kerberos is not supported as host is not in AD domain',
60
60
  cluster: 'Cluster00',
@@ -1,92 +1,92 @@
1
- import { defineNuxtModule } from '@nuxt/kit'
2
- const fs = require('fs')
3
- const path = require('path')
4
- import {
5
- replaceFileContent,
6
- removeNonImageFiles,
7
- removeImagesFromContent,
8
- updateImagesPathAndCustomComponents,
9
- } from './utils/methods'
10
-
11
- // const npmDev = (): void => {
12
- // const contentPath = path.join(
13
- // __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
14
- // 'content',
15
- // 'help'
16
- // )
17
- // // Заменяем кастомные тэги
18
- // updateCustomComponents(contentPath)
19
- // }
20
-
21
- const npmGenerate = (): void => {
22
- // Правим путь к файлу
23
- const filePath = path.join(
24
- __dirname.replace('/bfg-common/modules/fixContentBuild', ''),
25
- '@nuxt',
26
- 'content',
27
- 'dist',
28
- 'runtime',
29
- 'legacy',
30
- 'composables',
31
- 'query.js'
32
- )
33
- const searchString = '/query/${hash(params)}'
34
- const replacementString = 'cache'
35
- replaceFileContent(filePath, searchString, replacementString)
36
- // End block
37
-
38
- // Переносим весь контент и удаляем все файлы кроме картинок
39
- const contentPath = path.join(
40
- __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
41
- 'content',
42
- 'help'
43
- )
44
- if (!fs.existsSync(contentPath)) return
45
-
46
- const publicPath = path.join(
47
- __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
48
- 'public',
49
- 'help',
50
- 'images'
51
- )
52
- fs.cp(contentPath, publicPath, { recursive: true }, () => {
53
- // Удаляем все файлы кроме картинок
54
- removeNonImageFiles(publicPath)
55
-
56
- // Удаляем картинки из папки content
57
- removeImagesFromContent(contentPath)
58
-
59
- // Правим путь к картинкам и заменяем кастомные тэги
60
- updateImagesPathAndCustomComponents(contentPath)
61
- })
62
- // End block
63
- }
64
-
65
- // @ts-ignore
66
- export default defineNuxtModule(() => {
67
- switch (process.env.npm_command) {
68
- case 'run-script':
69
- // npmDev()
70
- break
71
- case 'exec':
72
- npmGenerate()
73
- break
74
- }
75
- })
76
-
77
- // export default defineNuxtModule({
78
- // meta: {
79
- // name: 'fix-content-build',
80
- // configKey: 'fixContentBuild',
81
- // },
82
- // setup() {
83
- // switch (process.env.npm_command) {
84
- // case 'run-script':
85
- // // npmDev()
86
- // break
87
- // case 'exec':
88
- // npmGenerate()
89
- // break
90
- // }
91
- // },
92
- // })
1
+ import { defineNuxtModule } from '@nuxt/kit'
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+ import {
5
+ replaceFileContent,
6
+ removeNonImageFiles,
7
+ removeImagesFromContent,
8
+ updateImagesPathAndCustomComponents,
9
+ } from './utils/methods'
10
+
11
+ // const npmDev = (): void => {
12
+ // const contentPath = path.join(
13
+ // __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
14
+ // 'content',
15
+ // 'help'
16
+ // )
17
+ // // Заменяем кастомные тэги
18
+ // updateCustomComponents(contentPath)
19
+ // }
20
+
21
+ const npmGenerate = (): void => {
22
+ // Правим путь к файлу
23
+ const filePath = path.join(
24
+ __dirname.replace('/bfg-common/modules/fixContentBuild', ''),
25
+ '@nuxt',
26
+ 'content',
27
+ 'dist',
28
+ 'runtime',
29
+ 'legacy',
30
+ 'composables',
31
+ 'query.js'
32
+ )
33
+ const searchString = '/query/${hash(params)}'
34
+ const replacementString = 'cache'
35
+ replaceFileContent(filePath, searchString, replacementString)
36
+ // End block
37
+
38
+ // Переносим весь контент и удаляем все файлы кроме картинок
39
+ const contentPath = path.join(
40
+ __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
41
+ 'content',
42
+ 'help'
43
+ )
44
+ if (!fs.existsSync(contentPath)) return
45
+
46
+ const publicPath = path.join(
47
+ __dirname.replace('/node_modules/bfg-common/modules/fixContentBuild', ''),
48
+ 'public',
49
+ 'help',
50
+ 'images'
51
+ )
52
+ fs.cp(contentPath, publicPath, { recursive: true }, () => {
53
+ // Удаляем все файлы кроме картинок
54
+ removeNonImageFiles(publicPath)
55
+
56
+ // Удаляем картинки из папки content
57
+ removeImagesFromContent(contentPath)
58
+
59
+ // Правим путь к картинкам и заменяем кастомные тэги
60
+ updateImagesPathAndCustomComponents(contentPath)
61
+ })
62
+ // End block
63
+ }
64
+
65
+ // @ts-ignore
66
+ export default defineNuxtModule(() => {
67
+ switch (process.env.npm_command) {
68
+ case 'run-script':
69
+ // npmDev()
70
+ break
71
+ case 'exec':
72
+ npmGenerate()
73
+ break
74
+ }
75
+ })
76
+
77
+ // export default defineNuxtModule({
78
+ // meta: {
79
+ // name: 'fix-content-build',
80
+ // configKey: 'fixContentBuild',
81
+ // },
82
+ // setup() {
83
+ // switch (process.env.npm_command) {
84
+ // case 'run-script':
85
+ // // npmDev()
86
+ // break
87
+ // case 'exec':
88
+ // npmGenerate()
89
+ // break
90
+ // }
91
+ // },
92
+ // })
@@ -0,0 +1,47 @@
1
+ import { defineNuxtModule } from '@nuxt/kit'
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+
5
+ const npmGenerate = (): void => {
6
+ // Переносим весь контент и удаляем все файлы кроме картинок
7
+ const filePath = path.join(
8
+ __dirname.replace('/node_modules/bfg-common/modules/replaceEnv', ''),
9
+ 'assets',
10
+ 'scss',
11
+ 'common',
12
+ 'normalize.scss'
13
+ )
14
+ if (!fs.existsSync(filePath)) return
15
+
16
+ const searchString = 'FONT'
17
+ const replacementString = process.env.FONT || ''
18
+ fs.readFile(filePath, 'utf8', (err: any, data: string) => {
19
+ if (err) {
20
+ return console.log(err)
21
+ }
22
+
23
+ if (data.match(replacementString)) {
24
+ return
25
+ }
26
+
27
+ const updatedContent = data.replace(searchString, replacementString)
28
+
29
+ fs.writeFile(filePath, updatedContent, 'utf8', (err: any) => {
30
+ if (err) {
31
+ return console.log(err)
32
+ }
33
+ })
34
+ })
35
+ }
36
+
37
+ // @ts-ignore
38
+ export default defineNuxtModule(() => {
39
+ switch (process.env.npm_command) {
40
+ case 'run-script':
41
+ // npmDev()
42
+ break
43
+ case 'exec':
44
+ npmGenerate()
45
+ break
46
+ }
47
+ })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.45",
4
+ "version": "1.1.47",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",