@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/remote.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) {
|
|
@@ -26300,7 +26338,7 @@ app.route({
|
|
|
26300
26338
|
description: "管理员权限验证中间件,在 auth 基础上进一步校验请求方是否具有管理员权限"
|
|
26301
26339
|
}).define(async (ctx) => {}).addTo(app, { overwrite: false });
|
|
26302
26340
|
|
|
26303
|
-
//
|
|
26341
|
+
// node_modules/zod/v4/classic/external.js
|
|
26304
26342
|
var exports_external2 = {};
|
|
26305
26343
|
__export(exports_external2, {
|
|
26306
26344
|
xor: () => xor2,
|
|
@@ -26541,7 +26579,7 @@ __export(exports_external2, {
|
|
|
26541
26579
|
$brand: () => $brand2
|
|
26542
26580
|
});
|
|
26543
26581
|
|
|
26544
|
-
//
|
|
26582
|
+
// node_modules/zod/v4/core/index.js
|
|
26545
26583
|
var exports_core3 = {};
|
|
26546
26584
|
__export(exports_core3, {
|
|
26547
26585
|
version: () => version3,
|
|
@@ -26819,7 +26857,7 @@ __export(exports_core3, {
|
|
|
26819
26857
|
$ZodAny: () => $ZodAny2
|
|
26820
26858
|
});
|
|
26821
26859
|
|
|
26822
|
-
//
|
|
26860
|
+
// node_modules/zod/v4/core/core.js
|
|
26823
26861
|
var NEVER2 = Object.freeze({
|
|
26824
26862
|
status: "aborted"
|
|
26825
26863
|
});
|
|
@@ -26895,7 +26933,7 @@ function config2(newConfig) {
|
|
|
26895
26933
|
Object.assign(globalConfig2, newConfig);
|
|
26896
26934
|
return globalConfig2;
|
|
26897
26935
|
}
|
|
26898
|
-
//
|
|
26936
|
+
// node_modules/zod/v4/core/util.js
|
|
26899
26937
|
var exports_util2 = {};
|
|
26900
26938
|
__export(exports_util2, {
|
|
26901
26939
|
unwrapMessage: () => unwrapMessage2,
|
|
@@ -27569,7 +27607,7 @@ class Class2 {
|
|
|
27569
27607
|
constructor(..._args) {}
|
|
27570
27608
|
}
|
|
27571
27609
|
|
|
27572
|
-
//
|
|
27610
|
+
// node_modules/zod/v4/core/errors.js
|
|
27573
27611
|
var initializer3 = (inst, def) => {
|
|
27574
27612
|
inst.name = "$ZodError";
|
|
27575
27613
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -27706,7 +27744,7 @@ function prettifyError2(error48) {
|
|
|
27706
27744
|
`);
|
|
27707
27745
|
}
|
|
27708
27746
|
|
|
27709
|
-
//
|
|
27747
|
+
// node_modules/zod/v4/core/parse.js
|
|
27710
27748
|
var _parse2 = (_Err) => (schema, value, _ctx, _params) => {
|
|
27711
27749
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
27712
27750
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -27793,7 +27831,7 @@ var _safeDecodeAsync2 = (_Err) => async (schema, value, _ctx) => {
|
|
|
27793
27831
|
return _safeParseAsync2(_Err)(schema, value, _ctx);
|
|
27794
27832
|
};
|
|
27795
27833
|
var safeDecodeAsync3 = /* @__PURE__ */ _safeDecodeAsync2($ZodRealError2);
|
|
27796
|
-
//
|
|
27834
|
+
// node_modules/zod/v4/core/regexes.js
|
|
27797
27835
|
var exports_regexes2 = {};
|
|
27798
27836
|
__export(exports_regexes2, {
|
|
27799
27837
|
xid: () => xid3,
|
|
@@ -27950,7 +27988,7 @@ var sha512_hex2 = /^[0-9a-fA-F]{128}$/;
|
|
|
27950
27988
|
var sha512_base642 = /* @__PURE__ */ fixedBase642(86, "==");
|
|
27951
27989
|
var sha512_base64url2 = /* @__PURE__ */ fixedBase64url2(86);
|
|
27952
27990
|
|
|
27953
|
-
//
|
|
27991
|
+
// node_modules/zod/v4/core/checks.js
|
|
27954
27992
|
var $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => {
|
|
27955
27993
|
var _a2;
|
|
27956
27994
|
inst._zod ?? (inst._zod = {});
|
|
@@ -28497,7 +28535,7 @@ var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (i
|
|
|
28497
28535
|
};
|
|
28498
28536
|
});
|
|
28499
28537
|
|
|
28500
|
-
//
|
|
28538
|
+
// node_modules/zod/v4/core/doc.js
|
|
28501
28539
|
class Doc2 {
|
|
28502
28540
|
constructor(args = []) {
|
|
28503
28541
|
this.content = [];
|
|
@@ -28535,14 +28573,14 @@ class Doc2 {
|
|
|
28535
28573
|
}
|
|
28536
28574
|
}
|
|
28537
28575
|
|
|
28538
|
-
//
|
|
28576
|
+
// node_modules/zod/v4/core/versions.js
|
|
28539
28577
|
var version3 = {
|
|
28540
28578
|
major: 4,
|
|
28541
28579
|
minor: 3,
|
|
28542
28580
|
patch: 6
|
|
28543
28581
|
};
|
|
28544
28582
|
|
|
28545
|
-
//
|
|
28583
|
+
// node_modules/zod/v4/core/schemas.js
|
|
28546
28584
|
var $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => {
|
|
28547
28585
|
var _a2;
|
|
28548
28586
|
inst ?? (inst = {});
|
|
@@ -30504,7 +30542,7 @@ function handleRefineResult2(result, payload, input, inst) {
|
|
|
30504
30542
|
payload.issues.push(issue2(_iss));
|
|
30505
30543
|
}
|
|
30506
30544
|
}
|
|
30507
|
-
//
|
|
30545
|
+
// node_modules/zod/v4/locales/index.js
|
|
30508
30546
|
var exports_locales2 = {};
|
|
30509
30547
|
__export(exports_locales2, {
|
|
30510
30548
|
zhTW: () => zh_TW_default2,
|
|
@@ -30558,7 +30596,7 @@ __export(exports_locales2, {
|
|
|
30558
30596
|
ar: () => ar_default2
|
|
30559
30597
|
});
|
|
30560
30598
|
|
|
30561
|
-
//
|
|
30599
|
+
// node_modules/zod/v4/locales/ar.js
|
|
30562
30600
|
var error48 = () => {
|
|
30563
30601
|
const Sizable = {
|
|
30564
30602
|
string: { unit: "حرف", verb: "أن يحوي" },
|
|
@@ -30664,7 +30702,7 @@ function ar_default2() {
|
|
|
30664
30702
|
localeError: error48()
|
|
30665
30703
|
};
|
|
30666
30704
|
}
|
|
30667
|
-
//
|
|
30705
|
+
// node_modules/zod/v4/locales/az.js
|
|
30668
30706
|
var error50 = () => {
|
|
30669
30707
|
const Sizable = {
|
|
30670
30708
|
string: { unit: "simvol", verb: "olmalıdır" },
|
|
@@ -30769,7 +30807,7 @@ function az_default2() {
|
|
|
30769
30807
|
localeError: error50()
|
|
30770
30808
|
};
|
|
30771
30809
|
}
|
|
30772
|
-
//
|
|
30810
|
+
// node_modules/zod/v4/locales/be.js
|
|
30773
30811
|
function getBelarusianPlural2(count, one, few, many) {
|
|
30774
30812
|
const absCount = Math.abs(count);
|
|
30775
30813
|
const lastDigit = absCount % 10;
|
|
@@ -30925,7 +30963,7 @@ function be_default2() {
|
|
|
30925
30963
|
localeError: error51()
|
|
30926
30964
|
};
|
|
30927
30965
|
}
|
|
30928
|
-
//
|
|
30966
|
+
// node_modules/zod/v4/locales/bg.js
|
|
30929
30967
|
var error52 = () => {
|
|
30930
30968
|
const Sizable = {
|
|
30931
30969
|
string: { unit: "символа", verb: "да съдържа" },
|
|
@@ -31045,7 +31083,7 @@ function bg_default2() {
|
|
|
31045
31083
|
localeError: error52()
|
|
31046
31084
|
};
|
|
31047
31085
|
}
|
|
31048
|
-
//
|
|
31086
|
+
// node_modules/zod/v4/locales/ca.js
|
|
31049
31087
|
var error53 = () => {
|
|
31050
31088
|
const Sizable = {
|
|
31051
31089
|
string: { unit: "caràcters", verb: "contenir" },
|
|
@@ -31152,7 +31190,7 @@ function ca_default2() {
|
|
|
31152
31190
|
localeError: error53()
|
|
31153
31191
|
};
|
|
31154
31192
|
}
|
|
31155
|
-
//
|
|
31193
|
+
// node_modules/zod/v4/locales/cs.js
|
|
31156
31194
|
var error54 = () => {
|
|
31157
31195
|
const Sizable = {
|
|
31158
31196
|
string: { unit: "znaků", verb: "mít" },
|
|
@@ -31263,7 +31301,7 @@ function cs_default2() {
|
|
|
31263
31301
|
localeError: error54()
|
|
31264
31302
|
};
|
|
31265
31303
|
}
|
|
31266
|
-
//
|
|
31304
|
+
// node_modules/zod/v4/locales/da.js
|
|
31267
31305
|
var error55 = () => {
|
|
31268
31306
|
const Sizable = {
|
|
31269
31307
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -31378,7 +31416,7 @@ function da_default2() {
|
|
|
31378
31416
|
localeError: error55()
|
|
31379
31417
|
};
|
|
31380
31418
|
}
|
|
31381
|
-
//
|
|
31419
|
+
// node_modules/zod/v4/locales/de.js
|
|
31382
31420
|
var error56 = () => {
|
|
31383
31421
|
const Sizable = {
|
|
31384
31422
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -31486,7 +31524,7 @@ function de_default2() {
|
|
|
31486
31524
|
localeError: error56()
|
|
31487
31525
|
};
|
|
31488
31526
|
}
|
|
31489
|
-
//
|
|
31527
|
+
// node_modules/zod/v4/locales/en.js
|
|
31490
31528
|
var error57 = () => {
|
|
31491
31529
|
const Sizable = {
|
|
31492
31530
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -31592,7 +31630,7 @@ function en_default2() {
|
|
|
31592
31630
|
localeError: error57()
|
|
31593
31631
|
};
|
|
31594
31632
|
}
|
|
31595
|
-
//
|
|
31633
|
+
// node_modules/zod/v4/locales/eo.js
|
|
31596
31634
|
var error58 = () => {
|
|
31597
31635
|
const Sizable = {
|
|
31598
31636
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -31701,7 +31739,7 @@ function eo_default2() {
|
|
|
31701
31739
|
localeError: error58()
|
|
31702
31740
|
};
|
|
31703
31741
|
}
|
|
31704
|
-
//
|
|
31742
|
+
// node_modules/zod/v4/locales/es.js
|
|
31705
31743
|
var error59 = () => {
|
|
31706
31744
|
const Sizable = {
|
|
31707
31745
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -31833,7 +31871,7 @@ function es_default2() {
|
|
|
31833
31871
|
localeError: error59()
|
|
31834
31872
|
};
|
|
31835
31873
|
}
|
|
31836
|
-
//
|
|
31874
|
+
// node_modules/zod/v4/locales/fa.js
|
|
31837
31875
|
var error60 = () => {
|
|
31838
31876
|
const Sizable = {
|
|
31839
31877
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
@@ -31947,7 +31985,7 @@ function fa_default2() {
|
|
|
31947
31985
|
localeError: error60()
|
|
31948
31986
|
};
|
|
31949
31987
|
}
|
|
31950
|
-
//
|
|
31988
|
+
// node_modules/zod/v4/locales/fi.js
|
|
31951
31989
|
var error61 = () => {
|
|
31952
31990
|
const Sizable = {
|
|
31953
31991
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
@@ -32059,7 +32097,7 @@ function fi_default2() {
|
|
|
32059
32097
|
localeError: error61()
|
|
32060
32098
|
};
|
|
32061
32099
|
}
|
|
32062
|
-
//
|
|
32100
|
+
// node_modules/zod/v4/locales/fr.js
|
|
32063
32101
|
var error62 = () => {
|
|
32064
32102
|
const Sizable = {
|
|
32065
32103
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -32167,7 +32205,7 @@ function fr_default2() {
|
|
|
32167
32205
|
localeError: error62()
|
|
32168
32206
|
};
|
|
32169
32207
|
}
|
|
32170
|
-
//
|
|
32208
|
+
// node_modules/zod/v4/locales/fr-CA.js
|
|
32171
32209
|
var error63 = () => {
|
|
32172
32210
|
const Sizable = {
|
|
32173
32211
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -32274,7 +32312,7 @@ function fr_CA_default2() {
|
|
|
32274
32312
|
localeError: error63()
|
|
32275
32313
|
};
|
|
32276
32314
|
}
|
|
32277
|
-
//
|
|
32315
|
+
// node_modules/zod/v4/locales/he.js
|
|
32278
32316
|
var error64 = () => {
|
|
32279
32317
|
const TypeNames = {
|
|
32280
32318
|
string: { label: "מחרוזת", gender: "f" },
|
|
@@ -32467,7 +32505,7 @@ function he_default2() {
|
|
|
32467
32505
|
localeError: error64()
|
|
32468
32506
|
};
|
|
32469
32507
|
}
|
|
32470
|
-
//
|
|
32508
|
+
// node_modules/zod/v4/locales/hu.js
|
|
32471
32509
|
var error65 = () => {
|
|
32472
32510
|
const Sizable = {
|
|
32473
32511
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -32575,7 +32613,7 @@ function hu_default2() {
|
|
|
32575
32613
|
localeError: error65()
|
|
32576
32614
|
};
|
|
32577
32615
|
}
|
|
32578
|
-
//
|
|
32616
|
+
// node_modules/zod/v4/locales/hy.js
|
|
32579
32617
|
function getArmenianPlural2(count, one, many) {
|
|
32580
32618
|
return Math.abs(count) === 1 ? one : many;
|
|
32581
32619
|
}
|
|
@@ -32722,7 +32760,7 @@ function hy_default2() {
|
|
|
32722
32760
|
localeError: error66()
|
|
32723
32761
|
};
|
|
32724
32762
|
}
|
|
32725
|
-
//
|
|
32763
|
+
// node_modules/zod/v4/locales/id.js
|
|
32726
32764
|
var error67 = () => {
|
|
32727
32765
|
const Sizable = {
|
|
32728
32766
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -32828,7 +32866,7 @@ function id_default2() {
|
|
|
32828
32866
|
localeError: error67()
|
|
32829
32867
|
};
|
|
32830
32868
|
}
|
|
32831
|
-
//
|
|
32869
|
+
// node_modules/zod/v4/locales/is.js
|
|
32832
32870
|
var error68 = () => {
|
|
32833
32871
|
const Sizable = {
|
|
32834
32872
|
string: { unit: "stafi", verb: "að hafa" },
|
|
@@ -32937,7 +32975,7 @@ function is_default2() {
|
|
|
32937
32975
|
localeError: error68()
|
|
32938
32976
|
};
|
|
32939
32977
|
}
|
|
32940
|
-
//
|
|
32978
|
+
// node_modules/zod/v4/locales/it.js
|
|
32941
32979
|
var error69 = () => {
|
|
32942
32980
|
const Sizable = {
|
|
32943
32981
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -33045,7 +33083,7 @@ function it_default2() {
|
|
|
33045
33083
|
localeError: error69()
|
|
33046
33084
|
};
|
|
33047
33085
|
}
|
|
33048
|
-
//
|
|
33086
|
+
// node_modules/zod/v4/locales/ja.js
|
|
33049
33087
|
var error70 = () => {
|
|
33050
33088
|
const Sizable = {
|
|
33051
33089
|
string: { unit: "文字", verb: "である" },
|
|
@@ -33152,7 +33190,7 @@ function ja_default2() {
|
|
|
33152
33190
|
localeError: error70()
|
|
33153
33191
|
};
|
|
33154
33192
|
}
|
|
33155
|
-
//
|
|
33193
|
+
// node_modules/zod/v4/locales/ka.js
|
|
33156
33194
|
var error71 = () => {
|
|
33157
33195
|
const Sizable = {
|
|
33158
33196
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
@@ -33264,7 +33302,7 @@ function ka_default2() {
|
|
|
33264
33302
|
localeError: error71()
|
|
33265
33303
|
};
|
|
33266
33304
|
}
|
|
33267
|
-
//
|
|
33305
|
+
// node_modules/zod/v4/locales/km.js
|
|
33268
33306
|
var error72 = () => {
|
|
33269
33307
|
const Sizable = {
|
|
33270
33308
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
@@ -33375,11 +33413,11 @@ function km_default2() {
|
|
|
33375
33413
|
};
|
|
33376
33414
|
}
|
|
33377
33415
|
|
|
33378
|
-
//
|
|
33416
|
+
// node_modules/zod/v4/locales/kh.js
|
|
33379
33417
|
function kh_default2() {
|
|
33380
33418
|
return km_default2();
|
|
33381
33419
|
}
|
|
33382
|
-
//
|
|
33420
|
+
// node_modules/zod/v4/locales/ko.js
|
|
33383
33421
|
var error73 = () => {
|
|
33384
33422
|
const Sizable = {
|
|
33385
33423
|
string: { unit: "문자", verb: "to have" },
|
|
@@ -33490,7 +33528,7 @@ function ko_default2() {
|
|
|
33490
33528
|
localeError: error73()
|
|
33491
33529
|
};
|
|
33492
33530
|
}
|
|
33493
|
-
//
|
|
33531
|
+
// node_modules/zod/v4/locales/lt.js
|
|
33494
33532
|
var capitalizeFirstCharacter2 = (text) => {
|
|
33495
33533
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
33496
33534
|
};
|
|
@@ -33693,7 +33731,7 @@ function lt_default2() {
|
|
|
33693
33731
|
localeError: error74()
|
|
33694
33732
|
};
|
|
33695
33733
|
}
|
|
33696
|
-
//
|
|
33734
|
+
// node_modules/zod/v4/locales/mk.js
|
|
33697
33735
|
var error75 = () => {
|
|
33698
33736
|
const Sizable = {
|
|
33699
33737
|
string: { unit: "знаци", verb: "да имаат" },
|
|
@@ -33802,7 +33840,7 @@ function mk_default2() {
|
|
|
33802
33840
|
localeError: error75()
|
|
33803
33841
|
};
|
|
33804
33842
|
}
|
|
33805
|
-
//
|
|
33843
|
+
// node_modules/zod/v4/locales/ms.js
|
|
33806
33844
|
var error76 = () => {
|
|
33807
33845
|
const Sizable = {
|
|
33808
33846
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -33909,7 +33947,7 @@ function ms_default2() {
|
|
|
33909
33947
|
localeError: error76()
|
|
33910
33948
|
};
|
|
33911
33949
|
}
|
|
33912
|
-
//
|
|
33950
|
+
// node_modules/zod/v4/locales/nl.js
|
|
33913
33951
|
var error77 = () => {
|
|
33914
33952
|
const Sizable = {
|
|
33915
33953
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -34019,7 +34057,7 @@ function nl_default2() {
|
|
|
34019
34057
|
localeError: error77()
|
|
34020
34058
|
};
|
|
34021
34059
|
}
|
|
34022
|
-
//
|
|
34060
|
+
// node_modules/zod/v4/locales/no.js
|
|
34023
34061
|
var error78 = () => {
|
|
34024
34062
|
const Sizable = {
|
|
34025
34063
|
string: { unit: "tegn", verb: "å ha" },
|
|
@@ -34127,7 +34165,7 @@ function no_default2() {
|
|
|
34127
34165
|
localeError: error78()
|
|
34128
34166
|
};
|
|
34129
34167
|
}
|
|
34130
|
-
//
|
|
34168
|
+
// node_modules/zod/v4/locales/ota.js
|
|
34131
34169
|
var error79 = () => {
|
|
34132
34170
|
const Sizable = {
|
|
34133
34171
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
@@ -34236,7 +34274,7 @@ function ota_default2() {
|
|
|
34236
34274
|
localeError: error79()
|
|
34237
34275
|
};
|
|
34238
34276
|
}
|
|
34239
|
-
//
|
|
34277
|
+
// node_modules/zod/v4/locales/ps.js
|
|
34240
34278
|
var error80 = () => {
|
|
34241
34279
|
const Sizable = {
|
|
34242
34280
|
string: { unit: "توکي", verb: "ولري" },
|
|
@@ -34350,7 +34388,7 @@ function ps_default2() {
|
|
|
34350
34388
|
localeError: error80()
|
|
34351
34389
|
};
|
|
34352
34390
|
}
|
|
34353
|
-
//
|
|
34391
|
+
// node_modules/zod/v4/locales/pl.js
|
|
34354
34392
|
var error81 = () => {
|
|
34355
34393
|
const Sizable = {
|
|
34356
34394
|
string: { unit: "znaków", verb: "mieć" },
|
|
@@ -34459,7 +34497,7 @@ function pl_default2() {
|
|
|
34459
34497
|
localeError: error81()
|
|
34460
34498
|
};
|
|
34461
34499
|
}
|
|
34462
|
-
//
|
|
34500
|
+
// node_modules/zod/v4/locales/pt.js
|
|
34463
34501
|
var error82 = () => {
|
|
34464
34502
|
const Sizable = {
|
|
34465
34503
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -34567,7 +34605,7 @@ function pt_default2() {
|
|
|
34567
34605
|
localeError: error82()
|
|
34568
34606
|
};
|
|
34569
34607
|
}
|
|
34570
|
-
//
|
|
34608
|
+
// node_modules/zod/v4/locales/ru.js
|
|
34571
34609
|
function getRussianPlural2(count, one, few, many) {
|
|
34572
34610
|
const absCount = Math.abs(count);
|
|
34573
34611
|
const lastDigit = absCount % 10;
|
|
@@ -34723,7 +34761,7 @@ function ru_default2() {
|
|
|
34723
34761
|
localeError: error83()
|
|
34724
34762
|
};
|
|
34725
34763
|
}
|
|
34726
|
-
//
|
|
34764
|
+
// node_modules/zod/v4/locales/sl.js
|
|
34727
34765
|
var error84 = () => {
|
|
34728
34766
|
const Sizable = {
|
|
34729
34767
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -34832,7 +34870,7 @@ function sl_default2() {
|
|
|
34832
34870
|
localeError: error84()
|
|
34833
34871
|
};
|
|
34834
34872
|
}
|
|
34835
|
-
//
|
|
34873
|
+
// node_modules/zod/v4/locales/sv.js
|
|
34836
34874
|
var error85 = () => {
|
|
34837
34875
|
const Sizable = {
|
|
34838
34876
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -34942,7 +34980,7 @@ function sv_default2() {
|
|
|
34942
34980
|
localeError: error85()
|
|
34943
34981
|
};
|
|
34944
34982
|
}
|
|
34945
|
-
//
|
|
34983
|
+
// node_modules/zod/v4/locales/ta.js
|
|
34946
34984
|
var error86 = () => {
|
|
34947
34985
|
const Sizable = {
|
|
34948
34986
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -35052,7 +35090,7 @@ function ta_default2() {
|
|
|
35052
35090
|
localeError: error86()
|
|
35053
35091
|
};
|
|
35054
35092
|
}
|
|
35055
|
-
//
|
|
35093
|
+
// node_modules/zod/v4/locales/th.js
|
|
35056
35094
|
var error87 = () => {
|
|
35057
35095
|
const Sizable = {
|
|
35058
35096
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
@@ -35162,7 +35200,7 @@ function th_default2() {
|
|
|
35162
35200
|
localeError: error87()
|
|
35163
35201
|
};
|
|
35164
35202
|
}
|
|
35165
|
-
//
|
|
35203
|
+
// node_modules/zod/v4/locales/tr.js
|
|
35166
35204
|
var error88 = () => {
|
|
35167
35205
|
const Sizable = {
|
|
35168
35206
|
string: { unit: "karakter", verb: "olmalı" },
|
|
@@ -35267,7 +35305,7 @@ function tr_default2() {
|
|
|
35267
35305
|
localeError: error88()
|
|
35268
35306
|
};
|
|
35269
35307
|
}
|
|
35270
|
-
//
|
|
35308
|
+
// node_modules/zod/v4/locales/uk.js
|
|
35271
35309
|
var error89 = () => {
|
|
35272
35310
|
const Sizable = {
|
|
35273
35311
|
string: { unit: "символів", verb: "матиме" },
|
|
@@ -35376,11 +35414,11 @@ function uk_default2() {
|
|
|
35376
35414
|
};
|
|
35377
35415
|
}
|
|
35378
35416
|
|
|
35379
|
-
//
|
|
35417
|
+
// node_modules/zod/v4/locales/ua.js
|
|
35380
35418
|
function ua_default2() {
|
|
35381
35419
|
return uk_default2();
|
|
35382
35420
|
}
|
|
35383
|
-
//
|
|
35421
|
+
// node_modules/zod/v4/locales/ur.js
|
|
35384
35422
|
var error90 = () => {
|
|
35385
35423
|
const Sizable = {
|
|
35386
35424
|
string: { unit: "حروف", verb: "ہونا" },
|
|
@@ -35490,7 +35528,7 @@ function ur_default2() {
|
|
|
35490
35528
|
localeError: error90()
|
|
35491
35529
|
};
|
|
35492
35530
|
}
|
|
35493
|
-
//
|
|
35531
|
+
// node_modules/zod/v4/locales/uz.js
|
|
35494
35532
|
var error91 = () => {
|
|
35495
35533
|
const Sizable = {
|
|
35496
35534
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
@@ -35599,7 +35637,7 @@ function uz_default2() {
|
|
|
35599
35637
|
localeError: error91()
|
|
35600
35638
|
};
|
|
35601
35639
|
}
|
|
35602
|
-
//
|
|
35640
|
+
// node_modules/zod/v4/locales/vi.js
|
|
35603
35641
|
var error92 = () => {
|
|
35604
35642
|
const Sizable = {
|
|
35605
35643
|
string: { unit: "ký tự", verb: "có" },
|
|
@@ -35707,7 +35745,7 @@ function vi_default2() {
|
|
|
35707
35745
|
localeError: error92()
|
|
35708
35746
|
};
|
|
35709
35747
|
}
|
|
35710
|
-
//
|
|
35748
|
+
// node_modules/zod/v4/locales/zh-CN.js
|
|
35711
35749
|
var error93 = () => {
|
|
35712
35750
|
const Sizable = {
|
|
35713
35751
|
string: { unit: "字符", verb: "包含" },
|
|
@@ -35816,7 +35854,7 @@ function zh_CN_default2() {
|
|
|
35816
35854
|
localeError: error93()
|
|
35817
35855
|
};
|
|
35818
35856
|
}
|
|
35819
|
-
//
|
|
35857
|
+
// node_modules/zod/v4/locales/zh-TW.js
|
|
35820
35858
|
var error94 = () => {
|
|
35821
35859
|
const Sizable = {
|
|
35822
35860
|
string: { unit: "字元", verb: "擁有" },
|
|
@@ -35923,7 +35961,7 @@ function zh_TW_default2() {
|
|
|
35923
35961
|
localeError: error94()
|
|
35924
35962
|
};
|
|
35925
35963
|
}
|
|
35926
|
-
//
|
|
35964
|
+
// node_modules/zod/v4/locales/yo.js
|
|
35927
35965
|
var error95 = () => {
|
|
35928
35966
|
const Sizable = {
|
|
35929
35967
|
string: { unit: "àmi", verb: "ní" },
|
|
@@ -36030,7 +36068,7 @@ function yo_default2() {
|
|
|
36030
36068
|
localeError: error95()
|
|
36031
36069
|
};
|
|
36032
36070
|
}
|
|
36033
|
-
//
|
|
36071
|
+
// node_modules/zod/v4/core/registries.js
|
|
36034
36072
|
var _a2;
|
|
36035
36073
|
var $output2 = Symbol("ZodOutput");
|
|
36036
36074
|
var $input2 = Symbol("ZodInput");
|
|
@@ -36080,7 +36118,7 @@ function registry2() {
|
|
|
36080
36118
|
}
|
|
36081
36119
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry2());
|
|
36082
36120
|
var globalRegistry2 = globalThis.__zod_globalRegistry;
|
|
36083
|
-
//
|
|
36121
|
+
// node_modules/zod/v4/core/api.js
|
|
36084
36122
|
function _string2(Class3, params) {
|
|
36085
36123
|
return new Class3({
|
|
36086
36124
|
type: "string",
|
|
@@ -37000,7 +37038,7 @@ function _stringFormat2(Class3, format, fnOrRegex, _params = {}) {
|
|
|
37000
37038
|
const inst = new Class3(def);
|
|
37001
37039
|
return inst;
|
|
37002
37040
|
}
|
|
37003
|
-
//
|
|
37041
|
+
// node_modules/zod/v4/core/to-json-schema.js
|
|
37004
37042
|
function initializeContext2(params) {
|
|
37005
37043
|
let target = params?.target ?? "draft-2020-12";
|
|
37006
37044
|
if (target === "draft-4")
|
|
@@ -37345,7 +37383,7 @@ var createStandardJSONSchemaMethod2 = (schema, io, processors = {}) => (params)
|
|
|
37345
37383
|
extractDefs2(ctx, schema);
|
|
37346
37384
|
return finalize2(ctx, schema);
|
|
37347
37385
|
};
|
|
37348
|
-
//
|
|
37386
|
+
// node_modules/zod/v4/core/json-schema-processors.js
|
|
37349
37387
|
var formatMap2 = {
|
|
37350
37388
|
guid: "uuid",
|
|
37351
37389
|
url: "uri",
|
|
@@ -37890,7 +37928,7 @@ function toJSONSchema4(input, params) {
|
|
|
37890
37928
|
extractDefs2(ctx, input);
|
|
37891
37929
|
return finalize2(ctx, input);
|
|
37892
37930
|
}
|
|
37893
|
-
//
|
|
37931
|
+
// node_modules/zod/v4/core/json-schema-generator.js
|
|
37894
37932
|
class JSONSchemaGenerator2 {
|
|
37895
37933
|
get metadataRegistry() {
|
|
37896
37934
|
return this.ctx.metadataRegistry;
|
|
@@ -37949,9 +37987,9 @@ class JSONSchemaGenerator2 {
|
|
|
37949
37987
|
return plainResult;
|
|
37950
37988
|
}
|
|
37951
37989
|
}
|
|
37952
|
-
//
|
|
37990
|
+
// node_modules/zod/v4/core/json-schema.js
|
|
37953
37991
|
var exports_json_schema2 = {};
|
|
37954
|
-
//
|
|
37992
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
37955
37993
|
var exports_schemas3 = {};
|
|
37956
37994
|
__export(exports_schemas3, {
|
|
37957
37995
|
xor: () => xor2,
|
|
@@ -38120,7 +38158,7 @@ __export(exports_schemas3, {
|
|
|
38120
38158
|
ZodAny: () => ZodAny2
|
|
38121
38159
|
});
|
|
38122
38160
|
|
|
38123
|
-
//
|
|
38161
|
+
// node_modules/zod/v4/classic/checks.js
|
|
38124
38162
|
var exports_checks3 = {};
|
|
38125
38163
|
__export(exports_checks3, {
|
|
38126
38164
|
uppercase: () => _uppercase2,
|
|
@@ -38154,7 +38192,7 @@ __export(exports_checks3, {
|
|
|
38154
38192
|
endsWith: () => _endsWith2
|
|
38155
38193
|
});
|
|
38156
38194
|
|
|
38157
|
-
//
|
|
38195
|
+
// node_modules/zod/v4/classic/iso.js
|
|
38158
38196
|
var exports_iso2 = {};
|
|
38159
38197
|
__export(exports_iso2, {
|
|
38160
38198
|
time: () => time5,
|
|
@@ -38195,7 +38233,7 @@ function duration5(params) {
|
|
|
38195
38233
|
return _isoDuration2(ZodISODuration2, params);
|
|
38196
38234
|
}
|
|
38197
38235
|
|
|
38198
|
-
//
|
|
38236
|
+
// node_modules/zod/v4/classic/errors.js
|
|
38199
38237
|
var initializer5 = (inst, issues) => {
|
|
38200
38238
|
$ZodError2.init(inst, issues);
|
|
38201
38239
|
inst.name = "ZodError";
|
|
@@ -38230,7 +38268,7 @@ var ZodRealError2 = $constructor2("ZodError", initializer5, {
|
|
|
38230
38268
|
Parent: Error
|
|
38231
38269
|
});
|
|
38232
38270
|
|
|
38233
|
-
//
|
|
38271
|
+
// node_modules/zod/v4/classic/parse.js
|
|
38234
38272
|
var parse6 = /* @__PURE__ */ _parse2(ZodRealError2);
|
|
38235
38273
|
var parseAsync5 = /* @__PURE__ */ _parseAsync2(ZodRealError2);
|
|
38236
38274
|
var safeParse5 = /* @__PURE__ */ _safeParse2(ZodRealError2);
|
|
@@ -38244,7 +38282,7 @@ var safeDecode5 = /* @__PURE__ */ _safeDecode2(ZodRealError2);
|
|
|
38244
38282
|
var safeEncodeAsync5 = /* @__PURE__ */ _safeEncodeAsync2(ZodRealError2);
|
|
38245
38283
|
var safeDecodeAsync5 = /* @__PURE__ */ _safeDecodeAsync2(ZodRealError2);
|
|
38246
38284
|
|
|
38247
|
-
//
|
|
38285
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
38248
38286
|
var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
|
|
38249
38287
|
$ZodType2.init(inst, def);
|
|
38250
38288
|
Object.assign(inst["~standard"], {
|
|
@@ -39320,7 +39358,7 @@ function json2(params) {
|
|
|
39320
39358
|
function preprocess2(fn, schema) {
|
|
39321
39359
|
return pipe2(transform2(fn), schema);
|
|
39322
39360
|
}
|
|
39323
|
-
//
|
|
39361
|
+
// node_modules/zod/v4/classic/compat.js
|
|
39324
39362
|
var ZodIssueCode2 = {
|
|
39325
39363
|
invalid_type: "invalid_type",
|
|
39326
39364
|
too_big: "too_big",
|
|
@@ -39344,7 +39382,7 @@ function getErrorMap2() {
|
|
|
39344
39382
|
}
|
|
39345
39383
|
var ZodFirstPartyTypeKind2;
|
|
39346
39384
|
(function(ZodFirstPartyTypeKind3) {})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
|
|
39347
|
-
//
|
|
39385
|
+
// node_modules/zod/v4/classic/from-json-schema.js
|
|
39348
39386
|
var z2 = {
|
|
39349
39387
|
...exports_schemas3,
|
|
39350
39388
|
...exports_checks3,
|
|
@@ -39805,7 +39843,7 @@ function fromJSONSchema4(schema, params) {
|
|
|
39805
39843
|
};
|
|
39806
39844
|
return convertSchema2(schema, ctx);
|
|
39807
39845
|
}
|
|
39808
|
-
//
|
|
39846
|
+
// node_modules/zod/v4/classic/coerce.js
|
|
39809
39847
|
var exports_coerce2 = {};
|
|
39810
39848
|
__export(exports_coerce2, {
|
|
39811
39849
|
string: () => string7,
|
|
@@ -39830,21 +39868,27 @@ function date9(params) {
|
|
|
39830
39868
|
return _coercedDate2(ZodDate2, params);
|
|
39831
39869
|
}
|
|
39832
39870
|
|
|
39833
|
-
//
|
|
39871
|
+
// node_modules/zod/v4/classic/external.js
|
|
39834
39872
|
config2(en_default2());
|
|
39835
39873
|
// src/project/util/git.ts
|
|
39836
39874
|
import { execSync } from "node:child_process";
|
|
39875
|
+
var getPathnameFromGitUrl = (url4) => {
|
|
39876
|
+
const _url3 = new URL(url4.replace(/\.git$/, ""));
|
|
39877
|
+
const pathname = _url3.pathname.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
39878
|
+
return pathname;
|
|
39879
|
+
};
|
|
39837
39880
|
var getGitPathname = (repoPath) => {
|
|
39838
39881
|
try {
|
|
39839
39882
|
const url4 = execSync("git config --get remote.origin.url", { cwd: repoPath, encoding: "utf-8" }).trim();
|
|
39840
39883
|
if (url4) {
|
|
39841
|
-
|
|
39842
|
-
|
|
39843
|
-
|
|
39884
|
+
return {
|
|
39885
|
+
url: url4,
|
|
39886
|
+
pathname: getPathnameFromGitUrl(url4)
|
|
39887
|
+
};
|
|
39844
39888
|
}
|
|
39845
39889
|
return null;
|
|
39846
39890
|
} catch (err) {
|
|
39847
|
-
console.warn(`[getGitPathname] Failed to get git remote url for ${repoPath}
|
|
39891
|
+
console.warn(`[getGitPathname] Failed to get git remote url for ${repoPath}:`, err);
|
|
39848
39892
|
return null;
|
|
39849
39893
|
}
|
|
39850
39894
|
};
|
|
@@ -39859,23 +39903,35 @@ app.route({
|
|
|
39859
39903
|
args: {
|
|
39860
39904
|
filepath: exports_external2.string().describe("项目根目录的绝对路径,必填"),
|
|
39861
39905
|
repo: exports_external2.string().optional().describe("代码仓库标识,用于搜索结果展示和过滤,格式如 owner/repo,例如 kevisual/cnb,选填(默认自动从 git 配置读取)"),
|
|
39862
|
-
name: exports_external2.string().optional().describe("项目显示名称,用于搜索结果展示,选填(默认使用目录名)")
|
|
39906
|
+
name: exports_external2.string().optional().describe("项目显示名称,用于搜索结果展示,选填(默认使用目录名)"),
|
|
39907
|
+
type: exports_external2.string().optional().describe("项目类型,filepath或cnb-repo,默认为filepath")
|
|
39863
39908
|
}
|
|
39864
39909
|
}
|
|
39865
39910
|
}).define(async (ctx) => {
|
|
39866
|
-
let { filepath, repo, name } = ctx.query;
|
|
39911
|
+
let { filepath, repo, name, type = "filepath" } = ctx.query;
|
|
39867
39912
|
if (!filepath)
|
|
39868
39913
|
ctx.throw(400, "filepath 不能为空");
|
|
39914
|
+
if (type === "cnb-repo") {
|
|
39915
|
+
const msg = {
|
|
39916
|
+
path: "project",
|
|
39917
|
+
key: "clone-cnb"
|
|
39918
|
+
};
|
|
39919
|
+
const res = await app.run({ ...msg, payload: { repo: filepath } }, { state: ctx.state });
|
|
39920
|
+
ctx.forward(res);
|
|
39921
|
+
return;
|
|
39922
|
+
}
|
|
39923
|
+
let link = "";
|
|
39869
39924
|
if (!repo) {
|
|
39870
39925
|
const gitPathname = getGitPathname(filepath);
|
|
39871
39926
|
if (gitPathname) {
|
|
39872
|
-
repo = gitPathname;
|
|
39927
|
+
repo = gitPathname.pathname;
|
|
39928
|
+
link = gitPathname.url;
|
|
39873
39929
|
} else {
|
|
39874
39930
|
const pathParts = filepath.split("/");
|
|
39875
39931
|
repo = pathParts[pathParts.length - 1];
|
|
39876
39932
|
}
|
|
39877
39933
|
}
|
|
39878
|
-
const info = await manager.addProject({ path: filepath, repo, name });
|
|
39934
|
+
const info = await manager.addProject({ path: filepath, repo, name, link: link || (repo ? `https://cnb.cool/${repo}` : undefined) });
|
|
39879
39935
|
ctx.body = { success: true, data: info };
|
|
39880
39936
|
}).addTo(app);
|
|
39881
39937
|
app.route({
|
|
@@ -40094,11 +40150,135 @@ app.route({
|
|
|
40094
40150
|
}
|
|
40095
40151
|
}).addTo(app);
|
|
40096
40152
|
|
|
40153
|
+
// src/routes/project-init.ts
|
|
40154
|
+
import fs4 from "node:fs";
|
|
40155
|
+
import path5 from "node:path";
|
|
40156
|
+
import { execSync as execSync2 } from "node:child_process";
|
|
40157
|
+
var DEFAULT_ROOT_PATH = "/workspace/projects";
|
|
40158
|
+
var getProjectPaths = (ctx) => {
|
|
40159
|
+
const rootPath = path5.resolve(ctx.query.rootPath || DEFAULT_ROOT_PATH);
|
|
40160
|
+
if (!fs4.existsSync(rootPath)) {
|
|
40161
|
+
ctx.throw(400, "rootPath 指定的目录不存在");
|
|
40162
|
+
}
|
|
40163
|
+
const projectPaths = [];
|
|
40164
|
+
try {
|
|
40165
|
+
const entries = fs4.readdirSync(rootPath, { withFileTypes: true });
|
|
40166
|
+
for (const entry of entries) {
|
|
40167
|
+
if (!entry.isDirectory())
|
|
40168
|
+
continue;
|
|
40169
|
+
const fullPath = path5.join(rootPath, entry.name);
|
|
40170
|
+
if (entry.name === "node_modules" || entry.name.startsWith("."))
|
|
40171
|
+
continue;
|
|
40172
|
+
if (fs4.existsSync(path5.join(fullPath, ".git"))) {
|
|
40173
|
+
projectPaths.push(fullPath);
|
|
40174
|
+
}
|
|
40175
|
+
}
|
|
40176
|
+
} catch (err) {
|
|
40177
|
+
console.warn(`[project-init] Failed to read root directory ${rootPath}:`, err);
|
|
40178
|
+
}
|
|
40179
|
+
return {
|
|
40180
|
+
rootPath,
|
|
40181
|
+
projectPaths
|
|
40182
|
+
};
|
|
40183
|
+
};
|
|
40184
|
+
app.route({
|
|
40185
|
+
path: "project",
|
|
40186
|
+
key: "init",
|
|
40187
|
+
description: "初始化项目,通过root目录,搜索当前有git的项目列表,并将其注册到系统中",
|
|
40188
|
+
middleware: ["auth-admin"],
|
|
40189
|
+
metadata: {
|
|
40190
|
+
args: {
|
|
40191
|
+
rootPath: exports_external2.string().optional().describe("搜索项目的根目录绝对路径,默认为 /workspace/projects")
|
|
40192
|
+
}
|
|
40193
|
+
}
|
|
40194
|
+
}).define(async (ctx) => {
|
|
40195
|
+
const { rootPath, projectPaths } = getProjectPaths(ctx);
|
|
40196
|
+
const results = [];
|
|
40197
|
+
for (const projectPath of projectPaths) {
|
|
40198
|
+
try {
|
|
40199
|
+
const gitRepo = getGitPathname(projectPath);
|
|
40200
|
+
const repo = gitRepo?.pathname || path5.basename(projectPath);
|
|
40201
|
+
const name = path5.basename(projectPath);
|
|
40202
|
+
await manager.addProject({ path: projectPath, repo, name, link: gitRepo?.url });
|
|
40203
|
+
results.push({ path: projectPath, repo, success: true });
|
|
40204
|
+
console.log(`[project-init] Added project: ${projectPath}, repo: ${repo}`);
|
|
40205
|
+
} catch (err) {
|
|
40206
|
+
const error49 = err instanceof Error ? err.message : String(err);
|
|
40207
|
+
results.push({ path: projectPath, repo: null, success: false, error: error49 });
|
|
40208
|
+
console.error(`[project-init] Failed to add project ${projectPath}:`, err);
|
|
40209
|
+
}
|
|
40210
|
+
}
|
|
40211
|
+
ctx.body = {
|
|
40212
|
+
rootPath,
|
|
40213
|
+
totalFound: projectPaths.length,
|
|
40214
|
+
results
|
|
40215
|
+
};
|
|
40216
|
+
}).addTo(app);
|
|
40217
|
+
app.route({
|
|
40218
|
+
path: "project",
|
|
40219
|
+
key: "list-projects",
|
|
40220
|
+
description: "列出当前工作区已注册的项目",
|
|
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
|
+
ctx.body = {
|
|
40230
|
+
rootPath,
|
|
40231
|
+
list: projectPaths
|
|
40232
|
+
};
|
|
40233
|
+
}).addTo(app);
|
|
40234
|
+
app.route({
|
|
40235
|
+
path: "project",
|
|
40236
|
+
key: "clone-cnb",
|
|
40237
|
+
description: "clone 一个项目到projects目录下,并注册到系统中。",
|
|
40238
|
+
middleware: ["auth-admin"],
|
|
40239
|
+
metadata: {
|
|
40240
|
+
args: {
|
|
40241
|
+
filepath: exports_external2.string().optional().describe("新项目根目录的绝对路径,默认在 /workspace/projects 下以仓库名创建子目录"),
|
|
40242
|
+
repo: exports_external2.string().describe("代码仓库标识,用于搜索结果展示和过滤,格式如 owner/repo,例如 kevisual/cnb,必填")
|
|
40243
|
+
}
|
|
40244
|
+
}
|
|
40245
|
+
}).define(async (ctx) => {
|
|
40246
|
+
const { filepath = DEFAULT_ROOT_PATH, repo = "" } = ctx.query;
|
|
40247
|
+
let cloneRepoUrl = "";
|
|
40248
|
+
if (repo?.startsWith("http")) {
|
|
40249
|
+
cloneRepoUrl = repo;
|
|
40250
|
+
} else if (repo) {
|
|
40251
|
+
cloneRepoUrl = `https://cnb.cool/${repo}`;
|
|
40252
|
+
} else {
|
|
40253
|
+
ctx.throw(400, "repo 参数不能为空,且必须是完整的 URL 或者 owner/repo 格式");
|
|
40254
|
+
}
|
|
40255
|
+
const name = getPathnameFromGitUrl(cloneRepoUrl);
|
|
40256
|
+
if (!name) {
|
|
40257
|
+
ctx.throw(400, "无法从 repo 参数解析出项目名称,请检查 repo 格式是否正确");
|
|
40258
|
+
}
|
|
40259
|
+
const targetPath = path5.join(filepath, name);
|
|
40260
|
+
if (fs4.existsSync(targetPath)) {
|
|
40261
|
+
ctx.throw(400, `目标路径已存在: ${targetPath}`);
|
|
40262
|
+
}
|
|
40263
|
+
const cloneCmd = `git clone ${cloneRepoUrl} ${targetPath}`;
|
|
40264
|
+
try {
|
|
40265
|
+
console.log(`[project-clone] Cloning repo ${cloneRepoUrl} to ${targetPath}...`);
|
|
40266
|
+
execSync2(cloneCmd, { stdio: "inherit" });
|
|
40267
|
+
console.log(`[project-clone] Clone successful, adding project...`);
|
|
40268
|
+
const info = await manager.addProject({ path: targetPath, repo: name, name, link: cloneRepoUrl });
|
|
40269
|
+
ctx.body = info;
|
|
40270
|
+
} catch (err) {
|
|
40271
|
+
const error49 = err instanceof Error ? err.message : String(err);
|
|
40272
|
+
console.error(`[project-clone] Failed to clone and add project from ${cloneRepoUrl}:`, err);
|
|
40273
|
+
ctx.throw(500, `Failed to clone and add project: ${error49}`);
|
|
40274
|
+
}
|
|
40275
|
+
}).addTo(app);
|
|
40276
|
+
|
|
40097
40277
|
// src/index.ts
|
|
40098
40278
|
if (false) {}
|
|
40099
40279
|
await manager.init();
|
|
40100
40280
|
|
|
40101
|
-
//
|
|
40281
|
+
// node_modules/@kevisual/remote-app/dist/app.js
|
|
40102
40282
|
var __create3 = Object.create;
|
|
40103
40283
|
var __getProtoOf3 = Object.getPrototypeOf;
|
|
40104
40284
|
var __defProp3 = Object.defineProperty;
|