@kevisual/project-search 0.0.9 → 0.0.11
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/app.d.ts +15 -30
- package/dist/app.js +354 -174
- package/dist/remote.js +355 -175
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -45,7 +45,7 @@ var __export = (target, all) => {
|
|
|
45
45
|
};
|
|
46
46
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
47
47
|
|
|
48
|
-
//
|
|
48
|
+
// node_modules/fast-glob/out/utils/array.js
|
|
49
49
|
var require_array = __commonJS((exports) => {
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.splitWhen = exports.flatten = undefined;
|
|
@@ -69,7 +69,7 @@ var require_array = __commonJS((exports) => {
|
|
|
69
69
|
exports.splitWhen = splitWhen;
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
//
|
|
72
|
+
// node_modules/fast-glob/out/utils/errno.js
|
|
73
73
|
var require_errno = __commonJS((exports) => {
|
|
74
74
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75
75
|
exports.isEnoentCodeError = undefined;
|
|
@@ -79,7 +79,7 @@ var require_errno = __commonJS((exports) => {
|
|
|
79
79
|
exports.isEnoentCodeError = isEnoentCodeError;
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
//
|
|
82
|
+
// node_modules/fast-glob/out/utils/fs.js
|
|
83
83
|
var require_fs = __commonJS((exports) => {
|
|
84
84
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
85
85
|
exports.createDirentFromStats = undefined;
|
|
@@ -102,7 +102,7 @@ var require_fs = __commonJS((exports) => {
|
|
|
102
102
|
exports.createDirentFromStats = createDirentFromStats;
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// node_modules/fast-glob/out/utils/path.js
|
|
106
106
|
var require_path = __commonJS((exports) => {
|
|
107
107
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
108
108
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
|
|
@@ -152,7 +152,7 @@ var require_path = __commonJS((exports) => {
|
|
|
152
152
|
exports.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
-
//
|
|
155
|
+
// node_modules/is-extglob/index.js
|
|
156
156
|
var require_is_extglob = __commonJS((exports, module) => {
|
|
157
157
|
/*!
|
|
158
158
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
@@ -174,7 +174,7 @@ var require_is_extglob = __commonJS((exports, module) => {
|
|
|
174
174
|
};
|
|
175
175
|
});
|
|
176
176
|
|
|
177
|
-
//
|
|
177
|
+
// node_modules/is-glob/index.js
|
|
178
178
|
var require_is_glob = __commonJS((exports, module) => {
|
|
179
179
|
/*!
|
|
180
180
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
@@ -309,7 +309,7 @@ var require_is_glob = __commonJS((exports, module) => {
|
|
|
309
309
|
};
|
|
310
310
|
});
|
|
311
311
|
|
|
312
|
-
//
|
|
312
|
+
// node_modules/glob-parent/index.js
|
|
313
313
|
var require_glob_parent = __commonJS((exports, module) => {
|
|
314
314
|
var isGlob = require_is_glob();
|
|
315
315
|
var pathPosixDirname = __require("path").posix.dirname;
|
|
@@ -335,7 +335,7 @@ var require_glob_parent = __commonJS((exports, module) => {
|
|
|
335
335
|
};
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
//
|
|
338
|
+
// node_modules/braces/lib/utils.js
|
|
339
339
|
var require_utils = __commonJS((exports) => {
|
|
340
340
|
exports.isInteger = (num) => {
|
|
341
341
|
if (typeof num === "number") {
|
|
@@ -422,7 +422,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
422
422
|
};
|
|
423
423
|
});
|
|
424
424
|
|
|
425
|
-
//
|
|
425
|
+
// node_modules/braces/lib/stringify.js
|
|
426
426
|
var require_stringify = __commonJS((exports, module) => {
|
|
427
427
|
var utils = require_utils();
|
|
428
428
|
module.exports = (ast, options = {}) => {
|
|
@@ -450,7 +450,7 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
450
450
|
};
|
|
451
451
|
});
|
|
452
452
|
|
|
453
|
-
//
|
|
453
|
+
// node_modules/is-number/index.js
|
|
454
454
|
var require_is_number = __commonJS((exports, module) => {
|
|
455
455
|
/*!
|
|
456
456
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
@@ -469,7 +469,7 @@ var require_is_number = __commonJS((exports, module) => {
|
|
|
469
469
|
};
|
|
470
470
|
});
|
|
471
471
|
|
|
472
|
-
//
|
|
472
|
+
// node_modules/to-regex-range/index.js
|
|
473
473
|
var require_to_regex_range = __commonJS((exports, module) => {
|
|
474
474
|
/*!
|
|
475
475
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
@@ -684,7 +684,7 @@ var require_to_regex_range = __commonJS((exports, module) => {
|
|
|
684
684
|
module.exports = toRegexRange;
|
|
685
685
|
});
|
|
686
686
|
|
|
687
|
-
//
|
|
687
|
+
// node_modules/fill-range/index.js
|
|
688
688
|
var require_fill_range = __commonJS((exports, module) => {
|
|
689
689
|
/*!
|
|
690
690
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
@@ -893,7 +893,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
893
893
|
module.exports = fill;
|
|
894
894
|
});
|
|
895
895
|
|
|
896
|
-
//
|
|
896
|
+
// node_modules/braces/lib/compile.js
|
|
897
897
|
var require_compile = __commonJS((exports, module) => {
|
|
898
898
|
var fill = require_fill_range();
|
|
899
899
|
var utils = require_utils();
|
|
@@ -942,7 +942,7 @@ var require_compile = __commonJS((exports, module) => {
|
|
|
942
942
|
module.exports = compile;
|
|
943
943
|
});
|
|
944
944
|
|
|
945
|
-
//
|
|
945
|
+
// node_modules/braces/lib/expand.js
|
|
946
946
|
var require_expand = __commonJS((exports, module) => {
|
|
947
947
|
var fill = require_fill_range();
|
|
948
948
|
var stringify = require_stringify();
|
|
@@ -1036,7 +1036,7 @@ var require_expand = __commonJS((exports, module) => {
|
|
|
1036
1036
|
module.exports = expand;
|
|
1037
1037
|
});
|
|
1038
1038
|
|
|
1039
|
-
//
|
|
1039
|
+
// node_modules/braces/lib/constants.js
|
|
1040
1040
|
var require_constants2 = __commonJS((exports, module) => {
|
|
1041
1041
|
module.exports = {
|
|
1042
1042
|
MAX_LENGTH: 1e4,
|
|
@@ -1088,7 +1088,7 @@ var require_constants2 = __commonJS((exports, module) => {
|
|
|
1088
1088
|
};
|
|
1089
1089
|
});
|
|
1090
1090
|
|
|
1091
|
-
//
|
|
1091
|
+
// node_modules/braces/lib/parse.js
|
|
1092
1092
|
var require_parse = __commonJS((exports, module) => {
|
|
1093
1093
|
var stringify = require_stringify();
|
|
1094
1094
|
var {
|
|
@@ -1315,7 +1315,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
1315
1315
|
module.exports = parse2;
|
|
1316
1316
|
});
|
|
1317
1317
|
|
|
1318
|
-
//
|
|
1318
|
+
// node_modules/braces/index.js
|
|
1319
1319
|
var require_braces = __commonJS((exports, module) => {
|
|
1320
1320
|
var stringify = require_stringify();
|
|
1321
1321
|
var compile = require_compile();
|
|
@@ -1375,7 +1375,7 @@ var require_braces = __commonJS((exports, module) => {
|
|
|
1375
1375
|
module.exports = braces;
|
|
1376
1376
|
});
|
|
1377
1377
|
|
|
1378
|
-
//
|
|
1378
|
+
// node_modules/micromatch/node_modules/picomatch/lib/constants.js
|
|
1379
1379
|
var require_constants3 = __commonJS((exports, module) => {
|
|
1380
1380
|
var path2 = __require("path");
|
|
1381
1381
|
var WIN_SLASH = "\\\\/";
|
|
@@ -1515,7 +1515,7 @@ var require_constants3 = __commonJS((exports, module) => {
|
|
|
1515
1515
|
};
|
|
1516
1516
|
});
|
|
1517
1517
|
|
|
1518
|
-
//
|
|
1518
|
+
// node_modules/micromatch/node_modules/picomatch/lib/utils.js
|
|
1519
1519
|
var require_utils2 = __commonJS((exports) => {
|
|
1520
1520
|
var path2 = __require("path");
|
|
1521
1521
|
var win32 = process.platform === "win32";
|
|
@@ -1575,7 +1575,7 @@ var require_utils2 = __commonJS((exports) => {
|
|
|
1575
1575
|
};
|
|
1576
1576
|
});
|
|
1577
1577
|
|
|
1578
|
-
//
|
|
1578
|
+
// node_modules/micromatch/node_modules/picomatch/lib/scan.js
|
|
1579
1579
|
var require_scan = __commonJS((exports, module) => {
|
|
1580
1580
|
var utils = require_utils2();
|
|
1581
1581
|
var {
|
|
@@ -1890,7 +1890,7 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
1890
1890
|
module.exports = scan;
|
|
1891
1891
|
});
|
|
1892
1892
|
|
|
1893
|
-
//
|
|
1893
|
+
// node_modules/micromatch/node_modules/picomatch/lib/parse.js
|
|
1894
1894
|
var require_parse2 = __commonJS((exports, module) => {
|
|
1895
1895
|
var constants = require_constants3();
|
|
1896
1896
|
var utils = require_utils2();
|
|
@@ -2668,7 +2668,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
2668
2668
|
module.exports = parse2;
|
|
2669
2669
|
});
|
|
2670
2670
|
|
|
2671
|
-
//
|
|
2671
|
+
// node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
|
|
2672
2672
|
var require_picomatch = __commonJS((exports, module) => {
|
|
2673
2673
|
var path2 = __require("path");
|
|
2674
2674
|
var scan = require_scan();
|
|
@@ -2809,7 +2809,7 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
2809
2809
|
module.exports = picomatch;
|
|
2810
2810
|
});
|
|
2811
2811
|
|
|
2812
|
-
//
|
|
2812
|
+
// node_modules/micromatch/index.js
|
|
2813
2813
|
var require_micromatch = __commonJS((exports, module) => {
|
|
2814
2814
|
var util = __require("util");
|
|
2815
2815
|
var braces = require_braces();
|
|
@@ -2973,7 +2973,7 @@ var require_micromatch = __commonJS((exports, module) => {
|
|
|
2973
2973
|
module.exports = micromatch;
|
|
2974
2974
|
});
|
|
2975
2975
|
|
|
2976
|
-
//
|
|
2976
|
+
// node_modules/fast-glob/out/utils/pattern.js
|
|
2977
2977
|
var require_pattern = __commonJS((exports) => {
|
|
2978
2978
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2979
2979
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = undefined;
|
|
@@ -3135,7 +3135,7 @@ var require_pattern = __commonJS((exports) => {
|
|
|
3135
3135
|
exports.isAbsolute = isAbsolute;
|
|
3136
3136
|
});
|
|
3137
3137
|
|
|
3138
|
-
//
|
|
3138
|
+
// node_modules/merge2/index.js
|
|
3139
3139
|
var require_merge2 = __commonJS((exports, module) => {
|
|
3140
3140
|
var Stream = __require("stream");
|
|
3141
3141
|
var PassThrough = Stream.PassThrough;
|
|
@@ -3251,7 +3251,7 @@ var require_merge2 = __commonJS((exports, module) => {
|
|
|
3251
3251
|
}
|
|
3252
3252
|
});
|
|
3253
3253
|
|
|
3254
|
-
//
|
|
3254
|
+
// node_modules/fast-glob/out/utils/stream.js
|
|
3255
3255
|
var require_stream2 = __commonJS((exports) => {
|
|
3256
3256
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3257
3257
|
exports.merge = undefined;
|
|
@@ -3271,7 +3271,7 @@ var require_stream2 = __commonJS((exports) => {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
});
|
|
3273
3273
|
|
|
3274
|
-
//
|
|
3274
|
+
// node_modules/fast-glob/out/utils/string.js
|
|
3275
3275
|
var require_string = __commonJS((exports) => {
|
|
3276
3276
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3277
3277
|
exports.isEmpty = exports.isString = undefined;
|
|
@@ -3285,7 +3285,7 @@ var require_string = __commonJS((exports) => {
|
|
|
3285
3285
|
exports.isEmpty = isEmpty;
|
|
3286
3286
|
});
|
|
3287
3287
|
|
|
3288
|
-
//
|
|
3288
|
+
// node_modules/fast-glob/out/utils/index.js
|
|
3289
3289
|
var require_utils3 = __commonJS((exports) => {
|
|
3290
3290
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3291
3291
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -3305,7 +3305,7 @@ var require_utils3 = __commonJS((exports) => {
|
|
|
3305
3305
|
exports.string = string4;
|
|
3306
3306
|
});
|
|
3307
3307
|
|
|
3308
|
-
//
|
|
3308
|
+
// node_modules/fast-glob/out/managers/tasks.js
|
|
3309
3309
|
var require_tasks = __commonJS((exports) => {
|
|
3310
3310
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3311
3311
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
@@ -3388,7 +3388,7 @@ var require_tasks = __commonJS((exports) => {
|
|
|
3388
3388
|
exports.convertPatternGroupToTask = convertPatternGroupToTask;
|
|
3389
3389
|
});
|
|
3390
3390
|
|
|
3391
|
-
//
|
|
3391
|
+
// node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
3392
3392
|
var require_async = __commonJS((exports) => {
|
|
3393
3393
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3394
3394
|
exports.read = undefined;
|
|
@@ -3427,7 +3427,7 @@ var require_async = __commonJS((exports) => {
|
|
|
3427
3427
|
}
|
|
3428
3428
|
});
|
|
3429
3429
|
|
|
3430
|
-
//
|
|
3430
|
+
// node_modules/@nodelib/fs.stat/out/providers/sync.js
|
|
3431
3431
|
var require_sync = __commonJS((exports) => {
|
|
3432
3432
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3433
3433
|
exports.read = undefined;
|
|
@@ -3452,7 +3452,7 @@ var require_sync = __commonJS((exports) => {
|
|
|
3452
3452
|
exports.read = read;
|
|
3453
3453
|
});
|
|
3454
3454
|
|
|
3455
|
-
//
|
|
3455
|
+
// node_modules/@nodelib/fs.stat/out/adapters/fs.js
|
|
3456
3456
|
var require_fs2 = __commonJS((exports) => {
|
|
3457
3457
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3458
3458
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
|
|
@@ -3472,7 +3472,7 @@ var require_fs2 = __commonJS((exports) => {
|
|
|
3472
3472
|
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
3473
3473
|
});
|
|
3474
3474
|
|
|
3475
|
-
//
|
|
3475
|
+
// node_modules/@nodelib/fs.stat/out/settings.js
|
|
3476
3476
|
var require_settings = __commonJS((exports) => {
|
|
3477
3477
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3478
3478
|
var fs = require_fs2();
|
|
@@ -3492,7 +3492,7 @@ var require_settings = __commonJS((exports) => {
|
|
|
3492
3492
|
exports.default = Settings;
|
|
3493
3493
|
});
|
|
3494
3494
|
|
|
3495
|
-
//
|
|
3495
|
+
// node_modules/@nodelib/fs.stat/out/index.js
|
|
3496
3496
|
var require_out = __commonJS((exports) => {
|
|
3497
3497
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3498
3498
|
exports.statSync = exports.stat = exports.Settings = undefined;
|
|
@@ -3521,7 +3521,7 @@ var require_out = __commonJS((exports) => {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
});
|
|
3523
3523
|
|
|
3524
|
-
//
|
|
3524
|
+
// node_modules/queue-microtask/index.js
|
|
3525
3525
|
var require_queue_microtask = __commonJS((exports, module) => {
|
|
3526
3526
|
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3527
3527
|
var promise2;
|
|
@@ -3530,7 +3530,7 @@ var require_queue_microtask = __commonJS((exports, module) => {
|
|
|
3530
3530
|
}, 0));
|
|
3531
3531
|
});
|
|
3532
3532
|
|
|
3533
|
-
//
|
|
3533
|
+
// node_modules/run-parallel/index.js
|
|
3534
3534
|
var require_run_parallel = __commonJS((exports, module) => {
|
|
3535
3535
|
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3536
3536
|
module.exports = runParallel;
|
|
@@ -3582,7 +3582,7 @@ var require_run_parallel = __commonJS((exports, module) => {
|
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
3584
|
|
|
3585
|
-
//
|
|
3585
|
+
// node_modules/@nodelib/fs.scandir/out/constants.js
|
|
3586
3586
|
var require_constants4 = __commonJS((exports) => {
|
|
3587
3587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3588
3588
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = undefined;
|
|
@@ -3599,7 +3599,7 @@ var require_constants4 = __commonJS((exports) => {
|
|
|
3599
3599
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
|
3600
3600
|
});
|
|
3601
3601
|
|
|
3602
|
-
//
|
|
3602
|
+
// node_modules/@nodelib/fs.scandir/out/utils/fs.js
|
|
3603
3603
|
var require_fs3 = __commonJS((exports) => {
|
|
3604
3604
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3605
3605
|
exports.createDirentFromStats = undefined;
|
|
@@ -3622,7 +3622,7 @@ var require_fs3 = __commonJS((exports) => {
|
|
|
3622
3622
|
exports.createDirentFromStats = createDirentFromStats;
|
|
3623
3623
|
});
|
|
3624
3624
|
|
|
3625
|
-
//
|
|
3625
|
+
// node_modules/@nodelib/fs.scandir/out/utils/index.js
|
|
3626
3626
|
var require_utils4 = __commonJS((exports) => {
|
|
3627
3627
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3628
3628
|
exports.fs = undefined;
|
|
@@ -3630,7 +3630,7 @@ var require_utils4 = __commonJS((exports) => {
|
|
|
3630
3630
|
exports.fs = fs;
|
|
3631
3631
|
});
|
|
3632
3632
|
|
|
3633
|
-
//
|
|
3633
|
+
// node_modules/@nodelib/fs.scandir/out/providers/common.js
|
|
3634
3634
|
var require_common = __commonJS((exports) => {
|
|
3635
3635
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3636
3636
|
exports.joinPathSegments = undefined;
|
|
@@ -3643,7 +3643,7 @@ var require_common = __commonJS((exports) => {
|
|
|
3643
3643
|
exports.joinPathSegments = joinPathSegments;
|
|
3644
3644
|
});
|
|
3645
3645
|
|
|
3646
|
-
//
|
|
3646
|
+
// node_modules/@nodelib/fs.scandir/out/providers/async.js
|
|
3647
3647
|
var require_async2 = __commonJS((exports) => {
|
|
3648
3648
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3649
3649
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
@@ -3750,7 +3750,7 @@ var require_async2 = __commonJS((exports) => {
|
|
|
3750
3750
|
}
|
|
3751
3751
|
});
|
|
3752
3752
|
|
|
3753
|
-
//
|
|
3753
|
+
// node_modules/@nodelib/fs.scandir/out/providers/sync.js
|
|
3754
3754
|
var require_sync2 = __commonJS((exports) => {
|
|
3755
3755
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3756
3756
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
@@ -3806,7 +3806,7 @@ var require_sync2 = __commonJS((exports) => {
|
|
|
3806
3806
|
exports.readdir = readdir;
|
|
3807
3807
|
});
|
|
3808
3808
|
|
|
3809
|
-
//
|
|
3809
|
+
// node_modules/@nodelib/fs.scandir/out/adapters/fs.js
|
|
3810
3810
|
var require_fs4 = __commonJS((exports) => {
|
|
3811
3811
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3812
3812
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
|
|
@@ -3828,7 +3828,7 @@ var require_fs4 = __commonJS((exports) => {
|
|
|
3828
3828
|
exports.createFileSystemAdapter = createFileSystemAdapter;
|
|
3829
3829
|
});
|
|
3830
3830
|
|
|
3831
|
-
//
|
|
3831
|
+
// node_modules/@nodelib/fs.scandir/out/settings.js
|
|
3832
3832
|
var require_settings2 = __commonJS((exports) => {
|
|
3833
3833
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3834
3834
|
var path2 = __require("path");
|
|
@@ -3856,7 +3856,7 @@ var require_settings2 = __commonJS((exports) => {
|
|
|
3856
3856
|
exports.default = Settings;
|
|
3857
3857
|
});
|
|
3858
3858
|
|
|
3859
|
-
//
|
|
3859
|
+
// node_modules/@nodelib/fs.scandir/out/index.js
|
|
3860
3860
|
var require_out2 = __commonJS((exports) => {
|
|
3861
3861
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3862
3862
|
exports.Settings = exports.scandirSync = exports.scandir = undefined;
|
|
@@ -3885,7 +3885,7 @@ var require_out2 = __commonJS((exports) => {
|
|
|
3885
3885
|
}
|
|
3886
3886
|
});
|
|
3887
3887
|
|
|
3888
|
-
//
|
|
3888
|
+
// node_modules/reusify/reusify.js
|
|
3889
3889
|
var require_reusify = __commonJS((exports, module) => {
|
|
3890
3890
|
function reusify(Constructor) {
|
|
3891
3891
|
var head = new Constructor;
|
|
@@ -3913,7 +3913,7 @@ var require_reusify = __commonJS((exports, module) => {
|
|
|
3913
3913
|
module.exports = reusify;
|
|
3914
3914
|
});
|
|
3915
3915
|
|
|
3916
|
-
//
|
|
3916
|
+
// node_modules/fastq/queue.js
|
|
3917
3917
|
var require_queue = __commonJS((exports, module) => {
|
|
3918
3918
|
var reusify = require_reusify();
|
|
3919
3919
|
function fastqueue(context, worker, _concurrency) {
|
|
@@ -4196,7 +4196,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
4196
4196
|
module.exports.promise = queueAsPromised;
|
|
4197
4197
|
});
|
|
4198
4198
|
|
|
4199
|
-
//
|
|
4199
|
+
// node_modules/@nodelib/fs.walk/out/readers/common.js
|
|
4200
4200
|
var require_common2 = __commonJS((exports) => {
|
|
4201
4201
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4202
4202
|
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = undefined;
|
|
@@ -4227,7 +4227,7 @@ var require_common2 = __commonJS((exports) => {
|
|
|
4227
4227
|
exports.joinPathSegments = joinPathSegments;
|
|
4228
4228
|
});
|
|
4229
4229
|
|
|
4230
|
-
//
|
|
4230
|
+
// node_modules/@nodelib/fs.walk/out/readers/reader.js
|
|
4231
4231
|
var require_reader = __commonJS((exports) => {
|
|
4232
4232
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4233
4233
|
var common = require_common2();
|
|
@@ -4242,7 +4242,7 @@ var require_reader = __commonJS((exports) => {
|
|
|
4242
4242
|
exports.default = Reader;
|
|
4243
4243
|
});
|
|
4244
4244
|
|
|
4245
|
-
//
|
|
4245
|
+
// node_modules/@nodelib/fs.walk/out/readers/async.js
|
|
4246
4246
|
var require_async3 = __commonJS((exports) => {
|
|
4247
4247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4248
4248
|
var events_1 = __require("events");
|
|
@@ -4343,7 +4343,7 @@ var require_async3 = __commonJS((exports) => {
|
|
|
4343
4343
|
exports.default = AsyncReader;
|
|
4344
4344
|
});
|
|
4345
4345
|
|
|
4346
|
-
//
|
|
4346
|
+
// node_modules/@nodelib/fs.walk/out/providers/async.js
|
|
4347
4347
|
var require_async4 = __commonJS((exports) => {
|
|
4348
4348
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4349
4349
|
var async_1 = require_async3();
|
|
@@ -4377,7 +4377,7 @@ var require_async4 = __commonJS((exports) => {
|
|
|
4377
4377
|
}
|
|
4378
4378
|
});
|
|
4379
4379
|
|
|
4380
|
-
//
|
|
4380
|
+
// node_modules/@nodelib/fs.walk/out/providers/stream.js
|
|
4381
4381
|
var require_stream3 = __commonJS((exports) => {
|
|
4382
4382
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4383
4383
|
var stream_1 = __require("stream");
|
|
@@ -4415,7 +4415,7 @@ var require_stream3 = __commonJS((exports) => {
|
|
|
4415
4415
|
exports.default = StreamProvider;
|
|
4416
4416
|
});
|
|
4417
4417
|
|
|
4418
|
-
//
|
|
4418
|
+
// node_modules/@nodelib/fs.walk/out/readers/sync.js
|
|
4419
4419
|
var require_sync3 = __commonJS((exports) => {
|
|
4420
4420
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4421
4421
|
var fsScandir = require_out2();
|
|
@@ -4477,7 +4477,7 @@ var require_sync3 = __commonJS((exports) => {
|
|
|
4477
4477
|
exports.default = SyncReader;
|
|
4478
4478
|
});
|
|
4479
4479
|
|
|
4480
|
-
//
|
|
4480
|
+
// node_modules/@nodelib/fs.walk/out/providers/sync.js
|
|
4481
4481
|
var require_sync4 = __commonJS((exports) => {
|
|
4482
4482
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4483
4483
|
var sync_1 = require_sync3();
|
|
@@ -4495,7 +4495,7 @@ var require_sync4 = __commonJS((exports) => {
|
|
|
4495
4495
|
exports.default = SyncProvider;
|
|
4496
4496
|
});
|
|
4497
4497
|
|
|
4498
|
-
//
|
|
4498
|
+
// node_modules/@nodelib/fs.walk/out/settings.js
|
|
4499
4499
|
var require_settings3 = __commonJS((exports) => {
|
|
4500
4500
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4501
4501
|
var path2 = __require("path");
|
|
@@ -4525,7 +4525,7 @@ var require_settings3 = __commonJS((exports) => {
|
|
|
4525
4525
|
exports.default = Settings;
|
|
4526
4526
|
});
|
|
4527
4527
|
|
|
4528
|
-
//
|
|
4528
|
+
// node_modules/@nodelib/fs.walk/out/index.js
|
|
4529
4529
|
var require_out3 = __commonJS((exports) => {
|
|
4530
4530
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4531
4531
|
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = undefined;
|
|
@@ -4562,7 +4562,7 @@ var require_out3 = __commonJS((exports) => {
|
|
|
4562
4562
|
}
|
|
4563
4563
|
});
|
|
4564
4564
|
|
|
4565
|
-
//
|
|
4565
|
+
// node_modules/fast-glob/out/readers/reader.js
|
|
4566
4566
|
var require_reader2 = __commonJS((exports) => {
|
|
4567
4567
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4568
4568
|
var path2 = __require("path");
|
|
@@ -4599,7 +4599,7 @@ var require_reader2 = __commonJS((exports) => {
|
|
|
4599
4599
|
exports.default = Reader;
|
|
4600
4600
|
});
|
|
4601
4601
|
|
|
4602
|
-
//
|
|
4602
|
+
// node_modules/fast-glob/out/readers/stream.js
|
|
4603
4603
|
var require_stream4 = __commonJS((exports) => {
|
|
4604
4604
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4605
4605
|
var stream_1 = __require("stream");
|
|
@@ -4654,7 +4654,7 @@ var require_stream4 = __commonJS((exports) => {
|
|
|
4654
4654
|
exports.default = ReaderStream;
|
|
4655
4655
|
});
|
|
4656
4656
|
|
|
4657
|
-
//
|
|
4657
|
+
// node_modules/fast-glob/out/readers/async.js
|
|
4658
4658
|
var require_async5 = __commonJS((exports) => {
|
|
4659
4659
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4660
4660
|
var fsWalk = require_out3();
|
|
@@ -4691,7 +4691,7 @@ var require_async5 = __commonJS((exports) => {
|
|
|
4691
4691
|
exports.default = ReaderAsync;
|
|
4692
4692
|
});
|
|
4693
4693
|
|
|
4694
|
-
//
|
|
4694
|
+
// node_modules/fast-glob/out/providers/matchers/matcher.js
|
|
4695
4695
|
var require_matcher = __commonJS((exports) => {
|
|
4696
4696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4697
4697
|
var utils = require_utils3();
|
|
@@ -4740,7 +4740,7 @@ var require_matcher = __commonJS((exports) => {
|
|
|
4740
4740
|
exports.default = Matcher;
|
|
4741
4741
|
});
|
|
4742
4742
|
|
|
4743
|
-
//
|
|
4743
|
+
// node_modules/fast-glob/out/providers/matchers/partial.js
|
|
4744
4744
|
var require_partial = __commonJS((exports) => {
|
|
4745
4745
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4746
4746
|
var matcher_1 = require_matcher();
|
|
@@ -4775,7 +4775,7 @@ var require_partial = __commonJS((exports) => {
|
|
|
4775
4775
|
exports.default = PartialMatcher;
|
|
4776
4776
|
});
|
|
4777
4777
|
|
|
4778
|
-
//
|
|
4778
|
+
// node_modules/fast-glob/out/providers/filters/deep.js
|
|
4779
4779
|
var require_deep = __commonJS((exports) => {
|
|
4780
4780
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4781
4781
|
var utils = require_utils3();
|
|
@@ -4838,7 +4838,7 @@ var require_deep = __commonJS((exports) => {
|
|
|
4838
4838
|
exports.default = DeepFilter;
|
|
4839
4839
|
});
|
|
4840
4840
|
|
|
4841
|
-
//
|
|
4841
|
+
// node_modules/fast-glob/out/providers/filters/entry.js
|
|
4842
4842
|
var require_entry = __commonJS((exports) => {
|
|
4843
4843
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4844
4844
|
var utils = require_utils3();
|
|
@@ -4924,7 +4924,7 @@ var require_entry = __commonJS((exports) => {
|
|
|
4924
4924
|
exports.default = EntryFilter;
|
|
4925
4925
|
});
|
|
4926
4926
|
|
|
4927
|
-
//
|
|
4927
|
+
// node_modules/fast-glob/out/providers/filters/error.js
|
|
4928
4928
|
var require_error = __commonJS((exports) => {
|
|
4929
4929
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4930
4930
|
var utils = require_utils3();
|
|
@@ -4943,7 +4943,7 @@ var require_error = __commonJS((exports) => {
|
|
|
4943
4943
|
exports.default = ErrorFilter;
|
|
4944
4944
|
});
|
|
4945
4945
|
|
|
4946
|
-
//
|
|
4946
|
+
// node_modules/fast-glob/out/providers/transformers/entry.js
|
|
4947
4947
|
var require_entry2 = __commonJS((exports) => {
|
|
4948
4948
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4949
4949
|
var utils = require_utils3();
|
|
@@ -4973,7 +4973,7 @@ var require_entry2 = __commonJS((exports) => {
|
|
|
4973
4973
|
exports.default = EntryTransformer;
|
|
4974
4974
|
});
|
|
4975
4975
|
|
|
4976
|
-
//
|
|
4976
|
+
// node_modules/fast-glob/out/providers/provider.js
|
|
4977
4977
|
var require_provider = __commonJS((exports) => {
|
|
4978
4978
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4979
4979
|
var path2 = __require("path");
|
|
@@ -5025,7 +5025,7 @@ var require_provider = __commonJS((exports) => {
|
|
|
5025
5025
|
exports.default = Provider;
|
|
5026
5026
|
});
|
|
5027
5027
|
|
|
5028
|
-
//
|
|
5028
|
+
// node_modules/fast-glob/out/providers/async.js
|
|
5029
5029
|
var require_async6 = __commonJS((exports) => {
|
|
5030
5030
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5031
5031
|
var async_1 = require_async5();
|
|
@@ -5052,7 +5052,7 @@ var require_async6 = __commonJS((exports) => {
|
|
|
5052
5052
|
exports.default = ProviderAsync;
|
|
5053
5053
|
});
|
|
5054
5054
|
|
|
5055
|
-
//
|
|
5055
|
+
// node_modules/fast-glob/out/providers/stream.js
|
|
5056
5056
|
var require_stream5 = __commonJS((exports) => {
|
|
5057
5057
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5058
5058
|
var stream_1 = __require("stream");
|
|
@@ -5083,7 +5083,7 @@ var require_stream5 = __commonJS((exports) => {
|
|
|
5083
5083
|
exports.default = ProviderStream;
|
|
5084
5084
|
});
|
|
5085
5085
|
|
|
5086
|
-
//
|
|
5086
|
+
// node_modules/fast-glob/out/readers/sync.js
|
|
5087
5087
|
var require_sync5 = __commonJS((exports) => {
|
|
5088
5088
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5089
5089
|
var fsStat = require_out();
|
|
@@ -5129,7 +5129,7 @@ var require_sync5 = __commonJS((exports) => {
|
|
|
5129
5129
|
exports.default = ReaderSync;
|
|
5130
5130
|
});
|
|
5131
5131
|
|
|
5132
|
-
//
|
|
5132
|
+
// node_modules/fast-glob/out/providers/sync.js
|
|
5133
5133
|
var require_sync6 = __commonJS((exports) => {
|
|
5134
5134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5135
5135
|
var sync_1 = require_sync5();
|
|
@@ -5156,7 +5156,7 @@ var require_sync6 = __commonJS((exports) => {
|
|
|
5156
5156
|
exports.default = ProviderSync;
|
|
5157
5157
|
});
|
|
5158
5158
|
|
|
5159
|
-
//
|
|
5159
|
+
// node_modules/fast-glob/out/settings.js
|
|
5160
5160
|
var require_settings4 = __commonJS((exports) => {
|
|
5161
5161
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5162
5162
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
|
|
@@ -5214,7 +5214,7 @@ var require_settings4 = __commonJS((exports) => {
|
|
|
5214
5214
|
exports.default = Settings;
|
|
5215
5215
|
});
|
|
5216
5216
|
|
|
5217
|
-
//
|
|
5217
|
+
// node_modules/fast-glob/out/index.js
|
|
5218
5218
|
var require_out4 = __commonJS((exports, module) => {
|
|
5219
5219
|
var taskManager = require_tasks();
|
|
5220
5220
|
var async_1 = require_async6();
|
|
@@ -5312,7 +5312,7 @@ var require_out4 = __commonJS((exports, module) => {
|
|
|
5312
5312
|
module.exports = FastGlob;
|
|
5313
5313
|
});
|
|
5314
5314
|
|
|
5315
|
-
//
|
|
5315
|
+
// node_modules/eventemitter3/index.js
|
|
5316
5316
|
var require_eventemitter32 = __commonJS((exports, module) => {
|
|
5317
5317
|
var has = Object.prototype.hasOwnProperty;
|
|
5318
5318
|
var prefix = "~";
|
|
@@ -5490,7 +5490,7 @@ var require_eventemitter32 = __commonJS((exports, module) => {
|
|
|
5490
5490
|
}
|
|
5491
5491
|
});
|
|
5492
5492
|
|
|
5493
|
-
//
|
|
5493
|
+
// node_modules/@kevisual/router/dist/router.js
|
|
5494
5494
|
import { createRequire as createRequire2 } from "node:module";
|
|
5495
5495
|
import { webcrypto as crypto } from "node:crypto";
|
|
5496
5496
|
import http from "node:http";
|
|
@@ -23689,7 +23689,7 @@ class App extends QueryRouterServer {
|
|
|
23689
23689
|
}
|
|
23690
23690
|
}
|
|
23691
23691
|
|
|
23692
|
-
//
|
|
23692
|
+
// node_modules/meilisearch/dist/esm/index.js
|
|
23693
23693
|
var ErrorStatusCode = {
|
|
23694
23694
|
INDEX_CREATION_FAILED: "index_creation_failed",
|
|
23695
23695
|
MISSING_INDEX_UID: "missing_index_uid",
|
|
@@ -25421,11 +25421,11 @@ class ProjectStore {
|
|
|
25421
25421
|
name: input.name,
|
|
25422
25422
|
path: input.path,
|
|
25423
25423
|
repo: input.repo,
|
|
25424
|
-
title: existingDoc?.title,
|
|
25425
|
-
tags: existingDoc?.tags,
|
|
25426
|
-
summary: existingDoc?.summary,
|
|
25427
|
-
description: existingDoc?.description,
|
|
25428
|
-
link: existingDoc?.link,
|
|
25424
|
+
title: input.title ?? existingDoc?.title,
|
|
25425
|
+
tags: input.tags ?? existingDoc?.tags,
|
|
25426
|
+
summary: input.summary ?? existingDoc?.summary,
|
|
25427
|
+
description: input.description ?? existingDoc?.description,
|
|
25428
|
+
link: input.link ?? existingDoc?.link,
|
|
25429
25429
|
status: input.status ?? existingDoc?.status ?? "active"
|
|
25430
25430
|
};
|
|
25431
25431
|
await this.index.addDocuments([doc]);
|
|
@@ -25472,7 +25472,7 @@ class ProjectStore {
|
|
|
25472
25472
|
// src/project/project-listener/listener.ts
|
|
25473
25473
|
import { subscribe } from "@parcel/watcher";
|
|
25474
25474
|
import path3 from "node:path";
|
|
25475
|
-
import fs2 from "node:fs";
|
|
25475
|
+
import fs2, { existsSync } from "node:fs";
|
|
25476
25476
|
class ProjectListener {
|
|
25477
25477
|
projectPath;
|
|
25478
25478
|
subscribe = null;
|
|
@@ -25493,6 +25493,10 @@ class ProjectListener {
|
|
|
25493
25493
|
ignorePatterns = fs2.readFileSync(ignoreFile, "utf-8").split(`
|
|
25494
25494
|
`).map((line) => line.trim()).filter((line) => line && !line.startsWith("#"));
|
|
25495
25495
|
}
|
|
25496
|
+
if (!existsSync(projectPath)) {
|
|
25497
|
+
console.warn(`[ProjectListener] Project path does not exist: ${projectPath}`);
|
|
25498
|
+
throw new CustomError(`Project path does not exist: ${projectPath}`);
|
|
25499
|
+
}
|
|
25496
25500
|
const allIgnore = [...defaultIgnorePatterns, ...ignorePatterns];
|
|
25497
25501
|
const sub = await subscribe(this.projectPath, async (err, events) => {
|
|
25498
25502
|
if (err)
|
|
@@ -25547,7 +25551,7 @@ class ProjectListener {
|
|
|
25547
25551
|
}
|
|
25548
25552
|
}
|
|
25549
25553
|
|
|
25550
|
-
//
|
|
25554
|
+
// node_modules/eventemitter3/index.mjs
|
|
25551
25555
|
var import__2 = __toESM(require_eventemitter32(), 1);
|
|
25552
25556
|
|
|
25553
25557
|
// src/project/manager.ts
|
|
@@ -25582,15 +25586,17 @@ class ProjectManager {
|
|
|
25582
25586
|
console.log(`[ProjectManager] init: skip missing path ${doc.path}`);
|
|
25583
25587
|
continue;
|
|
25584
25588
|
}
|
|
25589
|
+
const shouldWatch = doc.status === "active";
|
|
25585
25590
|
try {
|
|
25586
|
-
await this.addProject({ name: doc.name, path: doc.path, repo: doc.repo });
|
|
25591
|
+
await this.addProject({ name: doc.name, path: doc.path, repo: doc.repo }, { startListening: shouldWatch });
|
|
25587
25592
|
} catch (err) {
|
|
25588
25593
|
console.error(`[ProjectManager] init: failed to add project ${doc.path}`, err);
|
|
25589
25594
|
}
|
|
25590
25595
|
}
|
|
25591
25596
|
console.log(`[ProjectManager] init done, loaded ${this.projects.size} project(s)`);
|
|
25592
25597
|
}
|
|
25593
|
-
async addProject(input) {
|
|
25598
|
+
async addProject(input, options = {}) {
|
|
25599
|
+
const { startListening = true } = options;
|
|
25594
25600
|
if (!fs3.existsSync(input.path)) {
|
|
25595
25601
|
throw new CustomError(`[ProjectManager] addProject: path does not exist: ${input.path}`);
|
|
25596
25602
|
}
|
|
@@ -25600,11 +25606,25 @@ class ProjectManager {
|
|
|
25600
25606
|
const listener = new ProjectListener({ projectPath: input.path, emitter: this.emitter });
|
|
25601
25607
|
const project = { ...input, listener };
|
|
25602
25608
|
this.projects.set(input.path, project);
|
|
25603
|
-
|
|
25609
|
+
const readmePath = path4.join(input.path, "README.md");
|
|
25610
|
+
let description = "";
|
|
25611
|
+
if (!input.description && fs3.existsSync(readmePath)) {
|
|
25612
|
+
const readmeContent = fs3.readFileSync(readmePath, "utf-8");
|
|
25613
|
+
description = readmeContent;
|
|
25614
|
+
}
|
|
25615
|
+
this.projectStore.ensureIndex().then(() => this.projectStore.addProject({
|
|
25616
|
+
name: input.name,
|
|
25617
|
+
path: input.path,
|
|
25618
|
+
repo: input.repo,
|
|
25619
|
+
status: startListening ? "active" : "inactive",
|
|
25620
|
+
description: input?.description || description
|
|
25621
|
+
})).catch((err) => {
|
|
25604
25622
|
console.error("[ProjectManager] projectStore.addProject failed:", err);
|
|
25605
25623
|
});
|
|
25606
|
-
|
|
25607
|
-
|
|
25624
|
+
if (startListening) {
|
|
25625
|
+
await listener.startListening();
|
|
25626
|
+
console.log(`[ProjectManager] watching: ${input.path}`);
|
|
25627
|
+
}
|
|
25608
25628
|
this.projectSearch.initialSync(input.path, input.repo).catch((err) => {
|
|
25609
25629
|
console.error("[ProjectManager] initialSync failed:", err);
|
|
25610
25630
|
});
|
|
@@ -25632,14 +25652,32 @@ class ProjectManager {
|
|
|
25632
25652
|
if (!project)
|
|
25633
25653
|
return;
|
|
25634
25654
|
await project.listener.stopListening();
|
|
25655
|
+
this.projectStore.updateProject(projectPath, { status: "inactive" }).catch((err) => {
|
|
25656
|
+
console.error("[ProjectManager] updateProject status failed:", err);
|
|
25657
|
+
});
|
|
25635
25658
|
console.log(`[ProjectManager] stopped: ${projectPath}`);
|
|
25636
25659
|
}
|
|
25660
|
+
async startProject(projectPath) {
|
|
25661
|
+
const project = this.projects.get(projectPath);
|
|
25662
|
+
if (!project)
|
|
25663
|
+
return;
|
|
25664
|
+
await project.listener.startListening();
|
|
25665
|
+
this.projectStore.updateProject(projectPath, { status: "active" }).catch((err) => {
|
|
25666
|
+
console.error("[ProjectManager] updateProject status failed:", err);
|
|
25667
|
+
});
|
|
25668
|
+
console.log(`[ProjectManager] started: ${projectPath}`);
|
|
25669
|
+
}
|
|
25637
25670
|
async getProjectInfo(project) {
|
|
25638
25671
|
const { listener, ...info } = project;
|
|
25639
25672
|
const storeDoc = await this.projectStore.getProject(info.path).catch(() => null);
|
|
25673
|
+
let status = storeDoc?.status === "active" ? "active" : "inactive";
|
|
25674
|
+
const exists = fileIsExist(info.path);
|
|
25675
|
+
if (!exists) {
|
|
25676
|
+
status = "unlive";
|
|
25677
|
+
}
|
|
25640
25678
|
return {
|
|
25641
25679
|
...info,
|
|
25642
|
-
status
|
|
25680
|
+
status,
|
|
25643
25681
|
id: storeDoc?.id,
|
|
25644
25682
|
title: storeDoc?.title,
|
|
25645
25683
|
tags: storeDoc?.tags,
|
|
@@ -25694,7 +25732,7 @@ var fileIsExist = (filePath) => {
|
|
|
25694
25732
|
}
|
|
25695
25733
|
};
|
|
25696
25734
|
|
|
25697
|
-
//
|
|
25735
|
+
// node_modules/@kevisual/context/dist/app.js
|
|
25698
25736
|
var isBrowser2 = typeof window !== "undefined" && typeof document !== "undefined";
|
|
25699
25737
|
var isBrowser22 = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
25700
25738
|
function getDefaultExportFromCjs(x) {
|
|
@@ -26333,7 +26371,7 @@ app.route({
|
|
|
26333
26371
|
description: "管理员权限验证中间件,在 auth 基础上进一步校验请求方是否具有管理员权限"
|
|
26334
26372
|
}).define(async (ctx) => {}).addTo(app, { overwrite: false });
|
|
26335
26373
|
|
|
26336
|
-
//
|
|
26374
|
+
// node_modules/zod/v4/classic/external.js
|
|
26337
26375
|
var exports_external2 = {};
|
|
26338
26376
|
__export(exports_external2, {
|
|
26339
26377
|
xor: () => xor2,
|
|
@@ -26574,7 +26612,7 @@ __export(exports_external2, {
|
|
|
26574
26612
|
$brand: () => $brand2
|
|
26575
26613
|
});
|
|
26576
26614
|
|
|
26577
|
-
//
|
|
26615
|
+
// node_modules/zod/v4/core/index.js
|
|
26578
26616
|
var exports_core3 = {};
|
|
26579
26617
|
__export(exports_core3, {
|
|
26580
26618
|
version: () => version3,
|
|
@@ -26852,7 +26890,7 @@ __export(exports_core3, {
|
|
|
26852
26890
|
$ZodAny: () => $ZodAny2
|
|
26853
26891
|
});
|
|
26854
26892
|
|
|
26855
|
-
//
|
|
26893
|
+
// node_modules/zod/v4/core/core.js
|
|
26856
26894
|
var NEVER2 = Object.freeze({
|
|
26857
26895
|
status: "aborted"
|
|
26858
26896
|
});
|
|
@@ -26928,7 +26966,7 @@ function config2(newConfig) {
|
|
|
26928
26966
|
Object.assign(globalConfig2, newConfig);
|
|
26929
26967
|
return globalConfig2;
|
|
26930
26968
|
}
|
|
26931
|
-
//
|
|
26969
|
+
// node_modules/zod/v4/core/util.js
|
|
26932
26970
|
var exports_util2 = {};
|
|
26933
26971
|
__export(exports_util2, {
|
|
26934
26972
|
unwrapMessage: () => unwrapMessage2,
|
|
@@ -27602,7 +27640,7 @@ class Class2 {
|
|
|
27602
27640
|
constructor(..._args) {}
|
|
27603
27641
|
}
|
|
27604
27642
|
|
|
27605
|
-
//
|
|
27643
|
+
// node_modules/zod/v4/core/errors.js
|
|
27606
27644
|
var initializer3 = (inst, def) => {
|
|
27607
27645
|
inst.name = "$ZodError";
|
|
27608
27646
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -27739,7 +27777,7 @@ function prettifyError2(error48) {
|
|
|
27739
27777
|
`);
|
|
27740
27778
|
}
|
|
27741
27779
|
|
|
27742
|
-
//
|
|
27780
|
+
// node_modules/zod/v4/core/parse.js
|
|
27743
27781
|
var _parse2 = (_Err) => (schema, value, _ctx, _params) => {
|
|
27744
27782
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
27745
27783
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -27826,7 +27864,7 @@ var _safeDecodeAsync2 = (_Err) => async (schema, value, _ctx) => {
|
|
|
27826
27864
|
return _safeParseAsync2(_Err)(schema, value, _ctx);
|
|
27827
27865
|
};
|
|
27828
27866
|
var safeDecodeAsync3 = /* @__PURE__ */ _safeDecodeAsync2($ZodRealError2);
|
|
27829
|
-
//
|
|
27867
|
+
// node_modules/zod/v4/core/regexes.js
|
|
27830
27868
|
var exports_regexes2 = {};
|
|
27831
27869
|
__export(exports_regexes2, {
|
|
27832
27870
|
xid: () => xid3,
|
|
@@ -27983,7 +28021,7 @@ var sha512_hex2 = /^[0-9a-fA-F]{128}$/;
|
|
|
27983
28021
|
var sha512_base642 = /* @__PURE__ */ fixedBase642(86, "==");
|
|
27984
28022
|
var sha512_base64url2 = /* @__PURE__ */ fixedBase64url2(86);
|
|
27985
28023
|
|
|
27986
|
-
//
|
|
28024
|
+
// node_modules/zod/v4/core/checks.js
|
|
27987
28025
|
var $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => {
|
|
27988
28026
|
var _a2;
|
|
27989
28027
|
inst._zod ?? (inst._zod = {});
|
|
@@ -28530,7 +28568,7 @@ var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (i
|
|
|
28530
28568
|
};
|
|
28531
28569
|
});
|
|
28532
28570
|
|
|
28533
|
-
//
|
|
28571
|
+
// node_modules/zod/v4/core/doc.js
|
|
28534
28572
|
class Doc2 {
|
|
28535
28573
|
constructor(args = []) {
|
|
28536
28574
|
this.content = [];
|
|
@@ -28568,14 +28606,14 @@ class Doc2 {
|
|
|
28568
28606
|
}
|
|
28569
28607
|
}
|
|
28570
28608
|
|
|
28571
|
-
//
|
|
28609
|
+
// node_modules/zod/v4/core/versions.js
|
|
28572
28610
|
var version3 = {
|
|
28573
28611
|
major: 4,
|
|
28574
28612
|
minor: 3,
|
|
28575
28613
|
patch: 6
|
|
28576
28614
|
};
|
|
28577
28615
|
|
|
28578
|
-
//
|
|
28616
|
+
// node_modules/zod/v4/core/schemas.js
|
|
28579
28617
|
var $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => {
|
|
28580
28618
|
var _a2;
|
|
28581
28619
|
inst ?? (inst = {});
|
|
@@ -30537,7 +30575,7 @@ function handleRefineResult2(result, payload, input, inst) {
|
|
|
30537
30575
|
payload.issues.push(issue2(_iss));
|
|
30538
30576
|
}
|
|
30539
30577
|
}
|
|
30540
|
-
//
|
|
30578
|
+
// node_modules/zod/v4/locales/index.js
|
|
30541
30579
|
var exports_locales2 = {};
|
|
30542
30580
|
__export(exports_locales2, {
|
|
30543
30581
|
zhTW: () => zh_TW_default2,
|
|
@@ -30591,7 +30629,7 @@ __export(exports_locales2, {
|
|
|
30591
30629
|
ar: () => ar_default2
|
|
30592
30630
|
});
|
|
30593
30631
|
|
|
30594
|
-
//
|
|
30632
|
+
// node_modules/zod/v4/locales/ar.js
|
|
30595
30633
|
var error48 = () => {
|
|
30596
30634
|
const Sizable = {
|
|
30597
30635
|
string: { unit: "حرف", verb: "أن يحوي" },
|
|
@@ -30697,7 +30735,7 @@ function ar_default2() {
|
|
|
30697
30735
|
localeError: error48()
|
|
30698
30736
|
};
|
|
30699
30737
|
}
|
|
30700
|
-
//
|
|
30738
|
+
// node_modules/zod/v4/locales/az.js
|
|
30701
30739
|
var error50 = () => {
|
|
30702
30740
|
const Sizable = {
|
|
30703
30741
|
string: { unit: "simvol", verb: "olmalıdır" },
|
|
@@ -30802,7 +30840,7 @@ function az_default2() {
|
|
|
30802
30840
|
localeError: error50()
|
|
30803
30841
|
};
|
|
30804
30842
|
}
|
|
30805
|
-
//
|
|
30843
|
+
// node_modules/zod/v4/locales/be.js
|
|
30806
30844
|
function getBelarusianPlural2(count, one, few, many) {
|
|
30807
30845
|
const absCount = Math.abs(count);
|
|
30808
30846
|
const lastDigit = absCount % 10;
|
|
@@ -30958,7 +30996,7 @@ function be_default2() {
|
|
|
30958
30996
|
localeError: error51()
|
|
30959
30997
|
};
|
|
30960
30998
|
}
|
|
30961
|
-
//
|
|
30999
|
+
// node_modules/zod/v4/locales/bg.js
|
|
30962
31000
|
var error52 = () => {
|
|
30963
31001
|
const Sizable = {
|
|
30964
31002
|
string: { unit: "символа", verb: "да съдържа" },
|
|
@@ -31078,7 +31116,7 @@ function bg_default2() {
|
|
|
31078
31116
|
localeError: error52()
|
|
31079
31117
|
};
|
|
31080
31118
|
}
|
|
31081
|
-
//
|
|
31119
|
+
// node_modules/zod/v4/locales/ca.js
|
|
31082
31120
|
var error53 = () => {
|
|
31083
31121
|
const Sizable = {
|
|
31084
31122
|
string: { unit: "caràcters", verb: "contenir" },
|
|
@@ -31185,7 +31223,7 @@ function ca_default2() {
|
|
|
31185
31223
|
localeError: error53()
|
|
31186
31224
|
};
|
|
31187
31225
|
}
|
|
31188
|
-
//
|
|
31226
|
+
// node_modules/zod/v4/locales/cs.js
|
|
31189
31227
|
var error54 = () => {
|
|
31190
31228
|
const Sizable = {
|
|
31191
31229
|
string: { unit: "znaků", verb: "mít" },
|
|
@@ -31296,7 +31334,7 @@ function cs_default2() {
|
|
|
31296
31334
|
localeError: error54()
|
|
31297
31335
|
};
|
|
31298
31336
|
}
|
|
31299
|
-
//
|
|
31337
|
+
// node_modules/zod/v4/locales/da.js
|
|
31300
31338
|
var error55 = () => {
|
|
31301
31339
|
const Sizable = {
|
|
31302
31340
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -31411,7 +31449,7 @@ function da_default2() {
|
|
|
31411
31449
|
localeError: error55()
|
|
31412
31450
|
};
|
|
31413
31451
|
}
|
|
31414
|
-
//
|
|
31452
|
+
// node_modules/zod/v4/locales/de.js
|
|
31415
31453
|
var error56 = () => {
|
|
31416
31454
|
const Sizable = {
|
|
31417
31455
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -31519,7 +31557,7 @@ function de_default2() {
|
|
|
31519
31557
|
localeError: error56()
|
|
31520
31558
|
};
|
|
31521
31559
|
}
|
|
31522
|
-
//
|
|
31560
|
+
// node_modules/zod/v4/locales/en.js
|
|
31523
31561
|
var error57 = () => {
|
|
31524
31562
|
const Sizable = {
|
|
31525
31563
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -31625,7 +31663,7 @@ function en_default2() {
|
|
|
31625
31663
|
localeError: error57()
|
|
31626
31664
|
};
|
|
31627
31665
|
}
|
|
31628
|
-
//
|
|
31666
|
+
// node_modules/zod/v4/locales/eo.js
|
|
31629
31667
|
var error58 = () => {
|
|
31630
31668
|
const Sizable = {
|
|
31631
31669
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -31734,7 +31772,7 @@ function eo_default2() {
|
|
|
31734
31772
|
localeError: error58()
|
|
31735
31773
|
};
|
|
31736
31774
|
}
|
|
31737
|
-
//
|
|
31775
|
+
// node_modules/zod/v4/locales/es.js
|
|
31738
31776
|
var error59 = () => {
|
|
31739
31777
|
const Sizable = {
|
|
31740
31778
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -31866,7 +31904,7 @@ function es_default2() {
|
|
|
31866
31904
|
localeError: error59()
|
|
31867
31905
|
};
|
|
31868
31906
|
}
|
|
31869
|
-
//
|
|
31907
|
+
// node_modules/zod/v4/locales/fa.js
|
|
31870
31908
|
var error60 = () => {
|
|
31871
31909
|
const Sizable = {
|
|
31872
31910
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
@@ -31980,7 +32018,7 @@ function fa_default2() {
|
|
|
31980
32018
|
localeError: error60()
|
|
31981
32019
|
};
|
|
31982
32020
|
}
|
|
31983
|
-
//
|
|
32021
|
+
// node_modules/zod/v4/locales/fi.js
|
|
31984
32022
|
var error61 = () => {
|
|
31985
32023
|
const Sizable = {
|
|
31986
32024
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
@@ -32092,7 +32130,7 @@ function fi_default2() {
|
|
|
32092
32130
|
localeError: error61()
|
|
32093
32131
|
};
|
|
32094
32132
|
}
|
|
32095
|
-
//
|
|
32133
|
+
// node_modules/zod/v4/locales/fr.js
|
|
32096
32134
|
var error62 = () => {
|
|
32097
32135
|
const Sizable = {
|
|
32098
32136
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -32200,7 +32238,7 @@ function fr_default2() {
|
|
|
32200
32238
|
localeError: error62()
|
|
32201
32239
|
};
|
|
32202
32240
|
}
|
|
32203
|
-
//
|
|
32241
|
+
// node_modules/zod/v4/locales/fr-CA.js
|
|
32204
32242
|
var error63 = () => {
|
|
32205
32243
|
const Sizable = {
|
|
32206
32244
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -32307,7 +32345,7 @@ function fr_CA_default2() {
|
|
|
32307
32345
|
localeError: error63()
|
|
32308
32346
|
};
|
|
32309
32347
|
}
|
|
32310
|
-
//
|
|
32348
|
+
// node_modules/zod/v4/locales/he.js
|
|
32311
32349
|
var error64 = () => {
|
|
32312
32350
|
const TypeNames = {
|
|
32313
32351
|
string: { label: "מחרוזת", gender: "f" },
|
|
@@ -32500,7 +32538,7 @@ function he_default2() {
|
|
|
32500
32538
|
localeError: error64()
|
|
32501
32539
|
};
|
|
32502
32540
|
}
|
|
32503
|
-
//
|
|
32541
|
+
// node_modules/zod/v4/locales/hu.js
|
|
32504
32542
|
var error65 = () => {
|
|
32505
32543
|
const Sizable = {
|
|
32506
32544
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -32608,7 +32646,7 @@ function hu_default2() {
|
|
|
32608
32646
|
localeError: error65()
|
|
32609
32647
|
};
|
|
32610
32648
|
}
|
|
32611
|
-
//
|
|
32649
|
+
// node_modules/zod/v4/locales/hy.js
|
|
32612
32650
|
function getArmenianPlural2(count, one, many) {
|
|
32613
32651
|
return Math.abs(count) === 1 ? one : many;
|
|
32614
32652
|
}
|
|
@@ -32755,7 +32793,7 @@ function hy_default2() {
|
|
|
32755
32793
|
localeError: error66()
|
|
32756
32794
|
};
|
|
32757
32795
|
}
|
|
32758
|
-
//
|
|
32796
|
+
// node_modules/zod/v4/locales/id.js
|
|
32759
32797
|
var error67 = () => {
|
|
32760
32798
|
const Sizable = {
|
|
32761
32799
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -32861,7 +32899,7 @@ function id_default2() {
|
|
|
32861
32899
|
localeError: error67()
|
|
32862
32900
|
};
|
|
32863
32901
|
}
|
|
32864
|
-
//
|
|
32902
|
+
// node_modules/zod/v4/locales/is.js
|
|
32865
32903
|
var error68 = () => {
|
|
32866
32904
|
const Sizable = {
|
|
32867
32905
|
string: { unit: "stafi", verb: "að hafa" },
|
|
@@ -32970,7 +33008,7 @@ function is_default2() {
|
|
|
32970
33008
|
localeError: error68()
|
|
32971
33009
|
};
|
|
32972
33010
|
}
|
|
32973
|
-
//
|
|
33011
|
+
// node_modules/zod/v4/locales/it.js
|
|
32974
33012
|
var error69 = () => {
|
|
32975
33013
|
const Sizable = {
|
|
32976
33014
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -33078,7 +33116,7 @@ function it_default2() {
|
|
|
33078
33116
|
localeError: error69()
|
|
33079
33117
|
};
|
|
33080
33118
|
}
|
|
33081
|
-
//
|
|
33119
|
+
// node_modules/zod/v4/locales/ja.js
|
|
33082
33120
|
var error70 = () => {
|
|
33083
33121
|
const Sizable = {
|
|
33084
33122
|
string: { unit: "文字", verb: "である" },
|
|
@@ -33185,7 +33223,7 @@ function ja_default2() {
|
|
|
33185
33223
|
localeError: error70()
|
|
33186
33224
|
};
|
|
33187
33225
|
}
|
|
33188
|
-
//
|
|
33226
|
+
// node_modules/zod/v4/locales/ka.js
|
|
33189
33227
|
var error71 = () => {
|
|
33190
33228
|
const Sizable = {
|
|
33191
33229
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
@@ -33297,7 +33335,7 @@ function ka_default2() {
|
|
|
33297
33335
|
localeError: error71()
|
|
33298
33336
|
};
|
|
33299
33337
|
}
|
|
33300
|
-
//
|
|
33338
|
+
// node_modules/zod/v4/locales/km.js
|
|
33301
33339
|
var error72 = () => {
|
|
33302
33340
|
const Sizable = {
|
|
33303
33341
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
@@ -33408,11 +33446,11 @@ function km_default2() {
|
|
|
33408
33446
|
};
|
|
33409
33447
|
}
|
|
33410
33448
|
|
|
33411
|
-
//
|
|
33449
|
+
// node_modules/zod/v4/locales/kh.js
|
|
33412
33450
|
function kh_default2() {
|
|
33413
33451
|
return km_default2();
|
|
33414
33452
|
}
|
|
33415
|
-
//
|
|
33453
|
+
// node_modules/zod/v4/locales/ko.js
|
|
33416
33454
|
var error73 = () => {
|
|
33417
33455
|
const Sizable = {
|
|
33418
33456
|
string: { unit: "문자", verb: "to have" },
|
|
@@ -33523,7 +33561,7 @@ function ko_default2() {
|
|
|
33523
33561
|
localeError: error73()
|
|
33524
33562
|
};
|
|
33525
33563
|
}
|
|
33526
|
-
//
|
|
33564
|
+
// node_modules/zod/v4/locales/lt.js
|
|
33527
33565
|
var capitalizeFirstCharacter2 = (text) => {
|
|
33528
33566
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
33529
33567
|
};
|
|
@@ -33726,7 +33764,7 @@ function lt_default2() {
|
|
|
33726
33764
|
localeError: error74()
|
|
33727
33765
|
};
|
|
33728
33766
|
}
|
|
33729
|
-
//
|
|
33767
|
+
// node_modules/zod/v4/locales/mk.js
|
|
33730
33768
|
var error75 = () => {
|
|
33731
33769
|
const Sizable = {
|
|
33732
33770
|
string: { unit: "знаци", verb: "да имаат" },
|
|
@@ -33835,7 +33873,7 @@ function mk_default2() {
|
|
|
33835
33873
|
localeError: error75()
|
|
33836
33874
|
};
|
|
33837
33875
|
}
|
|
33838
|
-
//
|
|
33876
|
+
// node_modules/zod/v4/locales/ms.js
|
|
33839
33877
|
var error76 = () => {
|
|
33840
33878
|
const Sizable = {
|
|
33841
33879
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -33942,7 +33980,7 @@ function ms_default2() {
|
|
|
33942
33980
|
localeError: error76()
|
|
33943
33981
|
};
|
|
33944
33982
|
}
|
|
33945
|
-
//
|
|
33983
|
+
// node_modules/zod/v4/locales/nl.js
|
|
33946
33984
|
var error77 = () => {
|
|
33947
33985
|
const Sizable = {
|
|
33948
33986
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -34052,7 +34090,7 @@ function nl_default2() {
|
|
|
34052
34090
|
localeError: error77()
|
|
34053
34091
|
};
|
|
34054
34092
|
}
|
|
34055
|
-
//
|
|
34093
|
+
// node_modules/zod/v4/locales/no.js
|
|
34056
34094
|
var error78 = () => {
|
|
34057
34095
|
const Sizable = {
|
|
34058
34096
|
string: { unit: "tegn", verb: "å ha" },
|
|
@@ -34160,7 +34198,7 @@ function no_default2() {
|
|
|
34160
34198
|
localeError: error78()
|
|
34161
34199
|
};
|
|
34162
34200
|
}
|
|
34163
|
-
//
|
|
34201
|
+
// node_modules/zod/v4/locales/ota.js
|
|
34164
34202
|
var error79 = () => {
|
|
34165
34203
|
const Sizable = {
|
|
34166
34204
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
@@ -34269,7 +34307,7 @@ function ota_default2() {
|
|
|
34269
34307
|
localeError: error79()
|
|
34270
34308
|
};
|
|
34271
34309
|
}
|
|
34272
|
-
//
|
|
34310
|
+
// node_modules/zod/v4/locales/ps.js
|
|
34273
34311
|
var error80 = () => {
|
|
34274
34312
|
const Sizable = {
|
|
34275
34313
|
string: { unit: "توکي", verb: "ولري" },
|
|
@@ -34383,7 +34421,7 @@ function ps_default2() {
|
|
|
34383
34421
|
localeError: error80()
|
|
34384
34422
|
};
|
|
34385
34423
|
}
|
|
34386
|
-
//
|
|
34424
|
+
// node_modules/zod/v4/locales/pl.js
|
|
34387
34425
|
var error81 = () => {
|
|
34388
34426
|
const Sizable = {
|
|
34389
34427
|
string: { unit: "znaków", verb: "mieć" },
|
|
@@ -34492,7 +34530,7 @@ function pl_default2() {
|
|
|
34492
34530
|
localeError: error81()
|
|
34493
34531
|
};
|
|
34494
34532
|
}
|
|
34495
|
-
//
|
|
34533
|
+
// node_modules/zod/v4/locales/pt.js
|
|
34496
34534
|
var error82 = () => {
|
|
34497
34535
|
const Sizable = {
|
|
34498
34536
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -34600,7 +34638,7 @@ function pt_default2() {
|
|
|
34600
34638
|
localeError: error82()
|
|
34601
34639
|
};
|
|
34602
34640
|
}
|
|
34603
|
-
//
|
|
34641
|
+
// node_modules/zod/v4/locales/ru.js
|
|
34604
34642
|
function getRussianPlural2(count, one, few, many) {
|
|
34605
34643
|
const absCount = Math.abs(count);
|
|
34606
34644
|
const lastDigit = absCount % 10;
|
|
@@ -34756,7 +34794,7 @@ function ru_default2() {
|
|
|
34756
34794
|
localeError: error83()
|
|
34757
34795
|
};
|
|
34758
34796
|
}
|
|
34759
|
-
//
|
|
34797
|
+
// node_modules/zod/v4/locales/sl.js
|
|
34760
34798
|
var error84 = () => {
|
|
34761
34799
|
const Sizable = {
|
|
34762
34800
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -34865,7 +34903,7 @@ function sl_default2() {
|
|
|
34865
34903
|
localeError: error84()
|
|
34866
34904
|
};
|
|
34867
34905
|
}
|
|
34868
|
-
//
|
|
34906
|
+
// node_modules/zod/v4/locales/sv.js
|
|
34869
34907
|
var error85 = () => {
|
|
34870
34908
|
const Sizable = {
|
|
34871
34909
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -34975,7 +35013,7 @@ function sv_default2() {
|
|
|
34975
35013
|
localeError: error85()
|
|
34976
35014
|
};
|
|
34977
35015
|
}
|
|
34978
|
-
//
|
|
35016
|
+
// node_modules/zod/v4/locales/ta.js
|
|
34979
35017
|
var error86 = () => {
|
|
34980
35018
|
const Sizable = {
|
|
34981
35019
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -35085,7 +35123,7 @@ function ta_default2() {
|
|
|
35085
35123
|
localeError: error86()
|
|
35086
35124
|
};
|
|
35087
35125
|
}
|
|
35088
|
-
//
|
|
35126
|
+
// node_modules/zod/v4/locales/th.js
|
|
35089
35127
|
var error87 = () => {
|
|
35090
35128
|
const Sizable = {
|
|
35091
35129
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
@@ -35195,7 +35233,7 @@ function th_default2() {
|
|
|
35195
35233
|
localeError: error87()
|
|
35196
35234
|
};
|
|
35197
35235
|
}
|
|
35198
|
-
//
|
|
35236
|
+
// node_modules/zod/v4/locales/tr.js
|
|
35199
35237
|
var error88 = () => {
|
|
35200
35238
|
const Sizable = {
|
|
35201
35239
|
string: { unit: "karakter", verb: "olmalı" },
|
|
@@ -35300,7 +35338,7 @@ function tr_default2() {
|
|
|
35300
35338
|
localeError: error88()
|
|
35301
35339
|
};
|
|
35302
35340
|
}
|
|
35303
|
-
//
|
|
35341
|
+
// node_modules/zod/v4/locales/uk.js
|
|
35304
35342
|
var error89 = () => {
|
|
35305
35343
|
const Sizable = {
|
|
35306
35344
|
string: { unit: "символів", verb: "матиме" },
|
|
@@ -35409,11 +35447,11 @@ function uk_default2() {
|
|
|
35409
35447
|
};
|
|
35410
35448
|
}
|
|
35411
35449
|
|
|
35412
|
-
//
|
|
35450
|
+
// node_modules/zod/v4/locales/ua.js
|
|
35413
35451
|
function ua_default2() {
|
|
35414
35452
|
return uk_default2();
|
|
35415
35453
|
}
|
|
35416
|
-
//
|
|
35454
|
+
// node_modules/zod/v4/locales/ur.js
|
|
35417
35455
|
var error90 = () => {
|
|
35418
35456
|
const Sizable = {
|
|
35419
35457
|
string: { unit: "حروف", verb: "ہونا" },
|
|
@@ -35523,7 +35561,7 @@ function ur_default2() {
|
|
|
35523
35561
|
localeError: error90()
|
|
35524
35562
|
};
|
|
35525
35563
|
}
|
|
35526
|
-
//
|
|
35564
|
+
// node_modules/zod/v4/locales/uz.js
|
|
35527
35565
|
var error91 = () => {
|
|
35528
35566
|
const Sizable = {
|
|
35529
35567
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
@@ -35632,7 +35670,7 @@ function uz_default2() {
|
|
|
35632
35670
|
localeError: error91()
|
|
35633
35671
|
};
|
|
35634
35672
|
}
|
|
35635
|
-
//
|
|
35673
|
+
// node_modules/zod/v4/locales/vi.js
|
|
35636
35674
|
var error92 = () => {
|
|
35637
35675
|
const Sizable = {
|
|
35638
35676
|
string: { unit: "ký tự", verb: "có" },
|
|
@@ -35740,7 +35778,7 @@ function vi_default2() {
|
|
|
35740
35778
|
localeError: error92()
|
|
35741
35779
|
};
|
|
35742
35780
|
}
|
|
35743
|
-
//
|
|
35781
|
+
// node_modules/zod/v4/locales/zh-CN.js
|
|
35744
35782
|
var error93 = () => {
|
|
35745
35783
|
const Sizable = {
|
|
35746
35784
|
string: { unit: "字符", verb: "包含" },
|
|
@@ -35849,7 +35887,7 @@ function zh_CN_default2() {
|
|
|
35849
35887
|
localeError: error93()
|
|
35850
35888
|
};
|
|
35851
35889
|
}
|
|
35852
|
-
//
|
|
35890
|
+
// node_modules/zod/v4/locales/zh-TW.js
|
|
35853
35891
|
var error94 = () => {
|
|
35854
35892
|
const Sizable = {
|
|
35855
35893
|
string: { unit: "字元", verb: "擁有" },
|
|
@@ -35956,7 +35994,7 @@ function zh_TW_default2() {
|
|
|
35956
35994
|
localeError: error94()
|
|
35957
35995
|
};
|
|
35958
35996
|
}
|
|
35959
|
-
//
|
|
35997
|
+
// node_modules/zod/v4/locales/yo.js
|
|
35960
35998
|
var error95 = () => {
|
|
35961
35999
|
const Sizable = {
|
|
35962
36000
|
string: { unit: "àmi", verb: "ní" },
|
|
@@ -36063,7 +36101,7 @@ function yo_default2() {
|
|
|
36063
36101
|
localeError: error95()
|
|
36064
36102
|
};
|
|
36065
36103
|
}
|
|
36066
|
-
//
|
|
36104
|
+
// node_modules/zod/v4/core/registries.js
|
|
36067
36105
|
var _a2;
|
|
36068
36106
|
var $output2 = Symbol("ZodOutput");
|
|
36069
36107
|
var $input2 = Symbol("ZodInput");
|
|
@@ -36113,7 +36151,7 @@ function registry2() {
|
|
|
36113
36151
|
}
|
|
36114
36152
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry2());
|
|
36115
36153
|
var globalRegistry2 = globalThis.__zod_globalRegistry;
|
|
36116
|
-
//
|
|
36154
|
+
// node_modules/zod/v4/core/api.js
|
|
36117
36155
|
function _string2(Class3, params) {
|
|
36118
36156
|
return new Class3({
|
|
36119
36157
|
type: "string",
|
|
@@ -37033,7 +37071,7 @@ function _stringFormat2(Class3, format, fnOrRegex, _params = {}) {
|
|
|
37033
37071
|
const inst = new Class3(def);
|
|
37034
37072
|
return inst;
|
|
37035
37073
|
}
|
|
37036
|
-
//
|
|
37074
|
+
// node_modules/zod/v4/core/to-json-schema.js
|
|
37037
37075
|
function initializeContext2(params) {
|
|
37038
37076
|
let target = params?.target ?? "draft-2020-12";
|
|
37039
37077
|
if (target === "draft-4")
|
|
@@ -37378,7 +37416,7 @@ var createStandardJSONSchemaMethod2 = (schema, io, processors = {}) => (params)
|
|
|
37378
37416
|
extractDefs2(ctx, schema);
|
|
37379
37417
|
return finalize2(ctx, schema);
|
|
37380
37418
|
};
|
|
37381
|
-
//
|
|
37419
|
+
// node_modules/zod/v4/core/json-schema-processors.js
|
|
37382
37420
|
var formatMap2 = {
|
|
37383
37421
|
guid: "uuid",
|
|
37384
37422
|
url: "uri",
|
|
@@ -37923,7 +37961,7 @@ function toJSONSchema4(input, params) {
|
|
|
37923
37961
|
extractDefs2(ctx, input);
|
|
37924
37962
|
return finalize2(ctx, input);
|
|
37925
37963
|
}
|
|
37926
|
-
//
|
|
37964
|
+
// node_modules/zod/v4/core/json-schema-generator.js
|
|
37927
37965
|
class JSONSchemaGenerator2 {
|
|
37928
37966
|
get metadataRegistry() {
|
|
37929
37967
|
return this.ctx.metadataRegistry;
|
|
@@ -37982,9 +38020,9 @@ class JSONSchemaGenerator2 {
|
|
|
37982
38020
|
return plainResult;
|
|
37983
38021
|
}
|
|
37984
38022
|
}
|
|
37985
|
-
//
|
|
38023
|
+
// node_modules/zod/v4/core/json-schema.js
|
|
37986
38024
|
var exports_json_schema2 = {};
|
|
37987
|
-
//
|
|
38025
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
37988
38026
|
var exports_schemas3 = {};
|
|
37989
38027
|
__export(exports_schemas3, {
|
|
37990
38028
|
xor: () => xor2,
|
|
@@ -38153,7 +38191,7 @@ __export(exports_schemas3, {
|
|
|
38153
38191
|
ZodAny: () => ZodAny2
|
|
38154
38192
|
});
|
|
38155
38193
|
|
|
38156
|
-
//
|
|
38194
|
+
// node_modules/zod/v4/classic/checks.js
|
|
38157
38195
|
var exports_checks3 = {};
|
|
38158
38196
|
__export(exports_checks3, {
|
|
38159
38197
|
uppercase: () => _uppercase2,
|
|
@@ -38187,7 +38225,7 @@ __export(exports_checks3, {
|
|
|
38187
38225
|
endsWith: () => _endsWith2
|
|
38188
38226
|
});
|
|
38189
38227
|
|
|
38190
|
-
//
|
|
38228
|
+
// node_modules/zod/v4/classic/iso.js
|
|
38191
38229
|
var exports_iso2 = {};
|
|
38192
38230
|
__export(exports_iso2, {
|
|
38193
38231
|
time: () => time5,
|
|
@@ -38228,7 +38266,7 @@ function duration5(params) {
|
|
|
38228
38266
|
return _isoDuration2(ZodISODuration2, params);
|
|
38229
38267
|
}
|
|
38230
38268
|
|
|
38231
|
-
//
|
|
38269
|
+
// node_modules/zod/v4/classic/errors.js
|
|
38232
38270
|
var initializer5 = (inst, issues) => {
|
|
38233
38271
|
$ZodError2.init(inst, issues);
|
|
38234
38272
|
inst.name = "ZodError";
|
|
@@ -38263,7 +38301,7 @@ var ZodRealError2 = $constructor2("ZodError", initializer5, {
|
|
|
38263
38301
|
Parent: Error
|
|
38264
38302
|
});
|
|
38265
38303
|
|
|
38266
|
-
//
|
|
38304
|
+
// node_modules/zod/v4/classic/parse.js
|
|
38267
38305
|
var parse6 = /* @__PURE__ */ _parse2(ZodRealError2);
|
|
38268
38306
|
var parseAsync5 = /* @__PURE__ */ _parseAsync2(ZodRealError2);
|
|
38269
38307
|
var safeParse5 = /* @__PURE__ */ _safeParse2(ZodRealError2);
|
|
@@ -38277,7 +38315,7 @@ var safeDecode5 = /* @__PURE__ */ _safeDecode2(ZodRealError2);
|
|
|
38277
38315
|
var safeEncodeAsync5 = /* @__PURE__ */ _safeEncodeAsync2(ZodRealError2);
|
|
38278
38316
|
var safeDecodeAsync5 = /* @__PURE__ */ _safeDecodeAsync2(ZodRealError2);
|
|
38279
38317
|
|
|
38280
|
-
//
|
|
38318
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
38281
38319
|
var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
|
|
38282
38320
|
$ZodType2.init(inst, def);
|
|
38283
38321
|
Object.assign(inst["~standard"], {
|
|
@@ -39353,7 +39391,7 @@ function json2(params) {
|
|
|
39353
39391
|
function preprocess2(fn, schema) {
|
|
39354
39392
|
return pipe2(transform2(fn), schema);
|
|
39355
39393
|
}
|
|
39356
|
-
//
|
|
39394
|
+
// node_modules/zod/v4/classic/compat.js
|
|
39357
39395
|
var ZodIssueCode2 = {
|
|
39358
39396
|
invalid_type: "invalid_type",
|
|
39359
39397
|
too_big: "too_big",
|
|
@@ -39377,7 +39415,7 @@ function getErrorMap2() {
|
|
|
39377
39415
|
}
|
|
39378
39416
|
var ZodFirstPartyTypeKind2;
|
|
39379
39417
|
(function(ZodFirstPartyTypeKind3) {})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
|
|
39380
|
-
//
|
|
39418
|
+
// node_modules/zod/v4/classic/from-json-schema.js
|
|
39381
39419
|
var z2 = {
|
|
39382
39420
|
...exports_schemas3,
|
|
39383
39421
|
...exports_checks3,
|
|
@@ -39838,7 +39876,7 @@ function fromJSONSchema4(schema, params) {
|
|
|
39838
39876
|
};
|
|
39839
39877
|
return convertSchema2(schema, ctx);
|
|
39840
39878
|
}
|
|
39841
|
-
//
|
|
39879
|
+
// node_modules/zod/v4/classic/coerce.js
|
|
39842
39880
|
var exports_coerce2 = {};
|
|
39843
39881
|
__export(exports_coerce2, {
|
|
39844
39882
|
string: () => string7,
|
|
@@ -39863,21 +39901,27 @@ function date9(params) {
|
|
|
39863
39901
|
return _coercedDate2(ZodDate2, params);
|
|
39864
39902
|
}
|
|
39865
39903
|
|
|
39866
|
-
//
|
|
39904
|
+
// node_modules/zod/v4/classic/external.js
|
|
39867
39905
|
config2(en_default2());
|
|
39868
39906
|
// src/project/util/git.ts
|
|
39869
39907
|
import { execSync } from "node:child_process";
|
|
39908
|
+
var getPathnameFromGitUrl = (url4) => {
|
|
39909
|
+
const _url3 = new URL(url4.replace(/\.git$/, ""));
|
|
39910
|
+
const pathname = _url3.pathname.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
39911
|
+
return pathname;
|
|
39912
|
+
};
|
|
39870
39913
|
var getGitPathname = (repoPath) => {
|
|
39871
39914
|
try {
|
|
39872
39915
|
const url4 = execSync("git config --get remote.origin.url", { cwd: repoPath, encoding: "utf-8" }).trim();
|
|
39873
39916
|
if (url4) {
|
|
39874
|
-
|
|
39875
|
-
|
|
39876
|
-
|
|
39917
|
+
return {
|
|
39918
|
+
url: url4,
|
|
39919
|
+
pathname: getPathnameFromGitUrl(url4)
|
|
39920
|
+
};
|
|
39877
39921
|
}
|
|
39878
39922
|
return null;
|
|
39879
39923
|
} catch (err) {
|
|
39880
|
-
console.warn(`[getGitPathname] Failed to get git remote url for ${repoPath}
|
|
39924
|
+
console.warn(`[getGitPathname] Failed to get git remote url for ${repoPath}:`, err);
|
|
39881
39925
|
return null;
|
|
39882
39926
|
}
|
|
39883
39927
|
};
|
|
@@ -39892,23 +39936,35 @@ app.route({
|
|
|
39892
39936
|
args: {
|
|
39893
39937
|
filepath: exports_external2.string().describe("项目根目录的绝对路径,必填"),
|
|
39894
39938
|
repo: exports_external2.string().optional().describe("代码仓库标识,用于搜索结果展示和过滤,格式如 owner/repo,例如 kevisual/cnb,选填(默认自动从 git 配置读取)"),
|
|
39895
|
-
name: exports_external2.string().optional().describe("项目显示名称,用于搜索结果展示,选填(默认使用目录名)")
|
|
39939
|
+
name: exports_external2.string().optional().describe("项目显示名称,用于搜索结果展示,选填(默认使用目录名)"),
|
|
39940
|
+
type: exports_external2.string().optional().describe("项目类型,filepath或cnb-repo,默认为filepath")
|
|
39896
39941
|
}
|
|
39897
39942
|
}
|
|
39898
39943
|
}).define(async (ctx) => {
|
|
39899
|
-
let { filepath, repo, name } = ctx.query;
|
|
39944
|
+
let { filepath, repo, name, type = "filepath" } = ctx.query;
|
|
39900
39945
|
if (!filepath)
|
|
39901
39946
|
ctx.throw(400, "filepath 不能为空");
|
|
39947
|
+
if (type === "cnb-repo") {
|
|
39948
|
+
const msg = {
|
|
39949
|
+
path: "project",
|
|
39950
|
+
key: "clone-cnb"
|
|
39951
|
+
};
|
|
39952
|
+
const res = await app.run({ ...msg, payload: { repo: filepath } }, { state: ctx.state });
|
|
39953
|
+
ctx.forward(res);
|
|
39954
|
+
return;
|
|
39955
|
+
}
|
|
39956
|
+
let link = "";
|
|
39902
39957
|
if (!repo) {
|
|
39903
39958
|
const gitPathname = getGitPathname(filepath);
|
|
39904
39959
|
if (gitPathname) {
|
|
39905
|
-
repo = gitPathname;
|
|
39960
|
+
repo = gitPathname.pathname;
|
|
39961
|
+
link = gitPathname.url;
|
|
39906
39962
|
} else {
|
|
39907
39963
|
const pathParts = filepath.split("/");
|
|
39908
39964
|
repo = pathParts[pathParts.length - 1];
|
|
39909
39965
|
}
|
|
39910
39966
|
}
|
|
39911
|
-
const info = await manager.addProject({ path: filepath, repo, name });
|
|
39967
|
+
const info = await manager.addProject({ path: filepath, repo, name, link: link || (repo ? `https://cnb.cool/${repo}` : undefined) });
|
|
39912
39968
|
ctx.body = { success: true, data: info };
|
|
39913
39969
|
}).addTo(app);
|
|
39914
39970
|
app.route({
|
|
@@ -40127,6 +40183,130 @@ app.route({
|
|
|
40127
40183
|
}
|
|
40128
40184
|
}).addTo(app);
|
|
40129
40185
|
|
|
40186
|
+
// src/routes/project-init.ts
|
|
40187
|
+
import fs5 from "node:fs";
|
|
40188
|
+
import path6 from "node:path";
|
|
40189
|
+
import { execSync as execSync2 } from "node:child_process";
|
|
40190
|
+
var DEFAULT_ROOT_PATH = "/workspace/projects";
|
|
40191
|
+
var getProjectPaths = (ctx) => {
|
|
40192
|
+
const rootPath = path6.resolve(ctx.query.rootPath || DEFAULT_ROOT_PATH);
|
|
40193
|
+
if (!fs5.existsSync(rootPath)) {
|
|
40194
|
+
ctx.throw(400, "rootPath 指定的目录不存在");
|
|
40195
|
+
}
|
|
40196
|
+
const projectPaths = [];
|
|
40197
|
+
try {
|
|
40198
|
+
const entries = fs5.readdirSync(rootPath, { withFileTypes: true });
|
|
40199
|
+
for (const entry of entries) {
|
|
40200
|
+
if (!entry.isDirectory())
|
|
40201
|
+
continue;
|
|
40202
|
+
const fullPath = path6.join(rootPath, entry.name);
|
|
40203
|
+
if (entry.name === "node_modules" || entry.name.startsWith("."))
|
|
40204
|
+
continue;
|
|
40205
|
+
if (fs5.existsSync(path6.join(fullPath, ".git"))) {
|
|
40206
|
+
projectPaths.push(fullPath);
|
|
40207
|
+
}
|
|
40208
|
+
}
|
|
40209
|
+
} catch (err) {
|
|
40210
|
+
console.warn(`[project-init] Failed to read root directory ${rootPath}:`, err);
|
|
40211
|
+
}
|
|
40212
|
+
return {
|
|
40213
|
+
rootPath,
|
|
40214
|
+
projectPaths
|
|
40215
|
+
};
|
|
40216
|
+
};
|
|
40217
|
+
app.route({
|
|
40218
|
+
path: "project",
|
|
40219
|
+
key: "init",
|
|
40220
|
+
description: "初始化项目,通过root目录,搜索当前有git的项目列表,并将其注册到系统中",
|
|
40221
|
+
middleware: ["auth-admin"],
|
|
40222
|
+
metadata: {
|
|
40223
|
+
args: {
|
|
40224
|
+
rootPath: exports_external2.string().optional().describe("搜索项目的根目录绝对路径,默认为 /workspace/projects")
|
|
40225
|
+
}
|
|
40226
|
+
}
|
|
40227
|
+
}).define(async (ctx) => {
|
|
40228
|
+
const { rootPath, projectPaths } = getProjectPaths(ctx);
|
|
40229
|
+
const results = [];
|
|
40230
|
+
for (const projectPath of projectPaths) {
|
|
40231
|
+
try {
|
|
40232
|
+
const gitRepo = getGitPathname(projectPath);
|
|
40233
|
+
const repo = gitRepo?.pathname || path6.basename(projectPath);
|
|
40234
|
+
const name = path6.basename(projectPath);
|
|
40235
|
+
await manager.addProject({ path: projectPath, repo, name, link: gitRepo?.url });
|
|
40236
|
+
results.push({ path: projectPath, repo, success: true });
|
|
40237
|
+
console.log(`[project-init] Added project: ${projectPath}, repo: ${repo}`);
|
|
40238
|
+
} catch (err) {
|
|
40239
|
+
const error49 = err instanceof Error ? err.message : String(err);
|
|
40240
|
+
results.push({ path: projectPath, repo: null, success: false, error: error49 });
|
|
40241
|
+
console.error(`[project-init] Failed to add project ${projectPath}:`, err);
|
|
40242
|
+
}
|
|
40243
|
+
}
|
|
40244
|
+
ctx.body = {
|
|
40245
|
+
rootPath,
|
|
40246
|
+
totalFound: projectPaths.length,
|
|
40247
|
+
results
|
|
40248
|
+
};
|
|
40249
|
+
}).addTo(app);
|
|
40250
|
+
app.route({
|
|
40251
|
+
path: "project",
|
|
40252
|
+
key: "list-projects",
|
|
40253
|
+
description: "列出当前工作区已注册的项目",
|
|
40254
|
+
middleware: ["auth-admin"],
|
|
40255
|
+
metadata: {
|
|
40256
|
+
args: {
|
|
40257
|
+
rootPath: exports_external2.string().optional().describe("项目根目录绝对路径,默认为 /workspace/projects,指定后只列出该目录下的项目")
|
|
40258
|
+
}
|
|
40259
|
+
}
|
|
40260
|
+
}).define(async (ctx) => {
|
|
40261
|
+
const { rootPath, projectPaths } = getProjectPaths(ctx);
|
|
40262
|
+
ctx.body = {
|
|
40263
|
+
rootPath,
|
|
40264
|
+
list: projectPaths
|
|
40265
|
+
};
|
|
40266
|
+
}).addTo(app);
|
|
40267
|
+
app.route({
|
|
40268
|
+
path: "project",
|
|
40269
|
+
key: "clone-cnb",
|
|
40270
|
+
description: "clone 一个项目到projects目录下,并注册到系统中。",
|
|
40271
|
+
middleware: ["auth-admin"],
|
|
40272
|
+
metadata: {
|
|
40273
|
+
args: {
|
|
40274
|
+
filepath: exports_external2.string().optional().describe("新项目根目录的绝对路径,默认在 /workspace/projects 下以仓库名创建子目录"),
|
|
40275
|
+
repo: exports_external2.string().describe("代码仓库标识,用于搜索结果展示和过滤,格式如 owner/repo,例如 kevisual/cnb,必填")
|
|
40276
|
+
}
|
|
40277
|
+
}
|
|
40278
|
+
}).define(async (ctx) => {
|
|
40279
|
+
const { filepath = DEFAULT_ROOT_PATH, repo = "" } = ctx.query;
|
|
40280
|
+
let cloneRepoUrl = "";
|
|
40281
|
+
if (repo?.startsWith("http")) {
|
|
40282
|
+
cloneRepoUrl = repo;
|
|
40283
|
+
} else if (repo) {
|
|
40284
|
+
cloneRepoUrl = `https://cnb.cool/${repo}`;
|
|
40285
|
+
} else {
|
|
40286
|
+
ctx.throw(400, "repo 参数不能为空,且必须是完整的 URL 或者 owner/repo 格式");
|
|
40287
|
+
}
|
|
40288
|
+
const name = getPathnameFromGitUrl(cloneRepoUrl);
|
|
40289
|
+
if (!name) {
|
|
40290
|
+
ctx.throw(400, "无法从 repo 参数解析出项目名称,请检查 repo 格式是否正确");
|
|
40291
|
+
}
|
|
40292
|
+
const targetPath = path6.join(filepath, name);
|
|
40293
|
+
if (fs5.existsSync(targetPath)) {
|
|
40294
|
+
ctx.throw(400, `目标路径已存在: ${targetPath}`);
|
|
40295
|
+
}
|
|
40296
|
+
const cloneCmd = `git clone ${cloneRepoUrl} ${targetPath}`;
|
|
40297
|
+
try {
|
|
40298
|
+
console.log(`[project-clone] Cloning repo ${cloneRepoUrl} to ${targetPath}...`);
|
|
40299
|
+
execSync2(cloneCmd, { stdio: "inherit" });
|
|
40300
|
+
console.log(`[project-clone] Clone successful, adding project...`);
|
|
40301
|
+
const info = await manager.addProject({ path: targetPath, repo: name, name, link: cloneRepoUrl });
|
|
40302
|
+
ctx.body = info;
|
|
40303
|
+
} catch (err) {
|
|
40304
|
+
const error49 = err instanceof Error ? err.message : String(err);
|
|
40305
|
+
console.error(`[project-clone] Failed to clone and add project from ${cloneRepoUrl}:`, err);
|
|
40306
|
+
ctx.throw(500, `Failed to clone and add project: ${error49}`);
|
|
40307
|
+
}
|
|
40308
|
+
}).addTo(app);
|
|
40309
|
+
|
|
40130
40310
|
// src/index.ts
|
|
40131
40311
|
if (__require.main == __require.module) {}
|
|
40132
40312
|
await manager.init();
|