maoda-commander-tt 0.0.39 → 0.0.40
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/dist/main.js +55 -55
- package/package.json +3 -2
package/dist/main.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-S2SVYY3T.js";
|
|
7
7
|
|
|
8
8
|
// src/main.ts
|
|
9
|
-
import { createRequire } from "module";
|
|
9
|
+
import { createRequire } from "node:module";
|
|
10
10
|
|
|
11
11
|
// src/commands/hello/hello-greet-command.ts
|
|
12
12
|
var HelloGreetCommand = class extends BaseCommand {
|
|
@@ -306,14 +306,14 @@ var PippitGetThreadCommand = class extends BaseCommand {
|
|
|
306
306
|
import { Option as Option2 } from "commander";
|
|
307
307
|
|
|
308
308
|
// src/bedrock/config/local-config.ts
|
|
309
|
-
import * as fs2 from "fs/promises";
|
|
310
|
-
import * as os from "os";
|
|
311
|
-
import * as path2 from "path";
|
|
309
|
+
import * as fs2 from "node:fs/promises";
|
|
310
|
+
import * as os from "node:os";
|
|
311
|
+
import * as path2 from "node:path";
|
|
312
312
|
|
|
313
313
|
// src/bedrock/pkg/find-closest-package-json.ts
|
|
314
|
-
import * as path from "path";
|
|
315
|
-
import * as fs from "fs";
|
|
316
|
-
import { fileURLToPath } from "url";
|
|
314
|
+
import * as path from "node:path";
|
|
315
|
+
import * as fs from "node:fs";
|
|
316
|
+
import { fileURLToPath } from "node:url";
|
|
317
317
|
import { ok as ok4, err } from "rockbed/error";
|
|
318
318
|
var _thisDir = path.dirname(fileURLToPath(import.meta.url));
|
|
319
319
|
var DEFAULT_MAX_DEPTH = 10;
|
|
@@ -1006,8 +1006,8 @@ var PippitSearchFornaxLogCommand = class extends BaseCommand {
|
|
|
1006
1006
|
};
|
|
1007
1007
|
|
|
1008
1008
|
// src/commands/pippit/pippit-save-thread-fornax-command.ts
|
|
1009
|
-
import * as fs3 from "fs/promises";
|
|
1010
|
-
import * as path3 from "path";
|
|
1009
|
+
import * as fs3 from "node:fs/promises";
|
|
1010
|
+
import * as path3 from "node:path";
|
|
1011
1011
|
import { Option as Option4 } from "commander";
|
|
1012
1012
|
var PippitSaveThreadFornaxCommand = class extends BaseCommand {
|
|
1013
1013
|
_meta() {
|
|
@@ -1112,12 +1112,12 @@ var PippitSaveThreadFornaxCommand = class extends BaseCommand {
|
|
|
1112
1112
|
};
|
|
1113
1113
|
|
|
1114
1114
|
// src/commands/pippit/pippit-asset-upload-command.ts
|
|
1115
|
-
import * as path5 from "path";
|
|
1115
|
+
import * as path5 from "node:path";
|
|
1116
1116
|
import { Option as Option5 } from "commander";
|
|
1117
1117
|
|
|
1118
1118
|
// src/commands/pippit/modules/asset-upload/cn-asset-upload.ts
|
|
1119
|
-
import * as fs4 from "fs/promises";
|
|
1120
|
-
import * as path4 from "path";
|
|
1119
|
+
import * as fs4 from "node:fs/promises";
|
|
1120
|
+
import * as path4 from "node:path";
|
|
1121
1121
|
import { err as err3, ok as ok10 } from "rockbed/error";
|
|
1122
1122
|
|
|
1123
1123
|
// src/commands/pippit/modules/web-token/web-token.ts
|
|
@@ -2001,7 +2001,7 @@ var PippitCommand = class extends BaseSubcommandHost {
|
|
|
2001
2001
|
};
|
|
2002
2002
|
|
|
2003
2003
|
// src/commands/git/git-base-command.ts
|
|
2004
|
-
import { spawnSync } from "child_process";
|
|
2004
|
+
import { spawnSync } from "node:child_process";
|
|
2005
2005
|
import { err as err6, ok as ok13 } from "rockbed/error";
|
|
2006
2006
|
var GitBaseCommand = class extends BaseCommand {
|
|
2007
2007
|
_configureArguments(cmd) {
|
|
@@ -2247,11 +2247,11 @@ var GitCommand = class extends BaseSubcommandHost {
|
|
|
2247
2247
|
};
|
|
2248
2248
|
|
|
2249
2249
|
// src/commands/shortcut/shortcut-emo-lynx-command.ts
|
|
2250
|
-
import { homedir as homedir2 } from "os";
|
|
2251
|
-
import { join as join4 } from "path";
|
|
2250
|
+
import { homedir as homedir2 } from "node:os";
|
|
2251
|
+
import { join as join4 } from "node:path";
|
|
2252
2252
|
|
|
2253
2253
|
// src/commands/shortcut/shortcut-base-command.ts
|
|
2254
|
-
import { spawn } from "child_process";
|
|
2254
|
+
import { spawn } from "node:child_process";
|
|
2255
2255
|
var ShortcutBaseCommand = class extends BaseCommand {
|
|
2256
2256
|
_runCommandLine(cmdLine, cwd = process.cwd(), customEnv = {}) {
|
|
2257
2257
|
const child = spawn(cmdLine, {
|
|
@@ -2302,8 +2302,8 @@ var ShortcutEmoLynxCommand = class extends ShortcutBaseCommand {
|
|
|
2302
2302
|
};
|
|
2303
2303
|
|
|
2304
2304
|
// src/commands/shortcut/shortcut-emo-pippit-cn-command.ts
|
|
2305
|
-
import { homedir as homedir3 } from "os";
|
|
2306
|
-
import { join as join5 } from "path";
|
|
2305
|
+
import { homedir as homedir3 } from "node:os";
|
|
2306
|
+
import { join as join5 } from "node:path";
|
|
2307
2307
|
var ShortcutEmoPippitCnCommand = class extends ShortcutBaseCommand {
|
|
2308
2308
|
_meta() {
|
|
2309
2309
|
return {
|
|
@@ -2319,8 +2319,8 @@ var ShortcutEmoPippitCnCommand = class extends ShortcutBaseCommand {
|
|
|
2319
2319
|
};
|
|
2320
2320
|
|
|
2321
2321
|
// src/commands/shortcut/shortcut-emo-pippit-command.ts
|
|
2322
|
-
import { homedir as homedir4 } from "os";
|
|
2323
|
-
import { join as join6 } from "path";
|
|
2322
|
+
import { homedir as homedir4 } from "node:os";
|
|
2323
|
+
import { join as join6 } from "node:path";
|
|
2324
2324
|
var ShortcutEmoPippitCommand = class extends ShortcutBaseCommand {
|
|
2325
2325
|
_meta() {
|
|
2326
2326
|
return {
|
|
@@ -2352,7 +2352,7 @@ var ShortcutCommand = class extends BaseSubcommandHost {
|
|
|
2352
2352
|
};
|
|
2353
2353
|
|
|
2354
2354
|
// src/commands/ai/ai-base-command.ts
|
|
2355
|
-
import { spawn as spawn2 } from "child_process";
|
|
2355
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
2356
2356
|
var AiBaseCommand = class extends BaseCommand {
|
|
2357
2357
|
_readPrompt(ctx) {
|
|
2358
2358
|
const parts = [];
|
|
@@ -2471,14 +2471,14 @@ var AiWebSearchCommand = class extends AiBaseCommand {
|
|
|
2471
2471
|
};
|
|
2472
2472
|
|
|
2473
2473
|
// src/commands/ai/ai-run-command.ts
|
|
2474
|
-
import { homedir as homedir6 } from "os";
|
|
2475
|
-
import { join as join8 } from "path";
|
|
2474
|
+
import { homedir as homedir6 } from "node:os";
|
|
2475
|
+
import { join as join8 } from "node:path";
|
|
2476
2476
|
import { ok as ok15 } from "rockbed/error";
|
|
2477
2477
|
|
|
2478
2478
|
// src/commands/ai/ai-context-path.ts
|
|
2479
|
-
import { existsSync as existsSync2 } from "fs";
|
|
2480
|
-
import { homedir as homedir5 } from "os";
|
|
2481
|
-
import { join as join7 } from "path";
|
|
2479
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
2480
|
+
import { homedir as homedir5 } from "node:os";
|
|
2481
|
+
import { join as join7 } from "node:path";
|
|
2482
2482
|
import { err as err7, ok as ok14 } from "rockbed/error";
|
|
2483
2483
|
function getCurrentCloudRootPath() {
|
|
2484
2484
|
if (process.platform !== "darwin") {
|
|
@@ -2589,10 +2589,10 @@ user_prompt:
|
|
|
2589
2589
|
};
|
|
2590
2590
|
|
|
2591
2591
|
// src/commands/ai/ai-image-command-v2.ts
|
|
2592
|
-
import { spawn as spawn3 } from "child_process";
|
|
2593
|
-
import * as fs5 from "fs/promises";
|
|
2594
|
-
import { homedir as homedir7 } from "os";
|
|
2595
|
-
import * as path6 from "path";
|
|
2592
|
+
import { spawn as spawn3 } from "node:child_process";
|
|
2593
|
+
import * as fs5 from "node:fs/promises";
|
|
2594
|
+
import { homedir as homedir7 } from "node:os";
|
|
2595
|
+
import * as path6 from "node:path";
|
|
2596
2596
|
import { err as err8, ok as ok16 } from "rockbed/error";
|
|
2597
2597
|
|
|
2598
2598
|
// src/bedrock/uuid/uuid.ts
|
|
@@ -2787,9 +2787,9 @@ function makeErrorForPath(code, message, filePath) {
|
|
|
2787
2787
|
import { Option as Option10 } from "commander";
|
|
2788
2788
|
|
|
2789
2789
|
// src/bedrock/cross-app-settings/file-cross-app-settings-reader.ts
|
|
2790
|
-
import * as fs6 from "fs/promises";
|
|
2791
|
-
import * as os2 from "os";
|
|
2792
|
-
import * as path7 from "path";
|
|
2790
|
+
import * as fs6 from "node:fs/promises";
|
|
2791
|
+
import * as os2 from "node:os";
|
|
2792
|
+
import * as path7 from "node:path";
|
|
2793
2793
|
import { err as err9, ok as ok17 } from "rockbed/error";
|
|
2794
2794
|
|
|
2795
2795
|
// src/bedrock/cross-app-settings/cross-app-settings-types.ts
|
|
@@ -3216,7 +3216,7 @@ var VideoGenerationService = class {
|
|
|
3216
3216
|
};
|
|
3217
3217
|
|
|
3218
3218
|
// src/modules/xyq/xyq-client.ts
|
|
3219
|
-
import { createHash as createHash2 } from "crypto";
|
|
3219
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
3220
3220
|
import { ok as ok22 } from "rockbed/error";
|
|
3221
3221
|
|
|
3222
3222
|
// src/modules/xyq/xyq-errors.ts
|
|
@@ -3311,10 +3311,10 @@ function isSuccessfulRet(value) {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
|
|
3313
3313
|
// src/modules/xyq/xyq-session-cache.ts
|
|
3314
|
-
import * as fs7 from "fs/promises";
|
|
3315
|
-
import * as os3 from "os";
|
|
3316
|
-
import * as path8 from "path";
|
|
3317
|
-
import { randomUUID } from "crypto";
|
|
3314
|
+
import * as fs7 from "node:fs/promises";
|
|
3315
|
+
import * as os3 from "node:os";
|
|
3316
|
+
import * as path8 from "node:path";
|
|
3317
|
+
import { randomUUID } from "node:crypto";
|
|
3318
3318
|
var XYQ_SESSION_CACHE_SCHEMA_VERSION = 1;
|
|
3319
3319
|
var CACHE_DIRECTORY_NAME = "maoda-commander-tt";
|
|
3320
3320
|
var CACHE_FILE_NAME = "xyq-session.json";
|
|
@@ -3404,16 +3404,16 @@ function isRecord3(value) {
|
|
|
3404
3404
|
}
|
|
3405
3405
|
|
|
3406
3406
|
// src/modules/xyq/xyq-session.ts
|
|
3407
|
-
import * as fs9 from "fs/promises";
|
|
3408
|
-
import * as path10 from "path";
|
|
3409
|
-
import { createHash, randomUUID as randomUUID3 } from "crypto";
|
|
3407
|
+
import * as fs9 from "node:fs/promises";
|
|
3408
|
+
import * as path10 from "node:path";
|
|
3409
|
+
import { createHash, randomUUID as randomUUID3 } from "node:crypto";
|
|
3410
3410
|
import { ok as ok21 } from "rockbed/error";
|
|
3411
3411
|
|
|
3412
3412
|
// src/modules/xyq/xyq-asset-cache.ts
|
|
3413
|
-
import { randomUUID as randomUUID2 } from "crypto";
|
|
3414
|
-
import * as fs8 from "fs";
|
|
3415
|
-
import * as path9 from "path";
|
|
3416
|
-
import { DatabaseSync } from "sqlite";
|
|
3413
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
3414
|
+
import * as fs8 from "node:fs";
|
|
3415
|
+
import * as path9 from "node:path";
|
|
3416
|
+
import { DatabaseSync } from "node:sqlite";
|
|
3417
3417
|
import { ok as ok20 } from "rockbed/error";
|
|
3418
3418
|
var ASSET_CACHE_FILE_NAME = "xyq-assets.sqlite";
|
|
3419
3419
|
var DEFAULT_LEASE_DURATION_MS = 3e4;
|
|
@@ -5240,12 +5240,12 @@ var AiVideoCacheCommand = class extends BaseSubcommandHost {
|
|
|
5240
5240
|
import { err as err12, ok as ok23 } from "rockbed/error";
|
|
5241
5241
|
|
|
5242
5242
|
// src/commands/ai/ai-video-output-downloader.ts
|
|
5243
|
-
import { randomUUID as randomUUID4 } from "crypto";
|
|
5244
|
-
import { createWriteStream } from "fs";
|
|
5245
|
-
import * as fs10 from "fs/promises";
|
|
5246
|
-
import * as path11 from "path";
|
|
5247
|
-
import { Readable } from "stream";
|
|
5248
|
-
import { pipeline } from "stream/promises";
|
|
5243
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
5244
|
+
import { createWriteStream } from "node:fs";
|
|
5245
|
+
import * as fs10 from "node:fs/promises";
|
|
5246
|
+
import * as path11 from "node:path";
|
|
5247
|
+
import { Readable } from "node:stream";
|
|
5248
|
+
import { pipeline } from "node:stream/promises";
|
|
5249
5249
|
function resolveVideoOutputPaths(outputPath, outputCount) {
|
|
5250
5250
|
const resolvedPath = path11.resolve(process.cwd(), outputPath);
|
|
5251
5251
|
const extension = path11.extname(resolvedPath) || ".mp4";
|
|
@@ -5677,7 +5677,7 @@ function parseIntegerWithoutThrowing(value) {
|
|
|
5677
5677
|
}
|
|
5678
5678
|
|
|
5679
5679
|
// src/commands/ai/ai-querytask-command.ts
|
|
5680
|
-
import { spawn as spawn4 } from "child_process";
|
|
5680
|
+
import { spawn as spawn4 } from "node:child_process";
|
|
5681
5681
|
import { err as err13, ok as ok24 } from "rockbed/error";
|
|
5682
5682
|
var BIN = "xx";
|
|
5683
5683
|
var PPE_ENV = "ppe_new_login_cli";
|
|
@@ -6128,9 +6128,9 @@ async function readConfigValue2(settingsReader, key) {
|
|
|
6128
6128
|
}
|
|
6129
6129
|
|
|
6130
6130
|
// src/commands/tool/tool-random-files-command.ts
|
|
6131
|
-
import { readdir as readdir2, stat as stat3 } from "fs/promises";
|
|
6132
|
-
import { homedir as homedir10 } from "os";
|
|
6133
|
-
import { extname as extname4, join as join13, resolve as resolve7 } from "path";
|
|
6131
|
+
import { readdir as readdir2, stat as stat3 } from "node:fs/promises";
|
|
6132
|
+
import { homedir as homedir10 } from "node:os";
|
|
6133
|
+
import { extname as extname4, join as join13, resolve as resolve7 } from "node:path";
|
|
6134
6134
|
var DEFAULT_COUNT = 1;
|
|
6135
6135
|
var DEFAULT_SUFFIXES = ["png", "jpeg", "jpg"];
|
|
6136
6136
|
var DEFAULT_DEPTH = 3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maoda-commander-tt",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"description": "一个通用命令行工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsup",
|
|
23
23
|
"test": "tsx --test $(find src -name '*.test.ts' -type f)",
|
|
24
|
+
"test:dist": "node dist/main.js --help",
|
|
24
25
|
"dev": "tsx src/main.ts",
|
|
25
26
|
"dev:debug": "node --inspect -r tsx/cjs src/main.ts",
|
|
26
27
|
"start": "node dist/main.js",
|
|
27
28
|
"lint": "eslint src --ext .ts",
|
|
28
29
|
"clean": "rm -rf dist",
|
|
29
|
-
"_prerelease": "pnpm run clean && pnpm run build",
|
|
30
|
+
"_prerelease": "pnpm run clean && pnpm run build && pnpm run test:dist",
|
|
30
31
|
"_release": "pnpm version patch && npm publish --registry=https://registry.npmjs.org",
|
|
31
32
|
"pub": "pnpm _prerelease && pnpm _release",
|
|
32
33
|
"upd": "npm i maoda-commander-tt@latest -g --registry=https://registry.npmjs.org",
|