@kevisual/project-search 0.0.8 → 0.0.10
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 +397 -175
- package/dist/remote.js +398 -176
- 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",
|
|
@@ -24947,6 +24947,21 @@ var TEXT_FILE_EXTENSIONS = [
|
|
|
24947
24947
|
".vue",
|
|
24948
24948
|
".svelte",
|
|
24949
24949
|
".astro",
|
|
24950
|
+
".html",
|
|
24951
|
+
".htm",
|
|
24952
|
+
".xhtml",
|
|
24953
|
+
".xml",
|
|
24954
|
+
".svg",
|
|
24955
|
+
".styl",
|
|
24956
|
+
".json",
|
|
24957
|
+
".yaml",
|
|
24958
|
+
".yml",
|
|
24959
|
+
".toml",
|
|
24960
|
+
".ini",
|
|
24961
|
+
".env",
|
|
24962
|
+
".properties",
|
|
24963
|
+
".conf",
|
|
24964
|
+
".config",
|
|
24950
24965
|
".npmrc",
|
|
24951
24966
|
".yarnrc",
|
|
24952
24967
|
".babelrc",
|
|
@@ -25016,7 +25031,18 @@ var TEXT_FILE_EXTENSIONS = [
|
|
|
25016
25031
|
".npmrc",
|
|
25017
25032
|
".yarnrc",
|
|
25018
25033
|
".babelrc",
|
|
25019
|
-
".webpackrc"
|
|
25034
|
+
".webpackrc",
|
|
25035
|
+
".lock",
|
|
25036
|
+
"-lock.json",
|
|
25037
|
+
"-lock.yaml",
|
|
25038
|
+
"-lock.yml",
|
|
25039
|
+
".lockb",
|
|
25040
|
+
".pem",
|
|
25041
|
+
".key",
|
|
25042
|
+
".crt",
|
|
25043
|
+
".cer",
|
|
25044
|
+
".p12",
|
|
25045
|
+
".pfx"
|
|
25020
25046
|
];
|
|
25021
25047
|
var CONFIG_FILE_NAMES = [
|
|
25022
25048
|
".gitignore",
|
|
@@ -25027,6 +25053,10 @@ var CONFIG_FILE_NAMES = [
|
|
|
25027
25053
|
".env.local",
|
|
25028
25054
|
".env.development",
|
|
25029
25055
|
".env.production",
|
|
25056
|
+
".env.test",
|
|
25057
|
+
".env.staging",
|
|
25058
|
+
".env.example",
|
|
25059
|
+
".env.sample",
|
|
25030
25060
|
"Dockerfile",
|
|
25031
25061
|
"Makefile",
|
|
25032
25062
|
"CMakeLists.txt",
|
|
@@ -25037,7 +25067,24 @@ var CONFIG_FILE_NAMES = [
|
|
|
25037
25067
|
".bashrc",
|
|
25038
25068
|
".zshrc",
|
|
25039
25069
|
".vimrc",
|
|
25040
|
-
".inputrc"
|
|
25070
|
+
".inputrc",
|
|
25071
|
+
"bun.lockb",
|
|
25072
|
+
"package-lock.json",
|
|
25073
|
+
"yarn.lock",
|
|
25074
|
+
"pnpm-lock.yaml",
|
|
25075
|
+
"pnpm-workspace.yaml",
|
|
25076
|
+
"Gemfile.lock",
|
|
25077
|
+
"Podfile.lock",
|
|
25078
|
+
"Cartfile.resolved",
|
|
25079
|
+
"composer.lock",
|
|
25080
|
+
"requirements.txt",
|
|
25081
|
+
"Pipfile.lock",
|
|
25082
|
+
"poetry.lock",
|
|
25083
|
+
"Cargo.lock",
|
|
25084
|
+
"go.sum",
|
|
25085
|
+
"go.mod",
|
|
25086
|
+
".vscode",
|
|
25087
|
+
".idea"
|
|
25041
25088
|
];
|
|
25042
25089
|
var isText = (filePath) => {
|
|
25043
25090
|
const fileName = path.basename(filePath);
|
|
@@ -25123,7 +25170,12 @@ function fileId(filePath) {
|
|
|
25123
25170
|
return Buffer.from(filePath).toString("base64url");
|
|
25124
25171
|
}
|
|
25125
25172
|
function fileHash(filePath) {
|
|
25126
|
-
|
|
25173
|
+
try {
|
|
25174
|
+
const content = fs.readFileSync(filePath);
|
|
25175
|
+
return crypto2.createHash("md5").update(content).digest("hex");
|
|
25176
|
+
} catch {
|
|
25177
|
+
return crypto2.createHash("md5").update(filePath).digest("hex");
|
|
25178
|
+
}
|
|
25127
25179
|
}
|
|
25128
25180
|
|
|
25129
25181
|
class ProjectSearch {
|
|
@@ -25369,11 +25421,11 @@ class ProjectStore {
|
|
|
25369
25421
|
name: input.name,
|
|
25370
25422
|
path: input.path,
|
|
25371
25423
|
repo: input.repo,
|
|
25372
|
-
title: existingDoc?.title,
|
|
25373
|
-
tags: existingDoc?.tags,
|
|
25374
|
-
summary: existingDoc?.summary,
|
|
25375
|
-
description: existingDoc?.description,
|
|
25376
|
-
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,
|
|
25377
25429
|
status: input.status ?? existingDoc?.status ?? "active"
|
|
25378
25430
|
};
|
|
25379
25431
|
await this.index.addDocuments([doc]);
|
|
@@ -25420,7 +25472,7 @@ class ProjectStore {
|
|
|
25420
25472
|
// src/project/project-listener/listener.ts
|
|
25421
25473
|
import { subscribe } from "@parcel/watcher";
|
|
25422
25474
|
import path3 from "node:path";
|
|
25423
|
-
import fs2 from "node:fs";
|
|
25475
|
+
import fs2, { existsSync } from "node:fs";
|
|
25424
25476
|
class ProjectListener {
|
|
25425
25477
|
projectPath;
|
|
25426
25478
|
subscribe = null;
|
|
@@ -25441,6 +25493,10 @@ class ProjectListener {
|
|
|
25441
25493
|
ignorePatterns = fs2.readFileSync(ignoreFile, "utf-8").split(`
|
|
25442
25494
|
`).map((line) => line.trim()).filter((line) => line && !line.startsWith("#"));
|
|
25443
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
|
+
}
|
|
25444
25500
|
const allIgnore = [...defaultIgnorePatterns, ...ignorePatterns];
|
|
25445
25501
|
const sub = await subscribe(this.projectPath, async (err, events) => {
|
|
25446
25502
|
if (err)
|
|
@@ -25495,7 +25551,7 @@ class ProjectListener {
|
|
|
25495
25551
|
}
|
|
25496
25552
|
}
|
|
25497
25553
|
|
|
25498
|
-
//
|
|
25554
|
+
// node_modules/eventemitter3/index.mjs
|
|
25499
25555
|
var import__2 = __toESM(require_eventemitter32(), 1);
|
|
25500
25556
|
|
|
25501
25557
|
// src/project/manager.ts
|
|
@@ -25530,15 +25586,17 @@ class ProjectManager {
|
|
|
25530
25586
|
console.log(`[ProjectManager] init: skip missing path ${doc.path}`);
|
|
25531
25587
|
continue;
|
|
25532
25588
|
}
|
|
25589
|
+
const shouldWatch = doc.status === "active";
|
|
25533
25590
|
try {
|
|
25534
|
-
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 });
|
|
25535
25592
|
} catch (err) {
|
|
25536
25593
|
console.error(`[ProjectManager] init: failed to add project ${doc.path}`, err);
|
|
25537
25594
|
}
|
|
25538
25595
|
}
|
|
25539
25596
|
console.log(`[ProjectManager] init done, loaded ${this.projects.size} project(s)`);
|
|
25540
25597
|
}
|
|
25541
|
-
async addProject(input) {
|
|
25598
|
+
async addProject(input, options = {}) {
|
|
25599
|
+
const { startListening = true } = options;
|
|
25542
25600
|
if (!fs3.existsSync(input.path)) {
|
|
25543
25601
|
throw new CustomError(`[ProjectManager] addProject: path does not exist: ${input.path}`);
|
|
25544
25602
|
}
|
|
@@ -25548,11 +25606,25 @@ class ProjectManager {
|
|
|
25548
25606
|
const listener = new ProjectListener({ projectPath: input.path, emitter: this.emitter });
|
|
25549
25607
|
const project = { ...input, listener };
|
|
25550
25608
|
this.projects.set(input.path, project);
|
|
25551
|
-
|
|
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) => {
|
|
25552
25622
|
console.error("[ProjectManager] projectStore.addProject failed:", err);
|
|
25553
25623
|
});
|
|
25554
|
-
|
|
25555
|
-
|
|
25624
|
+
if (startListening) {
|
|
25625
|
+
await listener.startListening();
|
|
25626
|
+
console.log(`[ProjectManager] watching: ${input.path}`);
|
|
25627
|
+
}
|
|
25556
25628
|
this.projectSearch.initialSync(input.path, input.repo).catch((err) => {
|
|
25557
25629
|
console.error("[ProjectManager] initialSync failed:", err);
|
|
25558
25630
|
});
|
|
@@ -25580,14 +25652,32 @@ class ProjectManager {
|
|
|
25580
25652
|
if (!project)
|
|
25581
25653
|
return;
|
|
25582
25654
|
await project.listener.stopListening();
|
|
25655
|
+
this.projectStore.updateProject(projectPath, { status: "inactive" }).catch((err) => {
|
|
25656
|
+
console.error("[ProjectManager] updateProject status failed:", err);
|
|
25657
|
+
});
|
|
25583
25658
|
console.log(`[ProjectManager] stopped: ${projectPath}`);
|
|
25584
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
|
+
}
|
|
25585
25670
|
async getProjectInfo(project) {
|
|
25586
25671
|
const { listener, ...info } = project;
|
|
25587
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
|
+
}
|
|
25588
25678
|
return {
|
|
25589
25679
|
...info,
|
|
25590
|
-
status
|
|
25680
|
+
status,
|
|
25591
25681
|
id: storeDoc?.id,
|
|
25592
25682
|
title: storeDoc?.title,
|
|
25593
25683
|
tags: storeDoc?.tags,
|
|
@@ -25642,7 +25732,7 @@ var fileIsExist = (filePath) => {
|
|
|
25642
25732
|
}
|
|
25643
25733
|
};
|
|
25644
25734
|
|
|
25645
|
-
//
|
|
25735
|
+
// node_modules/@kevisual/context/dist/app.js
|
|
25646
25736
|
var isBrowser2 = typeof window !== "undefined" && typeof document !== "undefined";
|
|
25647
25737
|
var isBrowser22 = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
25648
25738
|
function getDefaultExportFromCjs(x) {
|
|
@@ -26281,7 +26371,7 @@ app.route({
|
|
|
26281
26371
|
description: "管理员权限验证中间件,在 auth 基础上进一步校验请求方是否具有管理员权限"
|
|
26282
26372
|
}).define(async (ctx) => {}).addTo(app, { overwrite: false });
|
|
26283
26373
|
|
|
26284
|
-
//
|
|
26374
|
+
// node_modules/zod/v4/classic/external.js
|
|
26285
26375
|
var exports_external2 = {};
|
|
26286
26376
|
__export(exports_external2, {
|
|
26287
26377
|
xor: () => xor2,
|
|
@@ -26522,7 +26612,7 @@ __export(exports_external2, {
|
|
|
26522
26612
|
$brand: () => $brand2
|
|
26523
26613
|
});
|
|
26524
26614
|
|
|
26525
|
-
//
|
|
26615
|
+
// node_modules/zod/v4/core/index.js
|
|
26526
26616
|
var exports_core3 = {};
|
|
26527
26617
|
__export(exports_core3, {
|
|
26528
26618
|
version: () => version3,
|
|
@@ -26800,7 +26890,7 @@ __export(exports_core3, {
|
|
|
26800
26890
|
$ZodAny: () => $ZodAny2
|
|
26801
26891
|
});
|
|
26802
26892
|
|
|
26803
|
-
//
|
|
26893
|
+
// node_modules/zod/v4/core/core.js
|
|
26804
26894
|
var NEVER2 = Object.freeze({
|
|
26805
26895
|
status: "aborted"
|
|
26806
26896
|
});
|
|
@@ -26876,7 +26966,7 @@ function config2(newConfig) {
|
|
|
26876
26966
|
Object.assign(globalConfig2, newConfig);
|
|
26877
26967
|
return globalConfig2;
|
|
26878
26968
|
}
|
|
26879
|
-
//
|
|
26969
|
+
// node_modules/zod/v4/core/util.js
|
|
26880
26970
|
var exports_util2 = {};
|
|
26881
26971
|
__export(exports_util2, {
|
|
26882
26972
|
unwrapMessage: () => unwrapMessage2,
|
|
@@ -27550,7 +27640,7 @@ class Class2 {
|
|
|
27550
27640
|
constructor(..._args) {}
|
|
27551
27641
|
}
|
|
27552
27642
|
|
|
27553
|
-
//
|
|
27643
|
+
// node_modules/zod/v4/core/errors.js
|
|
27554
27644
|
var initializer3 = (inst, def) => {
|
|
27555
27645
|
inst.name = "$ZodError";
|
|
27556
27646
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -27687,7 +27777,7 @@ function prettifyError2(error48) {
|
|
|
27687
27777
|
`);
|
|
27688
27778
|
}
|
|
27689
27779
|
|
|
27690
|
-
//
|
|
27780
|
+
// node_modules/zod/v4/core/parse.js
|
|
27691
27781
|
var _parse2 = (_Err) => (schema, value, _ctx, _params) => {
|
|
27692
27782
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
27693
27783
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -27774,7 +27864,7 @@ var _safeDecodeAsync2 = (_Err) => async (schema, value, _ctx) => {
|
|
|
27774
27864
|
return _safeParseAsync2(_Err)(schema, value, _ctx);
|
|
27775
27865
|
};
|
|
27776
27866
|
var safeDecodeAsync3 = /* @__PURE__ */ _safeDecodeAsync2($ZodRealError2);
|
|
27777
|
-
//
|
|
27867
|
+
// node_modules/zod/v4/core/regexes.js
|
|
27778
27868
|
var exports_regexes2 = {};
|
|
27779
27869
|
__export(exports_regexes2, {
|
|
27780
27870
|
xid: () => xid3,
|
|
@@ -27931,7 +28021,7 @@ var sha512_hex2 = /^[0-9a-fA-F]{128}$/;
|
|
|
27931
28021
|
var sha512_base642 = /* @__PURE__ */ fixedBase642(86, "==");
|
|
27932
28022
|
var sha512_base64url2 = /* @__PURE__ */ fixedBase64url2(86);
|
|
27933
28023
|
|
|
27934
|
-
//
|
|
28024
|
+
// node_modules/zod/v4/core/checks.js
|
|
27935
28025
|
var $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => {
|
|
27936
28026
|
var _a2;
|
|
27937
28027
|
inst._zod ?? (inst._zod = {});
|
|
@@ -28478,7 +28568,7 @@ var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (i
|
|
|
28478
28568
|
};
|
|
28479
28569
|
});
|
|
28480
28570
|
|
|
28481
|
-
//
|
|
28571
|
+
// node_modules/zod/v4/core/doc.js
|
|
28482
28572
|
class Doc2 {
|
|
28483
28573
|
constructor(args = []) {
|
|
28484
28574
|
this.content = [];
|
|
@@ -28516,14 +28606,14 @@ class Doc2 {
|
|
|
28516
28606
|
}
|
|
28517
28607
|
}
|
|
28518
28608
|
|
|
28519
|
-
//
|
|
28609
|
+
// node_modules/zod/v4/core/versions.js
|
|
28520
28610
|
var version3 = {
|
|
28521
28611
|
major: 4,
|
|
28522
28612
|
minor: 3,
|
|
28523
28613
|
patch: 6
|
|
28524
28614
|
};
|
|
28525
28615
|
|
|
28526
|
-
//
|
|
28616
|
+
// node_modules/zod/v4/core/schemas.js
|
|
28527
28617
|
var $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => {
|
|
28528
28618
|
var _a2;
|
|
28529
28619
|
inst ?? (inst = {});
|
|
@@ -30485,7 +30575,7 @@ function handleRefineResult2(result, payload, input, inst) {
|
|
|
30485
30575
|
payload.issues.push(issue2(_iss));
|
|
30486
30576
|
}
|
|
30487
30577
|
}
|
|
30488
|
-
//
|
|
30578
|
+
// node_modules/zod/v4/locales/index.js
|
|
30489
30579
|
var exports_locales2 = {};
|
|
30490
30580
|
__export(exports_locales2, {
|
|
30491
30581
|
zhTW: () => zh_TW_default2,
|
|
@@ -30539,7 +30629,7 @@ __export(exports_locales2, {
|
|
|
30539
30629
|
ar: () => ar_default2
|
|
30540
30630
|
});
|
|
30541
30631
|
|
|
30542
|
-
//
|
|
30632
|
+
// node_modules/zod/v4/locales/ar.js
|
|
30543
30633
|
var error48 = () => {
|
|
30544
30634
|
const Sizable = {
|
|
30545
30635
|
string: { unit: "حرف", verb: "أن يحوي" },
|
|
@@ -30645,7 +30735,7 @@ function ar_default2() {
|
|
|
30645
30735
|
localeError: error48()
|
|
30646
30736
|
};
|
|
30647
30737
|
}
|
|
30648
|
-
//
|
|
30738
|
+
// node_modules/zod/v4/locales/az.js
|
|
30649
30739
|
var error50 = () => {
|
|
30650
30740
|
const Sizable = {
|
|
30651
30741
|
string: { unit: "simvol", verb: "olmalıdır" },
|
|
@@ -30750,7 +30840,7 @@ function az_default2() {
|
|
|
30750
30840
|
localeError: error50()
|
|
30751
30841
|
};
|
|
30752
30842
|
}
|
|
30753
|
-
//
|
|
30843
|
+
// node_modules/zod/v4/locales/be.js
|
|
30754
30844
|
function getBelarusianPlural2(count, one, few, many) {
|
|
30755
30845
|
const absCount = Math.abs(count);
|
|
30756
30846
|
const lastDigit = absCount % 10;
|
|
@@ -30906,7 +30996,7 @@ function be_default2() {
|
|
|
30906
30996
|
localeError: error51()
|
|
30907
30997
|
};
|
|
30908
30998
|
}
|
|
30909
|
-
//
|
|
30999
|
+
// node_modules/zod/v4/locales/bg.js
|
|
30910
31000
|
var error52 = () => {
|
|
30911
31001
|
const Sizable = {
|
|
30912
31002
|
string: { unit: "символа", verb: "да съдържа" },
|
|
@@ -31026,7 +31116,7 @@ function bg_default2() {
|
|
|
31026
31116
|
localeError: error52()
|
|
31027
31117
|
};
|
|
31028
31118
|
}
|
|
31029
|
-
//
|
|
31119
|
+
// node_modules/zod/v4/locales/ca.js
|
|
31030
31120
|
var error53 = () => {
|
|
31031
31121
|
const Sizable = {
|
|
31032
31122
|
string: { unit: "caràcters", verb: "contenir" },
|
|
@@ -31133,7 +31223,7 @@ function ca_default2() {
|
|
|
31133
31223
|
localeError: error53()
|
|
31134
31224
|
};
|
|
31135
31225
|
}
|
|
31136
|
-
//
|
|
31226
|
+
// node_modules/zod/v4/locales/cs.js
|
|
31137
31227
|
var error54 = () => {
|
|
31138
31228
|
const Sizable = {
|
|
31139
31229
|
string: { unit: "znaků", verb: "mít" },
|
|
@@ -31244,7 +31334,7 @@ function cs_default2() {
|
|
|
31244
31334
|
localeError: error54()
|
|
31245
31335
|
};
|
|
31246
31336
|
}
|
|
31247
|
-
//
|
|
31337
|
+
// node_modules/zod/v4/locales/da.js
|
|
31248
31338
|
var error55 = () => {
|
|
31249
31339
|
const Sizable = {
|
|
31250
31340
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -31359,7 +31449,7 @@ function da_default2() {
|
|
|
31359
31449
|
localeError: error55()
|
|
31360
31450
|
};
|
|
31361
31451
|
}
|
|
31362
|
-
//
|
|
31452
|
+
// node_modules/zod/v4/locales/de.js
|
|
31363
31453
|
var error56 = () => {
|
|
31364
31454
|
const Sizable = {
|
|
31365
31455
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -31467,7 +31557,7 @@ function de_default2() {
|
|
|
31467
31557
|
localeError: error56()
|
|
31468
31558
|
};
|
|
31469
31559
|
}
|
|
31470
|
-
//
|
|
31560
|
+
// node_modules/zod/v4/locales/en.js
|
|
31471
31561
|
var error57 = () => {
|
|
31472
31562
|
const Sizable = {
|
|
31473
31563
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -31573,7 +31663,7 @@ function en_default2() {
|
|
|
31573
31663
|
localeError: error57()
|
|
31574
31664
|
};
|
|
31575
31665
|
}
|
|
31576
|
-
//
|
|
31666
|
+
// node_modules/zod/v4/locales/eo.js
|
|
31577
31667
|
var error58 = () => {
|
|
31578
31668
|
const Sizable = {
|
|
31579
31669
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -31682,7 +31772,7 @@ function eo_default2() {
|
|
|
31682
31772
|
localeError: error58()
|
|
31683
31773
|
};
|
|
31684
31774
|
}
|
|
31685
|
-
//
|
|
31775
|
+
// node_modules/zod/v4/locales/es.js
|
|
31686
31776
|
var error59 = () => {
|
|
31687
31777
|
const Sizable = {
|
|
31688
31778
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -31814,7 +31904,7 @@ function es_default2() {
|
|
|
31814
31904
|
localeError: error59()
|
|
31815
31905
|
};
|
|
31816
31906
|
}
|
|
31817
|
-
//
|
|
31907
|
+
// node_modules/zod/v4/locales/fa.js
|
|
31818
31908
|
var error60 = () => {
|
|
31819
31909
|
const Sizable = {
|
|
31820
31910
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
@@ -31928,7 +32018,7 @@ function fa_default2() {
|
|
|
31928
32018
|
localeError: error60()
|
|
31929
32019
|
};
|
|
31930
32020
|
}
|
|
31931
|
-
//
|
|
32021
|
+
// node_modules/zod/v4/locales/fi.js
|
|
31932
32022
|
var error61 = () => {
|
|
31933
32023
|
const Sizable = {
|
|
31934
32024
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
@@ -32040,7 +32130,7 @@ function fi_default2() {
|
|
|
32040
32130
|
localeError: error61()
|
|
32041
32131
|
};
|
|
32042
32132
|
}
|
|
32043
|
-
//
|
|
32133
|
+
// node_modules/zod/v4/locales/fr.js
|
|
32044
32134
|
var error62 = () => {
|
|
32045
32135
|
const Sizable = {
|
|
32046
32136
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -32148,7 +32238,7 @@ function fr_default2() {
|
|
|
32148
32238
|
localeError: error62()
|
|
32149
32239
|
};
|
|
32150
32240
|
}
|
|
32151
|
-
//
|
|
32241
|
+
// node_modules/zod/v4/locales/fr-CA.js
|
|
32152
32242
|
var error63 = () => {
|
|
32153
32243
|
const Sizable = {
|
|
32154
32244
|
string: { unit: "caractères", verb: "avoir" },
|
|
@@ -32255,7 +32345,7 @@ function fr_CA_default2() {
|
|
|
32255
32345
|
localeError: error63()
|
|
32256
32346
|
};
|
|
32257
32347
|
}
|
|
32258
|
-
//
|
|
32348
|
+
// node_modules/zod/v4/locales/he.js
|
|
32259
32349
|
var error64 = () => {
|
|
32260
32350
|
const TypeNames = {
|
|
32261
32351
|
string: { label: "מחרוזת", gender: "f" },
|
|
@@ -32448,7 +32538,7 @@ function he_default2() {
|
|
|
32448
32538
|
localeError: error64()
|
|
32449
32539
|
};
|
|
32450
32540
|
}
|
|
32451
|
-
//
|
|
32541
|
+
// node_modules/zod/v4/locales/hu.js
|
|
32452
32542
|
var error65 = () => {
|
|
32453
32543
|
const Sizable = {
|
|
32454
32544
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -32556,7 +32646,7 @@ function hu_default2() {
|
|
|
32556
32646
|
localeError: error65()
|
|
32557
32647
|
};
|
|
32558
32648
|
}
|
|
32559
|
-
//
|
|
32649
|
+
// node_modules/zod/v4/locales/hy.js
|
|
32560
32650
|
function getArmenianPlural2(count, one, many) {
|
|
32561
32651
|
return Math.abs(count) === 1 ? one : many;
|
|
32562
32652
|
}
|
|
@@ -32703,7 +32793,7 @@ function hy_default2() {
|
|
|
32703
32793
|
localeError: error66()
|
|
32704
32794
|
};
|
|
32705
32795
|
}
|
|
32706
|
-
//
|
|
32796
|
+
// node_modules/zod/v4/locales/id.js
|
|
32707
32797
|
var error67 = () => {
|
|
32708
32798
|
const Sizable = {
|
|
32709
32799
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -32809,7 +32899,7 @@ function id_default2() {
|
|
|
32809
32899
|
localeError: error67()
|
|
32810
32900
|
};
|
|
32811
32901
|
}
|
|
32812
|
-
//
|
|
32902
|
+
// node_modules/zod/v4/locales/is.js
|
|
32813
32903
|
var error68 = () => {
|
|
32814
32904
|
const Sizable = {
|
|
32815
32905
|
string: { unit: "stafi", verb: "að hafa" },
|
|
@@ -32918,7 +33008,7 @@ function is_default2() {
|
|
|
32918
33008
|
localeError: error68()
|
|
32919
33009
|
};
|
|
32920
33010
|
}
|
|
32921
|
-
//
|
|
33011
|
+
// node_modules/zod/v4/locales/it.js
|
|
32922
33012
|
var error69 = () => {
|
|
32923
33013
|
const Sizable = {
|
|
32924
33014
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -33026,7 +33116,7 @@ function it_default2() {
|
|
|
33026
33116
|
localeError: error69()
|
|
33027
33117
|
};
|
|
33028
33118
|
}
|
|
33029
|
-
//
|
|
33119
|
+
// node_modules/zod/v4/locales/ja.js
|
|
33030
33120
|
var error70 = () => {
|
|
33031
33121
|
const Sizable = {
|
|
33032
33122
|
string: { unit: "文字", verb: "である" },
|
|
@@ -33133,7 +33223,7 @@ function ja_default2() {
|
|
|
33133
33223
|
localeError: error70()
|
|
33134
33224
|
};
|
|
33135
33225
|
}
|
|
33136
|
-
//
|
|
33226
|
+
// node_modules/zod/v4/locales/ka.js
|
|
33137
33227
|
var error71 = () => {
|
|
33138
33228
|
const Sizable = {
|
|
33139
33229
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
@@ -33245,7 +33335,7 @@ function ka_default2() {
|
|
|
33245
33335
|
localeError: error71()
|
|
33246
33336
|
};
|
|
33247
33337
|
}
|
|
33248
|
-
//
|
|
33338
|
+
// node_modules/zod/v4/locales/km.js
|
|
33249
33339
|
var error72 = () => {
|
|
33250
33340
|
const Sizable = {
|
|
33251
33341
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
@@ -33356,11 +33446,11 @@ function km_default2() {
|
|
|
33356
33446
|
};
|
|
33357
33447
|
}
|
|
33358
33448
|
|
|
33359
|
-
//
|
|
33449
|
+
// node_modules/zod/v4/locales/kh.js
|
|
33360
33450
|
function kh_default2() {
|
|
33361
33451
|
return km_default2();
|
|
33362
33452
|
}
|
|
33363
|
-
//
|
|
33453
|
+
// node_modules/zod/v4/locales/ko.js
|
|
33364
33454
|
var error73 = () => {
|
|
33365
33455
|
const Sizable = {
|
|
33366
33456
|
string: { unit: "문자", verb: "to have" },
|
|
@@ -33471,7 +33561,7 @@ function ko_default2() {
|
|
|
33471
33561
|
localeError: error73()
|
|
33472
33562
|
};
|
|
33473
33563
|
}
|
|
33474
|
-
//
|
|
33564
|
+
// node_modules/zod/v4/locales/lt.js
|
|
33475
33565
|
var capitalizeFirstCharacter2 = (text) => {
|
|
33476
33566
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
33477
33567
|
};
|
|
@@ -33674,7 +33764,7 @@ function lt_default2() {
|
|
|
33674
33764
|
localeError: error74()
|
|
33675
33765
|
};
|
|
33676
33766
|
}
|
|
33677
|
-
//
|
|
33767
|
+
// node_modules/zod/v4/locales/mk.js
|
|
33678
33768
|
var error75 = () => {
|
|
33679
33769
|
const Sizable = {
|
|
33680
33770
|
string: { unit: "знаци", verb: "да имаат" },
|
|
@@ -33783,7 +33873,7 @@ function mk_default2() {
|
|
|
33783
33873
|
localeError: error75()
|
|
33784
33874
|
};
|
|
33785
33875
|
}
|
|
33786
|
-
//
|
|
33876
|
+
// node_modules/zod/v4/locales/ms.js
|
|
33787
33877
|
var error76 = () => {
|
|
33788
33878
|
const Sizable = {
|
|
33789
33879
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -33890,7 +33980,7 @@ function ms_default2() {
|
|
|
33890
33980
|
localeError: error76()
|
|
33891
33981
|
};
|
|
33892
33982
|
}
|
|
33893
|
-
//
|
|
33983
|
+
// node_modules/zod/v4/locales/nl.js
|
|
33894
33984
|
var error77 = () => {
|
|
33895
33985
|
const Sizable = {
|
|
33896
33986
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -34000,7 +34090,7 @@ function nl_default2() {
|
|
|
34000
34090
|
localeError: error77()
|
|
34001
34091
|
};
|
|
34002
34092
|
}
|
|
34003
|
-
//
|
|
34093
|
+
// node_modules/zod/v4/locales/no.js
|
|
34004
34094
|
var error78 = () => {
|
|
34005
34095
|
const Sizable = {
|
|
34006
34096
|
string: { unit: "tegn", verb: "å ha" },
|
|
@@ -34108,7 +34198,7 @@ function no_default2() {
|
|
|
34108
34198
|
localeError: error78()
|
|
34109
34199
|
};
|
|
34110
34200
|
}
|
|
34111
|
-
//
|
|
34201
|
+
// node_modules/zod/v4/locales/ota.js
|
|
34112
34202
|
var error79 = () => {
|
|
34113
34203
|
const Sizable = {
|
|
34114
34204
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
@@ -34217,7 +34307,7 @@ function ota_default2() {
|
|
|
34217
34307
|
localeError: error79()
|
|
34218
34308
|
};
|
|
34219
34309
|
}
|
|
34220
|
-
//
|
|
34310
|
+
// node_modules/zod/v4/locales/ps.js
|
|
34221
34311
|
var error80 = () => {
|
|
34222
34312
|
const Sizable = {
|
|
34223
34313
|
string: { unit: "توکي", verb: "ولري" },
|
|
@@ -34331,7 +34421,7 @@ function ps_default2() {
|
|
|
34331
34421
|
localeError: error80()
|
|
34332
34422
|
};
|
|
34333
34423
|
}
|
|
34334
|
-
//
|
|
34424
|
+
// node_modules/zod/v4/locales/pl.js
|
|
34335
34425
|
var error81 = () => {
|
|
34336
34426
|
const Sizable = {
|
|
34337
34427
|
string: { unit: "znaków", verb: "mieć" },
|
|
@@ -34440,7 +34530,7 @@ function pl_default2() {
|
|
|
34440
34530
|
localeError: error81()
|
|
34441
34531
|
};
|
|
34442
34532
|
}
|
|
34443
|
-
//
|
|
34533
|
+
// node_modules/zod/v4/locales/pt.js
|
|
34444
34534
|
var error82 = () => {
|
|
34445
34535
|
const Sizable = {
|
|
34446
34536
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -34548,7 +34638,7 @@ function pt_default2() {
|
|
|
34548
34638
|
localeError: error82()
|
|
34549
34639
|
};
|
|
34550
34640
|
}
|
|
34551
|
-
//
|
|
34641
|
+
// node_modules/zod/v4/locales/ru.js
|
|
34552
34642
|
function getRussianPlural2(count, one, few, many) {
|
|
34553
34643
|
const absCount = Math.abs(count);
|
|
34554
34644
|
const lastDigit = absCount % 10;
|
|
@@ -34704,7 +34794,7 @@ function ru_default2() {
|
|
|
34704
34794
|
localeError: error83()
|
|
34705
34795
|
};
|
|
34706
34796
|
}
|
|
34707
|
-
//
|
|
34797
|
+
// node_modules/zod/v4/locales/sl.js
|
|
34708
34798
|
var error84 = () => {
|
|
34709
34799
|
const Sizable = {
|
|
34710
34800
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -34813,7 +34903,7 @@ function sl_default2() {
|
|
|
34813
34903
|
localeError: error84()
|
|
34814
34904
|
};
|
|
34815
34905
|
}
|
|
34816
|
-
//
|
|
34906
|
+
// node_modules/zod/v4/locales/sv.js
|
|
34817
34907
|
var error85 = () => {
|
|
34818
34908
|
const Sizable = {
|
|
34819
34909
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -34923,7 +35013,7 @@ function sv_default2() {
|
|
|
34923
35013
|
localeError: error85()
|
|
34924
35014
|
};
|
|
34925
35015
|
}
|
|
34926
|
-
//
|
|
35016
|
+
// node_modules/zod/v4/locales/ta.js
|
|
34927
35017
|
var error86 = () => {
|
|
34928
35018
|
const Sizable = {
|
|
34929
35019
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -35033,7 +35123,7 @@ function ta_default2() {
|
|
|
35033
35123
|
localeError: error86()
|
|
35034
35124
|
};
|
|
35035
35125
|
}
|
|
35036
|
-
//
|
|
35126
|
+
// node_modules/zod/v4/locales/th.js
|
|
35037
35127
|
var error87 = () => {
|
|
35038
35128
|
const Sizable = {
|
|
35039
35129
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
@@ -35143,7 +35233,7 @@ function th_default2() {
|
|
|
35143
35233
|
localeError: error87()
|
|
35144
35234
|
};
|
|
35145
35235
|
}
|
|
35146
|
-
//
|
|
35236
|
+
// node_modules/zod/v4/locales/tr.js
|
|
35147
35237
|
var error88 = () => {
|
|
35148
35238
|
const Sizable = {
|
|
35149
35239
|
string: { unit: "karakter", verb: "olmalı" },
|
|
@@ -35248,7 +35338,7 @@ function tr_default2() {
|
|
|
35248
35338
|
localeError: error88()
|
|
35249
35339
|
};
|
|
35250
35340
|
}
|
|
35251
|
-
//
|
|
35341
|
+
// node_modules/zod/v4/locales/uk.js
|
|
35252
35342
|
var error89 = () => {
|
|
35253
35343
|
const Sizable = {
|
|
35254
35344
|
string: { unit: "символів", verb: "матиме" },
|
|
@@ -35357,11 +35447,11 @@ function uk_default2() {
|
|
|
35357
35447
|
};
|
|
35358
35448
|
}
|
|
35359
35449
|
|
|
35360
|
-
//
|
|
35450
|
+
// node_modules/zod/v4/locales/ua.js
|
|
35361
35451
|
function ua_default2() {
|
|
35362
35452
|
return uk_default2();
|
|
35363
35453
|
}
|
|
35364
|
-
//
|
|
35454
|
+
// node_modules/zod/v4/locales/ur.js
|
|
35365
35455
|
var error90 = () => {
|
|
35366
35456
|
const Sizable = {
|
|
35367
35457
|
string: { unit: "حروف", verb: "ہونا" },
|
|
@@ -35471,7 +35561,7 @@ function ur_default2() {
|
|
|
35471
35561
|
localeError: error90()
|
|
35472
35562
|
};
|
|
35473
35563
|
}
|
|
35474
|
-
//
|
|
35564
|
+
// node_modules/zod/v4/locales/uz.js
|
|
35475
35565
|
var error91 = () => {
|
|
35476
35566
|
const Sizable = {
|
|
35477
35567
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
@@ -35580,7 +35670,7 @@ function uz_default2() {
|
|
|
35580
35670
|
localeError: error91()
|
|
35581
35671
|
};
|
|
35582
35672
|
}
|
|
35583
|
-
//
|
|
35673
|
+
// node_modules/zod/v4/locales/vi.js
|
|
35584
35674
|
var error92 = () => {
|
|
35585
35675
|
const Sizable = {
|
|
35586
35676
|
string: { unit: "ký tự", verb: "có" },
|
|
@@ -35688,7 +35778,7 @@ function vi_default2() {
|
|
|
35688
35778
|
localeError: error92()
|
|
35689
35779
|
};
|
|
35690
35780
|
}
|
|
35691
|
-
//
|
|
35781
|
+
// node_modules/zod/v4/locales/zh-CN.js
|
|
35692
35782
|
var error93 = () => {
|
|
35693
35783
|
const Sizable = {
|
|
35694
35784
|
string: { unit: "字符", verb: "包含" },
|
|
@@ -35797,7 +35887,7 @@ function zh_CN_default2() {
|
|
|
35797
35887
|
localeError: error93()
|
|
35798
35888
|
};
|
|
35799
35889
|
}
|
|
35800
|
-
//
|
|
35890
|
+
// node_modules/zod/v4/locales/zh-TW.js
|
|
35801
35891
|
var error94 = () => {
|
|
35802
35892
|
const Sizable = {
|
|
35803
35893
|
string: { unit: "字元", verb: "擁有" },
|
|
@@ -35904,7 +35994,7 @@ function zh_TW_default2() {
|
|
|
35904
35994
|
localeError: error94()
|
|
35905
35995
|
};
|
|
35906
35996
|
}
|
|
35907
|
-
//
|
|
35997
|
+
// node_modules/zod/v4/locales/yo.js
|
|
35908
35998
|
var error95 = () => {
|
|
35909
35999
|
const Sizable = {
|
|
35910
36000
|
string: { unit: "àmi", verb: "ní" },
|
|
@@ -36011,7 +36101,7 @@ function yo_default2() {
|
|
|
36011
36101
|
localeError: error95()
|
|
36012
36102
|
};
|
|
36013
36103
|
}
|
|
36014
|
-
//
|
|
36104
|
+
// node_modules/zod/v4/core/registries.js
|
|
36015
36105
|
var _a2;
|
|
36016
36106
|
var $output2 = Symbol("ZodOutput");
|
|
36017
36107
|
var $input2 = Symbol("ZodInput");
|
|
@@ -36061,7 +36151,7 @@ function registry2() {
|
|
|
36061
36151
|
}
|
|
36062
36152
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry2());
|
|
36063
36153
|
var globalRegistry2 = globalThis.__zod_globalRegistry;
|
|
36064
|
-
//
|
|
36154
|
+
// node_modules/zod/v4/core/api.js
|
|
36065
36155
|
function _string2(Class3, params) {
|
|
36066
36156
|
return new Class3({
|
|
36067
36157
|
type: "string",
|
|
@@ -36981,7 +37071,7 @@ function _stringFormat2(Class3, format, fnOrRegex, _params = {}) {
|
|
|
36981
37071
|
const inst = new Class3(def);
|
|
36982
37072
|
return inst;
|
|
36983
37073
|
}
|
|
36984
|
-
//
|
|
37074
|
+
// node_modules/zod/v4/core/to-json-schema.js
|
|
36985
37075
|
function initializeContext2(params) {
|
|
36986
37076
|
let target = params?.target ?? "draft-2020-12";
|
|
36987
37077
|
if (target === "draft-4")
|
|
@@ -37326,7 +37416,7 @@ var createStandardJSONSchemaMethod2 = (schema, io, processors = {}) => (params)
|
|
|
37326
37416
|
extractDefs2(ctx, schema);
|
|
37327
37417
|
return finalize2(ctx, schema);
|
|
37328
37418
|
};
|
|
37329
|
-
//
|
|
37419
|
+
// node_modules/zod/v4/core/json-schema-processors.js
|
|
37330
37420
|
var formatMap2 = {
|
|
37331
37421
|
guid: "uuid",
|
|
37332
37422
|
url: "uri",
|
|
@@ -37871,7 +37961,7 @@ function toJSONSchema4(input, params) {
|
|
|
37871
37961
|
extractDefs2(ctx, input);
|
|
37872
37962
|
return finalize2(ctx, input);
|
|
37873
37963
|
}
|
|
37874
|
-
//
|
|
37964
|
+
// node_modules/zod/v4/core/json-schema-generator.js
|
|
37875
37965
|
class JSONSchemaGenerator2 {
|
|
37876
37966
|
get metadataRegistry() {
|
|
37877
37967
|
return this.ctx.metadataRegistry;
|
|
@@ -37930,9 +38020,9 @@ class JSONSchemaGenerator2 {
|
|
|
37930
38020
|
return plainResult;
|
|
37931
38021
|
}
|
|
37932
38022
|
}
|
|
37933
|
-
//
|
|
38023
|
+
// node_modules/zod/v4/core/json-schema.js
|
|
37934
38024
|
var exports_json_schema2 = {};
|
|
37935
|
-
//
|
|
38025
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
37936
38026
|
var exports_schemas3 = {};
|
|
37937
38027
|
__export(exports_schemas3, {
|
|
37938
38028
|
xor: () => xor2,
|
|
@@ -38101,7 +38191,7 @@ __export(exports_schemas3, {
|
|
|
38101
38191
|
ZodAny: () => ZodAny2
|
|
38102
38192
|
});
|
|
38103
38193
|
|
|
38104
|
-
//
|
|
38194
|
+
// node_modules/zod/v4/classic/checks.js
|
|
38105
38195
|
var exports_checks3 = {};
|
|
38106
38196
|
__export(exports_checks3, {
|
|
38107
38197
|
uppercase: () => _uppercase2,
|
|
@@ -38135,7 +38225,7 @@ __export(exports_checks3, {
|
|
|
38135
38225
|
endsWith: () => _endsWith2
|
|
38136
38226
|
});
|
|
38137
38227
|
|
|
38138
|
-
//
|
|
38228
|
+
// node_modules/zod/v4/classic/iso.js
|
|
38139
38229
|
var exports_iso2 = {};
|
|
38140
38230
|
__export(exports_iso2, {
|
|
38141
38231
|
time: () => time5,
|
|
@@ -38176,7 +38266,7 @@ function duration5(params) {
|
|
|
38176
38266
|
return _isoDuration2(ZodISODuration2, params);
|
|
38177
38267
|
}
|
|
38178
38268
|
|
|
38179
|
-
//
|
|
38269
|
+
// node_modules/zod/v4/classic/errors.js
|
|
38180
38270
|
var initializer5 = (inst, issues) => {
|
|
38181
38271
|
$ZodError2.init(inst, issues);
|
|
38182
38272
|
inst.name = "ZodError";
|
|
@@ -38211,7 +38301,7 @@ var ZodRealError2 = $constructor2("ZodError", initializer5, {
|
|
|
38211
38301
|
Parent: Error
|
|
38212
38302
|
});
|
|
38213
38303
|
|
|
38214
|
-
//
|
|
38304
|
+
// node_modules/zod/v4/classic/parse.js
|
|
38215
38305
|
var parse6 = /* @__PURE__ */ _parse2(ZodRealError2);
|
|
38216
38306
|
var parseAsync5 = /* @__PURE__ */ _parseAsync2(ZodRealError2);
|
|
38217
38307
|
var safeParse5 = /* @__PURE__ */ _safeParse2(ZodRealError2);
|
|
@@ -38225,7 +38315,7 @@ var safeDecode5 = /* @__PURE__ */ _safeDecode2(ZodRealError2);
|
|
|
38225
38315
|
var safeEncodeAsync5 = /* @__PURE__ */ _safeEncodeAsync2(ZodRealError2);
|
|
38226
38316
|
var safeDecodeAsync5 = /* @__PURE__ */ _safeDecodeAsync2(ZodRealError2);
|
|
38227
38317
|
|
|
38228
|
-
//
|
|
38318
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
38229
38319
|
var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
|
|
38230
38320
|
$ZodType2.init(inst, def);
|
|
38231
38321
|
Object.assign(inst["~standard"], {
|
|
@@ -39301,7 +39391,7 @@ function json2(params) {
|
|
|
39301
39391
|
function preprocess2(fn, schema) {
|
|
39302
39392
|
return pipe2(transform2(fn), schema);
|
|
39303
39393
|
}
|
|
39304
|
-
//
|
|
39394
|
+
// node_modules/zod/v4/classic/compat.js
|
|
39305
39395
|
var ZodIssueCode2 = {
|
|
39306
39396
|
invalid_type: "invalid_type",
|
|
39307
39397
|
too_big: "too_big",
|
|
@@ -39325,7 +39415,7 @@ function getErrorMap2() {
|
|
|
39325
39415
|
}
|
|
39326
39416
|
var ZodFirstPartyTypeKind2;
|
|
39327
39417
|
(function(ZodFirstPartyTypeKind3) {})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
|
|
39328
|
-
//
|
|
39418
|
+
// node_modules/zod/v4/classic/from-json-schema.js
|
|
39329
39419
|
var z2 = {
|
|
39330
39420
|
...exports_schemas3,
|
|
39331
39421
|
...exports_checks3,
|
|
@@ -39786,7 +39876,7 @@ function fromJSONSchema4(schema, params) {
|
|
|
39786
39876
|
};
|
|
39787
39877
|
return convertSchema2(schema, ctx);
|
|
39788
39878
|
}
|
|
39789
|
-
//
|
|
39879
|
+
// node_modules/zod/v4/classic/coerce.js
|
|
39790
39880
|
var exports_coerce2 = {};
|
|
39791
39881
|
__export(exports_coerce2, {
|
|
39792
39882
|
string: () => string7,
|
|
@@ -39811,21 +39901,27 @@ function date9(params) {
|
|
|
39811
39901
|
return _coercedDate2(ZodDate2, params);
|
|
39812
39902
|
}
|
|
39813
39903
|
|
|
39814
|
-
//
|
|
39904
|
+
// node_modules/zod/v4/classic/external.js
|
|
39815
39905
|
config2(en_default2());
|
|
39816
39906
|
// src/project/util/git.ts
|
|
39817
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
|
+
};
|
|
39818
39913
|
var getGitPathname = (repoPath) => {
|
|
39819
39914
|
try {
|
|
39820
39915
|
const url4 = execSync("git config --get remote.origin.url", { cwd: repoPath, encoding: "utf-8" }).trim();
|
|
39821
39916
|
if (url4) {
|
|
39822
|
-
|
|
39823
|
-
|
|
39824
|
-
|
|
39917
|
+
return {
|
|
39918
|
+
url: url4,
|
|
39919
|
+
pathname: getPathnameFromGitUrl(url4)
|
|
39920
|
+
};
|
|
39825
39921
|
}
|
|
39826
39922
|
return null;
|
|
39827
39923
|
} catch (err) {
|
|
39828
|
-
console.warn(`[getGitPathname] Failed to get git remote url for ${repoPath}
|
|
39924
|
+
console.warn(`[getGitPathname] Failed to get git remote url for ${repoPath}:`, err);
|
|
39829
39925
|
return null;
|
|
39830
39926
|
}
|
|
39831
39927
|
};
|
|
@@ -39847,16 +39943,18 @@ app.route({
|
|
|
39847
39943
|
let { filepath, repo, name } = ctx.query;
|
|
39848
39944
|
if (!filepath)
|
|
39849
39945
|
ctx.throw(400, "filepath 不能为空");
|
|
39946
|
+
let link = "";
|
|
39850
39947
|
if (!repo) {
|
|
39851
39948
|
const gitPathname = getGitPathname(filepath);
|
|
39852
39949
|
if (gitPathname) {
|
|
39853
|
-
repo = gitPathname;
|
|
39950
|
+
repo = gitPathname.pathname;
|
|
39951
|
+
link = gitPathname.url;
|
|
39854
39952
|
} else {
|
|
39855
39953
|
const pathParts = filepath.split("/");
|
|
39856
39954
|
repo = pathParts[pathParts.length - 1];
|
|
39857
39955
|
}
|
|
39858
39956
|
}
|
|
39859
|
-
const info = await manager.addProject({ path: filepath, repo, name });
|
|
39957
|
+
const info = await manager.addProject({ path: filepath, repo, name, link: link || (repo ? `https://cnb.cool/${repo}` : undefined) });
|
|
39860
39958
|
ctx.body = { success: true, data: info };
|
|
39861
39959
|
}).addTo(app);
|
|
39862
39960
|
app.route({
|
|
@@ -40075,6 +40173,130 @@ app.route({
|
|
|
40075
40173
|
}
|
|
40076
40174
|
}).addTo(app);
|
|
40077
40175
|
|
|
40176
|
+
// src/routes/project-init.ts
|
|
40177
|
+
import fs5 from "node:fs";
|
|
40178
|
+
import path6 from "node:path";
|
|
40179
|
+
import { execSync as execSync2 } from "node:child_process";
|
|
40180
|
+
var DEFAULT_ROOT_PATH = "/workspace/projects";
|
|
40181
|
+
var getProjectPaths = (ctx) => {
|
|
40182
|
+
const rootPath = path6.resolve(ctx.query.rootPath || DEFAULT_ROOT_PATH);
|
|
40183
|
+
if (!fs5.existsSync(rootPath)) {
|
|
40184
|
+
ctx.throw(400, "rootPath 指定的目录不存在");
|
|
40185
|
+
}
|
|
40186
|
+
const projectPaths = [];
|
|
40187
|
+
try {
|
|
40188
|
+
const entries = fs5.readdirSync(rootPath, { withFileTypes: true });
|
|
40189
|
+
for (const entry of entries) {
|
|
40190
|
+
if (!entry.isDirectory())
|
|
40191
|
+
continue;
|
|
40192
|
+
const fullPath = path6.join(rootPath, entry.name);
|
|
40193
|
+
if (entry.name === "node_modules" || entry.name.startsWith("."))
|
|
40194
|
+
continue;
|
|
40195
|
+
if (fs5.existsSync(path6.join(fullPath, ".git"))) {
|
|
40196
|
+
projectPaths.push(fullPath);
|
|
40197
|
+
}
|
|
40198
|
+
}
|
|
40199
|
+
} catch (err) {
|
|
40200
|
+
console.warn(`[project-init] Failed to read root directory ${rootPath}:`, err);
|
|
40201
|
+
}
|
|
40202
|
+
return {
|
|
40203
|
+
rootPath,
|
|
40204
|
+
projectPaths
|
|
40205
|
+
};
|
|
40206
|
+
};
|
|
40207
|
+
app.route({
|
|
40208
|
+
path: "project",
|
|
40209
|
+
key: "init",
|
|
40210
|
+
description: "初始化项目,通过root目录,搜索当前有git的项目列表,并将其注册到系统中",
|
|
40211
|
+
middleware: ["auth-admin"],
|
|
40212
|
+
metadata: {
|
|
40213
|
+
args: {
|
|
40214
|
+
rootPath: exports_external2.string().optional().describe("搜索项目的根目录绝对路径,默认为 /workspace/projects")
|
|
40215
|
+
}
|
|
40216
|
+
}
|
|
40217
|
+
}).define(async (ctx) => {
|
|
40218
|
+
const { rootPath, projectPaths } = getProjectPaths(ctx);
|
|
40219
|
+
const results = [];
|
|
40220
|
+
for (const projectPath of projectPaths) {
|
|
40221
|
+
try {
|
|
40222
|
+
const gitRepo = getGitPathname(projectPath);
|
|
40223
|
+
const repo = gitRepo?.pathname || path6.basename(projectPath);
|
|
40224
|
+
const name = path6.basename(projectPath);
|
|
40225
|
+
await manager.addProject({ path: projectPath, repo, name, link: gitRepo?.url });
|
|
40226
|
+
results.push({ path: projectPath, repo, success: true });
|
|
40227
|
+
console.log(`[project-init] Added project: ${projectPath}, repo: ${repo}`);
|
|
40228
|
+
} catch (err) {
|
|
40229
|
+
const error49 = err instanceof Error ? err.message : String(err);
|
|
40230
|
+
results.push({ path: projectPath, repo: null, success: false, error: error49 });
|
|
40231
|
+
console.error(`[project-init] Failed to add project ${projectPath}:`, err);
|
|
40232
|
+
}
|
|
40233
|
+
}
|
|
40234
|
+
ctx.body = {
|
|
40235
|
+
rootPath,
|
|
40236
|
+
totalFound: projectPaths.length,
|
|
40237
|
+
results
|
|
40238
|
+
};
|
|
40239
|
+
}).addTo(app);
|
|
40240
|
+
app.route({
|
|
40241
|
+
path: "project",
|
|
40242
|
+
key: "list-projects",
|
|
40243
|
+
description: "列出当前工作区已注册的项目",
|
|
40244
|
+
middleware: ["auth-admin"],
|
|
40245
|
+
metadata: {
|
|
40246
|
+
args: {
|
|
40247
|
+
rootPath: exports_external2.string().optional().describe("项目根目录绝对路径,默认为 /workspace/projects,指定后只列出该目录下的项目")
|
|
40248
|
+
}
|
|
40249
|
+
}
|
|
40250
|
+
}).define(async (ctx) => {
|
|
40251
|
+
const { rootPath, projectPaths } = getProjectPaths(ctx);
|
|
40252
|
+
ctx.body = {
|
|
40253
|
+
rootPath,
|
|
40254
|
+
list: projectPaths
|
|
40255
|
+
};
|
|
40256
|
+
}).addTo(app);
|
|
40257
|
+
app.route({
|
|
40258
|
+
path: "project",
|
|
40259
|
+
key: "clone-cnb",
|
|
40260
|
+
description: "clone 一个项目到projects目录下,并注册到系统中。",
|
|
40261
|
+
middleware: ["auth-admin"],
|
|
40262
|
+
metadata: {
|
|
40263
|
+
args: {
|
|
40264
|
+
filepath: exports_external2.string().optional().describe("新项目根目录的绝对路径,默认在 /workspace/projects 下以仓库名创建子目录"),
|
|
40265
|
+
repo: exports_external2.string().describe("代码仓库标识,用于搜索结果展示和过滤,格式如 owner/repo,例如 kevisual/cnb,必填")
|
|
40266
|
+
}
|
|
40267
|
+
}
|
|
40268
|
+
}).define(async (ctx) => {
|
|
40269
|
+
const { filepath = DEFAULT_ROOT_PATH, repo = "" } = ctx.query;
|
|
40270
|
+
let cloneRepoUrl = "";
|
|
40271
|
+
if (repo?.startsWith("http")) {
|
|
40272
|
+
cloneRepoUrl = repo;
|
|
40273
|
+
} else if (repo) {
|
|
40274
|
+
cloneRepoUrl = `https://cnb.cool/${repo}`;
|
|
40275
|
+
} else {
|
|
40276
|
+
ctx.throw(400, "repo 参数不能为空,且必须是完整的 URL 或者 owner/repo 格式");
|
|
40277
|
+
}
|
|
40278
|
+
const name = getPathnameFromGitUrl(cloneRepoUrl);
|
|
40279
|
+
if (!name) {
|
|
40280
|
+
ctx.throw(400, "无法从 repo 参数解析出项目名称,请检查 repo 格式是否正确");
|
|
40281
|
+
}
|
|
40282
|
+
const targetPath = path6.join(filepath, name);
|
|
40283
|
+
if (fs5.existsSync(targetPath)) {
|
|
40284
|
+
ctx.throw(400, `目标路径已存在: ${targetPath}`);
|
|
40285
|
+
}
|
|
40286
|
+
const cloneCmd = `git clone ${cloneRepoUrl} ${targetPath}`;
|
|
40287
|
+
try {
|
|
40288
|
+
console.log(`[project-clone] Cloning repo ${cloneRepoUrl} to ${targetPath}...`);
|
|
40289
|
+
execSync2(cloneCmd, { stdio: "inherit" });
|
|
40290
|
+
console.log(`[project-clone] Clone successful, adding project...`);
|
|
40291
|
+
const info = await manager.addProject({ path: targetPath, repo: name, name, link: cloneRepoUrl });
|
|
40292
|
+
ctx.body = info;
|
|
40293
|
+
} catch (err) {
|
|
40294
|
+
const error49 = err instanceof Error ? err.message : String(err);
|
|
40295
|
+
console.error(`[project-clone] Failed to clone and add project from ${cloneRepoUrl}:`, err);
|
|
40296
|
+
ctx.throw(500, `Failed to clone and add project: ${error49}`);
|
|
40297
|
+
}
|
|
40298
|
+
}).addTo(app);
|
|
40299
|
+
|
|
40078
40300
|
// src/index.ts
|
|
40079
40301
|
if (__require.main == __require.module) {}
|
|
40080
40302
|
await manager.init();
|