@hyperjump/json-schema 0.23.1 → 0.23.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/dist/json-schema-amd.js +495 -762
- package/dist/json-schema-amd.js.map +1 -1
- package/dist/json-schema-amd.min.js +1 -1
- package/dist/json-schema-amd.min.js.map +1 -1
- package/dist/json-schema-cjs.js +495 -762
- package/dist/json-schema-cjs.js.map +1 -1
- package/dist/json-schema-cjs.min.js +1 -1
- package/dist/json-schema-cjs.min.js.map +1 -1
- package/dist/json-schema-esm.js +495 -762
- package/dist/json-schema-esm.js.map +1 -1
- package/dist/json-schema-esm.min.js +1 -1
- package/dist/json-schema-esm.min.js.map +1 -1
- package/dist/json-schema-iife.js +495 -762
- package/dist/json-schema-iife.js.map +1 -1
- package/dist/json-schema-iife.min.js +1 -1
- package/dist/json-schema-iife.min.js.map +1 -1
- package/dist/json-schema-system.js +495 -762
- package/dist/json-schema-system.js.map +1 -1
- package/dist/json-schema-system.min.js +1 -1
- package/dist/json-schema-system.min.js.map +1 -1
- package/dist/json-schema-umd.js +495 -762
- package/dist/json-schema-umd.js.map +1 -1
- package/dist/json-schema-umd.min.js +1 -1
- package/dist/json-schema-umd.min.js.map +1 -1
- package/lib/common.d.ts +1 -0
- package/lib/draft-04.d.ts +3 -2
- package/lib/draft-06.d.ts +3 -2
- package/lib/draft-06.js +2 -2
- package/lib/draft-07.d.ts +3 -2
- package/lib/draft-07.js +2 -2
- package/lib/draft-2019-09.d.ts +3 -2
- package/lib/draft-2019-09.js +2 -2
- package/lib/draft-2020-12.d.ts +3 -2
- package/lib/draft-2020-12.js +2 -2
- package/lib/keywords/index.js +0 -2
- package/lib/keywords/maxLength.js +1 -1
- package/lib/keywords/minLength.js +1 -1
- package/package.json +1 -1
- package/lib/keywords/maxLength6.js +0 -7
- package/lib/keywords/minLength6.js +0 -7
|
@@ -5,7 +5,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
8
|
-
var justCurryIt$
|
|
8
|
+
var justCurryIt$1 = curry$b;
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
function add(a, b, c) {
|
|
@@ -30,7 +30,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
30
30
|
milesToKm(10); // 16.2
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
function curry$
|
|
33
|
+
function curry$b(fn, arity) {
|
|
34
34
|
return function curried() {
|
|
35
35
|
if (arity == null) {
|
|
36
36
|
arity = fn.length;
|
|
@@ -1901,84 +1901,91 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
1901
1901
|
|
|
1902
1902
|
var common$1 = { jsonTypeOf: jsonTypeOf$2, resolveUrl: resolveUrl$3, urlFragment: urlFragment$1, pathRelative: pathRelative$1 };
|
|
1903
1903
|
|
|
1904
|
-
const curry$
|
|
1904
|
+
const curry$a = justCurryIt$1;
|
|
1905
1905
|
|
|
1906
1906
|
|
|
1907
|
-
const nil$
|
|
1907
|
+
const nil$2 = "";
|
|
1908
1908
|
|
|
1909
|
-
const compile$
|
|
1909
|
+
const compile$N = (pointer) => {
|
|
1910
1910
|
if (pointer.length > 0 && pointer[0] !== "/") {
|
|
1911
1911
|
throw Error("Invalid JSON Pointer");
|
|
1912
1912
|
}
|
|
1913
1913
|
|
|
1914
|
-
return pointer.split("/").slice(1).map(unescape
|
|
1914
|
+
return pointer.split("/").slice(1).map(unescape);
|
|
1915
1915
|
};
|
|
1916
1916
|
|
|
1917
|
-
const get$
|
|
1918
|
-
const ptr = compile$
|
|
1917
|
+
const get$2 = (pointer, value = undefined) => {
|
|
1918
|
+
const ptr = compile$N(pointer);
|
|
1919
1919
|
|
|
1920
1920
|
const fn = (value) => ptr.reduce(([value, pointer], segment) => {
|
|
1921
|
-
return [applySegment
|
|
1921
|
+
return [applySegment(value, segment, pointer), append(segment, pointer)];
|
|
1922
1922
|
}, [value, ""])[0];
|
|
1923
1923
|
|
|
1924
1924
|
return value === undefined ? fn : fn(value);
|
|
1925
1925
|
};
|
|
1926
1926
|
|
|
1927
|
-
const set
|
|
1928
|
-
const ptr = compile$
|
|
1929
|
-
const fn = curry$
|
|
1927
|
+
const set = (pointer, subject = undefined, value = undefined) => {
|
|
1928
|
+
const ptr = compile$N(pointer);
|
|
1929
|
+
const fn = curry$a((subject, value) => _set(ptr, subject, value, nil$2));
|
|
1930
1930
|
return subject === undefined ? fn : fn(subject, value);
|
|
1931
1931
|
};
|
|
1932
1932
|
|
|
1933
|
-
const _set
|
|
1933
|
+
const _set = (pointer, subject, value, cursor) => {
|
|
1934
1934
|
if (pointer.length === 0) {
|
|
1935
1935
|
return value;
|
|
1936
1936
|
} else if (pointer.length > 1) {
|
|
1937
|
-
|
|
1938
|
-
|
|
1937
|
+
if (Array.isArray(subject)) {
|
|
1938
|
+
const index = pointer.shift();
|
|
1939
|
+
const clonedSubject = [...subject];
|
|
1940
|
+
clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
|
|
1941
|
+
return clonedSubject;
|
|
1942
|
+
} else {
|
|
1943
|
+
const segment = pointer.shift();
|
|
1944
|
+
return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
|
|
1945
|
+
}
|
|
1939
1946
|
} else if (Array.isArray(subject)) {
|
|
1940
1947
|
const clonedSubject = [...subject];
|
|
1941
|
-
const segment = computeSegment
|
|
1948
|
+
const segment = computeSegment(subject, pointer[0]);
|
|
1942
1949
|
clonedSubject[segment] = value;
|
|
1943
1950
|
return clonedSubject;
|
|
1944
1951
|
} else if (typeof subject === "object" && subject !== null) {
|
|
1945
1952
|
return { ...subject, [pointer[0]]: value };
|
|
1946
1953
|
} else {
|
|
1947
|
-
return applySegment
|
|
1954
|
+
return applySegment(subject, pointer[0], cursor);
|
|
1948
1955
|
}
|
|
1949
1956
|
};
|
|
1950
1957
|
|
|
1951
|
-
const assign
|
|
1952
|
-
const ptr = compile$
|
|
1953
|
-
const fn = curry$
|
|
1958
|
+
const assign = (pointer, subject = undefined, value = undefined) => {
|
|
1959
|
+
const ptr = compile$N(pointer);
|
|
1960
|
+
const fn = curry$a((subject, value) => _assign(ptr, subject, value, nil$2));
|
|
1954
1961
|
return subject === undefined ? fn : fn(subject, value);
|
|
1955
1962
|
};
|
|
1956
1963
|
|
|
1957
|
-
const _assign
|
|
1964
|
+
const _assign = (pointer, subject, value, cursor) => {
|
|
1958
1965
|
if (pointer.length === 0) {
|
|
1959
1966
|
return;
|
|
1960
|
-
} else if (pointer.length === 1 && !isScalar
|
|
1961
|
-
const segment = computeSegment
|
|
1967
|
+
} else if (pointer.length === 1 && !isScalar(subject)) {
|
|
1968
|
+
const segment = computeSegment(subject, pointer[0]);
|
|
1962
1969
|
subject[segment] = value;
|
|
1963
1970
|
} else {
|
|
1964
1971
|
const segment = pointer.shift();
|
|
1965
|
-
_assign
|
|
1972
|
+
_assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
|
|
1966
1973
|
}
|
|
1967
1974
|
};
|
|
1968
1975
|
|
|
1969
|
-
const unset
|
|
1970
|
-
const ptr = compile$
|
|
1971
|
-
const fn = (subject) => _unset
|
|
1976
|
+
const unset = (pointer, subject = undefined) => {
|
|
1977
|
+
const ptr = compile$N(pointer);
|
|
1978
|
+
const fn = (subject) => _unset(ptr, subject, nil$2);
|
|
1972
1979
|
return subject === undefined ? fn : fn(subject);
|
|
1973
1980
|
};
|
|
1974
1981
|
|
|
1975
|
-
const _unset
|
|
1982
|
+
const _unset = (pointer, subject, cursor) => {
|
|
1976
1983
|
if (pointer.length == 0) {
|
|
1977
1984
|
return undefined;
|
|
1978
1985
|
} else if (pointer.length > 1) {
|
|
1979
1986
|
const segment = pointer.shift();
|
|
1980
|
-
const value = applySegment
|
|
1981
|
-
return { ...subject, [segment]: _unset
|
|
1987
|
+
const value = applySegment(subject, segment, cursor);
|
|
1988
|
+
return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
|
|
1982
1989
|
} else if (Array.isArray(subject)) {
|
|
1983
1990
|
return subject.filter((_, ndx) => ndx != pointer[0]);
|
|
1984
1991
|
} else if (typeof subject === "object" && subject !== null) {
|
|
@@ -1986,54 +1993,54 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
1986
1993
|
const { [pointer[0]]: _, ...result } = subject;
|
|
1987
1994
|
return result;
|
|
1988
1995
|
} else {
|
|
1989
|
-
return applySegment
|
|
1996
|
+
return applySegment(subject, pointer[0], cursor);
|
|
1990
1997
|
}
|
|
1991
1998
|
};
|
|
1992
1999
|
|
|
1993
|
-
const remove
|
|
1994
|
-
const ptr = compile$
|
|
1995
|
-
const fn = (subject) => _remove
|
|
2000
|
+
const remove = (pointer, subject = undefined) => {
|
|
2001
|
+
const ptr = compile$N(pointer);
|
|
2002
|
+
const fn = (subject) => _remove(ptr, subject, nil$2);
|
|
1996
2003
|
return subject === undefined ? fn : fn(subject);
|
|
1997
2004
|
};
|
|
1998
2005
|
|
|
1999
|
-
const _remove
|
|
2006
|
+
const _remove = (pointer, subject, cursor) => {
|
|
2000
2007
|
if (pointer.length === 0) {
|
|
2001
2008
|
return;
|
|
2002
2009
|
} else if (pointer.length > 1) {
|
|
2003
2010
|
const segment = pointer.shift();
|
|
2004
|
-
const value = applySegment
|
|
2005
|
-
_remove
|
|
2011
|
+
const value = applySegment(subject, segment, cursor);
|
|
2012
|
+
_remove(pointer, value, append(segment, cursor));
|
|
2006
2013
|
} else if (Array.isArray(subject)) {
|
|
2007
2014
|
subject.splice(pointer[0], 1);
|
|
2008
2015
|
} else if (typeof subject === "object" && subject !== null) {
|
|
2009
2016
|
delete subject[pointer[0]];
|
|
2010
2017
|
} else {
|
|
2011
|
-
applySegment
|
|
2018
|
+
applySegment(subject, pointer[0], cursor);
|
|
2012
2019
|
}
|
|
2013
2020
|
};
|
|
2014
2021
|
|
|
2015
|
-
const append
|
|
2022
|
+
const append = curry$a((segment, pointer) => pointer + "/" + escape$1(segment));
|
|
2016
2023
|
|
|
2017
|
-
const escape$
|
|
2018
|
-
const unescape
|
|
2019
|
-
const computeSegment
|
|
2024
|
+
const escape$1 = (segment) => segment.toString().replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2025
|
+
const unescape = (segment) => segment.toString().replace(/~1/g, "/").replace(/~0/g, "~");
|
|
2026
|
+
const computeSegment = (value, segment) => Array.isArray(value) && segment === "-" ? value.length : segment;
|
|
2020
2027
|
|
|
2021
|
-
const applySegment
|
|
2028
|
+
const applySegment = (value, segment, cursor = "") => {
|
|
2022
2029
|
if (value === undefined) {
|
|
2023
2030
|
throw TypeError(`Value at '${cursor}' is undefined and does not have property '${segment}'`);
|
|
2024
2031
|
} else if (value === null) {
|
|
2025
2032
|
throw TypeError(`Value at '${cursor}' is null and does not have property '${segment}'`);
|
|
2026
|
-
} else if (isScalar
|
|
2033
|
+
} else if (isScalar(value)) {
|
|
2027
2034
|
throw TypeError(`Value at '${cursor}' is a ${typeof value} and does not have property '${segment}'`);
|
|
2028
2035
|
} else {
|
|
2029
|
-
const computedSegment = computeSegment
|
|
2036
|
+
const computedSegment = computeSegment(value, segment);
|
|
2030
2037
|
return value[computedSegment];
|
|
2031
2038
|
}
|
|
2032
2039
|
};
|
|
2033
2040
|
|
|
2034
|
-
const isScalar
|
|
2041
|
+
const isScalar = (value) => value === null || typeof value !== "object";
|
|
2035
2042
|
|
|
2036
|
-
var lib$
|
|
2043
|
+
var lib$4 = { nil: nil$2, append, get: get$2, set, assign, unset, remove };
|
|
2037
2044
|
|
|
2038
2045
|
const $__value = Symbol("$__value");
|
|
2039
2046
|
const $__href = Symbol("$__href");
|
|
@@ -2049,16 +2056,16 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
2049
2056
|
|
|
2050
2057
|
var reference = { cons: cons$1, isReference, href, value: value$2 };
|
|
2051
2058
|
|
|
2052
|
-
const JsonPointer$3 = lib$
|
|
2053
|
-
const curry$
|
|
2059
|
+
const JsonPointer$3 = lib$4;
|
|
2060
|
+
const curry$9 = justCurryIt$1;
|
|
2054
2061
|
const { resolveUrl: resolveUrl$2, jsonTypeOf: jsonTypeOf$1 } = common$1;
|
|
2055
2062
|
const Reference$2 = reference;
|
|
2056
2063
|
|
|
2057
2064
|
|
|
2058
|
-
const nil$
|
|
2059
|
-
const cons = (instance, id = "") => Object.freeze({ ...nil$
|
|
2065
|
+
const nil$1 = Object.freeze({ id: "", pointer: "", instance: undefined, value: undefined });
|
|
2066
|
+
const cons = (instance, id = "") => Object.freeze({ ...nil$1, id: resolveUrl$2(id, ""), instance, value: instance });
|
|
2060
2067
|
|
|
2061
|
-
const get$
|
|
2068
|
+
const get$1 = (url, instance = nil$1) => {
|
|
2062
2069
|
if (!url.startsWith("#")) {
|
|
2063
2070
|
throw Error(`No JSON document found at '${url.split("#")[0]}'`);
|
|
2064
2071
|
}
|
|
@@ -2069,7 +2076,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
2069
2076
|
const uri$1 = (doc) => `${doc.id}#${encodeURI(doc.pointer)}`;
|
|
2070
2077
|
const value$1 = (doc) => Reference$2.isReference(doc.value) ? Reference$2.value(doc.value) : doc.value;
|
|
2071
2078
|
const has$1 = (key, doc) => key in value$1(doc);
|
|
2072
|
-
const typeOf$1 = curry$
|
|
2079
|
+
const typeOf$1 = curry$9((doc, type) => jsonTypeOf$1(value$1(doc), type));
|
|
2073
2080
|
|
|
2074
2081
|
const step$1 = (key, doc) => Object.freeze({
|
|
2075
2082
|
...doc,
|
|
@@ -2077,118 +2084,40 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
2077
2084
|
value: value$1(doc)[key]
|
|
2078
2085
|
});
|
|
2079
2086
|
|
|
2080
|
-
const entries$
|
|
2087
|
+
const entries$3 = (doc) => Object.keys(value$1(doc))
|
|
2081
2088
|
.map((key) => [key, step$1(key, doc)]);
|
|
2082
2089
|
|
|
2083
2090
|
const keys$1 = (doc) => Object.keys(value$1(doc));
|
|
2084
2091
|
|
|
2085
|
-
const map$
|
|
2092
|
+
const map$4 = curry$9((fn, doc) => value$1(doc)
|
|
2086
2093
|
.map((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2087
2094
|
|
|
2088
|
-
const forEach = curry$
|
|
2095
|
+
const forEach = curry$9((fn, doc) => value$1(doc)
|
|
2089
2096
|
.forEach((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2090
2097
|
|
|
2091
|
-
const filter$
|
|
2098
|
+
const filter$1 = curry$9((fn, doc) => value$1(doc)
|
|
2092
2099
|
.map((item, ndx, array, thisArg) => step$1(ndx, doc))
|
|
2093
2100
|
.filter((item, ndx, array, thisArg) => fn(item, ndx, array, thisArg)));
|
|
2094
2101
|
|
|
2095
|
-
const reduce$
|
|
2102
|
+
const reduce$3 = curry$9((fn, acc, doc) => value$1(doc)
|
|
2096
2103
|
.reduce((acc, item, ndx) => fn(acc, step$1(ndx, doc), ndx), acc));
|
|
2097
2104
|
|
|
2098
|
-
const every$
|
|
2105
|
+
const every$1 = curry$9((fn, doc) => value$1(doc)
|
|
2099
2106
|
.every((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2100
2107
|
|
|
2101
|
-
const some$
|
|
2108
|
+
const some$1 = curry$9((fn, doc) => value$1(doc)
|
|
2102
2109
|
.some((item, ndx, array, thisArg) => fn(step$1(ndx, doc), ndx, array, thisArg)));
|
|
2103
2110
|
|
|
2104
2111
|
const length$1 = (doc) => value$1(doc).length;
|
|
2105
2112
|
|
|
2106
2113
|
var instance = {
|
|
2107
|
-
nil: nil$
|
|
2108
|
-
step: step$1, entries: entries$
|
|
2114
|
+
nil: nil$1, cons, get: get$1, uri: uri$1, value: value$1, has: has$1, typeOf: typeOf$1, length: length$1,
|
|
2115
|
+
step: step$1, entries: entries$3, keys: keys$1, map: map$4, forEach, filter: filter$1, reduce: reduce$3, every: every$1, some: some$1
|
|
2109
2116
|
};
|
|
2110
2117
|
|
|
2111
|
-
var entries$
|
|
2112
|
-
|
|
2113
|
-
const curry$g = justCurryIt$2;
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
var map$6 = curry$g(async (fn, doc) => (await doc).map(fn));
|
|
2118
|
+
var entries$2 = async (doc) => Object.entries(await doc);
|
|
2117
2119
|
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
var reduce$5 = curry$f(async (fn, acc, doc) => {
|
|
2122
|
-
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
|
|
2123
|
-
});
|
|
2124
|
-
|
|
2125
|
-
const curry$e = justCurryIt$2;
|
|
2126
|
-
const reduce$4 = reduce$5;
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
var filter$1 = curry$e(async (fn, doc, options = {}) => {
|
|
2130
|
-
return reduce$4(async (acc, item) => {
|
|
2131
|
-
return (await fn(item)) ? acc.concat([item]) : acc;
|
|
2132
|
-
}, [], doc, options);
|
|
2133
|
-
});
|
|
2134
|
-
|
|
2135
|
-
const curry$d = justCurryIt$2;
|
|
2136
|
-
const map$5 = map$6;
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
var some$1 = curry$d(async (fn, doc) => {
|
|
2140
|
-
const results = await map$5(fn, doc);
|
|
2141
|
-
return (await Promise.all(results))
|
|
2142
|
-
.some((a) => a);
|
|
2143
|
-
});
|
|
2144
|
-
|
|
2145
|
-
const curry$c = justCurryIt$2;
|
|
2146
|
-
const map$4 = map$6;
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
var every$1 = curry$c(async (fn, doc) => {
|
|
2150
|
-
const results = await map$4(fn, doc);
|
|
2151
|
-
return (await Promise.all(results))
|
|
2152
|
-
.every((a) => a);
|
|
2153
|
-
});
|
|
2154
|
-
|
|
2155
|
-
const curry$b = justCurryIt$2;
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
var pipeline$3 = curry$b((fns, doc) => {
|
|
2159
|
-
return fns.reduce(async (acc, fn) => fn(await acc), doc);
|
|
2160
|
-
});
|
|
2161
|
-
|
|
2162
|
-
var all$1 = (doc) => Promise.all(doc);
|
|
2163
|
-
|
|
2164
|
-
const pipeline$2 = pipeline$3;
|
|
2165
|
-
const entries$3 = entries$4;
|
|
2166
|
-
const reduce$3 = reduce$5;
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
var allValues$1 = (doc) => {
|
|
2170
|
-
return pipeline$2([
|
|
2171
|
-
entries$3,
|
|
2172
|
-
reduce$3(async (acc, [propertyName, propertyValue]) => {
|
|
2173
|
-
acc[propertyName] = await propertyValue;
|
|
2174
|
-
return acc;
|
|
2175
|
-
}, {})
|
|
2176
|
-
], doc);
|
|
2177
|
-
};
|
|
2178
|
-
|
|
2179
|
-
var lib$5 = {
|
|
2180
|
-
entries: entries$4,
|
|
2181
|
-
map: map$6,
|
|
2182
|
-
filter: filter$1,
|
|
2183
|
-
reduce: reduce$5,
|
|
2184
|
-
some: some$1,
|
|
2185
|
-
every: every$1,
|
|
2186
|
-
pipeline: pipeline$3,
|
|
2187
|
-
all: all$1,
|
|
2188
|
-
allValues: allValues$1
|
|
2189
|
-
};
|
|
2190
|
-
|
|
2191
|
-
var justCurryIt$1 = curry$a;
|
|
2120
|
+
var justCurryIt = curry$8;
|
|
2192
2121
|
|
|
2193
2122
|
/*
|
|
2194
2123
|
function add(a, b, c) {
|
|
@@ -2213,7 +2142,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
2213
2142
|
milesToKm(10); // 16.2
|
|
2214
2143
|
*/
|
|
2215
2144
|
|
|
2216
|
-
function curry$
|
|
2145
|
+
function curry$8(fn, arity) {
|
|
2217
2146
|
return function curried() {
|
|
2218
2147
|
if (arity == null) {
|
|
2219
2148
|
arity = fn.length;
|
|
@@ -2229,146 +2158,83 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
2229
2158
|
};
|
|
2230
2159
|
}
|
|
2231
2160
|
|
|
2232
|
-
const curry$
|
|
2161
|
+
const curry$7 = justCurryIt;
|
|
2233
2162
|
|
|
2234
2163
|
|
|
2235
|
-
|
|
2164
|
+
var map$3 = curry$7(async (fn, doc) => (await doc).map(fn));
|
|
2236
2165
|
|
|
2237
|
-
const
|
|
2238
|
-
if (pointer.length > 0 && pointer[0] !== "/") {
|
|
2239
|
-
throw Error("Invalid JSON Pointer");
|
|
2240
|
-
}
|
|
2166
|
+
const curry$6 = justCurryIt;
|
|
2241
2167
|
|
|
2242
|
-
return pointer.split("/").slice(1).map(unescape);
|
|
2243
|
-
};
|
|
2244
2168
|
|
|
2245
|
-
|
|
2246
|
-
|
|
2169
|
+
var reduce$2 = curry$6(async (fn, acc, doc) => {
|
|
2170
|
+
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
|
|
2171
|
+
});
|
|
2247
2172
|
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
}, [value, ""])[0];
|
|
2173
|
+
const curry$5 = justCurryIt;
|
|
2174
|
+
const reduce$1 = reduce$2;
|
|
2251
2175
|
|
|
2252
|
-
return value === undefined ? fn : fn(value);
|
|
2253
|
-
};
|
|
2254
2176
|
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
};
|
|
2177
|
+
var filter = curry$5(async (fn, doc, options = {}) => {
|
|
2178
|
+
return reduce$1(async (acc, item) => {
|
|
2179
|
+
return (await fn(item)) ? acc.concat([item]) : acc;
|
|
2180
|
+
}, [], doc, options);
|
|
2181
|
+
});
|
|
2260
2182
|
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2263
|
-
return value;
|
|
2264
|
-
} else if (pointer.length > 1) {
|
|
2265
|
-
if (Array.isArray(subject)) {
|
|
2266
|
-
const index = pointer.shift();
|
|
2267
|
-
const clonedSubject = [...subject];
|
|
2268
|
-
clonedSubject[index] = _set(pointer, applySegment(subject, index, cursor), value, append(index, cursor));
|
|
2269
|
-
return clonedSubject;
|
|
2270
|
-
} else {
|
|
2271
|
-
const segment = pointer.shift();
|
|
2272
|
-
return { ...subject, [segment]: _set(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor)) };
|
|
2273
|
-
}
|
|
2274
|
-
} else if (Array.isArray(subject)) {
|
|
2275
|
-
const clonedSubject = [...subject];
|
|
2276
|
-
const segment = computeSegment(subject, pointer[0]);
|
|
2277
|
-
clonedSubject[segment] = value;
|
|
2278
|
-
return clonedSubject;
|
|
2279
|
-
} else if (typeof subject === "object" && subject !== null) {
|
|
2280
|
-
return { ...subject, [pointer[0]]: value };
|
|
2281
|
-
} else {
|
|
2282
|
-
return applySegment(subject, pointer[0], cursor);
|
|
2283
|
-
}
|
|
2284
|
-
};
|
|
2183
|
+
const curry$4 = justCurryIt;
|
|
2184
|
+
const map$2 = map$3;
|
|
2285
2185
|
|
|
2286
|
-
const assign = (pointer, subject = undefined, value = undefined) => {
|
|
2287
|
-
const ptr = compile$P(pointer);
|
|
2288
|
-
const fn = curry$9((subject, value) => _assign(ptr, subject, value, nil$1));
|
|
2289
|
-
return subject === undefined ? fn : fn(subject, value);
|
|
2290
|
-
};
|
|
2291
2186
|
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
subject[segment] = value;
|
|
2298
|
-
} else {
|
|
2299
|
-
const segment = pointer.shift();
|
|
2300
|
-
_assign(pointer, applySegment(subject, segment, cursor), value, append(segment, cursor));
|
|
2301
|
-
}
|
|
2302
|
-
};
|
|
2187
|
+
var some = curry$4(async (fn, doc) => {
|
|
2188
|
+
const results = await map$2(fn, doc);
|
|
2189
|
+
return (await Promise.all(results))
|
|
2190
|
+
.some((a) => a);
|
|
2191
|
+
});
|
|
2303
2192
|
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2306
|
-
const fn = (subject) => _unset(ptr, subject, nil$1);
|
|
2307
|
-
return subject === undefined ? fn : fn(subject);
|
|
2308
|
-
};
|
|
2193
|
+
const curry$3 = justCurryIt;
|
|
2194
|
+
const map$1 = map$3;
|
|
2309
2195
|
|
|
2310
|
-
const _unset = (pointer, subject, cursor) => {
|
|
2311
|
-
if (pointer.length == 0) {
|
|
2312
|
-
return undefined;
|
|
2313
|
-
} else if (pointer.length > 1) {
|
|
2314
|
-
const segment = pointer.shift();
|
|
2315
|
-
const value = applySegment(subject, segment, cursor);
|
|
2316
|
-
return { ...subject, [segment]: _unset(pointer, value, append(segment, cursor)) };
|
|
2317
|
-
} else if (Array.isArray(subject)) {
|
|
2318
|
-
return subject.filter((_, ndx) => ndx != pointer[0]);
|
|
2319
|
-
} else if (typeof subject === "object" && subject !== null) {
|
|
2320
|
-
// eslint-disable-next-line no-unused-vars
|
|
2321
|
-
const { [pointer[0]]: _, ...result } = subject;
|
|
2322
|
-
return result;
|
|
2323
|
-
} else {
|
|
2324
|
-
return applySegment(subject, pointer[0], cursor);
|
|
2325
|
-
}
|
|
2326
|
-
};
|
|
2327
2196
|
|
|
2328
|
-
|
|
2329
|
-
const
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
};
|
|
2197
|
+
var every = curry$3(async (fn, doc) => {
|
|
2198
|
+
const results = await map$1(fn, doc);
|
|
2199
|
+
return (await Promise.all(results))
|
|
2200
|
+
.every((a) => a);
|
|
2201
|
+
});
|
|
2333
2202
|
|
|
2334
|
-
const
|
|
2335
|
-
if (pointer.length === 0) {
|
|
2336
|
-
return;
|
|
2337
|
-
} else if (pointer.length > 1) {
|
|
2338
|
-
const segment = pointer.shift();
|
|
2339
|
-
const value = applySegment(subject, segment, cursor);
|
|
2340
|
-
_remove(pointer, value, append(segment, cursor));
|
|
2341
|
-
} else if (Array.isArray(subject)) {
|
|
2342
|
-
subject.splice(pointer[0], 1);
|
|
2343
|
-
} else if (typeof subject === "object" && subject !== null) {
|
|
2344
|
-
delete subject[pointer[0]];
|
|
2345
|
-
} else {
|
|
2346
|
-
applySegment(subject, pointer[0], cursor);
|
|
2347
|
-
}
|
|
2348
|
-
};
|
|
2203
|
+
const curry$2 = justCurryIt;
|
|
2349
2204
|
|
|
2350
|
-
const append = curry$9((segment, pointer) => pointer + "/" + escape$1(segment));
|
|
2351
2205
|
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2206
|
+
var pipeline$1 = curry$2((fns, doc) => {
|
|
2207
|
+
return fns.reduce(async (acc, fn) => fn(await acc), doc);
|
|
2208
|
+
});
|
|
2355
2209
|
|
|
2356
|
-
|
|
2357
|
-
if (value === undefined) {
|
|
2358
|
-
throw TypeError(`Value at '${cursor}' is undefined and does not have property '${segment}'`);
|
|
2359
|
-
} else if (value === null) {
|
|
2360
|
-
throw TypeError(`Value at '${cursor}' is null and does not have property '${segment}'`);
|
|
2361
|
-
} else if (isScalar(value)) {
|
|
2362
|
-
throw TypeError(`Value at '${cursor}' is a ${typeof value} and does not have property '${segment}'`);
|
|
2363
|
-
} else {
|
|
2364
|
-
const computedSegment = computeSegment(value, segment);
|
|
2365
|
-
return value[computedSegment];
|
|
2366
|
-
}
|
|
2367
|
-
};
|
|
2210
|
+
var all = (doc) => Promise.all(doc);
|
|
2368
2211
|
|
|
2369
|
-
const
|
|
2212
|
+
const pipeline = pipeline$1;
|
|
2213
|
+
const entries$1 = entries$2;
|
|
2214
|
+
const reduce = reduce$2;
|
|
2370
2215
|
|
|
2371
|
-
|
|
2216
|
+
|
|
2217
|
+
var allValues = (doc) => {
|
|
2218
|
+
return pipeline([
|
|
2219
|
+
entries$1,
|
|
2220
|
+
reduce(async (acc, [propertyName, propertyValue]) => {
|
|
2221
|
+
acc[propertyName] = await propertyValue;
|
|
2222
|
+
return acc;
|
|
2223
|
+
}, {})
|
|
2224
|
+
], doc);
|
|
2225
|
+
};
|
|
2226
|
+
|
|
2227
|
+
var lib$3 = {
|
|
2228
|
+
entries: entries$2,
|
|
2229
|
+
map: map$3,
|
|
2230
|
+
filter: filter,
|
|
2231
|
+
reduce: reduce$2,
|
|
2232
|
+
some: some,
|
|
2233
|
+
every: every,
|
|
2234
|
+
pipeline: pipeline$1,
|
|
2235
|
+
all: all,
|
|
2236
|
+
allValues: allValues
|
|
2237
|
+
};
|
|
2372
2238
|
|
|
2373
2239
|
var moo$1 = {exports: {}};
|
|
2374
2240
|
|
|
@@ -3209,7 +3075,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3209
3075
|
const stringify$1 = stringify_1;
|
|
3210
3076
|
|
|
3211
3077
|
|
|
3212
|
-
var lib$
|
|
3078
|
+
var lib$2 = { parse: parse$2, stringify: stringify$1 };
|
|
3213
3079
|
|
|
3214
3080
|
var fetch_browser = fetch;
|
|
3215
3081
|
|
|
@@ -3465,10 +3331,10 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3465
3331
|
|
|
3466
3332
|
var mediaTypes = { addPlugin, parse, getContentType };
|
|
3467
3333
|
|
|
3468
|
-
const curry$
|
|
3469
|
-
const Pact$a = lib$
|
|
3470
|
-
const Json = lib$
|
|
3471
|
-
const JsonPointer = lib$
|
|
3334
|
+
const curry$1 = justCurryIt$1;
|
|
3335
|
+
const Pact$a = lib$3;
|
|
3336
|
+
const Json = lib$2;
|
|
3337
|
+
const JsonPointer = lib$4;
|
|
3472
3338
|
const { jsonTypeOf, resolveUrl: resolveUrl$1, urlFragment, pathRelative } = common$1;
|
|
3473
3339
|
const fetch$1 = fetch_browser;
|
|
3474
3340
|
const Reference$1 = reference;
|
|
@@ -3499,61 +3365,64 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3499
3365
|
// Schema Management
|
|
3500
3366
|
const schemaStore = {};
|
|
3501
3367
|
const schemaStoreAlias = {};
|
|
3502
|
-
const add$1 = (schema, retrievalUri = "", defaultDialectId = "") => {
|
|
3503
|
-
const dialectId = getDialectId(schema, retrievalUri, defaultDialectId);
|
|
3504
|
-
|
|
3505
|
-
const id = getBaseUri(schema, retrievalUri, dialectJsonSchemaVersion[dialectId]);
|
|
3506
|
-
|
|
3507
|
-
// Extract embedded schemas and collect anchors
|
|
3508
|
-
const embeddedToken = getConfig(dialectId, "embeddedToken");
|
|
3509
|
-
const baseToken = getConfig(dialectId, "baseToken");
|
|
3510
|
-
const anchorToken = getConfig(dialectId, "anchorToken");
|
|
3511
|
-
const dynamicAnchorToken = getConfig(dialectId, "dynamicAnchorToken");
|
|
3512
|
-
const jrefToken = getConfig(dialectId, "jrefToken");
|
|
3513
|
-
|
|
3514
|
-
const dynamicAnchors = {};
|
|
3515
|
-
const anchors = { "": "" };
|
|
3516
|
-
|
|
3517
|
-
schema = Json.parse(JSON.stringify(schema), (key, value, pointer) => {
|
|
3518
|
-
if (jsonTypeOf(value, "object")) {
|
|
3519
|
-
// Embedded Schema
|
|
3520
|
-
const embeddedSchemaDialectId = typeof value.$schema === "string" ? resolveUrl$1(value.$schema, "") : dialectId;
|
|
3521
|
-
const embeddedEmbeddedToken = getConfig(embeddedSchemaDialectId, "embeddedToken");
|
|
3522
|
-
const embeddedAnchorToken = getConfig(embeddedSchemaDialectId, "anchorToken");
|
|
3523
|
-
if (typeof value[embeddedEmbeddedToken] === "string" && (embeddedEmbeddedToken !== embeddedAnchorToken || value[embeddedEmbeddedToken][0] !== "#") && pointer !== "") {
|
|
3524
|
-
const embeddedRetrievalUri = resolveUrl$1(id, value[embeddedEmbeddedToken]);
|
|
3525
|
-
add$1(value, embeddedRetrievalUri, dialectId);
|
|
3526
|
-
return Reference$1.cons(value[embeddedEmbeddedToken], value);
|
|
3527
|
-
}
|
|
3528
3368
|
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3369
|
+
const add$1 = (schema, url = "", defaultSchemaVersion = "") => {
|
|
3370
|
+
schema = JSON.parse(JSON.stringify(schema));
|
|
3371
|
+
const externalId = resolveUrl$1(url, "");
|
|
3532
3372
|
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3373
|
+
// Dialect / JSON Schema Version
|
|
3374
|
+
const dialectId = resolveUrl$1(schema["$schema"] || defaultSchemaVersion, "");
|
|
3375
|
+
if (!dialectId) {
|
|
3376
|
+
throw Error("Couldn't determine schema dialect");
|
|
3377
|
+
}
|
|
3378
|
+
delete schema["$schema"];
|
|
3538
3379
|
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3380
|
+
// Determine JSON Schema version
|
|
3381
|
+
if (!(dialectId in dialectJsonSchemaVersion)) {
|
|
3382
|
+
if (schema?.$vocabulary?.[core201909Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core201909Id)[0]) {
|
|
3383
|
+
// Self describing 2019-09 meta-schema
|
|
3384
|
+
dialectJsonSchemaVersion[dialectId] = core201909Id;
|
|
3385
|
+
} else if (schema?.$vocabulary?.[core202012Id] === true && dialectId === getSchemaIdentifier(schema, externalId, core202012Id)[0]) {
|
|
3386
|
+
// Self describing 2020-12 meta-schema
|
|
3387
|
+
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3388
|
+
} else {
|
|
3389
|
+
// Need to look at meta-schema to determine version
|
|
3390
|
+
const metaSchema = schemaStore[dialectId];
|
|
3391
|
+
if (!metaSchema) {
|
|
3392
|
+
throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
|
|
3393
|
+
} else if (metaSchema.vocabulary[core201909Id] === true) {
|
|
3394
|
+
dialectJsonSchemaVersion[dialectId] = core201909Id;
|
|
3395
|
+
} else if (metaSchema.vocabulary[core202012Id] === true) {
|
|
3396
|
+
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3397
|
+
} else {
|
|
3398
|
+
// Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
|
|
3399
|
+
dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
|
|
3543
3400
|
}
|
|
3544
3401
|
}
|
|
3402
|
+
}
|
|
3545
3403
|
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3404
|
+
// Internal Identifier
|
|
3405
|
+
const [id, fragment] = getSchemaIdentifier(schema, externalId, dialectJsonSchemaVersion[dialectId]);
|
|
3406
|
+
if (!id) {
|
|
3407
|
+
throw Error("Couldn't determine an identifier for the schema");
|
|
3408
|
+
}
|
|
3409
|
+
const baseToken = getConfig(dialectId, "baseToken");
|
|
3551
3410
|
delete schema[baseToken];
|
|
3411
|
+
if (externalId) {
|
|
3412
|
+
schemaStoreAlias[externalId] = id;
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
const anchorToken = getConfig(dialectId, "anchorToken");
|
|
3416
|
+
if (fragment && baseToken === anchorToken) {
|
|
3417
|
+
schema[anchorToken] = anchorToken !== baseToken ? encodeURI(fragment) : `#${encodeURI(fragment)}`;
|
|
3418
|
+
}
|
|
3552
3419
|
|
|
3553
3420
|
// recursiveAnchor
|
|
3421
|
+
const dynamicAnchors = {};
|
|
3554
3422
|
const recursiveAnchorToken = getConfig(dialectId, "recursiveAnchorToken");
|
|
3555
3423
|
if (schema[recursiveAnchorToken] === true) {
|
|
3556
3424
|
dynamicAnchors[""] = `${id}#`;
|
|
3425
|
+
schema[anchorToken] = "";
|
|
3557
3426
|
delete schema[recursiveAnchorToken];
|
|
3558
3427
|
}
|
|
3559
3428
|
|
|
@@ -3568,66 +3437,69 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3568
3437
|
}
|
|
3569
3438
|
|
|
3570
3439
|
// Store Schema
|
|
3440
|
+
const anchors = { "": "" };
|
|
3571
3441
|
schemaStore[id] = {
|
|
3572
|
-
id,
|
|
3573
|
-
dialectId,
|
|
3574
|
-
schema,
|
|
3575
|
-
anchors,
|
|
3576
|
-
dynamicAnchors,
|
|
3577
|
-
vocabulary,
|
|
3442
|
+
id: id,
|
|
3443
|
+
dialectId: dialectId,
|
|
3444
|
+
schema: processSchema(schema, id, dialectId, JsonPointer.nil, anchors, dynamicAnchors),
|
|
3445
|
+
anchors: anchors,
|
|
3446
|
+
dynamicAnchors: dynamicAnchors,
|
|
3447
|
+
vocabulary: vocabulary,
|
|
3578
3448
|
validated: false
|
|
3579
3449
|
};
|
|
3580
|
-
if (id === "https://example.com/schema/root") {
|
|
3581
|
-
console.log(Object.keys(schemaStore).filter((id) => !/json-schema\.org/.test(id)));
|
|
3582
|
-
}
|
|
3583
3450
|
|
|
3584
|
-
|
|
3585
|
-
schemaStoreAlias[resolveUrl$1(retrievalUri, "")] = id;
|
|
3586
|
-
}
|
|
3451
|
+
return id;
|
|
3587
3452
|
};
|
|
3588
3453
|
|
|
3589
|
-
const
|
|
3590
|
-
const
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3454
|
+
const getSchemaIdentifier = (schema, externalId, jsonSchemaVersion) => {
|
|
3455
|
+
const baseToken = config[jsonSchemaVersion]?.["baseToken"];
|
|
3456
|
+
const internalUrl = resolveUrl$1(externalId, schema[baseToken] || "");
|
|
3457
|
+
return [resolveUrl$1(internalUrl, ""), urlFragment(internalUrl)];
|
|
3458
|
+
};
|
|
3459
|
+
|
|
3460
|
+
const processSchema = (subject, id, dialectId, pointer, anchors, dynamicAnchors) => {
|
|
3461
|
+
if (jsonTypeOf(subject, "object")) {
|
|
3462
|
+
const embeddedSchemaDialectId = typeof subject.$schema === "string" ? resolveUrl$1(subject.$schema, "") : dialectId;
|
|
3463
|
+
const embeddedEmbeddedToken = getConfig(embeddedSchemaDialectId, "embeddedToken");
|
|
3464
|
+
const embeddedAnchorToken = getConfig(embeddedSchemaDialectId, "anchorToken");
|
|
3465
|
+
if (typeof subject[embeddedEmbeddedToken] === "string" && (embeddedEmbeddedToken !== embeddedAnchorToken || subject[embeddedEmbeddedToken][0] !== "#")) {
|
|
3466
|
+
const ref = resolveUrl$1(id, subject[embeddedEmbeddedToken]);
|
|
3467
|
+
const embeddedBaseToken = getConfig(embeddedSchemaDialectId, "baseToken");
|
|
3468
|
+
subject[embeddedBaseToken] = ref;
|
|
3469
|
+
add$1(subject, ref, dialectId);
|
|
3470
|
+
return Reference$1.cons(subject[embeddedEmbeddedToken], subject);
|
|
3471
|
+
}
|
|
3594
3472
|
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
if (
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
// Self describing 2020-12 meta-schema
|
|
3602
|
-
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3603
|
-
} else {
|
|
3604
|
-
// Need to look at meta-schema to determine version
|
|
3605
|
-
const metaSchema = schemaStore[dialectId];
|
|
3606
|
-
if (!metaSchema) {
|
|
3607
|
-
throw Error(`Couldn't determine JSON Schema version for dialect: '${dialectId}'`);
|
|
3608
|
-
} else if (metaSchema.vocabulary[core201909Id] === true) {
|
|
3609
|
-
dialectJsonSchemaVersion[dialectId] = core201909Id;
|
|
3610
|
-
} else if (metaSchema.vocabulary[core202012Id] === true) {
|
|
3611
|
-
dialectJsonSchemaVersion[dialectId] = core202012Id;
|
|
3612
|
-
} else {
|
|
3613
|
-
// Assume the jsonSchemaVersion is the meta-schema's dialectId (non-standard behavior)
|
|
3614
|
-
dialectJsonSchemaVersion[dialectId] = dialectJsonSchemaVersion[metaSchema.dialectId];
|
|
3615
|
-
}
|
|
3473
|
+
const anchorToken = getConfig(dialectId, "anchorToken");
|
|
3474
|
+
const dynamicAnchorToken = getConfig(dialectId, "dynamicAnchorToken");
|
|
3475
|
+
if (typeof subject[dynamicAnchorToken] === "string") {
|
|
3476
|
+
dynamicAnchors[subject[dynamicAnchorToken]] = `${id}#${encodeURI(pointer)}`;
|
|
3477
|
+
anchors[subject[dynamicAnchorToken]] = pointer;
|
|
3478
|
+
delete subject[dynamicAnchorToken];
|
|
3616
3479
|
}
|
|
3617
|
-
}
|
|
3618
3480
|
|
|
3619
|
-
|
|
3620
|
-
|
|
3481
|
+
const embeddedToken = getConfig(dialectId, "embeddedToken");
|
|
3482
|
+
if (typeof subject[anchorToken] === "string") {
|
|
3483
|
+
const anchor = anchorToken !== embeddedToken ? subject[anchorToken] : subject[anchorToken].slice(1);
|
|
3484
|
+
anchors[anchor] = pointer;
|
|
3485
|
+
delete subject[anchorToken];
|
|
3486
|
+
}
|
|
3621
3487
|
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
if (!baseUri) {
|
|
3627
|
-
throw Error("Couldn't determine an identifier for the schema");
|
|
3628
|
-
}
|
|
3488
|
+
const jrefToken = getConfig(dialectId, "jrefToken");
|
|
3489
|
+
if (typeof subject[jrefToken] === "string") {
|
|
3490
|
+
return Reference$1.cons(subject[jrefToken], subject);
|
|
3491
|
+
}
|
|
3629
3492
|
|
|
3630
|
-
|
|
3493
|
+
for (const key in subject) {
|
|
3494
|
+
subject[key] = processSchema(subject[key], id, dialectId, JsonPointer.append(key, pointer), anchors, dynamicAnchors);
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
return subject;
|
|
3498
|
+
} else if (Array.isArray(subject)) {
|
|
3499
|
+
return subject.map((item, ndx) => processSchema(item, id, dialectId, JsonPointer.append(ndx, pointer), anchors, dynamicAnchors));
|
|
3500
|
+
} else {
|
|
3501
|
+
return subject;
|
|
3502
|
+
}
|
|
3631
3503
|
};
|
|
3632
3504
|
|
|
3633
3505
|
const hasStoredSchema = (id) => id in schemaStore || id in schemaStoreAlias;
|
|
@@ -3721,14 +3593,14 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3721
3593
|
|
|
3722
3594
|
const keys = (doc) => Object.keys(value(doc));
|
|
3723
3595
|
|
|
3724
|
-
const entries
|
|
3596
|
+
const entries = (doc) => Pact$a.pipeline([
|
|
3725
3597
|
value,
|
|
3726
3598
|
Object.keys,
|
|
3727
3599
|
Pact$a.map(async (key) => [key, await step(key, doc)]),
|
|
3728
3600
|
Pact$a.all
|
|
3729
3601
|
], doc);
|
|
3730
3602
|
|
|
3731
|
-
const map
|
|
3603
|
+
const map = curry$1((fn, doc) => Pact$a.pipeline([
|
|
3732
3604
|
value,
|
|
3733
3605
|
Pact$a.map(async (item, ndx) => fn(await step(ndx, doc), ndx)),
|
|
3734
3606
|
Pact$a.all
|
|
@@ -3803,7 +3675,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3803
3675
|
var schema$5 = {
|
|
3804
3676
|
setConfig, getConfig,
|
|
3805
3677
|
add: add$1, get, markValidated,
|
|
3806
|
-
uri, value, getAnchorPointer, typeOf, has, step, keys, entries
|
|
3678
|
+
uri, value, getAnchorPointer, typeOf, has, step, keys, entries, map, length,
|
|
3807
3679
|
toSchema
|
|
3808
3680
|
};
|
|
3809
3681
|
|
|
@@ -3817,19 +3689,19 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3817
3689
|
|
|
3818
3690
|
var invalidSchemaError = InvalidSchemaError$3;
|
|
3819
3691
|
|
|
3820
|
-
const Schema$
|
|
3692
|
+
const Schema$P = schema$5;
|
|
3821
3693
|
|
|
3822
3694
|
|
|
3823
|
-
const compile$
|
|
3824
|
-
const interpret$
|
|
3695
|
+
const compile$M = (schema) => Schema$P.value(schema);
|
|
3696
|
+
const interpret$M = () => true;
|
|
3825
3697
|
|
|
3826
|
-
var metaData$4 = { compile: compile$
|
|
3698
|
+
var metaData$4 = { compile: compile$M, interpret: interpret$M };
|
|
3827
3699
|
|
|
3828
|
-
const curry
|
|
3700
|
+
const curry = justCurryIt$1;
|
|
3829
3701
|
const PubSub$1 = pubsub.exports;
|
|
3830
3702
|
const { resolveUrl } = common$1;
|
|
3831
|
-
const Instance$
|
|
3832
|
-
const Schema$
|
|
3703
|
+
const Instance$C = instance;
|
|
3704
|
+
const Schema$O = schema$5;
|
|
3833
3705
|
const InvalidSchemaError$2 = invalidSchemaError;
|
|
3834
3706
|
const MediaTypes = mediaTypes;
|
|
3835
3707
|
const metaData$3 = metaData$4;
|
|
@@ -3849,19 +3721,19 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3849
3721
|
});
|
|
3850
3722
|
|
|
3851
3723
|
const validate$2 = async (schema, value = undefined, outputFormat = undefined) => {
|
|
3852
|
-
const compiled = await compile$
|
|
3853
|
-
const interpretAst = (value, outputFormat) => interpret$
|
|
3724
|
+
const compiled = await compile$L(schema);
|
|
3725
|
+
const interpretAst = (value, outputFormat) => interpret$L(compiled, Instance$C.cons(value), outputFormat);
|
|
3854
3726
|
|
|
3855
3727
|
return value === undefined ? interpretAst : interpretAst(value, outputFormat);
|
|
3856
3728
|
};
|
|
3857
3729
|
|
|
3858
|
-
const compile$
|
|
3730
|
+
const compile$L = async (schema) => {
|
|
3859
3731
|
const ast = { metaData: {} };
|
|
3860
3732
|
const schemaUri = await compileSchema(schema, ast);
|
|
3861
3733
|
return { ast, schemaUri };
|
|
3862
3734
|
};
|
|
3863
3735
|
|
|
3864
|
-
const interpret$
|
|
3736
|
+
const interpret$L = curry(({ ast, schemaUri }, value, outputFormat = FLAG) => {
|
|
3865
3737
|
if (![FLAG, BASIC, DETAILED, VERBOSE].includes(outputFormat)) {
|
|
3866
3738
|
throw Error(`The '${outputFormat}' error format is not supported`);
|
|
3867
3739
|
}
|
|
@@ -3936,10 +3808,10 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3936
3808
|
|
|
3937
3809
|
// Vocabularies
|
|
3938
3810
|
if (!hasKeyword(`${schema.dialectId}#validate`)) {
|
|
3939
|
-
const metaSchema = await Schema$
|
|
3811
|
+
const metaSchema = await Schema$O.get(schema.dialectId);
|
|
3940
3812
|
|
|
3941
3813
|
// Check for mandatory vocabularies
|
|
3942
|
-
const mandatoryVocabularies = Schema$
|
|
3814
|
+
const mandatoryVocabularies = Schema$O.getConfig(metaSchema.id, "mandatoryVocabularies") || [];
|
|
3943
3815
|
mandatoryVocabularies.forEach((vocabularyId) => {
|
|
3944
3816
|
if (!metaSchema.vocabulary[vocabularyId]) {
|
|
3945
3817
|
throw Error(`Vocabulary '${vocabularyId}' must be explicitly declared and required`);
|
|
@@ -3962,17 +3834,17 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3962
3834
|
|
|
3963
3835
|
// Meta validation
|
|
3964
3836
|
if (shouldMetaValidate && !schema.validated) {
|
|
3965
|
-
Schema$
|
|
3837
|
+
Schema$O.markValidated(schema.id);
|
|
3966
3838
|
|
|
3967
3839
|
// Compile
|
|
3968
3840
|
if (!(schema.dialectId in metaValidators)) {
|
|
3969
|
-
const metaSchema = await Schema$
|
|
3970
|
-
const compiledSchema = await compile$
|
|
3971
|
-
metaValidators[metaSchema.id] = interpret$
|
|
3841
|
+
const metaSchema = await Schema$O.get(schema.dialectId);
|
|
3842
|
+
const compiledSchema = await compile$L(metaSchema);
|
|
3843
|
+
metaValidators[metaSchema.id] = interpret$L(compiledSchema);
|
|
3972
3844
|
}
|
|
3973
3845
|
|
|
3974
3846
|
// Interpret
|
|
3975
|
-
const schemaInstance = Instance$
|
|
3847
|
+
const schemaInstance = Instance$C.cons(schema.schema, schema.id);
|
|
3976
3848
|
const metaResults = metaValidators[schema.dialectId](schemaInstance, metaOutputFormat);
|
|
3977
3849
|
if (!metaResults.valid) {
|
|
3978
3850
|
throw new InvalidSchemaError$2(metaResults);
|
|
@@ -3991,7 +3863,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
3991
3863
|
};
|
|
3992
3864
|
|
|
3993
3865
|
const followReferences = async (doc) => {
|
|
3994
|
-
return Schema$
|
|
3866
|
+
return Schema$O.typeOf(doc, "string") ? followReferences(await Schema$O.get(Schema$O.value(doc), doc)) : doc;
|
|
3995
3867
|
};
|
|
3996
3868
|
|
|
3997
3869
|
const interpretSchema = (schemaUri, instance, ast, dynamicAnchors) => {
|
|
@@ -4019,45 +3891,45 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4019
3891
|
};
|
|
4020
3892
|
|
|
4021
3893
|
const add = (schema, url = "", defaultSchemaVersion = "") => {
|
|
4022
|
-
const id = Schema$
|
|
3894
|
+
const id = Schema$O.add(schema, url, defaultSchemaVersion);
|
|
4023
3895
|
delete metaValidators[id];
|
|
4024
3896
|
};
|
|
4025
3897
|
|
|
4026
3898
|
var core$2 = {
|
|
4027
|
-
validate: validate$2, compile: compile$
|
|
3899
|
+
validate: validate$2, compile: compile$L, interpret: interpret$L,
|
|
4028
3900
|
setMetaOutputFormat, setShouldMetaValidate, FLAG, BASIC, DETAILED, VERBOSE,
|
|
4029
3901
|
add, getKeyword, hasKeyword, defineVocabulary,
|
|
4030
3902
|
compileSchema, interpretSchema, collectEvaluatedProperties: collectEvaluatedProperties$e, collectEvaluatedItems: collectEvaluatedItems$f,
|
|
4031
3903
|
addMediaTypePlugin: MediaTypes.addPlugin
|
|
4032
3904
|
};
|
|
4033
3905
|
|
|
4034
|
-
const Pact$9 = lib$
|
|
3906
|
+
const Pact$9 = lib$3;
|
|
4035
3907
|
const PubSub = pubsub.exports;
|
|
4036
3908
|
const Core$x = core$2;
|
|
4037
|
-
const Instance$
|
|
4038
|
-
const Schema$
|
|
3909
|
+
const Instance$B = instance;
|
|
3910
|
+
const Schema$N = schema$5;
|
|
4039
3911
|
|
|
4040
3912
|
|
|
4041
|
-
const compile$
|
|
4042
|
-
const url = Schema$
|
|
3913
|
+
const compile$K = async (schema, ast) => {
|
|
3914
|
+
const url = Schema$N.uri(schema);
|
|
4043
3915
|
if (!(url in ast)) {
|
|
4044
3916
|
ast[url] = false; // Place dummy entry in ast to avoid recursive loops
|
|
4045
3917
|
|
|
4046
|
-
const schemaValue = Schema$
|
|
3918
|
+
const schemaValue = Schema$N.value(schema);
|
|
4047
3919
|
if (!["object", "boolean"].includes(typeof schemaValue)) {
|
|
4048
|
-
throw Error(`No schema found at '${Schema$
|
|
3920
|
+
throw Error(`No schema found at '${Schema$N.uri(schema)}'`);
|
|
4049
3921
|
}
|
|
4050
3922
|
|
|
4051
3923
|
ast[url] = [
|
|
4052
3924
|
`${schema.dialectId}#validate`,
|
|
4053
|
-
Schema$
|
|
3925
|
+
Schema$N.uri(schema),
|
|
4054
3926
|
typeof schemaValue === "boolean" ? schemaValue : await Pact$9.pipeline([
|
|
4055
|
-
Schema$
|
|
3927
|
+
Schema$N.entries,
|
|
4056
3928
|
Pact$9.map(([keyword, keywordSchema]) => [`${schema.dialectId}#${keyword}`, keywordSchema]),
|
|
4057
3929
|
Pact$9.filter(([keywordId]) => keywordId !== `${schema.dialectId}#validate`),
|
|
4058
3930
|
Pact$9.map(async ([keywordId, keywordSchema]) => {
|
|
4059
3931
|
const keywordAst = await Core$x.getKeyword(keywordId).compile(keywordSchema, ast, schema);
|
|
4060
|
-
return [keywordId, Schema$
|
|
3932
|
+
return [keywordId, Schema$N.uri(keywordSchema), keywordAst];
|
|
4061
3933
|
}),
|
|
4062
3934
|
Pact$9.all
|
|
4063
3935
|
], schema)
|
|
@@ -4067,7 +3939,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4067
3939
|
return url;
|
|
4068
3940
|
};
|
|
4069
3941
|
|
|
4070
|
-
const interpret$
|
|
3942
|
+
const interpret$K = (uri, instance, ast, dynamicAnchors) => {
|
|
4071
3943
|
const [keywordId, schemaUrl, nodes] = ast[uri];
|
|
4072
3944
|
|
|
4073
3945
|
PubSub.publishSync("result.start");
|
|
@@ -4079,7 +3951,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4079
3951
|
PubSub.publishSync("result", {
|
|
4080
3952
|
keyword: keywordId,
|
|
4081
3953
|
absoluteKeywordLocation: schemaUrl,
|
|
4082
|
-
instanceLocation: Instance$
|
|
3954
|
+
instanceLocation: Instance$B.uri(instance),
|
|
4083
3955
|
valid: isValid,
|
|
4084
3956
|
ast: keywordValue
|
|
4085
3957
|
});
|
|
@@ -4090,7 +3962,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4090
3962
|
PubSub.publishSync("result", {
|
|
4091
3963
|
keyword: keywordId,
|
|
4092
3964
|
absoluteKeywordLocation: schemaUrl,
|
|
4093
|
-
instanceLocation: Instance$
|
|
3965
|
+
instanceLocation: Instance$B.uri(instance),
|
|
4094
3966
|
valid: isValid,
|
|
4095
3967
|
ast: uri
|
|
4096
3968
|
});
|
|
@@ -4128,7 +4000,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4128
4000
|
}, new Set());
|
|
4129
4001
|
};
|
|
4130
4002
|
|
|
4131
|
-
var validate$1 = { compile: compile$
|
|
4003
|
+
var validate$1 = { compile: compile$K, interpret: interpret$K, collectEvaluatedProperties: collectEvaluatedProperties$d, collectEvaluatedItems: collectEvaluatedItems$e };
|
|
4132
4004
|
|
|
4133
4005
|
const metaData$2 = metaData$4;
|
|
4134
4006
|
const validate = validate$1;
|
|
@@ -4137,90 +4009,90 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4137
4009
|
var keywords$6 = { metaData: metaData$2, validate };
|
|
4138
4010
|
|
|
4139
4011
|
const Core$w = core$2;
|
|
4140
|
-
const Schema$
|
|
4141
|
-
const Instance$
|
|
4012
|
+
const Schema$M = schema$5;
|
|
4013
|
+
const Instance$A = instance;
|
|
4142
4014
|
const Reference = reference;
|
|
4143
4015
|
const Keywords$2 = keywords$6;
|
|
4144
4016
|
const InvalidSchemaError$1 = invalidSchemaError;
|
|
4145
4017
|
|
|
4146
4018
|
|
|
4147
|
-
var lib$
|
|
4019
|
+
var lib$1 = { Core: Core$w, Schema: Schema$M, Instance: Instance$A, Reference, Keywords: Keywords$2, InvalidSchemaError: InvalidSchemaError$1 };
|
|
4148
4020
|
|
|
4149
|
-
const { Core: Core$v, Schema: Schema$
|
|
4021
|
+
const { Core: Core$v, Schema: Schema$L, Instance: Instance$z } = lib$1;
|
|
4150
4022
|
|
|
4151
4023
|
|
|
4152
|
-
const compile$
|
|
4153
|
-
const items = await Schema$
|
|
4154
|
-
const numberOfItems = Schema$
|
|
4024
|
+
const compile$J = async (schema, ast, parentSchema) => {
|
|
4025
|
+
const items = await Schema$L.step("items", parentSchema);
|
|
4026
|
+
const numberOfItems = Schema$L.typeOf(items, "array") ? Schema$L.length(items) : Number.MAX_SAFE_INTEGER;
|
|
4155
4027
|
|
|
4156
|
-
if (Schema$
|
|
4157
|
-
return [numberOfItems, Schema$
|
|
4028
|
+
if (Schema$L.typeOf(schema, "boolean")) {
|
|
4029
|
+
return [numberOfItems, Schema$L.value(schema)];
|
|
4158
4030
|
} else {
|
|
4159
4031
|
return [numberOfItems, await Core$v.compileSchema(schema, ast)];
|
|
4160
4032
|
}
|
|
4161
4033
|
};
|
|
4162
4034
|
|
|
4163
|
-
const interpret$
|
|
4164
|
-
if (!Instance$
|
|
4035
|
+
const interpret$J = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
|
|
4036
|
+
if (!Instance$z.typeOf(instance, "array")) {
|
|
4165
4037
|
return true;
|
|
4166
4038
|
}
|
|
4167
4039
|
|
|
4168
4040
|
if (typeof additionalItems === "string") {
|
|
4169
|
-
return Instance$
|
|
4041
|
+
return Instance$z.every((item, ndx) => ndx < numberOfItems || Core$v.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
|
|
4170
4042
|
} else {
|
|
4171
|
-
return Instance$
|
|
4043
|
+
return Instance$z.every((item, ndx) => ndx < numberOfItems ? true : additionalItems, instance);
|
|
4172
4044
|
}
|
|
4173
4045
|
};
|
|
4174
4046
|
|
|
4175
|
-
var additionalItems = { compile: compile$
|
|
4047
|
+
var additionalItems = { compile: compile$J, interpret: interpret$J };
|
|
4176
4048
|
|
|
4177
|
-
const { Core: Core$u, Schema: Schema$
|
|
4049
|
+
const { Core: Core$u, Schema: Schema$K, Instance: Instance$y } = lib$1;
|
|
4178
4050
|
|
|
4179
4051
|
|
|
4180
|
-
const compile$
|
|
4181
|
-
const items = await Schema$
|
|
4182
|
-
const numberOfItems = Schema$
|
|
4052
|
+
const compile$I = async (schema, ast, parentSchema) => {
|
|
4053
|
+
const items = await Schema$K.step("items", parentSchema);
|
|
4054
|
+
const numberOfItems = Schema$K.typeOf(items, "array") ? Schema$K.length(items) : Number.MAX_SAFE_INTEGER;
|
|
4183
4055
|
|
|
4184
4056
|
return [numberOfItems, await Core$u.compileSchema(schema, ast)];
|
|
4185
4057
|
};
|
|
4186
4058
|
|
|
4187
|
-
const interpret$
|
|
4188
|
-
if (!Instance$
|
|
4059
|
+
const interpret$I = ([numberOfItems, additionalItems], instance, ast, dynamicAnchors) => {
|
|
4060
|
+
if (!Instance$y.typeOf(instance, "array")) {
|
|
4189
4061
|
return true;
|
|
4190
4062
|
}
|
|
4191
4063
|
|
|
4192
|
-
return Instance$
|
|
4064
|
+
return Instance$y.every((item, ndx) => ndx < numberOfItems || Core$u.interpretSchema(additionalItems, item, ast, dynamicAnchors), instance);
|
|
4193
4065
|
};
|
|
4194
4066
|
|
|
4195
4067
|
const collectEvaluatedItems$d = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4196
|
-
return interpret$
|
|
4068
|
+
return interpret$I(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$y.map((item, ndx) => ndx, instance));
|
|
4197
4069
|
};
|
|
4198
4070
|
|
|
4199
|
-
var additionalItems6 = { compile: compile$
|
|
4071
|
+
var additionalItems6 = { compile: compile$I, interpret: interpret$I, collectEvaluatedItems: collectEvaluatedItems$d };
|
|
4200
4072
|
|
|
4201
|
-
const { Core: Core$t, Schema: Schema$
|
|
4073
|
+
const { Core: Core$t, Schema: Schema$J, Instance: Instance$x } = lib$1;
|
|
4202
4074
|
|
|
4203
4075
|
|
|
4204
|
-
const compile$
|
|
4205
|
-
const properties = await Schema$
|
|
4206
|
-
const propertyNames = Schema$
|
|
4076
|
+
const compile$H = async (schema, ast, parentSchema) => {
|
|
4077
|
+
const properties = await Schema$J.step("properties", parentSchema);
|
|
4078
|
+
const propertyNames = Schema$J.typeOf(properties, "object") ? Schema$J.keys(properties) : [];
|
|
4207
4079
|
|
|
4208
|
-
const patternProperties = await Schema$
|
|
4209
|
-
const propertyNamePatterns = Schema$
|
|
4080
|
+
const patternProperties = await Schema$J.step("patternProperties", parentSchema);
|
|
4081
|
+
const propertyNamePatterns = Schema$J.typeOf(patternProperties, "object") ? Schema$J.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
|
|
4210
4082
|
|
|
4211
|
-
if (Schema$
|
|
4212
|
-
return [propertyNames, propertyNamePatterns, Schema$
|
|
4083
|
+
if (Schema$J.typeOf(schema, "boolean")) {
|
|
4084
|
+
return [propertyNames, propertyNamePatterns, Schema$J.value(schema)];
|
|
4213
4085
|
} else {
|
|
4214
4086
|
return [propertyNames, propertyNamePatterns, await Core$t.compileSchema(schema, ast)];
|
|
4215
4087
|
}
|
|
4216
4088
|
};
|
|
4217
4089
|
|
|
4218
|
-
const interpret$
|
|
4219
|
-
if (!Instance$
|
|
4090
|
+
const interpret$H = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
|
|
4091
|
+
if (!Instance$x.typeOf(instance, "object")) {
|
|
4220
4092
|
return true;
|
|
4221
4093
|
}
|
|
4222
4094
|
|
|
4223
|
-
const properties = Instance$
|
|
4095
|
+
const properties = Instance$x.entries(instance)
|
|
4224
4096
|
.filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)));
|
|
4225
4097
|
|
|
4226
4098
|
if (typeof additionalProperties === "string") {
|
|
@@ -4230,168 +4102,47 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4230
4102
|
}
|
|
4231
4103
|
};
|
|
4232
4104
|
|
|
4233
|
-
var additionalProperties = { compile: compile$
|
|
4105
|
+
var additionalProperties = { compile: compile$H, interpret: interpret$H };
|
|
4234
4106
|
|
|
4235
|
-
const { Core: Core$s, Schema: Schema$
|
|
4107
|
+
const { Core: Core$s, Schema: Schema$I, Instance: Instance$w } = lib$1;
|
|
4236
4108
|
|
|
4237
4109
|
|
|
4238
|
-
const compile$
|
|
4239
|
-
const propertiesSchema = await Schema$
|
|
4240
|
-
const propertyNames = Schema$
|
|
4110
|
+
const compile$G = async (schema, ast, parentSchema) => {
|
|
4111
|
+
const propertiesSchema = await Schema$I.step("properties", parentSchema);
|
|
4112
|
+
const propertyNames = Schema$I.typeOf(propertiesSchema, "object") ? Schema$I.keys(propertiesSchema) : [];
|
|
4241
4113
|
|
|
4242
|
-
const patternProperties = await Schema$
|
|
4243
|
-
const propertyNamePatterns = Schema$
|
|
4114
|
+
const patternProperties = await Schema$I.step("patternProperties", parentSchema);
|
|
4115
|
+
const propertyNamePatterns = Schema$I.typeOf(patternProperties, "object") ? Schema$I.keys(patternProperties).map((pattern) => new RegExp(pattern)) : [];
|
|
4244
4116
|
|
|
4245
4117
|
return [propertyNames, propertyNamePatterns, await Core$s.compileSchema(schema, ast)];
|
|
4246
4118
|
};
|
|
4247
4119
|
|
|
4248
|
-
const interpret$
|
|
4249
|
-
if (!Instance$
|
|
4120
|
+
const interpret$G = ([propertyNames, propertyNamePatterns, additionalProperties], instance, ast, dynamicAnchors) => {
|
|
4121
|
+
if (!Instance$w.typeOf(instance, "object")) {
|
|
4250
4122
|
return true;
|
|
4251
4123
|
}
|
|
4252
4124
|
|
|
4253
|
-
return Instance$
|
|
4125
|
+
return Instance$w.entries(instance)
|
|
4254
4126
|
.filter(([propertyName]) => !propertyNames.includes(propertyName) && !propertyNamePatterns.some((pattern) => pattern.test(propertyName)))
|
|
4255
4127
|
.every(([, property]) => Core$s.interpretSchema(additionalProperties, property, ast, dynamicAnchors));
|
|
4256
4128
|
};
|
|
4257
4129
|
|
|
4258
4130
|
const collectEvaluatedProperties$c = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4259
|
-
return interpret$
|
|
4131
|
+
return interpret$G(keywordValue, instance, ast, dynamicAnchors) && [new RegExp("")];
|
|
4260
4132
|
};
|
|
4261
4133
|
|
|
4262
|
-
var additionalProperties6 = { compile: compile$
|
|
4134
|
+
var additionalProperties6 = { compile: compile$G, interpret: interpret$G, collectEvaluatedProperties: collectEvaluatedProperties$c };
|
|
4263
4135
|
|
|
4264
|
-
|
|
4136
|
+
const { Core: Core$r, Schema: Schema$H } = lib$1;
|
|
4137
|
+
const Pact$8 = lib$3;
|
|
4265
4138
|
|
|
4266
|
-
var justCurryIt = curry$6;
|
|
4267
4139
|
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
return a + b + c;
|
|
4271
|
-
}
|
|
4272
|
-
curry(add)(1)(2)(3); // 6
|
|
4273
|
-
curry(add)(1)(2)(2); // 5
|
|
4274
|
-
curry(add)(2)(4, 3); // 9
|
|
4275
|
-
|
|
4276
|
-
function add(...args) {
|
|
4277
|
-
return args.reduce((sum, n) => sum + n, 0)
|
|
4278
|
-
}
|
|
4279
|
-
var curryAdd4 = curry(add, 4)
|
|
4280
|
-
curryAdd4(1)(2, 3)(4); // 10
|
|
4281
|
-
|
|
4282
|
-
function converter(ratio, input) {
|
|
4283
|
-
return (input*ratio).toFixed(1);
|
|
4284
|
-
}
|
|
4285
|
-
const curriedConverter = curry(converter)
|
|
4286
|
-
const milesToKm = curriedConverter(1.62);
|
|
4287
|
-
milesToKm(35); // 56.7
|
|
4288
|
-
milesToKm(10); // 16.2
|
|
4289
|
-
*/
|
|
4290
|
-
|
|
4291
|
-
function curry$6(fn, arity) {
|
|
4292
|
-
return function curried() {
|
|
4293
|
-
if (arity == null) {
|
|
4294
|
-
arity = fn.length;
|
|
4295
|
-
}
|
|
4296
|
-
var args = [].slice.call(arguments);
|
|
4297
|
-
if (args.length >= arity) {
|
|
4298
|
-
return fn.apply(this, args);
|
|
4299
|
-
} else {
|
|
4300
|
-
return function() {
|
|
4301
|
-
return curried.apply(this, args.concat([].slice.call(arguments)));
|
|
4302
|
-
};
|
|
4303
|
-
}
|
|
4304
|
-
};
|
|
4305
|
-
}
|
|
4306
|
-
|
|
4307
|
-
const curry$5 = justCurryIt;
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
var map$2 = curry$5(async (fn, doc) => (await doc).map(fn));
|
|
4311
|
-
|
|
4312
|
-
const curry$4 = justCurryIt;
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
var reduce$2 = curry$4(async (fn, acc, doc) => {
|
|
4316
|
-
return (await doc).reduce(async (acc, item) => fn(await acc, item), acc);
|
|
4317
|
-
});
|
|
4318
|
-
|
|
4319
|
-
const curry$3 = justCurryIt;
|
|
4320
|
-
const reduce$1 = reduce$2;
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
var filter = curry$3(async (fn, doc, options = {}) => {
|
|
4324
|
-
return reduce$1(async (acc, item) => {
|
|
4325
|
-
return (await fn(item)) ? acc.concat([item]) : acc;
|
|
4326
|
-
}, [], doc, options);
|
|
4327
|
-
});
|
|
4328
|
-
|
|
4329
|
-
const curry$2 = justCurryIt;
|
|
4330
|
-
const map$1 = map$2;
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
var some = curry$2(async (fn, doc) => {
|
|
4334
|
-
const results = await map$1(fn, doc);
|
|
4335
|
-
return (await Promise.all(results))
|
|
4336
|
-
.some((a) => a);
|
|
4337
|
-
});
|
|
4338
|
-
|
|
4339
|
-
const curry$1 = justCurryIt;
|
|
4340
|
-
const map = map$2;
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
var every = curry$1(async (fn, doc) => {
|
|
4344
|
-
const results = await map(fn, doc);
|
|
4345
|
-
return (await Promise.all(results))
|
|
4346
|
-
.every((a) => a);
|
|
4347
|
-
});
|
|
4348
|
-
|
|
4349
|
-
const curry = justCurryIt;
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
var pipeline$1 = curry((fns, doc) => {
|
|
4353
|
-
return fns.reduce(async (acc, fn) => fn(await acc), doc);
|
|
4354
|
-
});
|
|
4355
|
-
|
|
4356
|
-
var all = (doc) => Promise.all(doc);
|
|
4357
|
-
|
|
4358
|
-
const pipeline = pipeline$1;
|
|
4359
|
-
const entries = entries$1;
|
|
4360
|
-
const reduce = reduce$2;
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
var allValues = (doc) => {
|
|
4364
|
-
return pipeline([
|
|
4365
|
-
entries,
|
|
4366
|
-
reduce(async (acc, [propertyName, propertyValue]) => {
|
|
4367
|
-
acc[propertyName] = await propertyValue;
|
|
4368
|
-
return acc;
|
|
4369
|
-
}, {})
|
|
4370
|
-
], doc);
|
|
4371
|
-
};
|
|
4372
|
-
|
|
4373
|
-
var lib$1 = {
|
|
4374
|
-
entries: entries$1,
|
|
4375
|
-
map: map$2,
|
|
4376
|
-
filter: filter,
|
|
4377
|
-
reduce: reduce$2,
|
|
4378
|
-
some: some,
|
|
4379
|
-
every: every,
|
|
4380
|
-
pipeline: pipeline$1,
|
|
4381
|
-
all: all,
|
|
4382
|
-
allValues: allValues
|
|
4383
|
-
};
|
|
4384
|
-
|
|
4385
|
-
const { Core: Core$r, Schema: Schema$J } = lib$2;
|
|
4386
|
-
const Pact$8 = lib$1;
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
const compile$H = (schema, ast) => Pact$8.pipeline([
|
|
4390
|
-
Schema$J.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
|
|
4140
|
+
const compile$F = (schema, ast) => Pact$8.pipeline([
|
|
4141
|
+
Schema$H.map(async (itemSchema) => Core$r.compileSchema(await itemSchema, ast)),
|
|
4391
4142
|
Pact$8.all
|
|
4392
4143
|
], schema);
|
|
4393
4144
|
|
|
4394
|
-
const interpret$
|
|
4145
|
+
const interpret$F = (allOf, instance, ast, dynamicAnchors) => {
|
|
4395
4146
|
return allOf.every((schemaUrl) => Core$r.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
|
|
4396
4147
|
};
|
|
4397
4148
|
|
|
@@ -4409,18 +4160,18 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4409
4160
|
}, new Set());
|
|
4410
4161
|
};
|
|
4411
4162
|
|
|
4412
|
-
var allOf = { compile: compile$
|
|
4163
|
+
var allOf = { compile: compile$F, interpret: interpret$F, collectEvaluatedProperties: collectEvaluatedProperties$b, collectEvaluatedItems: collectEvaluatedItems$c };
|
|
4413
4164
|
|
|
4414
|
-
const { Core: Core$q, Schema: Schema$
|
|
4415
|
-
const Pact$7 = lib$
|
|
4165
|
+
const { Core: Core$q, Schema: Schema$G } = lib$1;
|
|
4166
|
+
const Pact$7 = lib$3;
|
|
4416
4167
|
|
|
4417
4168
|
|
|
4418
|
-
const compile$
|
|
4419
|
-
Schema$
|
|
4169
|
+
const compile$E = (schema, ast) => Pact$7.pipeline([
|
|
4170
|
+
Schema$G.map(async (itemSchema) => Core$q.compileSchema(await itemSchema, ast)),
|
|
4420
4171
|
Pact$7.all
|
|
4421
4172
|
], schema);
|
|
4422
4173
|
|
|
4423
|
-
const interpret$
|
|
4174
|
+
const interpret$E = (anyOf, instance, ast, dynamicAnchors) => {
|
|
4424
4175
|
const matches = anyOf.filter((schemaUrl) => Core$q.interpretSchema(schemaUrl, instance, ast, dynamicAnchors));
|
|
4425
4176
|
return matches.length > 0;
|
|
4426
4177
|
};
|
|
@@ -4439,7 +4190,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4439
4190
|
}, false);
|
|
4440
4191
|
};
|
|
4441
4192
|
|
|
4442
|
-
var anyOf = { compile: compile$
|
|
4193
|
+
var anyOf = { compile: compile$E, interpret: interpret$E, collectEvaluatedProperties: collectEvaluatedProperties$a, collectEvaluatedItems: collectEvaluatedItems$b };
|
|
4443
4194
|
|
|
4444
4195
|
var keyList = Object.keys;
|
|
4445
4196
|
var native_stringify = JSON.stringify;
|
|
@@ -4500,92 +4251,92 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4500
4251
|
|
|
4501
4252
|
var fastestStableStringify = function(obj) { return '' + stringify(obj, false); };
|
|
4502
4253
|
|
|
4503
|
-
const { Schema: Schema$
|
|
4254
|
+
const { Schema: Schema$F, Instance: Instance$v } = lib$1;
|
|
4504
4255
|
const jsonStringify$2 = fastestStableStringify;
|
|
4505
4256
|
|
|
4506
4257
|
|
|
4507
|
-
const compile$
|
|
4508
|
-
const interpret$
|
|
4258
|
+
const compile$D = (schema) => jsonStringify$2(Schema$F.value(schema));
|
|
4259
|
+
const interpret$D = (const_, instance) => jsonStringify$2(Instance$v.value(instance)) === const_;
|
|
4509
4260
|
|
|
4510
|
-
var _const = { compile: compile$
|
|
4261
|
+
var _const = { compile: compile$D, interpret: interpret$D };
|
|
4511
4262
|
|
|
4512
|
-
const { Core: Core$p, Instance: Instance$
|
|
4263
|
+
const { Core: Core$p, Instance: Instance$u } = lib$1;
|
|
4513
4264
|
|
|
4514
4265
|
|
|
4515
|
-
const compile$
|
|
4266
|
+
const compile$C = (schema, ast) => Core$p.compileSchema(schema, ast);
|
|
4516
4267
|
|
|
4517
|
-
const interpret$
|
|
4518
|
-
return !Instance$
|
|
4268
|
+
const interpret$C = (contains, instance, ast, dynamicAnchors) => {
|
|
4269
|
+
return !Instance$u.typeOf(instance, "array") || Instance$u.some((item) => Core$p.interpretSchema(contains, item, ast, dynamicAnchors), instance);
|
|
4519
4270
|
};
|
|
4520
4271
|
|
|
4521
|
-
var contains = { compile: compile$
|
|
4272
|
+
var contains = { compile: compile$C, interpret: interpret$C };
|
|
4522
4273
|
|
|
4523
|
-
const { Core: Core$o, Schema: Schema$
|
|
4274
|
+
const { Core: Core$o, Schema: Schema$E, Instance: Instance$t } = lib$1;
|
|
4524
4275
|
|
|
4525
4276
|
|
|
4526
|
-
const compile$
|
|
4277
|
+
const compile$B = async (schema, ast, parentSchema) => {
|
|
4527
4278
|
const contains = await Core$o.compileSchema(schema, ast);
|
|
4528
4279
|
|
|
4529
|
-
const minContainsSchema = await Schema$
|
|
4530
|
-
const minContains = Schema$
|
|
4280
|
+
const minContainsSchema = await Schema$E.step("minContains", parentSchema);
|
|
4281
|
+
const minContains = Schema$E.typeOf(minContainsSchema, "number") ? Schema$E.value(minContainsSchema) : 1;
|
|
4531
4282
|
|
|
4532
|
-
const maxContainsSchema = await Schema$
|
|
4533
|
-
const maxContains = Schema$
|
|
4283
|
+
const maxContainsSchema = await Schema$E.step("maxContains", parentSchema);
|
|
4284
|
+
const maxContains = Schema$E.typeOf(maxContainsSchema, "number") ? Schema$E.value(maxContainsSchema) : Number.MAX_SAFE_INTEGER;
|
|
4534
4285
|
|
|
4535
4286
|
return { contains, minContains, maxContains };
|
|
4536
4287
|
};
|
|
4537
4288
|
|
|
4538
|
-
const interpret$
|
|
4539
|
-
if (!Instance$
|
|
4289
|
+
const interpret$B = ({ contains, minContains, maxContains }, instance, ast, dynamicAnchors) => {
|
|
4290
|
+
if (!Instance$t.typeOf(instance, "array")) {
|
|
4540
4291
|
return true;
|
|
4541
4292
|
}
|
|
4542
4293
|
|
|
4543
|
-
const matches = Instance$
|
|
4294
|
+
const matches = Instance$t.reduce((matches, item) => {
|
|
4544
4295
|
return Core$o.interpretSchema(contains, item, ast, dynamicAnchors) ? matches + 1 : matches;
|
|
4545
4296
|
}, 0, instance);
|
|
4546
4297
|
return matches >= minContains && matches <= maxContains;
|
|
4547
4298
|
};
|
|
4548
4299
|
|
|
4549
4300
|
const collectEvaluatedItems$a = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4550
|
-
return interpret$
|
|
4301
|
+
return interpret$B(keywordValue, instance, ast, dynamicAnchors) && Instance$t.reduce((matchedIndexes, item, itemIndex) => {
|
|
4551
4302
|
return Core$o.interpretSchema(keywordValue.contains, item, ast, dynamicAnchors) ? matchedIndexes.add(itemIndex) : matchedIndexes;
|
|
4552
4303
|
}, new Set(), instance);
|
|
4553
4304
|
};
|
|
4554
4305
|
|
|
4555
|
-
var containsMinContainsMaxContains = { compile: compile$
|
|
4306
|
+
var containsMinContainsMaxContains = { compile: compile$B, interpret: interpret$B, collectEvaluatedItems: collectEvaluatedItems$a };
|
|
4556
4307
|
|
|
4557
|
-
const { Core: Core$n, Schema: Schema$
|
|
4558
|
-
const Pact$6 = lib$
|
|
4308
|
+
const { Core: Core$n, Schema: Schema$D } = lib$1;
|
|
4309
|
+
const Pact$6 = lib$3;
|
|
4559
4310
|
|
|
4560
4311
|
|
|
4561
|
-
const compile$
|
|
4312
|
+
const compile$A = async (schema, ast) => {
|
|
4562
4313
|
await Pact$6.pipeline([
|
|
4563
|
-
Schema$
|
|
4314
|
+
Schema$D.entries,
|
|
4564
4315
|
Pact$6.map(([, definitionSchema]) => Core$n.compileSchema(definitionSchema, ast)),
|
|
4565
4316
|
Pact$6.all
|
|
4566
4317
|
], schema);
|
|
4567
4318
|
};
|
|
4568
4319
|
|
|
4569
|
-
const interpret$
|
|
4320
|
+
const interpret$A = () => true;
|
|
4570
4321
|
|
|
4571
|
-
var definitions = { compile: compile$
|
|
4322
|
+
var definitions = { compile: compile$A, interpret: interpret$A };
|
|
4572
4323
|
|
|
4573
|
-
const { Core: Core$m, Schema: Schema$
|
|
4574
|
-
const Pact$5 = lib$
|
|
4324
|
+
const { Core: Core$m, Schema: Schema$C, Instance: Instance$s } = lib$1;
|
|
4325
|
+
const Pact$5 = lib$3;
|
|
4575
4326
|
|
|
4576
4327
|
|
|
4577
|
-
const compile$
|
|
4578
|
-
Schema$
|
|
4328
|
+
const compile$z = (schema, ast) => Pact$5.pipeline([
|
|
4329
|
+
Schema$C.entries,
|
|
4579
4330
|
Pact$5.map(async ([key, dependency]) => {
|
|
4580
|
-
return [key, Schema$
|
|
4331
|
+
return [key, Schema$C.typeOf(dependency, "array") ? Schema$C.value(dependency) : await Core$m.compileSchema(dependency, ast)];
|
|
4581
4332
|
}),
|
|
4582
4333
|
Pact$5.all
|
|
4583
4334
|
], schema);
|
|
4584
4335
|
|
|
4585
|
-
const interpret$
|
|
4586
|
-
const value = Instance$
|
|
4336
|
+
const interpret$z = (dependencies, instance, ast, dynamicAnchors) => {
|
|
4337
|
+
const value = Instance$s.value(instance);
|
|
4587
4338
|
|
|
4588
|
-
return !Instance$
|
|
4339
|
+
return !Instance$s.typeOf(instance, "object") || dependencies.every(([propertyName, dependency]) => {
|
|
4589
4340
|
if (!(propertyName in value)) {
|
|
4590
4341
|
return true;
|
|
4591
4342
|
}
|
|
@@ -4598,49 +4349,49 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4598
4349
|
});
|
|
4599
4350
|
};
|
|
4600
4351
|
|
|
4601
|
-
var dependencies = { compile: compile$
|
|
4352
|
+
var dependencies = { compile: compile$z, interpret: interpret$z };
|
|
4602
4353
|
|
|
4603
|
-
const { Schema: Schema$
|
|
4604
|
-
const Pact$4 = lib$
|
|
4354
|
+
const { Schema: Schema$B, Instance: Instance$r } = lib$1;
|
|
4355
|
+
const Pact$4 = lib$3;
|
|
4605
4356
|
|
|
4606
4357
|
|
|
4607
|
-
const compile$
|
|
4608
|
-
Schema$
|
|
4609
|
-
Pact$4.map(([key, dependentRequired]) => [key, Schema$
|
|
4358
|
+
const compile$y = (schema) => Pact$4.pipeline([
|
|
4359
|
+
Schema$B.entries,
|
|
4360
|
+
Pact$4.map(([key, dependentRequired]) => [key, Schema$B.value(dependentRequired)]),
|
|
4610
4361
|
Pact$4.all
|
|
4611
4362
|
], schema);
|
|
4612
4363
|
|
|
4613
|
-
const interpret$
|
|
4614
|
-
const value = Instance$
|
|
4364
|
+
const interpret$y = (dependentRequired, instance) => {
|
|
4365
|
+
const value = Instance$r.value(instance);
|
|
4615
4366
|
|
|
4616
|
-
return !Instance$
|
|
4367
|
+
return !Instance$r.typeOf(instance, "object") || dependentRequired.every(([propertyName, required]) => {
|
|
4617
4368
|
return !(propertyName in value) || required.every((key) => key in value);
|
|
4618
4369
|
});
|
|
4619
4370
|
};
|
|
4620
4371
|
|
|
4621
|
-
var dependentRequired = { compile: compile$
|
|
4372
|
+
var dependentRequired = { compile: compile$y, interpret: interpret$y };
|
|
4622
4373
|
|
|
4623
|
-
const { Core: Core$l, Schema: Schema$
|
|
4624
|
-
const Pact$3 = lib$
|
|
4374
|
+
const { Core: Core$l, Schema: Schema$A, Instance: Instance$q } = lib$1;
|
|
4375
|
+
const Pact$3 = lib$3;
|
|
4625
4376
|
|
|
4626
4377
|
|
|
4627
|
-
const compile$
|
|
4628
|
-
Schema$
|
|
4378
|
+
const compile$x = (schema, ast) => Pact$3.pipeline([
|
|
4379
|
+
Schema$A.entries,
|
|
4629
4380
|
Pact$3.map(async ([key, dependentSchema]) => [key, await Core$l.compileSchema(dependentSchema, ast)]),
|
|
4630
4381
|
Pact$3.all
|
|
4631
4382
|
], schema);
|
|
4632
4383
|
|
|
4633
|
-
const interpret$
|
|
4634
|
-
const value = Instance$
|
|
4384
|
+
const interpret$x = (dependentSchemas, instance, ast, dynamicAnchors) => {
|
|
4385
|
+
const value = Instance$q.value(instance);
|
|
4635
4386
|
|
|
4636
|
-
return !Instance$
|
|
4387
|
+
return !Instance$q.typeOf(instance, "object") || dependentSchemas.every(([propertyName, dependentSchema]) => {
|
|
4637
4388
|
return !(propertyName in value) || Core$l.interpretSchema(dependentSchema, instance, ast, dynamicAnchors);
|
|
4638
4389
|
});
|
|
4639
4390
|
};
|
|
4640
4391
|
|
|
4641
4392
|
const collectEvaluatedProperties$9 = (dependentSchemas, instance, ast, dynamicAnchors) => {
|
|
4642
4393
|
return dependentSchemas.reduce((acc, [propertyName, dependentSchema]) => {
|
|
4643
|
-
if (!acc || !Instance$
|
|
4394
|
+
if (!acc || !Instance$q.has(propertyName, instance)) {
|
|
4644
4395
|
return acc;
|
|
4645
4396
|
}
|
|
4646
4397
|
|
|
@@ -4649,39 +4400,39 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4649
4400
|
}, []);
|
|
4650
4401
|
};
|
|
4651
4402
|
|
|
4652
|
-
var dependentSchemas = { compile: compile$
|
|
4403
|
+
var dependentSchemas = { compile: compile$x, interpret: interpret$x, collectEvaluatedProperties: collectEvaluatedProperties$9 };
|
|
4653
4404
|
|
|
4654
|
-
const { Schema: Schema$
|
|
4405
|
+
const { Schema: Schema$z, Instance: Instance$p } = lib$1;
|
|
4655
4406
|
const jsonStringify$1 = fastestStableStringify;
|
|
4656
4407
|
|
|
4657
4408
|
|
|
4658
|
-
const compile$
|
|
4659
|
-
const interpret$
|
|
4409
|
+
const compile$w = (schema) => Schema$z.value(schema).map(jsonStringify$1);
|
|
4410
|
+
const interpret$w = (enum_, instance) => enum_.some((enumValue) => jsonStringify$1(Instance$p.value(instance)) === enumValue);
|
|
4660
4411
|
|
|
4661
|
-
var _enum = { compile: compile$
|
|
4412
|
+
var _enum = { compile: compile$w, interpret: interpret$w };
|
|
4662
4413
|
|
|
4663
|
-
const { Schema: Schema$
|
|
4414
|
+
const { Schema: Schema$y, Instance: Instance$o } = lib$1;
|
|
4664
4415
|
|
|
4665
4416
|
|
|
4666
|
-
const compile$
|
|
4667
|
-
const interpret$
|
|
4417
|
+
const compile$v = async (schema) => Schema$y.value(schema);
|
|
4418
|
+
const interpret$v = (exclusiveMaximum, instance) => !Instance$o.typeOf(instance, "number") || Instance$o.value(instance) < exclusiveMaximum;
|
|
4668
4419
|
|
|
4669
|
-
var exclusiveMaximum = { compile: compile$
|
|
4420
|
+
var exclusiveMaximum = { compile: compile$v, interpret: interpret$v };
|
|
4670
4421
|
|
|
4671
|
-
const { Schema: Schema$
|
|
4422
|
+
const { Schema: Schema$x, Instance: Instance$n } = lib$1;
|
|
4672
4423
|
|
|
4673
4424
|
|
|
4674
|
-
const compile$
|
|
4675
|
-
const interpret$
|
|
4425
|
+
const compile$u = async (schema) => Schema$x.value(schema);
|
|
4426
|
+
const interpret$u = (exclusiveMinimum, instance) => !Instance$n.typeOf(instance, "number") || Instance$n.value(instance) > exclusiveMinimum;
|
|
4676
4427
|
|
|
4677
|
-
var exclusiveMinimum = { compile: compile$
|
|
4428
|
+
var exclusiveMinimum = { compile: compile$u, interpret: interpret$u };
|
|
4678
4429
|
|
|
4679
|
-
const { Core: Core$k } = lib$
|
|
4430
|
+
const { Core: Core$k } = lib$1;
|
|
4680
4431
|
|
|
4681
4432
|
|
|
4682
|
-
const compile$
|
|
4433
|
+
const compile$t = (schema, ast) => Core$k.compileSchema(schema, ast);
|
|
4683
4434
|
|
|
4684
|
-
const interpret$
|
|
4435
|
+
const interpret$t = (ifSchema, instance, ast, dynamicAnchors) => {
|
|
4685
4436
|
Core$k.interpretSchema(ifSchema, instance, ast, dynamicAnchors);
|
|
4686
4437
|
return true;
|
|
4687
4438
|
};
|
|
@@ -4694,21 +4445,21 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4694
4445
|
return Core$k.collectEvaluatedItems(ifSchema, instance, ast, dynamicAnchors) || new Set();
|
|
4695
4446
|
};
|
|
4696
4447
|
|
|
4697
|
-
var _if = { compile: compile$
|
|
4448
|
+
var _if = { compile: compile$t, interpret: interpret$t, collectEvaluatedProperties: collectEvaluatedProperties$8, collectEvaluatedItems: collectEvaluatedItems$9 };
|
|
4698
4449
|
|
|
4699
|
-
const { Core: Core$j, Schema: Schema$
|
|
4450
|
+
const { Core: Core$j, Schema: Schema$w } = lib$1;
|
|
4700
4451
|
|
|
4701
4452
|
|
|
4702
|
-
const compile$
|
|
4703
|
-
if (Schema$
|
|
4704
|
-
const ifSchema = await Schema$
|
|
4453
|
+
const compile$s = async (schema, ast, parentSchema) => {
|
|
4454
|
+
if (Schema$w.has("if", parentSchema)) {
|
|
4455
|
+
const ifSchema = await Schema$w.step("if", parentSchema);
|
|
4705
4456
|
return [await Core$j.compileSchema(ifSchema, ast), await Core$j.compileSchema(schema, ast)];
|
|
4706
4457
|
} else {
|
|
4707
4458
|
return [];
|
|
4708
4459
|
}
|
|
4709
4460
|
};
|
|
4710
4461
|
|
|
4711
|
-
const interpret$
|
|
4462
|
+
const interpret$s = ([guard, block], instance, ast, dynamicAnchors) => {
|
|
4712
4463
|
return guard === undefined || !quietInterpretSchema$1(guard, instance, ast, dynamicAnchors) || Core$j.interpretSchema(block, instance, ast, dynamicAnchors);
|
|
4713
4464
|
};
|
|
4714
4465
|
|
|
@@ -4738,21 +4489,21 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4738
4489
|
return Core$j.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
|
|
4739
4490
|
};
|
|
4740
4491
|
|
|
4741
|
-
var then = { compile: compile$
|
|
4492
|
+
var then = { compile: compile$s, interpret: interpret$s, collectEvaluatedProperties: collectEvaluatedProperties$7, collectEvaluatedItems: collectEvaluatedItems$8 };
|
|
4742
4493
|
|
|
4743
|
-
const { Core: Core$i, Schema: Schema$
|
|
4494
|
+
const { Core: Core$i, Schema: Schema$v } = lib$1;
|
|
4744
4495
|
|
|
4745
4496
|
|
|
4746
|
-
const compile$
|
|
4747
|
-
if (Schema$
|
|
4748
|
-
const ifSchema = await Schema$
|
|
4497
|
+
const compile$r = async (schema, ast, parentSchema) => {
|
|
4498
|
+
if (Schema$v.has("if", parentSchema)) {
|
|
4499
|
+
const ifSchema = await Schema$v.step("if", parentSchema);
|
|
4749
4500
|
return [await Core$i.compileSchema(ifSchema, ast), await Core$i.compileSchema(schema, ast)];
|
|
4750
4501
|
} else {
|
|
4751
4502
|
return [];
|
|
4752
4503
|
}
|
|
4753
4504
|
};
|
|
4754
4505
|
|
|
4755
|
-
const interpret$
|
|
4506
|
+
const interpret$r = ([guard, block], instance, ast, dynamicAnchors) => {
|
|
4756
4507
|
return guard === undefined || quietInterpretSchema(guard, instance, ast, dynamicAnchors) || Core$i.interpretSchema(block, instance, ast, dynamicAnchors);
|
|
4757
4508
|
};
|
|
4758
4509
|
|
|
@@ -4782,150 +4533,134 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4782
4533
|
return Core$i.collectEvaluatedItems(block, instance, ast, dynamicAnchors);
|
|
4783
4534
|
};
|
|
4784
4535
|
|
|
4785
|
-
var _else = { compile: compile$
|
|
4536
|
+
var _else = { compile: compile$r, interpret: interpret$r, collectEvaluatedProperties: collectEvaluatedProperties$6, collectEvaluatedItems: collectEvaluatedItems$7 };
|
|
4786
4537
|
|
|
4787
|
-
const { Core: Core$h, Schema: Schema$
|
|
4538
|
+
const { Core: Core$h, Schema: Schema$u, Instance: Instance$m } = lib$1;
|
|
4788
4539
|
|
|
4789
4540
|
|
|
4790
|
-
const compile$
|
|
4791
|
-
if (Schema$
|
|
4792
|
-
const tupleItems = await Schema$
|
|
4541
|
+
const compile$q = async (schema, ast) => {
|
|
4542
|
+
if (Schema$u.typeOf(schema, "array")) {
|
|
4543
|
+
const tupleItems = await Schema$u.map((itemSchema) => Core$h.compileSchema(itemSchema, ast), schema);
|
|
4793
4544
|
return Promise.all(tupleItems);
|
|
4794
4545
|
} else {
|
|
4795
4546
|
return Core$h.compileSchema(schema, ast);
|
|
4796
4547
|
}
|
|
4797
4548
|
};
|
|
4798
4549
|
|
|
4799
|
-
const interpret$
|
|
4800
|
-
if (!Instance$
|
|
4550
|
+
const interpret$q = (items, instance, ast, dynamicAnchors) => {
|
|
4551
|
+
if (!Instance$m.typeOf(instance, "array")) {
|
|
4801
4552
|
return true;
|
|
4802
4553
|
}
|
|
4803
4554
|
|
|
4804
4555
|
if (typeof items === "string") {
|
|
4805
|
-
return Instance$
|
|
4556
|
+
return Instance$m.every((itemValue) => Core$h.interpretSchema(items, itemValue, ast, dynamicAnchors), instance);
|
|
4806
4557
|
} else {
|
|
4807
|
-
return Instance$
|
|
4558
|
+
return Instance$m.every((item, ndx) => !(ndx in items) || Core$h.interpretSchema(items[ndx], item, ast, dynamicAnchors), instance);
|
|
4808
4559
|
}
|
|
4809
4560
|
};
|
|
4810
4561
|
|
|
4811
4562
|
const collectEvaluatedItems$6 = (items, instance, ast, dynamicAnchors) => {
|
|
4812
|
-
return interpret$
|
|
4813
|
-
? new Set(Instance$
|
|
4563
|
+
return interpret$q(items, instance, ast, dynamicAnchors) && (typeof items === "string"
|
|
4564
|
+
? new Set(Instance$m.map((item, itemIndex) => itemIndex, instance))
|
|
4814
4565
|
: new Set(items.map((item, itemIndex) => itemIndex)));
|
|
4815
4566
|
};
|
|
4816
4567
|
|
|
4817
|
-
var items = { compile: compile$
|
|
4568
|
+
var items = { compile: compile$q, interpret: interpret$q, collectEvaluatedItems: collectEvaluatedItems$6 };
|
|
4818
4569
|
|
|
4819
|
-
const { Core: Core$g, Schema: Schema$
|
|
4570
|
+
const { Core: Core$g, Schema: Schema$t, Instance: Instance$l } = lib$1;
|
|
4820
4571
|
|
|
4821
4572
|
|
|
4822
|
-
const compile$
|
|
4823
|
-
const items = await Schema$
|
|
4824
|
-
const numberOfPrefixItems = Schema$
|
|
4573
|
+
const compile$p = async (schema, ast, parentSchema) => {
|
|
4574
|
+
const items = await Schema$t.step("prefixItems", parentSchema);
|
|
4575
|
+
const numberOfPrefixItems = Schema$t.typeOf(items, "array") ? Schema$t.length(items) : 0;
|
|
4825
4576
|
|
|
4826
4577
|
return [numberOfPrefixItems, await Core$g.compileSchema(schema, ast)];
|
|
4827
4578
|
};
|
|
4828
4579
|
|
|
4829
|
-
const interpret$
|
|
4830
|
-
if (!Instance$
|
|
4580
|
+
const interpret$p = ([numberOfPrefixItems, items], instance, ast, dynamicAnchors) => {
|
|
4581
|
+
if (!Instance$l.typeOf(instance, "array")) {
|
|
4831
4582
|
return true;
|
|
4832
4583
|
}
|
|
4833
4584
|
|
|
4834
|
-
return Instance$
|
|
4585
|
+
return Instance$l.every((item, ndx) => ndx < numberOfPrefixItems || Core$g.interpretSchema(items, item, ast, dynamicAnchors), instance);
|
|
4835
4586
|
};
|
|
4836
4587
|
|
|
4837
4588
|
const collectEvaluatedItems$5 = (keywordValue, instance, ast, dynamicAnchors) => {
|
|
4838
|
-
return interpret$
|
|
4589
|
+
return interpret$p(keywordValue, instance, ast, dynamicAnchors) && new Set(Instance$l.map((item, ndx) => ndx, instance));
|
|
4839
4590
|
};
|
|
4840
4591
|
|
|
4841
|
-
var items202012 = { compile: compile$
|
|
4842
|
-
|
|
4843
|
-
const { Schema: Schema$u, Instance: Instance$m } = lib$2;
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
const compile$q = (schema) => Schema$u.value(schema);
|
|
4847
|
-
const interpret$q = (maxItems, instance) => !Instance$m.typeOf(instance, "array") || Instance$m.length(instance) <= maxItems;
|
|
4592
|
+
var items202012 = { compile: compile$p, interpret: interpret$p, collectEvaluatedItems: collectEvaluatedItems$5 };
|
|
4848
4593
|
|
|
4849
|
-
|
|
4594
|
+
const { Schema: Schema$s, Instance: Instance$k } = lib$1;
|
|
4850
4595
|
|
|
4851
|
-
const { Schema: Schema$t, Instance: Instance$l } = lib$2;
|
|
4852
4596
|
|
|
4597
|
+
const compile$o = (schema) => Schema$s.value(schema);
|
|
4598
|
+
const interpret$o = (maxItems, instance) => !Instance$k.typeOf(instance, "array") || Instance$k.length(instance) <= maxItems;
|
|
4853
4599
|
|
|
4854
|
-
|
|
4855
|
-
const interpret$p = (maxLength, instance) => !Instance$l.typeOf(instance, "string") || Instance$l.length(instance) <= maxLength;
|
|
4856
|
-
|
|
4857
|
-
var maxLength = { compile: compile$p, interpret: interpret$p };
|
|
4600
|
+
var maxItems = { compile: compile$o, interpret: interpret$o };
|
|
4858
4601
|
|
|
4859
|
-
const { Schema: Schema$
|
|
4602
|
+
const { Schema: Schema$r, Instance: Instance$j } = lib$1;
|
|
4860
4603
|
|
|
4861
4604
|
|
|
4862
|
-
const compile$
|
|
4863
|
-
const interpret$
|
|
4605
|
+
const compile$n = (schema) => Schema$r.value(schema);
|
|
4606
|
+
const interpret$n = (maxLength, instance) => !Instance$j.typeOf(instance, "string") || [...Instance$j.value(instance)].length <= maxLength;
|
|
4864
4607
|
|
|
4865
|
-
var
|
|
4608
|
+
var maxLength = { compile: compile$n, interpret: interpret$n };
|
|
4866
4609
|
|
|
4867
|
-
const { Schema: Schema$
|
|
4610
|
+
const { Schema: Schema$q, Instance: Instance$i } = lib$1;
|
|
4868
4611
|
|
|
4869
4612
|
|
|
4870
|
-
const compile$
|
|
4871
|
-
const interpret$
|
|
4613
|
+
const compile$m = (schema) => Schema$q.value(schema);
|
|
4614
|
+
const interpret$m = (maxProperties, instance) => !Instance$i.typeOf(instance, "object") || Instance$i.keys(instance).length <= maxProperties;
|
|
4872
4615
|
|
|
4873
|
-
var maxProperties = { compile: compile$
|
|
4616
|
+
var maxProperties = { compile: compile$m, interpret: interpret$m };
|
|
4874
4617
|
|
|
4875
|
-
const { Schema: Schema$
|
|
4618
|
+
const { Schema: Schema$p, Instance: Instance$h } = lib$1;
|
|
4876
4619
|
|
|
4877
4620
|
|
|
4878
|
-
const compile$
|
|
4879
|
-
const exclusiveMaximum = await Schema$
|
|
4880
|
-
const isExclusive = Schema$
|
|
4621
|
+
const compile$l = async (schema, ast, parentSchema) => {
|
|
4622
|
+
const exclusiveMaximum = await Schema$p.step("exclusiveMaximum", parentSchema);
|
|
4623
|
+
const isExclusive = Schema$p.value(exclusiveMaximum);
|
|
4881
4624
|
|
|
4882
|
-
return [Schema$
|
|
4625
|
+
return [Schema$p.value(schema), isExclusive];
|
|
4883
4626
|
};
|
|
4884
4627
|
|
|
4885
|
-
const interpret$
|
|
4886
|
-
if (!Instance$
|
|
4628
|
+
const interpret$l = ([maximum, isExclusive], instance) => {
|
|
4629
|
+
if (!Instance$h.typeOf(instance, "number")) {
|
|
4887
4630
|
return true;
|
|
4888
4631
|
}
|
|
4889
4632
|
|
|
4890
|
-
const value = Instance$
|
|
4633
|
+
const value = Instance$h.value(instance);
|
|
4891
4634
|
return isExclusive ? value < maximum : value <= maximum;
|
|
4892
4635
|
};
|
|
4893
4636
|
|
|
4894
|
-
var maximumExclusiveMaximum = { compile: compile$
|
|
4895
|
-
|
|
4896
|
-
const { Schema: Schema$p, Instance: Instance$h } = lib$2;
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
const compile$l = async (schema) => Schema$p.value(schema);
|
|
4900
|
-
const interpret$l = (maximum, instance) => !Instance$h.typeOf(instance, "number") || Instance$h.value(instance) <= maximum;
|
|
4901
|
-
|
|
4902
|
-
var maximum = { compile: compile$l, interpret: interpret$l };
|
|
4637
|
+
var maximumExclusiveMaximum = { compile: compile$l, interpret: interpret$l };
|
|
4903
4638
|
|
|
4904
|
-
const { Schema: Schema$o, Instance: Instance$g } = lib$
|
|
4639
|
+
const { Schema: Schema$o, Instance: Instance$g } = lib$1;
|
|
4905
4640
|
|
|
4906
4641
|
|
|
4907
|
-
const compile$k = (schema) => Schema$o.value(schema);
|
|
4908
|
-
const interpret$k = (
|
|
4642
|
+
const compile$k = async (schema) => Schema$o.value(schema);
|
|
4643
|
+
const interpret$k = (maximum, instance) => !Instance$g.typeOf(instance, "number") || Instance$g.value(instance) <= maximum;
|
|
4909
4644
|
|
|
4910
|
-
var
|
|
4645
|
+
var maximum = { compile: compile$k, interpret: interpret$k };
|
|
4911
4646
|
|
|
4912
|
-
const { Schema: Schema$n, Instance: Instance$f } = lib$
|
|
4647
|
+
const { Schema: Schema$n, Instance: Instance$f } = lib$1;
|
|
4913
4648
|
|
|
4914
4649
|
|
|
4915
4650
|
const compile$j = (schema) => Schema$n.value(schema);
|
|
4916
|
-
const interpret$j = (
|
|
4651
|
+
const interpret$j = (minItems, instance) => !Instance$f.typeOf(instance, "array") || Instance$f.length(instance) >= minItems;
|
|
4917
4652
|
|
|
4918
|
-
var
|
|
4653
|
+
var minItems = { compile: compile$j, interpret: interpret$j };
|
|
4919
4654
|
|
|
4920
|
-
const { Schema: Schema$m, Instance: Instance$e } = lib$
|
|
4655
|
+
const { Schema: Schema$m, Instance: Instance$e } = lib$1;
|
|
4921
4656
|
|
|
4922
4657
|
|
|
4923
4658
|
const compile$i = (schema) => Schema$m.value(schema);
|
|
4924
4659
|
const interpret$i = (minLength, instance) => !Instance$e.typeOf(instance, "string") || [...Instance$e.value(instance)].length >= minLength;
|
|
4925
4660
|
|
|
4926
|
-
var
|
|
4661
|
+
var minLength = { compile: compile$i, interpret: interpret$i };
|
|
4927
4662
|
|
|
4928
|
-
const { Schema: Schema$l, Instance: Instance$d } = lib$
|
|
4663
|
+
const { Schema: Schema$l, Instance: Instance$d } = lib$1;
|
|
4929
4664
|
|
|
4930
4665
|
|
|
4931
4666
|
const compile$h = (schema) => Schema$l.value(schema);
|
|
@@ -4933,7 +4668,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4933
4668
|
|
|
4934
4669
|
var minProperties = { compile: compile$h, interpret: interpret$h };
|
|
4935
4670
|
|
|
4936
|
-
const { Schema: Schema$k, Instance: Instance$c } = lib$
|
|
4671
|
+
const { Schema: Schema$k, Instance: Instance$c } = lib$1;
|
|
4937
4672
|
|
|
4938
4673
|
|
|
4939
4674
|
const compile$g = async (schema, ast, parentSchema) => {
|
|
@@ -4954,7 +4689,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4954
4689
|
|
|
4955
4690
|
var minimumExclusiveMinimum = { compile: compile$g, interpret: interpret$g };
|
|
4956
4691
|
|
|
4957
|
-
const { Schema: Schema$j, Instance: Instance$b } = lib$
|
|
4692
|
+
const { Schema: Schema$j, Instance: Instance$b } = lib$1;
|
|
4958
4693
|
|
|
4959
4694
|
|
|
4960
4695
|
const compile$f = async (schema) => Schema$j.value(schema);
|
|
@@ -4962,7 +4697,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4962
4697
|
|
|
4963
4698
|
var minimum = { compile: compile$f, interpret: interpret$f };
|
|
4964
4699
|
|
|
4965
|
-
const { Schema: Schema$i, Instance: Instance$a } = lib$
|
|
4700
|
+
const { Schema: Schema$i, Instance: Instance$a } = lib$1;
|
|
4966
4701
|
|
|
4967
4702
|
|
|
4968
4703
|
const compile$e = (schema) => Schema$i.value(schema);
|
|
@@ -4980,7 +4715,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4980
4715
|
|
|
4981
4716
|
var multipleOf = { compile: compile$e, interpret: interpret$e };
|
|
4982
4717
|
|
|
4983
|
-
const { Core: Core$f } = lib$
|
|
4718
|
+
const { Core: Core$f } = lib$1;
|
|
4984
4719
|
|
|
4985
4720
|
|
|
4986
4721
|
const compile$d = Core$f.compileSchema;
|
|
@@ -4988,7 +4723,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
4988
4723
|
|
|
4989
4724
|
var not = { compile: compile$d, interpret: interpret$d };
|
|
4990
4725
|
|
|
4991
|
-
const { Core: Core$e, Schema: Schema$h } = lib$
|
|
4726
|
+
const { Core: Core$e, Schema: Schema$h } = lib$1;
|
|
4992
4727
|
|
|
4993
4728
|
|
|
4994
4729
|
const compile$c = async (schema, ast) => {
|
|
@@ -5037,7 +4772,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5037
4772
|
|
|
5038
4773
|
var oneOf = { compile: compile$c, interpret: interpret$c, collectEvaluatedProperties: collectEvaluatedProperties$5, collectEvaluatedItems: collectEvaluatedItems$4 };
|
|
5039
4774
|
|
|
5040
|
-
const { Schema: Schema$g, Instance: Instance$9 } = lib$
|
|
4775
|
+
const { Schema: Schema$g, Instance: Instance$9 } = lib$1;
|
|
5041
4776
|
|
|
5042
4777
|
|
|
5043
4778
|
const compile$b = (schema) => new RegExp(Schema$g.value(schema), "u");
|
|
@@ -5045,8 +4780,8 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5045
4780
|
|
|
5046
4781
|
var pattern = { compile: compile$b, interpret: interpret$b };
|
|
5047
4782
|
|
|
5048
|
-
const { Core: Core$d, Schema: Schema$f, Instance: Instance$8 } = lib$
|
|
5049
|
-
const Pact$2 = lib$
|
|
4783
|
+
const { Core: Core$d, Schema: Schema$f, Instance: Instance$8 } = lib$1;
|
|
4784
|
+
const Pact$2 = lib$3;
|
|
5050
4785
|
|
|
5051
4786
|
|
|
5052
4787
|
const compile$a = (schema, ast) => Pact$2.pipeline([
|
|
@@ -5083,8 +4818,8 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5083
4818
|
|
|
5084
4819
|
var common = { isObject, escapeRegExp: escapeRegExp$1, splitUrl: splitUrl$1 };
|
|
5085
4820
|
|
|
5086
|
-
const { Core: Core$c, Schema: Schema$e, Instance: Instance$7 } = lib$
|
|
5087
|
-
const Pact$1 = lib$
|
|
4821
|
+
const { Core: Core$c, Schema: Schema$e, Instance: Instance$7 } = lib$1;
|
|
4822
|
+
const Pact$1 = lib$3;
|
|
5088
4823
|
const { escapeRegExp } = common;
|
|
5089
4824
|
|
|
5090
4825
|
|
|
@@ -5109,7 +4844,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5109
4844
|
|
|
5110
4845
|
var properties = { compile: compile$9, interpret: interpret$9, collectEvaluatedProperties: collectEvaluatedProperties$3 };
|
|
5111
4846
|
|
|
5112
|
-
const { Core: Core$b, Instance: Instance$6 } = lib$
|
|
4847
|
+
const { Core: Core$b, Instance: Instance$6 } = lib$1;
|
|
5113
4848
|
|
|
5114
4849
|
|
|
5115
4850
|
const compile$8 = (schema, ast) => Core$b.compileSchema(schema, ast);
|
|
@@ -5121,7 +4856,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5121
4856
|
|
|
5122
4857
|
var propertyNames = { compile: compile$8, interpret: interpret$8 };
|
|
5123
4858
|
|
|
5124
|
-
const { Core: Core$a, Schema: Schema$d } = lib$
|
|
4859
|
+
const { Core: Core$a, Schema: Schema$d } = lib$1;
|
|
5125
4860
|
const { splitUrl } = common;
|
|
5126
4861
|
|
|
5127
4862
|
|
|
@@ -5146,7 +4881,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5146
4881
|
|
|
5147
4882
|
var dynamicRef = { compile: compile$7, interpret: interpret$7, collectEvaluatedProperties: collectEvaluatedProperties$2, collectEvaluatedItems: collectEvaluatedItems$3 };
|
|
5148
4883
|
|
|
5149
|
-
const { Core: Core$9, Schema: Schema$c } = lib$
|
|
4884
|
+
const { Core: Core$9, Schema: Schema$c } = lib$1;
|
|
5150
4885
|
|
|
5151
4886
|
|
|
5152
4887
|
const compile$6 = async (ref, ast) => {
|
|
@@ -5160,7 +4895,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5160
4895
|
|
|
5161
4896
|
var ref = { compile: compile$6, interpret: interpret$6, collectEvaluatedProperties: collectEvaluatedProperties$1, collectEvaluatedItems: collectEvaluatedItems$2 };
|
|
5162
4897
|
|
|
5163
|
-
const { Schema: Schema$b, Instance: Instance$5 } = lib$
|
|
4898
|
+
const { Schema: Schema$b, Instance: Instance$5 } = lib$1;
|
|
5164
4899
|
|
|
5165
4900
|
|
|
5166
4901
|
const compile$5 = (schema) => Schema$b.value(schema);
|
|
@@ -5171,8 +4906,8 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5171
4906
|
|
|
5172
4907
|
var required = { compile: compile$5, interpret: interpret$5 };
|
|
5173
4908
|
|
|
5174
|
-
const { Core: Core$8, Schema: Schema$a, Instance: Instance$4 } = lib$
|
|
5175
|
-
const Pact = lib$
|
|
4909
|
+
const { Core: Core$8, Schema: Schema$a, Instance: Instance$4 } = lib$1;
|
|
4910
|
+
const Pact = lib$3;
|
|
5176
4911
|
|
|
5177
4912
|
|
|
5178
4913
|
const compile$4 = (schema, ast) => {
|
|
@@ -5196,7 +4931,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5196
4931
|
|
|
5197
4932
|
var tupleItems = { compile: compile$4, interpret: interpret$4, collectEvaluatedItems: collectEvaluatedItems$1 };
|
|
5198
4933
|
|
|
5199
|
-
const { Schema: Schema$9, Instance: Instance$3 } = lib$
|
|
4934
|
+
const { Schema: Schema$9, Instance: Instance$3 } = lib$1;
|
|
5200
4935
|
|
|
5201
4936
|
|
|
5202
4937
|
const compile$3 = (schema) => Schema$9.value(schema);
|
|
@@ -5204,7 +4939,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5204
4939
|
|
|
5205
4940
|
var type = { compile: compile$3, interpret: interpret$3 };
|
|
5206
4941
|
|
|
5207
|
-
const { Core: Core$7, Schema: Schema$8, Instance: Instance$2 } = lib$
|
|
4942
|
+
const { Core: Core$7, Schema: Schema$8, Instance: Instance$2 } = lib$1;
|
|
5208
4943
|
|
|
5209
4944
|
|
|
5210
4945
|
const compile$2 = async (schema, ast, parentSchema) => {
|
|
@@ -5228,7 +4963,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5228
4963
|
|
|
5229
4964
|
var unevaluatedItems = { compile: compile$2, interpret: interpret$2, collectEvaluatedItems };
|
|
5230
4965
|
|
|
5231
|
-
const { Core: Core$6, Schema: Schema$7, Instance: Instance$1 } = lib$
|
|
4966
|
+
const { Core: Core$6, Schema: Schema$7, Instance: Instance$1 } = lib$1;
|
|
5232
4967
|
|
|
5233
4968
|
|
|
5234
4969
|
const compile$1 = async (schema, ast, parentSchema) => {
|
|
@@ -5253,7 +4988,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5253
4988
|
|
|
5254
4989
|
var unevaluatedProperties = { compile: compile$1, interpret: interpret$1, collectEvaluatedProperties };
|
|
5255
4990
|
|
|
5256
|
-
const { Schema: Schema$6, Instance } = lib$
|
|
4991
|
+
const { Schema: Schema$6, Instance } = lib$1;
|
|
5257
4992
|
const jsonStringify = fastestStableStringify;
|
|
5258
4993
|
|
|
5259
4994
|
|
|
@@ -5270,7 +5005,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5270
5005
|
|
|
5271
5006
|
var uniqueItems = { compile, interpret };
|
|
5272
5007
|
|
|
5273
|
-
const { Keywords: Keywords$1 } = lib$
|
|
5008
|
+
const { Keywords: Keywords$1 } = lib$1;
|
|
5274
5009
|
|
|
5275
5010
|
|
|
5276
5011
|
var keywords$5 = {
|
|
@@ -5297,14 +5032,12 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5297
5032
|
items202012: items202012,
|
|
5298
5033
|
maxItems: maxItems,
|
|
5299
5034
|
maxLength: maxLength,
|
|
5300
|
-
maxLength6: maxLength6,
|
|
5301
5035
|
maxProperties: maxProperties,
|
|
5302
5036
|
maximumExclusiveMaximum: maximumExclusiveMaximum,
|
|
5303
5037
|
maximum: maximum,
|
|
5304
5038
|
metaData: Keywords$1.metaData,
|
|
5305
5039
|
minItems: minItems,
|
|
5306
5040
|
minLength: minLength,
|
|
5307
|
-
minLength6: minLength6,
|
|
5308
5041
|
minProperties: minProperties,
|
|
5309
5042
|
minimumExclusiveMinimum: minimumExclusiveMinimum,
|
|
5310
5043
|
minimum: minimum,
|
|
@@ -5476,7 +5209,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5476
5209
|
"default": {}
|
|
5477
5210
|
}`;
|
|
5478
5211
|
|
|
5479
|
-
const { Core: Core$5, Schema: Schema$5 } = lib$
|
|
5212
|
+
const { Core: Core$5, Schema: Schema$5 } = lib$1;
|
|
5480
5213
|
const keywords$4 = keywords$5;
|
|
5481
5214
|
const metaSchema$4 = schema$4;
|
|
5482
5215
|
|
|
@@ -5678,7 +5411,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5678
5411
|
"default": {}
|
|
5679
5412
|
}`;
|
|
5680
5413
|
|
|
5681
|
-
const { Core: Core$4, Schema: Schema$4 } = lib$
|
|
5414
|
+
const { Core: Core$4, Schema: Schema$4 } = lib$1;
|
|
5682
5415
|
const keywords$3 = keywords$5;
|
|
5683
5416
|
const metaSchema$3 = schema$3;
|
|
5684
5417
|
|
|
@@ -5710,11 +5443,11 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5710
5443
|
"format": keywords$3.metaData,
|
|
5711
5444
|
"items": keywords$3.items,
|
|
5712
5445
|
"maxItems": keywords$3.maxItems,
|
|
5713
|
-
"maxLength": keywords$3.
|
|
5446
|
+
"maxLength": keywords$3.maxLength,
|
|
5714
5447
|
"maxProperties": keywords$3.maxProperties,
|
|
5715
5448
|
"maximum": keywords$3.maximum,
|
|
5716
5449
|
"minItems": keywords$3.minItems,
|
|
5717
|
-
"minLength": keywords$3.
|
|
5450
|
+
"minLength": keywords$3.minLength,
|
|
5718
5451
|
"minProperties": keywords$3.minProperties,
|
|
5719
5452
|
"minimum": keywords$3.minimum,
|
|
5720
5453
|
"multipleOf": keywords$3.multipleOf,
|
|
@@ -5903,7 +5636,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5903
5636
|
"default": true
|
|
5904
5637
|
}`;
|
|
5905
5638
|
|
|
5906
|
-
const { Core: Core$3, Schema: Schema$3 } = lib$
|
|
5639
|
+
const { Core: Core$3, Schema: Schema$3 } = lib$1;
|
|
5907
5640
|
const keywords$2 = keywords$5;
|
|
5908
5641
|
const metaSchema$2 = schema$2;
|
|
5909
5642
|
|
|
@@ -5937,11 +5670,11 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
5937
5670
|
"else": keywords$2.else,
|
|
5938
5671
|
"items": keywords$2.items,
|
|
5939
5672
|
"maxItems": keywords$2.maxItems,
|
|
5940
|
-
"maxLength": keywords$2.
|
|
5673
|
+
"maxLength": keywords$2.maxLength,
|
|
5941
5674
|
"maxProperties": keywords$2.maxProperties,
|
|
5942
5675
|
"maximum": keywords$2.maximum,
|
|
5943
5676
|
"minItems": keywords$2.minItems,
|
|
5944
|
-
"minLength": keywords$2.
|
|
5677
|
+
"minLength": keywords$2.minLength,
|
|
5945
5678
|
"minProperties": keywords$2.minProperties,
|
|
5946
5679
|
"minimum": keywords$2.minimum,
|
|
5947
5680
|
"multipleOf": keywords$2.multipleOf,
|
|
@@ -6286,7 +6019,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
6286
6019
|
}
|
|
6287
6020
|
}`;
|
|
6288
6021
|
|
|
6289
|
-
const { Core: Core$2, Schema: Schema$2 } = lib$
|
|
6022
|
+
const { Core: Core$2, Schema: Schema$2 } = lib$1;
|
|
6290
6023
|
const keywords$1 = keywords$5;
|
|
6291
6024
|
const metaSchema$1 = schema$1;
|
|
6292
6025
|
const coreMetaSchema$1 = core$1;
|
|
@@ -6345,11 +6078,11 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
6345
6078
|
"exclusiveMaximum": keywords$1.exclusiveMaximum,
|
|
6346
6079
|
"exclusiveMinimum": keywords$1.exclusiveMinimum,
|
|
6347
6080
|
"maxItems": keywords$1.maxItems,
|
|
6348
|
-
"maxLength": keywords$1.
|
|
6081
|
+
"maxLength": keywords$1.maxLength,
|
|
6349
6082
|
"maxProperties": keywords$1.maxProperties,
|
|
6350
6083
|
"maximum": keywords$1.maximum,
|
|
6351
6084
|
"minItems": keywords$1.minItems,
|
|
6352
|
-
"minLength": keywords$1.
|
|
6085
|
+
"minLength": keywords$1.minLength,
|
|
6353
6086
|
"minProperties": keywords$1.minProperties,
|
|
6354
6087
|
"minimum": keywords$1.minimum,
|
|
6355
6088
|
"multipleOf": keywords$1.multipleOf,
|
|
@@ -6733,7 +6466,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
6733
6466
|
}
|
|
6734
6467
|
}`;
|
|
6735
6468
|
|
|
6736
|
-
const { Core: Core$1, Schema: Schema$1 } = lib$
|
|
6469
|
+
const { Core: Core$1, Schema: Schema$1 } = lib$1;
|
|
6737
6470
|
const keywords = keywords$5;
|
|
6738
6471
|
const metaSchema = schema;
|
|
6739
6472
|
const coreMetaSchema = core;
|
|
@@ -6792,11 +6525,11 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
6792
6525
|
"exclusiveMaximum": keywords.exclusiveMaximum,
|
|
6793
6526
|
"exclusiveMinimum": keywords.exclusiveMinimum,
|
|
6794
6527
|
"maxItems": keywords.maxItems,
|
|
6795
|
-
"maxLength": keywords.
|
|
6528
|
+
"maxLength": keywords.maxLength,
|
|
6796
6529
|
"maxProperties": keywords.maxProperties,
|
|
6797
6530
|
"maximum": keywords.maximum,
|
|
6798
6531
|
"minItems": keywords.minItems,
|
|
6799
|
-
"minLength": keywords.
|
|
6532
|
+
"minLength": keywords.minLength,
|
|
6800
6533
|
"minProperties": keywords.minProperties,
|
|
6801
6534
|
"minimum": keywords.minimum,
|
|
6802
6535
|
"multipleOf": keywords.multipleOf,
|
|
@@ -6837,7 +6570,7 @@ System.register('JsonSchema', [], (function (exports) {
|
|
|
6837
6570
|
"unevaluatedProperties": keywords.unevaluatedProperties
|
|
6838
6571
|
});
|
|
6839
6572
|
|
|
6840
|
-
const { Core, Schema, InvalidSchemaError } = lib$
|
|
6573
|
+
const { Core, Schema, InvalidSchemaError } = lib$1;
|
|
6841
6574
|
const Keywords = keywords$5;
|
|
6842
6575
|
|
|
6843
6576
|
|