@cobol-ts/cursor-loader-json 0.0.2 → 0.0.4
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/index.js.map +1 -0
- package/dist/src/cursor.loader.json.parser.d.ts +63 -0
- package/dist/src/cursor.loader.json.parser.js +125 -0
- package/dist/src/cursor.loader.json.parser.js.map +1 -0
- package/dist/src/cursor.loader.json.parser.spec.d.ts +1 -0
- package/dist/src/cursor.loader.json.parser.spec.js +469 -0
- package/dist/src/cursor.loader.json.parser.spec.js.map +1 -0
- package/dist/src/json.int.test.d.ts +1 -0
- package/dist/src/json.int.test.js +79 -0
- package/dist/src/json.int.test.js.map +1 -0
- package/dist/src/json.projected.array.spec.d.ts +1 -0
- package/dist/src/json.projected.array.spec.js +135 -0
- package/dist/src/json.projected.array.spec.js.map +1 -0
- package/dist/src/json.projection.support.d.ts +32 -0
- package/dist/src/json.projection.support.js +229 -0
- package/dist/src/json.projection.support.js.map +1 -0
- package/dist/src/json.projection.support.spec.d.ts +1 -0
- package/dist/src/json.projection.support.spec.js +261 -0
- package/dist/src/json.projection.support.spec.js.map +1 -0
- package/package.json +8 -7
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const json_projection_support_1 = require("./json.projection.support");
|
|
4
|
+
describe("jsonProjectionSupport", () => {
|
|
5
|
+
describe("compileProjectionPath", () => {
|
|
6
|
+
test("uses the tokenised JSON path unchanged", () => {
|
|
7
|
+
const path = ["customer", "age"];
|
|
8
|
+
expect(json_projection_support_1.jsonProjectionSupport.compileProjectionPath(undefined, undefined, path)).toBe(path);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
describe("integer", () => {
|
|
12
|
+
test("reads an integer at the root path", () => {
|
|
13
|
+
expect(json_projection_support_1.jsonProjectionSupport.integer(42, undefined, [])).toBe(42);
|
|
14
|
+
});
|
|
15
|
+
test("reads an integer from a nested object", () => {
|
|
16
|
+
const representation = {
|
|
17
|
+
customer: {
|
|
18
|
+
age: 62
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
expect(json_projection_support_1.jsonProjectionSupport.integer(representation, undefined, [
|
|
22
|
+
"customer",
|
|
23
|
+
"age"
|
|
24
|
+
])).toBe(62);
|
|
25
|
+
});
|
|
26
|
+
test("accepts negative integers", () => {
|
|
27
|
+
expect(json_projection_support_1.jsonProjectionSupport.integer({
|
|
28
|
+
value: -17
|
|
29
|
+
}, undefined, [
|
|
30
|
+
"value"
|
|
31
|
+
])).toBe(-17);
|
|
32
|
+
});
|
|
33
|
+
test("accepts zero", () => {
|
|
34
|
+
expect(json_projection_support_1.jsonProjectionSupport.integer({
|
|
35
|
+
value: 0
|
|
36
|
+
}, undefined, [
|
|
37
|
+
"value"
|
|
38
|
+
])).toBe(0);
|
|
39
|
+
});
|
|
40
|
+
test("rejects a non-integer number", () => {
|
|
41
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.integer({
|
|
42
|
+
value: 12.5
|
|
43
|
+
}, undefined, [
|
|
44
|
+
"value"
|
|
45
|
+
]), "JSON value is number 12.5; expected an integer.");
|
|
46
|
+
});
|
|
47
|
+
test("rejects a string containing an integer", () => {
|
|
48
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.integer({
|
|
49
|
+
value: "12"
|
|
50
|
+
}, undefined, [
|
|
51
|
+
"value"
|
|
52
|
+
]), 'JSON value is string "12"; expected an integer.');
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
describe("float", () => {
|
|
56
|
+
test("reads a floating point number", () => {
|
|
57
|
+
expect(json_projection_support_1.jsonProjectionSupport.float({
|
|
58
|
+
value: 12.5
|
|
59
|
+
}, undefined, [
|
|
60
|
+
"value"
|
|
61
|
+
])).toBe(12.5);
|
|
62
|
+
});
|
|
63
|
+
test("also accepts an integer", () => {
|
|
64
|
+
expect(json_projection_support_1.jsonProjectionSupport.float({
|
|
65
|
+
value: 12
|
|
66
|
+
}, undefined, [
|
|
67
|
+
"value"
|
|
68
|
+
])).toBe(12);
|
|
69
|
+
});
|
|
70
|
+
test("rejects a numeric string", () => {
|
|
71
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.float({
|
|
72
|
+
value: "12.5"
|
|
73
|
+
}, undefined, [
|
|
74
|
+
"value"
|
|
75
|
+
]), 'JSON value is string "12.5"; expected a number.');
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe("character", () => {
|
|
79
|
+
test("reads a single-character string", () => {
|
|
80
|
+
expect(json_projection_support_1.jsonProjectionSupport.character({
|
|
81
|
+
value: "A"
|
|
82
|
+
}, undefined, [
|
|
83
|
+
"value"
|
|
84
|
+
])).toBe("A");
|
|
85
|
+
});
|
|
86
|
+
test("rejects an empty string", () => {
|
|
87
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.character({
|
|
88
|
+
value: ""
|
|
89
|
+
}, undefined, [
|
|
90
|
+
"value"
|
|
91
|
+
]), 'JSON value is string ""; expected a single character.');
|
|
92
|
+
});
|
|
93
|
+
test("rejects a multi-character string", () => {
|
|
94
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.character({
|
|
95
|
+
value: "AB"
|
|
96
|
+
}, undefined, [
|
|
97
|
+
"value"
|
|
98
|
+
]), 'JSON value is string "AB"; expected a single character.');
|
|
99
|
+
});
|
|
100
|
+
test("rejects a non-string value", () => {
|
|
101
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.character({
|
|
102
|
+
value: 65
|
|
103
|
+
}, undefined, [
|
|
104
|
+
"value"
|
|
105
|
+
]), "JSON value is number 65; expected a single character.");
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
describe("string", () => {
|
|
109
|
+
test("reads a string", () => {
|
|
110
|
+
expect(json_projection_support_1.jsonProjectionSupport.string({
|
|
111
|
+
customer: {
|
|
112
|
+
name: "Fred"
|
|
113
|
+
}
|
|
114
|
+
}, undefined, [
|
|
115
|
+
"customer",
|
|
116
|
+
"name"
|
|
117
|
+
])).toBe("Fred");
|
|
118
|
+
});
|
|
119
|
+
test("accepts an empty string", () => {
|
|
120
|
+
expect(json_projection_support_1.jsonProjectionSupport.string({
|
|
121
|
+
value: ""
|
|
122
|
+
}, undefined, [
|
|
123
|
+
"value"
|
|
124
|
+
])).toBe("");
|
|
125
|
+
});
|
|
126
|
+
test("rejects a number", () => {
|
|
127
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string({
|
|
128
|
+
value: 123
|
|
129
|
+
}, undefined, [
|
|
130
|
+
"value"
|
|
131
|
+
]), "JSON value is number 123; expected a string.");
|
|
132
|
+
});
|
|
133
|
+
test("rejects null", () => {
|
|
134
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string({
|
|
135
|
+
value: null
|
|
136
|
+
}, undefined, [
|
|
137
|
+
"value"
|
|
138
|
+
]), "JSON value is null; expected a string.");
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
describe("path traversal", () => {
|
|
142
|
+
test("supports deeply nested paths", () => {
|
|
143
|
+
const representation = {
|
|
144
|
+
customer: {
|
|
145
|
+
address: {
|
|
146
|
+
postcode: "HG1"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
expect(json_projection_support_1.jsonProjectionSupport.string(representation, undefined, [
|
|
151
|
+
"customer",
|
|
152
|
+
"address",
|
|
153
|
+
"postcode"
|
|
154
|
+
])).toBe("HG1");
|
|
155
|
+
});
|
|
156
|
+
test("supports array indexes as path segments", () => {
|
|
157
|
+
const representation = {
|
|
158
|
+
customers: [
|
|
159
|
+
{
|
|
160
|
+
age: 27
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
age: 34
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
};
|
|
167
|
+
expect(json_projection_support_1.jsonProjectionSupport.integer(representation, undefined, [
|
|
168
|
+
"customers",
|
|
169
|
+
"1",
|
|
170
|
+
"age"
|
|
171
|
+
])).toBe(34);
|
|
172
|
+
});
|
|
173
|
+
test("supports properties whose names contain dots", () => {
|
|
174
|
+
const representation = {
|
|
175
|
+
"customer.age": 42
|
|
176
|
+
};
|
|
177
|
+
expect(json_projection_support_1.jsonProjectionSupport.integer(representation, undefined, [
|
|
178
|
+
"customer.age"
|
|
179
|
+
])).toBe(42);
|
|
180
|
+
});
|
|
181
|
+
test("supports an empty path as the representation itself", () => {
|
|
182
|
+
expect(json_projection_support_1.jsonProjectionSupport.string("Fred", undefined, [])).toBe("Fred");
|
|
183
|
+
});
|
|
184
|
+
test("reports a missing first path segment", () => {
|
|
185
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string({
|
|
186
|
+
customer: {
|
|
187
|
+
name: "Fred"
|
|
188
|
+
}
|
|
189
|
+
}, undefined, [
|
|
190
|
+
"missing",
|
|
191
|
+
"name"
|
|
192
|
+
]), 'JSON property "missing" does not exist in object at <root>. '
|
|
193
|
+
+ 'Available properties: "customer".');
|
|
194
|
+
});
|
|
195
|
+
test("reports the path up to a missing nested segment", () => {
|
|
196
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string({
|
|
197
|
+
customer: {
|
|
198
|
+
address: {}
|
|
199
|
+
}
|
|
200
|
+
}, undefined, [
|
|
201
|
+
"customer",
|
|
202
|
+
"address",
|
|
203
|
+
"postcode"
|
|
204
|
+
]), 'JSON property "postcode" does not exist in object at customer.address. '
|
|
205
|
+
+ "Available properties: <none>.");
|
|
206
|
+
});
|
|
207
|
+
test("fails when traversal encounters null", () => {
|
|
208
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string({
|
|
209
|
+
customer: null
|
|
210
|
+
}, undefined, [
|
|
211
|
+
"customer",
|
|
212
|
+
"name"
|
|
213
|
+
]), "JSON path cannot continue at customer: "
|
|
214
|
+
+ 'value is null; cannot resolve property "name".');
|
|
215
|
+
});
|
|
216
|
+
test("fails when traversal encounters a primitive", () => {
|
|
217
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string({
|
|
218
|
+
customer: "Fred"
|
|
219
|
+
}, undefined, [
|
|
220
|
+
"customer",
|
|
221
|
+
"name"
|
|
222
|
+
]), "JSON path cannot continue at customer: "
|
|
223
|
+
+ 'value is string "Fred"; cannot resolve property "name".');
|
|
224
|
+
});
|
|
225
|
+
test("does not traverse inherited properties", () => {
|
|
226
|
+
const prototype = {
|
|
227
|
+
age: 62
|
|
228
|
+
};
|
|
229
|
+
const representation = Object.create(prototype);
|
|
230
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.integer(representation, undefined, [
|
|
231
|
+
"age"
|
|
232
|
+
]), 'JSON property "age" does not exist in object at <root>. '
|
|
233
|
+
+ "Available properties: <none>.");
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
describe("JSON primitive distinctions", () => {
|
|
237
|
+
test("boolean is not accepted as an integer", () => {
|
|
238
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.integer(true, undefined, []), "JSON value is boolean true; expected an integer.");
|
|
239
|
+
});
|
|
240
|
+
test("boolean is not accepted as a string", () => {
|
|
241
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string(false, undefined, []), "JSON value is boolean false; expected a string.");
|
|
242
|
+
});
|
|
243
|
+
test("null cannot be traversed", () => {
|
|
244
|
+
expectError(() => json_projection_support_1.jsonProjectionSupport.string(null, undefined, [
|
|
245
|
+
"name"
|
|
246
|
+
]), "JSON path cannot continue at <root>: "
|
|
247
|
+
+ 'value is null; cannot resolve property "name".');
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
function expectError(action, message) {
|
|
252
|
+
try {
|
|
253
|
+
action();
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
expect(error).toEqual(new Error(message));
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
throw new Error("Expected error");
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=json.projection.support.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.projection.support.spec.js","sourceRoot":"","sources":["../../src/json.projection.support.spec.ts"],"names":[],"mappings":";;AAAA,uEAAgE;AAGhE,QAAQ,CAAC,uBAAuB,EAAC,GAAG,EAAE;IAClC,QAAQ,CAAC,uBAAuB,EAAC,GAAG,EAAE;QAClC,IAAI,CAAC,wCAAwC,EAAC,GAAG,EAAE;YAC/C,MAAM,IAAI,GAAG,CAAC,UAAU,EAAC,KAAK,CAAC,CAAC;YAEhC,MAAM,CACF,+CAAqB,CAAC,qBAAqB,CACvC,SAAS,EACT,SAAS,EACT,IAAI,CACP,CACJ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAGH,QAAQ,CAAC,SAAS,EAAC,GAAG,EAAE;QACpB,IAAI,CAAC,mCAAmC,EAAC,GAAG,EAAE;YAC1C,MAAM,CACF,+CAAqB,CAAC,OAAO,CACzB,EAAE,EACF,SAAS,EACT,EAAE,CACL,CACJ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,uCAAuC,EAAC,GAAG,EAAE;YAC9C,MAAM,cAAc,GAAG;gBACnB,QAAQ,EAAE;oBACN,GAAG,EAAE,EAAE;iBACV;aACJ,CAAC;YAEF,MAAM,CACF,+CAAqB,CAAC,OAAO,CACzB,cAAc,EACd,SAAS,EACT;gBACI,UAAU;gBACV,KAAK;aACR,CACJ,CACJ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,2BAA2B,EAAC,GAAG,EAAE;YAClC,MAAM,CACF,+CAAqB,CAAC,OAAO,CACzB;gBACI,KAAK,EAAE,CAAC,EAAE;aACb,EACD,SAAS,EACT;gBACI,OAAO;aACV,CACJ,CACJ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC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,EACJ,SAAS,EACT,EAAE,CACL,EACD,kDAAkD,CACrD,CAAC;QACN,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,qCAAqC,EAAC,GAAG,EAAE;YAC5C,WAAW,CACP,GAAG,EAAE,CAAC,+CAAqB,CAAC,MAAM,CAC9B,KAAK,EACL,SAAS,EACT,EAAE,CACL,EACD,iDAAiD,CACpD,CAAC;QACN,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,0BAA0B,EAAC,GAAG,EAAE;YACjC,WAAW,CACP,GAAG,EAAE,CAAC,+CAAqB,CAAC,MAAM,CAC9B,IAAI,EACJ,SAAS,EACT;gBACI,MAAM;aACT,CACJ,EACD,uCAAuC;kBACrC,gDAAgD,CACrD,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAGH,SAAS,WAAW,CAChB,MAAqB,EACrB,OAAe;IAEf,IAAI,CAAC;QACD,MAAM,EAAE,CAAC;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CACjB,IAAI,KAAK,CAAC,OAAO,CAAC,CACrB,CAAC;QACF,OAAO;IACX,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobol-ts/cursor-loader-json",
|
|
3
3
|
"description": "parser for json to support the cursor loader package",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"types": "dist/index",
|
|
7
7
|
"browserslist": {
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cobol-ts/cursor-loader-types": "0.0.
|
|
21
|
-
"@cobol-ts/errors": "0.0.
|
|
22
|
-
"@cobol-ts/cursor-record": "0.0.
|
|
23
|
-
"@cobol-ts/cursor-file": "0.0.
|
|
24
|
-
"@cobol-ts/arrays": "0.0.
|
|
20
|
+
"@cobol-ts/cursor-loader-types": "0.0.4",
|
|
21
|
+
"@cobol-ts/errors": "0.0.4",
|
|
22
|
+
"@cobol-ts/cursor-record": "0.0.4",
|
|
23
|
+
"@cobol-ts/cursor-file": "0.0.4",
|
|
24
|
+
"@cobol-ts/arrays": "0.0.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.2.2",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"dist/index.js",
|
|
52
52
|
"dist/index.d.ts",
|
|
53
53
|
"dist/src/",
|
|
54
|
-
"build/"
|
|
54
|
+
"build/",
|
|
55
|
+
"dist/**/*"
|
|
55
56
|
],
|
|
56
57
|
"keywords": [
|
|
57
58
|
"indexing"
|