@fractary/codex 0.12.2 → 0.12.4
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 +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -923,12 +923,24 @@ var DirectionalSyncConfigSchema = zod.z.object({
|
|
|
923
923
|
/** Patterns to exclude (optional) */
|
|
924
924
|
exclude: zod.z.array(zod.z.string()).optional()
|
|
925
925
|
});
|
|
926
|
+
var FromCodexSyncConfigSchema = DirectionalSyncConfigSchema.refine(
|
|
927
|
+
(config) => {
|
|
928
|
+
const includeValid = config.include.every(
|
|
929
|
+
(pattern) => pattern.startsWith("codex://")
|
|
930
|
+
);
|
|
931
|
+
const excludeValid = !config.exclude || config.exclude.every((pattern) => pattern.startsWith("codex://"));
|
|
932
|
+
return includeValid && excludeValid;
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
message: 'from_codex patterns must use codex:// URI format (e.g., "codex://{org}/{codex_repo}/docs/**"). Plain paths like "docs/**" are not valid for from_codex.'
|
|
936
|
+
}
|
|
937
|
+
);
|
|
926
938
|
var DirectionalSyncSchema = zod.z.object({
|
|
927
939
|
// New format (v0.7.0+) - Recommended
|
|
928
|
-
// Patterns for files to push from this project to codex
|
|
940
|
+
// Patterns for files to push from this project to codex (plain paths)
|
|
929
941
|
to_codex: DirectionalSyncConfigSchema.optional(),
|
|
930
|
-
// Patterns for files to pull from codex to this project
|
|
931
|
-
from_codex:
|
|
942
|
+
// Patterns for files to pull from codex to this project (codex:// URIs required)
|
|
943
|
+
from_codex: FromCodexSyncConfigSchema.optional(),
|
|
932
944
|
// Global exclude patterns (applied to both directions)
|
|
933
945
|
exclude: zod.z.array(zod.z.string()).optional(),
|
|
934
946
|
// Legacy format (deprecated, backward compatible)
|