pocketbase-zod-schema 0.2.1 → 0.2.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cli/index.cjs +42 -9
  3. package/dist/cli/index.cjs.map +1 -1
  4. package/dist/cli/index.js +42 -9
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/cli/migrate.cjs +42 -9
  7. package/dist/cli/migrate.cjs.map +1 -1
  8. package/dist/cli/migrate.js +42 -9
  9. package/dist/cli/migrate.js.map +1 -1
  10. package/dist/index.cjs +48 -11
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +48 -11
  15. package/dist/index.js.map +1 -1
  16. package/dist/migration/analyzer.cjs +36 -7
  17. package/dist/migration/analyzer.cjs.map +1 -1
  18. package/dist/migration/analyzer.d.cts +26 -3
  19. package/dist/migration/analyzer.d.ts +26 -3
  20. package/dist/migration/analyzer.js +36 -8
  21. package/dist/migration/analyzer.js.map +1 -1
  22. package/dist/migration/diff.cjs +7 -2
  23. package/dist/migration/diff.cjs.map +1 -1
  24. package/dist/migration/diff.js +7 -2
  25. package/dist/migration/diff.js.map +1 -1
  26. package/dist/migration/index.cjs +42 -9
  27. package/dist/migration/index.cjs.map +1 -1
  28. package/dist/migration/index.js +42 -9
  29. package/dist/migration/index.js.map +1 -1
  30. package/dist/migration/snapshot.cjs.map +1 -1
  31. package/dist/migration/snapshot.js.map +1 -1
  32. package/dist/mutator.cjs +9 -3
  33. package/dist/mutator.cjs.map +1 -1
  34. package/dist/mutator.d.cts +3 -1
  35. package/dist/mutator.d.ts +3 -1
  36. package/dist/mutator.js +9 -3
  37. package/dist/mutator.js.map +1 -1
  38. package/dist/schema.cjs +9 -3
  39. package/dist/schema.cjs.map +1 -1
  40. package/dist/schema.d.cts +32 -3
  41. package/dist/schema.d.ts +32 -3
  42. package/dist/schema.js +9 -3
  43. package/dist/schema.js.map +1 -1
  44. package/dist/types.d.cts +1 -1
  45. package/dist/types.d.ts +1 -1
  46. package/dist/{user-DTJQIj4K.d.cts → user-BnFWg5tw.d.cts} +13 -1
  47. package/dist/{user-DTJQIj4K.d.ts → user-BnFWg5tw.d.ts} +13 -1
  48. package/package.json +1 -1
package/dist/types.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import PocketBase__default, { RecordService } from 'pocketbase';
2
2
  import { z } from 'zod';
3
- import { d as UserSchema, a as ProjectSchema, U as UserInputSchema, P as ProjectInputSchema } from './user-DTJQIj4K.cjs';
3
+ import { e as UserSchema, b as ProjectSchema, c as UserInputSchema, a as ProjectInputSchema } from './user-BnFWg5tw.cjs';
4
4
 
5
5
  type ProjectInputType = z.infer<typeof ProjectInputSchema>;
6
6
  type ProjectType = z.infer<typeof ProjectSchema>;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import PocketBase__default, { RecordService } from 'pocketbase';
2
2
  import { z } from 'zod';
3
- import { d as UserSchema, a as ProjectSchema, U as UserInputSchema, P as ProjectInputSchema } from './user-DTJQIj4K.js';
3
+ import { e as UserSchema, b as ProjectSchema, c as UserInputSchema, a as ProjectInputSchema } from './user-BnFWg5tw.js';
4
4
 
5
5
  type ProjectInputType = z.infer<typeof ProjectInputSchema>;
6
6
  type ProjectType = z.infer<typeof ProjectSchema>;
@@ -42,6 +42,8 @@ declare const ProjectSchema: z.ZodObject<Omit<{
42
42
  collectionId: z.ZodString;
43
43
  collectionName: z.ZodString;
44
44
  expand: z.ZodRecord<z.ZodString, z.ZodAny>;
45
+ created: z.ZodString;
46
+ updated: z.ZodString;
45
47
  }, "strip", z.ZodTypeAny, {
46
48
  status: "draft" | "active" | "complete" | "fail";
47
49
  collectionName: string;
@@ -53,6 +55,8 @@ declare const ProjectSchema: z.ZodObject<Omit<{
53
55
  id: string;
54
56
  collectionId: string;
55
57
  expand: Record<string, any>;
58
+ created: string;
59
+ updated: string;
56
60
  summary?: string | undefined;
57
61
  thumbnailURL?: string | undefined;
58
62
  }, {
@@ -66,6 +70,8 @@ declare const ProjectSchema: z.ZodObject<Omit<{
66
70
  id: string;
67
71
  collectionId: string;
68
72
  expand: Record<string, any>;
73
+ created: string;
74
+ updated: string;
69
75
  summary?: string | undefined;
70
76
  thumbnailURL?: string | undefined;
71
77
  }>;
@@ -121,11 +127,15 @@ declare const UserSchema: z.ZodObject<{
121
127
  collectionId: z.ZodString;
122
128
  collectionName: z.ZodString;
123
129
  expand: z.ZodRecord<z.ZodString, z.ZodAny>;
130
+ created: z.ZodString;
131
+ updated: z.ZodString;
124
132
  }, "strip", z.ZodTypeAny, {
125
133
  collectionName: string;
126
134
  id: string;
127
135
  collectionId: string;
128
136
  expand: Record<string, any>;
137
+ created: string;
138
+ updated: string;
129
139
  email: string;
130
140
  password: string;
131
141
  name?: string | undefined;
@@ -135,6 +145,8 @@ declare const UserSchema: z.ZodObject<{
135
145
  id: string;
136
146
  collectionId: string;
137
147
  expand: Record<string, any>;
148
+ created: string;
149
+ updated: string;
138
150
  email: string;
139
151
  password: string;
140
152
  name?: string | undefined;
@@ -146,4 +158,4 @@ declare const UserCollection: z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny,
146
158
  [x: string]: any;
147
159
  }>;
148
160
 
149
- export { ProjectInputSchema as P, UserInputSchema as U, ProjectSchema as a, ProjectCollection as b, UserCollectionSchema as c, UserSchema as d, UserCollection as e };
161
+ export { ProjectCollection as P, UserCollection as U, ProjectInputSchema as a, ProjectSchema as b, UserInputSchema as c, UserCollectionSchema as d, UserSchema as e };
@@ -42,6 +42,8 @@ declare const ProjectSchema: z.ZodObject<Omit<{
42
42
  collectionId: z.ZodString;
43
43
  collectionName: z.ZodString;
44
44
  expand: z.ZodRecord<z.ZodString, z.ZodAny>;
45
+ created: z.ZodString;
46
+ updated: z.ZodString;
45
47
  }, "strip", z.ZodTypeAny, {
46
48
  status: "draft" | "active" | "complete" | "fail";
47
49
  collectionName: string;
@@ -53,6 +55,8 @@ declare const ProjectSchema: z.ZodObject<Omit<{
53
55
  id: string;
54
56
  collectionId: string;
55
57
  expand: Record<string, any>;
58
+ created: string;
59
+ updated: string;
56
60
  summary?: string | undefined;
57
61
  thumbnailURL?: string | undefined;
58
62
  }, {
@@ -66,6 +70,8 @@ declare const ProjectSchema: z.ZodObject<Omit<{
66
70
  id: string;
67
71
  collectionId: string;
68
72
  expand: Record<string, any>;
73
+ created: string;
74
+ updated: string;
69
75
  summary?: string | undefined;
70
76
  thumbnailURL?: string | undefined;
71
77
  }>;
@@ -121,11 +127,15 @@ declare const UserSchema: z.ZodObject<{
121
127
  collectionId: z.ZodString;
122
128
  collectionName: z.ZodString;
123
129
  expand: z.ZodRecord<z.ZodString, z.ZodAny>;
130
+ created: z.ZodString;
131
+ updated: z.ZodString;
124
132
  }, "strip", z.ZodTypeAny, {
125
133
  collectionName: string;
126
134
  id: string;
127
135
  collectionId: string;
128
136
  expand: Record<string, any>;
137
+ created: string;
138
+ updated: string;
129
139
  email: string;
130
140
  password: string;
131
141
  name?: string | undefined;
@@ -135,6 +145,8 @@ declare const UserSchema: z.ZodObject<{
135
145
  id: string;
136
146
  collectionId: string;
137
147
  expand: Record<string, any>;
148
+ created: string;
149
+ updated: string;
138
150
  email: string;
139
151
  password: string;
140
152
  name?: string | undefined;
@@ -146,4 +158,4 @@ declare const UserCollection: z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny,
146
158
  [x: string]: any;
147
159
  }>;
148
160
 
149
- export { ProjectInputSchema as P, UserInputSchema as U, ProjectSchema as a, ProjectCollection as b, UserCollectionSchema as c, UserSchema as d, UserCollection as e };
161
+ export { ProjectCollection as P, UserCollection as U, ProjectInputSchema as a, ProjectSchema as b, UserInputSchema as c, UserCollectionSchema as d, UserSchema as e };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pocketbase-zod-schema",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "PocketBase migration generator using Zod schemas for type-safe database migrations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",