@fractary/codex 0.5.0 → 0.5.1
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/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,9 @@ function matchFromCodexPattern(codexFilePath, patterns, targetProject) {
|
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
67
|
return patterns.some((pattern) => {
|
|
68
|
+
if (pattern.startsWith("projects/")) {
|
|
69
|
+
return matchPattern(pattern, codexFilePath);
|
|
70
|
+
}
|
|
68
71
|
const projectSeparatorIndex = pattern.indexOf("/");
|
|
69
72
|
if (projectSeparatorIndex === -1) {
|
|
70
73
|
const fullPattern = `${targetProject}/${pattern}`;
|
|
@@ -2909,6 +2912,14 @@ async function scanCodexWithRouting(options) {
|
|
|
2909
2912
|
function extractProjectFromPath(filePath, org) {
|
|
2910
2913
|
const normalizedPath = filePath.replace(/\\/g, "/");
|
|
2911
2914
|
const withoutOrg = normalizedPath.startsWith(`${org}/`) ? normalizedPath.slice(org.length + 1) : normalizedPath;
|
|
2915
|
+
if (withoutOrg.startsWith("projects/")) {
|
|
2916
|
+
const afterProjects = withoutOrg.slice("projects/".length);
|
|
2917
|
+
const firstSlash2 = afterProjects.indexOf("/");
|
|
2918
|
+
if (firstSlash2 === -1) {
|
|
2919
|
+
return afterProjects;
|
|
2920
|
+
}
|
|
2921
|
+
return afterProjects.slice(0, firstSlash2);
|
|
2922
|
+
}
|
|
2912
2923
|
const firstSlash = withoutOrg.indexOf("/");
|
|
2913
2924
|
if (firstSlash === -1) {
|
|
2914
2925
|
return withoutOrg;
|