@bedrockio/yada 1.10.2 → 1.10.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 +10 -0
- package/dist/cjs/TypeSchema.js +1 -1
- package/dist/cjs/array.js +1 -1
- package/dist/cjs/boolean.js +1 -1
- package/dist/cjs/date.js +1 -1
- package/dist/cjs/index.js +4 -6
- package/dist/cjs/number.js +1 -1
- package/dist/cjs/object.js +28 -22
- package/dist/cjs/password.js +4 -8
- package/dist/cjs/string.js +1 -1
- package/dist/cjs/tuple.js +2 -2
- package/package.json +1 -1
- package/src/object.js +30 -22
- package/src/tuple.js +1 -1
- package/types/object.d.ts +4 -4
- package/types/object.d.ts.map +1 -1
- package/types/password.d.ts.map +1 -1
- package/types/tuple.d.ts +2 -2
- package/types/tuple.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 1.10.4
|
|
2
|
+
|
|
3
|
+
- Fixed type errors for rest params.
|
|
4
|
+
|
|
5
|
+
## 1.10.3
|
|
6
|
+
|
|
7
|
+
- Fix for strip empty allowing required fields.
|
|
8
|
+
- Fix for flat null property being stripped.
|
|
9
|
+
- Fix for defaults not being respected with flat keys.
|
|
10
|
+
|
|
1
11
|
## 1.10.2
|
|
2
12
|
|
|
3
13
|
- Shortcut methods for object options.
|
package/dist/cjs/TypeSchema.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _Schema = _interopRequireDefault(require("./Schema"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
class TypeSchema extends _Schema.default {
|
|
10
10
|
constructor(Class, meta) {
|
|
11
11
|
const type = Class.name.toLowerCase();
|
package/dist/cjs/array.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.default = _default;
|
|
|
7
7
|
var _lodash = require("lodash");
|
|
8
8
|
var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
|
|
9
9
|
var _errors = require("./errors");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
class ArraySchema extends _TypeSchema.default {
|
|
12
12
|
constructor(meta) {
|
|
13
13
|
super(Array, meta);
|
package/dist/cjs/boolean.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = _default;
|
|
7
7
|
var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
|
|
8
8
|
var _errors = require("./errors");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
class BooleanSchema extends _TypeSchema.default {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(Boolean);
|
package/dist/cjs/date.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.default = _default;
|
|
|
7
7
|
var _validator = _interopRequireDefault(require("validator"));
|
|
8
8
|
var _Schema = _interopRequireDefault(require("./Schema"));
|
|
9
9
|
var _errors = require("./errors");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
class DateSchema extends _Schema.default {
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
package/dist/cjs/index.js
CHANGED
|
@@ -90,9 +90,8 @@ var _number = _interopRequireDefault(require("./number"));
|
|
|
90
90
|
var _object = _interopRequireDefault(require("./object"));
|
|
91
91
|
var _string = _interopRequireDefault(require("./string"));
|
|
92
92
|
var _tuple = _interopRequireDefault(require("./tuple"));
|
|
93
|
-
function _interopRequireDefault(
|
|
94
|
-
function
|
|
95
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
93
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
94
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
96
95
|
/**
|
|
97
96
|
* Accepts anything.
|
|
98
97
|
*/
|
|
@@ -121,7 +120,7 @@ function reject(...args) {
|
|
|
121
120
|
function custom(fn) {
|
|
122
121
|
return new _Schema.default().custom(fn);
|
|
123
122
|
}
|
|
124
|
-
var _default = {
|
|
123
|
+
var _default = exports.default = {
|
|
125
124
|
array: _array.default,
|
|
126
125
|
boolean: _boolean.default,
|
|
127
126
|
date: _date.default,
|
|
@@ -138,5 +137,4 @@ var _default = {
|
|
|
138
137
|
useLocalizer: _localization.useLocalizer,
|
|
139
138
|
getLocalizedMessages: _localization.getLocalizedMessages,
|
|
140
139
|
LocalizedError: _errors.LocalizedError
|
|
141
|
-
};
|
|
142
|
-
exports.default = _default;
|
|
140
|
+
};
|
package/dist/cjs/number.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = _default;
|
|
7
7
|
var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
|
|
8
8
|
var _errors = require("./errors");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
class NumberSchema extends _TypeSchema.default {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(Number);
|
package/dist/cjs/object.js
CHANGED
|
@@ -8,9 +8,8 @@ var _lodash = require("lodash");
|
|
|
8
8
|
var _Schema = _interopRequireWildcard(require("./Schema"));
|
|
9
9
|
var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
|
|
10
10
|
var _errors = require("./errors");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
13
|
const APPEND_ASSERTION_TYPES = ['required', 'type', 'custom'];
|
|
15
14
|
const INTEGER_REG = /^\d+$/;
|
|
16
15
|
|
|
@@ -63,10 +62,7 @@ class ObjectSchema extends _TypeSchema.default {
|
|
|
63
62
|
let errors = [];
|
|
64
63
|
const result = {};
|
|
65
64
|
for (let key of keys) {
|
|
66
|
-
|
|
67
|
-
if (value === '' && stripEmpty) {
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
65
|
+
let value = passed[key];
|
|
70
66
|
const schema = getSchema(fields, key, options);
|
|
71
67
|
if (!schema) {
|
|
72
68
|
if (stripUnknown) {
|
|
@@ -81,7 +77,19 @@ class ObjectSchema extends _TypeSchema.default {
|
|
|
81
77
|
continue;
|
|
82
78
|
}
|
|
83
79
|
try {
|
|
84
|
-
|
|
80
|
+
let isBaseObject = false;
|
|
81
|
+
if (allowFlatKeys && value === undefined) {
|
|
82
|
+
// When allowing keys like "profile.name", "profile" must still
|
|
83
|
+
// be validated, but will not exist so expand the passed object
|
|
84
|
+
// and take the base value.
|
|
85
|
+
value = expandFlatSyntax(passed)[key];
|
|
86
|
+
|
|
87
|
+
// If the flat key did not exist but the expanded key did then
|
|
88
|
+
// we have a "base object". If both keys do not exist then the
|
|
89
|
+
// validation result needs to be set as it could be a default.
|
|
90
|
+
isBaseObject = value !== undefined;
|
|
91
|
+
}
|
|
92
|
+
const transformed = await schema.validate(value, {
|
|
85
93
|
...options,
|
|
86
94
|
path: [...path, key],
|
|
87
95
|
required: schema.meta.required,
|
|
@@ -94,18 +102,16 @@ class ObjectSchema extends _TypeSchema.default {
|
|
|
94
102
|
// The original root represents the root object
|
|
95
103
|
// before it was transformed.
|
|
96
104
|
originalRoot: original
|
|
97
|
-
};
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
result[key] = transformed;
|
|
108
|
-
}
|
|
105
|
+
});
|
|
106
|
+
if (transformed === '' && stripEmpty) {
|
|
107
|
+
continue;
|
|
108
|
+
} else if (isBaseObject) {
|
|
109
|
+
// We do not want to return the "profile" object in the
|
|
110
|
+
// result when only flat keys are passed, so continue here.
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (transformed !== undefined) {
|
|
114
|
+
result[key] = transformed;
|
|
109
115
|
}
|
|
110
116
|
} catch (error) {
|
|
111
117
|
const {
|
|
@@ -171,7 +177,7 @@ class ObjectSchema extends _TypeSchema.default {
|
|
|
171
177
|
/**
|
|
172
178
|
* Returns a new schema that only validates the selected fields.
|
|
173
179
|
*
|
|
174
|
-
* @param {...string}
|
|
180
|
+
* @param {...string} names Names to include.
|
|
175
181
|
*/
|
|
176
182
|
pick(...names) {
|
|
177
183
|
if (Array.isArray(names[0])) {
|
|
@@ -185,7 +191,7 @@ class ObjectSchema extends _TypeSchema.default {
|
|
|
185
191
|
/**
|
|
186
192
|
* Returns a new schema that omits fields.
|
|
187
193
|
*
|
|
188
|
-
* @param {...string}
|
|
194
|
+
* @param {...string} names Names to exclude.
|
|
189
195
|
*/
|
|
190
196
|
omit(...names) {
|
|
191
197
|
if (Array.isArray(names[0])) {
|
package/dist/cjs/password.js
CHANGED
|
@@ -39,14 +39,10 @@ function validateLength(expected) {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const validateLowercase = validateRegex(LOWER_REG, 'Must contain at least {length} lowercase character{s}.');
|
|
43
|
-
exports.
|
|
44
|
-
const
|
|
45
|
-
exports.
|
|
46
|
-
const validateNumbers = validateRegex(NUMBER_REG, 'Must contain at least {length} number{s}.');
|
|
47
|
-
exports.validateNumbers = validateNumbers;
|
|
48
|
-
const validateSymbols = validateRegex(SYMBOL_REG, 'Must contain at least {length} symbol{s}.');
|
|
49
|
-
exports.validateSymbols = validateSymbols;
|
|
42
|
+
const validateLowercase = exports.validateLowercase = validateRegex(LOWER_REG, 'Must contain at least {length} lowercase character{s}.');
|
|
43
|
+
const validateUppercase = exports.validateUppercase = validateRegex(UPPER_REG, 'Must contain at least {length} uppercase character{s}.');
|
|
44
|
+
const validateNumbers = exports.validateNumbers = validateRegex(NUMBER_REG, 'Must contain at least {length} number{s}.');
|
|
45
|
+
const validateSymbols = exports.validateSymbols = validateRegex(SYMBOL_REG, 'Must contain at least {length} symbol{s}.');
|
|
50
46
|
function validateRegex(reg, message) {
|
|
51
47
|
return expected => {
|
|
52
48
|
return (str = '') => {
|
package/dist/cjs/string.js
CHANGED
|
@@ -9,7 +9,7 @@ var _TypeSchema = _interopRequireDefault(require("./TypeSchema"));
|
|
|
9
9
|
var _errors = require("./errors");
|
|
10
10
|
var _password = require("./password");
|
|
11
11
|
var _utils = require("./utils");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
const SLUG_REG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
14
14
|
const PHONE_REG = /^\+\d{1,3}\d{3,14}$/;
|
|
15
15
|
const NANP_REG = /^\+1[2-9]\d{2}[2-9]\d{6}$/;
|
package/dist/cjs/tuple.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = _default;
|
|
7
7
|
var _Schema = _interopRequireDefault(require("./Schema"));
|
|
8
8
|
var _errors = require("./errors");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
class TupleSchema extends _Schema.default {
|
|
11
11
|
constructor(schemas) {
|
|
12
12
|
super({
|
|
@@ -96,7 +96,7 @@ class TupleSchema extends _Schema.default {
|
|
|
96
96
|
/**
|
|
97
97
|
* Creates a [tuple schema](https://github.com/bedrockio/yada#tuple).
|
|
98
98
|
*
|
|
99
|
-
* @param {...Schema}
|
|
99
|
+
* @param {...Schema} schemas Schemas to validate
|
|
100
100
|
* the exact types of elements allowed in the tuple. Also
|
|
101
101
|
* accepts a single array argument.
|
|
102
102
|
*/
|
package/package.json
CHANGED
package/src/object.js
CHANGED
|
@@ -66,11 +66,7 @@ class ObjectSchema extends TypeSchema {
|
|
|
66
66
|
const result = {};
|
|
67
67
|
|
|
68
68
|
for (let key of keys) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (value === '' && stripEmpty) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
69
|
+
let value = passed[key];
|
|
74
70
|
|
|
75
71
|
const schema = getSchema(fields, key, options);
|
|
76
72
|
|
|
@@ -89,7 +85,21 @@ class ObjectSchema extends TypeSchema {
|
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
try {
|
|
92
|
-
|
|
88
|
+
let isBaseObject = false;
|
|
89
|
+
|
|
90
|
+
if (allowFlatKeys && value === undefined) {
|
|
91
|
+
// When allowing keys like "profile.name", "profile" must still
|
|
92
|
+
// be validated, but will not exist so expand the passed object
|
|
93
|
+
// and take the base value.
|
|
94
|
+
value = expandFlatSyntax(passed)[key];
|
|
95
|
+
|
|
96
|
+
// If the flat key did not exist but the expanded key did then
|
|
97
|
+
// we have a "base object". If both keys do not exist then the
|
|
98
|
+
// validation result needs to be set as it could be a default.
|
|
99
|
+
isBaseObject = value !== undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const transformed = await schema.validate(value, {
|
|
93
103
|
...options,
|
|
94
104
|
|
|
95
105
|
path: [...path, key],
|
|
@@ -105,20 +115,18 @@ class ObjectSchema extends TypeSchema {
|
|
|
105
115
|
// The original root represents the root object
|
|
106
116
|
// before it was transformed.
|
|
107
117
|
originalRoot: original,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
result[key] = transformed;
|
|
121
|
-
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
if (transformed === '' && stripEmpty) {
|
|
121
|
+
continue;
|
|
122
|
+
} else if (isBaseObject) {
|
|
123
|
+
// We do not want to return the "profile" object in the
|
|
124
|
+
// result when only flat keys are passed, so continue here.
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (transformed !== undefined) {
|
|
129
|
+
result[key] = transformed;
|
|
122
130
|
}
|
|
123
131
|
} catch (error) {
|
|
124
132
|
const { message } = schema.meta;
|
|
@@ -184,7 +192,7 @@ class ObjectSchema extends TypeSchema {
|
|
|
184
192
|
/**
|
|
185
193
|
* Returns a new schema that only validates the selected fields.
|
|
186
194
|
*
|
|
187
|
-
* @param {...string}
|
|
195
|
+
* @param {...string} names Names to include.
|
|
188
196
|
*/
|
|
189
197
|
pick(...names) {
|
|
190
198
|
if (Array.isArray(names[0])) {
|
|
@@ -198,7 +206,7 @@ class ObjectSchema extends TypeSchema {
|
|
|
198
206
|
/**
|
|
199
207
|
* Returns a new schema that omits fields.
|
|
200
208
|
*
|
|
201
|
-
* @param {...string}
|
|
209
|
+
* @param {...string} names Names to exclude.
|
|
202
210
|
*/
|
|
203
211
|
omit(...names) {
|
|
204
212
|
if (Array.isArray(names[0])) {
|
package/src/tuple.js
CHANGED
|
@@ -83,7 +83,7 @@ class TupleSchema extends Schema {
|
|
|
83
83
|
/**
|
|
84
84
|
* Creates a [tuple schema](https://github.com/bedrockio/yada#tuple).
|
|
85
85
|
*
|
|
86
|
-
* @param {...Schema}
|
|
86
|
+
* @param {...Schema} schemas Schemas to validate
|
|
87
87
|
* the exact types of elements allowed in the tuple. Also
|
|
88
88
|
* accepts a single array argument.
|
|
89
89
|
*/
|
package/types/object.d.ts
CHANGED
|
@@ -35,15 +35,15 @@ declare class ObjectSchema extends TypeSchema {
|
|
|
35
35
|
/**
|
|
36
36
|
* Returns a new schema that only validates the selected fields.
|
|
37
37
|
*
|
|
38
|
-
* @param {...string}
|
|
38
|
+
* @param {...string} names Names to include.
|
|
39
39
|
*/
|
|
40
|
-
pick(...names
|
|
40
|
+
pick(...names: string[]): ObjectSchema;
|
|
41
41
|
/**
|
|
42
42
|
* Returns a new schema that omits fields.
|
|
43
43
|
*
|
|
44
|
-
* @param {...string}
|
|
44
|
+
* @param {...string} names Names to exclude.
|
|
45
45
|
*/
|
|
46
|
-
omit(...names
|
|
46
|
+
omit(...names: string[]): ObjectSchema;
|
|
47
47
|
/**
|
|
48
48
|
* Augments the object schema to make fields required.
|
|
49
49
|
* Field names may be passed as an array or arguments.
|
package/types/object.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.js"],"names":[],"mappings":"AAsgBA;;;;;;GAMG;AACH,uCAJW,SAAS,gBAQnB;wBAtgBY;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,EAAE;AAD3C;;GAEG;AAEH;IACE,uBAIC;IAED,sBAOC;IAED,cAiHC;IAED;;;;;;OAMG;IACH,WAFW,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,OAkB9B;IAED;;;;;;OAMG;IACH,cAFW,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC,OAc9B;IAED;;;;OAIG;IACH,eAFc,MAAM,EAAA,gBASnB;IAED;;;;OAIG;IACH,eAFc,MAAM,EAAA,gBASnB;IAED;;;;;;;OAOG;IACH,mBAHc,MAAM,EAAA,gBAuBnB;IAED;;OAEG;IACH,2BAQC;IAED;;;;;;OAMG;IACH,yCAFa,IAAI,CAiBhB;IAED;;;;;;OAMG;IACH,cAEC;IAED;;;;;;;;;OASG;IACH,YAFW,SAAS,GAAC,MAAM,gBA+B1B;IAID;;OAEG;IACH,mBAIC;IAED;;OAEG;IACH,qBAIC;IAED;;OAEG;IACH,sBAIC;IAED;;OAEG;IACH,uBAIC;IAED;;;;;;;;;;;OAWG;IACH,kBALG;QAA0B,UAAU,GAA5B,OAAO;QACW,YAAY,GAA9B,OAAO;QACW,aAAa,GAA/B,OAAO;QACW,cAAc,GAAhC,OAAO;KAA0B,QAI3C;IAID,gCAmBC;CACF;mBA5ZgC,UAAU;uBACpB,cAAc"}
|
package/types/password.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../src/password.js"],"names":[],"mappings":"AAeA,sDASC;AAED,
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../src/password.js"],"names":[],"mappings":"AAeA,sDASC;AAED,gDACU,YAAQ,UASjB;AAuBQ,mDACG,YAAQ,UAUjB;AAXM,mDACG,YAAQ,UAUjB;AAXM,iDACG,YAAQ,UAUjB;AAXM,iDACG,YAAQ,UAUjB"}
|
package/types/tuple.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Creates a [tuple schema](https://github.com/bedrockio/yada#tuple).
|
|
3
3
|
*
|
|
4
|
-
* @param {...Schema}
|
|
4
|
+
* @param {...Schema} schemas Schemas to validate
|
|
5
5
|
* the exact types of elements allowed in the tuple. Also
|
|
6
6
|
* accepts a single array argument.
|
|
7
7
|
*/
|
|
8
|
-
export default function _default(...schemas
|
|
8
|
+
export default function _default(...schemas: Schema[]): TupleSchema;
|
|
9
9
|
import Schema from './Schema';
|
|
10
10
|
declare class TupleSchema extends Schema {
|
|
11
11
|
constructor(schemas: any);
|
package/types/tuple.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../src/tuple.js"],"names":[],"mappings":"AAkFA;;;;;;GAMG;AACH,
|
|
1
|
+
{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../src/tuple.js"],"names":[],"mappings":"AAkFA;;;;;;GAMG;AACH,6CAJc,MAAM,EAAA,eASnB;mBA9FkB,UAAU;AAG7B;IACE,0BAGC;IAED,cAoDC;IAED,cAEC;IAMD,gCAQC;CACF"}
|