@fractary/codex 0.11.1 → 0.11.2

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 CHANGED
@@ -3794,14 +3794,19 @@ var SyncManager = class {
3794
3794
  * @param options - Sync options
3795
3795
  */
3796
3796
  async createPlan(_org, _project, sourceDir, targetFiles, options) {
3797
- let sourceFiles = await this.listLocalFiles(sourceDir);
3798
- if (options?.direction === "to-codex") {
3799
- const toCodexPatterns = this.resolveToCodexPatterns();
3800
- if (toCodexPatterns.length > 0) {
3801
- const { matchToCodexPattern: matchToCodexPattern2 } = await Promise.resolve().then(() => (init_directional_patterns(), directional_patterns_exports));
3802
- sourceFiles = sourceFiles.filter(
3803
- (file) => matchToCodexPattern2(file.path, toCodexPatterns)
3804
- );
3797
+ let sourceFiles;
3798
+ if (options?.sourceFiles && options.sourceFiles.length > 0) {
3799
+ sourceFiles = options.sourceFiles;
3800
+ } else {
3801
+ sourceFiles = await this.listLocalFiles(sourceDir);
3802
+ if (options?.direction === "to-codex") {
3803
+ const toCodexPatterns = this.resolveToCodexPatterns();
3804
+ if (toCodexPatterns.length > 0) {
3805
+ const { matchToCodexPattern: matchToCodexPattern2 } = await Promise.resolve().then(() => (init_directional_patterns(), directional_patterns_exports));
3806
+ sourceFiles = sourceFiles.filter(
3807
+ (file) => matchToCodexPattern2(file.path, toCodexPatterns)
3808
+ );
3809
+ }
3805
3810
  }
3806
3811
  }
3807
3812
  const plan = createSyncPlan(