@c4a/daemon 0.4.12-alpha.2 → 0.4.12-alpha.3
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/index.js +22 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -13288,6 +13288,24 @@ var ERROR_CODE_HTTP_STATUS = {
|
|
|
13288
13288
|
var import_yaml = __toESM(require_dist(), 1);
|
|
13289
13289
|
// ../core/src/constants.ts
|
|
13290
13290
|
var DAEMON_HEARTBEAT_INTERVAL = 30000;
|
|
13291
|
+
// ../core/src/fileTypes.ts
|
|
13292
|
+
var INDEXABLE_CODE_EXTENSIONS = new Set([".ts", ".tsx"]);
|
|
13293
|
+
var INDEXABLE_DOC_EXTENSIONS = new Set([".md"]);
|
|
13294
|
+
var INDEXABLE_EXTENSIONS = new Set([
|
|
13295
|
+
...INDEXABLE_CODE_EXTENSIONS,
|
|
13296
|
+
...INDEXABLE_DOC_EXTENSIONS
|
|
13297
|
+
]);
|
|
13298
|
+
var UPLOAD_ALLOWED_EXTENSIONS = new Set([
|
|
13299
|
+
".md",
|
|
13300
|
+
".doc",
|
|
13301
|
+
".docx",
|
|
13302
|
+
".pdf",
|
|
13303
|
+
".ppt",
|
|
13304
|
+
".pptx",
|
|
13305
|
+
".txt"
|
|
13306
|
+
]);
|
|
13307
|
+
var TEXT_EXTENSIONS = new Set([".md", ".txt"]);
|
|
13308
|
+
var UPLOAD_MAX_FILE_SIZE = 5 * 1024 * 1024;
|
|
13291
13309
|
// src/handlers/utils.ts
|
|
13292
13310
|
import path2 from "node:path";
|
|
13293
13311
|
|
|
@@ -13499,7 +13517,8 @@ var matchesFilter = (filePath, include) => {
|
|
|
13499
13517
|
if (CODE_PACKAGE_FILES.has(lower))
|
|
13500
13518
|
return true;
|
|
13501
13519
|
} else if (filter === "docs") {
|
|
13502
|
-
|
|
13520
|
+
const ext = filePath.toLowerCase().slice(filePath.lastIndexOf("."));
|
|
13521
|
+
if (INDEXABLE_DOC_EXTENSIONS.has(ext))
|
|
13503
13522
|
return true;
|
|
13504
13523
|
} else if (filter.startsWith(".")) {
|
|
13505
13524
|
if (filePath.toLowerCase().endsWith(filter.toLowerCase()))
|
|
@@ -13747,7 +13766,8 @@ var matchesFilter2 = (filePath, include) => {
|
|
|
13747
13766
|
if (CODE_PACKAGE_FILES.has(lower))
|
|
13748
13767
|
return true;
|
|
13749
13768
|
} else if (filter === "docs") {
|
|
13750
|
-
|
|
13769
|
+
const ext = filePath.toLowerCase().slice(filePath.lastIndexOf("."));
|
|
13770
|
+
if (INDEXABLE_DOC_EXTENSIONS.has(ext))
|
|
13751
13771
|
return true;
|
|
13752
13772
|
} else if (filter.startsWith(".")) {
|
|
13753
13773
|
if (filePath.toLowerCase().endsWith(filter.toLowerCase()))
|