@finnair/path 5.0.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/Path.js +165 -0
- package/dist/cjs/PathMatcher.js +137 -0
- package/dist/cjs/Projection.js +88 -0
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/matchers.js +136 -0
- package/dist/cjs/package.json +3 -0
- package/dist/esm/Path.d.ts +27 -0
- package/dist/esm/PathMatcher.d.ts +17 -0
- package/dist/esm/Projection.d.ts +12 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/matchers.d.ts +46 -0
- package/dist/esm/package.json +3 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/package.json +14 -6
- package/tsconfig.cjs.json +9 -0
- /package/dist/{Path.d.ts → cjs/Path.d.ts} +0 -0
- /package/dist/{PathMatcher.d.ts → cjs/PathMatcher.d.ts} +0 -0
- /package/dist/{Projection.d.ts → cjs/Projection.d.ts} +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{matchers.d.ts → cjs/matchers.d.ts} +0 -0
- /package/dist/{Path.js → esm/Path.js} +0 -0
- /package/dist/{PathMatcher.js → esm/PathMatcher.js} +0 -0
- /package/dist/{Projection.js → esm/Projection.js} +0 -0
- /package/dist/{index.js → esm/index.js} +0 -0
- /package/dist/{matchers.js → esm/matchers.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.1.0](https://github.com/finnair/v-validation/compare/v5.0.1...v5.1.0) (2023-11-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* support both ESM and CommonJS ([#96](https://github.com/finnair/v-validation/issues/96)) ([c32a104](https://github.com/finnair/v-validation/commit/c32a1040cd2e0412005cf9e6ff869569ab194950))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [5.0.1](https://github.com/finnair/v-validation/compare/v5.0.0...v5.0.1) (2023-10-13)
|
|
7
18
|
|
|
8
19
|
|
package/dist/cjs/Path.js
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Path = void 0;
|
|
4
|
+
const identifierPattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
5
|
+
class Path {
|
|
6
|
+
static ROOT = new Path([]);
|
|
7
|
+
path;
|
|
8
|
+
constructor(path) {
|
|
9
|
+
this.path = path;
|
|
10
|
+
Object.freeze(this.path);
|
|
11
|
+
Object.freeze(this);
|
|
12
|
+
}
|
|
13
|
+
index(index) {
|
|
14
|
+
Path.validateIndex(index);
|
|
15
|
+
return new Path(this.path.concat(index));
|
|
16
|
+
}
|
|
17
|
+
property(property) {
|
|
18
|
+
Path.validateProperty(property);
|
|
19
|
+
return new Path(this.path.concat(property));
|
|
20
|
+
}
|
|
21
|
+
connectTo(newRootPath) {
|
|
22
|
+
return new Path(newRootPath.path.concat(this.path));
|
|
23
|
+
}
|
|
24
|
+
concat(childPath) {
|
|
25
|
+
return new Path(this.path.concat(childPath.path));
|
|
26
|
+
}
|
|
27
|
+
toJSON() {
|
|
28
|
+
return this.path.reduce((pathString, component) => pathString + Path.componentToString(component), '$');
|
|
29
|
+
}
|
|
30
|
+
get length() {
|
|
31
|
+
return this.path.length;
|
|
32
|
+
}
|
|
33
|
+
componentAt(index) {
|
|
34
|
+
return this.path[index];
|
|
35
|
+
}
|
|
36
|
+
[Symbol.iterator]() {
|
|
37
|
+
return this.path[Symbol.iterator]();
|
|
38
|
+
}
|
|
39
|
+
get(root) {
|
|
40
|
+
if (this.path.length === 0) {
|
|
41
|
+
return root;
|
|
42
|
+
}
|
|
43
|
+
let current = root;
|
|
44
|
+
let index = 0;
|
|
45
|
+
for (; index < this.path.length - 1 && typeof current === 'object'; index++) {
|
|
46
|
+
const component = this.path[index];
|
|
47
|
+
current = current[component];
|
|
48
|
+
}
|
|
49
|
+
if (index === this.path.length - 1 && typeof current === 'object') {
|
|
50
|
+
return current[this.path[this.path.length - 1]];
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
unset(root) {
|
|
55
|
+
return this.set(root, undefined);
|
|
56
|
+
}
|
|
57
|
+
set(root, value) {
|
|
58
|
+
if (this.path.length === 0) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
let pathIndex = -1;
|
|
62
|
+
const _root = toObject(root, this.path);
|
|
63
|
+
let current = _root;
|
|
64
|
+
for (pathIndex = 0; pathIndex < this.path.length - 1 && current; pathIndex++) {
|
|
65
|
+
const component = this.path[pathIndex];
|
|
66
|
+
const child = toObject(current[component], this.path);
|
|
67
|
+
current[component] = child;
|
|
68
|
+
current = child;
|
|
69
|
+
}
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
if (current !== undefined) {
|
|
72
|
+
delete current[this.path[pathIndex]];
|
|
73
|
+
// Truncate undefined tail of an array
|
|
74
|
+
if (Array.isArray(current)) {
|
|
75
|
+
let i = current.length - 1;
|
|
76
|
+
while (i >= 0 && current[i] === undefined) {
|
|
77
|
+
i--;
|
|
78
|
+
}
|
|
79
|
+
current.length = i + 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
current[this.path[pathIndex]] = value;
|
|
85
|
+
}
|
|
86
|
+
return _root;
|
|
87
|
+
function toObject(current, path) {
|
|
88
|
+
if (typeof current === 'object') {
|
|
89
|
+
return current;
|
|
90
|
+
}
|
|
91
|
+
else if (value !== undefined) {
|
|
92
|
+
if (typeof path[pathIndex + 1] === 'number') {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return {};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
static property(property) {
|
|
105
|
+
return Path.ROOT.property(property);
|
|
106
|
+
}
|
|
107
|
+
static index(index) {
|
|
108
|
+
return Path.ROOT.index(index);
|
|
109
|
+
}
|
|
110
|
+
static of(...path) {
|
|
111
|
+
if (path.length === 0) {
|
|
112
|
+
return Path.ROOT;
|
|
113
|
+
}
|
|
114
|
+
path.forEach(this.validateComponent);
|
|
115
|
+
return new Path(path);
|
|
116
|
+
}
|
|
117
|
+
static validateComponent(component) {
|
|
118
|
+
const type = typeof component;
|
|
119
|
+
if (type === 'number') {
|
|
120
|
+
if (component < 0 || !Number.isInteger(component)) {
|
|
121
|
+
throw new Error('Expected component to be an integer >= 0');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else if (type !== 'string') {
|
|
125
|
+
throw new Error(`Expected component to be a string or an integer, got ${type}: ${component}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
static validateIndex(index) {
|
|
129
|
+
if (typeof index !== 'number') {
|
|
130
|
+
throw new Error(`Expected index to be a number, got ${index}`);
|
|
131
|
+
}
|
|
132
|
+
if (index < 0 || !Number.isInteger(index)) {
|
|
133
|
+
throw new Error('Expected index to be an integer >= 0');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
static validateProperty(property) {
|
|
137
|
+
if (typeof property !== 'string') {
|
|
138
|
+
throw new Error(`Expected property to be a string, got ${property}`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
static isValidIdentifier(str) {
|
|
142
|
+
return identifierPattern.test(str);
|
|
143
|
+
}
|
|
144
|
+
static componentToString(component) {
|
|
145
|
+
if (typeof component === 'number') {
|
|
146
|
+
return Path.indexToString(component);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
return Path.propertyToString(component);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
static indexToString(index) {
|
|
153
|
+
return '[' + index + ']';
|
|
154
|
+
}
|
|
155
|
+
static propertyToString(property) {
|
|
156
|
+
if (Path.isValidIdentifier(property)) {
|
|
157
|
+
return '.' + property;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
// JsonPath uses single quotes, but that would require custom encoding of single quotes as JSON string encoding doesn't have escape for it
|
|
161
|
+
return '[' + JSON.stringify(property) + ']';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.Path = Path;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnionMatcher = exports.Node = exports.IndexMatcher = exports.PropertyMatcher = exports.AnyProperty = exports.AnyIndex = exports.PathMatcher = void 0;
|
|
4
|
+
const Path_js_1 = require("./Path.js");
|
|
5
|
+
const matchers_js_1 = require("./matchers.js");
|
|
6
|
+
Object.defineProperty(exports, "Node", { enumerable: true, get: function () { return matchers_js_1.Node; } });
|
|
7
|
+
Object.defineProperty(exports, "PropertyMatcher", { enumerable: true, get: function () { return matchers_js_1.PropertyMatcher; } });
|
|
8
|
+
Object.defineProperty(exports, "IndexMatcher", { enumerable: true, get: function () { return matchers_js_1.IndexMatcher; } });
|
|
9
|
+
Object.defineProperty(exports, "AnyIndex", { enumerable: true, get: function () { return matchers_js_1.AnyIndex; } });
|
|
10
|
+
Object.defineProperty(exports, "AnyProperty", { enumerable: true, get: function () { return matchers_js_1.AnyProperty; } });
|
|
11
|
+
Object.defineProperty(exports, "UnionMatcher", { enumerable: true, get: function () { return matchers_js_1.UnionMatcher; } });
|
|
12
|
+
class PathMatcher {
|
|
13
|
+
expressions;
|
|
14
|
+
allowGaps;
|
|
15
|
+
constructor(expressions) {
|
|
16
|
+
this.expressions = expressions;
|
|
17
|
+
let allowGaps = false;
|
|
18
|
+
expressions.forEach(expression => (allowGaps = allowGaps || expression.allowGaps));
|
|
19
|
+
this.allowGaps = allowGaps;
|
|
20
|
+
Object.freeze(this.expressions);
|
|
21
|
+
Object.freeze(this);
|
|
22
|
+
}
|
|
23
|
+
find(root, first) {
|
|
24
|
+
if (this.expressions.length === 0) {
|
|
25
|
+
return [new matchers_js_1.Node(Path_js_1.Path.ROOT, root)];
|
|
26
|
+
}
|
|
27
|
+
if (typeof root !== 'object') {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
const currentPath = [];
|
|
31
|
+
const results = [];
|
|
32
|
+
const handlers = [];
|
|
33
|
+
for (let i = 0; i < this.expressions.length - 1; i++) {
|
|
34
|
+
handlers[i] = intermediateHandler(i, this.expressions);
|
|
35
|
+
}
|
|
36
|
+
handlers[this.expressions.length - 1] = resultHandler();
|
|
37
|
+
this.expressions[0].find(root, handlers[0]);
|
|
38
|
+
return results;
|
|
39
|
+
function intermediateHandler(index, expressions) {
|
|
40
|
+
return (value, component) => {
|
|
41
|
+
currentPath[index] = component;
|
|
42
|
+
return expressions[index + 1].find(value, handlers[index + 1]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function resultHandler() {
|
|
46
|
+
return (value, component) => {
|
|
47
|
+
results.push(new matchers_js_1.Node(Path_js_1.Path.of(...currentPath, component), value));
|
|
48
|
+
return !first;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
findFirst(root) {
|
|
53
|
+
return this.find(root, true)[0];
|
|
54
|
+
}
|
|
55
|
+
findValues(root, first) {
|
|
56
|
+
if (this.expressions.length === 0) {
|
|
57
|
+
return [root];
|
|
58
|
+
}
|
|
59
|
+
if (typeof root !== 'object') {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
const results = [];
|
|
63
|
+
const handlers = [];
|
|
64
|
+
for (let i = 0; i < this.expressions.length - 1; i++) {
|
|
65
|
+
handlers[i] = intermediateHandler(i, this.expressions);
|
|
66
|
+
}
|
|
67
|
+
handlers[this.expressions.length - 1] = resultHandler();
|
|
68
|
+
this.expressions[0].find(root, handlers[0]);
|
|
69
|
+
return results;
|
|
70
|
+
function intermediateHandler(index, expressions) {
|
|
71
|
+
return (value) => {
|
|
72
|
+
return expressions[index + 1].find(value, handlers[index + 1]);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function resultHandler() {
|
|
76
|
+
return (value) => {
|
|
77
|
+
results.push(value);
|
|
78
|
+
return !first;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
findFirstValue(root) {
|
|
83
|
+
return this.findValues(root, true)[0];
|
|
84
|
+
}
|
|
85
|
+
match(path) {
|
|
86
|
+
if (path.length !== this.expressions.length) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
let index = 0;
|
|
90
|
+
for (; index < this.expressions.length; index++) {
|
|
91
|
+
if (!this.expressions[index].test(path.componentAt(index))) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
prefixMatch(path) {
|
|
98
|
+
if (path.length < this.expressions.length) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
let index = 0;
|
|
102
|
+
for (; index < this.expressions.length; index++) {
|
|
103
|
+
if (!this.expressions[index].test(path.componentAt(index))) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
partialMatch(path) {
|
|
110
|
+
let index = 0;
|
|
111
|
+
for (; index < this.expressions.length && index < path.length; index++) {
|
|
112
|
+
if (!this.expressions[index].test(path.componentAt(index))) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
toJSON() {
|
|
119
|
+
return this.expressions.reduce((str, expression) => str + expression.toString(), '$');
|
|
120
|
+
}
|
|
121
|
+
static of(...path) {
|
|
122
|
+
return new PathMatcher(path.map(component => {
|
|
123
|
+
const type = typeof component;
|
|
124
|
+
if (type === 'number') {
|
|
125
|
+
return new matchers_js_1.IndexMatcher(component);
|
|
126
|
+
}
|
|
127
|
+
if (type === 'string') {
|
|
128
|
+
return new matchers_js_1.PropertyMatcher(component);
|
|
129
|
+
}
|
|
130
|
+
if ((0, matchers_js_1.isPathExpression)(component)) {
|
|
131
|
+
return component;
|
|
132
|
+
}
|
|
133
|
+
throw new Error(`Unrecognized PathComponent: ${component} of type ${type}`);
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.PathMatcher = PathMatcher;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.projection = exports.Projection = void 0;
|
|
4
|
+
const PathMatcher_js_1 = require("./PathMatcher.js");
|
|
5
|
+
class Projection {
|
|
6
|
+
includes;
|
|
7
|
+
excludes;
|
|
8
|
+
allowGaps;
|
|
9
|
+
constructor(includes, excludes, allowGaps) {
|
|
10
|
+
this.includes = includes;
|
|
11
|
+
this.excludes = excludes;
|
|
12
|
+
this.allowGaps = allowGaps;
|
|
13
|
+
Object.freeze(this.includes);
|
|
14
|
+
Object.freeze(this.excludes);
|
|
15
|
+
Object.freeze(this);
|
|
16
|
+
}
|
|
17
|
+
map(input) {
|
|
18
|
+
let output;
|
|
19
|
+
if (this.includes.length) {
|
|
20
|
+
input = jsonClone(input);
|
|
21
|
+
output = {};
|
|
22
|
+
this.includes.forEach(expression => include(input, expression, output));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
output = this.excludes.length ? jsonClone(input) : input;
|
|
26
|
+
}
|
|
27
|
+
if (this.excludes.length) {
|
|
28
|
+
this.excludes.forEach(expression => exclude(output, expression));
|
|
29
|
+
}
|
|
30
|
+
if (this.allowGaps) {
|
|
31
|
+
return removeGaps(output);
|
|
32
|
+
}
|
|
33
|
+
return output;
|
|
34
|
+
}
|
|
35
|
+
match(path) {
|
|
36
|
+
if (this.includes.length) {
|
|
37
|
+
if (!this.includes.some(expression => expression.partialMatch(path))) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (this.excludes.length) {
|
|
42
|
+
if (this.excludes.some(expression => expression.prefixMatch(path))) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
static of(includes, excludes) {
|
|
49
|
+
includes = includes ? includes.map(validatePathMatcher) : [];
|
|
50
|
+
excludes = excludes ? excludes.map(validatePathMatcher) : [];
|
|
51
|
+
const allowGaps = includes.some(expression => expression.allowGaps) || excludes.some(expression => expression.allowGaps);
|
|
52
|
+
return new Projection(includes, excludes, allowGaps);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.Projection = Projection;
|
|
56
|
+
function projection(includes, excludes) {
|
|
57
|
+
const projection = Projection.of(includes, excludes);
|
|
58
|
+
return (input) => projection.map(input);
|
|
59
|
+
}
|
|
60
|
+
exports.projection = projection;
|
|
61
|
+
function validatePathMatcher(value) {
|
|
62
|
+
if (value instanceof PathMatcher_js_1.PathMatcher) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
throw new Error(`Expected an instance of PathMatcher, got ${value}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function include(input, matcher, output) {
|
|
70
|
+
matcher.find(input).forEach(node => node.path.set(output, node.value));
|
|
71
|
+
}
|
|
72
|
+
function exclude(output, matcher) {
|
|
73
|
+
matcher.find(output).forEach(node => node.path.unset(output));
|
|
74
|
+
}
|
|
75
|
+
function jsonClone(value) {
|
|
76
|
+
return JSON.parse(JSON.stringify(value));
|
|
77
|
+
}
|
|
78
|
+
function removeGaps(value) {
|
|
79
|
+
if (typeof value == 'object') {
|
|
80
|
+
if (Array.isArray(value)) {
|
|
81
|
+
value = value.filter(item => item !== undefined);
|
|
82
|
+
}
|
|
83
|
+
for (const key in value) {
|
|
84
|
+
value[key] = removeGaps(value[key]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Path = void 0;
|
|
18
|
+
var Path_js_1 = require("./Path.js");
|
|
19
|
+
Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return Path_js_1.Path; } });
|
|
20
|
+
__exportStar(require("./PathMatcher.js"), exports);
|
|
21
|
+
__exportStar(require("./matchers.js"), exports);
|
|
22
|
+
__exportStar(require("./Projection.js"), exports);
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnyProperty = exports.AnyIndex = exports.UnionMatcher = exports.PropertyMatcher = exports.IndexMatcher = exports.Node = exports.isPathExpression = void 0;
|
|
4
|
+
const Path_js_1 = require("./Path.js");
|
|
5
|
+
function isPathExpression(component) {
|
|
6
|
+
return !!component && typeof component.test === 'function' && typeof component.find === 'function';
|
|
7
|
+
}
|
|
8
|
+
exports.isPathExpression = isPathExpression;
|
|
9
|
+
class Node {
|
|
10
|
+
path;
|
|
11
|
+
value;
|
|
12
|
+
constructor(path, value) {
|
|
13
|
+
this.path = path;
|
|
14
|
+
this.value = value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Node = Node;
|
|
18
|
+
class IndexMatcher {
|
|
19
|
+
index;
|
|
20
|
+
allowGaps = true;
|
|
21
|
+
constructor(index) {
|
|
22
|
+
this.index = index;
|
|
23
|
+
Path_js_1.Path.validateIndex(index);
|
|
24
|
+
}
|
|
25
|
+
find(current, callback) {
|
|
26
|
+
if (Array.isArray(current) && this.index < current.length) {
|
|
27
|
+
return callback(current[this.index], this.index);
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
test(component) {
|
|
32
|
+
return component === this.index;
|
|
33
|
+
}
|
|
34
|
+
toString() {
|
|
35
|
+
return Path_js_1.Path.indexToString(this.index);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.IndexMatcher = IndexMatcher;
|
|
39
|
+
class PropertyMatcher {
|
|
40
|
+
property;
|
|
41
|
+
allowGaps = false;
|
|
42
|
+
constructor(property) {
|
|
43
|
+
this.property = property;
|
|
44
|
+
Path_js_1.Path.validateProperty(property);
|
|
45
|
+
}
|
|
46
|
+
find(current, callback) {
|
|
47
|
+
if (typeof current === 'object' && current.hasOwnProperty(this.property)) {
|
|
48
|
+
return callback(current[this.property], this.property);
|
|
49
|
+
}
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
test(component) {
|
|
53
|
+
return String(component) === this.property;
|
|
54
|
+
}
|
|
55
|
+
toString() {
|
|
56
|
+
return Path_js_1.Path.propertyToString(this.property);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.PropertyMatcher = PropertyMatcher;
|
|
60
|
+
class UnionMatcher {
|
|
61
|
+
components;
|
|
62
|
+
constructor(components) {
|
|
63
|
+
this.components = components;
|
|
64
|
+
if (components.length < 2) {
|
|
65
|
+
throw new Error('Expected at least 2 properties');
|
|
66
|
+
}
|
|
67
|
+
components.forEach(Path_js_1.Path.validateComponent);
|
|
68
|
+
}
|
|
69
|
+
find(current, callback) {
|
|
70
|
+
if (typeof current === 'object') {
|
|
71
|
+
for (const component of this.components) {
|
|
72
|
+
if (current.hasOwnProperty(component)) {
|
|
73
|
+
if (!callback(current[component], component)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
test(component) {
|
|
82
|
+
const str = String(component);
|
|
83
|
+
return this.components.find(component => String(component) === str) !== undefined;
|
|
84
|
+
}
|
|
85
|
+
get allowGaps() {
|
|
86
|
+
return this.components.some(component => typeof component === 'number');
|
|
87
|
+
}
|
|
88
|
+
toString() {
|
|
89
|
+
return `[${this.components.map(this.propertyToString).join(',')}]`;
|
|
90
|
+
}
|
|
91
|
+
static of(...components) {
|
|
92
|
+
return new UnionMatcher(components);
|
|
93
|
+
}
|
|
94
|
+
propertyToString(property) {
|
|
95
|
+
return JSON.stringify(property);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.UnionMatcher = UnionMatcher;
|
|
99
|
+
exports.AnyIndex = {
|
|
100
|
+
allowGaps: false,
|
|
101
|
+
find: (current, callback) => {
|
|
102
|
+
if (Array.isArray(current)) {
|
|
103
|
+
for (let i = 0; i < current.length; i++) {
|
|
104
|
+
if (!callback(current[i], i)) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
},
|
|
111
|
+
test: (component) => {
|
|
112
|
+
return typeof component === 'number' && Number.isInteger(component) && component >= 0;
|
|
113
|
+
},
|
|
114
|
+
toString: () => {
|
|
115
|
+
return '[*]';
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
exports.AnyProperty = {
|
|
119
|
+
allowGaps: false,
|
|
120
|
+
find: (current, callback) => {
|
|
121
|
+
if (typeof current === 'object') {
|
|
122
|
+
for (let key in current) {
|
|
123
|
+
if (!callback(current[key], key)) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return true;
|
|
129
|
+
},
|
|
130
|
+
test: () => {
|
|
131
|
+
return true;
|
|
132
|
+
},
|
|
133
|
+
toString: () => {
|
|
134
|
+
return '.*';
|
|
135
|
+
},
|
|
136
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type PathComponent = number | string;
|
|
2
|
+
export declare class Path {
|
|
3
|
+
static readonly ROOT: Path;
|
|
4
|
+
private readonly path;
|
|
5
|
+
private constructor();
|
|
6
|
+
index(index: number): Path;
|
|
7
|
+
property(property: string): Path;
|
|
8
|
+
connectTo(newRootPath: Path): Path;
|
|
9
|
+
concat(childPath: Path): Path;
|
|
10
|
+
toJSON(): string;
|
|
11
|
+
get length(): number;
|
|
12
|
+
componentAt(index: number): PathComponent;
|
|
13
|
+
[Symbol.iterator](): IterableIterator<PathComponent>;
|
|
14
|
+
get(root: any): any;
|
|
15
|
+
unset(root: any): any;
|
|
16
|
+
set(root: any, value: any): any;
|
|
17
|
+
static property(property: string): Path;
|
|
18
|
+
static index(index: number): Path;
|
|
19
|
+
static of(...path: PathComponent[]): Path;
|
|
20
|
+
static validateComponent(component: any): void;
|
|
21
|
+
static validateIndex(index: any): void;
|
|
22
|
+
static validateProperty(property: any): void;
|
|
23
|
+
static isValidIdentifier(str: string): boolean;
|
|
24
|
+
static componentToString(component: PathComponent): string;
|
|
25
|
+
static indexToString(index: number): string;
|
|
26
|
+
static propertyToString(property: string): string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Path, PathComponent } from './Path.js';
|
|
2
|
+
import { Node, PathExpression, PropertyMatcher, IndexMatcher, AnyIndex, AnyProperty, UnionMatcher } from './matchers.js';
|
|
3
|
+
export declare class PathMatcher {
|
|
4
|
+
private readonly expressions;
|
|
5
|
+
readonly allowGaps: boolean;
|
|
6
|
+
private constructor();
|
|
7
|
+
find(root: any, first?: boolean): Node[];
|
|
8
|
+
findFirst(root: any): undefined | Node;
|
|
9
|
+
findValues(root: any, first?: boolean): any[];
|
|
10
|
+
findFirstValue(root: any): any;
|
|
11
|
+
match(path: Path): boolean;
|
|
12
|
+
prefixMatch(path: Path): boolean;
|
|
13
|
+
partialMatch(path: Path): boolean;
|
|
14
|
+
toJSON(): string;
|
|
15
|
+
static of(...path: (PathComponent | PathExpression)[]): PathMatcher;
|
|
16
|
+
}
|
|
17
|
+
export { AnyIndex, AnyProperty, PropertyMatcher, IndexMatcher, Node, PathExpression, UnionMatcher };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PathMatcher } from './PathMatcher.js';
|
|
2
|
+
import { Path } from './Path.js';
|
|
3
|
+
export declare class Projection {
|
|
4
|
+
private readonly includes;
|
|
5
|
+
private readonly excludes;
|
|
6
|
+
private readonly allowGaps;
|
|
7
|
+
private constructor();
|
|
8
|
+
map<T>(input: T): Partial<T>;
|
|
9
|
+
match(path: Path): boolean;
|
|
10
|
+
static of(includes?: PathMatcher[], excludes?: PathMatcher[]): Projection;
|
|
11
|
+
}
|
|
12
|
+
export declare function projection<T>(includes?: PathMatcher[], excludes?: PathMatcher[]): (input: T) => Partial<T>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Path, PathComponent } from './Path.js';
|
|
2
|
+
type Continue = boolean;
|
|
3
|
+
export interface MatchHandler {
|
|
4
|
+
(value: any, component: PathComponent): Continue;
|
|
5
|
+
}
|
|
6
|
+
export interface PathExpression {
|
|
7
|
+
find(current: any, callback: MatchHandler): Continue;
|
|
8
|
+
test(component: PathComponent): boolean;
|
|
9
|
+
readonly allowGaps: boolean;
|
|
10
|
+
toString(): string;
|
|
11
|
+
}
|
|
12
|
+
export declare function isPathExpression(component: PathComponent | PathExpression): component is PathExpression;
|
|
13
|
+
export declare class Node {
|
|
14
|
+
readonly path: Path;
|
|
15
|
+
readonly value: any;
|
|
16
|
+
constructor(path: Path, value: any);
|
|
17
|
+
}
|
|
18
|
+
export declare class IndexMatcher implements PathExpression {
|
|
19
|
+
private readonly index;
|
|
20
|
+
readonly allowGaps = true;
|
|
21
|
+
constructor(index: number);
|
|
22
|
+
find(current: any, callback: MatchHandler): Continue;
|
|
23
|
+
test(component: PathComponent): boolean;
|
|
24
|
+
toString(): string;
|
|
25
|
+
}
|
|
26
|
+
export declare class PropertyMatcher implements PathExpression {
|
|
27
|
+
private readonly property;
|
|
28
|
+
readonly allowGaps = false;
|
|
29
|
+
constructor(property: string);
|
|
30
|
+
find(current: any, callback: MatchHandler): Continue;
|
|
31
|
+
test(component: PathComponent): boolean;
|
|
32
|
+
toString(): string;
|
|
33
|
+
}
|
|
34
|
+
export declare class UnionMatcher implements PathExpression {
|
|
35
|
+
private readonly components;
|
|
36
|
+
constructor(components: PathComponent[]);
|
|
37
|
+
find(current: any, callback: MatchHandler): Continue;
|
|
38
|
+
test(component: PathComponent): boolean;
|
|
39
|
+
get allowGaps(): boolean;
|
|
40
|
+
toString(): string;
|
|
41
|
+
static of(...components: PathComponent[]): UnionMatcher;
|
|
42
|
+
private propertyToString;
|
|
43
|
+
}
|
|
44
|
+
export declare const AnyIndex: PathExpression;
|
|
45
|
+
export declare const AnyProperty: PathExpression;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/path.ts","../src/matchers.ts","../src/pathmatcher.ts","../src/projection.ts","../src/index.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/chai-subset/index.d.ts","../../../node_modules/@types/color-name/index.d.ts","../../../node_modules/@types/deep-equal/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/luxon/src/zone.d.ts","../../../node_modules/@types/luxon/src/misc.d.ts","../../../node_modules/@types/luxon/src/duration.d.ts","../../../node_modules/@types/luxon/src/interval.d.ts","../../../node_modules/@types/luxon/src/datetime.d.ts","../../../node_modules/@types/luxon/src/info.d.ts","../../../node_modules/@types/luxon/src/settings.d.ts","../../../node_modules/@types/luxon/src/luxon.d.ts","../../../node_modules/@types/luxon/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/moo/index.d.ts","../../../node_modules/@types/nearley/index.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/uuid-validate/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"bc496ef4377553e461efcf7cc5a5a57cf59f9962aea06b5e722d54a36bf66ea1","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"a4b9ab8a56dc8266dd50ca39b4e5e00749e386263acd451dd6f0754e0d0546bc","signature":"e69c2a812df71addd97629b25fef907cceec74e5e83fae9ee812dcb35a9add47"},{"version":"755c741514c502cbf92156e4ee5d2776b8af0de043fc60a52aa68812e6d7c5f6","signature":"267d5cc229b2a7932566cdc02282e0359e644a500311faf743a92703cbdc6905"},{"version":"ff497cb5b6f3394babf1c02b4607e45b3976be8f57fa25d1583bf67dc55794b0","signature":"d6c2af1a0c2760cedc92775327462ebf35e186c293706bf7b7f8c42b8570f946"},{"version":"fc0b5238541731d9798d7b9555143e2f8896e56dd9f6be6efec929f7df3bb8a5","signature":"d4b99fb2393b80a976a107797b9ac5e2e5b6d39e3c55151c520de76e86010980"},"e8a5d7c71a42e00944e2426648c9bec5a104f7b5009fc8f3cdb9faa2db46bb57",{"version":"648c383d6cea51b7dce41935a906920d1256df3fc600c2094120080e03281e2a","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","2e345cb6511f4c4c60c274df6626c94f3182939034f06cdf414bfbccc584f822","b7b0f360867e85305ac700e4c6f084d45adfa417a8f5d964b6f609f99ee92772","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","45938045285af93edb0065d83c44410e18b34fd1285b5ce46e025a46d5042a46","52ed17fe2c0a4bb27a4f13e99234b3d1f364dc27f9bd7964946d5ec62792a0cc","347c99f9511fb30c62af9a051ac54ac1a4b851f73cd9f5b0834ba2d2d4006c45","2f007f7338e8e2fe4691511ab9564fa8924d2ed4294f195bc4848a43bba8c004","d1a198a52f14bc491d502b9319a7bda1f5b2c187a2b094bfee3b94df36796721","ed4be5a31cd8dbb8e31ccde91e7b8c1552eb191c4787d19ed028763577674772","d40e7cb322841e538e686b8a39f05e8b3e0b6d5b7c6687efa69f0cbf9124c4ec","c5641bb951da5d5252e7d8a806ec3c84f42555b5bd6a0879dbf1c7df1b8bd850","501df3ff1166189ef3611db2d498048e6d6783eb8c4ae29d04d79f6caef0308a","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","3602dfff3072caea42f23a9b63fb34a7b0c95a62b93ce2add5fe6b159447845e","7a3a840d2d933c48b6cbe80e3c74ab4f874314953457ac387759a251cab01d56","1be422477101fb35ce8c78fb19f763a5ad6aa7204d60b56ca26ceb55ccec67b8","09df3b4f1c937f02e7fee2836d4c4d7a63e66db70fd4d4e97126f4542cc21d9d","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","adda9e3915c6bf15e360356a41d950881a51dbe44f9a6088155836b040820663","b4855526ac5a822d6e0005e4b62ee49c599bf89897e4109135283d660e60291c","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","80ad053918e96087d9da8d092ff9f90520c9fc199c8bfd9340266dd8f38f364e","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","d70119390aece1794bf4988f10ea750d13455f5286977d35027d43dd2e9841cf",{"version":"4d719cfab49ae4045d15cb6bed0f38ad3d7d6eb7f277d2603502a0f862ca3182","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"62486c25ff70799e9faac5c6108820969617daeb6e65644c212d03cdb5902a3c","affectsGlobalScope":true},"546ab07e19116d935ad982e76a223275b53bff7771dab94f433b7ab04652936e","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"aefb5a4a209f756b580eb53ea771cca8aad411603926f307a5e5b8ec6b16dcf6","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","f5a8b7ec4b798c88679194a8ebc25dcb6f5368e6e5811fcda9fe12b0d445b8db","b86e1a45b29437f3a99bad4147cb9fe2357617e8008c0484568e5bb5138d6e13","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","42c431e7965b641106b5e25ab3283aa4865ca7bb9909610a2abfa6226e4348be","0b7e732af0a9599be28c091d6bd1cb22c856ec0d415d4749c087c3881ca07a56","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"8d6138a264ddc6f94f16e99d4e117a2d6eb31b217891cf091b6437a2f114d561","affectsGlobalScope":true},"3b4c85eea12187de9929a76792b98406e8778ce575caca8c574f06da82622c54","f788131a39c81e0c9b9e463645dd7132b5bc1beb609b0e31e5c1ceaea378b4df","0c236069ce7bded4f6774946e928e4b3601894d294054af47a553f7abcafe2c1","21894466693f64957b9bd4c80fa3ec7fdfd4efa9d1861e070aca23f10220c9b2","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","ad8848c289c0b633452e58179f46edccd14b5a0fe90ebce411f79ff040b803e0",{"version":"5d4ef3f46c7f9d62f7c964f9f9ccdd293be99fb3dcc66c983f2aea7430e3c7c6","affectsGlobalScope":true},"91f8b5abcdff8f9ecb9656b9852878718416fb7700b2c4fad8331e5b97c080bb","59d8f064f86a4a2be03b33c0efcc9e7a268ad27b22f82dce16899f3364f70ba8","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"f49fb15c4aa06b65b0dce4db4584bfd8a9f74644baef1511b404dc95be34af00","affectsGlobalScope":true},{"version":"d48009cbe8a30a504031cc82e1286f78fed33b7a42abf7602c23b5547b382563","affectsGlobalScope":true},"7aaeb5e62f90e1b2be0fc4844df78cdb1be15c22b427bc6c39d57308785b8f10","3ba30205a029ebc0c91d7b1ab4da73f6277d730ca1fc6692d5a9144c6772c76b","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","458b216959c231df388a5de9dcbcafd4b4ca563bc3784d706d0455467d7d4942","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"24ba151e213906027e2b1f5223d33575a3612b0234a0e2b56119520bbe0e594b","affectsGlobalScope":true},{"version":"cbf046714f3a3ba2544957e1973ac94aa819fa8aa668846fa8de47eb1c41b0b2","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eae74e3d50820f37c72c0679fed959cd1e63c98f6a146a55b8c4361582fa6a52","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"aed89e3c18f4c659ee8153a76560dffda23e2d801e1e60d7a67abd84bc555f8d","affectsGlobalScope":true},{"version":"0ed13c80faeb2b7160bffb4926ff299c468e67a37a645b3ae0917ba0db633c1b","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","2f940651c2f30e6b29f8743fae3f40b7b1c03615184f837132b56ea75edad08b","5749c327c3f789f658072f8340786966c8b05ea124a56c1d8d60e04649495a4d",{"version":"c9d62b2a51b2ff166314d8be84f6881a7fcbccd37612442cf1c70d27d5352f50","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"d3f4c342fb62f348f25f54b473b0ab7371828cbf637134194fa9cdf04856f87b","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","f5b3e0557ad67f756a329f9a0e9d0e46bde1f46a5a0f16dfa1d9d26bdcb6019d"],"root":[[58,62]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"downlevelIteration":true,"esModuleInterop":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":true,"outDir":"./cjs","rootDir":"../src","strict":true,"target":9},"fileIdsList":[[63,161],[161],[76,161],[69,71,72,77,161],[70,73,161],[69,70,161],[71,73,161],[69,70,71,72,73,74,75,161],[69,161],[82,161],[118,161],[119,124,152,161],[120,131,132,139,149,160,161],[120,121,131,139,161],[122,161],[123,124,132,140,161],[124,149,157,161],[125,127,131,139,161],[126,161],[127,128,161],[131,161],[129,131,161],[118,131,161],[131,132,133,149,160,161],[131,132,133,146,149,152,161],[116,161,165],[127,131,134,139,149,160,161],[131,132,134,135,139,149,157,160,161],[134,136,149,157,160,161],[82,83,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167],[131,137,161],[138,160,161,165],[127,131,139,149,161],[140,161],[141,161],[118,142,161],[143,159,161,165],[144,161],[145,161],[131,146,147,161],[146,148,161,163],[119,131,149,150,151,152,161],[119,149,151,161],[149,150,161],[152,161],[153,161],[118,149,161],[131,155,156,161],[155,156,161],[124,139,149,157,161],[158,161],[139,159,161],[119,134,145,160,161],[124,161],[149,161,162],[138,161,163],[161,164],[119,124,131,133,142,149,160,161,163,165],[149,161,166],[93,97,160,161],[93,149,160,161],[88,161],[90,93,157,160,161],[139,157,161],[161,168],[88,161,168],[90,93,139,160,161],[85,86,89,92,119,131,149,160,161],[85,91,161],[89,93,119,152,160,161,168],[119,161,168],[109,119,161,168],[87,88,161,168],[93,161],[87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,161],[93,100,101,161],[91,93,101,102,161],[92,161],[85,88,93,161],[93,97,101,102,161],[97,161],[91,93,96,160,161],[85,90,91,93,97,100,161],[119,149,161],[88,93,109,119,161,165,168],[58,59,60,61,161],[58,161],[58,59,161],[58,60,161],[58],[58,59],[58,60]],"referencedMap":[[64,1],[63,2],[65,2],[66,2],[67,2],[68,2],[77,3],[73,4],[71,5],[74,6],[72,7],[76,8],[70,2],[75,9],[69,2],[78,2],[79,2],[80,2],[81,2],[82,10],[83,10],[118,11],[119,12],[120,13],[121,14],[122,15],[123,16],[124,17],[125,18],[126,19],[127,20],[128,20],[130,21],[129,22],[131,23],[132,24],[133,25],[117,26],[167,2],[134,27],[135,28],[136,29],[168,30],[137,31],[138,32],[139,33],[140,34],[141,35],[142,36],[143,37],[144,38],[145,39],[146,40],[147,40],[148,41],[149,42],[151,43],[150,44],[152,45],[153,46],[154,47],[155,48],[156,49],[157,50],[158,51],[159,52],[160,53],[161,54],[162,55],[163,56],[164,57],[165,58],[166,59],[169,2],[170,2],[171,2],[84,2],[56,2],[57,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[20,2],[24,2],[21,2],[22,2],[23,2],[25,2],[26,2],[27,2],[5,2],[28,2],[29,2],[30,2],[31,2],[6,2],[35,2],[32,2],[33,2],[34,2],[36,2],[7,2],[37,2],[42,2],[43,2],[38,2],[39,2],[40,2],[41,2],[8,2],[47,2],[44,2],[45,2],[46,2],[48,2],[9,2],[49,2],[50,2],[51,2],[54,2],[52,2],[53,2],[1,2],[55,2],[100,60],[107,61],[99,60],[114,62],[91,63],[90,64],[113,65],[108,66],[111,67],[93,68],[92,69],[88,70],[87,71],[110,72],[89,73],[94,74],[95,2],[98,74],[85,2],[116,75],[115,74],[102,76],[103,77],[105,78],[101,79],[104,80],[109,65],[96,81],[97,82],[106,83],[86,84],[112,85],[62,86],[59,87],[58,2],[60,88],[61,89]],"exportedModulesMap":[[64,1],[63,2],[65,2],[66,2],[67,2],[68,2],[77,3],[73,4],[71,5],[74,6],[72,7],[76,8],[70,2],[75,9],[69,2],[78,2],[79,2],[80,2],[81,2],[82,10],[83,10],[118,11],[119,12],[120,13],[121,14],[122,15],[123,16],[124,17],[125,18],[126,19],[127,20],[128,20],[130,21],[129,22],[131,23],[132,24],[133,25],[117,26],[167,2],[134,27],[135,28],[136,29],[168,30],[137,31],[138,32],[139,33],[140,34],[141,35],[142,36],[143,37],[144,38],[145,39],[146,40],[147,40],[148,41],[149,42],[151,43],[150,44],[152,45],[153,46],[154,47],[155,48],[156,49],[157,50],[158,51],[159,52],[160,53],[161,54],[162,55],[163,56],[164,57],[165,58],[166,59],[169,2],[170,2],[171,2],[84,2],[56,2],[57,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[4,2],[20,2],[24,2],[21,2],[22,2],[23,2],[25,2],[26,2],[27,2],[5,2],[28,2],[29,2],[30,2],[31,2],[6,2],[35,2],[32,2],[33,2],[34,2],[36,2],[7,2],[37,2],[42,2],[43,2],[38,2],[39,2],[40,2],[41,2],[8,2],[47,2],[44,2],[45,2],[46,2],[48,2],[9,2],[49,2],[50,2],[51,2],[54,2],[52,2],[53,2],[1,2],[55,2],[100,60],[107,61],[99,60],[114,62],[91,63],[90,64],[113,65],[108,66],[111,67],[93,68],[92,69],[88,70],[87,71],[110,72],[89,73],[94,74],[95,2],[98,74],[85,2],[116,75],[115,74],[102,76],[103,77],[105,78],[101,79],[104,80],[109,65],[96,81],[97,82],[106,83],[86,84],[112,85],[62,86],[59,90],[60,91],[61,92]],"semanticDiagnosticsPerFile":[64,63,65,66,67,68,77,73,71,74,72,76,70,75,69,78,79,80,81,82,83,118,119,120,121,122,123,124,125,126,127,128,130,129,131,132,133,117,167,134,135,136,168,137,138,139,140,141,142,143,144,145,146,147,148,149,151,150,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,169,170,171,84,56,57,11,10,2,12,13,14,15,16,17,18,19,3,4,20,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,8,47,44,45,46,48,9,49,50,51,54,52,53,1,55,100,107,99,114,91,90,113,108,111,93,92,88,87,110,89,94,95,98,85,116,115,102,103,105,101,104,109,96,97,106,86,112,62,59,58,60,61],"latestChangedDtsFile":"./cjs/index.d.ts"},"version":"5.2.2"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finnair/path",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Simple object path as array of strings and numbers",
|
|
6
|
-
"
|
|
6
|
+
"main": "./dist/cjs/index.js",
|
|
7
|
+
"module": "./dist/cjs/index.js",
|
|
8
|
+
"types": "./dist/cjs/index.d.ts",
|
|
7
9
|
"exports": {
|
|
8
10
|
".": {
|
|
11
|
+
"require": {
|
|
12
|
+
"types": "./dist/cjs/index.d.ts",
|
|
13
|
+
"default": "./dist/cjs/index.js"
|
|
14
|
+
},
|
|
9
15
|
"import": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"default": "./dist/index.js"
|
|
16
|
+
"types": "./dist/esm/index.d.ts",
|
|
17
|
+
"default": "./dist/esm/index.js"
|
|
12
18
|
}
|
|
13
19
|
}
|
|
14
20
|
},
|
|
@@ -27,7 +33,9 @@
|
|
|
27
33
|
"JsonPath"
|
|
28
34
|
],
|
|
29
35
|
"scripts": {
|
|
30
|
-
"build": "
|
|
36
|
+
"build": "yarn build:cjs && yarn build:esm",
|
|
37
|
+
"build:cjs": "tsc -b tsconfig.cjs.json && cp ../../package.cjs.json dist/cjs/package.json",
|
|
38
|
+
"build:esm": "tsc -b . && cp ../../package.esm.json dist/esm/package.json"
|
|
31
39
|
},
|
|
32
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "fdba98ed7487efbd1d54c6bfbc85805b45a65299"
|
|
33
41
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|