├── .gitignore
├── .jshintrc
├── .travis.yml
├── LICENSE
├── README.md
├── gulpfile.js
├── img
└── raphinesse.png
├── package-lock.json
├── package.json
├── src
├── args.js
├── document.js
├── paths.js
├── xml.js
└── xmlpoke.js
└── test
├── .jshintrc
├── args.spec.js
├── document.spec.js
├── paths.spec.js
├── xml.spec.js
└── xmlpoke.spec.js
/.gitignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | *.seed
3 | *.log
4 | *.csv
5 | *.dat
6 | *.out
7 | *.pid
8 | *.gz
9 |
10 | pids
11 | logs
12 | results
13 |
14 | npm-debug.log
15 | node_modules
16 |
17 | .DS_Store
18 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "undef": true,
4 | "unused": true,
5 | "strict": "global"
6 | }
7 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 |
3 | # node.js versions to test with
4 | node_js:
5 | - "node" # latest stable Node.js release
6 | - "lts/*" # latest LTS Node.js release
7 |
8 | # Further releases that have not reached EOL.
9 | # See https://github.com/nodejs/Release
10 | - "6"
11 | - "4"
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Mike O'Brien
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # xmlpoke
2 |
3 | [](https://npmjs.org/package/xmlpoke) [](https://travis-ci.org/mikeobrien/node-xmlpoke) [](https://david-dm.org/mikeobrien/node-xmlpoke) [](https://npmjs.org/package/xmlpoke)
4 |
5 | Node module for modifying XML files. Inspired by [NAnt XmlPoke](http://nant.sourceforge.net/release/0.92/help/tasks/xmlpoke.html).
6 |
7 | ## Install
8 |
9 | ```bash
10 | $ npm install xmlpoke --save
11 | ```
12 |
13 | ## Usage
14 |
15 | The xmlpoke module exports a function that modifies xml files:
16 |
17 | `xmlpoke(path1, [path2], [...], [pathMap], modify)`
18 |
19 | Or modifies an xml string:
20 |
21 | `xmlpoke(xml, modify)`
22 |
23 | #### Paths
24 |
25 | Paths are [globs](https://github.com/isaacs/node-glob) and can be any combination of strings, objects with a property that contains the path, or arrays of those. By default, objects are assumed to have a `path` property (Although this can be overridden). Here are some examples of valid path input:
26 |
27 | ```js
28 | var xmlpoke = require('xmlpoke');
29 |
30 | xmlpoke('**/*.xml', ...);
31 |
32 | xmlpoke('**/*.xml', '**/*.config', ...);
33 |
34 | xmlpoke([ '**/*.xml', '**/*.config' ], ...);
35 |
36 | xmlpoke([ '**/*.xml', '**/*.config' ], { path: '*.proj' }, ...);
37 |
38 | xmlpoke([ '**/*.xml', { path: '*.proj' } ], '**/*.config', ...);
39 |
40 | xmlpoke([ 'data/*.xml', { path: '*.proj' } ], [ '**/*.config', { path: '*.xml' } ], ...);
41 | ```
42 |
43 | As noted earlier, path objects are expected to have a `path` property. If you would like to override that you can pass in a function, *after* your paths, that map the path:
44 |
45 | ```js
46 | var projects = [
47 | {
48 | path: '/some/path',
49 | config: 'app.config'
50 | },
51 | ...
52 | ];
53 |
54 | xmlpoke(projects, function(p) { return path.join(p.path, p.config); }, ...);
55 | ```
56 |
57 | #### Modification
58 |
59 | The last argument is a function that performs the modifications. This function is passed a DSL for manipulating the xml file.
60 |
61 | ```js
62 | xmlpoke('**/*.config', function(xml) {
63 | xml.set('data/connString', 'server=oh;db=hai');
64 | });
65 |
66 | var xml = xmlpoke('', function(xml) {
67 | xml.set('oh', 'hai');
68 | });
69 | ```
70 |
71 | Path objects, when supplied, are passed in the second argument:
72 |
73 | ```js
74 | var projects = [
75 | {
76 | path: 'app.config',
77 | version: '1.2.3.4'
78 | },
79 | ...
80 | ];
81 |
82 | xmlpoke(projects, function(xml, project) {
83 | xml.set('app/version', project.version);
84 | });
85 | ```
86 |
87 | ##### Clearing Child Nodes
88 |
89 | You can clear the children of all matching nodes with the `clear()` method:
90 |
91 | ```js
92 | xmlpoke('**/*.config', function(xml) {
93 | xml.clear('some/path');
94 | });
95 | ```
96 |
97 | The `errorOnNoMatches` option will cause this method to throw an exception if the specified XPath yields no results.
98 |
99 | ##### Removing Nodes
100 |
101 | You can remove all matching nodes with the `remove()` method:
102 |
103 | ```js
104 | xmlpoke('**/*.config', function(xml) {
105 | xml.remove('some/path');
106 | });
107 | ```
108 |
109 | The `errorOnNoMatches` option *does not* cause this method to throw an exception if the specified XPath yields no results.
110 |
111 | ##### Ensuring the Existence of Elements
112 |
113 | You can ensure the existence of elements with the `ensure(xpath)` method. This method will create the entire path. In order to do this the path must contain only elements. It must not contain any axis specifiers. Element axes can have a predicate that compares the *equality* of one or more attributes or elements with a *string* value. Only the `=` comparison operator and `and` logical operators are allowed. If these predicates are specified, and the element does not exist, the predicate values will be set in the new element. Any predicates that do not meet these exact requirements are ignored. The following are examples of acceptable XPaths and the resulting xml when the source is ``:
114 |
115 | ```js
116 | ensure('el1/el2/el3');
117 | ```
118 | ```xml
119 |
120 |
121 |
122 |
123 |
124 | ```
125 | ```js
126 | ensure("el1/el2[@attr1='1' and @attr2='2']/el3[el4='3']");
127 | ```
128 | ```xml
129 |
130 |
131 |
132 | 3
133 |
134 |
135 |
136 | ```
137 |
138 | ##### Setting Values and Content
139 |
140 | You can set the values or content of all matching nodes with the `set()`, `add()` and `setOrAdd()` methods. These methods take an XPath and a value or an object with XPath and value properties:
141 |
142 | `set([xpath, value]|[object])`
143 |
144 | `add([xpath, value]|[object])`
145 |
146 | `setOrAdd([xpath, value]|[object])`
147 |
148 | ```js
149 | xmlpoke('**/*.config', function(xml) {
150 | xml.set('some/path', 'value')
151 | .add('some/path', 'value')
152 | .setOrAdd('some/path', 'value')
153 | .set({ 'first/path': 'value1', 'second/path': 'value2' })
154 | .add({ 'first/path': 'value1', 'second/path': 'value2' })
155 | .setOrAdd({ 'first/path': 'value1', 'second/path': 'value2' });
156 | });
157 | ```
158 |
159 | The `set()` method expects all elements and attributes in the XPath to exist. If they do not, they will be ignored by default. To throw an exception specify the `errorOnNoMatches` option.
160 |
161 | The `add()` method will create a new target node regardless of if there is a match. As such, this method is not very useful for attributes unless you are sure it doesn't already exist. On the other hand the `setOrAdd()` method will attempt to create the node if it doesn't exist, then set its value or content. *This will not create the entire XPath as `ensure()` does, only the target element or attribute i.e. the last node in the XPath query.* So the parent XPath must exist otherwise it will be ignored by default (To instead throw an exception, specify the `errorOnNoMatches` option). To be created, the target must be an attribute or an element. Element XPaths can have a predicate that compares the *equality* of one or more attributes or elements with a *string* value. Only the `=` comparison operator and `and` logical operators are allowed. If these predicates are specified, and the element does not exist, the predicate values will be set in the new element. Any predicates that do not meet these exact requirements are ignored. The following are examples of acceptable XPaths and the resulting xml when the source is ``:
162 |
163 | ```js
164 | setOrAdd('el1/@attr', 'value');
165 | ```
166 | ```xml
167 |
168 | ```
169 | ```js
170 | setOrAdd('el1/el2', 'value');
171 | ```
172 | ```xml
173 |
174 | value
175 |
176 | ```
177 | ```js
178 | setOrAdd("el1[el2='value1']/el3[@attr1='value2' and @attr2='value3']", 'value4');
179 | ```
180 | ```xml
181 |
182 | value1
183 | value4
184 |
185 | ```
186 |
187 | Values can be strings, CData, raw xml, a function or an object containing multiple attribute and element values. For example:
188 |
189 | ```js
190 | xmlpoke('**/*.config', function(xml) {
191 |
192 | // Simple string value
193 | xml.set('some/path', 'value');
194 |
195 | // CData value
196 | xml.set('some/path', xml.CDataValue('value'));
197 |
198 | // Raw xml
199 | xml.set('some/path', xml.XmlString('hai'));
200 |
201 | // Function
202 | xml.set('some/path', function(node, value) { return 'value'; });
203 |
204 | // XPath and object with element and attribute values
205 | xml.set('some/path', {
206 | '@attr': 'value',
207 | el1: 'value',
208 | el2: xml.CDataValue('value'),
209 | el3: xml.XmlString('hai'),
210 | el4: function(node, value) { return 'value'; }
211 | });
212 |
213 | // Object
214 | xml.set({
215 | 'some/path/@attr': 'value',
216 | 'some/path/el1': 'value',
217 | 'some/path/el2': xml.CDataValue('value'),
218 | 'some/path/el3': xml.XmlString('hai'),
219 | 'some/path/el4': function(node, value) { return 'value'; },
220 | 'some/path/el5': {
221 | '@attr': 'value',
222 | el1: 'value',
223 | el2: xml.CDataValue('value'),
224 | el3: xml.XmlString('hai'),
225 | el4: function(node, value) { return 'value'; }
226 | }
227 | });
228 | });
229 | ```
230 |
231 | The `CDataValue()` and `XmlString()` methods exposed by the DSL are simply convenience methods for creating `CDataValue` and `XmlString` objects. These constructors are defined on the module and can be created directly as follows:
232 |
233 | ```js
234 | var xmlpoke = require('xmlpoke');
235 |
236 | var cdata = new xmlpoke.CDataValue('value');
237 | var xmlstring = new xmlpoke.XmlString('hai');
238 |
239 | xmlpoke('**/*.config', function(xml) {
240 | xml.set('some/path', cdata);
241 | xml.set('some/path', xmlstring);
242 | });
243 | ```
244 |
245 | #### Options
246 |
247 | ##### Base XPath
248 |
249 | A base XPath can be specified so you do not have to specify the full XPath in following calls:
250 |
251 | ```js
252 | xmlpoke('**/*.config', function(xml) {
253 | xml.withBasePath('configuration/appSettings')
254 | .set("add[@name='key1']", 'value1')
255 | .set("add[@name='key2']", 'value2');
256 | });
257 | ```
258 |
259 | ##### Namespaces
260 |
261 | Namespaces can be registered as follows:
262 |
263 | ```js
264 | xmlpoke('**/*.config', function(xml) {
265 | xml.addNamespace('y', 'uri:oh')
266 | .addNamespace('z', 'uri:hai')
267 | .set("y:config/z:value", 'value');
268 | });
269 | ```
270 |
271 | ##### Empty Results
272 |
273 | By default, XPaths that do not yield any results are quietly ignored. To throw an exception instead, you can configure as follows:
274 |
275 | ```js
276 | xmlpoke('**/*.config', function(xml) {
277 | xml.errorOnNoMatches()
278 | ...;
279 | });
280 | ```
281 |
282 | Contributors
283 | ------------
284 |
285 | | [](https://github.com/raphinesse) |
286 | |:---:|
287 | | [Raphael von der Grün](https://github.com/raphinesse) |
288 |
289 | ## License
290 | MIT License
291 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var gulp = require('gulp'),
4 | jshint = require('gulp-jshint'),
5 | mocha = require('gulp-mocha'),
6 | process = require('child_process');
7 |
8 | gulp.task('default', ['test']);
9 |
10 | gulp.task('lint', function() {
11 | return gulp.src(['**/*.js', '!node_modules/**/*'])
12 | .pipe(jshint())
13 | .pipe(jshint.reporter('default'))
14 | .pipe(jshint.reporter('fail'));
15 | });
16 |
17 | gulp.task('test', ['lint'], function() {
18 | return gulp.src('test/*.js', { read: false })
19 | .pipe(mocha({ reporter: 'spec' }));
20 | });
21 |
22 | gulp.task('watch', function() {
23 | gulp.watch(['test/*.js', 'src/*.js'], function() {
24 | process.spawn('gulp', ['test'], { stdio: 'inherit' });
25 | });
26 | });
--------------------------------------------------------------------------------
/img/raphinesse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mikeobrien/node-xmlpoke/097693bfa42964af71c73a2bb79c019adee15d0a/img/raphinesse.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xmlpoke",
3 | "version": "0.1.12",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "abbrev": {
8 | "version": "1.1.1",
9 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
10 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
11 | "dev": true
12 | },
13 | "ansi-gray": {
14 | "version": "0.1.1",
15 | "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
16 | "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
17 | "dev": true,
18 | "requires": {
19 | "ansi-wrap": "0.1.0"
20 | }
21 | },
22 | "ansi-regex": {
23 | "version": "0.2.1",
24 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz",
25 | "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=",
26 | "dev": true
27 | },
28 | "ansi-styles": {
29 | "version": "1.1.0",
30 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz",
31 | "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=",
32 | "dev": true
33 | },
34 | "ansi-wrap": {
35 | "version": "0.1.0",
36 | "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
37 | "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
38 | "dev": true
39 | },
40 | "archy": {
41 | "version": "1.0.0",
42 | "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
43 | "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
44 | "dev": true
45 | },
46 | "arr-diff": {
47 | "version": "4.0.0",
48 | "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
49 | "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
50 | "dev": true
51 | },
52 | "arr-flatten": {
53 | "version": "1.1.0",
54 | "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
55 | "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
56 | "dev": true
57 | },
58 | "arr-union": {
59 | "version": "3.1.0",
60 | "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
61 | "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
62 | "dev": true
63 | },
64 | "array-differ": {
65 | "version": "1.0.0",
66 | "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
67 | "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
68 | "dev": true
69 | },
70 | "array-each": {
71 | "version": "1.0.1",
72 | "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
73 | "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
74 | "dev": true
75 | },
76 | "array-slice": {
77 | "version": "1.1.0",
78 | "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
79 | "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
80 | "dev": true
81 | },
82 | "array-union": {
83 | "version": "0.1.0",
84 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-0.1.0.tgz",
85 | "integrity": "sha1-7emAiDMGZeaZ4evwIny8YDTmJ9s=",
86 | "dev": true,
87 | "requires": {
88 | "array-uniq": "0.1.1"
89 | },
90 | "dependencies": {
91 | "array-uniq": {
92 | "version": "0.1.1",
93 | "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-0.1.1.tgz",
94 | "integrity": "sha1-WGHz7U5LthdVl6TgeOiqeOvpWMc=",
95 | "dev": true
96 | }
97 | }
98 | },
99 | "array-uniq": {
100 | "version": "1.0.3",
101 | "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
102 | "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
103 | "dev": true
104 | },
105 | "array-unique": {
106 | "version": "0.3.2",
107 | "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
108 | "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
109 | "dev": true
110 | },
111 | "assertion-error": {
112 | "version": "1.0.0",
113 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz",
114 | "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=",
115 | "dev": true
116 | },
117 | "assign-symbols": {
118 | "version": "1.0.0",
119 | "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
120 | "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
121 | "dev": true
122 | },
123 | "async": {
124 | "version": "0.9.0",
125 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz",
126 | "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=",
127 | "dev": true
128 | },
129 | "atob": {
130 | "version": "2.0.3",
131 | "resolved": "https://registry.npmjs.org/atob/-/atob-2.0.3.tgz",
132 | "integrity": "sha1-GcenYEc3dEaPILLS0DNyrX1Mv10=",
133 | "dev": true
134 | },
135 | "balanced-match": {
136 | "version": "1.0.0",
137 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
138 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
139 | },
140 | "base": {
141 | "version": "0.11.2",
142 | "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
143 | "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
144 | "dev": true,
145 | "requires": {
146 | "cache-base": "1.0.1",
147 | "class-utils": "0.3.6",
148 | "component-emitter": "1.2.1",
149 | "define-property": "1.0.0",
150 | "isobject": "3.0.1",
151 | "mixin-deep": "1.3.1",
152 | "pascalcase": "0.1.1"
153 | },
154 | "dependencies": {
155 | "define-property": {
156 | "version": "1.0.0",
157 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
158 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
159 | "dev": true,
160 | "requires": {
161 | "is-descriptor": "1.0.2"
162 | }
163 | }
164 | }
165 | },
166 | "beeper": {
167 | "version": "1.1.1",
168 | "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
169 | "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=",
170 | "dev": true
171 | },
172 | "brace-expansion": {
173 | "version": "1.1.11",
174 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
175 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
176 | "requires": {
177 | "balanced-match": "1.0.0",
178 | "concat-map": "0.0.1"
179 | }
180 | },
181 | "braces": {
182 | "version": "2.3.1",
183 | "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz",
184 | "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==",
185 | "dev": true,
186 | "requires": {
187 | "arr-flatten": "1.1.0",
188 | "array-unique": "0.3.2",
189 | "define-property": "1.0.0",
190 | "extend-shallow": "2.0.1",
191 | "fill-range": "4.0.0",
192 | "isobject": "3.0.1",
193 | "kind-of": "6.0.2",
194 | "repeat-element": "1.1.2",
195 | "snapdragon": "0.8.2",
196 | "snapdragon-node": "2.1.1",
197 | "split-string": "3.1.0",
198 | "to-regex": "3.0.2"
199 | },
200 | "dependencies": {
201 | "define-property": {
202 | "version": "1.0.0",
203 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
204 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
205 | "dev": true,
206 | "requires": {
207 | "is-descriptor": "1.0.2"
208 | }
209 | },
210 | "extend-shallow": {
211 | "version": "2.0.1",
212 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
213 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
214 | "dev": true,
215 | "requires": {
216 | "is-extendable": "0.1.1"
217 | }
218 | }
219 | }
220 | },
221 | "cache-base": {
222 | "version": "1.0.1",
223 | "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
224 | "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
225 | "dev": true,
226 | "requires": {
227 | "collection-visit": "1.0.0",
228 | "component-emitter": "1.2.1",
229 | "get-value": "2.0.6",
230 | "has-value": "1.0.0",
231 | "isobject": "3.0.1",
232 | "set-value": "2.0.0",
233 | "to-object-path": "0.3.0",
234 | "union-value": "1.0.0",
235 | "unset-value": "1.0.0"
236 | }
237 | },
238 | "cases": {
239 | "version": "0.1.1",
240 | "resolved": "https://registry.npmjs.org/cases/-/cases-0.1.1.tgz",
241 | "integrity": "sha1-mLAahagqJp5ehvAMFzI1MqHjmwA=",
242 | "dev": true,
243 | "requires": {
244 | "async": "0.9.0"
245 | }
246 | },
247 | "chai": {
248 | "version": "1.10.0",
249 | "resolved": "https://registry.npmjs.org/chai/-/chai-1.10.0.tgz",
250 | "integrity": "sha1-5AMcyHZURhp1lD5aNatG6vOcHrk=",
251 | "dev": true,
252 | "requires": {
253 | "assertion-error": "1.0.0",
254 | "deep-eql": "0.1.3"
255 | }
256 | },
257 | "chalk": {
258 | "version": "0.5.1",
259 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz",
260 | "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=",
261 | "dev": true,
262 | "requires": {
263 | "ansi-styles": "1.1.0",
264 | "escape-string-regexp": "1.0.5",
265 | "has-ansi": "0.1.0",
266 | "strip-ansi": "0.3.0",
267 | "supports-color": "0.2.0"
268 | }
269 | },
270 | "class-utils": {
271 | "version": "0.3.6",
272 | "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
273 | "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
274 | "dev": true,
275 | "requires": {
276 | "arr-union": "3.1.0",
277 | "define-property": "0.2.5",
278 | "isobject": "3.0.1",
279 | "static-extend": "0.1.2"
280 | },
281 | "dependencies": {
282 | "define-property": {
283 | "version": "0.2.5",
284 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
285 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
286 | "dev": true,
287 | "requires": {
288 | "is-descriptor": "0.1.6"
289 | }
290 | },
291 | "is-accessor-descriptor": {
292 | "version": "0.1.6",
293 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
294 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
295 | "dev": true,
296 | "requires": {
297 | "kind-of": "3.2.2"
298 | },
299 | "dependencies": {
300 | "kind-of": {
301 | "version": "3.2.2",
302 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
303 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
304 | "dev": true,
305 | "requires": {
306 | "is-buffer": "1.1.6"
307 | }
308 | }
309 | }
310 | },
311 | "is-data-descriptor": {
312 | "version": "0.1.4",
313 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
314 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
315 | "dev": true,
316 | "requires": {
317 | "kind-of": "3.2.2"
318 | },
319 | "dependencies": {
320 | "kind-of": {
321 | "version": "3.2.2",
322 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
323 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
324 | "dev": true,
325 | "requires": {
326 | "is-buffer": "1.1.6"
327 | }
328 | }
329 | }
330 | },
331 | "is-descriptor": {
332 | "version": "0.1.6",
333 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
334 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
335 | "dev": true,
336 | "requires": {
337 | "is-accessor-descriptor": "0.1.6",
338 | "is-data-descriptor": "0.1.4",
339 | "kind-of": "5.1.0"
340 | }
341 | },
342 | "kind-of": {
343 | "version": "5.1.0",
344 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
345 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
346 | "dev": true
347 | }
348 | }
349 | },
350 | "cli": {
351 | "version": "1.0.1",
352 | "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
353 | "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=",
354 | "dev": true,
355 | "requires": {
356 | "exit": "0.1.2",
357 | "glob": "7.1.2"
358 | }
359 | },
360 | "clone": {
361 | "version": "1.0.4",
362 | "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
363 | "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
364 | "dev": true
365 | },
366 | "clone-stats": {
367 | "version": "0.0.1",
368 | "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz",
369 | "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
370 | "dev": true
371 | },
372 | "collection-visit": {
373 | "version": "1.0.0",
374 | "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
375 | "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
376 | "dev": true,
377 | "requires": {
378 | "map-visit": "1.0.0",
379 | "object-visit": "1.0.1"
380 | }
381 | },
382 | "color-support": {
383 | "version": "1.1.3",
384 | "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
385 | "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
386 | "dev": true
387 | },
388 | "commander": {
389 | "version": "2.3.0",
390 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
391 | "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=",
392 | "dev": true
393 | },
394 | "component-emitter": {
395 | "version": "1.2.1",
396 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
397 | "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
398 | "dev": true
399 | },
400 | "concat-map": {
401 | "version": "0.0.1",
402 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
403 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
404 | },
405 | "console-browserify": {
406 | "version": "1.1.0",
407 | "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
408 | "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
409 | "dev": true,
410 | "requires": {
411 | "date-now": "0.1.4"
412 | }
413 | },
414 | "copy-descriptor": {
415 | "version": "0.1.1",
416 | "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
417 | "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
418 | "dev": true
419 | },
420 | "core-util-is": {
421 | "version": "1.0.2",
422 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
423 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
424 | "dev": true
425 | },
426 | "date-now": {
427 | "version": "0.1.4",
428 | "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
429 | "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
430 | "dev": true
431 | },
432 | "dateformat": {
433 | "version": "2.2.0",
434 | "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
435 | "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=",
436 | "dev": true
437 | },
438 | "debug": {
439 | "version": "2.6.9",
440 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
441 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
442 | "dev": true,
443 | "requires": {
444 | "ms": "2.0.0"
445 | }
446 | },
447 | "decode-uri-component": {
448 | "version": "0.2.0",
449 | "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
450 | "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
451 | "dev": true
452 | },
453 | "deep-eql": {
454 | "version": "0.1.3",
455 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
456 | "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
457 | "dev": true,
458 | "requires": {
459 | "type-detect": "0.1.1"
460 | }
461 | },
462 | "defaults": {
463 | "version": "1.0.3",
464 | "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
465 | "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
466 | "dev": true,
467 | "requires": {
468 | "clone": "1.0.4"
469 | }
470 | },
471 | "define-property": {
472 | "version": "2.0.2",
473 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
474 | "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
475 | "dev": true,
476 | "requires": {
477 | "is-descriptor": "1.0.2",
478 | "isobject": "3.0.1"
479 | }
480 | },
481 | "deprecated": {
482 | "version": "0.0.1",
483 | "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz",
484 | "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=",
485 | "dev": true
486 | },
487 | "detect-file": {
488 | "version": "1.0.0",
489 | "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
490 | "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
491 | "dev": true
492 | },
493 | "diff": {
494 | "version": "1.0.8",
495 | "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.8.tgz",
496 | "integrity": "sha1-NDJ2MI7Jkbe8giZ+1VvBQR+XFmY=",
497 | "dev": true
498 | },
499 | "dom-serializer": {
500 | "version": "0.1.0",
501 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
502 | "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
503 | "dev": true,
504 | "requires": {
505 | "domelementtype": "1.1.3",
506 | "entities": "1.1.1"
507 | },
508 | "dependencies": {
509 | "domelementtype": {
510 | "version": "1.1.3",
511 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
512 | "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
513 | "dev": true
514 | },
515 | "entities": {
516 | "version": "1.1.1",
517 | "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
518 | "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
519 | "dev": true
520 | }
521 | }
522 | },
523 | "domelementtype": {
524 | "version": "1.3.0",
525 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
526 | "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=",
527 | "dev": true
528 | },
529 | "domhandler": {
530 | "version": "2.3.0",
531 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
532 | "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=",
533 | "dev": true,
534 | "requires": {
535 | "domelementtype": "1.3.0"
536 | }
537 | },
538 | "domutils": {
539 | "version": "1.5.1",
540 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
541 | "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
542 | "dev": true,
543 | "requires": {
544 | "dom-serializer": "0.1.0",
545 | "domelementtype": "1.3.0"
546 | }
547 | },
548 | "duplexer2": {
549 | "version": "0.0.2",
550 | "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
551 | "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
552 | "dev": true,
553 | "requires": {
554 | "readable-stream": "1.1.14"
555 | }
556 | },
557 | "end-of-stream": {
558 | "version": "0.1.5",
559 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz",
560 | "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=",
561 | "dev": true,
562 | "requires": {
563 | "once": "1.3.3"
564 | },
565 | "dependencies": {
566 | "once": {
567 | "version": "1.3.3",
568 | "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
569 | "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=",
570 | "dev": true,
571 | "requires": {
572 | "wrappy": "1.0.2"
573 | }
574 | }
575 | }
576 | },
577 | "entities": {
578 | "version": "1.0.0",
579 | "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
580 | "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
581 | "dev": true
582 | },
583 | "escape-string-regexp": {
584 | "version": "1.0.5",
585 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
586 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
587 | "dev": true
588 | },
589 | "exit": {
590 | "version": "0.1.2",
591 | "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
592 | "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
593 | "dev": true
594 | },
595 | "expand-brackets": {
596 | "version": "2.1.4",
597 | "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
598 | "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
599 | "dev": true,
600 | "requires": {
601 | "debug": "2.6.9",
602 | "define-property": "0.2.5",
603 | "extend-shallow": "2.0.1",
604 | "posix-character-classes": "0.1.1",
605 | "regex-not": "1.0.2",
606 | "snapdragon": "0.8.2",
607 | "to-regex": "3.0.2"
608 | },
609 | "dependencies": {
610 | "define-property": {
611 | "version": "0.2.5",
612 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
613 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
614 | "dev": true,
615 | "requires": {
616 | "is-descriptor": "0.1.6"
617 | }
618 | },
619 | "extend-shallow": {
620 | "version": "2.0.1",
621 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
622 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
623 | "dev": true,
624 | "requires": {
625 | "is-extendable": "0.1.1"
626 | }
627 | },
628 | "is-accessor-descriptor": {
629 | "version": "0.1.6",
630 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
631 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
632 | "dev": true,
633 | "requires": {
634 | "kind-of": "3.2.2"
635 | },
636 | "dependencies": {
637 | "kind-of": {
638 | "version": "3.2.2",
639 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
640 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
641 | "dev": true,
642 | "requires": {
643 | "is-buffer": "1.1.6"
644 | }
645 | }
646 | }
647 | },
648 | "is-data-descriptor": {
649 | "version": "0.1.4",
650 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
651 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
652 | "dev": true,
653 | "requires": {
654 | "kind-of": "3.2.2"
655 | },
656 | "dependencies": {
657 | "kind-of": {
658 | "version": "3.2.2",
659 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
660 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
661 | "dev": true,
662 | "requires": {
663 | "is-buffer": "1.1.6"
664 | }
665 | }
666 | }
667 | },
668 | "is-descriptor": {
669 | "version": "0.1.6",
670 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
671 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
672 | "dev": true,
673 | "requires": {
674 | "is-accessor-descriptor": "0.1.6",
675 | "is-data-descriptor": "0.1.4",
676 | "kind-of": "5.1.0"
677 | }
678 | },
679 | "kind-of": {
680 | "version": "5.1.0",
681 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
682 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
683 | "dev": true
684 | }
685 | }
686 | },
687 | "expand-tilde": {
688 | "version": "2.0.2",
689 | "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
690 | "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
691 | "dev": true,
692 | "requires": {
693 | "homedir-polyfill": "1.0.1"
694 | }
695 | },
696 | "extend": {
697 | "version": "3.0.1",
698 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
699 | "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
700 | "dev": true
701 | },
702 | "extend-shallow": {
703 | "version": "3.0.2",
704 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
705 | "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
706 | "dev": true,
707 | "requires": {
708 | "assign-symbols": "1.0.0",
709 | "is-extendable": "1.0.1"
710 | },
711 | "dependencies": {
712 | "is-extendable": {
713 | "version": "1.0.1",
714 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
715 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
716 | "dev": true,
717 | "requires": {
718 | "is-plain-object": "2.0.4"
719 | }
720 | }
721 | }
722 | },
723 | "extglob": {
724 | "version": "2.0.4",
725 | "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
726 | "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
727 | "dev": true,
728 | "requires": {
729 | "array-unique": "0.3.2",
730 | "define-property": "1.0.0",
731 | "expand-brackets": "2.1.4",
732 | "extend-shallow": "2.0.1",
733 | "fragment-cache": "0.2.1",
734 | "regex-not": "1.0.2",
735 | "snapdragon": "0.8.2",
736 | "to-regex": "3.0.2"
737 | },
738 | "dependencies": {
739 | "define-property": {
740 | "version": "1.0.0",
741 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
742 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
743 | "dev": true,
744 | "requires": {
745 | "is-descriptor": "1.0.2"
746 | }
747 | },
748 | "extend-shallow": {
749 | "version": "2.0.1",
750 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
751 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
752 | "dev": true,
753 | "requires": {
754 | "is-extendable": "0.1.1"
755 | }
756 | }
757 | }
758 | },
759 | "fancy-log": {
760 | "version": "1.3.2",
761 | "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz",
762 | "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=",
763 | "dev": true,
764 | "requires": {
765 | "ansi-gray": "0.1.1",
766 | "color-support": "1.1.3",
767 | "time-stamp": "1.1.0"
768 | }
769 | },
770 | "fill-range": {
771 | "version": "4.0.0",
772 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
773 | "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
774 | "dev": true,
775 | "requires": {
776 | "extend-shallow": "2.0.1",
777 | "is-number": "3.0.0",
778 | "repeat-string": "1.6.1",
779 | "to-regex-range": "2.1.1"
780 | },
781 | "dependencies": {
782 | "extend-shallow": {
783 | "version": "2.0.1",
784 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
785 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
786 | "dev": true,
787 | "requires": {
788 | "is-extendable": "0.1.1"
789 | }
790 | }
791 | }
792 | },
793 | "find-index": {
794 | "version": "0.1.1",
795 | "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
796 | "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=",
797 | "dev": true
798 | },
799 | "findup-sync": {
800 | "version": "2.0.0",
801 | "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
802 | "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
803 | "dev": true,
804 | "requires": {
805 | "detect-file": "1.0.0",
806 | "is-glob": "3.1.0",
807 | "micromatch": "3.1.10",
808 | "resolve-dir": "1.0.1"
809 | }
810 | },
811 | "fined": {
812 | "version": "1.1.0",
813 | "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz",
814 | "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=",
815 | "dev": true,
816 | "requires": {
817 | "expand-tilde": "2.0.2",
818 | "is-plain-object": "2.0.4",
819 | "object.defaults": "1.1.0",
820 | "object.pick": "1.3.0",
821 | "parse-filepath": "1.0.2"
822 | }
823 | },
824 | "first-chunk-stream": {
825 | "version": "1.0.0",
826 | "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz",
827 | "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=",
828 | "dev": true
829 | },
830 | "flagged-respawn": {
831 | "version": "1.0.0",
832 | "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz",
833 | "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=",
834 | "dev": true
835 | },
836 | "for-in": {
837 | "version": "1.0.2",
838 | "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
839 | "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
840 | "dev": true
841 | },
842 | "for-own": {
843 | "version": "1.0.0",
844 | "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
845 | "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
846 | "dev": true,
847 | "requires": {
848 | "for-in": "1.0.2"
849 | }
850 | },
851 | "fragment-cache": {
852 | "version": "0.2.1",
853 | "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
854 | "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
855 | "dev": true,
856 | "requires": {
857 | "map-cache": "0.2.2"
858 | }
859 | },
860 | "fs.realpath": {
861 | "version": "1.0.0",
862 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
863 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
864 | },
865 | "gaze": {
866 | "version": "0.5.2",
867 | "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
868 | "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
869 | "dev": true,
870 | "requires": {
871 | "globule": "0.1.0"
872 | }
873 | },
874 | "get-value": {
875 | "version": "2.0.6",
876 | "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
877 | "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
878 | "dev": true
879 | },
880 | "glob": {
881 | "version": "7.1.2",
882 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
883 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
884 | "requires": {
885 | "fs.realpath": "1.0.0",
886 | "inflight": "1.0.6",
887 | "inherits": "2.0.3",
888 | "minimatch": "3.0.4",
889 | "once": "1.4.0",
890 | "path-is-absolute": "1.0.1"
891 | }
892 | },
893 | "glob-stream": {
894 | "version": "3.1.18",
895 | "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz",
896 | "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=",
897 | "dev": true,
898 | "requires": {
899 | "glob": "4.5.3",
900 | "glob2base": "0.0.12",
901 | "minimatch": "2.0.10",
902 | "ordered-read-streams": "0.1.0",
903 | "through2": "0.6.5",
904 | "unique-stream": "1.0.0"
905 | },
906 | "dependencies": {
907 | "glob": {
908 | "version": "4.5.3",
909 | "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
910 | "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=",
911 | "dev": true,
912 | "requires": {
913 | "inflight": "1.0.6",
914 | "inherits": "2.0.3",
915 | "minimatch": "2.0.10",
916 | "once": "1.4.0"
917 | }
918 | },
919 | "minimatch": {
920 | "version": "2.0.10",
921 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
922 | "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
923 | "dev": true,
924 | "requires": {
925 | "brace-expansion": "1.1.11"
926 | }
927 | },
928 | "readable-stream": {
929 | "version": "1.0.34",
930 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
931 | "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
932 | "dev": true,
933 | "requires": {
934 | "core-util-is": "1.0.2",
935 | "inherits": "2.0.3",
936 | "isarray": "0.0.1",
937 | "string_decoder": "0.10.31"
938 | }
939 | },
940 | "through2": {
941 | "version": "0.6.5",
942 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
943 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
944 | "dev": true,
945 | "requires": {
946 | "readable-stream": "1.0.34",
947 | "xtend": "4.0.1"
948 | }
949 | }
950 | }
951 | },
952 | "glob-watcher": {
953 | "version": "0.0.6",
954 | "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz",
955 | "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=",
956 | "dev": true,
957 | "requires": {
958 | "gaze": "0.5.2"
959 | }
960 | },
961 | "glob2base": {
962 | "version": "0.0.12",
963 | "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz",
964 | "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=",
965 | "dev": true,
966 | "requires": {
967 | "find-index": "0.1.1"
968 | }
969 | },
970 | "global-modules": {
971 | "version": "1.0.0",
972 | "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
973 | "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
974 | "dev": true,
975 | "requires": {
976 | "global-prefix": "1.0.2",
977 | "is-windows": "1.0.2",
978 | "resolve-dir": "1.0.1"
979 | }
980 | },
981 | "global-prefix": {
982 | "version": "1.0.2",
983 | "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
984 | "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
985 | "dev": true,
986 | "requires": {
987 | "expand-tilde": "2.0.2",
988 | "homedir-polyfill": "1.0.1",
989 | "ini": "1.3.5",
990 | "is-windows": "1.0.2",
991 | "which": "1.3.0"
992 | }
993 | },
994 | "globule": {
995 | "version": "0.1.0",
996 | "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
997 | "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
998 | "dev": true,
999 | "requires": {
1000 | "glob": "3.1.21",
1001 | "lodash": "1.0.2",
1002 | "minimatch": "0.2.14"
1003 | },
1004 | "dependencies": {
1005 | "glob": {
1006 | "version": "3.1.21",
1007 | "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
1008 | "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
1009 | "dev": true,
1010 | "requires": {
1011 | "graceful-fs": "1.2.3",
1012 | "inherits": "1.0.2",
1013 | "minimatch": "0.2.14"
1014 | }
1015 | },
1016 | "graceful-fs": {
1017 | "version": "1.2.3",
1018 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
1019 | "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
1020 | "dev": true
1021 | },
1022 | "inherits": {
1023 | "version": "1.0.2",
1024 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
1025 | "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
1026 | "dev": true
1027 | },
1028 | "lodash": {
1029 | "version": "1.0.2",
1030 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz",
1031 | "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
1032 | "dev": true
1033 | },
1034 | "minimatch": {
1035 | "version": "0.2.14",
1036 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
1037 | "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
1038 | "dev": true,
1039 | "requires": {
1040 | "lru-cache": "2.7.3",
1041 | "sigmund": "1.0.1"
1042 | }
1043 | }
1044 | }
1045 | },
1046 | "glogg": {
1047 | "version": "1.0.1",
1048 | "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz",
1049 | "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==",
1050 | "dev": true,
1051 | "requires": {
1052 | "sparkles": "1.0.0"
1053 | }
1054 | },
1055 | "graceful-fs": {
1056 | "version": "3.0.11",
1057 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz",
1058 | "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=",
1059 | "dev": true,
1060 | "requires": {
1061 | "natives": "1.1.2"
1062 | }
1063 | },
1064 | "growl": {
1065 | "version": "1.8.1",
1066 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz",
1067 | "integrity": "sha1-Sy3sjZB+k9szZiTc7AGDUC+MlCg=",
1068 | "dev": true
1069 | },
1070 | "gulp": {
1071 | "version": "3.8.11",
1072 | "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.8.11.tgz",
1073 | "integrity": "sha1-1Vfgpyg+tBNkkZabBJd2eXLx0oo=",
1074 | "dev": true,
1075 | "requires": {
1076 | "archy": "1.0.0",
1077 | "chalk": "0.5.1",
1078 | "deprecated": "0.0.1",
1079 | "gulp-util": "3.0.8",
1080 | "interpret": "0.3.10",
1081 | "liftoff": "2.5.0",
1082 | "minimist": "1.2.0",
1083 | "orchestrator": "0.3.8",
1084 | "pretty-hrtime": "0.2.2",
1085 | "semver": "4.3.6",
1086 | "tildify": "1.2.0",
1087 | "v8flags": "2.1.1",
1088 | "vinyl-fs": "0.3.14"
1089 | }
1090 | },
1091 | "gulp-filter": {
1092 | "version": "1.0.2",
1093 | "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-1.0.2.tgz",
1094 | "integrity": "sha1-99jG9Y+14gDxFUD+B1jZLEiwa9c=",
1095 | "dev": true,
1096 | "requires": {
1097 | "gulp-util": "3.0.8",
1098 | "multimatch": "0.3.0",
1099 | "through2": "0.6.5"
1100 | },
1101 | "dependencies": {
1102 | "readable-stream": {
1103 | "version": "1.0.34",
1104 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
1105 | "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
1106 | "dev": true,
1107 | "requires": {
1108 | "core-util-is": "1.0.2",
1109 | "inherits": "2.0.3",
1110 | "isarray": "0.0.1",
1111 | "string_decoder": "0.10.31"
1112 | }
1113 | },
1114 | "through2": {
1115 | "version": "0.6.5",
1116 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
1117 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
1118 | "dev": true,
1119 | "requires": {
1120 | "readable-stream": "1.0.34",
1121 | "xtend": "4.0.1"
1122 | }
1123 | }
1124 | }
1125 | },
1126 | "gulp-jshint": {
1127 | "version": "1.9.4",
1128 | "resolved": "https://registry.npmjs.org/gulp-jshint/-/gulp-jshint-1.9.4.tgz",
1129 | "integrity": "sha1-R0Knx4oghAnzVIuNHW1DhdC4Vzc=",
1130 | "dev": true,
1131 | "requires": {
1132 | "gulp-util": "3.0.8",
1133 | "jshint": "2.9.5",
1134 | "lodash": "3.10.1",
1135 | "minimatch": "2.0.10",
1136 | "rcloader": "0.1.2",
1137 | "through2": "0.6.5"
1138 | },
1139 | "dependencies": {
1140 | "lodash": {
1141 | "version": "3.10.1",
1142 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
1143 | "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
1144 | "dev": true
1145 | },
1146 | "minimatch": {
1147 | "version": "2.0.10",
1148 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
1149 | "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
1150 | "dev": true,
1151 | "requires": {
1152 | "brace-expansion": "1.1.11"
1153 | }
1154 | },
1155 | "readable-stream": {
1156 | "version": "1.0.34",
1157 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
1158 | "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
1159 | "dev": true,
1160 | "requires": {
1161 | "core-util-is": "1.0.2",
1162 | "inherits": "2.0.3",
1163 | "isarray": "0.0.1",
1164 | "string_decoder": "0.10.31"
1165 | }
1166 | },
1167 | "through2": {
1168 | "version": "0.6.5",
1169 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
1170 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
1171 | "dev": true,
1172 | "requires": {
1173 | "readable-stream": "1.0.34",
1174 | "xtend": "4.0.1"
1175 | }
1176 | }
1177 | }
1178 | },
1179 | "gulp-mocha": {
1180 | "version": "1.1.2",
1181 | "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-1.1.2.tgz",
1182 | "integrity": "sha1-tr73oK+GoT3dfXlZ8qE3oaY+WGU=",
1183 | "dev": true,
1184 | "requires": {
1185 | "gulp-util": "3.0.8",
1186 | "mocha": "1.21.5",
1187 | "through": "2.3.8"
1188 | }
1189 | },
1190 | "gulp-util": {
1191 | "version": "3.0.8",
1192 | "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz",
1193 | "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=",
1194 | "dev": true,
1195 | "requires": {
1196 | "array-differ": "1.0.0",
1197 | "array-uniq": "1.0.3",
1198 | "beeper": "1.1.1",
1199 | "chalk": "1.1.3",
1200 | "dateformat": "2.2.0",
1201 | "fancy-log": "1.3.2",
1202 | "gulplog": "1.0.0",
1203 | "has-gulplog": "0.1.0",
1204 | "lodash._reescape": "3.0.0",
1205 | "lodash._reevaluate": "3.0.0",
1206 | "lodash._reinterpolate": "3.0.0",
1207 | "lodash.template": "3.6.2",
1208 | "minimist": "1.2.0",
1209 | "multipipe": "0.1.2",
1210 | "object-assign": "3.0.0",
1211 | "replace-ext": "0.0.1",
1212 | "through2": "2.0.3",
1213 | "vinyl": "0.5.3"
1214 | },
1215 | "dependencies": {
1216 | "ansi-regex": {
1217 | "version": "2.1.1",
1218 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
1219 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
1220 | "dev": true
1221 | },
1222 | "ansi-styles": {
1223 | "version": "2.2.1",
1224 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
1225 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
1226 | "dev": true
1227 | },
1228 | "chalk": {
1229 | "version": "1.1.3",
1230 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1231 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1232 | "dev": true,
1233 | "requires": {
1234 | "ansi-styles": "2.2.1",
1235 | "escape-string-regexp": "1.0.5",
1236 | "has-ansi": "2.0.0",
1237 | "strip-ansi": "3.0.1",
1238 | "supports-color": "2.0.0"
1239 | }
1240 | },
1241 | "has-ansi": {
1242 | "version": "2.0.0",
1243 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
1244 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
1245 | "dev": true,
1246 | "requires": {
1247 | "ansi-regex": "2.1.1"
1248 | }
1249 | },
1250 | "strip-ansi": {
1251 | "version": "3.0.1",
1252 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
1253 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
1254 | "dev": true,
1255 | "requires": {
1256 | "ansi-regex": "2.1.1"
1257 | }
1258 | },
1259 | "supports-color": {
1260 | "version": "2.0.0",
1261 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
1262 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
1263 | "dev": true
1264 | }
1265 | }
1266 | },
1267 | "gulplog": {
1268 | "version": "1.0.0",
1269 | "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
1270 | "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
1271 | "dev": true,
1272 | "requires": {
1273 | "glogg": "1.0.1"
1274 | }
1275 | },
1276 | "has-ansi": {
1277 | "version": "0.1.0",
1278 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz",
1279 | "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=",
1280 | "dev": true,
1281 | "requires": {
1282 | "ansi-regex": "0.2.1"
1283 | }
1284 | },
1285 | "has-gulplog": {
1286 | "version": "0.1.0",
1287 | "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
1288 | "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
1289 | "dev": true,
1290 | "requires": {
1291 | "sparkles": "1.0.0"
1292 | }
1293 | },
1294 | "has-value": {
1295 | "version": "1.0.0",
1296 | "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
1297 | "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
1298 | "dev": true,
1299 | "requires": {
1300 | "get-value": "2.0.6",
1301 | "has-values": "1.0.0",
1302 | "isobject": "3.0.1"
1303 | }
1304 | },
1305 | "has-values": {
1306 | "version": "1.0.0",
1307 | "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
1308 | "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
1309 | "dev": true,
1310 | "requires": {
1311 | "is-number": "3.0.0",
1312 | "kind-of": "4.0.0"
1313 | },
1314 | "dependencies": {
1315 | "kind-of": {
1316 | "version": "4.0.0",
1317 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
1318 | "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
1319 | "dev": true,
1320 | "requires": {
1321 | "is-buffer": "1.1.6"
1322 | }
1323 | }
1324 | }
1325 | },
1326 | "homedir-polyfill": {
1327 | "version": "1.0.1",
1328 | "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
1329 | "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=",
1330 | "dev": true,
1331 | "requires": {
1332 | "parse-passwd": "1.0.0"
1333 | }
1334 | },
1335 | "htmlparser2": {
1336 | "version": "3.8.3",
1337 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
1338 | "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
1339 | "dev": true,
1340 | "requires": {
1341 | "domelementtype": "1.3.0",
1342 | "domhandler": "2.3.0",
1343 | "domutils": "1.5.1",
1344 | "entities": "1.0.0",
1345 | "readable-stream": "1.1.14"
1346 | }
1347 | },
1348 | "inflight": {
1349 | "version": "1.0.6",
1350 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1351 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
1352 | "requires": {
1353 | "once": "1.4.0",
1354 | "wrappy": "1.0.2"
1355 | }
1356 | },
1357 | "inherits": {
1358 | "version": "2.0.3",
1359 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
1360 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
1361 | },
1362 | "ini": {
1363 | "version": "1.3.5",
1364 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
1365 | "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
1366 | "dev": true
1367 | },
1368 | "interpret": {
1369 | "version": "0.3.10",
1370 | "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.3.10.tgz",
1371 | "integrity": "sha1-CIwl3nMcbFsRKpDwBxz69Fnlp7s=",
1372 | "dev": true
1373 | },
1374 | "is-absolute": {
1375 | "version": "1.0.0",
1376 | "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
1377 | "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
1378 | "dev": true,
1379 | "requires": {
1380 | "is-relative": "1.0.0",
1381 | "is-windows": "1.0.2"
1382 | }
1383 | },
1384 | "is-accessor-descriptor": {
1385 | "version": "1.0.0",
1386 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
1387 | "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
1388 | "dev": true,
1389 | "requires": {
1390 | "kind-of": "6.0.2"
1391 | }
1392 | },
1393 | "is-buffer": {
1394 | "version": "1.1.6",
1395 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
1396 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
1397 | "dev": true
1398 | },
1399 | "is-data-descriptor": {
1400 | "version": "1.0.0",
1401 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
1402 | "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
1403 | "dev": true,
1404 | "requires": {
1405 | "kind-of": "6.0.2"
1406 | }
1407 | },
1408 | "is-descriptor": {
1409 | "version": "1.0.2",
1410 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
1411 | "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
1412 | "dev": true,
1413 | "requires": {
1414 | "is-accessor-descriptor": "1.0.0",
1415 | "is-data-descriptor": "1.0.0",
1416 | "kind-of": "6.0.2"
1417 | }
1418 | },
1419 | "is-extendable": {
1420 | "version": "0.1.1",
1421 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
1422 | "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
1423 | "dev": true
1424 | },
1425 | "is-extglob": {
1426 | "version": "2.1.1",
1427 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1428 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
1429 | "dev": true
1430 | },
1431 | "is-glob": {
1432 | "version": "3.1.0",
1433 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
1434 | "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
1435 | "dev": true,
1436 | "requires": {
1437 | "is-extglob": "2.1.1"
1438 | }
1439 | },
1440 | "is-number": {
1441 | "version": "3.0.0",
1442 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
1443 | "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
1444 | "dev": true,
1445 | "requires": {
1446 | "kind-of": "3.2.2"
1447 | },
1448 | "dependencies": {
1449 | "kind-of": {
1450 | "version": "3.2.2",
1451 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1452 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1453 | "dev": true,
1454 | "requires": {
1455 | "is-buffer": "1.1.6"
1456 | }
1457 | }
1458 | }
1459 | },
1460 | "is-odd": {
1461 | "version": "2.0.0",
1462 | "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz",
1463 | "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==",
1464 | "dev": true,
1465 | "requires": {
1466 | "is-number": "4.0.0"
1467 | },
1468 | "dependencies": {
1469 | "is-number": {
1470 | "version": "4.0.0",
1471 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
1472 | "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
1473 | "dev": true
1474 | }
1475 | }
1476 | },
1477 | "is-plain-object": {
1478 | "version": "2.0.4",
1479 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
1480 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
1481 | "dev": true,
1482 | "requires": {
1483 | "isobject": "3.0.1"
1484 | }
1485 | },
1486 | "is-relative": {
1487 | "version": "1.0.0",
1488 | "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
1489 | "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
1490 | "dev": true,
1491 | "requires": {
1492 | "is-unc-path": "1.0.0"
1493 | }
1494 | },
1495 | "is-unc-path": {
1496 | "version": "1.0.0",
1497 | "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
1498 | "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
1499 | "dev": true,
1500 | "requires": {
1501 | "unc-path-regex": "0.1.2"
1502 | }
1503 | },
1504 | "is-utf8": {
1505 | "version": "0.2.1",
1506 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
1507 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
1508 | "dev": true
1509 | },
1510 | "is-windows": {
1511 | "version": "1.0.2",
1512 | "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
1513 | "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
1514 | "dev": true
1515 | },
1516 | "isarray": {
1517 | "version": "0.0.1",
1518 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
1519 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
1520 | "dev": true
1521 | },
1522 | "isexe": {
1523 | "version": "2.0.0",
1524 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1525 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
1526 | "dev": true
1527 | },
1528 | "isobject": {
1529 | "version": "3.0.1",
1530 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
1531 | "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
1532 | "dev": true
1533 | },
1534 | "jade": {
1535 | "version": "0.26.3",
1536 | "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
1537 | "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
1538 | "dev": true,
1539 | "requires": {
1540 | "commander": "0.6.1",
1541 | "mkdirp": "0.3.0"
1542 | },
1543 | "dependencies": {
1544 | "commander": {
1545 | "version": "0.6.1",
1546 | "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
1547 | "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=",
1548 | "dev": true
1549 | },
1550 | "mkdirp": {
1551 | "version": "0.3.0",
1552 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
1553 | "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=",
1554 | "dev": true
1555 | }
1556 | }
1557 | },
1558 | "jshint": {
1559 | "version": "2.9.5",
1560 | "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.9.5.tgz",
1561 | "integrity": "sha1-HnJSkVzmgbQIJ+4UJIxG006apiw=",
1562 | "dev": true,
1563 | "requires": {
1564 | "cli": "1.0.1",
1565 | "console-browserify": "1.1.0",
1566 | "exit": "0.1.2",
1567 | "htmlparser2": "3.8.3",
1568 | "lodash": "3.7.0",
1569 | "minimatch": "3.0.4",
1570 | "shelljs": "0.3.0",
1571 | "strip-json-comments": "1.0.4"
1572 | },
1573 | "dependencies": {
1574 | "lodash": {
1575 | "version": "3.7.0",
1576 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz",
1577 | "integrity": "sha1-Nni9irmVBXwHreg27S7wh9qBHUU=",
1578 | "dev": true
1579 | }
1580 | }
1581 | },
1582 | "kind-of": {
1583 | "version": "6.0.2",
1584 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
1585 | "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
1586 | "dev": true
1587 | },
1588 | "liftoff": {
1589 | "version": "2.5.0",
1590 | "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz",
1591 | "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=",
1592 | "dev": true,
1593 | "requires": {
1594 | "extend": "3.0.1",
1595 | "findup-sync": "2.0.0",
1596 | "fined": "1.1.0",
1597 | "flagged-respawn": "1.0.0",
1598 | "is-plain-object": "2.0.4",
1599 | "object.map": "1.0.1",
1600 | "rechoir": "0.6.2",
1601 | "resolve": "1.6.0"
1602 | }
1603 | },
1604 | "lodash": {
1605 | "version": "3.10.1",
1606 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
1607 | "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
1608 | },
1609 | "lodash._basecopy": {
1610 | "version": "3.0.1",
1611 | "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
1612 | "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
1613 | "dev": true
1614 | },
1615 | "lodash._basetostring": {
1616 | "version": "3.0.1",
1617 | "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz",
1618 | "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=",
1619 | "dev": true
1620 | },
1621 | "lodash._basevalues": {
1622 | "version": "3.0.0",
1623 | "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz",
1624 | "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=",
1625 | "dev": true
1626 | },
1627 | "lodash._getnative": {
1628 | "version": "3.9.1",
1629 | "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
1630 | "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
1631 | "dev": true
1632 | },
1633 | "lodash._isiterateecall": {
1634 | "version": "3.0.9",
1635 | "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
1636 | "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
1637 | "dev": true
1638 | },
1639 | "lodash._reescape": {
1640 | "version": "3.0.0",
1641 | "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz",
1642 | "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=",
1643 | "dev": true
1644 | },
1645 | "lodash._reevaluate": {
1646 | "version": "3.0.0",
1647 | "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz",
1648 | "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=",
1649 | "dev": true
1650 | },
1651 | "lodash._reinterpolate": {
1652 | "version": "3.0.0",
1653 | "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
1654 | "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
1655 | "dev": true
1656 | },
1657 | "lodash._root": {
1658 | "version": "3.0.1",
1659 | "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
1660 | "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=",
1661 | "dev": true
1662 | },
1663 | "lodash.clonedeep": {
1664 | "version": "4.5.0",
1665 | "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
1666 | "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
1667 | "dev": true
1668 | },
1669 | "lodash.escape": {
1670 | "version": "3.2.0",
1671 | "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz",
1672 | "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=",
1673 | "dev": true,
1674 | "requires": {
1675 | "lodash._root": "3.0.1"
1676 | }
1677 | },
1678 | "lodash.isarguments": {
1679 | "version": "3.1.0",
1680 | "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
1681 | "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
1682 | "dev": true
1683 | },
1684 | "lodash.isarray": {
1685 | "version": "3.0.4",
1686 | "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
1687 | "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
1688 | "dev": true
1689 | },
1690 | "lodash.keys": {
1691 | "version": "3.1.2",
1692 | "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
1693 | "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
1694 | "dev": true,
1695 | "requires": {
1696 | "lodash._getnative": "3.9.1",
1697 | "lodash.isarguments": "3.1.0",
1698 | "lodash.isarray": "3.0.4"
1699 | }
1700 | },
1701 | "lodash.restparam": {
1702 | "version": "3.6.1",
1703 | "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
1704 | "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
1705 | "dev": true
1706 | },
1707 | "lodash.template": {
1708 | "version": "3.6.2",
1709 | "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz",
1710 | "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=",
1711 | "dev": true,
1712 | "requires": {
1713 | "lodash._basecopy": "3.0.1",
1714 | "lodash._basetostring": "3.0.1",
1715 | "lodash._basevalues": "3.0.0",
1716 | "lodash._isiterateecall": "3.0.9",
1717 | "lodash._reinterpolate": "3.0.0",
1718 | "lodash.escape": "3.2.0",
1719 | "lodash.keys": "3.1.2",
1720 | "lodash.restparam": "3.6.1",
1721 | "lodash.templatesettings": "3.1.1"
1722 | }
1723 | },
1724 | "lodash.templatesettings": {
1725 | "version": "3.1.1",
1726 | "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz",
1727 | "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=",
1728 | "dev": true,
1729 | "requires": {
1730 | "lodash._reinterpolate": "3.0.0",
1731 | "lodash.escape": "3.2.0"
1732 | }
1733 | },
1734 | "lru-cache": {
1735 | "version": "2.7.3",
1736 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
1737 | "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
1738 | "dev": true
1739 | },
1740 | "make-iterator": {
1741 | "version": "1.0.0",
1742 | "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.0.tgz",
1743 | "integrity": "sha1-V7713IXSOSO6I3ZzJNjo+PPZaUs=",
1744 | "dev": true,
1745 | "requires": {
1746 | "kind-of": "3.2.2"
1747 | },
1748 | "dependencies": {
1749 | "kind-of": {
1750 | "version": "3.2.2",
1751 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
1752 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
1753 | "dev": true,
1754 | "requires": {
1755 | "is-buffer": "1.1.6"
1756 | }
1757 | }
1758 | }
1759 | },
1760 | "map-cache": {
1761 | "version": "0.2.2",
1762 | "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
1763 | "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
1764 | "dev": true
1765 | },
1766 | "map-visit": {
1767 | "version": "1.0.0",
1768 | "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
1769 | "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
1770 | "dev": true,
1771 | "requires": {
1772 | "object-visit": "1.0.1"
1773 | }
1774 | },
1775 | "micromatch": {
1776 | "version": "3.1.10",
1777 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
1778 | "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
1779 | "dev": true,
1780 | "requires": {
1781 | "arr-diff": "4.0.0",
1782 | "array-unique": "0.3.2",
1783 | "braces": "2.3.1",
1784 | "define-property": "2.0.2",
1785 | "extend-shallow": "3.0.2",
1786 | "extglob": "2.0.4",
1787 | "fragment-cache": "0.2.1",
1788 | "kind-of": "6.0.2",
1789 | "nanomatch": "1.2.9",
1790 | "object.pick": "1.3.0",
1791 | "regex-not": "1.0.2",
1792 | "snapdragon": "0.8.2",
1793 | "to-regex": "3.0.2"
1794 | }
1795 | },
1796 | "minimatch": {
1797 | "version": "3.0.4",
1798 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
1799 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
1800 | "requires": {
1801 | "brace-expansion": "1.1.11"
1802 | }
1803 | },
1804 | "minimist": {
1805 | "version": "1.2.0",
1806 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
1807 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
1808 | "dev": true
1809 | },
1810 | "mixin-deep": {
1811 | "version": "1.3.1",
1812 | "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
1813 | "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
1814 | "dev": true,
1815 | "requires": {
1816 | "for-in": "1.0.2",
1817 | "is-extendable": "1.0.1"
1818 | },
1819 | "dependencies": {
1820 | "is-extendable": {
1821 | "version": "1.0.1",
1822 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
1823 | "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
1824 | "dev": true,
1825 | "requires": {
1826 | "is-plain-object": "2.0.4"
1827 | }
1828 | }
1829 | }
1830 | },
1831 | "mkdirp": {
1832 | "version": "0.5.1",
1833 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
1834 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
1835 | "dev": true,
1836 | "requires": {
1837 | "minimist": "0.0.8"
1838 | },
1839 | "dependencies": {
1840 | "minimist": {
1841 | "version": "0.0.8",
1842 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
1843 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
1844 | "dev": true
1845 | }
1846 | }
1847 | },
1848 | "mocha": {
1849 | "version": "1.21.5",
1850 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-1.21.5.tgz",
1851 | "integrity": "sha1-fFiwkXTfl25DSiOx6NY5hz/FKek=",
1852 | "dev": true,
1853 | "requires": {
1854 | "commander": "2.3.0",
1855 | "debug": "2.0.0",
1856 | "diff": "1.0.8",
1857 | "escape-string-regexp": "1.0.2",
1858 | "glob": "3.2.3",
1859 | "growl": "1.8.1",
1860 | "jade": "0.26.3",
1861 | "mkdirp": "0.5.0"
1862 | },
1863 | "dependencies": {
1864 | "debug": {
1865 | "version": "2.0.0",
1866 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz",
1867 | "integrity": "sha1-ib2d9nMrUSVrxnBTQrugLtEhMe8=",
1868 | "dev": true,
1869 | "requires": {
1870 | "ms": "0.6.2"
1871 | }
1872 | },
1873 | "escape-string-regexp": {
1874 | "version": "1.0.2",
1875 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
1876 | "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=",
1877 | "dev": true
1878 | },
1879 | "glob": {
1880 | "version": "3.2.3",
1881 | "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz",
1882 | "integrity": "sha1-4xPusknHr/qlxHUoaw4RW1mDlGc=",
1883 | "dev": true,
1884 | "requires": {
1885 | "graceful-fs": "2.0.3",
1886 | "inherits": "2.0.3",
1887 | "minimatch": "0.2.14"
1888 | }
1889 | },
1890 | "graceful-fs": {
1891 | "version": "2.0.3",
1892 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz",
1893 | "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA=",
1894 | "dev": true
1895 | },
1896 | "minimatch": {
1897 | "version": "0.2.14",
1898 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
1899 | "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
1900 | "dev": true,
1901 | "requires": {
1902 | "lru-cache": "2.7.3",
1903 | "sigmund": "1.0.1"
1904 | }
1905 | },
1906 | "minimist": {
1907 | "version": "0.0.8",
1908 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
1909 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
1910 | "dev": true
1911 | },
1912 | "mkdirp": {
1913 | "version": "0.5.0",
1914 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
1915 | "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
1916 | "dev": true,
1917 | "requires": {
1918 | "minimist": "0.0.8"
1919 | }
1920 | },
1921 | "ms": {
1922 | "version": "0.6.2",
1923 | "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
1924 | "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw=",
1925 | "dev": true
1926 | }
1927 | }
1928 | },
1929 | "ms": {
1930 | "version": "2.0.0",
1931 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1932 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1933 | "dev": true
1934 | },
1935 | "multimatch": {
1936 | "version": "0.3.0",
1937 | "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-0.3.0.tgz",
1938 | "integrity": "sha1-YD28P+MoHTOAlKHhuTqLXyvgONo=",
1939 | "dev": true,
1940 | "requires": {
1941 | "array-differ": "0.1.0",
1942 | "array-union": "0.1.0",
1943 | "minimatch": "0.3.0"
1944 | },
1945 | "dependencies": {
1946 | "array-differ": {
1947 | "version": "0.1.0",
1948 | "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-0.1.0.tgz",
1949 | "integrity": "sha1-EuLJtwa+1HyLSDtX5IdHP7CGHzo=",
1950 | "dev": true
1951 | },
1952 | "minimatch": {
1953 | "version": "0.3.0",
1954 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
1955 | "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
1956 | "dev": true,
1957 | "requires": {
1958 | "lru-cache": "2.7.3",
1959 | "sigmund": "1.0.1"
1960 | }
1961 | }
1962 | }
1963 | },
1964 | "multipipe": {
1965 | "version": "0.1.2",
1966 | "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz",
1967 | "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=",
1968 | "dev": true,
1969 | "requires": {
1970 | "duplexer2": "0.0.2"
1971 | }
1972 | },
1973 | "nanomatch": {
1974 | "version": "1.2.9",
1975 | "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz",
1976 | "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==",
1977 | "dev": true,
1978 | "requires": {
1979 | "arr-diff": "4.0.0",
1980 | "array-unique": "0.3.2",
1981 | "define-property": "2.0.2",
1982 | "extend-shallow": "3.0.2",
1983 | "fragment-cache": "0.2.1",
1984 | "is-odd": "2.0.0",
1985 | "is-windows": "1.0.2",
1986 | "kind-of": "6.0.2",
1987 | "object.pick": "1.3.0",
1988 | "regex-not": "1.0.2",
1989 | "snapdragon": "0.8.2",
1990 | "to-regex": "3.0.2"
1991 | }
1992 | },
1993 | "natives": {
1994 | "version": "1.1.2",
1995 | "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.2.tgz",
1996 | "integrity": "sha512-5bRASydE1gu6zPOenLN043++J8xj1Ob7ArkfdYO3JN4DF5rDmG7bMoiybkTyD+GnXQEMixVeDHMzuqm6kpBmiA==",
1997 | "dev": true
1998 | },
1999 | "nopt": {
2000 | "version": "1.0.10",
2001 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
2002 | "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
2003 | "dev": true,
2004 | "requires": {
2005 | "abbrev": "1.1.1"
2006 | }
2007 | },
2008 | "object-assign": {
2009 | "version": "3.0.0",
2010 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz",
2011 | "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=",
2012 | "dev": true
2013 | },
2014 | "object-copy": {
2015 | "version": "0.1.0",
2016 | "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
2017 | "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
2018 | "dev": true,
2019 | "requires": {
2020 | "copy-descriptor": "0.1.1",
2021 | "define-property": "0.2.5",
2022 | "kind-of": "3.2.2"
2023 | },
2024 | "dependencies": {
2025 | "define-property": {
2026 | "version": "0.2.5",
2027 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2028 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2029 | "dev": true,
2030 | "requires": {
2031 | "is-descriptor": "0.1.6"
2032 | }
2033 | },
2034 | "is-accessor-descriptor": {
2035 | "version": "0.1.6",
2036 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
2037 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
2038 | "dev": true,
2039 | "requires": {
2040 | "kind-of": "3.2.2"
2041 | }
2042 | },
2043 | "is-data-descriptor": {
2044 | "version": "0.1.4",
2045 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
2046 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
2047 | "dev": true,
2048 | "requires": {
2049 | "kind-of": "3.2.2"
2050 | }
2051 | },
2052 | "is-descriptor": {
2053 | "version": "0.1.6",
2054 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
2055 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
2056 | "dev": true,
2057 | "requires": {
2058 | "is-accessor-descriptor": "0.1.6",
2059 | "is-data-descriptor": "0.1.4",
2060 | "kind-of": "5.1.0"
2061 | },
2062 | "dependencies": {
2063 | "kind-of": {
2064 | "version": "5.1.0",
2065 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
2066 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
2067 | "dev": true
2068 | }
2069 | }
2070 | },
2071 | "kind-of": {
2072 | "version": "3.2.2",
2073 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2074 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2075 | "dev": true,
2076 | "requires": {
2077 | "is-buffer": "1.1.6"
2078 | }
2079 | }
2080 | }
2081 | },
2082 | "object-visit": {
2083 | "version": "1.0.1",
2084 | "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
2085 | "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
2086 | "dev": true,
2087 | "requires": {
2088 | "isobject": "3.0.1"
2089 | }
2090 | },
2091 | "object.defaults": {
2092 | "version": "1.1.0",
2093 | "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
2094 | "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
2095 | "dev": true,
2096 | "requires": {
2097 | "array-each": "1.0.1",
2098 | "array-slice": "1.1.0",
2099 | "for-own": "1.0.0",
2100 | "isobject": "3.0.1"
2101 | }
2102 | },
2103 | "object.map": {
2104 | "version": "1.0.1",
2105 | "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
2106 | "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
2107 | "dev": true,
2108 | "requires": {
2109 | "for-own": "1.0.0",
2110 | "make-iterator": "1.0.0"
2111 | }
2112 | },
2113 | "object.pick": {
2114 | "version": "1.3.0",
2115 | "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
2116 | "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
2117 | "dev": true,
2118 | "requires": {
2119 | "isobject": "3.0.1"
2120 | }
2121 | },
2122 | "once": {
2123 | "version": "1.4.0",
2124 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
2125 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
2126 | "requires": {
2127 | "wrappy": "1.0.2"
2128 | }
2129 | },
2130 | "orchestrator": {
2131 | "version": "0.3.8",
2132 | "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz",
2133 | "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=",
2134 | "dev": true,
2135 | "requires": {
2136 | "end-of-stream": "0.1.5",
2137 | "sequencify": "0.0.7",
2138 | "stream-consume": "0.1.1"
2139 | }
2140 | },
2141 | "ordered-read-streams": {
2142 | "version": "0.1.0",
2143 | "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz",
2144 | "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=",
2145 | "dev": true
2146 | },
2147 | "os-homedir": {
2148 | "version": "1.0.2",
2149 | "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
2150 | "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
2151 | "dev": true
2152 | },
2153 | "os-tmpdir": {
2154 | "version": "1.0.2",
2155 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
2156 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
2157 | "dev": true
2158 | },
2159 | "parse-filepath": {
2160 | "version": "1.0.2",
2161 | "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
2162 | "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
2163 | "dev": true,
2164 | "requires": {
2165 | "is-absolute": "1.0.0",
2166 | "map-cache": "0.2.2",
2167 | "path-root": "0.1.1"
2168 | }
2169 | },
2170 | "parse-passwd": {
2171 | "version": "1.0.0",
2172 | "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
2173 | "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
2174 | "dev": true
2175 | },
2176 | "pascalcase": {
2177 | "version": "0.1.1",
2178 | "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
2179 | "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
2180 | "dev": true
2181 | },
2182 | "path-is-absolute": {
2183 | "version": "1.0.1",
2184 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
2185 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
2186 | },
2187 | "path-parse": {
2188 | "version": "1.0.5",
2189 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
2190 | "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
2191 | "dev": true
2192 | },
2193 | "path-root": {
2194 | "version": "0.1.1",
2195 | "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
2196 | "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
2197 | "dev": true,
2198 | "requires": {
2199 | "path-root-regex": "0.1.2"
2200 | }
2201 | },
2202 | "path-root-regex": {
2203 | "version": "0.1.2",
2204 | "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
2205 | "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
2206 | "dev": true
2207 | },
2208 | "posix-character-classes": {
2209 | "version": "0.1.1",
2210 | "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
2211 | "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
2212 | "dev": true
2213 | },
2214 | "pretty-hrtime": {
2215 | "version": "0.2.2",
2216 | "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-0.2.2.tgz",
2217 | "integrity": "sha1-1P2INR46R0H4Fzr31qS4RvmJXAA=",
2218 | "dev": true
2219 | },
2220 | "process-nextick-args": {
2221 | "version": "2.0.0",
2222 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
2223 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
2224 | "dev": true
2225 | },
2226 | "rcfinder": {
2227 | "version": "0.1.9",
2228 | "resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.9.tgz",
2229 | "integrity": "sha1-8+gPOH3fmugK4wpBADKWQuroERU=",
2230 | "dev": true,
2231 | "requires": {
2232 | "lodash.clonedeep": "4.5.0"
2233 | }
2234 | },
2235 | "rcloader": {
2236 | "version": "0.1.2",
2237 | "resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.1.2.tgz",
2238 | "integrity": "sha1-oJY6ZDfQnvjLktky0trUl7DRc2w=",
2239 | "dev": true,
2240 | "requires": {
2241 | "lodash": "2.4.2",
2242 | "rcfinder": "0.1.9"
2243 | },
2244 | "dependencies": {
2245 | "lodash": {
2246 | "version": "2.4.2",
2247 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
2248 | "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=",
2249 | "dev": true
2250 | }
2251 | }
2252 | },
2253 | "readable-stream": {
2254 | "version": "1.1.14",
2255 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
2256 | "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
2257 | "dev": true,
2258 | "requires": {
2259 | "core-util-is": "1.0.2",
2260 | "inherits": "2.0.3",
2261 | "isarray": "0.0.1",
2262 | "string_decoder": "0.10.31"
2263 | }
2264 | },
2265 | "rechoir": {
2266 | "version": "0.6.2",
2267 | "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
2268 | "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
2269 | "dev": true,
2270 | "requires": {
2271 | "resolve": "1.6.0"
2272 | }
2273 | },
2274 | "regex-not": {
2275 | "version": "1.0.2",
2276 | "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
2277 | "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
2278 | "dev": true,
2279 | "requires": {
2280 | "extend-shallow": "3.0.2",
2281 | "safe-regex": "1.1.0"
2282 | }
2283 | },
2284 | "repeat-element": {
2285 | "version": "1.1.2",
2286 | "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
2287 | "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
2288 | "dev": true
2289 | },
2290 | "repeat-string": {
2291 | "version": "1.6.1",
2292 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
2293 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
2294 | "dev": true
2295 | },
2296 | "replace-ext": {
2297 | "version": "0.0.1",
2298 | "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz",
2299 | "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=",
2300 | "dev": true
2301 | },
2302 | "resolve": {
2303 | "version": "1.6.0",
2304 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz",
2305 | "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==",
2306 | "dev": true,
2307 | "requires": {
2308 | "path-parse": "1.0.5"
2309 | }
2310 | },
2311 | "resolve-dir": {
2312 | "version": "1.0.1",
2313 | "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
2314 | "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
2315 | "dev": true,
2316 | "requires": {
2317 | "expand-tilde": "2.0.2",
2318 | "global-modules": "1.0.0"
2319 | }
2320 | },
2321 | "resolve-url": {
2322 | "version": "0.2.1",
2323 | "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
2324 | "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
2325 | "dev": true
2326 | },
2327 | "ret": {
2328 | "version": "0.1.15",
2329 | "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
2330 | "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
2331 | "dev": true
2332 | },
2333 | "rimraf": {
2334 | "version": "2.2.8",
2335 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
2336 | "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=",
2337 | "dev": true
2338 | },
2339 | "safe-buffer": {
2340 | "version": "5.1.1",
2341 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
2342 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
2343 | "dev": true
2344 | },
2345 | "safe-regex": {
2346 | "version": "1.1.0",
2347 | "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
2348 | "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
2349 | "dev": true,
2350 | "requires": {
2351 | "ret": "0.1.15"
2352 | }
2353 | },
2354 | "semver": {
2355 | "version": "4.3.6",
2356 | "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
2357 | "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
2358 | "dev": true
2359 | },
2360 | "sequencify": {
2361 | "version": "0.0.7",
2362 | "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz",
2363 | "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=",
2364 | "dev": true
2365 | },
2366 | "set-value": {
2367 | "version": "2.0.0",
2368 | "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
2369 | "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
2370 | "dev": true,
2371 | "requires": {
2372 | "extend-shallow": "2.0.1",
2373 | "is-extendable": "0.1.1",
2374 | "is-plain-object": "2.0.4",
2375 | "split-string": "3.1.0"
2376 | },
2377 | "dependencies": {
2378 | "extend-shallow": {
2379 | "version": "2.0.1",
2380 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
2381 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
2382 | "dev": true,
2383 | "requires": {
2384 | "is-extendable": "0.1.1"
2385 | }
2386 | }
2387 | }
2388 | },
2389 | "shelljs": {
2390 | "version": "0.3.0",
2391 | "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
2392 | "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
2393 | "dev": true
2394 | },
2395 | "sigmund": {
2396 | "version": "1.0.1",
2397 | "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
2398 | "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
2399 | "dev": true
2400 | },
2401 | "snapdragon": {
2402 | "version": "0.8.2",
2403 | "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
2404 | "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
2405 | "dev": true,
2406 | "requires": {
2407 | "base": "0.11.2",
2408 | "debug": "2.6.9",
2409 | "define-property": "0.2.5",
2410 | "extend-shallow": "2.0.1",
2411 | "map-cache": "0.2.2",
2412 | "source-map": "0.5.7",
2413 | "source-map-resolve": "0.5.1",
2414 | "use": "3.1.0"
2415 | },
2416 | "dependencies": {
2417 | "define-property": {
2418 | "version": "0.2.5",
2419 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2420 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2421 | "dev": true,
2422 | "requires": {
2423 | "is-descriptor": "0.1.6"
2424 | }
2425 | },
2426 | "extend-shallow": {
2427 | "version": "2.0.1",
2428 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
2429 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
2430 | "dev": true,
2431 | "requires": {
2432 | "is-extendable": "0.1.1"
2433 | }
2434 | },
2435 | "is-accessor-descriptor": {
2436 | "version": "0.1.6",
2437 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
2438 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
2439 | "dev": true,
2440 | "requires": {
2441 | "kind-of": "3.2.2"
2442 | },
2443 | "dependencies": {
2444 | "kind-of": {
2445 | "version": "3.2.2",
2446 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2447 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2448 | "dev": true,
2449 | "requires": {
2450 | "is-buffer": "1.1.6"
2451 | }
2452 | }
2453 | }
2454 | },
2455 | "is-data-descriptor": {
2456 | "version": "0.1.4",
2457 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
2458 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
2459 | "dev": true,
2460 | "requires": {
2461 | "kind-of": "3.2.2"
2462 | },
2463 | "dependencies": {
2464 | "kind-of": {
2465 | "version": "3.2.2",
2466 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2467 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2468 | "dev": true,
2469 | "requires": {
2470 | "is-buffer": "1.1.6"
2471 | }
2472 | }
2473 | }
2474 | },
2475 | "is-descriptor": {
2476 | "version": "0.1.6",
2477 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
2478 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
2479 | "dev": true,
2480 | "requires": {
2481 | "is-accessor-descriptor": "0.1.6",
2482 | "is-data-descriptor": "0.1.4",
2483 | "kind-of": "5.1.0"
2484 | }
2485 | },
2486 | "kind-of": {
2487 | "version": "5.1.0",
2488 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
2489 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
2490 | "dev": true
2491 | }
2492 | }
2493 | },
2494 | "snapdragon-node": {
2495 | "version": "2.1.1",
2496 | "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
2497 | "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
2498 | "dev": true,
2499 | "requires": {
2500 | "define-property": "1.0.0",
2501 | "isobject": "3.0.1",
2502 | "snapdragon-util": "3.0.1"
2503 | },
2504 | "dependencies": {
2505 | "define-property": {
2506 | "version": "1.0.0",
2507 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
2508 | "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
2509 | "dev": true,
2510 | "requires": {
2511 | "is-descriptor": "1.0.2"
2512 | }
2513 | }
2514 | }
2515 | },
2516 | "snapdragon-util": {
2517 | "version": "3.0.1",
2518 | "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
2519 | "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
2520 | "dev": true,
2521 | "requires": {
2522 | "kind-of": "3.2.2"
2523 | },
2524 | "dependencies": {
2525 | "kind-of": {
2526 | "version": "3.2.2",
2527 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2528 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2529 | "dev": true,
2530 | "requires": {
2531 | "is-buffer": "1.1.6"
2532 | }
2533 | }
2534 | }
2535 | },
2536 | "source-map": {
2537 | "version": "0.5.7",
2538 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
2539 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
2540 | "dev": true
2541 | },
2542 | "source-map-resolve": {
2543 | "version": "0.5.1",
2544 | "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz",
2545 | "integrity": "sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A==",
2546 | "dev": true,
2547 | "requires": {
2548 | "atob": "2.0.3",
2549 | "decode-uri-component": "0.2.0",
2550 | "resolve-url": "0.2.1",
2551 | "source-map-url": "0.4.0",
2552 | "urix": "0.1.0"
2553 | }
2554 | },
2555 | "source-map-url": {
2556 | "version": "0.4.0",
2557 | "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
2558 | "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
2559 | "dev": true
2560 | },
2561 | "sparkles": {
2562 | "version": "1.0.0",
2563 | "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz",
2564 | "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=",
2565 | "dev": true
2566 | },
2567 | "split-string": {
2568 | "version": "3.1.0",
2569 | "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
2570 | "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
2571 | "dev": true,
2572 | "requires": {
2573 | "extend-shallow": "3.0.2"
2574 | }
2575 | },
2576 | "static-extend": {
2577 | "version": "0.1.2",
2578 | "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
2579 | "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
2580 | "dev": true,
2581 | "requires": {
2582 | "define-property": "0.2.5",
2583 | "object-copy": "0.1.0"
2584 | },
2585 | "dependencies": {
2586 | "define-property": {
2587 | "version": "0.2.5",
2588 | "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
2589 | "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
2590 | "dev": true,
2591 | "requires": {
2592 | "is-descriptor": "0.1.6"
2593 | }
2594 | },
2595 | "is-accessor-descriptor": {
2596 | "version": "0.1.6",
2597 | "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
2598 | "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
2599 | "dev": true,
2600 | "requires": {
2601 | "kind-of": "3.2.2"
2602 | },
2603 | "dependencies": {
2604 | "kind-of": {
2605 | "version": "3.2.2",
2606 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2607 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2608 | "dev": true,
2609 | "requires": {
2610 | "is-buffer": "1.1.6"
2611 | }
2612 | }
2613 | }
2614 | },
2615 | "is-data-descriptor": {
2616 | "version": "0.1.4",
2617 | "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
2618 | "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
2619 | "dev": true,
2620 | "requires": {
2621 | "kind-of": "3.2.2"
2622 | },
2623 | "dependencies": {
2624 | "kind-of": {
2625 | "version": "3.2.2",
2626 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2627 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2628 | "dev": true,
2629 | "requires": {
2630 | "is-buffer": "1.1.6"
2631 | }
2632 | }
2633 | }
2634 | },
2635 | "is-descriptor": {
2636 | "version": "0.1.6",
2637 | "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
2638 | "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
2639 | "dev": true,
2640 | "requires": {
2641 | "is-accessor-descriptor": "0.1.6",
2642 | "is-data-descriptor": "0.1.4",
2643 | "kind-of": "5.1.0"
2644 | }
2645 | },
2646 | "kind-of": {
2647 | "version": "5.1.0",
2648 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
2649 | "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
2650 | "dev": true
2651 | }
2652 | }
2653 | },
2654 | "stream-consume": {
2655 | "version": "0.1.1",
2656 | "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz",
2657 | "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==",
2658 | "dev": true
2659 | },
2660 | "string_decoder": {
2661 | "version": "0.10.31",
2662 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
2663 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
2664 | "dev": true
2665 | },
2666 | "strip-ansi": {
2667 | "version": "0.3.0",
2668 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz",
2669 | "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=",
2670 | "dev": true,
2671 | "requires": {
2672 | "ansi-regex": "0.2.1"
2673 | }
2674 | },
2675 | "strip-bom": {
2676 | "version": "1.0.0",
2677 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz",
2678 | "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=",
2679 | "dev": true,
2680 | "requires": {
2681 | "first-chunk-stream": "1.0.0",
2682 | "is-utf8": "0.2.1"
2683 | }
2684 | },
2685 | "strip-json-comments": {
2686 | "version": "1.0.4",
2687 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
2688 | "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
2689 | "dev": true
2690 | },
2691 | "supports-color": {
2692 | "version": "0.2.0",
2693 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz",
2694 | "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=",
2695 | "dev": true
2696 | },
2697 | "temp": {
2698 | "version": "0.8.3",
2699 | "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
2700 | "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=",
2701 | "dev": true,
2702 | "requires": {
2703 | "os-tmpdir": "1.0.2",
2704 | "rimraf": "2.2.8"
2705 | }
2706 | },
2707 | "through": {
2708 | "version": "2.3.8",
2709 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
2710 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
2711 | "dev": true
2712 | },
2713 | "through2": {
2714 | "version": "2.0.3",
2715 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
2716 | "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
2717 | "dev": true,
2718 | "requires": {
2719 | "readable-stream": "2.3.5",
2720 | "xtend": "4.0.1"
2721 | },
2722 | "dependencies": {
2723 | "isarray": {
2724 | "version": "1.0.0",
2725 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
2726 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
2727 | "dev": true
2728 | },
2729 | "readable-stream": {
2730 | "version": "2.3.5",
2731 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz",
2732 | "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
2733 | "dev": true,
2734 | "requires": {
2735 | "core-util-is": "1.0.2",
2736 | "inherits": "2.0.3",
2737 | "isarray": "1.0.0",
2738 | "process-nextick-args": "2.0.0",
2739 | "safe-buffer": "5.1.1",
2740 | "string_decoder": "1.0.3",
2741 | "util-deprecate": "1.0.2"
2742 | }
2743 | },
2744 | "string_decoder": {
2745 | "version": "1.0.3",
2746 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
2747 | "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
2748 | "dev": true,
2749 | "requires": {
2750 | "safe-buffer": "5.1.1"
2751 | }
2752 | }
2753 | }
2754 | },
2755 | "tildify": {
2756 | "version": "1.2.0",
2757 | "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz",
2758 | "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=",
2759 | "dev": true,
2760 | "requires": {
2761 | "os-homedir": "1.0.2"
2762 | }
2763 | },
2764 | "time-stamp": {
2765 | "version": "1.1.0",
2766 | "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
2767 | "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
2768 | "dev": true
2769 | },
2770 | "to-object-path": {
2771 | "version": "0.3.0",
2772 | "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
2773 | "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
2774 | "dev": true,
2775 | "requires": {
2776 | "kind-of": "3.2.2"
2777 | },
2778 | "dependencies": {
2779 | "kind-of": {
2780 | "version": "3.2.2",
2781 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2782 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2783 | "dev": true,
2784 | "requires": {
2785 | "is-buffer": "1.1.6"
2786 | }
2787 | }
2788 | }
2789 | },
2790 | "to-regex": {
2791 | "version": "3.0.2",
2792 | "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
2793 | "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
2794 | "dev": true,
2795 | "requires": {
2796 | "define-property": "2.0.2",
2797 | "extend-shallow": "3.0.2",
2798 | "regex-not": "1.0.2",
2799 | "safe-regex": "1.1.0"
2800 | }
2801 | },
2802 | "to-regex-range": {
2803 | "version": "2.1.1",
2804 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
2805 | "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
2806 | "dev": true,
2807 | "requires": {
2808 | "is-number": "3.0.0",
2809 | "repeat-string": "1.6.1"
2810 | }
2811 | },
2812 | "touch": {
2813 | "version": "0.0.3",
2814 | "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz",
2815 | "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=",
2816 | "dev": true,
2817 | "requires": {
2818 | "nopt": "1.0.10"
2819 | }
2820 | },
2821 | "type-detect": {
2822 | "version": "0.1.1",
2823 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
2824 | "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=",
2825 | "dev": true
2826 | },
2827 | "unc-path-regex": {
2828 | "version": "0.1.2",
2829 | "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
2830 | "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
2831 | "dev": true
2832 | },
2833 | "union-value": {
2834 | "version": "1.0.0",
2835 | "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
2836 | "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
2837 | "dev": true,
2838 | "requires": {
2839 | "arr-union": "3.1.0",
2840 | "get-value": "2.0.6",
2841 | "is-extendable": "0.1.1",
2842 | "set-value": "0.4.3"
2843 | },
2844 | "dependencies": {
2845 | "extend-shallow": {
2846 | "version": "2.0.1",
2847 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
2848 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
2849 | "dev": true,
2850 | "requires": {
2851 | "is-extendable": "0.1.1"
2852 | }
2853 | },
2854 | "set-value": {
2855 | "version": "0.4.3",
2856 | "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
2857 | "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
2858 | "dev": true,
2859 | "requires": {
2860 | "extend-shallow": "2.0.1",
2861 | "is-extendable": "0.1.1",
2862 | "is-plain-object": "2.0.4",
2863 | "to-object-path": "0.3.0"
2864 | }
2865 | }
2866 | }
2867 | },
2868 | "unique-stream": {
2869 | "version": "1.0.0",
2870 | "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz",
2871 | "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=",
2872 | "dev": true
2873 | },
2874 | "unset-value": {
2875 | "version": "1.0.0",
2876 | "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
2877 | "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
2878 | "dev": true,
2879 | "requires": {
2880 | "has-value": "0.3.1",
2881 | "isobject": "3.0.1"
2882 | },
2883 | "dependencies": {
2884 | "has-value": {
2885 | "version": "0.3.1",
2886 | "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
2887 | "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
2888 | "dev": true,
2889 | "requires": {
2890 | "get-value": "2.0.6",
2891 | "has-values": "0.1.4",
2892 | "isobject": "2.1.0"
2893 | },
2894 | "dependencies": {
2895 | "isobject": {
2896 | "version": "2.1.0",
2897 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
2898 | "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
2899 | "dev": true,
2900 | "requires": {
2901 | "isarray": "1.0.0"
2902 | }
2903 | }
2904 | }
2905 | },
2906 | "has-values": {
2907 | "version": "0.1.4",
2908 | "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
2909 | "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
2910 | "dev": true
2911 | },
2912 | "isarray": {
2913 | "version": "1.0.0",
2914 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
2915 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
2916 | "dev": true
2917 | }
2918 | }
2919 | },
2920 | "urix": {
2921 | "version": "0.1.0",
2922 | "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
2923 | "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
2924 | "dev": true
2925 | },
2926 | "use": {
2927 | "version": "3.1.0",
2928 | "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz",
2929 | "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==",
2930 | "dev": true,
2931 | "requires": {
2932 | "kind-of": "6.0.2"
2933 | }
2934 | },
2935 | "user-home": {
2936 | "version": "1.1.1",
2937 | "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz",
2938 | "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=",
2939 | "dev": true
2940 | },
2941 | "util-deprecate": {
2942 | "version": "1.0.2",
2943 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
2944 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
2945 | "dev": true
2946 | },
2947 | "v8flags": {
2948 | "version": "2.1.1",
2949 | "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz",
2950 | "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=",
2951 | "dev": true,
2952 | "requires": {
2953 | "user-home": "1.1.1"
2954 | }
2955 | },
2956 | "vinyl": {
2957 | "version": "0.5.3",
2958 | "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz",
2959 | "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=",
2960 | "dev": true,
2961 | "requires": {
2962 | "clone": "1.0.4",
2963 | "clone-stats": "0.0.1",
2964 | "replace-ext": "0.0.1"
2965 | }
2966 | },
2967 | "vinyl-fs": {
2968 | "version": "0.3.14",
2969 | "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz",
2970 | "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=",
2971 | "dev": true,
2972 | "requires": {
2973 | "defaults": "1.0.3",
2974 | "glob-stream": "3.1.18",
2975 | "glob-watcher": "0.0.6",
2976 | "graceful-fs": "3.0.11",
2977 | "mkdirp": "0.5.1",
2978 | "strip-bom": "1.0.0",
2979 | "through2": "0.6.5",
2980 | "vinyl": "0.4.6"
2981 | },
2982 | "dependencies": {
2983 | "clone": {
2984 | "version": "0.2.0",
2985 | "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz",
2986 | "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=",
2987 | "dev": true
2988 | },
2989 | "readable-stream": {
2990 | "version": "1.0.34",
2991 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
2992 | "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
2993 | "dev": true,
2994 | "requires": {
2995 | "core-util-is": "1.0.2",
2996 | "inherits": "2.0.3",
2997 | "isarray": "0.0.1",
2998 | "string_decoder": "0.10.31"
2999 | }
3000 | },
3001 | "through2": {
3002 | "version": "0.6.5",
3003 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
3004 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
3005 | "dev": true,
3006 | "requires": {
3007 | "readable-stream": "1.0.34",
3008 | "xtend": "4.0.1"
3009 | }
3010 | },
3011 | "vinyl": {
3012 | "version": "0.4.6",
3013 | "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz",
3014 | "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=",
3015 | "dev": true,
3016 | "requires": {
3017 | "clone": "0.2.0",
3018 | "clone-stats": "0.0.1"
3019 | }
3020 | }
3021 | }
3022 | },
3023 | "which": {
3024 | "version": "1.3.0",
3025 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
3026 | "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
3027 | "dev": true,
3028 | "requires": {
3029 | "isexe": "2.0.0"
3030 | }
3031 | },
3032 | "wrappy": {
3033 | "version": "1.0.2",
3034 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
3035 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
3036 | },
3037 | "xmldom": {
3038 | "version": "0.1.27",
3039 | "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
3040 | "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
3041 | },
3042 | "xpath": {
3043 | "version": "0.0.27",
3044 | "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz",
3045 | "integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ=="
3046 | },
3047 | "xtend": {
3048 | "version": "4.0.1",
3049 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
3050 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
3051 | "dev": true
3052 | }
3053 | }
3054 | }
3055 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xmlpoke",
3 | "version": "0.1.16",
4 | "description": "Module for modifying XML files.",
5 | "homepage": "https://github.com/mikeobrien/node-xmlpoke",
6 | "main": "src/xmlpoke.js",
7 | "bugs": {
8 | "url": "https://github.com/mikeobrien/node-xmlpoke/issues"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/mikeobrien/node-xmlpoke.git"
13 | },
14 | "keywords": [
15 | "xmlpoke",
16 | "xml"
17 | ],
18 | "scripts": {
19 | "test": "gulp"
20 | },
21 | "author": "Mike O'Brien",
22 | "license": "MIT",
23 | "readmeFilename": "README.md",
24 | "files": [
25 | "src/*.js",
26 | "README.md",
27 | "LICENSE"
28 | ],
29 | "devDependencies": {
30 | "cases": "^0.1.1",
31 | "chai": "^1.10.0",
32 | "gulp": "~3.8.10",
33 | "gulp-filter": "~1.0.2",
34 | "gulp-jshint": "~1.9.0",
35 | "gulp-mocha": "~1.1.1",
36 | "temp": "^0.8.1",
37 | "touch": "0.0.3"
38 | },
39 | "dependencies": {
40 | "glob": "^7.1.2",
41 | "lodash": "^4.17.5",
42 | "xmldom": "^0.1.27",
43 | "xpath": "~0.0.27"
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/args.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var _ = require('lodash');
4 |
5 | module.exports = function (args) {
6 | args = _.toArray(args);
7 | return {
8 | first: function() { return _.first(args); },
9 | last: function() { return _.last(args); },
10 | applyLeading: function(func) {
11 | return args.length < 2 ? func() :
12 | func.apply(null, args.splice(0, args.length - 1));
13 | },
14 | toObject: function() {
15 | if (args.length > 1 && _.isString(args[0])) {
16 | var object = {};
17 | object[args[0]] = args[1];
18 | return object;
19 | }
20 | else if (args.length == 1 && _.isObject(args[0])) return args[0];
21 | return {};
22 | }
23 | };
24 | };
25 |
--------------------------------------------------------------------------------
/src/document.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var fs = require('fs'),
4 | Args = require('./args'),
5 | TRAILING_SPACES_REGEX = /\s*$/,
6 | xmldom = require('xmldom'),
7 | xmlParser = new xmldom.DOMParser(),
8 | xmlSerializer = new xmldom.XMLSerializer(),
9 | xpath = require('xpath'),
10 | xml = require('./xml'),
11 | _ = require('lodash');
12 |
13 | function throwNoMatchingNodesError(path) {
14 | var warning = "No matching nodes for xpath '" + path + "'.";
15 | console.log(warning);
16 | throw new Error(warning);
17 | }
18 |
19 | function setNodeValues(namespaces, nodes, value) {
20 |
21 | if (!nodes || nodes.length == 0) return;
22 |
23 | if (_.isString(value)|| _.isBoolean(value) || _.isNumber(value) ||
24 | xml.isXmlString(value) || xml.isCDataValue(value) || _.isFunction(value))
25 | nodes.forEach(function(node) { xml.setNodeValue(node, value); });
26 | else {
27 | var set = _.partial(setNodeValues, namespaces);
28 | _.forOwn(value, function(value, name) {
29 | if (_.startsWith(name, '@'))
30 | set(xml.getAttributesNamed(namespaces, nodes, name.slice(1)), value);
31 | else set(xml.getChildElementsNamed(namespaces, nodes, name), value);
32 | });
33 | }
34 | }
35 |
36 | function createNodes(query, path, errorOnNoMatches) {
37 | var child = xml.parseXPath(path);
38 | var parents = query.getNodes(child.path);
39 | if (parents.length == 0) {
40 | if (errorOnNoMatches) throwNoMatchingNodesError(child.path);
41 | return [];
42 | }
43 | var add = _.partial(xml.addNode, query.namespaces);
44 | return parents.map(function(parent) {
45 | var node = add(parent, child.name, child.attribute);
46 | if (child.keys.length > 0) child.keys.forEach(function(key) {
47 | add(node, key.name, key.attribute, key.value);
48 | });
49 | return node;
50 | });
51 | }
52 |
53 | function buildQuery(document, namespaces) {
54 | var select = namespaces ? xpath.useNamespaces(namespaces) : xpath.select;
55 | return {
56 | namespaces: namespaces,
57 | getNodes: function(path) {
58 | return select(path, document);
59 | }
60 | };
61 | }
62 |
63 | function queryNodes(query, path, errorOnNoMatches, addIfMissing, alwaysAdd) {
64 |
65 | if (alwaysAdd) return createNodes(query, path, errorOnNoMatches);
66 |
67 | var nodes = query.getNodes(path);
68 |
69 | if (nodes.length > 0) return nodes;
70 | else if (addIfMissing) return createNodes(query, path, errorOnNoMatches);
71 | else if (errorOnNoMatches) throwNoMatchingNodesError(path);
72 |
73 | return nodes;
74 | }
75 |
76 | function ensurePath(query, path) {
77 |
78 | var pathParts = path.split('/');
79 | var currentPath = '';
80 | var exists = true;
81 |
82 | pathParts.forEach(function(pathPart) {
83 | currentPath += (currentPath ? '/' : '') + pathPart;
84 | if (!exists || !(exists = (query.getNodes(currentPath).length > 0)))
85 | createNodes(query, currentPath);
86 | });
87 | }
88 |
89 | function clearNodes(query) {
90 | query.forEach(function(x) { xml.clearChildNodes(x); });
91 | }
92 |
93 | function removeNodes(query) {
94 | query.forEach(function(x) { xml.removeNode(x); });
95 | }
96 |
97 | function openXmlFile(path, encoding) {
98 | encoding = encoding || 'utf8';
99 | var document = loadXml(fs.readFileSync(path, encoding));
100 | document.save = function() {
101 | fs.writeFileSync(path, document.toString(), encoding);
102 | };
103 | return document;
104 | }
105 |
106 | function loadXml(source) {
107 | var document = xmlParser.parseFromString(source);
108 | var trailingSpaces = TRAILING_SPACES_REGEX.exec(source)[0];
109 | var basePath, namespaces, errorOnNoMatches;
110 |
111 | var query = function(path, errorOnNoMatches, addIfMissing, alwaysAdd) {
112 | return queryNodes(
113 | buildQuery(document, namespaces),
114 | xml.joinXPath(basePath, path),
115 | errorOnNoMatches, addIfMissing, alwaysAdd);
116 | };
117 |
118 | var setValues = function(values, namespaces, errorOnNoMatches, addIfMissing, alwaysAdd) {
119 | _.forOwn(values, function(value, path) {
120 | setNodeValues(namespaces, query(path,
121 | errorOnNoMatches, addIfMissing, alwaysAdd), value);
122 | });
123 | };
124 |
125 | var dsl = {
126 |
127 | withBasePath: function(path) {
128 | basePath = path;
129 | return dsl;
130 | },
131 |
132 | addNamespace: function(prefix, uri) {
133 | namespaces = namespaces || {};
134 | namespaces[prefix] = uri;
135 | return dsl;
136 | },
137 |
138 | errorOnNoMatches: function() {
139 | errorOnNoMatches = true;
140 | return dsl;
141 | },
142 |
143 | clear: function(path) {
144 | clearNodes(query(path, errorOnNoMatches));
145 | return dsl;
146 | },
147 |
148 | remove: function(path) {
149 | removeNodes(query(path));
150 | return dsl;
151 | },
152 |
153 | set: function() {
154 | setValues(Args(arguments).toObject(), namespaces, errorOnNoMatches, false, false);
155 | return dsl;
156 | },
157 |
158 | ensure: function(path) {
159 | ensurePath(buildQuery(document, namespaces), basePath ? xml.joinXPath(basePath, path) : path);
160 | return dsl;
161 | },
162 |
163 | add: function() {
164 | setValues(Args(arguments).toObject(), namespaces, errorOnNoMatches, true, true);
165 | return dsl;
166 | },
167 |
168 | setOrAdd: function() {
169 | setValues(Args(arguments).toObject(), namespaces, errorOnNoMatches, true, false);
170 | return dsl;
171 | },
172 |
173 | XmlString: function(value) {
174 | return new xml.XmlString(value);
175 | },
176 |
177 | CDataValue: function(value) {
178 | return new xml.CDataValue(value);
179 | },
180 |
181 | toString: function() {
182 | var s = xmlSerializer.serializeToString(document);
183 | return s.replace(TRAILING_SPACES_REGEX, trailingSpaces);
184 | }
185 | };
186 | return dsl;
187 | }
188 |
189 | module.exports = {
190 | open: openXmlFile,
191 | load: loadXml,
192 | XmlString: xml.XmlString,
193 | CDataValue: xml.CDataValue
194 | };
195 |
--------------------------------------------------------------------------------
/src/paths.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var glob = require('glob'),
4 | _ = require('lodash');
5 |
6 | function expand() {
7 |
8 | var paths = _.chain(arguments).toArray().flatten().value();
9 | var getPath = _.chain(paths).last().isFunction().value() ?
10 | paths.pop() : function(x) { return x.path; };
11 |
12 | if (!_.some(paths)) throw Error('No paths specified!');
13 |
14 | return _.chain(paths)
15 | .map(function(x) {
16 | var string = _.isString(x);
17 | return {
18 | id: string ? 0 : _.uniqueId(),
19 | paths: glob.sync(string ? x : getPath(x), { nodir: true }),
20 | context: string ? {} : x };
21 | })
22 | .map(function(x) {
23 | return x.paths.map(function(path) {
24 | return { id: x.id, path: path, context: x.context }; });
25 | })
26 | .flatten()
27 | .uniqBy(function(x) { return x.id + ':' + x.path; })
28 | .value();
29 | }
30 |
31 | module.exports = {
32 | expand: expand
33 | };
--------------------------------------------------------------------------------
/src/xml.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var _ = require('lodash'),
4 | xmldom = require('xmldom'),
5 | xmlParser = new xmldom.DOMParser();
6 |
7 | var ELEMENT_NODE = 1;
8 | var ATTRIBUTE_NODE = 2;
9 |
10 | function XmlString(xml) {
11 | this.source = xml;
12 | }
13 |
14 | function isXmlString(object) {
15 | return object instanceof XmlString;
16 | }
17 |
18 | function CDataValue(value) {
19 | this.value = value;
20 | }
21 |
22 | function isCDataValue(object) {
23 | return object instanceof CDataValue;
24 | }
25 |
26 | function parsePredicates(path) {
27 | var regex = /((\[|and)\s*([^'=]*)\s*=\s*'([^']*)')/g;
28 | var predicates = [], predicate;
29 | while ((predicate = regex.exec(path))) {
30 | predicates.push({
31 | name: _.trimStart(_.trim(predicate[3]), '@'),
32 | value: predicate[4],
33 | attribute: _.startsWith(_.trim(predicate[3]), '@')
34 | });
35 | }
36 | return predicates;
37 | }
38 |
39 | function parseXPath(path) {
40 | var segments = path.match(/(.*)\/([^\[]*)(.*)/);
41 | if (!segments) return null;
42 | var node = {
43 | path: _.trim(segments[1]),
44 | name: _.trimStart(_.trim(segments[2]), '@'),
45 | attribute: _.startsWith(_.trim(segments[2]), '@'),
46 | keys: parsePredicates(segments[3])
47 | };
48 | return node;
49 | }
50 |
51 | function joinXPath(path1, path2) {
52 | return path1 ? _.trimEnd(path1, '/') + '/' + _.trimStart(path2, '/') : path2;
53 | }
54 |
55 | function parseQualifiedName(name) {
56 | var nameParts = name.split(':');
57 | return {
58 | prefix: nameParts.length > 1 ? _.first(nameParts) : null,
59 | name: _.last(nameParts)
60 | };
61 | }
62 |
63 | function mapNamespaces(name, parent, pathNamespaces) {
64 | name = parseQualifiedName(name);
65 | var namespace = pathNamespaces && name.prefix ? pathNamespaces[name.prefix] : null;
66 | var prefix = namespace ? parent.lookupPrefix(namespace) : null;
67 | return {
68 | namespace: namespace ? namespace : null,
69 | name: (prefix ? prefix + ':' : '') + name.name
70 | };
71 | }
72 |
73 | function removeNode(node) {
74 | node.parentNode.removeChild(node);
75 | }
76 |
77 | function clearChildNodes(node) {
78 | while (node.firstChild) {
79 | node.removeChild(node.firstChild);
80 | }
81 | }
82 |
83 | function setNodeValue(node, value) {
84 | if (_.isFunction(value)) value = value(node, getNodeValue(node));
85 | if (node.nodeType == ATTRIBUTE_NODE) {
86 | node.value = node.nodeValue = String(value);
87 | }
88 | else if (isCDataValue(value)) {
89 | clearChildNodes(node);
90 | node.appendChild(node.ownerDocument
91 | .createCDATASection(value.value));
92 | }
93 | else if (isXmlString(value)) {
94 | clearChildNodes(node);
95 | node.appendChild(xmlParser.parseFromString(value.source));
96 | }
97 | else {
98 | node.textContent = String(value);
99 | }
100 | }
101 |
102 | function getNodeValue(node) {
103 | return node.nodeType == ATTRIBUTE_NODE ?
104 | node.value : node.textContent;
105 | }
106 |
107 | function addNode(namespaces, parent, name, isAttribute, value) {
108 | name = mapNamespaces(name, parent, namespaces);
109 | var node;
110 | if (isAttribute) {
111 | node = parent.ownerDocument.createAttributeNS(name.namespace, name.name);
112 | parent.setAttributeNode(node);
113 | }
114 | else {
115 | node = parent.ownerDocument.createElementNS(name.namespace, name.name);
116 | parent.appendChild(node);
117 | }
118 | if (value) setNodeValue(node, value);
119 | return node;
120 | }
121 |
122 | function getAttributesNamed(namespaces, nodes, name) {
123 | return _.map(nodes, function(x) {
124 | return x.getAttributeNode(name) ||
125 | addNode(namespaces, x, name, true);
126 | });
127 | }
128 |
129 | function getChildElementsNamed(namespaces, nodes, name) {
130 | return _.chain(nodes)
131 | .map(function(x) {
132 | var results =
133 | _.chain(x.childNodes)
134 | .toArray()
135 | .filter({
136 | nodeName: name,
137 | nodeType: ELEMENT_NODE,
138 | }).value();
139 | return results.length > 0 ? results :
140 | addNode(namespaces, x, name);
141 | })
142 | .flatten()
143 | .value();
144 | }
145 |
146 | module.exports = {
147 | XmlString: XmlString,
148 | isXmlString: isXmlString,
149 | CDataValue: CDataValue,
150 | isCDataValue: isCDataValue,
151 | parseXPath: parseXPath,
152 | joinXPath: joinXPath,
153 | removeNode: removeNode,
154 | clearChildNodes: clearChildNodes,
155 | setNodeValue: setNodeValue,
156 | getNodeValue: getNodeValue,
157 | mapNamespaces: mapNamespaces,
158 | addNode: addNode,
159 | getAttributesNamed: getAttributesNamed,
160 | getChildElementsNamed: getChildElementsNamed
161 | };
162 |
--------------------------------------------------------------------------------
/src/xmlpoke.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var paths = require('./paths'),
4 | Args = require('./args'),
5 | Document = require('./document'),
6 | _ = require('lodash');
7 |
8 | module.exports = function() {
9 | var args = Args(arguments);
10 | var modify = args.last();
11 |
12 | if (_.startsWith(_.trim(args.first()), '<'))
13 | {
14 | var document = Document.load(args.first());
15 | modify(document, {});
16 | return document.toString();
17 | }
18 | else
19 | {
20 | var files = args.applyLeading(paths.expand);
21 |
22 | files.forEach(function(file) {
23 | var document = Document.open(file.path);
24 | modify(document, file.context);
25 | document.save();
26 | });
27 | }
28 | };
29 |
30 | module.exports.XmlString = Document.XmlString;
31 | module.exports.CDataValue = Document.CDataValue;
--------------------------------------------------------------------------------
/test/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../.jshintrc",
3 | "expr": true,
4 | "mocha": true
5 | }
6 |
--------------------------------------------------------------------------------
/test/args.spec.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var expect = require('chai').expect,
4 | cases = require('cases'),
5 | Args = require('../src/args');
6 |
7 | function args() { return arguments; }
8 |
9 | describe('args', function() {
10 |
11 | describe('last', function() {
12 |
13 | it('should return last arg', cases([
14 | [ args(), undefined ],
15 | [ args('a'), 'a' ],
16 | [ args('a', 'b'), 'b' ]
17 | ], function (args, expected) {
18 | expect(Args(args).last()).to.equal(expected);
19 | }));
20 |
21 | });
22 |
23 | describe('leading', function() {
24 |
25 | it('should apply leading args', cases([
26 | [ args(), [ undefined, undefined ] ],
27 | [ args('a'), [ undefined, undefined ] ],
28 | [ args('a', 'b'), ['a', undefined] ],
29 | [ args('a', 'b', 'c'), ['a', 'b'] ]
30 | ], function (args, expected) {
31 | expect(Args(args).applyLeading(
32 | function (a, b) { return [a, b]; }))
33 | .to.deep.equal(expected);
34 | }));
35 |
36 | });
37 |
38 | describe('toObject', function() {
39 |
40 | it('should convert to object', cases([
41 | [ args('key', 'value'), { key: 'value' } ],
42 | [ args('key', 'value1', 'value2'), { key: 'value1' } ],
43 | [ args({ key: 'value' }), { key: 'value' } ],
44 | [ args(1), {} ]
45 | ], function (args, expected) {
46 | expect(Args(args).toObject()).to.deep.equal(expected);
47 | }));
48 |
49 | });
50 |
51 | });
52 |
--------------------------------------------------------------------------------
/test/document.spec.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var expect = require('chai').expect,
4 | cases = require('cases'),
5 | temp = require('temp').track(),
6 | fs = require('fs'),
7 | Document = require('../src/document');
8 |
9 | describe('document', function() {
10 |
11 | var xmlfile;
12 |
13 | beforeEach(function() {
14 | xmlfile = temp.openSync().path;
15 | });
16 |
17 | afterEach(function() {
18 | temp.cleanupSync();
19 | });
20 |
21 | it('should open an xml file', function() {
22 | fs.writeFileSync(xmlfile, '');
23 | expect(Document.open(xmlfile).toString())
24 | .to.equal('');
25 | });
26 |
27 | it('should save an xml file', function() {
28 | fs.writeFileSync(xmlfile, '');
29 | var doc = Document.open(xmlfile);
30 | doc.set('a/b', 'c');
31 | doc.save();
32 | expect(fs.readFileSync(xmlfile).toString())
33 | .to.equal('c');
34 | });
35 |
36 | describe('clear', function() {
37 |
38 | it('should clear child nodes', function() {
39 | expect(Document.load('')
40 | .clear('a').toString())
41 | .to.equal('');
42 | });
43 |
44 | it('should not fail if no matches by default', function() {
45 | expect(Document.load('')
46 | .clear('a/b').toString())
47 | .to.equal('');
48 | });
49 |
50 | it('should fail if no matches when configured', function() {
51 | expect(function() {
52 | Document.load('')
53 | .errorOnNoMatches()
54 | .clear('a/b'); })
55 | .to.throw("No matching nodes for xpath 'a/b'.");
56 | });
57 |
58 | });
59 |
60 | describe('remove', function() {
61 |
62 | it('should remove nodes', function() {
63 | expect(Document.load('')
64 | .remove('a/b').toString())
65 | .to.equal('');
66 | });
67 |
68 | });
69 |
70 | describe('ensure', function() {
71 |
72 | it('should create missing nodes', cases([
73 | [ "a/b/c", '' ],
74 | [ "a/b[c='1']/d[@e='2']", '1' ],
75 | [ "a/b[@c='1']/d[e='2']", '2' ],
76 | [ "a/b[@c='1' and @d='2']/e[f='3']", '3' ],
77 | ], function (xpath, result) {
78 | expect(Document.load('')
79 | .ensure(xpath).toString())
80 | .to.equal(result);
81 | }));
82 |
83 | it('should create missing nodes with base path', function () {
84 | expect(Document.load('')
85 | .withBasePath('a')
86 | .ensure('b/c').toString())
87 | .to.equal('');
88 | });
89 |
90 | it('should ignore existing elements', function() {
91 | expect(Document.load('3')
92 | .ensure("a/b[@c='1' and @d='2']/e[f='3']").toString())
93 | .to.equal('3');
94 | });
95 |
96 | });
97 |
98 | describe('set', function() {
99 |
100 | describe('base path', function() {
101 |
102 | it('should add base path when configured', function() {
103 | expect(Document.load('')
104 | .withBasePath('a')
105 | .set('b', 'c').toString())
106 | .to.equal('c');
107 | });
108 |
109 | });
110 |
111 | describe('object values', function() {
112 |
113 | it('should add multiple', function() {
114 | expect(Document.load('')
115 | .set({ 'a/b': 'd', 'a/c': 'e' }).toString())
116 | .to.equal('de');
117 | });
118 |
119 | });
120 |
121 | describe('missing elements', function() {
122 |
123 | it('should not fail to set missing value by default', function() {
124 | expect(function() { Document.load('').set('a/b/c', 'c'); })
125 | .not.to.throw();
126 | });
127 |
128 | it('should fail to set missing value when configured', function() {
129 | expect(function() {
130 | Document.load('')
131 | .errorOnNoMatches()
132 | .set('a/b/c', 'c'); })
133 | .to.throw("No matching nodes for xpath 'a/b/c'.");
134 | });
135 |
136 | });
137 |
138 | describe('namespaces', function() {
139 |
140 | it('should set node value with default namespace when configured', function() {
141 | expect(Document.load('')
142 | .addNamespace('z', 'uri:yada')
143 | .set('/z:a/z:b', 'c').toString())
144 | .to.equal('c');
145 | });
146 |
147 | it('should set attribute value with default namespace when configured', function() {
148 | expect(Document.load('')
149 | .addNamespace('z', 'uri:yada')
150 | .set('/z:a/@b', 'c').toString())
151 | .to.equal('');
152 | });
153 |
154 | it('should set node value with namespace when configured', function() {
155 | expect(Document.load('')
156 | .addNamespace('z', 'uri:yada')
157 | .set('a/z:b', 'c').toString())
158 | .to.equal('c');
159 | });
160 |
161 | it('should set attribute value with namespace when configured', function() {
162 | expect(Document.load('')
163 | .addNamespace('z', 'uri:yada')
164 | .set('a/@z:b', 'c').toString())
165 | .to.equal('');
166 | });
167 |
168 | });
169 |
170 | describe('string', function() {
171 |
172 | it('should set attribute value', function() {
173 | expect(Document.load('')
174 | .set('a/@b', 'c').toString())
175 | .to.equal('');
176 | });
177 |
178 | it('should set node value', function() {
179 | expect(Document.load('')
180 | .set('a', 'b').toString())
181 | .to.equal('b');
182 | });
183 |
184 | it('should set node cdata value', function() {
185 | expect(Document.load('')
186 | .set('a', new Document.CDataValue('b')).toString())
187 | .to.equal('');
188 | });
189 |
190 | it('should set node xml value', function() {
191 | expect(Document.load('')
192 | .set('a', new Document.XmlString('')).toString())
193 | .to.equal('');
194 | });
195 |
196 | });
197 |
198 | describe('function', function() {
199 |
200 | it('should set attribute value', function() {
201 | expect(Document.load('')
202 | .set('a/@b', function(node, value) {
203 | return [ node.nodeName, value, 'd' ].join('-'); }).toString())
204 | .to.equal('');
205 | });
206 |
207 | it('should set node value', function() {
208 | expect(Document.load('b')
209 | .set('a', function(node, value) {
210 | return [ node.nodeName, value, 'c' ].join('-'); }).toString())
211 | .to.equal('a-b-c');
212 | });
213 |
214 | it('should set node cdata value', function() {
215 | expect(Document.load('b')
216 | .set('a', function(node, value) {
217 | return new Document.CDataValue([ node.nodeName, value, 'c' ].join('-')); }).toString())
218 | .to.equal('');
219 | });
220 |
221 | it('should set node xml value', function() {
222 | expect(Document.load('b')
223 | .set('a', function(node, value) {
224 | return new Document.XmlString('<' + value + '>' + node.nodeName + '' + value + '>'); }).toString())
225 | .to.equal('a');
226 | });
227 |
228 | });
229 |
230 | describe('object string', function() {
231 |
232 | it('should set attribute value', function() {
233 | expect(Document.load('')
234 | .set('a', { '@b': 'c' }).toString())
235 | .to.equal('');
236 | });
237 |
238 | it('should set node value', function() {
239 | expect(Document.load('')
240 | .set('a', { b: 'c' }).toString())
241 | .to.equal('c');
242 | });
243 |
244 | it('should set node cdata value', function() {
245 | expect(Document.load('')
246 | .set('a', { b: new Document.CDataValue('c') }).toString())
247 | .to.equal('');
248 | });
249 |
250 | it('should set node sql value', function() {
251 | expect(Document.load('')
252 | .set('a', { b: new Document.XmlString('') }).toString())
253 | .to.equal('');
254 | });
255 |
256 | });
257 |
258 | describe('object function', function() {
259 |
260 | it('should set attribute value', function() {
261 | expect(Document.load('')
262 | .set('a', { '@b': function(node, value) {
263 | return [ node.nodeName, value, 'd' ].join('-'); } }).toString())
264 | .to.equal('');
265 | });
266 |
267 | it('should set node value', function() {
268 | expect(Document.load('c')
269 | .set('a', { b: function(node, value) {
270 | return [ node.nodeName, value, 'd' ].join('-'); } }).toString())
271 | .to.equal('b-c-d');
272 | });
273 |
274 | it('should set node cdata value', function() {
275 | expect(Document.load('c')
276 | .set('a', { b: function(node, value) {
277 | return new Document.CDataValue([ node.nodeName, value ].join('-')); } }).toString())
278 | .to.equal('');
279 | });
280 |
281 | it('should set node xml value', function() {
282 | expect(Document.load('c')
283 | .set('a', { b: function(node, value) {
284 | return new Document.XmlString('<' + value + '>' + node.nodeName + '' + value + '>'); } }).toString())
285 | .to.equal('b');
286 | });
287 |
288 | });
289 |
290 | });
291 |
292 | describe('add', function() {
293 |
294 | describe('base path', function() {
295 |
296 | it('should add base path when configured', function() {
297 | expect(Document.load('')
298 | .withBasePath('a')
299 | .add('b', 'c').toString())
300 | .to.equal('c');
301 | });
302 |
303 | });
304 |
305 | describe('object values', function() {
306 |
307 | it('should add multiple', function() {
308 | expect(Document.load('')
309 | .add({ 'a/b': 'd', 'a/c': 'e' }).toString())
310 | .to.equal('de');
311 | });
312 |
313 | });
314 |
315 | describe('missing elements', function() {
316 |
317 | it('should not fail to set missing value by default', function() {
318 | expect(function() { Document.load('').add('a/b/c', 'c'); })
319 | .not.to.throw();
320 | });
321 |
322 | it('should fail to set missing value when configured', function() {
323 | expect(function() {
324 | Document.load('')
325 | .errorOnNoMatches()
326 | .add('a/b/c', 'c'); })
327 | .to.throw('No matching nodes for xpath \'a/b\'.');
328 | });
329 |
330 | });
331 |
332 | describe('namespaces', function() {
333 |
334 | it('should set node value with default namespace when configured', function() {
335 | expect(Document.load('')
336 | .addNamespace('z', 'uri:yada')
337 | .add('/z:a/z:b', 'c').toString())
338 | .to.equal('c');
339 | });
340 |
341 | it('should set attribute value with default namespace when configured', function() {
342 | expect(Document.load('')
343 | .addNamespace('z', 'uri:yada')
344 | .add('/z:a/@b', 'c').toString())
345 | .to.equal('');
346 | });
347 |
348 | it('should set node value with namespace when configured', function() {
349 | expect(Document.load('')
350 | .addNamespace('z', 'uri:yada')
351 | .add('a/z:b', 'c').toString())
352 | .to.equal('c');
353 | });
354 |
355 | it('should set attribute value with namespace when configured', function() {
356 | expect(Document.load('')
357 | .addNamespace('z', 'uri:yada')
358 | .add('a/@z:b', 'c').toString())
359 | .to.equal('');
360 | });
361 |
362 | });
363 |
364 | describe('string', function() {
365 |
366 | it('should set attribute value', function() {
367 | expect(Document.load('')
368 | .add('a/@b', 'c').toString())
369 | .to.equal('');
370 | });
371 |
372 | it('should set node value', function() {
373 | expect(Document.load('')
374 | .add('a/b', 'c').toString())
375 | .to.equal('c');
376 | });
377 |
378 | it('should set node cdata value', function() {
379 | expect(Document.load('')
380 | .add('a/b', new Document.CDataValue('c')).toString())
381 | .to.equal('');
382 | });
383 |
384 | it('should set node xml value', function() {
385 | expect(Document.load('')
386 | .add('a/b', new Document.XmlString('')).toString())
387 | .to.equal('');
388 | });
389 |
390 | });
391 |
392 | describe('function', function() {
393 |
394 | it('should set attribute value', function() {
395 | expect(Document.load('')
396 | .add('a/@b', function(node, value) {
397 | return [ node.nodeName, value, 'c' ].join('-'); }).toString())
398 | .to.equal('');
399 | });
400 |
401 | it('should set node value', function() {
402 | expect(Document.load('')
403 | .add('a/b', function(node, value) {
404 | return [ node.nodeName, value, 'c' ].join('-'); }).toString())
405 | .to.equal('b--c');
406 | });
407 |
408 | it('should set node cdata value', function() {
409 | expect(Document.load('')
410 | .add('a/b', function(node, value) {
411 | return new Document.CDataValue([ node.nodeName, value, 'c' ].join('-')); }).toString())
412 | .to.equal('');
413 | });
414 |
415 | it('should set node xml value', function() {
416 | expect(Document.load('')
417 | .add('a/b', function(node, value) {
418 | return new Document.XmlString('<' + node.nodeName + '>' + value + '' + node.nodeName + '>'); }).toString())
419 | .to.equal('');
420 | });
421 |
422 | });
423 |
424 | describe('object string', function() {
425 |
426 | it('should set attribute value', function() {
427 | expect(Document.load('')
428 | .add('a/b', { '@c': 'd' }).toString())
429 | .to.equal('');
430 | });
431 |
432 | it('should set node value', function() {
433 | expect(Document.load('')
434 | .add('a/b', { c: 'd' }).toString())
435 | .to.equal('d');
436 | });
437 |
438 | it('should set node cdata value', function() {
439 | expect(Document.load('')
440 | .add('a/b', { c: new Document.CDataValue('d') }).toString())
441 | .to.equal('');
442 | });
443 |
444 | it('should set node sql value', function() {
445 | expect(Document.load('')
446 | .add('a/b', { c: new Document.XmlString('') }).toString())
447 | .to.equal('');
448 | });
449 |
450 | });
451 |
452 | describe('object function', function() {
453 |
454 | it('should set attribute value', function() {
455 | expect(Document.load('')
456 | .add('a/b', { '@c': function(node, value) {
457 | return [ node.nodeName, value, 'd' ].join('-'); } }).toString())
458 | .to.equal('');
459 | });
460 |
461 | it('should set node value', function() {
462 | expect(Document.load('')
463 | .add('a/b', { c: function(node, value) {
464 | return [ node.nodeName, value, 'd' ].join('-'); } }).toString())
465 | .to.equal('c--d');
466 | });
467 |
468 | it('should set node cdata value', function() {
469 | expect(Document.load('')
470 | .add('a/b', { c: function(node, value) {
471 | return new Document.CDataValue([ node.nodeName, value ].join('-')); } }).toString())
472 | .to.equal('');
473 | });
474 |
475 | it('should set node xml value', function() {
476 | expect(Document.load('')
477 | .add('a/b', { c: function(node, value) {
478 | return new Document.XmlString('<' + node.nodeName + '>' + value + '' + node.nodeName + '>'); } }).toString())
479 | .to.equal('');
480 | });
481 |
482 | });
483 |
484 | });
485 |
486 | describe('setOrAdd', function() {
487 |
488 | describe('base path', function() {
489 |
490 | it('should add base path when configured', function() {
491 | expect(Document.load('')
492 | .withBasePath('a')
493 | .setOrAdd('b', 'c').toString())
494 | .to.equal('c');
495 | });
496 |
497 | });
498 |
499 | describe('object values', function() {
500 |
501 | it('should add multiple', function() {
502 | expect(Document.load('')
503 | .setOrAdd({ 'a/b': 'd', 'a/c': 'e' }).toString())
504 | .to.equal('de');
505 | });
506 |
507 | });
508 |
509 | describe('missing elements', function() {
510 |
511 | it('should not fail to create missing parent node by default', function() {
512 | expect(function() { Document.load('').setOrAdd('a/b/c', 'd'); })
513 | .not.to.throw();
514 | });
515 |
516 | it('should fail to create missing parent node when configured', function() {
517 | expect(function() {
518 | Document.load('')
519 | .errorOnNoMatches()
520 | .setOrAdd('a/b/c', 'd'); })
521 | .to.throw("No matching nodes for xpath 'a/b'.");
522 | });
523 |
524 | });
525 |
526 | describe('namespaces', function() {
527 |
528 | it('should add node value with default namespace when configured', function() {
529 | expect(Document.load('')
530 | .addNamespace('z', 'uri:yada')
531 | .setOrAdd('/z:a/z:b', 'c').toString())
532 | .to.equal('c');
533 | });
534 |
535 | it('should add attribute value with default namespace when configured', function() {
536 | expect(Document.load('')
537 | .addNamespace('z', 'uri:yada')
538 | .setOrAdd('/z:a/@b', 'c').toString())
539 | .to.equal('');
540 | });
541 |
542 | it('should add non existing node value with namespace when configured', function() {
543 | expect(Document.load('')
544 | .addNamespace('z', 'uri:yada')
545 | .setOrAdd('a/z:b', 'c').toString())
546 | .to.equal('c');
547 | });
548 |
549 | it('should add attribute value with namespace when configured', function() {
550 | expect(Document.load('')
551 | .addNamespace('z', 'uri:yada')
552 | .setOrAdd('a/@z:b', 'c').toString())
553 | .to.equal('');
554 | });
555 |
556 | it('should add node object value with namespace when configured', function() {
557 | expect(Document.load('')
558 | .addNamespace('z', 'uri:yada')
559 | .setOrAdd('a', { 'z:b': 'c' }).toString())
560 | .to.equal('c');
561 | });
562 |
563 | it('should add attribute object value with namespace when configured', function() {
564 | expect(Document.load('')
565 | .addNamespace('z', 'uri:yada')
566 | .setOrAdd('a', { '@z:b': 'c' }).toString())
567 | .to.equal('');
568 | });
569 |
570 | });
571 |
572 | describe('string', function() {
573 |
574 | it('should add attribute value', function() {
575 | expect(Document.load('')
576 | .setOrAdd('a/@b', 'c').toString())
577 | .to.equal('');
578 | });
579 |
580 | it('should add node value', function() {
581 | expect(Document.load('')
582 | .setOrAdd('a/b', 'c').toString())
583 | .to.equal('c');
584 | });
585 |
586 | it('should add node cdata value', function() {
587 | expect(Document.load('')
588 | .setOrAdd('a/b', new Document.CDataValue('c')).toString())
589 | .to.equal('');
590 | });
591 |
592 | it('should add node xml value', function() {
593 | expect(Document.load('')
594 | .setOrAdd('a/b', new Document.XmlString('')).toString())
595 | .to.equal('');
596 | });
597 |
598 | });
599 |
600 | describe('function', function() {
601 |
602 | it('should add attribute value with function', function() {
603 | expect(Document.load('')
604 | .setOrAdd('a/@b', function(node, value) {
605 | return [ node.nodeName, value, 'c' ].join('-'); }).toString())
606 | .to.equal('');
607 | });
608 |
609 | it('should add node value with function', function() {
610 | expect(Document.load('')
611 | .setOrAdd('a/b', function(node, value) {
612 | return [ node.nodeName, value, 'c' ].join('-'); }).toString())
613 | .to.equal('b--c');
614 | });
615 |
616 | it('should add node cdata value', function() {
617 | expect(Document.load('')
618 | .setOrAdd('a/b', function(node, value) {
619 | return new Document.CDataValue([ node.nodeName, value, 'c' ].join('-')); }).toString())
620 | .to.equal('');
621 | });
622 |
623 | it('should add node xml value', function() {
624 | expect(Document.load('')
625 | .setOrAdd('a/b', function(node) {
626 | return new Document.XmlString('' + node.nodeName + ''); }).toString())
627 | .to.equal('b');
628 | });
629 |
630 | });
631 |
632 | describe('object string', function() {
633 |
634 | it('should add attribute value with object string', function() {
635 | expect(Document.load('')
636 | .setOrAdd('a', { '@b': 'c' }).toString())
637 | .to.equal('');
638 | });
639 |
640 | it('should add node value with object string', function() {
641 | expect(Document.load('')
642 | .setOrAdd('a', { b: 'c' }).toString())
643 | .to.equal('c');
644 | });
645 |
646 | it('should add node cdata value', function() {
647 | expect(Document.load('')
648 | .setOrAdd('a', { b: new Document.CDataValue('c') }).toString())
649 | .to.equal('');
650 | });
651 |
652 | it('should add node sql value', function() {
653 | expect(Document.load('')
654 | .setOrAdd('a', { b: new Document.XmlString('') }).toString())
655 | .to.equal('');
656 | });
657 |
658 | });
659 |
660 | describe('object function', function() {
661 |
662 | it('should add attribute value with object function', function() {
663 | expect(Document.load('')
664 | .setOrAdd('a', { '@b': function(node, value) {
665 | return [ node.nodeName, value, 'c' ].join('-'); } }).toString())
666 | .to.equal('');
667 | });
668 |
669 | it('should add node value with object function', function() {
670 | expect(Document.load('')
671 | .setOrAdd('a', { b: function(node, value) {
672 | return [ node.nodeName, value, 'c' ].join('-'); } }).toString())
673 | .to.equal('b--c');
674 | });
675 |
676 | it('should set node cdata value', function() {
677 | expect(Document.load('')
678 | .setOrAdd('a', { b: function(node, value) {
679 | return new Document.CDataValue([ node.nodeName, value, 'c' ].join('-')); } }).toString())
680 | .to.equal('');
681 | });
682 |
683 | it('should set node xml value', function() {
684 | expect(Document.load('')
685 | .setOrAdd('a', { b: function(node) {
686 | return new Document.XmlString('' + node.nodeName + ''); } }).toString())
687 | .to.equal('b');
688 | });
689 |
690 | });
691 |
692 | });
693 |
694 | });
695 |
--------------------------------------------------------------------------------
/test/paths.spec.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var fs = require('fs'),
4 | path = require('path'),
5 | touch = require('touch'),
6 | expect = require('chai').expect,
7 | temp = require('temp').track(),
8 | cases = require('cases'),
9 | paths = require('../src/paths'),
10 | _ = require('lodash');
11 |
12 | describe('paths', function() {
13 |
14 | describe('expand', function() {
15 |
16 | var basePath, relative, absolute;
17 |
18 | before(function() {
19 |
20 | basePath = temp.mkdirSync();
21 |
22 | touch.sync(path.join(basePath, 'a.xml'));
23 | touch.sync(path.join(basePath, 'b.xml'));
24 | fs.mkdirSync(path.join(basePath, 'dir'));
25 | touch.sync(path.join(basePath, 'dir', 'a.xml'));
26 | touch.sync(path.join(basePath, 'dir', 'b.xml'));
27 |
28 | relative = function(file) {
29 | return path.relative(basePath, file.path);
30 | };
31 |
32 | absolute = function() {
33 | return path.join.apply(null, [ basePath ].concat(_.toArray(arguments)));
34 | };
35 | });
36 |
37 | after(function() {
38 | temp.cleanupSync();
39 | });
40 |
41 | it('should resolve files', function() {
42 |
43 | cases([
44 | [[ absolute('a.*'), absolute('dir', 'b.*') ]],
45 | [[ [ absolute('a.*'), absolute('dir', 'b.*') ] ]],
46 | [[ [ absolute('a.*')], [ absolute('dir', 'b.*') ] ]],
47 | [[ { path: absolute('a.*') }, { path: absolute('dir', 'b.*') } ]],
48 | [[ [ { path: absolute('a.*') }, { path: absolute('dir', 'b.*') } ] ]],
49 | [[ [ { path: absolute('a.*') }], [{ path: absolute('dir', 'b.*') } ] ]],
50 | [[ absolute('a.*'), { path: absolute('dir', 'b.*') } ]],
51 | [[ absolute('a.*'), { customPath: absolute('dir', 'b.*') }, function(x) { return x.customPath; } ]]
52 | ], function (params) {
53 |
54 | var files = paths.expand.apply(null, params);
55 |
56 | expect(files).to.have.length(2);
57 |
58 | expect(relative(files[0])).to.equal('a.xml');
59 | expect(files[0].context).to.exist();
60 |
61 | expect(relative(files[1])).to.equal('dir/b.xml');
62 | expect(files[1].context).to.exist();
63 | })();
64 |
65 | });
66 |
67 | it('should not resolve directories', function() {
68 | var files = paths.expand(absolute('**', '*'));
69 |
70 | expect(files).to.have.length(4);
71 |
72 | expect(relative(files[0])).to.equal('a.xml');
73 | expect(relative(files[1])).to.equal('b.xml');
74 | expect(relative(files[2])).to.equal('dir/a.xml');
75 | expect(relative(files[3])).to.equal('dir/b.xml');
76 |
77 | });
78 |
79 | it('should return unique string results', function() {
80 | var files = paths.expand(absolute('**', 'a.*'), absolute('**', 'a.*'));
81 |
82 | expect(files).to.have.length(2);
83 |
84 | expect(relative(files[0])).to.equal('a.xml');
85 | expect(relative(files[1])).to.equal('dir/a.xml');
86 |
87 | });
88 |
89 | it('should not return unique object results', function() {
90 | var files = paths.expand({ path: absolute('**', 'a.*') }, { path: absolute('**', 'a.*') });
91 |
92 | expect(files).to.have.length(4);
93 |
94 | expect(relative(files[0])).to.equal('a.xml');
95 | expect(relative(files[1])).to.equal('dir/a.xml');
96 | expect(relative(files[2])).to.equal('a.xml');
97 | expect(relative(files[3])).to.equal('dir/a.xml');
98 |
99 | });
100 |
101 | it('should pass context with objects', function() {
102 | var context = { path: absolute('a.*') };
103 | var files = paths.expand(context);
104 |
105 | expect(relative(files[0])).to.equal('a.xml');
106 | expect(files[0].context).to.equal(context);
107 |
108 | });
109 |
110 | it('should pass empty context with strings', function() {
111 | var files = paths.expand(absolute('a.*'));
112 |
113 | expect(relative(files[0])).to.equal('a.xml');
114 | expect(files[0].context).to.deep.equal({});
115 |
116 | });
117 |
118 | it('should fail if no files', cases([
119 | [[ ]],
120 | [[ function(x) { return x.customPath; } ]]
121 | ], function (params) {
122 | expect(function() { paths.expand.apply(null, params); }).to.throw(Error);
123 | }));
124 |
125 | });
126 | });
127 |
--------------------------------------------------------------------------------
/test/xml.spec.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var expect = require('chai').expect,
4 | cases = require('cases'),
5 | xmldom = require('xmldom'),
6 | xmlParser = new xmldom.DOMParser(),
7 | xpath = require('xpath'),
8 | xml = require('../src/xml');
9 |
10 | describe('xml', function() {
11 |
12 | describe('parseXPath', function() {
13 |
14 | it('should parse xpath', cases([
15 | [ 'a/b/c', { path: 'a/b', name: 'c', attribute: false, keys: [] } ],
16 | [ 'a/b/@c', { path: 'a/b', name: 'c', attribute: true, keys: [] } ],
17 |
18 | [ "a/b/c[name='value']", { path: 'a/b', name: 'c', attribute: false,
19 | keys: [ { name: 'name', value: 'value', attribute: false } ] } ],
20 | [ "a/b/c[@name='value']", { path: 'a/b', name: 'c', attribute: false,
21 | keys: [ { name: 'name', value: 'value', attribute: true } ] } ],
22 | [ "a/b[@name1='value1']/c[@name2='value2']", { path: "a/b[@name1='value1']", name: 'c', attribute: false,
23 | keys: [ { name: 'name2', value: 'value2', attribute: true } ]} ],
24 | [ "a/b/c[@name1='value1' and @name2='value2']", { path: 'a/b', name: 'c', attribute: false,
25 | keys: [ { name: 'name1', value: 'value1', attribute: true },
26 | { name: 'name2', value: 'value2', attribute: true } ]} ],
27 | [ "a/b/c[@name1='value1' and @name2='value2' and @name3='value3']", { path: 'a/b', name: 'c', attribute: false,
28 | keys: [ { name: 'name1', value: 'value1', attribute: true },
29 | { name: 'name2', value: 'value2', attribute: true },
30 | { name: 'name3', value: 'value3', attribute: true } ]} ],
31 |
32 | [ "a/b/c [ @name = 'value' ]", { path: 'a/b', name: 'c', attribute: false,
33 | keys: [ { name: 'name', value: 'value', attribute: true } ] } ],
34 | [ "a/b/c[0]", { path: 'a/b', name: 'c', attribute: false, keys: [] } ],
35 | [ "a/b/c[last()]", { path: 'a/b', name: 'c', attribute: false, keys: [] } ]
36 | ], function (query, result) {
37 | expect(xml.parseXPath(query)).to.deep.equal(result);
38 | }));
39 |
40 | });
41 |
42 | describe('getNodeValue', function() {
43 |
44 | it('should parse xpath', cases([
45 | [ '', 'a/@b' ],
46 | [ 'c', 'a/b' ],
47 | [ '', 'a/b' ]
48 | ], function (source, path) {
49 | var node = xpath.select(path , xmlParser.parseFromString(source))[0];
50 | expect(xml.getNodeValue(node)).to.deep.equal('c');
51 | }));
52 |
53 | });
54 |
55 | describe('XmlString', function() {
56 |
57 | it('should indicate if object is xml string', cases([
58 | [ {}, false ],
59 | [ new xml.XmlString(''), true ]
60 | ], function (object, isXmlString) {
61 | expect(xml.isXmlString(object)).to.equal(isXmlString);
62 | }));
63 |
64 | it('should return xml string', function () {
65 | var xmlString = new xml.XmlString('');
66 | expect(xmlString.source).to.equal('');
67 | });
68 |
69 | });
70 |
71 | describe('CDataValue', function() {
72 |
73 | it('should indicate if object is cdata value', cases([
74 | [ {}, false ],
75 | [ new xml.CDataValue('value'), true ]
76 | ], function (object, isCDataValue) {
77 | expect(xml.isCDataValue(object)).to.equal(isCDataValue);
78 | }));
79 |
80 | it('should return cdata value', function () {
81 | var cdata = new xml.CDataValue('value');
82 | expect(cdata.value).to.equal('value');
83 | });
84 |
85 | });
86 |
87 | it('should join xpath', cases([
88 | [ '/a/', '/b/', '/a/b/' ],
89 | [ null, '/b/', '/b/' ]
90 | ], function (path1, path2, result) {
91 | expect(xml.joinXPath(path1, path2)).to.equal(result);
92 | }));
93 |
94 | it('should map namespaces', cases([
95 | [ '', 'attr', null, 'attr' ],
96 | [ '', 'x:attr', 'uri:yada', 'attr' ],
97 | [ '', 'x:attr', 'uri:yada', 'z:attr' ]
98 | ], function (source, sourceName, namespace, name) {
99 | var parent = xmlParser.parseFromString(source).firstChild;
100 | var node = xml.mapNamespaces(sourceName, parent, { x: 'uri:yada' });
101 | expect(node.namespace).to.equal(namespace);
102 | expect(node.name).to.equal(name);
103 | }));
104 |
105 | it('should clear children', function () {
106 | var doc = xmlParser.parseFromString('');
107 | xml.clearChildNodes(doc.firstChild);
108 | expect(doc.toString()).to.equal('');
109 | });
110 |
111 | it('should set node value', cases([
112 | [ '', 'c', 'c' ],
113 | [ '', 'c', '' ],
114 |
115 | [ '', function(node, value) { return node.name + value ; }, '' ],
116 | [ 'c', function(node, value) { return node.nodeName + value; }, 'bc' ],
117 |
118 | [ '', new xml.CDataValue('c'), '' ],
119 | [ 'c', function(node, value) { return new xml.CDataValue(node.nodeName + value); },
120 | '' ],
121 |
122 | [ '', new xml.XmlString('d'), 'd' ],
123 | [ 'c', function(node, value) {
124 | return new xml.XmlString('<' + value + '>' + node.nodeName + '' + value + '>'); },
125 | 'b' ]
126 | ], function (source, value, result) {
127 | var doc = xmlParser.parseFromString(source);
128 | xml.setNodeValue(doc.firstChild.firstChild ||
129 | doc.firstChild.attributes[0], value);
130 | expect(doc.toString()).to.equal(result);
131 | }));
132 |
133 | it('should get node value', cases([
134 | [ 'c' ],
135 | [ '' ]
136 | ], function (source) {
137 | var doc = xmlParser.parseFromString(source);
138 | var result = xml.getNodeValue(doc.firstChild.firstChild ||
139 | doc.firstChild.attributes[0]);
140 | expect(result).to.equal('c');
141 | }));
142 |
143 | describe('addNode', function() {
144 |
145 | it('should add attribute with value', function () {
146 | var doc = xmlParser.parseFromString('');
147 | xml.addNode({}, doc.firstChild, 'b', true, 'c');
148 | expect(doc.toString()).to.equal('');
149 | });
150 |
151 | it('should add element without value', function () {
152 | var doc = xmlParser.parseFromString('');
153 | xml.addNode({}, doc.firstChild, 'b', false);
154 | expect(doc.toString()).to.equal('');
155 | });
156 |
157 | it('should add element with string value', function () {
158 | var doc = xmlParser.parseFromString('');
159 | xml.addNode({}, doc.firstChild, 'b', false, 'c');
160 | expect(doc.toString()).to.equal('c');
161 | });
162 |
163 | it('should add attribute with mapped namespace', function () {
164 | var doc = xmlParser.parseFromString('');
165 | xml.addNode({ x: 'uri:yada' }, doc.firstChild, 'x:b', true, 'c');
166 | expect(doc.toString()).to.equal('');
167 | });
168 |
169 | it('should add element with mapped namespace', function () {
170 | var doc = xmlParser.parseFromString('');
171 | xml.addNode({ x: 'uri:yada' }, doc.firstChild, 'x:b', false);
172 | expect(doc.toString()).to.equal('');
173 | });
174 |
175 | });
176 |
177 | describe('getAttributesNamed', function() {
178 |
179 | it('should get attributes named', function () {
180 | var doc = xmlParser.parseFromString('');
181 | var results = xml.getAttributesNamed({}, doc.firstChild.childNodes, 'd');
182 |
183 | expect(results).to.have.length(2);
184 |
185 | expect(results[0].name).to.equal('d');
186 | expect(results[0].value).to.equal('1');
187 |
188 | expect(results[1].name).to.equal('d');
189 | expect(results[1].value).to.equal('3');
190 | });
191 |
192 | it('should create if not found', function () {
193 | var doc = xmlParser.parseFromString('');
194 | var results = xml.getAttributesNamed({}, doc.firstChild.childNodes, 'd');
195 |
196 | expect(results).to.have.length(2);
197 |
198 | expect(results[0].name).to.equal('d');
199 | expect(results[0].value).to.be.empty;
200 |
201 | expect(results[1].name).to.equal('d');
202 | expect(results[1].value).to.be.empty;
203 |
204 | results[0].value = '';
205 | results[1].value = '';
206 |
207 | expect(doc.toString()).to.equal('');
208 | });
209 |
210 | it('should create if not found and map namespace', function () {
211 | var doc = xmlParser.parseFromString('');
212 | var results = xml.getAttributesNamed({ x: 'uri:yada' }, doc.firstChild.childNodes, 'x:d');
213 |
214 | expect(results).to.have.length(1);
215 |
216 | expect(results[0].name).to.equal('z:d');
217 | expect(results[0].value).to.be.empty;
218 |
219 | results[0].value = '';
220 |
221 | expect(doc.toString()).to.equal('');
222 | });
223 |
224 | });
225 |
226 | describe('getChildElementsNamed', function() {
227 |
228 | it('should get elements named', function () {
229 | var doc = xmlParser.parseFromString('1243');
230 | var results = xml.getChildElementsNamed({}, doc.firstChild.childNodes, 'd');
231 |
232 | expect(results).to.have.length(2);
233 |
234 | expect(results[0].nodeName).to.equal('d');
235 | expect(results[0].textContent).to.equal('1');
236 |
237 | expect(results[1].nodeName).to.equal('d');
238 | expect(results[1].textContent).to.equal('3');
239 | });
240 |
241 | it('should create if not found', function () {
242 | var doc = xmlParser.parseFromString('24');
243 | var results = xml.getChildElementsNamed({}, doc.firstChild.childNodes, 'd');
244 |
245 | expect(results).to.have.length(2);
246 |
247 | expect(results[0].nodeName).to.equal('d');
248 | expect(results[0].textContent).to.be.empty;
249 |
250 | expect(results[1].nodeName).to.equal('d');
251 | expect(results[1].textContent).to.be.empty;
252 |
253 | expect(doc.toString()).to.equal('24');
254 | });
255 |
256 | it('should create if not found and map namespace', function () {
257 | var doc = xmlParser.parseFromString('');
258 | var results = xml.getChildElementsNamed({ x: 'uri:yada' }, doc.firstChild.childNodes, 'x:d');
259 |
260 | expect(results).to.have.length(1);
261 |
262 | expect(results[0].prefix).to.equal('z');
263 | expect(results[0].localName).to.equal('d');
264 | expect(results[0].textContent).to.be.empty;
265 |
266 | expect(doc.toString()).to.equal('');
267 | });
268 |
269 | });
270 |
271 | });
272 |
--------------------------------------------------------------------------------
/test/xmlpoke.spec.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var expect = require('chai').expect,
4 | temp = require('temp').track(),
5 | path = require('path'),
6 | fs = require('fs'),
7 | xmlpoke = require('../src/xmlpoke');
8 |
9 | describe('xmlpoke', function() {
10 |
11 | var basePath, fileAPath, fileBPath, fileDirAPath, fileDirBPath;
12 |
13 | beforeEach(function() {
14 |
15 | basePath = temp.mkdirSync();
16 |
17 | fileAPath = path.join(basePath, 'a.xml');
18 | fs.writeFileSync(fileAPath, '');
19 |
20 | fileBPath = path.join(basePath, 'b.xml');
21 | fs.writeFileSync(fileBPath, '');
22 |
23 | fs.mkdirSync(path.join(basePath, 'dir'));
24 |
25 | fileDirAPath = path.join(basePath, 'dir', 'a.xml');
26 | fs.writeFileSync(fileDirAPath, '');
27 |
28 | fileDirBPath = path.join(basePath, 'dir', 'b.xml');
29 | fs.writeFileSync(fileDirBPath, '');
30 |
31 | });
32 |
33 | afterEach(function() {
34 | temp.cleanupSync();
35 | });
36 |
37 | it('should poke files', function() {
38 |
39 | xmlpoke(path.join(basePath, '**/a.*'), function(xml) {
40 | xml.set('a/b', 'c');
41 | });
42 |
43 | expect(fs.readFileSync(fileAPath).toString()).to.equal('c');
44 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
45 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('c');
46 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
47 |
48 | });
49 |
50 | it('should should poke paths and objects with default path', function() {
51 |
52 | xmlpoke(path.join(basePath, 'a.*'),
53 | { path: path.join(basePath, 'dir/a.*'), value: 'd' },
54 | function(xml, context) {
55 | xml.set('a/b', context.value || 'c');
56 | });
57 |
58 | expect(fs.readFileSync(fileAPath).toString()).to.equal('c');
59 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
60 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('d');
61 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
62 |
63 | });
64 |
65 | it('should should poke paths and objects with custom path', function() {
66 |
67 | xmlpoke(path.join(basePath, 'a.*'),
68 | { customPath: path.join(basePath, 'dir/a.*'), value: 'd' },
69 | function(x) { return x.customPath; },
70 | function(xml, context) {
71 | xml.set('a/b', context.value || 'c');
72 | });
73 |
74 | expect(fs.readFileSync(fileAPath).toString()).to.equal('c');
75 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
76 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('d');
77 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
78 |
79 | });
80 |
81 | it('should poke files with cdata', function() {
82 |
83 | xmlpoke(path.join(basePath, '**/a.*'), function(xml) {
84 | xml.set('a/b', xml.CDataValue('c'));
85 | });
86 |
87 | expect(fs.readFileSync(fileAPath).toString()).to.equal('');
88 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
89 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('');
90 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
91 |
92 | });
93 |
94 | it('should poke files with cdata outside dsl', function() {
95 |
96 | var cdata = new xmlpoke.CDataValue('c');
97 |
98 | xmlpoke(path.join(basePath, '**/a.*'), function(xml) {
99 | xml.set('a/b', cdata);
100 | });
101 |
102 | expect(fs.readFileSync(fileAPath).toString()).to.equal('');
103 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
104 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('');
105 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
106 |
107 | });
108 |
109 | it('should poke files with xml', function() {
110 |
111 | xmlpoke(path.join(basePath, '**/a.*'), function(xml) {
112 | xml.set('a/b', xml.XmlString(''));
113 | });
114 |
115 | expect(fs.readFileSync(fileAPath).toString()).to.equal('');
116 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
117 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('');
118 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
119 |
120 | });
121 |
122 | it('should poke files with xml outside dsl', function() {
123 |
124 | var xmlstring = new xmlpoke.XmlString('');
125 |
126 | xmlpoke(path.join(basePath, '**/a.*'), function(xml) {
127 | xml.set('a/b', xmlstring);
128 | });
129 |
130 | expect(fs.readFileSync(fileAPath).toString()).to.equal('');
131 | expect(fs.readFileSync(fileBPath).toString()).to.equal('');
132 | expect(fs.readFileSync(fileDirAPath).toString()).to.equal('');
133 | expect(fs.readFileSync(fileDirBPath).toString()).to.equal('');
134 |
135 | });
136 |
137 | it('should poke string', function() {
138 |
139 | var xml = xmlpoke('', function(xml) {
140 | xml.set('a', 'b');
141 | });
142 |
143 | expect(xml).to.equal('b');
144 |
145 | });
146 |
147 | it('should poke boolean', function() {
148 |
149 | var xml = xmlpoke('', function(xml) {
150 | xml.set('a', true);
151 | });
152 |
153 | expect(xml).to.equal('true');
154 |
155 | });
156 |
157 | it('should poke numbers', function() {
158 |
159 | var xml = xmlpoke('', function(xml) {
160 | xml.set('a', 5);
161 | });
162 |
163 | expect(xml).to.equal('5');
164 |
165 | });
166 |
167 | });
168 |
--------------------------------------------------------------------------------