@yorha2b-lab/autodev 6.0.1 → 6.1.1
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/bin/bunker.js +4 -4
- package/package.json +1 -1
- package/src/awakening/index.js +8 -8
- package/src/gateway/index.js +6 -6
- package/src/headquarters/{builder.js → designer.js} +6 -6
- package/src/headquarters/engineer.js +5 -5
- package/src/headquarters/observer.js +1 -1
- package/src/headquarters/recruiter.js +3 -3
- package/src/labs/council.js +3 -3
- package/src/labs/index.js +1 -1
- package/src/labs/tower.js +3 -5
- package/src/logistics/{ux.js → presenter.js} +5 -5
- package/src/logistics/{foundation.js → supporter.js} +1 -1
- package/src/units/{part.js → raider.js} +5 -5
- package/src/units/{response.js → reconciler.js} +3 -3
- package/src/units/{page.js → striker.js} +7 -7
- package/src/workshop/react/blueprint/index.hbs +5 -0
- package/src/{framework/react/generator → workshop/react/builder}/index.js +4 -4
- package/src/framework/react/handlebars/index.hbs +0 -5
- /package/src/{dialogs → dialogues}/DE-DE.js +0 -0
- /package/src/{dialogs → dialogues}/EN-US.js +0 -0
- /package/src/{dialogs → dialogues}/ES-ES.js +0 -0
- /package/src/{dialogs → dialogues}/FR-FR.js +0 -0
- /package/src/{dialogs → dialogues}/ID-ID.js +0 -0
- /package/src/{dialogs → dialogues}/IT-IT.js +0 -0
- /package/src/{dialogs → dialogues}/JA-JP.js +0 -0
- /package/src/{dialogs → dialogues}/KO-KR.js +0 -0
- /package/src/{dialogs → dialogues}/PT-BR.js +0 -0
- /package/src/{dialogs → dialogues}/RU-RU.js +0 -0
- /package/src/{dialogs → dialogues}/TR-TR.js +0 -0
- /package/src/{dialogs → dialogues}/ZH-CN.js +0 -0
- /package/src/{dialogs → dialogues}/ZH-TW.js +0 -0
- /package/src/logistics/{semantic.js → analyzer.js} +0 -0
- /package/src/logistics/{generator.js → builder.js} +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/AlertInfo.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/FunctionButtons.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/MySearchForm.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/MyTable.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/handleBlock.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/hookBlock.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/operateBlock.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/renderBlock.hbs +0 -0
- /package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/stateBlock.hbs +0 -0
- /package/src/{framework/react/handlebars → workshop/react/blueprint}/resource.hbs +0 -0
- /package/src/{framework/react/prompts → workshop/react/briefings}/council.js +0 -0
- /package/src/{framework/react/prompts → workshop/react/briefings}/mock.js +0 -0
- /package/src/{framework/react/prompts/part.js → workshop/react/briefings/raider.js} +0 -0
- /package/src/{framework/react/prompts/response.js → workshop/react/briefings/reconciler.js} +0 -0
- /package/src/{framework/react/prompts → workshop/react/briefings}/similarity.js +0 -0
- /package/src/{framework/react/prompts/page.js → workshop/react/briefings/striker.js} +0 -0
- /package/src/{framework/react/prompts → workshop/react/briefings}/system.js +0 -0
- /package/src/{framework/react/hooks → workshop/react/extensions}/useTableQuery.js +0 -0
- /package/src/{framework/react/utils → workshop/react/kit}/utils.js +0 -0
- /package/src/{framework/react/schema/page.json → workshop/react/protocols/striker.json} +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/EditableCell.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/MyBaseForm.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/MyImage.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/MyModalForm.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/MyModalTable.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/MySearchForm.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/MyTable.js +0 -0
- /package/src/{framework/react/components → workshop/react/standardParts}/index.js +0 -0
package/bin/bunker.js
CHANGED
|
@@ -5,10 +5,10 @@ const pkg = require('../package.json')
|
|
|
5
5
|
const { program } = require('commander')
|
|
6
6
|
const local = Intl.DateTimeFormat().resolvedOptions().locale.toUpperCase()
|
|
7
7
|
|
|
8
|
-
const { matchDialog,
|
|
8
|
+
const { matchDialog, terminalCollapse } = require('../src/logistics/presenter')
|
|
9
9
|
const recruiter = require('../src/headquarters/recruiter')
|
|
10
|
-
const
|
|
11
|
-
const dialog = matchDialog(local,
|
|
10
|
+
const dialogues = recruiter(path.join(__dirname, '../src/dialogues'))
|
|
11
|
+
const dialog = matchDialog(local, dialogues) ?? dialogues['EN-US']
|
|
12
12
|
|
|
13
13
|
program
|
|
14
14
|
.version(pkg.version)
|
|
@@ -46,7 +46,7 @@ program
|
|
|
46
46
|
process.on('SIGINT', () => {
|
|
47
47
|
result.yorha.commander.report(dialog.bunker.systemOffline, 'gray')
|
|
48
48
|
result.labs?.scout?.close()
|
|
49
|
-
|
|
49
|
+
terminalCollapse(500, dialog, result)
|
|
50
50
|
})
|
|
51
51
|
})
|
|
52
52
|
|
package/package.json
CHANGED
package/src/awakening/index.js
CHANGED
|
@@ -9,10 +9,10 @@ module.exports = {
|
|
|
9
9
|
|
|
10
10
|
const recruiter = require('../headquarters/recruiter')
|
|
11
11
|
const logistics = recruiter(path.join(__dirname, '../logistics'))
|
|
12
|
-
const yorha = logistics.
|
|
12
|
+
const yorha = logistics.presenter.yorha()
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
if (!fs.existsSync(
|
|
14
|
+
const builderPath = path.join(__dirname, `../workshop/${template}/builder`)
|
|
15
|
+
if (!fs.existsSync(builderPath)) {
|
|
16
16
|
yorha.commander.report(dialog.bunker.frameworkNotSupported(template), 'red')
|
|
17
17
|
return
|
|
18
18
|
}
|
|
@@ -23,20 +23,20 @@ module.exports = {
|
|
|
23
23
|
template,
|
|
24
24
|
logistics,
|
|
25
25
|
units: recruiter(path.join(__dirname, '../units')),
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
designer: require('../headquarters/designer')({ logistics, template }),
|
|
27
|
+
briefings: recruiter(path.join(__dirname, `../workshop/${template}/briefings`)),
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if (version) {
|
|
31
|
-
await logistics.
|
|
31
|
+
await logistics.presenter.bootSequence(version, local)
|
|
32
32
|
}
|
|
33
33
|
require('../headquarters/engineer')(accessPoint)
|
|
34
34
|
const llm = require('../gateway')(accessPoint)
|
|
35
|
-
const
|
|
35
|
+
const builder = require(builderPath)(accessPoint)
|
|
36
36
|
const labs = require('../labs')({ llm, ...accessPoint })
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
instance = { llm, labs,
|
|
39
|
+
instance = { llm, labs, builder, ...accessPoint }
|
|
40
40
|
return instance
|
|
41
41
|
},
|
|
42
42
|
|
package/src/gateway/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
module.exports = ({ yorha, dialog,
|
|
1
|
+
module.exports = ({ yorha, dialog, logistics, briefings }) => {
|
|
2
2
|
|
|
3
3
|
const sharp = require('sharp')
|
|
4
4
|
|
|
5
|
-
const { sleep } = logistics.
|
|
6
|
-
const { mock,
|
|
7
|
-
const {
|
|
8
|
-
const {
|
|
5
|
+
const { sleep } = logistics.presenter
|
|
6
|
+
const { mock, council, similarity, reconciler } = briefings
|
|
7
|
+
const { textModel, visionModel } = logistics.supporter.getConfig()
|
|
8
|
+
const { UI_DESIGNER, API_DESIGNER, MOCK_DESIGNER } = briefings.system
|
|
9
9
|
|
|
10
10
|
const openAI = require('./client')()
|
|
11
11
|
const askAI = require('./protocol')({ yorha, sleep, dialog, openAI })
|
|
@@ -65,7 +65,7 @@ module.exports = ({ yorha, dialog, prompts, logistics }) => {
|
|
|
65
65
|
model: textModel,
|
|
66
66
|
messages: [
|
|
67
67
|
{ role: 'system', content: API_DESIGNER },
|
|
68
|
-
{ role: 'user', content:
|
|
68
|
+
{ role: 'user', content: reconciler({ responseStr, resourceStr }) }
|
|
69
69
|
]
|
|
70
70
|
})
|
|
71
71
|
},
|
|
@@ -5,16 +5,16 @@ module.exports = ({ template, logistics }) => {
|
|
|
5
5
|
const Handlebars = require('handlebars')
|
|
6
6
|
|
|
7
7
|
Handlebars.registerHelper('raw', opt => opt.fn())
|
|
8
|
-
Handlebars.registerHelper('stringify', (context, maxLength = 200) => context ? new Handlebars.SafeString(logistics.
|
|
8
|
+
Handlebars.registerHelper('stringify', (context, maxLength = 200) => context ? new Handlebars.SafeString(logistics.builder.contextStringify({ context, maxLength })) : '[]')
|
|
9
9
|
|
|
10
|
-
const { hbsDir } = logistics.
|
|
11
|
-
const tplDir = !!hbsDir ? path.join(process.cwd(), hbsDir) : path.join(__dirname, `../
|
|
12
|
-
const
|
|
10
|
+
const { hbsDir } = logistics.supporter.getConfig()
|
|
11
|
+
const tplDir = !!hbsDir ? path.join(process.cwd(), hbsDir) : path.join(__dirname, `../workshop/${template}/blueprint`)
|
|
12
|
+
const moldsDir = !!hbsDir ? path.join(process.cwd(), hbsDir, 'molds') : path.join(__dirname, `../workshop/${template}/blueprint/molds`)
|
|
13
13
|
|
|
14
|
-
fs.readdirSync(
|
|
14
|
+
fs.readdirSync(moldsDir).forEach(file => {
|
|
15
15
|
if (file.endsWith('.hbs')) {
|
|
16
16
|
const name = path.basename(file, '.hbs') // 去掉后缀拿名字
|
|
17
|
-
const content = fs.readFileSync(path.join(
|
|
17
|
+
const content = fs.readFileSync(path.join(moldsDir, file), 'utf-8')
|
|
18
18
|
Handlebars.registerPartial(name, `${content}\n`)
|
|
19
19
|
}
|
|
20
20
|
})
|
|
@@ -3,15 +3,15 @@ const path = require('path')
|
|
|
3
3
|
|
|
4
4
|
module.exports = ({ units, yorha, dialog, template, logistics }) => {
|
|
5
5
|
|
|
6
|
-
const { copyTemplateDir } = logistics.
|
|
7
|
-
const { hbsDir, hooksDir, utilsDir, componentsDir } = logistics.
|
|
6
|
+
const { copyTemplateDir } = logistics.supporter
|
|
7
|
+
const { hbsDir, hooksDir, utilsDir, componentsDir } = logistics.supporter.getConfig()
|
|
8
8
|
|
|
9
9
|
try {
|
|
10
10
|
Object.values(units).forEach(unit => fs.mkdirSync(path.join(process.cwd(), 'bunker', unit.station), { recursive: true }))
|
|
11
11
|
if (!hbsDir) {
|
|
12
|
-
copyTemplateDir(template, '
|
|
13
|
-
copyTemplateDir(template, '
|
|
14
|
-
copyTemplateDir(template, '
|
|
12
|
+
copyTemplateDir(template, 'kit', utilsDir)
|
|
13
|
+
copyTemplateDir(template, 'extensions', hooksDir)
|
|
14
|
+
copyTemplateDir(template, 'standardParts', componentsDir)
|
|
15
15
|
}
|
|
16
16
|
} catch (error) {
|
|
17
17
|
yorha.commander.report(dialog.bunker.copyTemplateError(error), 'red')
|
|
@@ -21,7 +21,7 @@ module.exports = bunker => {
|
|
|
21
21
|
acp.yorha.operator6O.report(acp.dialog.operator6O.call2B)
|
|
22
22
|
|
|
23
23
|
fileWatcher.on('add', filePath => {
|
|
24
|
-
const unit = acp.logistics.
|
|
24
|
+
const unit = acp.logistics.supporter.findUnit(units, filePath)
|
|
25
25
|
if (unit) {
|
|
26
26
|
dispatcher.add(() => unit.handle(filePath))
|
|
27
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* This file is part of
|
|
4
|
-
*
|
|
2
|
+
* YoRHa Bunker Construction System
|
|
3
|
+
* This file is part of Bunker.
|
|
4
|
+
* Bunker is free software: you can redistribute it and/or modify
|
|
5
5
|
* it under the terms of the GNU Affero General Public License as
|
|
6
6
|
* published by the Free Software Foundation, either version 3 of the
|
|
7
7
|
* License, or (at your option) any later version.
|
package/src/labs/council.js
CHANGED
|
@@ -5,9 +5,9 @@ module.exports = async ({ llm, yorha, dialog, logistics }) => {
|
|
|
5
5
|
|
|
6
6
|
const { apiParser } = llm
|
|
7
7
|
const { pod153, commander } = yorha
|
|
8
|
-
const { contextStringify } = logistics.
|
|
9
|
-
const { apiDoc, pagesDir } = logistics.
|
|
10
|
-
const { getLocalScore, getSemanticKeywords } = logistics.
|
|
8
|
+
const { contextStringify } = logistics.builder
|
|
9
|
+
const { apiDoc, pagesDir } = logistics.supporter.getConfig()
|
|
10
|
+
const { getLocalScore, getSemanticKeywords } = logistics.analyzer
|
|
11
11
|
|
|
12
12
|
if (!apiDoc) return
|
|
13
13
|
|
package/src/labs/index.js
CHANGED
|
@@ -2,7 +2,7 @@ module.exports = accessPoint => {
|
|
|
2
2
|
|
|
3
3
|
const labs = {}
|
|
4
4
|
|
|
5
|
-
const { apiDoc, remains, needMock, proxyTarget, enableAutoAlignment } = accessPoint.logistics.
|
|
5
|
+
const { apiDoc, remains, needMock, proxyTarget, enableAutoAlignment } = accessPoint.logistics.supporter.getConfig()
|
|
6
6
|
|
|
7
7
|
if (!needMock && proxyTarget && enableAutoAlignment) {
|
|
8
8
|
labs.tower = require('../labs/tower')(accessPoint)
|
package/src/labs/tower.js
CHANGED
|
@@ -5,8 +5,8 @@ module.exports = ({ units, yorha, dialog, logistics }) => {
|
|
|
5
5
|
const httpProxy = require('http-proxy')
|
|
6
6
|
|
|
7
7
|
const { pod153, commander } = yorha
|
|
8
|
-
const { unwrapSignal, isQuerySignal } = logistics.
|
|
9
|
-
const { routeMap = {}, proxyTarget } = logistics.
|
|
8
|
+
const { unwrapSignal, isQuerySignal } = logistics.analyzer
|
|
9
|
+
const { routeMap = {}, proxyTarget } = logistics.supporter.getConfig()
|
|
10
10
|
|
|
11
11
|
const TOWER_PORT = 42153
|
|
12
12
|
const hackedRegistry = new Map()
|
|
@@ -49,12 +49,10 @@ module.exports = ({ units, yorha, dialog, logistics }) => {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
pod153.report(dialog.pod153.capturedRuntimeSignal(fileName))
|
|
52
|
-
|
|
53
|
-
await units.response.handle(null, { fileName, data: json })
|
|
52
|
+
await units.reconciler.handle(null, { fileName, data: json })
|
|
54
53
|
hackedRegistry.set(fileName, fingerprint)
|
|
55
54
|
} catch (e) {
|
|
56
55
|
// 非 JSON 信号,保持静默
|
|
57
|
-
console.log(e)
|
|
58
56
|
}
|
|
59
57
|
})
|
|
60
58
|
})
|
|
@@ -48,8 +48,8 @@ const matchDialog = (locale, dialogs) => {
|
|
|
48
48
|
const bootSequence = async (version, local) => {
|
|
49
49
|
|
|
50
50
|
const lines = [
|
|
51
|
-
chalk.cyan(figlet.textSync('
|
|
52
|
-
chalk.gray('
|
|
51
|
+
chalk.cyan(figlet.textSync('Bunker', { horizontalLayout: 'full' })),
|
|
52
|
+
chalk.gray('Booting System...'),
|
|
53
53
|
chalk.white('[BUNKER] ') + chalk.green('Locale Detection: ') + chalk.cyan(local),
|
|
54
54
|
chalk.white('[BUNKER] ') + chalk.green('YoRHa No.2 Type B Unit: ') + chalk.cyan('Online'),
|
|
55
55
|
chalk.white('[BUNKER] ') + chalk.green('Scanner Type 9S Unit: ') + chalk.cyan('Standby'),
|
|
@@ -65,13 +65,13 @@ const bootSequence = async (version, local) => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const
|
|
68
|
+
const terminalCollapse = async (duration = 1500, dialog, result) => {
|
|
69
69
|
|
|
70
70
|
let currentTotal = 0
|
|
71
71
|
const MIRROR_URL = 'https://cdn.jsdelivr.net/gh/yorha2b-lab/autodev@github-repo-stats/bunker-stats.json'
|
|
72
72
|
|
|
73
73
|
try {
|
|
74
|
-
if (result.logistics.
|
|
74
|
+
if (result.logistics.supporter.getConfig().fetchClone) {
|
|
75
75
|
const controller = new AbortController()
|
|
76
76
|
const timeoutId = setTimeout(() => controller.abort(), 800)
|
|
77
77
|
const response = await fetch(MIRROR_URL, { signal: controller.signal })
|
|
@@ -142,5 +142,5 @@ module.exports = {
|
|
|
142
142
|
yorha,
|
|
143
143
|
matchDialog,
|
|
144
144
|
bootSequence,
|
|
145
|
-
|
|
145
|
+
terminalCollapse
|
|
146
146
|
}
|
|
@@ -28,7 +28,7 @@ const getExistingMenus = (dir = 'src/pages') => {
|
|
|
28
28
|
|
|
29
29
|
const copyTemplateDir = (template, templateSubDir, targetSubDir) => {
|
|
30
30
|
const targetDir = path.join(process.cwd(), targetSubDir)
|
|
31
|
-
const sourceDir = path.join(__dirname, `../
|
|
31
|
+
const sourceDir = path.join(__dirname, `../workshop/${template}/${templateSubDir}`)
|
|
32
32
|
if (!fs.existsSync(sourceDir)) return
|
|
33
33
|
fs.mkdirSync(targetDir, { recursive: true })
|
|
34
34
|
fs.readdirSync(sourceDir).forEach(file => {
|
|
@@ -5,13 +5,13 @@ module.exports = {
|
|
|
5
5
|
async handle(filePath) {
|
|
6
6
|
|
|
7
7
|
const chalk = require('chalk')
|
|
8
|
-
const { llm, yorha, dialog,
|
|
8
|
+
const { llm, yorha, dialog, builder, logistics, briefings } = require('../awakening').get()
|
|
9
9
|
|
|
10
10
|
const { pod042 } = yorha
|
|
11
|
+
const { raider } = briefings
|
|
11
12
|
const { recognizePage } = llm
|
|
12
|
-
const {
|
|
13
|
-
const {
|
|
14
|
-
const { cleanCode, contextStringify } = logistics.generator
|
|
13
|
+
const { formatFormItemAndColumns } = builder
|
|
14
|
+
const { cleanCode, contextStringify } = logistics.builder
|
|
15
15
|
|
|
16
16
|
const startTime = Date.now()
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ module.exports = {
|
|
|
20
20
|
try {
|
|
21
21
|
pod042.update(spinner, dialog.pod042.extractingUiMetadata)
|
|
22
22
|
|
|
23
|
-
const pageConfig = await recognizePage({ prompt, filePath })
|
|
23
|
+
const pageConfig = await recognizePage({ prompt: raider, filePath })
|
|
24
24
|
|
|
25
25
|
const { formItems, dictBlocks, processedColumns } = formatFormItemAndColumns({ pageConfig })
|
|
26
26
|
|
|
@@ -10,9 +10,9 @@ module.exports = {
|
|
|
10
10
|
|
|
11
11
|
const { nineS, pod153 } = yorha
|
|
12
12
|
const { alignResponseFields } = llm
|
|
13
|
-
const { cleanCode } = logistics.
|
|
14
|
-
const { unwrapSignal } = logistics.
|
|
15
|
-
const { pagesDir } = logistics.
|
|
13
|
+
const { cleanCode } = logistics.builder
|
|
14
|
+
const { unwrapSignal } = logistics.analyzer
|
|
15
|
+
const { pagesDir } = logistics.supporter.getConfig()
|
|
16
16
|
|
|
17
17
|
const startTime = Date.now()
|
|
18
18
|
const fileName = liveResponse?.fileName ?? path.basename(filePath, path.extname(filePath))
|
|
@@ -5,14 +5,14 @@ module.exports = {
|
|
|
5
5
|
station: 'screenShot',
|
|
6
6
|
async handle(filePath) {
|
|
7
7
|
|
|
8
|
-
const { llm, yorha, dialog,
|
|
8
|
+
const { llm, yorha, dialog, builder, template, logistics, briefings } = require('../awakening').get()
|
|
9
9
|
|
|
10
|
-
const {
|
|
10
|
+
const { striker } = briefings
|
|
11
11
|
const { nineS, pod042 } = yorha
|
|
12
|
-
const { index, resource } =
|
|
13
|
-
const { contextStringify } = logistics.
|
|
12
|
+
const { index, resource } = builder
|
|
13
|
+
const { contextStringify } = logistics.builder
|
|
14
14
|
const { generateMock, recognizePage, nameSimilarity } = llm
|
|
15
|
-
const { useDemo, pagesDir, utilsDir, needMock } = logistics.
|
|
15
|
+
const { useDemo, pagesDir, utilsDir, needMock } = logistics.supporter.getConfig()
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
const startTime = Date.now()
|
|
@@ -33,7 +33,7 @@ module.exports = {
|
|
|
33
33
|
pageConfig = require('../../example/example.json')
|
|
34
34
|
} else {
|
|
35
35
|
pod042.update(spinner, dialog.pod042.uploadVisualMetadata)
|
|
36
|
-
pageConfig = await recognizePage({ prompt:
|
|
36
|
+
pageConfig = await recognizePage({ prompt: striker, filePath, schema: require(`../workshop/${template}/protocols/striker.json`) })
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const { similarity } = await nameSimilarity({ fileName, english: pageConfig.title.english })
|
|
@@ -65,7 +65,7 @@ module.exports = {
|
|
|
65
65
|
fs.unlinkSync(filePath)
|
|
66
66
|
const cwdUtilsDir = path.join(process.cwd(), utilsDir)
|
|
67
67
|
if (!fs.existsSync(cwdUtilsDir)) fs.mkdirSync(cwdUtilsDir, { recursive: true })
|
|
68
|
-
fs.writeFileSync(path.join(cwdUtilsDir, 'menus.js'), `export const menus = ${contextStringify({ context: logistics.
|
|
68
|
+
fs.writeFileSync(path.join(cwdUtilsDir, 'menus.js'), `export const menus = ${contextStringify({ context: logistics.supporter.getExistingMenus(pagesDir), maxLength: 50 })}`)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
} catch (error) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports = ({
|
|
1
|
+
module.exports = ({ designer, logistics }) => {
|
|
2
2
|
|
|
3
|
-
const { indexTpl, resourceTpl } =
|
|
4
|
-
const { wrapCode, cleanCode, contextStringify } = logistics.
|
|
5
|
-
const { needMock, responseSuccess } = logistics.
|
|
3
|
+
const { indexTpl, resourceTpl } = designer
|
|
4
|
+
const { wrapCode, cleanCode, contextStringify } = logistics.builder
|
|
5
|
+
const { needMock, responseSuccess } = logistics.supporter.getConfig()
|
|
6
6
|
|
|
7
7
|
const formatFormItemAndColumns = ({ pageConfig }) => {
|
|
8
8
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/AlertInfo.hbs
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/MySearchForm.hbs
RENAMED
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/MyTable.hbs
RENAMED
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/handleBlock.hbs
RENAMED
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/hookBlock.hbs
RENAMED
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/operateBlock.hbs
RENAMED
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/renderBlock.hbs
RENAMED
|
File without changes
|
/package/src/{framework/react/handlebars/partials → workshop/react/blueprint/molds}/stateBlock.hbs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|