yuppi 1.4.2 → 1.4.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.
- package/README.md +15 -16
- package/dist/main.d.mts +5 -13
- package/dist/main.d.ts +5 -13
- package/dist/main.js +1 -3
- package/dist/main.mjs +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[String]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
2
2
|
[Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
3
3
|
[Boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
4
|
-
[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
5
4
|
[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
|
|
6
5
|
[Buffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
|
|
7
6
|
[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
@@ -56,8 +55,8 @@
|
|
|
56
55
|
- [Types](#types)
|
|
57
56
|
- [Links](#links)
|
|
58
57
|
- [Discord](https://discord.gg/keift)
|
|
59
|
-
- [Telegram](https://t.me/
|
|
60
|
-
- [Twitter](https://x.com/
|
|
58
|
+
- [Telegram](https://t.me/keiftco)
|
|
59
|
+
- [Twitter](https://x.com/keiftco)
|
|
61
60
|
- [GitHub](https://github.com/keift)
|
|
62
61
|
- [License](#license)
|
|
63
62
|
|
|
@@ -143,9 +142,9 @@ import { Yuppi, Patterns } from 'yuppi';
|
|
|
143
142
|
|
|
144
143
|
Yuppi schema builder.
|
|
145
144
|
|
|
146
|
-
> | Parameter
|
|
147
|
-
> |
|
|
148
|
-
> | options
|
|
145
|
+
> | Parameter | Type | Default | Description |
|
|
146
|
+
> | ---------- | -------------- | --------------------- | ---------------------- |
|
|
147
|
+
> | `options?` | [YuppiOptions] | [YuppiOptionsDefault] | Constructor's options. |
|
|
149
148
|
>
|
|
150
149
|
> Example:
|
|
151
150
|
>
|
|
@@ -159,10 +158,10 @@ Yuppi schema builder.
|
|
|
159
158
|
|
|
160
159
|
Validate the properties with your Yuppi schema.
|
|
161
160
|
|
|
162
|
-
> | Parameter
|
|
163
|
-
> |
|
|
164
|
-
> | schema | [Schema] | | Yuppi schema. |
|
|
165
|
-
> | properties | [AnyObject] | | Properties to be validate. |
|
|
161
|
+
> | Parameter | Type | Default | Description |
|
|
162
|
+
> | ------------ | ----------- | ------- | -------------------------- |
|
|
163
|
+
> | `schema` | [Schema] | | Yuppi schema. |
|
|
164
|
+
> | `properties` | [AnyObject] | | Properties to be validate. |
|
|
166
165
|
>
|
|
167
166
|
> returns [Promise]<[AnyObject]>
|
|
168
167
|
>
|
|
@@ -247,8 +246,8 @@ Declare your Yuppi schema for TypeScript.
|
|
|
247
246
|
|
|
248
247
|
> | Parameter | Type | Default | Description |
|
|
249
248
|
> | --------- | -------- | ------- | ----------------- |
|
|
250
|
-
> | schema
|
|
251
|
-
> | name
|
|
249
|
+
> | `schema` | [Schema] | | Yuppi schema. |
|
|
250
|
+
> | `name` | [String] | | Declaration name. |
|
|
252
251
|
>
|
|
253
252
|
> returns [Promise]<[Void]>
|
|
254
253
|
>
|
|
@@ -278,7 +277,7 @@ Convert your Yuppi schema into Yup schema.
|
|
|
278
277
|
|
|
279
278
|
> | Parameter | Type | Default | Description |
|
|
280
279
|
> | --------- | -------- | ------- | ------------- |
|
|
281
|
-
> | schema
|
|
280
|
+
> | `schema` | [Schema] | | Yuppi schema. |
|
|
282
281
|
>
|
|
283
282
|
> returns [YupSchema]
|
|
284
283
|
>
|
|
@@ -296,7 +295,7 @@ Convert your Yuppi schema into [JSON Schema](https://json-schema.org).
|
|
|
296
295
|
|
|
297
296
|
> | Parameter | Type | Default | Description |
|
|
298
297
|
> | --------- | -------- | ------- | ------------- |
|
|
299
|
-
> | schema
|
|
298
|
+
> | `schema` | [Schema] | | Yuppi schema. |
|
|
300
299
|
>
|
|
301
300
|
> returns [JSONSchema]
|
|
302
301
|
>
|
|
@@ -369,8 +368,8 @@ Convert your Yuppi schema into [JSON Schema](https://json-schema.org).
|
|
|
369
368
|
## Links
|
|
370
369
|
|
|
371
370
|
- [Discord](https://discord.gg/keift)
|
|
372
|
-
- [Telegram](https://t.me/
|
|
373
|
-
- [Twitter](https://x.com/
|
|
371
|
+
- [Telegram](https://t.me/keiftco)
|
|
372
|
+
- [Twitter](https://x.com/keiftco)
|
|
374
373
|
- [GitHub](https://github.com/keift)
|
|
375
374
|
|
|
376
375
|
## License
|
package/dist/main.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnyObject as AnyObject$1, ValidateOptions, ValidationError as ValidationError$1, AnySchema } from 'yup';
|
|
1
|
+
import { AnyObject as AnyObject$1, ValidateOptions, AnySchema, ValidationError as ValidationError$1 } from 'yup';
|
|
3
2
|
import { TAnySchema } from '@sinclair/typebox';
|
|
4
3
|
|
|
5
4
|
type AnyObject = AnyObject$1;
|
|
@@ -108,20 +107,15 @@ type YuppiOptions = {
|
|
|
108
107
|
validate_options?: ValidateOptions;
|
|
109
108
|
};
|
|
110
109
|
|
|
110
|
+
type YupSchema = AnySchema;
|
|
111
|
+
|
|
111
112
|
declare class Yuppi {
|
|
112
113
|
private readonly options;
|
|
113
114
|
constructor(options?: YuppiOptions);
|
|
114
115
|
private cleanupTypesDir;
|
|
115
|
-
validate(schema: Schema, properties: AnyObject): Promise<
|
|
116
|
-
[x: string]: any;
|
|
117
|
-
[x: number]: any;
|
|
118
|
-
}>;
|
|
116
|
+
validate(schema: Schema, properties: AnyObject): Promise<AnyObject>;
|
|
119
117
|
declare(schema: Schema, name: string): Promise<void>;
|
|
120
|
-
convertToYup(schema: Schema):
|
|
121
|
-
[x: string]: any;
|
|
122
|
-
}, yup.AnyObject, {
|
|
123
|
-
[x: string]: any;
|
|
124
|
-
}, "">;
|
|
118
|
+
convertToYup(schema: Schema): YupSchema;
|
|
125
119
|
convertToJSONSchema(schema: Schema): JSONSchema;
|
|
126
120
|
}
|
|
127
121
|
|
|
@@ -149,6 +143,4 @@ declare namespace Patterns_export {
|
|
|
149
143
|
|
|
150
144
|
type ValidationError = ValidationError$1;
|
|
151
145
|
|
|
152
|
-
type YupSchema = AnySchema;
|
|
153
|
-
|
|
154
146
|
export { type AnyObject, type JSONSchema, Patterns_export as Patterns, type Schema, type ValidationError, type YupSchema, Yuppi, type YuppiOptions };
|
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnyObject as AnyObject$1, ValidateOptions, ValidationError as ValidationError$1, AnySchema } from 'yup';
|
|
1
|
+
import { AnyObject as AnyObject$1, ValidateOptions, AnySchema, ValidationError as ValidationError$1 } from 'yup';
|
|
3
2
|
import { TAnySchema } from '@sinclair/typebox';
|
|
4
3
|
|
|
5
4
|
type AnyObject = AnyObject$1;
|
|
@@ -108,20 +107,15 @@ type YuppiOptions = {
|
|
|
108
107
|
validate_options?: ValidateOptions;
|
|
109
108
|
};
|
|
110
109
|
|
|
110
|
+
type YupSchema = AnySchema;
|
|
111
|
+
|
|
111
112
|
declare class Yuppi {
|
|
112
113
|
private readonly options;
|
|
113
114
|
constructor(options?: YuppiOptions);
|
|
114
115
|
private cleanupTypesDir;
|
|
115
|
-
validate(schema: Schema, properties: AnyObject): Promise<
|
|
116
|
-
[x: string]: any;
|
|
117
|
-
[x: number]: any;
|
|
118
|
-
}>;
|
|
116
|
+
validate(schema: Schema, properties: AnyObject): Promise<AnyObject>;
|
|
119
117
|
declare(schema: Schema, name: string): Promise<void>;
|
|
120
|
-
convertToYup(schema: Schema):
|
|
121
|
-
[x: string]: any;
|
|
122
|
-
}, yup.AnyObject, {
|
|
123
|
-
[x: string]: any;
|
|
124
|
-
}, "">;
|
|
118
|
+
convertToYup(schema: Schema): YupSchema;
|
|
125
119
|
convertToJSONSchema(schema: Schema): JSONSchema;
|
|
126
120
|
}
|
|
127
121
|
|
|
@@ -149,6 +143,4 @@ declare namespace Patterns_export {
|
|
|
149
143
|
|
|
150
144
|
type ValidationError = ValidationError$1;
|
|
151
145
|
|
|
152
|
-
type YupSchema = AnySchema;
|
|
153
|
-
|
|
154
146
|
export { type AnyObject, type JSONSchema, Patterns_export as Patterns, type Schema, type ValidationError, type YupSchema, Yuppi, type YuppiOptions };
|
package/dist/main.js
CHANGED
|
@@ -200,9 +200,7 @@ var convertToYup = (schema, options) => {
|
|
|
200
200
|
};
|
|
201
201
|
|
|
202
202
|
// src/utils/PascalCase.util.ts
|
|
203
|
-
var pascalCase = (text) =>
|
|
204
|
-
return text.replace(/[^a-zA-Z0-9]/g, " ").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
205
|
-
};
|
|
203
|
+
var pascalCase = (text) => text.replace(/[^a-zA-Z0-9]/g, " ").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
206
204
|
|
|
207
205
|
// src/defaults/YuppiOptions.default.ts
|
|
208
206
|
var YuppiOptionsDefault = {
|
package/dist/main.mjs
CHANGED
|
@@ -169,9 +169,7 @@ var convertToYup = (schema, options) => {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
// src/utils/PascalCase.util.ts
|
|
172
|
-
var pascalCase = (text) =>
|
|
173
|
-
return text.replace(/[^a-zA-Z0-9]/g, " ").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
174
|
-
};
|
|
172
|
+
var pascalCase = (text) => text.replace(/[^a-zA-Z0-9]/g, " ").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
175
173
|
|
|
176
174
|
// src/defaults/YuppiOptions.default.ts
|
|
177
175
|
var YuppiOptionsDefault = {
|