@clementine-solutions/jane-io 1.0.5 → 1.0.7
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 +7 -6
- package/dist/core/analysis/diff.js +2 -2
- package/dist/core/analysis/index.js +4 -4
- package/dist/core/analysis/replay.js +2 -2
- package/dist/core/analysis/telemetry.js +1 -1
- package/dist/core/boundary-rules/at-most-one.js +1 -1
- package/dist/core/boundary-rules/conditionally-required.js +1 -1
- package/dist/core/boundary-rules/date-range.js +1 -1
- package/dist/core/boundary-rules/index.js +7 -7
- package/dist/core/boundary-rules/mutually-exclusive.js +1 -1
- package/dist/core/boundary-rules/no-unknown-fields.js +1 -1
- package/dist/core/boundary-rules/require-all.js +1 -1
- package/dist/core/boundary-rules/require-one.js +1 -1
- package/dist/core/common/fluent.js +6 -6
- package/dist/core/common/index.js +5 -5
- package/dist/core/common/policy.js +1 -1
- package/dist/core/field-path/construct.js +1 -1
- package/dist/core/field-path/format.js +1 -1
- package/dist/core/field-path/index.js +4 -4
- package/dist/core/field-path/walk.js +1 -1
- package/dist/core/fluent-registry.d.ts +53 -0
- package/dist/core/fluent-registry.js +71 -4
- package/dist/core/normalizers/array/compact-sparse-array.js +1 -1
- package/dist/core/normalizers/array/flatten-one-level.js +1 -1
- package/dist/core/normalizers/array/remove-empty-string-items.js +1 -1
- package/dist/core/normalizers/array/remove-null-items.js +1 -1
- package/dist/core/normalizers/array/remove-undefined-items.js +1 -1
- package/dist/core/normalizers/date/invalid-date-to-undefined.js +1 -1
- package/dist/core/normalizers/index.js +18 -18
- package/dist/core/normalizers/normalizer-register.js +1 -1
- package/dist/core/normalizers/number/infinity-to-undefined.js +1 -1
- package/dist/core/normalizers/number/nan-to-undefined.js +1 -1
- package/dist/core/normalizers/number/normalize-negative-zero.js +1 -1
- package/dist/core/normalizers/object/remove-empty-array-keys.js +1 -1
- package/dist/core/normalizers/object/remove-empty-object-keys.js +1 -1
- package/dist/core/normalizers/object/remove-empty-string-keys.js +1 -1
- package/dist/core/normalizers/object/remove-null-keys.js +1 -1
- package/dist/core/normalizers/object/remove-undefined-keys.js +1 -1
- package/dist/core/normalizers/string/collapse-whitespace.js +1 -1
- package/dist/core/normalizers/string/empty-to-undefined.js +1 -1
- package/dist/core/normalizers/string/trim.js +1 -1
- package/dist/core/parsers/index.js +12 -12
- package/dist/core/parsers/parse-array-string.js +1 -1
- package/dist/core/parsers/parse-bigint-string.js +1 -1
- package/dist/core/parsers/parse-binary-string.js +1 -1
- package/dist/core/parsers/parse-boolean-string.js +1 -1
- package/dist/core/parsers/parse-date-string.js +1 -1
- package/dist/core/parsers/parse-duration-string.js +1 -1
- package/dist/core/parsers/parse-hex-string.js +1 -1
- package/dist/core/parsers/parse-integer-string.js +1 -1
- package/dist/core/parsers/parse-json-string.js +1 -1
- package/dist/core/parsers/parse-numeric-string.js +1 -1
- package/dist/core/parsers/parse-object-string.js +1 -1
- package/dist/core/parsers/parse-octal-string.js +1 -1
- package/dist/core/parsers/parse-scientific-notation-string.js +1 -1
- package/dist/core/parsers/parse-url-string.js +1 -1
- package/dist/core/pipeline/boundary.js +2 -2
- package/dist/core/pipeline/contain.js +2 -2
- package/dist/core/pipeline/index.js +7 -7
- package/dist/core/pipeline/normalize.js +4 -4
- package/dist/core/pipeline/parse.js +1 -1
- package/dist/core/pipeline/pipeline.js +9 -9
- package/dist/core/pipeline/scan.js +5 -5
- package/dist/core/pipeline/validate.js +2 -2
- package/dist/core/scanners/any/scan-for-sentinels.js +2 -2
- package/dist/core/scanners/array/array-is-deep.js +1 -1
- package/dist/core/scanners/array/array-is-heterogenous.js +2 -2
- package/dist/core/scanners/array/array-is-large.js +1 -1
- package/dist/core/scanners/bigint/bigint-is-large.js +1 -1
- package/dist/core/scanners/bigint/bigint-not-safe.js +1 -1
- package/dist/core/scanners/date/date-is-before-epoch.js +1 -1
- package/dist/core/scanners/date/date-is-far-future.js +1 -1
- package/dist/core/scanners/date/date-is-invalid.js +1 -1
- package/dist/core/scanners/index.js +21 -21
- package/dist/core/scanners/number/number-is-infinite.js +1 -1
- package/dist/core/scanners/number/number-is-nan.js +1 -1
- package/dist/core/scanners/number/number-is-too-large.js +1 -1
- package/dist/core/scanners/number/number-is-unsafe-integer.js +1 -1
- package/dist/core/scanners/object/object-has-circular-references.js +1 -1
- package/dist/core/scanners/object/object-has-many-keys.js +1 -1
- package/dist/core/scanners/object/object-is-deep.js +2 -2
- package/dist/core/scanners/scanner-registry.js +1 -1
- package/dist/core/scanners/string/string-has-unsafe-unicode.js +1 -1
- package/dist/core/scanners/string/string-has-whitespace-edges.js +1 -1
- package/dist/core/scanners/string/string-is-long.js +1 -1
- package/dist/core/scanners/unknown/unknown-not-scannable.js +2 -2
- package/dist/core/validators/array/array-max-items.js +2 -2
- package/dist/core/validators/array/array-min-items.js +2 -2
- package/dist/core/validators/array/array.js +2 -2
- package/dist/core/validators/array/excludes.js +3 -3
- package/dist/core/validators/array/has-unique-items.js +2 -2
- package/dist/core/validators/array/includes.js +3 -3
- package/dist/core/validators/array/items-equal.js +2 -2
- package/dist/core/validators/array/no-empty-string-items.js +2 -2
- package/dist/core/validators/array/no-null-items.js +2 -2
- package/dist/core/validators/array/no-undefined-items.js +2 -2
- package/dist/core/validators/array/non-empty-array.js +2 -2
- package/dist/core/validators/array/not-sparse.js +2 -2
- package/dist/core/validators/bigint/bigint-equals.js +3 -3
- package/dist/core/validators/bigint/bigint-max.js +3 -3
- package/dist/core/validators/bigint/bigint-min.js +3 -3
- package/dist/core/validators/bigint/bigint-negative.js +3 -3
- package/dist/core/validators/bigint/bigint-non-negative.js +3 -3
- package/dist/core/validators/bigint/bigint-non-positive.js +3 -3
- package/dist/core/validators/bigint/bigint-positive.js +3 -3
- package/dist/core/validators/bigint/bigint-safe.js +3 -3
- package/dist/core/validators/bigint/bigint.js +2 -2
- package/dist/core/validators/boolean/boolean.js +2 -2
- package/dist/core/validators/boolean/is-false.js +2 -2
- package/dist/core/validators/boolean/is-true.js +2 -2
- package/dist/core/validators/common/is-country-code.js +3 -3
- package/dist/core/validators/common/is-currency-code.js +3 -3
- package/dist/core/validators/common/is-email-strict.js +3 -3
- package/dist/core/validators/common/is-email.js +3 -3
- package/dist/core/validators/common/is-ip.js +3 -3
- package/dist/core/validators/common/is-phone-strict.js +3 -3
- package/dist/core/validators/common/is-phone.js +3 -3
- package/dist/core/validators/common/is-port.js +2 -2
- package/dist/core/validators/common/is-postal-code.js +3 -3
- package/dist/core/validators/common/is-url.js +3 -3
- package/dist/core/validators/common/is-uuid.js +3 -3
- package/dist/core/validators/date/before-epoch.js +3 -3
- package/dist/core/validators/date/date-now-required.js +3 -3
- package/dist/core/validators/date/is-date.js +2 -2
- package/dist/core/validators/date/is-far-future.js +3 -3
- package/dist/core/validators/date/is-future.js +3 -3
- package/dist/core/validators/date/is-past.js +3 -3
- package/dist/core/validators/date/not-after.js +3 -3
- package/dist/core/validators/date/not-before.js +3 -3
- package/dist/core/validators/date/same-day.js +3 -3
- package/dist/core/validators/date/same-month.js +3 -3
- package/dist/core/validators/date/same-year.js +3 -3
- package/dist/core/validators/date/too-early.js +3 -3
- package/dist/core/validators/date/too-late.js +3 -3
- package/dist/core/validators/date/weekday.js +3 -3
- package/dist/core/validators/date/weekend.js +3 -3
- package/dist/core/validators/index.js +99 -99
- package/dist/core/validators/nullish/is-null-or-undefined.js +2 -2
- package/dist/core/validators/nullish/is-null.js +2 -2
- package/dist/core/validators/nullish/is-undefined.js +2 -2
- package/dist/core/validators/number/finite.js +3 -3
- package/dist/core/validators/number/integer.js +3 -3
- package/dist/core/validators/number/less-than.js +3 -3
- package/dist/core/validators/number/max.js +3 -3
- package/dist/core/validators/number/min.js +3 -3
- package/dist/core/validators/number/more-than.js +3 -3
- package/dist/core/validators/number/negative.js +3 -3
- package/dist/core/validators/number/non-negative.js +3 -3
- package/dist/core/validators/number/non-positive.js +3 -3
- package/dist/core/validators/number/number.js +2 -2
- package/dist/core/validators/number/positive.js +3 -3
- package/dist/core/validators/number/safe-integer.js +3 -3
- package/dist/core/validators/object/deep-equals.js +3 -3
- package/dist/core/validators/object/has-key.js +3 -3
- package/dist/core/validators/object/has-value.js +3 -3
- package/dist/core/validators/object/keys-equal.js +3 -3
- package/dist/core/validators/object/max-keys.js +3 -3
- package/dist/core/validators/object/min-keys.js +3 -3
- package/dist/core/validators/object/missing-key.js +3 -3
- package/dist/core/validators/object/no-empty-array-values.js +3 -3
- package/dist/core/validators/object/no-empty-object-values.js +3 -3
- package/dist/core/validators/object/no-null-values.js +3 -3
- package/dist/core/validators/object/no-undefined-values.js +3 -3
- package/dist/core/validators/object/non-empty-object.js +3 -3
- package/dist/core/validators/object/only-keys.js +3 -3
- package/dist/core/validators/object/plain-object.js +3 -3
- package/dist/core/validators/string/alpha-num.js +3 -3
- package/dist/core/validators/string/alpha.js +3 -3
- package/dist/core/validators/string/chars-equal.js +2 -2
- package/dist/core/validators/string/ends-with.js +3 -3
- package/dist/core/validators/string/is-ascii.js +3 -3
- package/dist/core/validators/string/is-printable.js +3 -3
- package/dist/core/validators/string/matches.js +3 -3
- package/dist/core/validators/string/max-length.js +2 -2
- package/dist/core/validators/string/min-length.js +2 -2
- package/dist/core/validators/string/no-lead-space.js +3 -3
- package/dist/core/validators/string/no-repeat-space.js +3 -3
- package/dist/core/validators/string/no-space.js +3 -3
- package/dist/core/validators/string/no-trail-space.js +3 -3
- package/dist/core/validators/string/non-empty.js +2 -2
- package/dist/core/validators/string/not-one-of.js +3 -3
- package/dist/core/validators/string/num-string.js +3 -3
- package/dist/core/validators/string/one-of.js +3 -3
- package/dist/core/validators/string/starts-with.js +3 -3
- package/dist/core/validators/string/string.js +2 -2
- package/dist/core/validators/string/trimmed.js +3 -3
- package/dist/index.d.ts +19 -0
- package/dist/index.js +22 -0
- package/package.json +4 -4
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { validationEvent } from '../../pipeline
|
|
12
|
-
import { detectStructuralType } from '../../pipeline/scan
|
|
13
|
-
import { safeStringify } from '../../common
|
|
11
|
+
import { validationEvent } from '../../pipeline';
|
|
12
|
+
import { detectStructuralType } from '../../pipeline/scan';
|
|
13
|
+
import { safeStringify } from '../../common';
|
|
14
14
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
15
15
|
|* Implementation *|
|
|
16
16
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { validationEvent } from '../../pipeline
|
|
12
|
-
import { detectStructuralType } from '../../pipeline/scan
|
|
13
|
-
import { safeStringify } from '../../common
|
|
11
|
+
import { validationEvent } from '../../pipeline';
|
|
12
|
+
import { detectStructuralType } from '../../pipeline/scan';
|
|
13
|
+
import { safeStringify } from '../../common';
|
|
14
14
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
15
15
|
|* Implementation *|
|
|
16
16
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @see https://jane-io.com
|
|
8
8
|
* ----------------------------------------------------------------------------
|
|
9
9
|
*/
|
|
10
|
-
import { validationEvent } from '../../pipeline
|
|
11
|
-
import { detectStructuralType } from '../../pipeline/scan
|
|
10
|
+
import { validationEvent } from '../../pipeline';
|
|
11
|
+
import { detectStructuralType } from '../../pipeline/scan';
|
|
12
12
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
13
13
|
|* Implementation *|
|
|
14
14
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
-
import { validationEvent } from '../../pipeline
|
|
12
|
-
import { safeStringify } from '../../common
|
|
13
|
-
import { detectStructuralType } from '../../pipeline/scan
|
|
11
|
+
import { validationEvent } from '../../pipeline';
|
|
12
|
+
import { safeStringify } from '../../common';
|
|
13
|
+
import { detectStructuralType } from '../../pipeline/scan';
|
|
14
14
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
15
15
|
|* Implementation *|
|
|
16
16
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
* @see https://jane-io.com
|
|
9
9
|
* ----------------------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
+
import { janeRegistry } from './core/fluent-registry.js';
|
|
12
|
+
export * from './core/validators/index.js';
|
|
13
|
+
export * from './core/parsers/index.js';
|
|
14
|
+
export * from './core/normalizers/index.js';
|
|
15
|
+
export * from './core/scanners/index.js';
|
|
16
|
+
export * from './core/boundary-rules/index.js';
|
|
17
|
+
export * from './core/analysis/index.js';
|
|
18
|
+
export * from './core/common/index.js';
|
|
19
|
+
export * from './core/pipeline/index.js';
|
|
11
20
|
/**
|
|
12
21
|
* The default Jane instance configured with the library’s built‑in policy.
|
|
13
22
|
*
|
|
@@ -81,3 +90,13 @@ export declare const jane: {
|
|
|
81
90
|
};
|
|
82
91
|
}>;
|
|
83
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Central registry of all built‑in Jane validators, parsers, normalizers,
|
|
95
|
+
* scanners, and policies.
|
|
96
|
+
*
|
|
97
|
+
* This object provides a single, authoritative lookup table for every
|
|
98
|
+
* first‑party rule Jane ships with. Access individual components through
|
|
99
|
+
* the organized namespaces: validators, parsers, normalizers, scanners,
|
|
100
|
+
* policies, and registries.
|
|
101
|
+
*/
|
|
102
|
+
export { janeRegistry };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
14
14
|
import { createJane } from './core/common/index.js';
|
|
15
15
|
import { defaultPolicy } from './core/common/policy.js';
|
|
16
|
+
import { janeRegistry } from './core/fluent-registry.js';
|
|
17
|
+
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
18
|
+
|* Core Modules *|
|
|
19
|
+
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
20
|
+
export * from './core/validators/index.js';
|
|
21
|
+
export * from './core/parsers/index.js';
|
|
22
|
+
export * from './core/normalizers/index.js';
|
|
23
|
+
export * from './core/scanners/index.js';
|
|
24
|
+
export * from './core/boundary-rules/index.js';
|
|
25
|
+
export * from './core/analysis/index.js';
|
|
26
|
+
export * from './core/common/index.js';
|
|
27
|
+
export * from './core/pipeline/index.js';
|
|
16
28
|
/* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
|
|
17
29
|
|* Jane *|
|
|
18
30
|
\* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
|
|
@@ -24,3 +36,13 @@ import { defaultPolicy } from './core/common/policy.js';
|
|
|
24
36
|
* policy configuration.
|
|
25
37
|
*/
|
|
26
38
|
export const jane = createJane(defaultPolicy);
|
|
39
|
+
/**
|
|
40
|
+
* Central registry of all built‑in Jane validators, parsers, normalizers,
|
|
41
|
+
* scanners, and policies.
|
|
42
|
+
*
|
|
43
|
+
* This object provides a single, authoritative lookup table for every
|
|
44
|
+
* first‑party rule Jane ships with. Access individual components through
|
|
45
|
+
* the organized namespaces: validators, parsers, normalizers, scanners,
|
|
46
|
+
* policies, and registries.
|
|
47
|
+
*/
|
|
48
|
+
export { janeRegistry };
|
package/package.json
CHANGED
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"test": "vitest",
|
|
42
42
|
"test:ci": "vitest --coverage",
|
|
43
43
|
"docs": "mkdocs serve",
|
|
44
|
-
"build": "tsc -p tsconfig.json
|
|
45
|
-
"postbuild": "node fix-imports.cjs",
|
|
44
|
+
"build": "tsc -p tsconfig.json",
|
|
46
45
|
"release": "semantic-release"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
@@ -107,7 +106,8 @@
|
|
|
107
106
|
},
|
|
108
107
|
"publishConfig": {
|
|
109
108
|
"access": "public",
|
|
110
|
-
"registry": "https://registry.npmjs.org/"
|
|
109
|
+
"registry": "https://registry.npmjs.org/",
|
|
110
|
+
"ignoreScripts": true
|
|
111
111
|
},
|
|
112
|
-
"version": "1.0.
|
|
112
|
+
"version": "1.0.7"
|
|
113
113
|
}
|