pocketbase-zod-schema 0.3.2 → 0.3.3

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cli/index.cjs +28 -6
  3. package/dist/cli/index.cjs.map +1 -1
  4. package/dist/cli/index.d.cts +1 -1
  5. package/dist/cli/index.d.ts +1 -1
  6. package/dist/cli/index.js +28 -6
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/cli/migrate.cjs +28 -6
  9. package/dist/cli/migrate.cjs.map +1 -1
  10. package/dist/cli/migrate.js +28 -6
  11. package/dist/cli/migrate.js.map +1 -1
  12. package/dist/cli/utils/index.d.cts +1 -1
  13. package/dist/cli/utils/index.d.ts +1 -1
  14. package/dist/index.cjs +42 -9
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +42 -9
  19. package/dist/index.js.map +1 -1
  20. package/dist/migration/analyzer.d.cts +1 -1
  21. package/dist/migration/analyzer.d.ts +1 -1
  22. package/dist/migration/diff.cjs +10 -1
  23. package/dist/migration/diff.cjs.map +1 -1
  24. package/dist/migration/diff.d.cts +1 -1
  25. package/dist/migration/diff.d.ts +1 -1
  26. package/dist/migration/diff.js +10 -1
  27. package/dist/migration/diff.js.map +1 -1
  28. package/dist/migration/generator.cjs +32 -8
  29. package/dist/migration/generator.cjs.map +1 -1
  30. package/dist/migration/generator.d.cts +2 -2
  31. package/dist/migration/generator.d.ts +2 -2
  32. package/dist/migration/generator.js +32 -8
  33. package/dist/migration/generator.js.map +1 -1
  34. package/dist/migration/index.cjs +42 -9
  35. package/dist/migration/index.cjs.map +1 -1
  36. package/dist/migration/index.d.cts +1 -1
  37. package/dist/migration/index.d.ts +1 -1
  38. package/dist/migration/index.js +42 -9
  39. package/dist/migration/index.js.map +1 -1
  40. package/dist/migration/snapshot.d.cts +1 -1
  41. package/dist/migration/snapshot.d.ts +1 -1
  42. package/dist/{types-Dfp-NP2D.d.ts → types-BWhwQxG-.d.ts} +5 -0
  43. package/dist/{types-CVxPCgWX.d.cts → types-d0yBwHoN.d.cts} +5 -0
  44. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { a as SchemaSnapshot, S as SchemaDefinition } from '../types-CVxPCgWX.cjs';
1
+ import { a as SchemaSnapshot, S as SchemaDefinition } from '../types-d0yBwHoN.cjs';
2
2
  import '../fields-DBBm06VU.cjs';
3
3
  import 'zod';
4
4
  import '../permissions-ZHafVSIx.cjs';
@@ -1,4 +1,4 @@
1
- import { a as SchemaSnapshot, S as SchemaDefinition } from '../types-Dfp-NP2D.js';
1
+ import { a as SchemaSnapshot, S as SchemaDefinition } from '../types-BWhwQxG-.js';
2
2
  import '../fields-DBBm06VU.js';
3
3
  import 'zod';
4
4
  import '../permissions-ZHafVSIx.js';
@@ -93,6 +93,11 @@ interface SchemaDiff {
93
93
  collectionsToCreate: CollectionSchema[];
94
94
  collectionsToDelete: any[];
95
95
  collectionsToModify: CollectionModification[];
96
+ /**
97
+ * Map of existing collection names to their IDs from the previous snapshot
98
+ * Used to resolve relation field references to existing collections
99
+ */
100
+ existingCollectionIds?: Map<string, string>;
96
101
  }
97
102
  /**
98
103
  * Represents a single collection operation for file splitting
@@ -93,6 +93,11 @@ interface SchemaDiff {
93
93
  collectionsToCreate: CollectionSchema[];
94
94
  collectionsToDelete: any[];
95
95
  collectionsToModify: CollectionModification[];
96
+ /**
97
+ * Map of existing collection names to their IDs from the previous snapshot
98
+ * Used to resolve relation field references to existing collections
99
+ */
100
+ existingCollectionIds?: Map<string, string>;
96
101
  }
97
102
  /**
98
103
  * Represents a single collection operation for file splitting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pocketbase-zod-schema",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "PocketBase migration generator using Zod schemas for type-safe database migrations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",