@jmespath-community/jmespath 1.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/LICENSE +373 -0
- package/README.md +176 -0
- package/dist/jmespath.esm.js +2267 -0
- package/dist/jmespath.esm.min.js +2 -0
- package/dist/jmespath.esm.min.js.map +1 -0
- package/dist/jmespath.umd.js +2296 -0
- package/dist/jmespath.umd.min.js +2 -0
- package/dist/jmespath.umd.min.js.map +1 -0
- package/dist/lib/AST.type.js +3 -0
- package/dist/lib/AST.type.js.map +1 -0
- package/dist/lib/JSON.type.js +3 -0
- package/dist/lib/JSON.type.js.map +1 -0
- package/dist/lib/Lexer.js +306 -0
- package/dist/lib/Lexer.js.map +1 -0
- package/dist/lib/Lexer.type.js +43 -0
- package/dist/lib/Lexer.type.js.map +1 -0
- package/dist/lib/Parser.js +406 -0
- package/dist/lib/Parser.js.map +1 -0
- package/dist/lib/Parser.type.js +3 -0
- package/dist/lib/Parser.type.js.map +1 -0
- package/dist/lib/Runtime.js +934 -0
- package/dist/lib/Runtime.js.map +1 -0
- package/dist/lib/Scope.js +29 -0
- package/dist/lib/Scope.js.map +1 -0
- package/dist/lib/TreeInterpreter.js +291 -0
- package/dist/lib/TreeInterpreter.js.map +1 -0
- package/dist/lib/index.js +67 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/utils/index.js +144 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/strings.js +95 -0
- package/dist/lib/utils/strings.js.map +1 -0
- package/dist/lib/utils/text.js +43 -0
- package/dist/lib/utils/text.js.map +1 -0
- package/dist/types/AST.type.d.ts +85 -0
- package/dist/types/JSON.type.d.ts +10 -0
- package/dist/types/Lexer.d.ts +19 -0
- package/dist/types/Lexer.type.d.ts +48 -0
- package/dist/types/Parser.d.ts +28 -0
- package/dist/types/Parser.type.d.ts +2 -0
- package/dist/types/Runtime.d.ts +87 -0
- package/dist/types/Scope.d.ts +7 -0
- package/dist/types/TreeInterpreter.d.ts +21 -0
- package/dist/types/index.d.ts +44 -0
- package/dist/types/utils/index.d.ts +16 -0
- package/dist/types/utils/strings.d.ts +11 -0
- package/dist/types/utils/text.d.ts +11 -0
- package/package.json +38 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upper = exports.trimRight = exports.trimLeft = exports.trim = exports.split = exports.replace = exports.padRight = exports.padLeft = exports.lower = exports.findLast = exports.findFirst = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const findFirst = (subject, sub, start, end) => {
|
|
6
|
+
if (!subject || !sub) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
start = Math.max((0, _1.ensureInteger)((start = start || 0)), 0);
|
|
10
|
+
end = Math.min((0, _1.ensureInteger)((end = end || subject.length)), subject.length);
|
|
11
|
+
const offset = subject.slice(start, end).indexOf(sub);
|
|
12
|
+
return offset === -1 ? null : offset + start;
|
|
13
|
+
};
|
|
14
|
+
exports.findFirst = findFirst;
|
|
15
|
+
const findLast = (subject, sub, start, end) => {
|
|
16
|
+
if (!subject || !sub) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
start = Math.max((0, _1.ensureInteger)((start = start || 0)), 0);
|
|
20
|
+
end = Math.min((0, _1.ensureInteger)((end = end || subject.length)), subject.length);
|
|
21
|
+
const offset = subject.slice(start, end).lastIndexOf(sub);
|
|
22
|
+
const result = offset === -1 ? null : offset + start;
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
exports.findLast = findLast;
|
|
26
|
+
const lower = (subject) => subject.toLowerCase();
|
|
27
|
+
exports.lower = lower;
|
|
28
|
+
const ensurePadFuncParams = (name, width, padding) => {
|
|
29
|
+
padding = padding || ' ';
|
|
30
|
+
if (padding.length > 1) {
|
|
31
|
+
throw new Error(`invalid value, ${name} expects its 'pad' parameter to be a valid string with a single codepoint`);
|
|
32
|
+
}
|
|
33
|
+
(0, _1.ensurePositiveInteger)(width);
|
|
34
|
+
return padding;
|
|
35
|
+
};
|
|
36
|
+
const padLeft = (subject, width, padding) => {
|
|
37
|
+
padding = ensurePadFuncParams('pad_left', width, padding);
|
|
38
|
+
return (subject && subject.padStart(width, padding)) || '';
|
|
39
|
+
};
|
|
40
|
+
exports.padLeft = padLeft;
|
|
41
|
+
const padRight = (subject, width, padding) => {
|
|
42
|
+
padding = ensurePadFuncParams('pad_right', width, padding);
|
|
43
|
+
return (subject && subject.padEnd(width, padding)) || '';
|
|
44
|
+
};
|
|
45
|
+
exports.padRight = padRight;
|
|
46
|
+
const replace = (subject, string, by, count) => {
|
|
47
|
+
if (count === 0) {
|
|
48
|
+
return subject;
|
|
49
|
+
}
|
|
50
|
+
if (!count) {
|
|
51
|
+
// emulating es2021: String.prototype.replaceAll()
|
|
52
|
+
return subject.split(string).join(by);
|
|
53
|
+
}
|
|
54
|
+
(0, _1.ensurePositiveInteger)(count);
|
|
55
|
+
[...Array(count).keys()].map(() => (subject = subject.replace(string, by)));
|
|
56
|
+
return subject;
|
|
57
|
+
};
|
|
58
|
+
exports.replace = replace;
|
|
59
|
+
const split = (subject, search, count) => {
|
|
60
|
+
if (subject.length == 0 && search.length === 0) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
if (count === null || count === undefined) {
|
|
64
|
+
return subject.split(search);
|
|
65
|
+
}
|
|
66
|
+
(0, _1.ensurePositiveInteger)(count);
|
|
67
|
+
if (count === 0) {
|
|
68
|
+
return [subject];
|
|
69
|
+
}
|
|
70
|
+
const split = subject.split(search);
|
|
71
|
+
return [
|
|
72
|
+
...split.slice(0, count),
|
|
73
|
+
split.slice(count).join(search)
|
|
74
|
+
];
|
|
75
|
+
};
|
|
76
|
+
exports.split = split;
|
|
77
|
+
const trim = (subject, chars) => {
|
|
78
|
+
return (0, exports.trimLeft)((0, exports.trimRight)(subject, chars), chars);
|
|
79
|
+
};
|
|
80
|
+
exports.trim = trim;
|
|
81
|
+
const trimLeft = (subject, chars) => {
|
|
82
|
+
return trimImpl(subject, list => new RegExp(`^[${list}]*(.*?)`), chars);
|
|
83
|
+
};
|
|
84
|
+
exports.trimLeft = trimLeft;
|
|
85
|
+
const trimRight = (subject, chars) => {
|
|
86
|
+
return trimImpl(subject, list => new RegExp(`(.*?)[${list}]*\$`), chars);
|
|
87
|
+
};
|
|
88
|
+
exports.trimRight = trimRight;
|
|
89
|
+
const trimImpl = (subject, regExper, chars) => {
|
|
90
|
+
const pattern = chars ? chars.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&') : '\\s\u0085';
|
|
91
|
+
return subject.replace(regExper(pattern), '$1');
|
|
92
|
+
};
|
|
93
|
+
const upper = (subject) => subject.toUpperCase();
|
|
94
|
+
exports.upper = upper;
|
|
95
|
+
//# sourceMappingURL=strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../src/utils/strings.ts"],"names":[],"mappings":";;;AAAA,wBAAyD;AAElD,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,GAAW,EAAE,KAAc,EAAE,GAAY,EAAiB,EAAE;IACrG,IAAI,CAAC,OAAO,IAAI,CAAC,GAAG,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IACD,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAA,gBAAa,EAAC,CAAC,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAA,gBAAa,EAAC,CAAC,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7E,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtD,O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CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;AAC3E,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AACF,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,QAAiC,EAAE,KAAc,EAAU,EAAE;IAC9F,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACrF,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC,CAAC;AAEK,MAAM,KAAK,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;AAA3D,QAAA,KAAK,SAAsD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Text = void 0;
|
|
4
|
+
class Text {
|
|
5
|
+
constructor(text) {
|
|
6
|
+
this._text = text;
|
|
7
|
+
}
|
|
8
|
+
get string() {
|
|
9
|
+
return this._text;
|
|
10
|
+
}
|
|
11
|
+
get length() {
|
|
12
|
+
return this.codePoints.length;
|
|
13
|
+
}
|
|
14
|
+
compareTo(other) {
|
|
15
|
+
return Text.compare(this, new Text(other));
|
|
16
|
+
}
|
|
17
|
+
static get comparer() {
|
|
18
|
+
const stringComparer = (left, right) => {
|
|
19
|
+
return new Text(left).compareTo(right);
|
|
20
|
+
};
|
|
21
|
+
return stringComparer;
|
|
22
|
+
}
|
|
23
|
+
static compare(left, right) {
|
|
24
|
+
const leftCp = left.codePoints;
|
|
25
|
+
const rightCp = right.codePoints;
|
|
26
|
+
for (let index = 0; index < Math.min(leftCp.length, rightCp.length); index++) {
|
|
27
|
+
if (leftCp[index] === rightCp[index]) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
return (leftCp[index] - rightCp[index]) > 0 ? 1 : -1;
|
|
31
|
+
}
|
|
32
|
+
return (leftCp.length - rightCp.length) > 0 ? 1 : -1;
|
|
33
|
+
}
|
|
34
|
+
reverse() {
|
|
35
|
+
return String.fromCodePoint(...this.codePoints.reverse());
|
|
36
|
+
}
|
|
37
|
+
get codePoints() {
|
|
38
|
+
const array = [...this._text].map(s => s.codePointAt(0));
|
|
39
|
+
return array;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.Text = Text;
|
|
43
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../../../src/utils/text.ts"],"names":[],"mappings":";;;AAAA,MAAa,IAAI;IAEhB,YAAY,IAAY;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAC/B,CAAC;IAEM,SAAS,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAEM,MAAM,KAAK,QAAQ;QACzB,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE;YAC9D,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC,CAAA;QACD,OAAO,cAAc,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,IAAU,EAAE,KAAW;QAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC;QACjC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAC;YAC5E,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,KAAK,CAAC,EAAC;gBACpC,SAAS;aACT;YACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACrD;QACD,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IAEM,OAAO;QACb,OAAO,MAAM,CAAC,aAAa,CAC1B,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,IAAY,UAAU;QACrB,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAChC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC,CAAC;QACzB,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AA/CD,oBA+CC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { JSONValue } from './JSON.type';
|
|
2
|
+
import { Token } from './Lexer.type';
|
|
3
|
+
export interface FieldNode {
|
|
4
|
+
readonly type: 'Field';
|
|
5
|
+
readonly name: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LiteralNode {
|
|
8
|
+
readonly type: 'Literal';
|
|
9
|
+
readonly value: JSONValue;
|
|
10
|
+
}
|
|
11
|
+
export interface IndexNode {
|
|
12
|
+
readonly type: 'Index';
|
|
13
|
+
readonly value: number;
|
|
14
|
+
}
|
|
15
|
+
export interface FilterProjectionNode {
|
|
16
|
+
readonly type: 'FilterProjection';
|
|
17
|
+
readonly left: ExpressionNode;
|
|
18
|
+
readonly right: ExpressionNode;
|
|
19
|
+
readonly condition: ExpressionNode;
|
|
20
|
+
}
|
|
21
|
+
export interface SliceNode {
|
|
22
|
+
readonly type: 'Slice';
|
|
23
|
+
readonly start: number | null;
|
|
24
|
+
readonly stop: number | null;
|
|
25
|
+
readonly step: number | null;
|
|
26
|
+
}
|
|
27
|
+
export type ComparatorType = 'GT' | 'LT' | 'GTE' | 'LTE' | 'NE' | 'EQ';
|
|
28
|
+
export interface ComparatorNode {
|
|
29
|
+
readonly type: 'Comparator';
|
|
30
|
+
readonly name: ComparatorType;
|
|
31
|
+
readonly left: ExpressionNode;
|
|
32
|
+
readonly right: ExpressionNode;
|
|
33
|
+
}
|
|
34
|
+
export interface KeyValuePairNode {
|
|
35
|
+
readonly type: 'KeyValuePair';
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly value: ExpressionNode;
|
|
38
|
+
}
|
|
39
|
+
export interface MultiSelectHashNode {
|
|
40
|
+
type: 'MultiSelectHash';
|
|
41
|
+
children: KeyValuePairNode[];
|
|
42
|
+
}
|
|
43
|
+
export interface MultiSelectListNode {
|
|
44
|
+
type: 'MultiSelectList';
|
|
45
|
+
children: ExpressionNode[];
|
|
46
|
+
}
|
|
47
|
+
export interface FunctionNode {
|
|
48
|
+
readonly type: 'Function';
|
|
49
|
+
readonly name: string;
|
|
50
|
+
readonly children: ExpressionNode[];
|
|
51
|
+
}
|
|
52
|
+
type BinaryExpressionType = 'AndExpression' | 'IndexExpression' | 'OrExpression' | 'Pipe' | 'Projection' | 'Subexpression' | 'ValueProjection';
|
|
53
|
+
type UnaryExpressionType = 'ExpressionReference' | 'Flatten' | 'NotExpression';
|
|
54
|
+
type SimpleExpressionType = 'Identity' | 'Current' | 'Root';
|
|
55
|
+
export interface SimpleExpressionNode<T extends SimpleExpressionType = SimpleExpressionType> {
|
|
56
|
+
readonly type: T;
|
|
57
|
+
}
|
|
58
|
+
export interface UnaryExpressionNode<T extends UnaryExpressionType = UnaryExpressionType> {
|
|
59
|
+
readonly type: T;
|
|
60
|
+
readonly child: ExpressionNode;
|
|
61
|
+
}
|
|
62
|
+
export type UnaryOperatorType = 'Plus' | 'Minus';
|
|
63
|
+
export interface UnaryArithmeticNode {
|
|
64
|
+
readonly type: 'Unary';
|
|
65
|
+
readonly operator: UnaryOperatorType;
|
|
66
|
+
readonly operand: ExpressionNode;
|
|
67
|
+
}
|
|
68
|
+
export interface BinaryExpressionNode<T extends BinaryExpressionType = BinaryExpressionType> {
|
|
69
|
+
readonly type: T;
|
|
70
|
+
readonly left: ExpressionNode;
|
|
71
|
+
readonly right: ExpressionNode;
|
|
72
|
+
}
|
|
73
|
+
export type BinaryOperatorType = 'Plus' | 'Minus' | 'Multiply' | Token.TOK_STAR | 'Divide' | 'Modulo' | 'Div';
|
|
74
|
+
export interface BinaryArithmeticNode {
|
|
75
|
+
readonly type: 'Arithmetic';
|
|
76
|
+
readonly operator: BinaryOperatorType;
|
|
77
|
+
readonly left: ExpressionNode;
|
|
78
|
+
readonly right: ExpressionNode;
|
|
79
|
+
}
|
|
80
|
+
export type ExpressionNode = SimpleExpressionNode | UnaryExpressionNode | UnaryArithmeticNode | BinaryExpressionNode | BinaryArithmeticNode | ComparatorNode | SliceNode | FilterProjectionNode | IndexNode | LiteralNode | FieldNode | MultiSelectHashNode | MultiSelectListNode | FunctionNode;
|
|
81
|
+
export type ExpressionReference = {
|
|
82
|
+
expref: true;
|
|
83
|
+
context: JSONValue;
|
|
84
|
+
} & ExpressionNode;
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ObjectDict<T = unknown> = Record<string, T | undefined>;
|
|
2
|
+
export type JSONPrimitive = string | number | boolean | null;
|
|
3
|
+
export type JSONValue = JSONPrimitive | JSONObject | JSONArray;
|
|
4
|
+
export type JSONObject = {
|
|
5
|
+
[member: string]: JSONValue;
|
|
6
|
+
};
|
|
7
|
+
export type JSONArrayObject = JSONObject[];
|
|
8
|
+
export type JSONArrayKeyValuePairs = [string, JSONValue][];
|
|
9
|
+
export type JSONArrayArray = JSONArray[];
|
|
10
|
+
export type JSONArray = JSONValue[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LexerOptions, LexerToken, Token } from './Lexer.type';
|
|
2
|
+
export declare const basicTokens: Record<string, Token>;
|
|
3
|
+
declare class StreamLexer {
|
|
4
|
+
private _current;
|
|
5
|
+
private _enable_legacy_literals;
|
|
6
|
+
tokenize(stream: string, options?: LexerOptions): LexerToken[];
|
|
7
|
+
private consumeUnquotedIdentifier;
|
|
8
|
+
private consumeQuotedIdentifier;
|
|
9
|
+
private consumeRawStringLiteral;
|
|
10
|
+
private consumeNumber;
|
|
11
|
+
private consumeLBracket;
|
|
12
|
+
private consumeOrElse;
|
|
13
|
+
private consumeOperator;
|
|
14
|
+
private consumeLiteral;
|
|
15
|
+
private looksLikeJSON;
|
|
16
|
+
private parseJSON;
|
|
17
|
+
}
|
|
18
|
+
export declare const Lexer: StreamLexer;
|
|
19
|
+
export default Lexer;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { JSONValue } from './JSON.type';
|
|
2
|
+
export declare enum Token {
|
|
3
|
+
TOK_EOF = "EOF",
|
|
4
|
+
TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier",
|
|
5
|
+
TOK_QUOTEDIDENTIFIER = "QuotedIdentifier",
|
|
6
|
+
TOK_RBRACKET = "Rbracket",
|
|
7
|
+
TOK_RPAREN = "Rparen",
|
|
8
|
+
TOK_COMMA = "Comma",
|
|
9
|
+
TOK_COLON = "Colon",
|
|
10
|
+
TOK_RBRACE = "Rbrace",
|
|
11
|
+
TOK_NUMBER = "Number",
|
|
12
|
+
TOK_CURRENT = "Current",
|
|
13
|
+
TOK_ROOT = "Root",
|
|
14
|
+
TOK_EXPREF = "Expref",
|
|
15
|
+
TOK_PIPE = "Pipe",
|
|
16
|
+
TOK_OR = "Or",
|
|
17
|
+
TOK_AND = "And",
|
|
18
|
+
TOK_EQ = "EQ",
|
|
19
|
+
TOK_GT = "GT",
|
|
20
|
+
TOK_LT = "LT",
|
|
21
|
+
TOK_GTE = "GTE",
|
|
22
|
+
TOK_LTE = "LTE",
|
|
23
|
+
TOK_NE = "NE",
|
|
24
|
+
TOK_PLUS = "Plus",
|
|
25
|
+
TOK_MINUS = "Minus",
|
|
26
|
+
TOK_MULTIPLY = "Multiply",
|
|
27
|
+
TOK_DIVIDE = "Divide",
|
|
28
|
+
TOK_MODULO = "Modulo",
|
|
29
|
+
TOK_DIV = "Div",
|
|
30
|
+
TOK_FLATTEN = "Flatten",
|
|
31
|
+
TOK_STAR = "Star",
|
|
32
|
+
TOK_FILTER = "Filter",
|
|
33
|
+
TOK_DOT = "Dot",
|
|
34
|
+
TOK_NOT = "Not",
|
|
35
|
+
TOK_LBRACE = "Lbrace",
|
|
36
|
+
TOK_LBRACKET = "Lbracket",
|
|
37
|
+
TOK_LPAREN = "Lparen",
|
|
38
|
+
TOK_LITERAL = "Literal"
|
|
39
|
+
}
|
|
40
|
+
export type LexerTokenValue = JSONValue;
|
|
41
|
+
export interface LexerToken {
|
|
42
|
+
type: Token;
|
|
43
|
+
value: LexerTokenValue;
|
|
44
|
+
start: number;
|
|
45
|
+
}
|
|
46
|
+
export interface LexerOptions {
|
|
47
|
+
enable_legacy_literals?: boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ExpressionNode } from './AST.type';
|
|
2
|
+
import { LexerToken } from './Lexer.type';
|
|
3
|
+
import { Options } from './Parser.type';
|
|
4
|
+
declare class TokenParser {
|
|
5
|
+
index: number;
|
|
6
|
+
tokens: LexerToken[];
|
|
7
|
+
parse(expression: string, options?: Options): ExpressionNode;
|
|
8
|
+
private loadTokens;
|
|
9
|
+
expression(rbp: number): ExpressionNode;
|
|
10
|
+
private lookahead;
|
|
11
|
+
private lookaheadToken;
|
|
12
|
+
private advance;
|
|
13
|
+
nud(token: LexerToken): ExpressionNode;
|
|
14
|
+
led(tokenName: string, left: ExpressionNode): ExpressionNode;
|
|
15
|
+
private match;
|
|
16
|
+
private errorToken;
|
|
17
|
+
private parseIndexExpression;
|
|
18
|
+
private projectIfSlice;
|
|
19
|
+
private parseSliceExpression;
|
|
20
|
+
private parseComparator;
|
|
21
|
+
private parseArithmetic;
|
|
22
|
+
private parseDotRHS;
|
|
23
|
+
private parseProjectionRHS;
|
|
24
|
+
private parseMultiselectList;
|
|
25
|
+
private parseMultiselectHash;
|
|
26
|
+
}
|
|
27
|
+
export declare const Parser: TokenParser;
|
|
28
|
+
export default Parser;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ExpressionNode } from './AST.type';
|
|
2
|
+
import type { JSONValue } from './JSON.type';
|
|
3
|
+
import type { TreeInterpreter } from './TreeInterpreter';
|
|
4
|
+
export declare enum InputArgument {
|
|
5
|
+
TYPE_NUMBER = 0,
|
|
6
|
+
TYPE_ANY = 1,
|
|
7
|
+
TYPE_STRING = 2,
|
|
8
|
+
TYPE_ARRAY = 3,
|
|
9
|
+
TYPE_OBJECT = 4,
|
|
10
|
+
TYPE_BOOLEAN = 5,
|
|
11
|
+
TYPE_EXPREF = 6,
|
|
12
|
+
TYPE_NULL = 7,
|
|
13
|
+
TYPE_ARRAY_NUMBER = 8,
|
|
14
|
+
TYPE_ARRAY_STRING = 9,
|
|
15
|
+
TYPE_ARRAY_OBJECT = 10,
|
|
16
|
+
TYPE_ARRAY_ARRAY = 11
|
|
17
|
+
}
|
|
18
|
+
export interface InputSignature {
|
|
19
|
+
types: InputArgument[];
|
|
20
|
+
variadic?: boolean;
|
|
21
|
+
optional?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export type RuntimeFunction<T extends any[], U> = (resolvedArgs: T) => U;
|
|
24
|
+
export interface FunctionSignature {
|
|
25
|
+
_func: RuntimeFunction<any, JSONValue>;
|
|
26
|
+
_signature: InputSignature[];
|
|
27
|
+
}
|
|
28
|
+
export interface FunctionTable {
|
|
29
|
+
[functionName: string]: FunctionSignature;
|
|
30
|
+
}
|
|
31
|
+
export declare class Runtime {
|
|
32
|
+
_interpreter: TreeInterpreter;
|
|
33
|
+
TYPE_NAME_TABLE: {
|
|
34
|
+
[InputArgument: number]: string;
|
|
35
|
+
};
|
|
36
|
+
constructor(interpreter: TreeInterpreter);
|
|
37
|
+
registerFunction(name: string, customFunction: RuntimeFunction<(JSONValue | ExpressionNode)[], JSONValue>, signature: InputSignature[]): void;
|
|
38
|
+
callFunction(name: string, resolvedArgs: (JSONValue | ExpressionNode)[]): JSONValue;
|
|
39
|
+
private validateInputSignatures;
|
|
40
|
+
private validateArgs;
|
|
41
|
+
private typeMatches;
|
|
42
|
+
private getTypeName;
|
|
43
|
+
createKeyFunction(exprefNode: ExpressionNode, allowedTypes: InputArgument[]): (x: JSONValue) => JSONValue;
|
|
44
|
+
private functionAbs;
|
|
45
|
+
private functionAvg;
|
|
46
|
+
private functionCeil;
|
|
47
|
+
private functionContains;
|
|
48
|
+
private functionEndsWith;
|
|
49
|
+
private functionFindFirst;
|
|
50
|
+
private functionFindLast;
|
|
51
|
+
private functionFloor;
|
|
52
|
+
private functionFromItems;
|
|
53
|
+
private functionGroupBy;
|
|
54
|
+
private functionItems;
|
|
55
|
+
private functionJoin;
|
|
56
|
+
private functionKeys;
|
|
57
|
+
private functionLength;
|
|
58
|
+
private functionLet;
|
|
59
|
+
private functionLower;
|
|
60
|
+
private functionMap;
|
|
61
|
+
private functionMax;
|
|
62
|
+
private functionMaxBy;
|
|
63
|
+
private functionMerge;
|
|
64
|
+
private functionMin;
|
|
65
|
+
private functionMinBy;
|
|
66
|
+
private functionNotNull;
|
|
67
|
+
private functionPadLeft;
|
|
68
|
+
private functionPadRight;
|
|
69
|
+
private functionReplace;
|
|
70
|
+
private functionSplit;
|
|
71
|
+
private functionReverse;
|
|
72
|
+
private functionSort;
|
|
73
|
+
private functionSortBy;
|
|
74
|
+
private functionStartsWith;
|
|
75
|
+
private functionSum;
|
|
76
|
+
private functionToArray;
|
|
77
|
+
private functionToNumber;
|
|
78
|
+
private functionToString;
|
|
79
|
+
private functionTrim;
|
|
80
|
+
private functionTrimLeft;
|
|
81
|
+
private functionTrimRight;
|
|
82
|
+
private functionType;
|
|
83
|
+
private functionUpper;
|
|
84
|
+
private functionValues;
|
|
85
|
+
private functionZip;
|
|
86
|
+
private functionTable;
|
|
87
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Runtime } from './Runtime';
|
|
2
|
+
import type { ExpressionNode, ExpressionReference, SliceNode } from './AST.type';
|
|
3
|
+
import type { JSONArray, JSONObject, JSONValue } from './JSON.type';
|
|
4
|
+
export declare class TreeInterpreter {
|
|
5
|
+
runtime: Runtime;
|
|
6
|
+
private _rootValue;
|
|
7
|
+
private _scope;
|
|
8
|
+
constructor();
|
|
9
|
+
withScope(scope: JSONObject): TreeInterpreter;
|
|
10
|
+
search(node: ExpressionNode, value: JSONValue): JSONValue;
|
|
11
|
+
visit(node: ExpressionNode, value: JSONValue | ExpressionNode): JSONValue | ExpressionNode | ExpressionReference;
|
|
12
|
+
computeSliceParams(arrayLength: number, sliceNode: SliceNode): {
|
|
13
|
+
start: number;
|
|
14
|
+
stop: number;
|
|
15
|
+
step: number;
|
|
16
|
+
};
|
|
17
|
+
capSliceRange(arrayLength: number, actualValue: number, step: number): number;
|
|
18
|
+
slice(collection: JSONArray, start: number, end: number, step: number): JSONArray;
|
|
19
|
+
}
|
|
20
|
+
export declare const TreeInterpreterInstance: TreeInterpreter;
|
|
21
|
+
export default TreeInterpreterInstance;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ExpressionNode } from './AST.type';
|
|
2
|
+
import { JSONValue } from './JSON.type';
|
|
3
|
+
import { LexerOptions, LexerToken } from './Lexer.type';
|
|
4
|
+
import { Options } from './Parser.type';
|
|
5
|
+
import { InputArgument, RuntimeFunction, InputSignature } from './Runtime';
|
|
6
|
+
import { ScopeChain } from './Scope';
|
|
7
|
+
export type { Options } from './Parser.type';
|
|
8
|
+
export type { FunctionSignature, RuntimeFunction, InputSignature } from './Runtime';
|
|
9
|
+
export declare const TYPE_ANY = InputArgument.TYPE_ANY;
|
|
10
|
+
export declare const TYPE_ARRAY = InputArgument.TYPE_ARRAY;
|
|
11
|
+
export declare const TYPE_ARRAY_ARRAY = InputArgument.TYPE_ARRAY_ARRAY;
|
|
12
|
+
export declare const TYPE_ARRAY_NUMBER = InputArgument.TYPE_ARRAY_NUMBER;
|
|
13
|
+
export declare const TYPE_ARRAY_OBJECT = InputArgument.TYPE_ARRAY_OBJECT;
|
|
14
|
+
export declare const TYPE_ARRAY_STRING = InputArgument.TYPE_ARRAY_STRING;
|
|
15
|
+
export declare const TYPE_BOOLEAN = InputArgument.TYPE_BOOLEAN;
|
|
16
|
+
export declare const TYPE_EXPREF = InputArgument.TYPE_EXPREF;
|
|
17
|
+
export declare const TYPE_NULL = InputArgument.TYPE_NULL;
|
|
18
|
+
export declare const TYPE_NUMBER = InputArgument.TYPE_NUMBER;
|
|
19
|
+
export declare const TYPE_OBJECT = InputArgument.TYPE_OBJECT;
|
|
20
|
+
export declare const TYPE_STRING = InputArgument.TYPE_STRING;
|
|
21
|
+
export declare function compile(expression: string, options?: Options): ExpressionNode;
|
|
22
|
+
export declare function tokenize(expression: string, options?: LexerOptions): LexerToken[];
|
|
23
|
+
export declare const registerFunction: (functionName: string, customFunction: RuntimeFunction<any[], JSONValue>, signature: InputSignature[]) => void;
|
|
24
|
+
export declare function search(data: JSONValue, expression: string, options?: Options): JSONValue;
|
|
25
|
+
export declare function Scope(): ScopeChain;
|
|
26
|
+
export declare const TreeInterpreter: import("./TreeInterpreter").TreeInterpreter;
|
|
27
|
+
export declare const jmespath: {
|
|
28
|
+
compile: typeof compile;
|
|
29
|
+
registerFunction: (functionName: string, customFunction: RuntimeFunction<any[], JSONValue>, signature: InputSignature[]) => void;
|
|
30
|
+
search: typeof search;
|
|
31
|
+
tokenize: typeof tokenize;
|
|
32
|
+
TreeInterpreter: import("./TreeInterpreter").TreeInterpreter;
|
|
33
|
+
TYPE_ANY: InputArgument;
|
|
34
|
+
TYPE_ARRAY_NUMBER: InputArgument;
|
|
35
|
+
TYPE_ARRAY_STRING: InputArgument;
|
|
36
|
+
TYPE_ARRAY: InputArgument;
|
|
37
|
+
TYPE_BOOLEAN: InputArgument;
|
|
38
|
+
TYPE_EXPREF: InputArgument;
|
|
39
|
+
TYPE_NULL: InputArgument;
|
|
40
|
+
TYPE_NUMBER: InputArgument;
|
|
41
|
+
TYPE_OBJECT: InputArgument;
|
|
42
|
+
TYPE_STRING: InputArgument;
|
|
43
|
+
};
|
|
44
|
+
export default jmespath;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSONValue } from "../JSON.type";
|
|
2
|
+
export declare const isObject: (obj: unknown) => obj is Record<string, unknown>;
|
|
3
|
+
export declare const strictDeepEqual: (first: unknown, second: unknown) => boolean;
|
|
4
|
+
export declare const isFalse: (obj: unknown) => boolean;
|
|
5
|
+
export declare const isAlpha: (ch: string) => boolean;
|
|
6
|
+
export declare const isNum: (ch: string) => boolean;
|
|
7
|
+
export declare const isAlphaNum: (ch: string) => boolean;
|
|
8
|
+
export declare const ensureInteger: (value: unknown) => number;
|
|
9
|
+
export declare const ensurePositiveInteger: (value: unknown) => number;
|
|
10
|
+
export declare const ensureNumbers: (...operands: (JSONValue | undefined)[]) => void;
|
|
11
|
+
export declare const add: (left?: JSONValue, right?: JSONValue) => number;
|
|
12
|
+
export declare const sub: (left?: JSONValue, right?: JSONValue) => number;
|
|
13
|
+
export declare const mul: (left?: JSONValue, right?: JSONValue) => number;
|
|
14
|
+
export declare const divide: (left?: JSONValue, right?: JSONValue) => number;
|
|
15
|
+
export declare const div: (left?: JSONValue, right?: JSONValue) => number;
|
|
16
|
+
export declare const mod: (left?: JSONValue, right?: JSONValue) => number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const findFirst: (subject: string, sub: string, start?: number, end?: number) => number | null;
|
|
2
|
+
export declare const findLast: (subject: string, sub: string, start?: number, end?: number) => number | null;
|
|
3
|
+
export declare const lower: (subject: string) => string;
|
|
4
|
+
export declare const padLeft: (subject: string, width: number, padding?: string) => string;
|
|
5
|
+
export declare const padRight: (subject: string, width: number, padding?: string) => string;
|
|
6
|
+
export declare const replace: (subject: string, string: string, by: string, count?: number) => string;
|
|
7
|
+
export declare const split: (subject: string, search: string, count?: number) => string[];
|
|
8
|
+
export declare const trim: (subject: string, chars?: string) => string;
|
|
9
|
+
export declare const trimLeft: (subject: string, chars?: string) => string;
|
|
10
|
+
export declare const trimRight: (subject: string, chars?: string) => string;
|
|
11
|
+
export declare const upper: (subject: string) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class Text {
|
|
2
|
+
private _text;
|
|
3
|
+
constructor(text: string);
|
|
4
|
+
get string(): string;
|
|
5
|
+
get length(): number;
|
|
6
|
+
compareTo(other: string): number;
|
|
7
|
+
static get comparer(): (lhs: string, rhs: string) => number;
|
|
8
|
+
static compare(left: Text, right: Text): number;
|
|
9
|
+
reverse(): string;
|
|
10
|
+
private get codePoints();
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jmespath-community/jmespath",
|
|
3
|
+
"description": "Typescript implementation of the JMESPath Community specification",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "JMESPath Community",
|
|
7
|
+
"email": "springcomp@users.noreply.github.com",
|
|
8
|
+
"url": "https://jmespath.site"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/jmespath.umd.js",
|
|
11
|
+
"module": "dist/jmespath.esm.js",
|
|
12
|
+
"typings": "dist/types/index.d.ts",
|
|
13
|
+
"types": "dist/types/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/nanoporetech/jmespath-ts#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/nanoporetech/jmespath-ts/issues",
|
|
20
|
+
"mail": ""
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"jmespath",
|
|
24
|
+
"jsonpath",
|
|
25
|
+
"query",
|
|
26
|
+
"json",
|
|
27
|
+
"jq",
|
|
28
|
+
"xpath"
|
|
29
|
+
],
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git://github.com/jmespath-community/typescript-jmespath"
|
|
33
|
+
},
|
|
34
|
+
"license": "MPL-2.0",
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=14.0.0"
|
|
37
|
+
}
|
|
38
|
+
}
|