@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.d.cts CHANGED
@@ -1745,6 +1745,12 @@ interface SyncOptions {
1745
1745
  maxFiles?: number;
1746
1746
  timeout?: number;
1747
1747
  onProgress?: (current: number, total: number, file: string) => void;
1748
+ sourceFiles?: Array<{
1749
+ path: string;
1750
+ size: number;
1751
+ mtime: number;
1752
+ hash?: string;
1753
+ }>;
1748
1754
  }
1749
1755
  interface SyncRule {
1750
1756
  pattern: string;
package/dist/index.d.ts CHANGED
@@ -1745,6 +1745,12 @@ interface SyncOptions {
1745
1745
  maxFiles?: number;
1746
1746
  timeout?: number;
1747
1747
  onProgress?: (current: number, total: number, file: string) => void;
1748
+ sourceFiles?: Array<{
1749
+ path: string;
1750
+ size: number;
1751
+ mtime: number;
1752
+ hash?: string;
1753
+ }>;
1748
1754
  }
1749
1755
  interface SyncRule {
1750
1756
  pattern: string;
package/dist/index.js CHANGED
@@ -3769,14 +3769,19 @@ var SyncManager = class {
3769
3769
  * @param options - Sync options
3770
3770
  */
3771
3771
  async createPlan(_org, _project, sourceDir, targetFiles, options) {
3772
- let sourceFiles = await this.listLocalFiles(sourceDir);
3773
- if (options?.direction === "to-codex") {
3774
- const toCodexPatterns = this.resolveToCodexPatterns();
3775
- if (toCodexPatterns.length > 0) {
3776
- const { matchToCodexPattern: matchToCodexPattern2 } = await Promise.resolve().then(() => (init_directional_patterns(), directional_patterns_exports));
3777
- sourceFiles = sourceFiles.filter(
3778
- (file) => matchToCodexPattern2(file.path, toCodexPatterns)
3779
- );
3772
+ let sourceFiles;
3773
+ if (options?.sourceFiles && options.sourceFiles.length > 0) {
3774
+ sourceFiles = options.sourceFiles;
3775
+ } else {
3776
+ sourceFiles = await this.listLocalFiles(sourceDir);
3777
+ if (options?.direction === "to-codex") {
3778
+ const toCodexPatterns = this.resolveToCodexPatterns();
3779
+ if (toCodexPatterns.length > 0) {
3780
+ const { matchToCodexPattern: matchToCodexPattern2 } = await Promise.resolve().then(() => (init_directional_patterns(), directional_patterns_exports));
3781
+ sourceFiles = sourceFiles.filter(
3782
+ (file) => matchToCodexPattern2(file.path, toCodexPatterns)
3783
+ );
3784
+ }
3780
3785
  }
3781
3786
  }
3782
3787
  const plan = createSyncPlan(