pocketbase-zod-schema 0.1.2 → 0.1.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +329 -99
  3. package/dist/cli/index.cjs +577 -152
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.js +575 -150
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/cli/migrate.cjs +595 -153
  8. package/dist/cli/migrate.cjs.map +1 -1
  9. package/dist/cli/migrate.js +592 -151
  10. package/dist/cli/migrate.js.map +1 -1
  11. package/dist/cli/utils/index.cjs +1 -1
  12. package/dist/cli/utils/index.cjs.map +1 -1
  13. package/dist/cli/utils/index.js +1 -1
  14. package/dist/cli/utils/index.js.map +1 -1
  15. package/dist/index.cjs +688 -231
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +3 -3
  18. package/dist/index.d.ts +3 -3
  19. package/dist/index.js +685 -230
  20. package/dist/index.js.map +1 -1
  21. package/dist/migration/analyzer.cjs +101 -28
  22. package/dist/migration/analyzer.cjs.map +1 -1
  23. package/dist/migration/analyzer.js +101 -28
  24. package/dist/migration/analyzer.js.map +1 -1
  25. package/dist/migration/diff.cjs +21 -3
  26. package/dist/migration/diff.cjs.map +1 -1
  27. package/dist/migration/diff.js +21 -3
  28. package/dist/migration/diff.js.map +1 -1
  29. package/dist/migration/generator.cjs +60 -25
  30. package/dist/migration/generator.cjs.map +1 -1
  31. package/dist/migration/generator.d.cts +9 -5
  32. package/dist/migration/generator.d.ts +9 -5
  33. package/dist/migration/generator.js +60 -25
  34. package/dist/migration/generator.js.map +1 -1
  35. package/dist/migration/index.cjs +614 -171
  36. package/dist/migration/index.cjs.map +1 -1
  37. package/dist/migration/index.d.cts +1 -1
  38. package/dist/migration/index.d.ts +1 -1
  39. package/dist/migration/index.js +613 -171
  40. package/dist/migration/index.js.map +1 -1
  41. package/dist/migration/snapshot.cjs +432 -117
  42. package/dist/migration/snapshot.cjs.map +1 -1
  43. package/dist/migration/snapshot.d.cts +34 -12
  44. package/dist/migration/snapshot.d.ts +34 -12
  45. package/dist/migration/snapshot.js +430 -116
  46. package/dist/migration/snapshot.js.map +1 -1
  47. package/dist/migration/utils/index.cjs +19 -17
  48. package/dist/migration/utils/index.cjs.map +1 -1
  49. package/dist/migration/utils/index.d.cts +3 -1
  50. package/dist/migration/utils/index.d.ts +3 -1
  51. package/dist/migration/utils/index.js +19 -17
  52. package/dist/migration/utils/index.js.map +1 -1
  53. package/dist/mutator.cjs +9 -11
  54. package/dist/mutator.cjs.map +1 -1
  55. package/dist/mutator.d.cts +5 -9
  56. package/dist/mutator.d.ts +5 -9
  57. package/dist/mutator.js +9 -11
  58. package/dist/mutator.js.map +1 -1
  59. package/dist/schema.cjs +54 -23
  60. package/dist/schema.cjs.map +1 -1
  61. package/dist/schema.d.cts +94 -12
  62. package/dist/schema.d.ts +94 -12
  63. package/dist/schema.js +54 -24
  64. package/dist/schema.js.map +1 -1
  65. package/dist/types.d.cts +1 -1
  66. package/dist/types.d.ts +1 -1
  67. package/dist/{user-jS1aYoeD.d.cts → user-_AM523hb.d.cts} +6 -6
  68. package/dist/{user-jS1aYoeD.d.ts → user-_AM523hb.d.ts} +6 -6
  69. package/package.json +2 -4
@@ -5,23 +5,23 @@ declare const ProjectInputSchema: z.ZodObject<{
5
5
  content: z.ZodString;
6
6
  status: z.ZodEnum<["draft", "active", "complete", "fail"]>;
7
7
  summary: z.ZodOptional<z.ZodString>;
8
- User: z.ZodString;
8
+ OwnerUser: z.ZodString;
9
9
  SubscriberUsers: z.ZodArray<z.ZodString, "many">;
10
10
  } & {
11
11
  imageFiles: z.ZodArray<z.ZodType<File, z.ZodTypeDef, File>, "many">;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  status: "draft" | "active" | "complete" | "fail";
14
- User: string;
15
14
  title: string;
16
15
  content: string;
16
+ OwnerUser: string;
17
17
  SubscriberUsers: string[];
18
18
  imageFiles: File[];
19
19
  summary?: string | undefined;
20
20
  }, {
21
21
  status: "draft" | "active" | "complete" | "fail";
22
- User: string;
23
22
  title: string;
24
23
  content: string;
24
+ OwnerUser: string;
25
25
  SubscriberUsers: string[];
26
26
  imageFiles: File[];
27
27
  summary?: string | undefined;
@@ -31,7 +31,7 @@ declare const ProjectSchema: z.ZodObject<Omit<{
31
31
  content: z.ZodString;
32
32
  status: z.ZodEnum<["draft", "active", "complete", "fail"]>;
33
33
  summary: z.ZodOptional<z.ZodString>;
34
- User: z.ZodString;
34
+ OwnerUser: z.ZodString;
35
35
  SubscriberUsers: z.ZodArray<z.ZodString, "many">;
36
36
  } & {
37
37
  imageFiles: z.ZodArray<z.ZodType<File, z.ZodTypeDef, File>, "many">;
@@ -44,9 +44,9 @@ declare const ProjectSchema: z.ZodObject<Omit<{
44
44
  expand: z.ZodRecord<z.ZodString, z.ZodAny>;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  status: "draft" | "active" | "complete" | "fail";
47
- User: string;
48
47
  title: string;
49
48
  content: string;
49
+ OwnerUser: string;
50
50
  SubscriberUsers: string[];
51
51
  imageFiles: string[];
52
52
  id: string;
@@ -57,9 +57,9 @@ declare const ProjectSchema: z.ZodObject<Omit<{
57
57
  thumbnailURL?: string | undefined;
58
58
  }, {
59
59
  status: "draft" | "active" | "complete" | "fail";
60
- User: string;
61
60
  title: string;
62
61
  content: string;
62
+ OwnerUser: string;
63
63
  SubscriberUsers: string[];
64
64
  imageFiles: string[];
65
65
  id: string;
@@ -5,23 +5,23 @@ declare const ProjectInputSchema: z.ZodObject<{
5
5
  content: z.ZodString;
6
6
  status: z.ZodEnum<["draft", "active", "complete", "fail"]>;
7
7
  summary: z.ZodOptional<z.ZodString>;
8
- User: z.ZodString;
8
+ OwnerUser: z.ZodString;
9
9
  SubscriberUsers: z.ZodArray<z.ZodString, "many">;
10
10
  } & {
11
11
  imageFiles: z.ZodArray<z.ZodType<File, z.ZodTypeDef, File>, "many">;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  status: "draft" | "active" | "complete" | "fail";
14
- User: string;
15
14
  title: string;
16
15
  content: string;
16
+ OwnerUser: string;
17
17
  SubscriberUsers: string[];
18
18
  imageFiles: File[];
19
19
  summary?: string | undefined;
20
20
  }, {
21
21
  status: "draft" | "active" | "complete" | "fail";
22
- User: string;
23
22
  title: string;
24
23
  content: string;
24
+ OwnerUser: string;
25
25
  SubscriberUsers: string[];
26
26
  imageFiles: File[];
27
27
  summary?: string | undefined;
@@ -31,7 +31,7 @@ declare const ProjectSchema: z.ZodObject<Omit<{
31
31
  content: z.ZodString;
32
32
  status: z.ZodEnum<["draft", "active", "complete", "fail"]>;
33
33
  summary: z.ZodOptional<z.ZodString>;
34
- User: z.ZodString;
34
+ OwnerUser: z.ZodString;
35
35
  SubscriberUsers: z.ZodArray<z.ZodString, "many">;
36
36
  } & {
37
37
  imageFiles: z.ZodArray<z.ZodType<File, z.ZodTypeDef, File>, "many">;
@@ -44,9 +44,9 @@ declare const ProjectSchema: z.ZodObject<Omit<{
44
44
  expand: z.ZodRecord<z.ZodString, z.ZodAny>;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  status: "draft" | "active" | "complete" | "fail";
47
- User: string;
48
47
  title: string;
49
48
  content: string;
49
+ OwnerUser: string;
50
50
  SubscriberUsers: string[];
51
51
  imageFiles: string[];
52
52
  id: string;
@@ -57,9 +57,9 @@ declare const ProjectSchema: z.ZodObject<Omit<{
57
57
  thumbnailURL?: string | undefined;
58
58
  }, {
59
59
  status: "draft" | "active" | "complete" | "fail";
60
- User: string;
61
60
  title: string;
62
61
  content: string;
62
+ OwnerUser: string;
63
63
  SubscriberUsers: string[];
64
64
  imageFiles: string[];
65
65
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pocketbase-zod-schema",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "PocketBase migration generator using Zod schemas for type-safe database migrations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -115,8 +115,7 @@
115
115
  "clean": "rm -rf dist",
116
116
  "bundle-size": "yarn build && du -sh dist/* | sort -hr",
117
117
  "prepublishOnly": "yarn clean && yarn build && yarn test",
118
- "publish:npm": "node ../scripts/publish-npm.js",
119
- "publish:npm:env": "node --env-file ../.env ../scripts/publish-npm.js",
118
+ "publish:npm": "npm publish --access public",
120
119
  "check-updates": "yarn outdated"
121
120
  },
122
121
  "bin": {
@@ -128,7 +127,6 @@
128
127
  "author": "dastron <erik.danford@gmail.com>",
129
128
  "license": "MIT",
130
129
  "sideEffects": false,
131
- "bundleDependencies": false,
132
130
  "peerDependencies": {
133
131
  "zod": "^3.20.0"
134
132
  },