@jakubmazanec/zod-utils 1.0.0-11dd4a3
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/LICENSE.md +840 -0
- package/README.md +38 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +4 -0
- package/dist/main.js.map +1 -0
- package/dist/types/Json.d.ts +8 -0
- package/dist/types/Json.js +14 -0
- package/dist/types/Json.js.map +1 -0
- package/dist/types/PackageJson.d.ts +517 -0
- package/dist/types/PackageJson.js +292 -0
- package/dist/types/PackageJson.js.map +1 -0
- package/dist/types/TsconfigJson.d.ts +609 -0
- package/dist/types/TsconfigJson.js +338 -0
- package/dist/types/TsconfigJson.js.map +1 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/is.d.ts +2 -0
- package/dist/utils/is.js +5 -0
- package/dist/utils/is.js.map +1 -0
- package/dist/utils/isPackageJson.d.ts +2 -0
- package/dist/utils/isPackageJson.js +6 -0
- package/dist/utils/isPackageJson.js.map +1 -0
- package/dist/utils/isTsconfigJson.d.ts +2 -0
- package/dist/utils/isTsconfigJson.js +6 -0
- package/dist/utils/isTsconfigJson.js.map +1 -0
- package/dist/utils/readFile.d.ts +11 -0
- package/dist/utils/readFile.js +16 -0
- package/dist/utils/readFile.js.map +1 -0
- package/dist/utils/readJson.d.ts +10 -0
- package/dist/utils/readJson.js +7 -0
- package/dist/utils/readJson.js.map +1 -0
- package/dist/utils/readPackageJson.d.ts +11 -0
- package/dist/utils/readPackageJson.js +7 -0
- package/dist/utils/readPackageJson.js.map +1 -0
- package/dist/utils/zodIssuesToString.d.ts +2 -0
- package/dist/utils/zodIssuesToString.js +30 -0
- package/dist/utils/zodIssuesToString.js.map +1 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +9 -0
- package/dist/utils.js.map +1 -0
- package/package.json +43 -0
- package/src/main.ts +2 -0
- package/src/types/Json.ts +11 -0
- package/src/types/PackageJson.ts +294 -0
- package/src/types/TsconfigJson.ts +346 -0
- package/src/types.ts +3 -0
- package/src/utils/is.ts +5 -0
- package/src/utils/isPackageJson.ts +5 -0
- package/src/utils/isTsconfigJson.ts +5 -0
- package/src/utils/readFile.ts +40 -0
- package/src/utils/readJson.ts +31 -0
- package/src/utils/readPackageJson.ts +26 -0
- package/src/utils/zodIssuesToString.ts +52 -0
- package/src/utils.ts +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# @jakubmazanec/zod-utils
|
|
4
|
+
|
|
5
|
+
<!-- description -->Collection of Zod schemas and utilities.<!-- description -->
|
|
6
|
+
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @jakubmazanec/zod-utils
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
⚠️ This is an [ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) package!
|
|
16
|
+
It cannot be required from a CommonJS module.
|
|
17
|
+
|
|
18
|
+
#### Prerequisites
|
|
19
|
+
|
|
20
|
+
- Node.js 16 or later
|
|
21
|
+
- TypeScript 5 or later
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
🚧 This section is under development. Please check back later for updates.
|
|
26
|
+
|
|
27
|
+
## Documentation
|
|
28
|
+
|
|
29
|
+
See [API reference](./docs) for auto-generated documentation.
|
|
30
|
+
|
|
31
|
+
## Contributing
|
|
32
|
+
|
|
33
|
+
If you want to contribute, see [CONTRIBUTING](./CONTRIBUTING.md) for details.
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
This package is licensed under the GNU Lesser General Public License v3. See [LICENSE](./LICENSE.md)
|
|
38
|
+
for details.
|
package/dist/main.d.ts
ADDED
package/dist/main.js
ADDED
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/main.ts"],"sourcesContent":["export * from './types.js';\nexport * from './utils.js';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,aAAa"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
3
|
+
type Literal = z.infer<typeof literalSchema>;
|
|
4
|
+
export declare const jsonSchema: z.ZodSchema<Json>;
|
|
5
|
+
export type Json = Json[] | Literal | {
|
|
6
|
+
[key: string]: Json;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
const literalSchema = z.union([
|
|
3
|
+
z.string(),
|
|
4
|
+
z.number(),
|
|
5
|
+
z.boolean(),
|
|
6
|
+
z.null()
|
|
7
|
+
]);
|
|
8
|
+
export const jsonSchema = z.lazy(()=>z.union([
|
|
9
|
+
literalSchema,
|
|
10
|
+
z.array(jsonSchema),
|
|
11
|
+
z.record(jsonSchema)
|
|
12
|
+
]));
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/Json.ts"],"sourcesContent":["import * as z from 'zod';\n\nconst literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);\n\ntype Literal = z.infer<typeof literalSchema>;\n\nexport const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>\n z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]),\n);\n\nexport type Json = Json[] | Literal | {[key: string]: Json};\n"],"names":["z","literalSchema","union","string","number","boolean","null","jsonSchema","lazy","array","record"],"mappings":"AAAA,YAAYA,OAAO,MAAM;AAEzB,MAAMC,gBAAgBD,EAAEE,MAAM;IAACF,EAAEG;IAAUH,EAAEI;IAAUJ,EAAEK;IAAWL,EAAEM;CAAO;AAI7E,OAAO,MAAMC,aAAgCP,EAAEQ,KAAK,IAClDR,EAAEE,MAAM;QAACD;QAAeD,EAAES,MAAMF;QAAaP,EAAEU,OAAOH;KAAY,GAClE"}
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
declare const packageJsonExportConditionSchema: z.ZodUnion<[z.ZodEnum<["browser", "default", "deno", "development", "electron", "import", "node", "production", "react-native", "require"]>, z.ZodString]>;
|
|
3
|
+
type PackageJsonExportCondition = z.infer<typeof packageJsonExportConditionSchema>;
|
|
4
|
+
type PackageJsonExports = string[] | string | {
|
|
5
|
+
[key in PackageJsonExportCondition]?: PackageJsonExports | null;
|
|
6
|
+
} | {
|
|
7
|
+
[key: string]: PackageJsonExports | null | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const packageJsonSchema: z.ZodObject<{
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
version: z.ZodOptional<z.ZodString>;
|
|
12
|
+
description: z.ZodOptional<z.ZodString>;
|
|
13
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
15
|
+
bugs: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
16
|
+
email: z.ZodOptional<z.ZodString>;
|
|
17
|
+
url: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
email?: string | undefined;
|
|
20
|
+
url?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
email?: string | undefined;
|
|
23
|
+
url?: string | undefined;
|
|
24
|
+
}>, z.ZodString]>>;
|
|
25
|
+
license: z.ZodOptional<z.ZodString>;
|
|
26
|
+
author: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
email: z.ZodOptional<z.ZodString>;
|
|
29
|
+
url: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
name: string;
|
|
32
|
+
email?: string | undefined;
|
|
33
|
+
url?: string | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
name: string;
|
|
36
|
+
email?: string | undefined;
|
|
37
|
+
url?: string | undefined;
|
|
38
|
+
}>, z.ZodString]>>;
|
|
39
|
+
contributors: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
email: z.ZodOptional<z.ZodString>;
|
|
42
|
+
url: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
name: string;
|
|
45
|
+
email?: string | undefined;
|
|
46
|
+
url?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
name: string;
|
|
49
|
+
email?: string | undefined;
|
|
50
|
+
url?: string | undefined;
|
|
51
|
+
}>, z.ZodString]>, "many">>;
|
|
52
|
+
maintainers: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
email: z.ZodOptional<z.ZodString>;
|
|
55
|
+
url: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
name: string;
|
|
58
|
+
email?: string | undefined;
|
|
59
|
+
url?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
name: string;
|
|
62
|
+
email?: string | undefined;
|
|
63
|
+
url?: string | undefined;
|
|
64
|
+
}>, z.ZodString]>, "many">>;
|
|
65
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
66
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"commonjs">, z.ZodLiteral<"module">]>>;
|
|
67
|
+
main: z.ZodOptional<z.ZodString>;
|
|
68
|
+
exports: z.ZodOptional<z.ZodType<PackageJsonExports, z.ZodTypeDef, PackageJsonExports>>;
|
|
69
|
+
bin: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodString]>>;
|
|
70
|
+
man: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
71
|
+
directories: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
bin: z.ZodOptional<z.ZodString>;
|
|
73
|
+
doc: z.ZodOptional<z.ZodString>;
|
|
74
|
+
example: z.ZodOptional<z.ZodString>;
|
|
75
|
+
lib: z.ZodOptional<z.ZodString>;
|
|
76
|
+
man: z.ZodOptional<z.ZodString>;
|
|
77
|
+
v: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, "strict", z.ZodTypeAny, {
|
|
79
|
+
bin?: string | undefined;
|
|
80
|
+
doc?: string | undefined;
|
|
81
|
+
example?: string | undefined;
|
|
82
|
+
lib?: string | undefined;
|
|
83
|
+
man?: string | undefined;
|
|
84
|
+
v?: string | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
bin?: string | undefined;
|
|
87
|
+
doc?: string | undefined;
|
|
88
|
+
example?: string | undefined;
|
|
89
|
+
lib?: string | undefined;
|
|
90
|
+
man?: string | undefined;
|
|
91
|
+
v?: string | undefined;
|
|
92
|
+
}>>;
|
|
93
|
+
repository: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
94
|
+
type: z.ZodString;
|
|
95
|
+
url: z.ZodString;
|
|
96
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, "strict", z.ZodTypeAny, {
|
|
98
|
+
type: string;
|
|
99
|
+
url: string;
|
|
100
|
+
directory?: string | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
type: string;
|
|
103
|
+
url: string;
|
|
104
|
+
directory?: string | undefined;
|
|
105
|
+
}>, z.ZodString]>>;
|
|
106
|
+
scripts: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodObject<{
|
|
107
|
+
prepublish: z.ZodOptional<z.ZodString>;
|
|
108
|
+
prepare: z.ZodOptional<z.ZodString>;
|
|
109
|
+
prepublishOnly: z.ZodOptional<z.ZodString>;
|
|
110
|
+
prepack: z.ZodOptional<z.ZodString>;
|
|
111
|
+
postpack: z.ZodOptional<z.ZodString>;
|
|
112
|
+
publish: z.ZodOptional<z.ZodString>;
|
|
113
|
+
postpublish: z.ZodOptional<z.ZodString>;
|
|
114
|
+
preinstall: z.ZodOptional<z.ZodString>;
|
|
115
|
+
install: z.ZodOptional<z.ZodString>;
|
|
116
|
+
postinstall: z.ZodOptional<z.ZodString>;
|
|
117
|
+
preuninstall: z.ZodOptional<z.ZodString>;
|
|
118
|
+
uninstall: z.ZodOptional<z.ZodString>;
|
|
119
|
+
postuninstall: z.ZodOptional<z.ZodString>;
|
|
120
|
+
preversion: z.ZodOptional<z.ZodString>;
|
|
121
|
+
version: z.ZodOptional<z.ZodString>;
|
|
122
|
+
postversion: z.ZodOptional<z.ZodString>;
|
|
123
|
+
pretest: z.ZodOptional<z.ZodString>;
|
|
124
|
+
test: z.ZodOptional<z.ZodString>;
|
|
125
|
+
posttest: z.ZodOptional<z.ZodString>;
|
|
126
|
+
prestop: z.ZodOptional<z.ZodString>;
|
|
127
|
+
stop: z.ZodOptional<z.ZodString>;
|
|
128
|
+
poststop: z.ZodOptional<z.ZodString>;
|
|
129
|
+
prestart: z.ZodOptional<z.ZodString>;
|
|
130
|
+
start: z.ZodOptional<z.ZodString>;
|
|
131
|
+
poststart: z.ZodOptional<z.ZodString>;
|
|
132
|
+
prerestart: z.ZodOptional<z.ZodString>;
|
|
133
|
+
restart: z.ZodOptional<z.ZodString>;
|
|
134
|
+
postrestart: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
|
136
|
+
prepublish?: string | undefined;
|
|
137
|
+
prepare?: string | undefined;
|
|
138
|
+
prepublishOnly?: string | undefined;
|
|
139
|
+
prepack?: string | undefined;
|
|
140
|
+
postpack?: string | undefined;
|
|
141
|
+
publish?: string | undefined;
|
|
142
|
+
postpublish?: string | undefined;
|
|
143
|
+
preinstall?: string | undefined;
|
|
144
|
+
install?: string | undefined;
|
|
145
|
+
postinstall?: string | undefined;
|
|
146
|
+
preuninstall?: string | undefined;
|
|
147
|
+
uninstall?: string | undefined;
|
|
148
|
+
postuninstall?: string | undefined;
|
|
149
|
+
preversion?: string | undefined;
|
|
150
|
+
version?: string | undefined;
|
|
151
|
+
postversion?: string | undefined;
|
|
152
|
+
pretest?: string | undefined;
|
|
153
|
+
test?: string | undefined;
|
|
154
|
+
posttest?: string | undefined;
|
|
155
|
+
prestop?: string | undefined;
|
|
156
|
+
stop?: string | undefined;
|
|
157
|
+
poststop?: string | undefined;
|
|
158
|
+
prestart?: string | undefined;
|
|
159
|
+
start?: string | undefined;
|
|
160
|
+
poststart?: string | undefined;
|
|
161
|
+
prerestart?: string | undefined;
|
|
162
|
+
restart?: string | undefined;
|
|
163
|
+
postrestart?: string | undefined;
|
|
164
|
+
}, {
|
|
165
|
+
prepublish?: string | undefined;
|
|
166
|
+
prepare?: string | undefined;
|
|
167
|
+
prepublishOnly?: string | undefined;
|
|
168
|
+
prepack?: string | undefined;
|
|
169
|
+
postpack?: string | undefined;
|
|
170
|
+
publish?: string | undefined;
|
|
171
|
+
postpublish?: string | undefined;
|
|
172
|
+
preinstall?: string | undefined;
|
|
173
|
+
install?: string | undefined;
|
|
174
|
+
postinstall?: string | undefined;
|
|
175
|
+
preuninstall?: string | undefined;
|
|
176
|
+
uninstall?: string | undefined;
|
|
177
|
+
postuninstall?: string | undefined;
|
|
178
|
+
preversion?: string | undefined;
|
|
179
|
+
version?: string | undefined;
|
|
180
|
+
postversion?: string | undefined;
|
|
181
|
+
pretest?: string | undefined;
|
|
182
|
+
test?: string | undefined;
|
|
183
|
+
posttest?: string | undefined;
|
|
184
|
+
prestop?: string | undefined;
|
|
185
|
+
stop?: string | undefined;
|
|
186
|
+
poststop?: string | undefined;
|
|
187
|
+
prestart?: string | undefined;
|
|
188
|
+
start?: string | undefined;
|
|
189
|
+
poststart?: string | undefined;
|
|
190
|
+
prerestart?: string | undefined;
|
|
191
|
+
restart?: string | undefined;
|
|
192
|
+
postrestart?: string | undefined;
|
|
193
|
+
}>>>;
|
|
194
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
195
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
196
|
+
devDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
197
|
+
optionalDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
198
|
+
peerDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
199
|
+
peerDependenciesMeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
200
|
+
optional: z.ZodBoolean;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
optional: boolean;
|
|
203
|
+
}, {
|
|
204
|
+
optional: boolean;
|
|
205
|
+
}>>>;
|
|
206
|
+
bundledDependencies: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodBoolean]>>;
|
|
207
|
+
bundleDependencies: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodBoolean]>>;
|
|
208
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>]>>>;
|
|
209
|
+
funding: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
210
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["corporation", "foundation", "github", "individual", "opencollective", "patreon"]>, z.ZodString]>>;
|
|
211
|
+
url: z.ZodString;
|
|
212
|
+
}, "strict", z.ZodTypeAny, {
|
|
213
|
+
url: string;
|
|
214
|
+
type?: string | undefined;
|
|
215
|
+
}, {
|
|
216
|
+
url: string;
|
|
217
|
+
type?: string | undefined;
|
|
218
|
+
}>, z.ZodString]>, "many">, z.ZodUnion<[z.ZodObject<{
|
|
219
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["corporation", "foundation", "github", "individual", "opencollective", "patreon"]>, z.ZodString]>>;
|
|
220
|
+
url: z.ZodString;
|
|
221
|
+
}, "strict", z.ZodTypeAny, {
|
|
222
|
+
url: string;
|
|
223
|
+
type?: string | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
url: string;
|
|
226
|
+
type?: string | undefined;
|
|
227
|
+
}>, z.ZodString]>]>>;
|
|
228
|
+
module: z.ZodOptional<z.ZodString>;
|
|
229
|
+
esnext: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
230
|
+
browser: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>>]>>;
|
|
231
|
+
sideEffects: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodBoolean]>>;
|
|
232
|
+
engines: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
233
|
+
node: z.ZodOptional<z.ZodString>;
|
|
234
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
node?: string | undefined;
|
|
237
|
+
npm?: string | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
node?: string | undefined;
|
|
240
|
+
npm?: string | undefined;
|
|
241
|
+
}>, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
242
|
+
os: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["!aix", "!darwin", "!freebsd", "!linux", "!openbsd", "!sunos", "!win32", "aix", "darwin", "freebsd", "linux", "openbsd", "sunos", "win32"]>, z.ZodString]>, "many">>;
|
|
243
|
+
cpu: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["!arm", "!arm64", "!ia32", "!mips", "!mipsel", "!ppc", "!ppc64", "!s390", "!s390x", "!x32", "!x64", "arm", "arm64", "ia32", "mips", "mipsel", "ppc", "ppc64", "s390", "s390x", "x32", "x64"]>, z.ZodString]>, "many">>;
|
|
244
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
publishConfig: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
|
|
246
|
+
access: z.ZodOptional<z.ZodEnum<["public", "restricted"]>>;
|
|
247
|
+
registry: z.ZodOptional<z.ZodString>;
|
|
248
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
access?: "public" | "restricted" | undefined;
|
|
251
|
+
registry?: string | undefined;
|
|
252
|
+
tag?: string | undefined;
|
|
253
|
+
}, {
|
|
254
|
+
access?: "public" | "restricted" | undefined;
|
|
255
|
+
registry?: string | undefined;
|
|
256
|
+
tag?: string | undefined;
|
|
257
|
+
}>, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
258
|
+
preferGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
259
|
+
workspaces: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodObject<{
|
|
260
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
261
|
+
nohoist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
262
|
+
}, "strict", z.ZodTypeAny, {
|
|
263
|
+
packages?: string[] | undefined;
|
|
264
|
+
nohoist?: string[] | undefined;
|
|
265
|
+
}, {
|
|
266
|
+
packages?: string[] | undefined;
|
|
267
|
+
nohoist?: string[] | undefined;
|
|
268
|
+
}>]>>;
|
|
269
|
+
flat: z.ZodOptional<z.ZodBoolean>;
|
|
270
|
+
resolutions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
271
|
+
types: z.ZodOptional<z.ZodString>;
|
|
272
|
+
typings: z.ZodOptional<z.ZodString>;
|
|
273
|
+
packageManager: z.ZodOptional<z.ZodString>;
|
|
274
|
+
source: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
name?: string | undefined;
|
|
277
|
+
version?: string | undefined;
|
|
278
|
+
description?: string | undefined;
|
|
279
|
+
keywords?: string[] | undefined;
|
|
280
|
+
homepage?: string | undefined;
|
|
281
|
+
bugs?: string | {
|
|
282
|
+
email?: string | undefined;
|
|
283
|
+
url?: string | undefined;
|
|
284
|
+
} | undefined;
|
|
285
|
+
license?: string | undefined;
|
|
286
|
+
author?: string | {
|
|
287
|
+
name: string;
|
|
288
|
+
email?: string | undefined;
|
|
289
|
+
url?: string | undefined;
|
|
290
|
+
} | undefined;
|
|
291
|
+
contributors?: (string | {
|
|
292
|
+
name: string;
|
|
293
|
+
email?: string | undefined;
|
|
294
|
+
url?: string | undefined;
|
|
295
|
+
})[] | undefined;
|
|
296
|
+
maintainers?: (string | {
|
|
297
|
+
name: string;
|
|
298
|
+
email?: string | undefined;
|
|
299
|
+
url?: string | undefined;
|
|
300
|
+
})[] | undefined;
|
|
301
|
+
files?: string[] | undefined;
|
|
302
|
+
type?: "commonjs" | "module" | undefined;
|
|
303
|
+
main?: string | undefined;
|
|
304
|
+
exports?: PackageJsonExports | undefined;
|
|
305
|
+
bin?: string | Record<string, string> | undefined;
|
|
306
|
+
man?: string | string[] | undefined;
|
|
307
|
+
directories?: {
|
|
308
|
+
bin?: string | undefined;
|
|
309
|
+
doc?: string | undefined;
|
|
310
|
+
example?: string | undefined;
|
|
311
|
+
lib?: string | undefined;
|
|
312
|
+
man?: string | undefined;
|
|
313
|
+
v?: string | undefined;
|
|
314
|
+
} | undefined;
|
|
315
|
+
repository?: string | {
|
|
316
|
+
type: string;
|
|
317
|
+
url: string;
|
|
318
|
+
directory?: string | undefined;
|
|
319
|
+
} | undefined;
|
|
320
|
+
scripts?: (Record<string, string> & {
|
|
321
|
+
prepublish?: string | undefined;
|
|
322
|
+
prepare?: string | undefined;
|
|
323
|
+
prepublishOnly?: string | undefined;
|
|
324
|
+
prepack?: string | undefined;
|
|
325
|
+
postpack?: string | undefined;
|
|
326
|
+
publish?: string | undefined;
|
|
327
|
+
postpublish?: string | undefined;
|
|
328
|
+
preinstall?: string | undefined;
|
|
329
|
+
install?: string | undefined;
|
|
330
|
+
postinstall?: string | undefined;
|
|
331
|
+
preuninstall?: string | undefined;
|
|
332
|
+
uninstall?: string | undefined;
|
|
333
|
+
postuninstall?: string | undefined;
|
|
334
|
+
preversion?: string | undefined;
|
|
335
|
+
version?: string | undefined;
|
|
336
|
+
postversion?: string | undefined;
|
|
337
|
+
pretest?: string | undefined;
|
|
338
|
+
test?: string | undefined;
|
|
339
|
+
posttest?: string | undefined;
|
|
340
|
+
prestop?: string | undefined;
|
|
341
|
+
stop?: string | undefined;
|
|
342
|
+
poststop?: string | undefined;
|
|
343
|
+
prestart?: string | undefined;
|
|
344
|
+
start?: string | undefined;
|
|
345
|
+
poststart?: string | undefined;
|
|
346
|
+
prerestart?: string | undefined;
|
|
347
|
+
restart?: string | undefined;
|
|
348
|
+
postrestart?: string | undefined;
|
|
349
|
+
}) | undefined;
|
|
350
|
+
config?: Record<string, unknown> | undefined;
|
|
351
|
+
dependencies?: Record<string, string> | undefined;
|
|
352
|
+
devDependencies?: Record<string, string> | undefined;
|
|
353
|
+
optionalDependencies?: Record<string, string> | undefined;
|
|
354
|
+
peerDependencies?: Record<string, string> | undefined;
|
|
355
|
+
peerDependenciesMeta?: Record<string, {
|
|
356
|
+
optional: boolean;
|
|
357
|
+
}> | undefined;
|
|
358
|
+
bundledDependencies?: boolean | string[] | undefined;
|
|
359
|
+
bundleDependencies?: boolean | string[] | undefined;
|
|
360
|
+
overrides?: Record<string, string | Record<string, string | Record<string, unknown>>> | undefined;
|
|
361
|
+
funding?: string | {
|
|
362
|
+
url: string;
|
|
363
|
+
type?: string | undefined;
|
|
364
|
+
} | (string | {
|
|
365
|
+
url: string;
|
|
366
|
+
type?: string | undefined;
|
|
367
|
+
})[] | undefined;
|
|
368
|
+
module?: string | undefined;
|
|
369
|
+
esnext?: string | Record<string, string> | undefined;
|
|
370
|
+
browser?: string | Record<string, string | false> | undefined;
|
|
371
|
+
sideEffects?: boolean | string[] | undefined;
|
|
372
|
+
engines?: ({
|
|
373
|
+
node?: string | undefined;
|
|
374
|
+
npm?: string | undefined;
|
|
375
|
+
} & Record<string, string>) | undefined;
|
|
376
|
+
os?: string[] | undefined;
|
|
377
|
+
cpu?: string[] | undefined;
|
|
378
|
+
private?: boolean | undefined;
|
|
379
|
+
publishConfig?: ({
|
|
380
|
+
access?: "public" | "restricted" | undefined;
|
|
381
|
+
registry?: string | undefined;
|
|
382
|
+
tag?: string | undefined;
|
|
383
|
+
} & Record<string, unknown>) | undefined;
|
|
384
|
+
preferGlobal?: boolean | undefined;
|
|
385
|
+
workspaces?: string[] | {
|
|
386
|
+
packages?: string[] | undefined;
|
|
387
|
+
nohoist?: string[] | undefined;
|
|
388
|
+
} | undefined;
|
|
389
|
+
flat?: boolean | undefined;
|
|
390
|
+
resolutions?: Record<string, string> | undefined;
|
|
391
|
+
types?: string | undefined;
|
|
392
|
+
typings?: string | undefined;
|
|
393
|
+
packageManager?: string | undefined;
|
|
394
|
+
source?: string | undefined;
|
|
395
|
+
}, {
|
|
396
|
+
name?: string | undefined;
|
|
397
|
+
version?: string | undefined;
|
|
398
|
+
description?: string | undefined;
|
|
399
|
+
keywords?: string[] | undefined;
|
|
400
|
+
homepage?: string | undefined;
|
|
401
|
+
bugs?: string | {
|
|
402
|
+
email?: string | undefined;
|
|
403
|
+
url?: string | undefined;
|
|
404
|
+
} | undefined;
|
|
405
|
+
license?: string | undefined;
|
|
406
|
+
author?: string | {
|
|
407
|
+
name: string;
|
|
408
|
+
email?: string | undefined;
|
|
409
|
+
url?: string | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
contributors?: (string | {
|
|
412
|
+
name: string;
|
|
413
|
+
email?: string | undefined;
|
|
414
|
+
url?: string | undefined;
|
|
415
|
+
})[] | undefined;
|
|
416
|
+
maintainers?: (string | {
|
|
417
|
+
name: string;
|
|
418
|
+
email?: string | undefined;
|
|
419
|
+
url?: string | undefined;
|
|
420
|
+
})[] | undefined;
|
|
421
|
+
files?: string[] | undefined;
|
|
422
|
+
type?: "commonjs" | "module" | undefined;
|
|
423
|
+
main?: string | undefined;
|
|
424
|
+
exports?: PackageJsonExports | undefined;
|
|
425
|
+
bin?: string | Record<string, string> | undefined;
|
|
426
|
+
man?: string | string[] | undefined;
|
|
427
|
+
directories?: {
|
|
428
|
+
bin?: string | undefined;
|
|
429
|
+
doc?: string | undefined;
|
|
430
|
+
example?: string | undefined;
|
|
431
|
+
lib?: string | undefined;
|
|
432
|
+
man?: string | undefined;
|
|
433
|
+
v?: string | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
repository?: string | {
|
|
436
|
+
type: string;
|
|
437
|
+
url: string;
|
|
438
|
+
directory?: string | undefined;
|
|
439
|
+
} | undefined;
|
|
440
|
+
scripts?: (Record<string, string> & {
|
|
441
|
+
prepublish?: string | undefined;
|
|
442
|
+
prepare?: string | undefined;
|
|
443
|
+
prepublishOnly?: string | undefined;
|
|
444
|
+
prepack?: string | undefined;
|
|
445
|
+
postpack?: string | undefined;
|
|
446
|
+
publish?: string | undefined;
|
|
447
|
+
postpublish?: string | undefined;
|
|
448
|
+
preinstall?: string | undefined;
|
|
449
|
+
install?: string | undefined;
|
|
450
|
+
postinstall?: string | undefined;
|
|
451
|
+
preuninstall?: string | undefined;
|
|
452
|
+
uninstall?: string | undefined;
|
|
453
|
+
postuninstall?: string | undefined;
|
|
454
|
+
preversion?: string | undefined;
|
|
455
|
+
version?: string | undefined;
|
|
456
|
+
postversion?: string | undefined;
|
|
457
|
+
pretest?: string | undefined;
|
|
458
|
+
test?: string | undefined;
|
|
459
|
+
posttest?: string | undefined;
|
|
460
|
+
prestop?: string | undefined;
|
|
461
|
+
stop?: string | undefined;
|
|
462
|
+
poststop?: string | undefined;
|
|
463
|
+
prestart?: string | undefined;
|
|
464
|
+
start?: string | undefined;
|
|
465
|
+
poststart?: string | undefined;
|
|
466
|
+
prerestart?: string | undefined;
|
|
467
|
+
restart?: string | undefined;
|
|
468
|
+
postrestart?: string | undefined;
|
|
469
|
+
}) | undefined;
|
|
470
|
+
config?: Record<string, unknown> | undefined;
|
|
471
|
+
dependencies?: Record<string, string> | undefined;
|
|
472
|
+
devDependencies?: Record<string, string> | undefined;
|
|
473
|
+
optionalDependencies?: Record<string, string> | undefined;
|
|
474
|
+
peerDependencies?: Record<string, string> | undefined;
|
|
475
|
+
peerDependenciesMeta?: Record<string, {
|
|
476
|
+
optional: boolean;
|
|
477
|
+
}> | undefined;
|
|
478
|
+
bundledDependencies?: boolean | string[] | undefined;
|
|
479
|
+
bundleDependencies?: boolean | string[] | undefined;
|
|
480
|
+
overrides?: Record<string, string | Record<string, string | Record<string, unknown>>> | undefined;
|
|
481
|
+
funding?: string | {
|
|
482
|
+
url: string;
|
|
483
|
+
type?: string | undefined;
|
|
484
|
+
} | (string | {
|
|
485
|
+
url: string;
|
|
486
|
+
type?: string | undefined;
|
|
487
|
+
})[] | undefined;
|
|
488
|
+
module?: string | undefined;
|
|
489
|
+
esnext?: string | Record<string, string> | undefined;
|
|
490
|
+
browser?: string | Record<string, string | false> | undefined;
|
|
491
|
+
sideEffects?: boolean | string[] | undefined;
|
|
492
|
+
engines?: ({
|
|
493
|
+
node?: string | undefined;
|
|
494
|
+
npm?: string | undefined;
|
|
495
|
+
} & Record<string, string>) | undefined;
|
|
496
|
+
os?: string[] | undefined;
|
|
497
|
+
cpu?: string[] | undefined;
|
|
498
|
+
private?: boolean | undefined;
|
|
499
|
+
publishConfig?: ({
|
|
500
|
+
access?: "public" | "restricted" | undefined;
|
|
501
|
+
registry?: string | undefined;
|
|
502
|
+
tag?: string | undefined;
|
|
503
|
+
} & Record<string, unknown>) | undefined;
|
|
504
|
+
preferGlobal?: boolean | undefined;
|
|
505
|
+
workspaces?: string[] | {
|
|
506
|
+
packages?: string[] | undefined;
|
|
507
|
+
nohoist?: string[] | undefined;
|
|
508
|
+
} | undefined;
|
|
509
|
+
flat?: boolean | undefined;
|
|
510
|
+
resolutions?: Record<string, string> | undefined;
|
|
511
|
+
types?: string | undefined;
|
|
512
|
+
typings?: string | undefined;
|
|
513
|
+
packageManager?: string | undefined;
|
|
514
|
+
source?: string | undefined;
|
|
515
|
+
}>;
|
|
516
|
+
export type PackageJson = z.infer<typeof packageJsonSchema>;
|
|
517
|
+
export {};
|