parent
76fba19c0b
commit
323c5c310c
236
package-lock.json
generated
236
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xml",
|
"name": "xml",
|
||||||
"version": "2.0.0-preview.1",
|
"version": "2.0.0-preview.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -29,7 +29,7 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"co": "4.6.0",
|
"co": "4.6.0",
|
||||||
"fast-deep-equal": "1.0.0",
|
"fast-deep-equal": "1.1.0",
|
||||||
"fast-json-stable-stringify": "2.0.0",
|
"fast-json-stable-stringify": "2.0.0",
|
||||||
"json-schema-traverse": "0.3.1"
|
"json-schema-traverse": "0.3.1"
|
||||||
}
|
}
|
||||||
@ -172,9 +172,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"aws4": {
|
"aws4": {
|
||||||
"version": "1.6.0",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
|
||||||
"integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=",
|
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"babel-code-frame": {
|
"babel-code-frame": {
|
||||||
@ -261,6 +261,12 @@
|
|||||||
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
|
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"buffer-from": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"builtin-modules": {
|
"builtin-modules": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||||
@ -305,14 +311,46 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"cloneable-readable": {
|
"cloneable-readable": {
|
||||||
"version": "1.0.0",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz",
|
||||||
"integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=",
|
"integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "2.0.3",
|
"inherits": "2.0.3",
|
||||||
"process-nextick-args": "1.0.7",
|
"process-nextick-args": "2.0.0",
|
||||||
"through2": "2.0.3"
|
"readable-stream": "2.3.6"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"process-nextick-args": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"readable-stream": {
|
||||||
|
"version": "2.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||||
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"core-util-is": "1.0.2",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"isarray": "1.0.0",
|
||||||
|
"process-nextick-args": "2.0.0",
|
||||||
|
"safe-buffer": "5.1.1",
|
||||||
|
"string_decoder": "1.1.1",
|
||||||
|
"util-deprecate": "1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"string_decoder": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "5.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"co": {
|
"co": {
|
||||||
@ -348,9 +386,9 @@
|
|||||||
"integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w="
|
"integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w="
|
||||||
},
|
},
|
||||||
"combined-stream": {
|
"combined-stream": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
|
||||||
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
|
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"delayed-stream": "1.0.0"
|
"delayed-stream": "1.0.0"
|
||||||
@ -650,9 +688,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
||||||
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=",
|
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
@ -732,8 +770,8 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"asynckit": "0.4.0",
|
"asynckit": "0.4.0",
|
||||||
"combined-stream": "1.0.5",
|
"combined-stream": "1.0.6",
|
||||||
"mime-types": "2.1.17"
|
"mime-types": "2.1.18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
@ -1044,9 +1082,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clone": {
|
"clone": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||||
"integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=",
|
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"clone-stats": {
|
"clone-stats": {
|
||||||
@ -1062,9 +1100,9 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"aws-sign2": "0.6.0",
|
"aws-sign2": "0.6.0",
|
||||||
"aws4": "1.6.0",
|
"aws4": "1.7.0",
|
||||||
"caseless": "0.11.0",
|
"caseless": "0.11.0",
|
||||||
"combined-stream": "1.0.5",
|
"combined-stream": "1.0.6",
|
||||||
"extend": "3.0.1",
|
"extend": "3.0.1",
|
||||||
"forever-agent": "0.6.1",
|
"forever-agent": "0.6.1",
|
||||||
"form-data": "2.1.4",
|
"form-data": "2.1.4",
|
||||||
@ -1074,11 +1112,11 @@
|
|||||||
"is-typedarray": "1.0.0",
|
"is-typedarray": "1.0.0",
|
||||||
"isstream": "0.1.2",
|
"isstream": "0.1.2",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"mime-types": "2.1.17",
|
"mime-types": "2.1.18",
|
||||||
"oauth-sign": "0.8.2",
|
"oauth-sign": "0.8.2",
|
||||||
"qs": "6.3.2",
|
"qs": "6.3.2",
|
||||||
"stringstream": "0.0.5",
|
"stringstream": "0.0.5",
|
||||||
"tough-cookie": "2.3.3",
|
"tough-cookie": "2.3.4",
|
||||||
"tunnel-agent": "0.4.3",
|
"tunnel-agent": "0.4.3",
|
||||||
"uuid": "3.2.1"
|
"uuid": "3.2.1"
|
||||||
}
|
}
|
||||||
@ -1089,10 +1127,10 @@
|
|||||||
"integrity": "sha1-CjcT2NTpIhxY8QyhbAEWyeJe2nw=",
|
"integrity": "sha1-CjcT2NTpIhxY8QyhbAEWyeJe2nw=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"clone": "1.0.3",
|
"clone": "1.0.4",
|
||||||
"clone-buffer": "1.0.0",
|
"clone-buffer": "1.0.0",
|
||||||
"clone-stats": "1.0.0",
|
"clone-stats": "1.0.0",
|
||||||
"cloneable-readable": "1.0.0",
|
"cloneable-readable": "1.1.2",
|
||||||
"is-stream": "1.1.0",
|
"is-stream": "1.1.0",
|
||||||
"remove-trailing-separator": "1.1.0",
|
"remove-trailing-separator": "1.1.0",
|
||||||
"replace-ext": "1.0.0"
|
"replace-ext": "1.0.0"
|
||||||
@ -1114,9 +1152,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clone": {
|
"clone": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||||
"integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=",
|
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"replace-ext": {
|
"replace-ext": {
|
||||||
@ -1131,7 +1169,7 @@
|
|||||||
"integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=",
|
"integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"clone": "1.0.3",
|
"clone": "1.0.4",
|
||||||
"clone-stats": "0.0.1",
|
"clone-stats": "0.0.1",
|
||||||
"replace-ext": "0.0.1"
|
"replace-ext": "0.0.1"
|
||||||
}
|
}
|
||||||
@ -1190,9 +1228,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clone": {
|
"clone": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||||
"integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=",
|
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
@ -1219,7 +1257,7 @@
|
|||||||
"integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
|
"integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"clone": "1.0.3",
|
"clone": "1.0.4",
|
||||||
"clone-stats": "0.0.1",
|
"clone-stats": "0.0.1",
|
||||||
"replace-ext": "0.0.1"
|
"replace-ext": "0.0.1"
|
||||||
}
|
}
|
||||||
@ -1271,7 +1309,7 @@
|
|||||||
"clone": "2.1.1",
|
"clone": "2.1.1",
|
||||||
"clone-buffer": "1.0.0",
|
"clone-buffer": "1.0.0",
|
||||||
"clone-stats": "1.0.0",
|
"clone-stats": "1.0.0",
|
||||||
"cloneable-readable": "1.0.0",
|
"cloneable-readable": "1.1.2",
|
||||||
"remove-trailing-separator": "1.1.0",
|
"remove-trailing-separator": "1.1.0",
|
||||||
"replace-ext": "1.0.0"
|
"replace-ext": "1.0.0"
|
||||||
}
|
}
|
||||||
@ -1301,7 +1339,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "1.1.3",
|
"chalk": "1.1.3",
|
||||||
"commander": "2.13.0",
|
"commander": "2.13.0",
|
||||||
"is-my-json-valid": "2.17.1",
|
"is-my-json-valid": "2.17.2",
|
||||||
"pinkie-promise": "2.0.1"
|
"pinkie-promise": "2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1361,7 +1399,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"assert-plus": "0.2.0",
|
"assert-plus": "0.2.0",
|
||||||
"jsprim": "1.4.1",
|
"jsprim": "1.4.1",
|
||||||
"sshpk": "1.13.1"
|
"sshpk": "1.14.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"infinity-agent": {
|
"infinity-agent": {
|
||||||
@ -1437,14 +1475,21 @@
|
|||||||
"is-extglob": "2.1.1"
|
"is-extglob": "2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"is-my-ip-valid": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"is-my-json-valid": {
|
"is-my-json-valid": {
|
||||||
"version": "2.17.1",
|
"version": "2.17.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz",
|
||||||
"integrity": "sha512-Q2khNw+oBlWuaYvEEHtKSw/pCxD2L5Rc1C+UQme9X6JdRDh7m5D7HkozA0qa3DUkQ6VzCnEm8mVIQPyIRkI5sQ==",
|
"integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"generate-function": "2.0.0",
|
"generate-function": "2.0.0",
|
||||||
"generate-object-property": "1.2.0",
|
"generate-object-property": "1.2.0",
|
||||||
|
"is-my-ip-valid": "1.0.0",
|
||||||
"jsonpointer": "4.0.1",
|
"jsonpointer": "4.0.1",
|
||||||
"xtend": "4.0.1"
|
"xtend": "4.0.1"
|
||||||
}
|
}
|
||||||
@ -1857,18 +1902,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mime-db": {
|
"mime-db": {
|
||||||
"version": "1.30.0",
|
"version": "1.33.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
|
||||||
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=",
|
"integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mime-types": {
|
"mime-types": {
|
||||||
"version": "2.1.17",
|
"version": "2.1.18",
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
|
||||||
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
|
"integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"mime-db": "1.30.0"
|
"mime-db": "1.33.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
@ -2187,9 +2232,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"querystringify": {
|
"querystringify": {
|
||||||
"version": "1.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz",
|
||||||
"integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=",
|
"integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"queue": {
|
"queue": {
|
||||||
@ -2325,31 +2370,31 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"request": {
|
"request": {
|
||||||
"version": "2.83.0",
|
"version": "2.85.0",
|
||||||
"resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz",
|
"resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz",
|
||||||
"integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==",
|
"integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"aws-sign2": "0.7.0",
|
"aws-sign2": "0.7.0",
|
||||||
"aws4": "1.6.0",
|
"aws4": "1.7.0",
|
||||||
"caseless": "0.12.0",
|
"caseless": "0.12.0",
|
||||||
"combined-stream": "1.0.5",
|
"combined-stream": "1.0.6",
|
||||||
"extend": "3.0.1",
|
"extend": "3.0.1",
|
||||||
"forever-agent": "0.6.1",
|
"forever-agent": "0.6.1",
|
||||||
"form-data": "2.3.1",
|
"form-data": "2.3.2",
|
||||||
"har-validator": "5.0.3",
|
"har-validator": "5.0.3",
|
||||||
"hawk": "6.0.2",
|
"hawk": "6.0.2",
|
||||||
"http-signature": "1.2.0",
|
"http-signature": "1.2.0",
|
||||||
"is-typedarray": "1.0.0",
|
"is-typedarray": "1.0.0",
|
||||||
"isstream": "0.1.2",
|
"isstream": "0.1.2",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"mime-types": "2.1.17",
|
"mime-types": "2.1.18",
|
||||||
"oauth-sign": "0.8.2",
|
"oauth-sign": "0.8.2",
|
||||||
"performance-now": "2.1.0",
|
"performance-now": "2.1.0",
|
||||||
"qs": "6.5.1",
|
"qs": "6.5.1",
|
||||||
"safe-buffer": "5.1.1",
|
"safe-buffer": "5.1.1",
|
||||||
"stringstream": "0.0.5",
|
"stringstream": "0.0.5",
|
||||||
"tough-cookie": "2.3.3",
|
"tough-cookie": "2.3.4",
|
||||||
"tunnel-agent": "0.6.0",
|
"tunnel-agent": "0.6.0",
|
||||||
"uuid": "3.2.1"
|
"uuid": "3.2.1"
|
||||||
},
|
},
|
||||||
@ -2372,7 +2417,7 @@
|
|||||||
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
|
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoek": "4.2.0"
|
"hoek": "4.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caseless": {
|
"caseless": {
|
||||||
@ -2396,20 +2441,20 @@
|
|||||||
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
|
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoek": "4.2.0"
|
"hoek": "4.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"form-data": {
|
"form-data": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
|
||||||
"integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=",
|
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"asynckit": "0.4.0",
|
"asynckit": "0.4.0",
|
||||||
"combined-stream": "1.0.5",
|
"combined-stream": "1.0.6",
|
||||||
"mime-types": "2.1.17"
|
"mime-types": "2.1.18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"har-validator": {
|
"har-validator": {
|
||||||
@ -2430,14 +2475,14 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"boom": "4.3.1",
|
"boom": "4.3.1",
|
||||||
"cryptiles": "3.1.2",
|
"cryptiles": "3.1.2",
|
||||||
"hoek": "4.2.0",
|
"hoek": "4.2.1",
|
||||||
"sntp": "2.1.0"
|
"sntp": "2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
|
||||||
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==",
|
"integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"http-signature": {
|
"http-signature": {
|
||||||
@ -2448,7 +2493,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"assert-plus": "1.0.0",
|
"assert-plus": "1.0.0",
|
||||||
"jsprim": "1.4.1",
|
"jsprim": "1.4.1",
|
||||||
"sshpk": "1.13.1"
|
"sshpk": "1.14.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
@ -2463,7 +2508,7 @@
|
|||||||
"integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
|
"integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoek": "4.2.0"
|
"hoek": "4.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tunnel-agent": {
|
"tunnel-agent": {
|
||||||
@ -2535,11 +2580,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"source-map-support": {
|
"source-map-support": {
|
||||||
"version": "0.5.3",
|
"version": "0.5.5",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz",
|
||||||
"integrity": "sha512-eKkTgWYeBOQqFGXRfKabMFdnWepo51vWqEdoeikaEPFiJC7MCU5j2h4+6Q8npkZTeLGbSyecZvRxiSoWl3rh+w==",
|
"integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"buffer-from": "1.0.0",
|
||||||
"source-map": "0.6.1"
|
"source-map": "0.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2564,9 +2610,9 @@
|
|||||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||||
},
|
},
|
||||||
"sshpk": {
|
"sshpk": {
|
||||||
"version": "1.13.1",
|
"version": "1.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz",
|
||||||
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
|
"integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"asn1": "0.2.3",
|
"asn1": "0.2.3",
|
||||||
@ -2751,9 +2797,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tough-cookie": {
|
"tough-cookie": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
|
||||||
"integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
|
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"punycode": "1.4.1"
|
"punycode": "1.4.1"
|
||||||
@ -2913,12 +2959,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url-parse": {
|
"url-parse": {
|
||||||
"version": "1.2.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz",
|
||||||
"integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==",
|
"integrity": "sha512-ERuGxDiQ6Xw/agN4tuoCRbmwRuZP0cJ1lJxJubXr5Q/5cDa78+Dc4wfvtxzhzhkm5VvmW6Mf8EVj9SPGN4l8Lg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"querystringify": "1.0.0",
|
"querystringify": "2.0.0",
|
||||||
"requires-port": "1.0.0"
|
"requires-port": "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2999,9 +3045,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clone": {
|
"clone": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||||
"integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=",
|
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"replace-ext": {
|
"replace-ext": {
|
||||||
@ -3016,7 +3062,7 @@
|
|||||||
"integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=",
|
"integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"clone": "1.0.3",
|
"clone": "1.0.4",
|
||||||
"clone-stats": "0.0.1",
|
"clone-stats": "0.0.1",
|
||||||
"replace-ext": "0.0.1"
|
"replace-ext": "0.0.1"
|
||||||
}
|
}
|
||||||
@ -3034,9 +3080,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"version": "1.1.10",
|
"version": "1.1.16",
|
||||||
"resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.10.tgz",
|
"resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.16.tgz",
|
||||||
"integrity": "sha512-MvFXXSGuhw0Q6GC6dQrnRc0ES+63wpttGIoYGBMQnoS9JFCCNC/rWfX0lBCHJyuKL2Q8CYg0ROsMEHbHVwEtVw==",
|
"integrity": "sha512-nNsfYANLqqNfa2+flHyrIrqSIumIoV7R+R9H3gn0SAzZL3RGPEy8db3EYjXKPW5NEfssj/HZhSMI3J3pMNmhPA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "7.1.2",
|
"glob": "7.1.2",
|
||||||
@ -3048,10 +3094,10 @@
|
|||||||
"gulp-untar": "0.0.6",
|
"gulp-untar": "0.0.6",
|
||||||
"gulp-vinyl-zip": "2.1.0",
|
"gulp-vinyl-zip": "2.1.0",
|
||||||
"mocha": "4.1.0",
|
"mocha": "4.1.0",
|
||||||
"request": "2.83.0",
|
"request": "2.85.0",
|
||||||
"semver": "5.5.0",
|
"semver": "5.5.0",
|
||||||
"source-map-support": "0.5.3",
|
"source-map-support": "0.5.5",
|
||||||
"url-parse": "1.2.0",
|
"url-parse": "1.4.0",
|
||||||
"vinyl-source-stream": "1.1.2"
|
"vinyl-source-stream": "1.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
16
package.json
16
package.json
@ -22,7 +22,7 @@
|
|||||||
"url": "https://github.com/DotJoshJohnson/vscode-xml/issues"
|
"url": "https://github.com/DotJoshJohnson/vscode-xml/issues"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.19.0"
|
"vscode": "^1.22.2"
|
||||||
},
|
},
|
||||||
"categories": [
|
"categories": [
|
||||||
"Formatters",
|
"Formatters",
|
||||||
@ -69,6 +69,18 @@
|
|||||||
"description": "Enables the XML Document view in the explorer for XML documents.",
|
"description": "Enables the XML Document view in the explorer for XML documents.",
|
||||||
"scope": "window"
|
"scope": "window"
|
||||||
},
|
},
|
||||||
|
"xmlTools.enableXmlTreeViewMetadata": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Enables attribute and child element counts in the XML Document view.",
|
||||||
|
"scope": "window"
|
||||||
|
},
|
||||||
|
"xmlTools.enableXmlTreeViewCursorSync": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Enables auto-reveal of elements in the XML Document view when a start tag is clicked in the editor.",
|
||||||
|
"scope": "window"
|
||||||
|
},
|
||||||
"xmlTools.ignoreDefaultNamespace": {
|
"xmlTools.ignoreDefaultNamespace": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
@ -196,7 +208,7 @@
|
|||||||
"@types/xmldom": "^0.1.29",
|
"@types/xmldom": "^0.1.29",
|
||||||
"tslint": "^5.9.1",
|
"tslint": "^5.9.1",
|
||||||
"typescript": "^2.6.1",
|
"typescript": "^2.6.1",
|
||||||
"vscode": "^1.1.6"
|
"vscode": "^1.1.16"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"xmldom": "^0.1.27",
|
"xmldom": "^0.1.27",
|
||||||
|
@ -13,6 +13,8 @@ export namespace contextKeys {
|
|||||||
|
|
||||||
export namespace configKeys {
|
export namespace configKeys {
|
||||||
export const enableXmlTreeView = "enableXmlTreeView";
|
export const enableXmlTreeView = "enableXmlTreeView";
|
||||||
|
export const enableXmlTreeViewMetadata = "enableXmlTreeViewMetadata";
|
||||||
|
export const enableXmlTreeViewCursorSync = "enableXmlTreeViewCursorSync";
|
||||||
export const ignoreDefaultNamespace = "ignoreDefaultNamespace";
|
export const ignoreDefaultNamespace = "ignoreDefaultNamespace";
|
||||||
export const persistXPathQuery = "persistXPathQuery";
|
export const persistXPathQuery = "persistXPathQuery";
|
||||||
export const removeCommentsOnMinify = "removeCommentsOnMinify";
|
export const removeCommentsOnMinify = "removeCommentsOnMinify";
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import { languages, window, workspace, commands } from "vscode";
|
import { languages, window, workspace, commands } from "vscode";
|
||||||
import { ExtensionContext, Memento, TextEditor, TextEditorSelectionChangeEvent, WorkspaceConfiguration } from "vscode";
|
import {
|
||||||
|
ExtensionContext, Memento, TextEditor, TextEditorSelectionChangeEvent,
|
||||||
|
TextEditorSelectionChangeKind, WorkspaceConfiguration
|
||||||
|
} from "vscode";
|
||||||
|
|
||||||
import { createDocumentSelector } from "./common/create-document-selector";
|
import { createDocumentSelector } from "./common/create-document-selector";
|
||||||
import { XQueryCompletionItemProvider } from "./completion/xquery-completion-item-provider";
|
import { XQueryCompletionItemProvider } from "./completion/xquery-completion-item-provider";
|
||||||
@ -47,8 +50,21 @@ export function activate(context: ExtensionContext) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* Tree View Features */
|
/* Tree View Features */
|
||||||
|
const treeViewDataProvider = new XmlTreeDataProvider(context);
|
||||||
|
const treeView = window.createTreeView<Node>(constants.views.xmlTreeView, {
|
||||||
|
treeDataProvider: treeViewDataProvider
|
||||||
|
});
|
||||||
|
|
||||||
|
if (config.get<boolean>(constants.configKeys.enableXmlTreeViewCursorSync)) {
|
||||||
|
window.onDidChangeTextEditorSelection(x => {
|
||||||
|
if (x.kind === TextEditorSelectionChangeKind.Mouse && x.selections.length > 0) {
|
||||||
|
treeView.reveal(treeViewDataProvider.getNodeAtPosition(x.selections[0].start));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
window.registerTreeDataProvider(constants.views.xmlTreeView, new XmlTreeDataProvider(context))
|
treeView
|
||||||
);
|
);
|
||||||
|
|
||||||
/* XPath Features */
|
/* XPath Features */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { commands, window, workspace } from "vscode";
|
import { commands, window, workspace } from "vscode";
|
||||||
import {
|
import {
|
||||||
Event, EventEmitter, ExtensionContext, TextEditor, TreeDataProvider,
|
Event, EventEmitter, ExtensionContext, Position, TextEditor, TreeDataProvider,
|
||||||
TreeItem, TreeItemCollapsibleState
|
TreeItem, TreeItemCollapsibleState, WorkspaceConfiguration
|
||||||
} from "vscode";
|
} from "vscode";
|
||||||
|
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
@ -10,10 +10,13 @@ import { DOMParser } from "xmldom";
|
|||||||
import * as constants from "../constants";
|
import * as constants from "../constants";
|
||||||
|
|
||||||
export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
||||||
|
private _config: WorkspaceConfiguration;
|
||||||
private _onDidChangeTreeData: EventEmitter<any> = new EventEmitter<any>();
|
private _onDidChangeTreeData: EventEmitter<any> = new EventEmitter<any>();
|
||||||
private _xmlDocument: any;
|
private _xmlDocument: Document;
|
||||||
|
|
||||||
constructor(private _context: ExtensionContext) {
|
constructor(private _context: ExtensionContext) {
|
||||||
|
this._config = workspace.getConfiguration(constants.extensionPrefix);
|
||||||
|
|
||||||
window.onDidChangeActiveTextEditor(() => {
|
window.onDidChangeActiveTextEditor(() => {
|
||||||
this._refreshTree();
|
this._refreshTree();
|
||||||
});
|
});
|
||||||
@ -30,13 +33,16 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getTreeItem(element: Node): TreeItem | Thenable<TreeItem> {
|
getTreeItem(element: Node): TreeItem | Thenable<TreeItem> {
|
||||||
|
const enableMetadata = this._config.get<boolean>(constants.configKeys.enableXmlTreeViewMetadata);
|
||||||
|
const enableSync = this._config.get<boolean>(constants.configKeys.enableXmlTreeViewCursorSync);
|
||||||
|
|
||||||
const treeItem = new TreeItem(element.localName);
|
const treeItem = new TreeItem(element.localName);
|
||||||
|
|
||||||
if (!this._isElement(element)) {
|
if (!this._isElement(element)) {
|
||||||
treeItem.label = `${element.localName} = "${element.nodeValue}"`;
|
treeItem.label = `${element.localName} = "${element.nodeValue}"`;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else if (enableMetadata) {
|
||||||
const childAttributes = this._getChildAttributeArray(<Element>element);
|
const childAttributes = this._getChildAttributeArray(<Element>element);
|
||||||
const childElements = this._getChildElementArray(<Element>element);
|
const childElements = this._getChildElementArray(<Element>element);
|
||||||
const totalChildren = (childAttributes.length + childElements.length);
|
const totalChildren = (childAttributes.length + childElements.length);
|
||||||
@ -57,6 +63,10 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
treeItem.label = treeItem.label.substr(0, treeItem.label.length - 2);
|
treeItem.label = treeItem.label.substr(0, treeItem.label.length - 2);
|
||||||
treeItem.label += ")";
|
treeItem.label += ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this._hasSimilarSiblings(<Element>element) && enableSync) {
|
||||||
|
treeItem.label += ` [line ${(element as any).lineNumber}]`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
treeItem.command = {
|
treeItem.command = {
|
||||||
@ -73,7 +83,7 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
return treeItem;
|
return treeItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
getChildren(element?: Node): any[] | Thenable<any[]> {
|
getChildren(element?: Node): Node[] | Thenable<Node[]> {
|
||||||
if (!this._xmlDocument) {
|
if (!this._xmlDocument) {
|
||||||
this._refreshTree();
|
this._refreshTree();
|
||||||
}
|
}
|
||||||
@ -91,6 +101,43 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getParent(element: Node): Node {
|
||||||
|
if (!element || !element.parentNode || !element.parentNode.parentNode) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return element.parentNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
getNodeAtPosition(position: Position): Node {
|
||||||
|
return this._getNodeAtPositionCore(position, this._xmlDocument.documentElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
private _getNodeAtPositionCore(position: Position, contextElement: Element): Node {
|
||||||
|
if (!contextElement) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((contextElement as any).lineNumber - 1) === position.line) {
|
||||||
|
return contextElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
const children = this._getChildElementArray(<Element>contextElement);
|
||||||
|
let result: Node;
|
||||||
|
|
||||||
|
for (let i = 0; i < children.length; i++) {
|
||||||
|
const child = children[i];
|
||||||
|
|
||||||
|
result = this._getNodeAtPositionCore(position, child);
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
private _getChildAttributeArray(node: Element): any[] {
|
private _getChildAttributeArray(node: Element): any[] {
|
||||||
if (!node.attributes) {
|
if (!node.attributes) {
|
||||||
return [];
|
return [];
|
||||||
@ -138,6 +185,16 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _hasSimilarSiblings(element: Element): boolean {
|
||||||
|
if (!element || !element.parentNode) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const siblings = this._getChildElementArray(<Element>element.parentNode);
|
||||||
|
|
||||||
|
return (siblings.filter(x => x.tagName === element.tagName).length > 1);
|
||||||
|
}
|
||||||
|
|
||||||
private _isElement(node: Node): boolean {
|
private _isElement(node: Node): boolean {
|
||||||
return (!!node && !!(node as Element).tagName);
|
return (!!node && !!(node as Element).tagName);
|
||||||
}
|
}
|
||||||
@ -151,8 +208,7 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = workspace.getConfiguration(constants.extensionPrefix);
|
const enableTreeView = this._config.get<boolean>(constants.configKeys.enableXmlTreeView, true);
|
||||||
const enableTreeView = config.get<boolean>(constants.configKeys.enableXmlTreeView, true);
|
|
||||||
|
|
||||||
commands.executeCommand(constants.nativeCommands.setContext, constants.contextKeys.xmlTreeViewEnabled, enableTreeView);
|
commands.executeCommand(constants.nativeCommands.setContext, constants.contextKeys.xmlTreeViewEnabled, enableTreeView);
|
||||||
|
|
||||||
@ -160,12 +216,13 @@ export class XmlTreeDataProvider implements TreeDataProvider<any> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this._xmlDocument = new DOMParser().parseFromString(xml, "text/xml");
|
this._xmlDocument = new DOMParser().parseFromString(xml, "text/xml");
|
||||||
this._onDidChangeTreeData.fire();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
this._xmlDocument = new DOMParser().parseFromString("<InvalidDocument />", "text/xml");
|
this._xmlDocument = new DOMParser().parseFromString("<InvalidDocument />", "text/xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._onDidChangeTreeData.fire();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user