Skip to content

Commit

Permalink
修复一点bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnyo666 committed Nov 25, 2024
1 parent 9df77e7 commit d430538
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 5 additions & 5 deletions apps/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs'
import { logger } from '#lib'
import plugin from '#lib'
import { join } from 'node:path'
import { App, Version } from '#components'

Expand All @@ -24,12 +24,12 @@ for (const i of files) {
}
apps[app.id] = app.create()
} catch (error) {
logger.error(`[${Version.pluginName}]加载js: apps/${i}错误\n`, error)
plugin.error(`[${Version.pluginName}]加载js: apps/${i}错误\n`, error)
}
}

export { apps }

logger.info('-----------------')
logger.info(`${Version.pluginName} v${Version.pluginVersion} 加载成功~ 耗时: ${Date.now() - startTime}ms`)
logger.info('-------^_^-------')
plugin.info('-----------------')
plugin.info(`${Version.pluginName} v${Version.pluginVersion} 加载成功~ 耗时: ${Date.now() - startTime}ms`)
plugin.info('-------^_^-------')
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@
"node-schedule": "^2.1.1"
},
"imports": {
"#lib": "../../../lib/plugins/plugin.js",
"#components": "./components/index.js",
"#models": "./models/index.js"
"#lib": {
"default": "../../../lib/plugins/plugin.js"
},
"#components": {
"default": "./components/index.js"
},
"#models": {
"default": "./models/index.js"
}
},
"author": "Dnyo666",
"license": "MIT"
Expand Down

0 comments on commit d430538

Please sign in to comment.