File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
libraries/adaptive-expressions Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 36
36
"lodash.isequal" : " ^4.5.0" ,
37
37
"lru-cache" : " ^5.1.1" ,
38
38
"uuid" : " ^8.3.2" ,
39
- "fast-xml-parser" : " ^3.19.0 " ,
39
+ "fast-xml-parser" : " ^4.1.2 " ,
40
40
"@xmldom/xmldom" : " ^0.8.6" ,
41
41
"xpath" : " ^0.0.32"
42
42
},
Original file line number Diff line number Diff line change 6
6
* Licensed under the MIT License.
7
7
*/
8
8
9
+ import { XMLBuilder } from 'fast-xml-parser' ;
9
10
import { EvaluateExpressionDelegate , ExpressionEvaluator } from '../expressionEvaluator' ;
10
11
import { ExpressionType } from '../expressionType' ;
11
12
import { FunctionUtils } from '../functionUtils' ;
12
13
import { ReturnType } from '../returnType' ;
13
- import { j2xParser } from 'fast-xml-parser' ;
14
14
/**
15
15
* Return the newline string according to the environment.
16
16
*/
@@ -38,11 +38,11 @@ export class XML extends ExpressionEvaluator {
38
38
} else if ( typeof args [ 0 ] === 'object' ) {
39
39
obj = args [ 0 ] ;
40
40
}
41
- const parser = new j2xParser ( {
41
+ const parser = new XMLBuilder ( {
42
42
indentBy : ' ' ,
43
43
format : true ,
44
44
} ) ;
45
- result = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n${ parser . parse ( obj ) } ` . trim ( ) ;
45
+ result = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n${ parser . build ( obj ) } ` . trim ( ) ;
46
46
} catch {
47
47
error = `${ args [ 0 ] } is not a valid json` ;
48
48
}
Original file line number Diff line number Diff line change @@ -5771,10 +5771,12 @@ fast-safe-stringify@^2.0.7:
5771
5771
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743"
5772
5772
integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==
5773
5773
5774
- fast-xml-parser@^3.19.0:
5775
- version "3.19.0"
5776
- resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz#cb637ec3f3999f51406dd8ff0e6fc4d83e520d01"
5777
- integrity sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==
5774
+ fast-xml-parser@^4.1.2:
5775
+ version "4.2.2"
5776
+ resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.2.2.tgz#cb7310d1e9cf42d22c687b0fae41f3c926629368"
5777
+ integrity sha512-DLzIPtQqmvmdq3VUKR7T6omPK/VCRNqgFlGtbESfyhcH2R4I8EzK1/K6E8PkRCK2EabWrUHK32NjYRbEFnnz0Q==
5778
+ dependencies:
5779
+ strnum "^1.0.5"
5778
5780
5779
5781
fastq@^1.6.0:
5780
5782
version "1.9.0"
@@ -8785,6 +8787,7 @@ minipass-fetch@^1.3.2:
8785
8787
resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.3.tgz#34c7cea038c817a8658461bf35174551dce17a0a"
8786
8788
integrity sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ==
8787
8789
dependencies:
8790
+ encoding "^0.1.12"
8788
8791
minipass "^3.1.0"
8789
8792
minipass-sized "^1.0.3"
8790
8793
minizlib "^2.0.0"
@@ -12094,6 +12097,11 @@ strip-outer@^1.0.1:
12094
12097
dependencies:
12095
12098
escape-string-regexp "^1.0.2"
12096
12099
12100
+ strnum@^1.0.5:
12101
+ version "1.0.5"
12102
+ resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db"
12103
+ integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==
12104
+
12097
12105
subarg@^1.0.0:
12098
12106
version "1.0.0"
12099
12107
resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
You can’t perform that action at this time.
0 commit comments