@floomhq/floom 1.0.25 → 1.0.26
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/sync-manifest.js +39 -1
- package/package.json +1 -1
package/dist/sync-manifest.js
CHANGED
|
@@ -33,13 +33,51 @@ function isEntryForKey(key, value) {
|
|
|
33
33
|
function isPackageFilePath(packagePath) {
|
|
34
34
|
if (packagePath.length === 1 && packagePath[0] === "SKILL.md")
|
|
35
35
|
return true;
|
|
36
|
+
if (packagePath.length === 1 && isAllowedRootPackageFile(packagePath[0] ?? ""))
|
|
37
|
+
return true;
|
|
36
38
|
if (packagePath.length < 2)
|
|
37
39
|
return false;
|
|
38
40
|
const first = packagePath[0];
|
|
39
|
-
if (first === undefined || !
|
|
41
|
+
if (first === undefined || !SUPPORT_DIRS.has(first))
|
|
40
42
|
return false;
|
|
41
43
|
return packagePath.every((segment) => segment !== "." && segment !== ".." && segment.length > 0);
|
|
42
44
|
}
|
|
45
|
+
const SUPPORT_DIRS = new Set([
|
|
46
|
+
"agents",
|
|
47
|
+
"assets",
|
|
48
|
+
"canvas-fonts",
|
|
49
|
+
"checks",
|
|
50
|
+
"core",
|
|
51
|
+
"evidence",
|
|
52
|
+
"examples",
|
|
53
|
+
"helpers",
|
|
54
|
+
"reference",
|
|
55
|
+
"references",
|
|
56
|
+
"schemas",
|
|
57
|
+
"scripts",
|
|
58
|
+
"spreadsheets",
|
|
59
|
+
"templates",
|
|
60
|
+
"tests",
|
|
61
|
+
"themes",
|
|
62
|
+
]);
|
|
63
|
+
const ROOT_FILE_EXTENSIONS = [
|
|
64
|
+
".env.example",
|
|
65
|
+
".js",
|
|
66
|
+
".json",
|
|
67
|
+
".md",
|
|
68
|
+
".py",
|
|
69
|
+
".sh",
|
|
70
|
+
".toml",
|
|
71
|
+
".ts",
|
|
72
|
+
".txt",
|
|
73
|
+
".yaml",
|
|
74
|
+
".yml",
|
|
75
|
+
];
|
|
76
|
+
function isAllowedRootPackageFile(name) {
|
|
77
|
+
if (!name || (name.startsWith(".") && name !== ".env.example"))
|
|
78
|
+
return false;
|
|
79
|
+
return ROOT_FILE_EXTENSIONS.some((ext) => name.toLowerCase().endsWith(ext));
|
|
80
|
+
}
|
|
43
81
|
export async function readSyncManifest() {
|
|
44
82
|
try {
|
|
45
83
|
await ensureSyncManifestDir();
|