@sprucelabs/schema 28.2.22 → 28.2.25
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/build/esm/index.d.ts +2 -1
- package/build/esm/index.js +2 -1
- package/build/esm/tests/selectAssert.deprecated.d.ts +7 -0
- package/build/esm/tests/selectAssert.deprecated.js +6 -0
- package/build/esm/tests/selectAssert.utility.d.ts +2 -2
- package/build/esm/tests/selectAssert.utility.js +2 -2
- package/build/esm/utilities/assertOptions.d.ts +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +4 -2
- package/build/tests/selectAssert.deprecated.d.ts +7 -0
- package/build/tests/selectAssert.deprecated.js +11 -0
- package/build/tests/selectAssert.utility.d.ts +2 -2
- package/build/tests/selectAssert.utility.js +2 -2
- package/build/utilities/assertOptions.d.ts +1 -1
- package/package.json +2 -2
package/build/esm/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import StaticSchemaEntityImplementation from './StaticSchemaEntityImplementation
|
|
|
3
3
|
import { FieldRegistration } from './utilities/registerFieldType';
|
|
4
4
|
export default StaticSchemaEntityImplementation;
|
|
5
5
|
export { default as validationErrorAssert } from './tests/validationErrorAssert.utility';
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as selectAssert } from './tests/selectAssert.utility';
|
|
7
|
+
export { default as selectAssertUtil } from './tests/selectAssert.deprecated';
|
|
7
8
|
export * from './schemas.static.types';
|
|
8
9
|
export * from './fields';
|
|
9
10
|
export * from './errors/options.types';
|
package/build/esm/index.js
CHANGED
|
@@ -18,7 +18,8 @@ import textRegistration from './addons/textField.addon.js';
|
|
|
18
18
|
import StaticSchemaEntityImplementation from './StaticSchemaEntityImplementation.js';
|
|
19
19
|
export default StaticSchemaEntityImplementation;
|
|
20
20
|
export { default as validationErrorAssert } from './tests/validationErrorAssert.utility.js';
|
|
21
|
-
export { default as
|
|
21
|
+
export { default as selectAssert } from './tests/selectAssert.utility.js';
|
|
22
|
+
export { default as selectAssertUtil } from './tests/selectAssert.deprecated.js';
|
|
22
23
|
export * from './schemas.static.types.js';
|
|
23
24
|
export * from './fields/index.js';
|
|
24
25
|
export * from './errors/options.types.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated selectAssertUtil -> selectAssert
|
|
3
|
+
*/
|
|
4
|
+
declare const selectAssertUtil: {
|
|
5
|
+
assertSelectChoicesMatch<Choice extends import("..").SelectChoice, Values extends Choice["value"][number] = Choice["value"][number]>(choices: Choice[], expected: Values[]): void;
|
|
6
|
+
};
|
|
7
|
+
export default selectAssertUtil;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectChoice } from '../fields/SelectField.types';
|
|
2
|
-
declare const
|
|
2
|
+
declare const selectAssert: {
|
|
3
3
|
assertSelectChoicesMatch<Choice extends SelectChoice, Values extends Choice["value"][number] = Choice["value"][number]>(choices: Choice[], expected: Values[]): void;
|
|
4
4
|
};
|
|
5
|
-
export default
|
|
5
|
+
export default selectAssert;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { assert } from '@sprucelabs/test';
|
|
2
|
-
const
|
|
2
|
+
const selectAssert = {
|
|
3
3
|
assertSelectChoicesMatch(choices, expected) {
|
|
4
4
|
assert.isEqual(choices.length, expected.length, `Expected ${expected.length} choices, but found ${choices.length}!`);
|
|
5
5
|
const actualValues = choices.map((c) => c.value);
|
|
@@ -8,4 +8,4 @@ const selectAssertUtil = {
|
|
|
8
8
|
assert.isEqualDeep(actualValues, expected, `The options you sent don't match!`);
|
|
9
9
|
},
|
|
10
10
|
};
|
|
11
|
-
export default
|
|
11
|
+
export default selectAssert;
|
|
@@ -25,7 +25,7 @@ declare type Prev = [
|
|
|
25
25
|
20,
|
|
26
26
|
...0[]
|
|
27
27
|
];
|
|
28
|
-
declare type Paths<T, D extends number =
|
|
28
|
+
declare type Paths<T, D extends number = 3> = [D] extends [never] ? never : T extends object ? {
|
|
29
29
|
[K in keyof T]-?: K extends string | number ? `${K}` | Join<K, Paths<T[K], Prev[D]>> : never;
|
|
30
30
|
}[keyof T] : '';
|
|
31
31
|
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import StaticSchemaEntityImplementation from './StaticSchemaEntityImplementation
|
|
|
3
3
|
import { FieldRegistration } from './utilities/registerFieldType';
|
|
4
4
|
export default StaticSchemaEntityImplementation;
|
|
5
5
|
export { default as validationErrorAssert } from './tests/validationErrorAssert.utility';
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as selectAssert } from './tests/selectAssert.utility';
|
|
7
|
+
export { default as selectAssertUtil } from './tests/selectAssert.deprecated';
|
|
7
8
|
export * from './schemas.static.types';
|
|
8
9
|
export * from './fields';
|
|
9
10
|
export * from './errors/options.types';
|
package/build/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.mapFieldErrorsToParameterErrors = exports.assertOptions = exports.fieldRegistrations = exports.SchemaRegistry = exports.SchemaEntityFactory = exports.FieldFactory = exports.normalizeSchemaToIdWithVersion = exports.isIdWithVersion = exports.pickFields = exports.getFields = exports.formatPhoneNumber = exports.areSchemasTheSame = exports.isSchemaValid = exports.validateSchema = exports.dropPrivateFields = exports.dropFields = exports.makeFieldsOptional = exports.areSchemaValuesValid = exports.normalizeSchemaValues = exports.validateSchemaValues = exports.defaultSchemaValues = exports.registerFieldType = exports.buildSchema = exports.buildErrorSchema = exports.SchemaError = exports.selectAssertUtil = exports.validationErrorAssert = void 0;
|
|
20
|
+
exports.mapFieldErrorsToParameterErrors = exports.assertOptions = exports.fieldRegistrations = exports.SchemaRegistry = exports.SchemaEntityFactory = exports.FieldFactory = exports.normalizeSchemaToIdWithVersion = exports.isIdWithVersion = exports.pickFields = exports.getFields = exports.formatPhoneNumber = exports.areSchemasTheSame = exports.isSchemaValid = exports.validateSchema = exports.dropPrivateFields = exports.dropFields = exports.makeFieldsOptional = exports.areSchemaValuesValid = exports.normalizeSchemaValues = exports.validateSchemaValues = exports.defaultSchemaValues = exports.registerFieldType = exports.buildSchema = exports.buildErrorSchema = exports.SchemaError = exports.selectAssertUtil = exports.selectAssert = exports.validationErrorAssert = void 0;
|
|
21
21
|
__exportStar(require("./StaticSchemaEntityImplementation"), exports);
|
|
22
22
|
const addressField_addon_1 = __importDefault(require("./addons/addressField.addon"));
|
|
23
23
|
const booleanField_addon_1 = __importDefault(require("./addons/booleanField.addon"));
|
|
@@ -40,7 +40,9 @@ exports.default = StaticSchemaEntityImplementation_1.default;
|
|
|
40
40
|
var validationErrorAssert_utility_1 = require("./tests/validationErrorAssert.utility");
|
|
41
41
|
Object.defineProperty(exports, "validationErrorAssert", { enumerable: true, get: function () { return __importDefault(validationErrorAssert_utility_1).default; } });
|
|
42
42
|
var selectAssert_utility_1 = require("./tests/selectAssert.utility");
|
|
43
|
-
Object.defineProperty(exports, "
|
|
43
|
+
Object.defineProperty(exports, "selectAssert", { enumerable: true, get: function () { return __importDefault(selectAssert_utility_1).default; } });
|
|
44
|
+
var selectAssert_deprecated_1 = require("./tests/selectAssert.deprecated");
|
|
45
|
+
Object.defineProperty(exports, "selectAssertUtil", { enumerable: true, get: function () { return __importDefault(selectAssert_deprecated_1).default; } });
|
|
44
46
|
__exportStar(require("./schemas.static.types"), exports);
|
|
45
47
|
__exportStar(require("./fields"), exports);
|
|
46
48
|
__exportStar(require("./errors/options.types"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated selectAssertUtil -> selectAssert
|
|
3
|
+
*/
|
|
4
|
+
declare const selectAssertUtil: {
|
|
5
|
+
assertSelectChoicesMatch<Choice extends import("..").SelectChoice, Values extends Choice["value"][number] = Choice["value"][number]>(choices: Choice[], expected: Values[]): void;
|
|
6
|
+
};
|
|
7
|
+
export default selectAssertUtil;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const selectAssert_utility_1 = __importDefault(require("./selectAssert.utility"));
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated selectAssertUtil -> selectAssert
|
|
9
|
+
*/
|
|
10
|
+
const selectAssertUtil = selectAssert_utility_1.default;
|
|
11
|
+
exports.default = selectAssertUtil;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectChoice } from '../fields/SelectField.types';
|
|
2
|
-
declare const
|
|
2
|
+
declare const selectAssert: {
|
|
3
3
|
assertSelectChoicesMatch<Choice extends SelectChoice, Values extends Choice["value"][number] = Choice["value"][number]>(choices: Choice[], expected: Values[]): void;
|
|
4
4
|
};
|
|
5
|
-
export default
|
|
5
|
+
export default selectAssert;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const test_1 = require("@sprucelabs/test");
|
|
4
|
-
const
|
|
4
|
+
const selectAssert = {
|
|
5
5
|
assertSelectChoicesMatch(choices, expected) {
|
|
6
6
|
test_1.assert.isEqual(choices.length, expected.length, `Expected ${expected.length} choices, but found ${choices.length}!`);
|
|
7
7
|
const actualValues = choices.map((c) => c.value);
|
|
@@ -10,4 +10,4 @@ const selectAssertUtil = {
|
|
|
10
10
|
test_1.assert.isEqualDeep(actualValues, expected, `The options you sent don't match!`);
|
|
11
11
|
},
|
|
12
12
|
};
|
|
13
|
-
exports.default =
|
|
13
|
+
exports.default = selectAssert;
|
|
@@ -25,7 +25,7 @@ declare type Prev = [
|
|
|
25
25
|
20,
|
|
26
26
|
...0[]
|
|
27
27
|
];
|
|
28
|
-
declare type Paths<T, D extends number =
|
|
28
|
+
declare type Paths<T, D extends number = 3> = [D] extends [never] ? never : T extends object ? {
|
|
29
29
|
[K in keyof T]-?: K extends string | number ? `${K}` | Join<K, Paths<T[K], Prev[D]>> : never;
|
|
30
30
|
}[keyof T] : '';
|
|
31
31
|
export {};
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"!build/__tests__",
|
|
9
9
|
"esm"
|
|
10
10
|
],
|
|
11
|
-
"version": "28.2.
|
|
11
|
+
"version": "28.2.25",
|
|
12
12
|
"main": "./build/index.js",
|
|
13
13
|
"types": "./build/index.d.ts",
|
|
14
14
|
"module": "./build/esm/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@sprucelabs/jest-sheets-reporter": "^1.3.29",
|
|
80
80
|
"@sprucelabs/resolve-path-aliases": "^1.1.14",
|
|
81
81
|
"@sprucelabs/semantic-release": "^4.0.8",
|
|
82
|
-
"@sprucelabs/test-utils": "^3.0.
|
|
82
|
+
"@sprucelabs/test-utils": "^3.0.562",
|
|
83
83
|
"@types/lodash": "^4.14.182",
|
|
84
84
|
"chokidar-cli": "^3.0.0",
|
|
85
85
|
"concurrently": "^7.2.1",
|