genlab 0.1.0 → 0.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/README.md +1 -1
- package/dist/cli.mjs +15 -3
- package/package.json +3 -3
package/README.md
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { execFile } from "node:child_process";
|
|
|
18
18
|
import { parseEnv, promisify } from "node:util";
|
|
19
19
|
import * as p from "@clack/prompts";
|
|
20
20
|
// package.json
|
|
21
|
-
var version = "0.1.
|
|
21
|
+
var version = "0.1.1";
|
|
22
22
|
// src/errors.ts
|
|
23
23
|
/** 面向使用者的预期错误:只输出 message,不带堆栈。 */
|
|
24
24
|
var CliError = class extends Error {
|
|
@@ -1353,9 +1353,21 @@ function presentVersion(dir, version) {
|
|
|
1353
1353
|
importedFrom: version.importedFrom
|
|
1354
1354
|
});
|
|
1355
1355
|
}
|
|
1356
|
-
/**
|
|
1356
|
+
/**
|
|
1357
|
+
* 加上与这些版本同一个 kie 任务的版本:一个任务返回多个结果时,多出来的结果在收取时
|
|
1358
|
+
* 才追加为新版本。
|
|
1359
|
+
*/
|
|
1360
|
+
function withTaskSiblings(record, versions) {
|
|
1361
|
+
const taskIds = new Set(record.versions.filter((version) => versions.includes(version.number)).map((version) => version.taskId).filter((taskId) => taskId != null));
|
|
1362
|
+
return record.versions.filter((version) => versions.includes(version.number) || version.taskId != null && taskIds.has(version.taskId)).map((version) => version.number);
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* versions 指定时只列这些版本(连同同一任务追加出的版本);pending 表示其中仍有生成中
|
|
1366
|
+
* 的版本。
|
|
1367
|
+
*/
|
|
1357
1368
|
function presentAsset(project, location, record, versions) {
|
|
1358
|
-
const
|
|
1369
|
+
const wanted = versions && withTaskSiblings(record, versions);
|
|
1370
|
+
const listed = record.versions.filter((version) => !wanted || wanted.includes(version.number));
|
|
1359
1371
|
return {
|
|
1360
1372
|
project: project.name,
|
|
1361
1373
|
asset: location.path,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genlab",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"description": "给本地 agent 用的 AI 媒体生成命令行工具(kie.ai),产物与完整生成记录保存在本机",
|
|
6
6
|
"author": "WBBB",
|
|
7
7
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=22"
|
|
23
|
+
"node": ">=22.19"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsdown",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"image-size": "^2.0.4",
|
|
44
44
|
"music-metadata": "^12.3.4",
|
|
45
45
|
"proper-lockfile": "^4.1.2",
|
|
46
|
-
"write-file-atomic": "^
|
|
46
|
+
"write-file-atomic": "^7.0.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@tanstack/eslint-config": "^0.4.0",
|