plist 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +8 -19
- package/History.md +12 -0
- package/README.md +7 -0
- package/dist/plist-build.js +78 -44
- package/dist/plist-parse.js +1366 -999
- package/dist/plist.js +1368 -1001
- package/package.json +6 -6
package/.travis.yml
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
dist: xenial
|
|
2
|
+
os: linux
|
|
3
3
|
language: node_js
|
|
4
|
-
|
|
5
4
|
node_js:
|
|
6
5
|
- '6'
|
|
7
6
|
- '7'
|
|
@@ -10,24 +9,14 @@ node_js:
|
|
|
10
9
|
|
|
11
10
|
env:
|
|
12
11
|
global:
|
|
13
|
-
- secure:
|
|
14
|
-
- secure:
|
|
12
|
+
- secure: R4tCAipsC0KdBPin8+rWedqptn0RXksLM20yZ0w8En0hhaglWCiIxA5uKt/6njXp9Q8FEKkVOyWF+yjq74jB6+KUu0dSK30pbmaAHhlXsL5kTWmY9vd7rxwcn1Hdf1sW15NqRX4hvWuIC32cA7vDr+58VPyum+A+yvPJICvgIlw=
|
|
13
|
+
- secure: sfEwCcmUrfFPIRPV8UwdJymRZ8YY20fuJiAlWfOUQSOccNGWB4RbUsD+iyc9XW5qB1kdOqxVkvZ0sKrYo3Uc4k8mhar7+yhP04hfNj4CWAigG3rtTugbar9kSQjwi/yEaTrb4kdP8HRYs5yjrEX/CGwjm3iHGOSyUw5du0PQfbk=
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
jobs:
|
|
17
16
|
include:
|
|
18
|
-
- node_js: '
|
|
17
|
+
- node_js: '8'
|
|
19
18
|
env: BROWSER_NAME=chrome BROWSER_VERSION=latest
|
|
20
|
-
- node_js: '
|
|
21
|
-
env: BROWSER_NAME=chrome BROWSER_VERSION=29
|
|
22
|
-
- node_js: '6'
|
|
19
|
+
- node_js: '8'
|
|
23
20
|
env: BROWSER_NAME=firefox BROWSER_VERSION=latest
|
|
24
|
-
- node_js: '
|
|
25
|
-
env: BROWSER_NAME=safari BROWSER_VERSION=latest
|
|
26
|
-
- node_js: '6'
|
|
27
|
-
env: BROWSER_NAME=safari BROWSER_VERSION=7
|
|
28
|
-
- node_js: '6'
|
|
21
|
+
- node_js: '8'
|
|
29
22
|
env: BROWSER_NAME=ie BROWSER_VERSION=11
|
|
30
|
-
- node_js: '6'
|
|
31
|
-
env: BROWSER_NAME=ie BROWSER_VERSION=10
|
|
32
|
-
- node_js: '6'
|
|
33
|
-
env: BROWSER_NAME=ie BROWSER_VERSION=9
|
package/History.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
3.0.2 / 2021-03-25
|
|
2
|
+
==================
|
|
3
|
+
* update xmldom to 0.5.0 to patch critical vulnerability (Mike Reinstein)
|
|
4
|
+
* update saucelab credentials to point at mreinstein's saucelabs account (Mike Reinstein)
|
|
5
|
+
* remove a bunch of test versions from the matrix because they weren't working in zuul + sauce (Mike Reinstein)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
3.0.1 / 2018-03-21
|
|
9
|
+
==================
|
|
10
|
+
* avoid using Buffer constructor nodejs/node#19079
|
|
11
|
+
|
|
12
|
+
|
|
1
13
|
3.0.0 / 2018-03-18
|
|
2
14
|
==================
|
|
3
15
|
* [[`cb0d8f1bc6`]](https://github.com/TooTallNate/plist.js/commit/cb0d8f1bc60dee423f8fc2cfcac427452dfaddb0) update Makefile, rebuild dist/ (Mike Reinstein)
|
package/README.md
CHANGED
|
@@ -136,6 +136,13 @@ console.log(plist.build(json));
|
|
|
136
136
|
// </plist>
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
+
## Cross Platform Testing Credits
|
|
140
|
+
|
|
141
|
+
Much thanks to Sauce Labs for providing free resources that enable cross-browser testing on this project!
|
|
142
|
+
|
|
143
|
+
[](https://saucelabs.com)
|
|
144
|
+
|
|
145
|
+
|
|
139
146
|
## License
|
|
140
147
|
|
|
141
148
|
[(The MIT License)](LICENSE)
|
package/dist/plist-build.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function e
|
|
2
|
-
(function (Buffer){
|
|
1
|
+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.plist = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
2
|
+
(function (Buffer){(function (){
|
|
3
3
|
/**
|
|
4
4
|
* Module dependencies.
|
|
5
5
|
*/
|
|
@@ -138,7 +138,7 @@ function walk_obj(next, next_child) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")})
|
|
141
|
+
}).call(this)}).call(this,{"isBuffer":require("../node_modules/is-buffer/index.js")})
|
|
142
142
|
},{"../node_modules/is-buffer/index.js":3,"base64-js":2,"xmlbuilder":25}],2:[function(require,module,exports){
|
|
143
143
|
'use strict'
|
|
144
144
|
|
|
@@ -161,65 +161,98 @@ for (var i = 0, len = code.length; i < len; ++i) {
|
|
|
161
161
|
revLookup['-'.charCodeAt(0)] = 62
|
|
162
162
|
revLookup['_'.charCodeAt(0)] = 63
|
|
163
163
|
|
|
164
|
-
function
|
|
164
|
+
function getLens (b64) {
|
|
165
165
|
var len = b64.length
|
|
166
|
+
|
|
166
167
|
if (len % 4 > 0) {
|
|
167
168
|
throw new Error('Invalid string. Length must be a multiple of 4')
|
|
168
169
|
}
|
|
169
170
|
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
// Trim off extra bytes after placeholder bytes are found
|
|
172
|
+
// See: https://github.com/beatgammit/base64-js/issues/42
|
|
173
|
+
var validLen = b64.indexOf('=')
|
|
174
|
+
if (validLen === -1) validLen = len
|
|
175
|
+
|
|
176
|
+
var placeHoldersLen = validLen === len
|
|
177
|
+
? 0
|
|
178
|
+
: 4 - (validLen % 4)
|
|
179
|
+
|
|
180
|
+
return [validLen, placeHoldersLen]
|
|
176
181
|
}
|
|
177
182
|
|
|
183
|
+
// base64 is 4/3 + up to two characters of the original data
|
|
178
184
|
function byteLength (b64) {
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
var lens = getLens(b64)
|
|
186
|
+
var validLen = lens[0]
|
|
187
|
+
var placeHoldersLen = lens[1]
|
|
188
|
+
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function _byteLength (b64, validLen, placeHoldersLen) {
|
|
192
|
+
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
181
193
|
}
|
|
182
194
|
|
|
183
195
|
function toByteArray (b64) {
|
|
184
|
-
var
|
|
185
|
-
var
|
|
186
|
-
|
|
196
|
+
var tmp
|
|
197
|
+
var lens = getLens(b64)
|
|
198
|
+
var validLen = lens[0]
|
|
199
|
+
var placeHoldersLen = lens[1]
|
|
187
200
|
|
|
188
|
-
arr = new Arr((
|
|
201
|
+
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
|
189
202
|
|
|
190
|
-
|
|
191
|
-
l = placeHolders > 0 ? len - 4 : len
|
|
203
|
+
var curByte = 0
|
|
192
204
|
|
|
193
|
-
|
|
205
|
+
// if there are placeholders, only get up to the last complete 4 chars
|
|
206
|
+
var len = placeHoldersLen > 0
|
|
207
|
+
? validLen - 4
|
|
208
|
+
: validLen
|
|
209
|
+
|
|
210
|
+
var i
|
|
211
|
+
for (i = 0; i < len; i += 4) {
|
|
212
|
+
tmp =
|
|
213
|
+
(revLookup[b64.charCodeAt(i)] << 18) |
|
|
214
|
+
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
|
215
|
+
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
|
216
|
+
revLookup[b64.charCodeAt(i + 3)]
|
|
217
|
+
arr[curByte++] = (tmp >> 16) & 0xFF
|
|
218
|
+
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
219
|
+
arr[curByte++] = tmp & 0xFF
|
|
220
|
+
}
|
|
194
221
|
|
|
195
|
-
|
|
196
|
-
tmp =
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
arr[
|
|
222
|
+
if (placeHoldersLen === 2) {
|
|
223
|
+
tmp =
|
|
224
|
+
(revLookup[b64.charCodeAt(i)] << 2) |
|
|
225
|
+
(revLookup[b64.charCodeAt(i + 1)] >> 4)
|
|
226
|
+
arr[curByte++] = tmp & 0xFF
|
|
200
227
|
}
|
|
201
228
|
|
|
202
|
-
if (
|
|
203
|
-
tmp =
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
arr[
|
|
208
|
-
arr[
|
|
229
|
+
if (placeHoldersLen === 1) {
|
|
230
|
+
tmp =
|
|
231
|
+
(revLookup[b64.charCodeAt(i)] << 10) |
|
|
232
|
+
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
|
233
|
+
(revLookup[b64.charCodeAt(i + 2)] >> 2)
|
|
234
|
+
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
235
|
+
arr[curByte++] = tmp & 0xFF
|
|
209
236
|
}
|
|
210
237
|
|
|
211
238
|
return arr
|
|
212
239
|
}
|
|
213
240
|
|
|
214
241
|
function tripletToBase64 (num) {
|
|
215
|
-
return lookup[num >> 18 & 0x3F] +
|
|
242
|
+
return lookup[num >> 18 & 0x3F] +
|
|
243
|
+
lookup[num >> 12 & 0x3F] +
|
|
244
|
+
lookup[num >> 6 & 0x3F] +
|
|
245
|
+
lookup[num & 0x3F]
|
|
216
246
|
}
|
|
217
247
|
|
|
218
248
|
function encodeChunk (uint8, start, end) {
|
|
219
249
|
var tmp
|
|
220
250
|
var output = []
|
|
221
251
|
for (var i = start; i < end; i += 3) {
|
|
222
|
-
tmp =
|
|
252
|
+
tmp =
|
|
253
|
+
((uint8[i] << 16) & 0xFF0000) +
|
|
254
|
+
((uint8[i + 1] << 8) & 0xFF00) +
|
|
255
|
+
(uint8[i + 2] & 0xFF)
|
|
223
256
|
output.push(tripletToBase64(tmp))
|
|
224
257
|
}
|
|
225
258
|
return output.join('')
|
|
@@ -229,7 +262,6 @@ function fromByteArray (uint8) {
|
|
|
229
262
|
var tmp
|
|
230
263
|
var len = uint8.length
|
|
231
264
|
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
|
232
|
-
var output = ''
|
|
233
265
|
var parts = []
|
|
234
266
|
var maxChunkLength = 16383 // must be multiple of 3
|
|
235
267
|
|
|
@@ -241,19 +273,21 @@ function fromByteArray (uint8) {
|
|
|
241
273
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
|
242
274
|
if (extraBytes === 1) {
|
|
243
275
|
tmp = uint8[len - 1]
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
276
|
+
parts.push(
|
|
277
|
+
lookup[tmp >> 2] +
|
|
278
|
+
lookup[(tmp << 4) & 0x3F] +
|
|
279
|
+
'=='
|
|
280
|
+
)
|
|
247
281
|
} else if (extraBytes === 2) {
|
|
248
|
-
tmp = (uint8[len - 2] << 8) +
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
282
|
+
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
|
283
|
+
parts.push(
|
|
284
|
+
lookup[tmp >> 10] +
|
|
285
|
+
lookup[(tmp >> 4) & 0x3F] +
|
|
286
|
+
lookup[(tmp << 2) & 0x3F] +
|
|
287
|
+
'='
|
|
288
|
+
)
|
|
253
289
|
}
|
|
254
290
|
|
|
255
|
-
parts.push(output)
|
|
256
|
-
|
|
257
291
|
return parts.join('')
|
|
258
292
|
}
|
|
259
293
|
|