koishi-plugin-p-draw 1.5.7 → 1.5.8

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.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -174,8 +174,7 @@ exports.apply = async function apply(ctx, cfg) {
174
174
  // 用户自选模型偏好(userid -> unet 文件名),持久化在 p_draw_config.user_models
175
175
  if (!cfg.userModels || typeof cfg.userModels !== 'object') cfg.userModels = {}
176
176
 
177
- const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pdraw-'))
178
- // 启动时清理上次运行遗留的临时文件
177
+ // 启动时清理上次运行遗留的临时目录(先清理,再创建本次目录)
179
178
  try {
180
179
  const leftovers = fs.readdirSync(os.tmpdir()).filter((n) => n.startsWith('pdraw-'))
181
180
  for (const name of leftovers) {
@@ -187,6 +186,8 @@ exports.apply = async function apply(ctx, cfg) {
187
186
  }
188
187
  } catch (e) { /* ignore */ }
189
188
 
189
+ const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'pdraw-'))
190
+
190
191
  const baseUrl = () => normalizeBaseUrl(cfg.comfyuiBaseUrl)
191
192
 
192
193
  function parseAllowedSizes() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-p-draw",
3
3
  "description": "p点-绘图,连接本地 ComfyUI 生图。支持自然语言优化、尺寸选择、画师组、固定角色、生成队列,需要配合 p-qiandao 使用",
4
- "version": "1.5.7",
4
+ "version": "1.5.8",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "index.js",