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.
- package/CHANGELOG.md +15 -0
- package/README.md +329 -99
- package/dist/cli/index.cjs +577 -152
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +575 -150
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/migrate.cjs +595 -153
- package/dist/cli/migrate.cjs.map +1 -1
- package/dist/cli/migrate.js +592 -151
- package/dist/cli/migrate.js.map +1 -1
- package/dist/cli/utils/index.cjs +1 -1
- package/dist/cli/utils/index.cjs.map +1 -1
- package/dist/cli/utils/index.js +1 -1
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/index.cjs +688 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +685 -230
- package/dist/index.js.map +1 -1
- package/dist/migration/analyzer.cjs +101 -28
- package/dist/migration/analyzer.cjs.map +1 -1
- package/dist/migration/analyzer.js +101 -28
- package/dist/migration/analyzer.js.map +1 -1
- package/dist/migration/diff.cjs +21 -3
- package/dist/migration/diff.cjs.map +1 -1
- package/dist/migration/diff.js +21 -3
- package/dist/migration/diff.js.map +1 -1
- package/dist/migration/generator.cjs +60 -25
- package/dist/migration/generator.cjs.map +1 -1
- package/dist/migration/generator.d.cts +9 -5
- package/dist/migration/generator.d.ts +9 -5
- package/dist/migration/generator.js +60 -25
- package/dist/migration/generator.js.map +1 -1
- package/dist/migration/index.cjs +614 -171
- package/dist/migration/index.cjs.map +1 -1
- package/dist/migration/index.d.cts +1 -1
- package/dist/migration/index.d.ts +1 -1
- package/dist/migration/index.js +613 -171
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/snapshot.cjs +432 -117
- package/dist/migration/snapshot.cjs.map +1 -1
- package/dist/migration/snapshot.d.cts +34 -12
- package/dist/migration/snapshot.d.ts +34 -12
- package/dist/migration/snapshot.js +430 -116
- package/dist/migration/snapshot.js.map +1 -1
- package/dist/migration/utils/index.cjs +19 -17
- package/dist/migration/utils/index.cjs.map +1 -1
- package/dist/migration/utils/index.d.cts +3 -1
- package/dist/migration/utils/index.d.ts +3 -1
- package/dist/migration/utils/index.js +19 -17
- package/dist/migration/utils/index.js.map +1 -1
- package/dist/mutator.cjs +9 -11
- package/dist/mutator.cjs.map +1 -1
- package/dist/mutator.d.cts +5 -9
- package/dist/mutator.d.ts +5 -9
- package/dist/mutator.js +9 -11
- package/dist/mutator.js.map +1 -1
- package/dist/schema.cjs +54 -23
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +94 -12
- package/dist/schema.d.ts +94 -12
- package/dist/schema.js +54 -24
- package/dist/schema.js.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{user-jS1aYoeD.d.cts → user-_AM523hb.d.cts} +6 -6
- package/dist/{user-jS1aYoeD.d.ts → user-_AM523hb.d.ts} +6 -6
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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": "
|
|
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
|
},
|