muhammara 3.2.0 → 3.3.0
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/CHANGELOG.md +18 -1
- package/binding.gyp +2 -2
- package/muhammara.d.ts +1 -1
- package/node_modules/tar/README.md +37 -9
- package/node_modules/tar/lib/create.js +16 -9
- package/node_modules/tar/lib/extract.js +16 -10
- package/node_modules/tar/lib/header.js +50 -34
- package/node_modules/tar/lib/large-numbers.js +22 -17
- package/node_modules/tar/lib/list.js +20 -13
- package/node_modules/tar/lib/mkdir.js +40 -24
- package/node_modules/tar/lib/mode-fix.js +8 -4
- package/node_modules/tar/lib/normalize-unicode.js +3 -2
- package/node_modules/tar/lib/pack.js +54 -31
- package/node_modules/tar/lib/parse.js +74 -46
- package/node_modules/tar/lib/path-reservations.js +26 -18
- package/node_modules/tar/lib/pax.js +15 -8
- package/node_modules/tar/lib/read-entry.js +14 -7
- package/node_modules/tar/lib/replace.js +50 -27
- package/node_modules/tar/lib/strip-absolute-path.js +1 -1
- package/node_modules/tar/lib/unpack.js +73 -44
- package/node_modules/tar/lib/update.js +8 -4
- package/node_modules/tar/lib/warn-mixin.js +7 -4
- package/node_modules/tar/lib/write-entry.js +44 -23
- package/node_modules/tar/package.json +44 -30
- package/package.json +1 -1
- package/src/deps/FreeType/binding.gyp +10 -0
- package/src/deps/LibAesgm/binding.gyp +10 -0
- package/src/deps/LibJpeg/binding.gyp +10 -0
- package/src/deps/LibPng/binding.gyp +11 -1
- package/src/deps/LibTiff/binding.gyp +10 -0
- package/src/deps/PDFWriter/binding.gyp +10 -0
- package/src/deps/ZLib/binding.gyp +10 -0
|
@@ -8,8 +8,9 @@ const normPath = require('./normalize-windows-path.js')
|
|
|
8
8
|
const stripSlash = require('./strip-trailing-slashes.js')
|
|
9
9
|
|
|
10
10
|
const prefixPath = (path, prefix) => {
|
|
11
|
-
if (!prefix)
|
|
11
|
+
if (!prefix) {
|
|
12
12
|
return normPath(path)
|
|
13
|
+
}
|
|
13
14
|
path = normPath(path).replace(/^\.(\/|$)/, '')
|
|
14
15
|
return stripSlash(prefix) + '/' + path
|
|
15
16
|
}
|
|
@@ -44,8 +45,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
44
45
|
constructor (p, opt) {
|
|
45
46
|
opt = opt || {}
|
|
46
47
|
super(opt)
|
|
47
|
-
if (typeof p !== 'string')
|
|
48
|
+
if (typeof p !== 'string') {
|
|
48
49
|
throw new TypeError('path is required')
|
|
50
|
+
}
|
|
49
51
|
this.path = normPath(p)
|
|
50
52
|
// suppress atime, ctime, uid, gid, uname, gname
|
|
51
53
|
this.portable = !!opt.portable
|
|
@@ -72,8 +74,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
72
74
|
this.pos = null
|
|
73
75
|
this.remain = null
|
|
74
76
|
|
|
75
|
-
if (typeof opt.onwarn === 'function')
|
|
77
|
+
if (typeof opt.onwarn === 'function') {
|
|
76
78
|
this.on('warn', opt.onwarn)
|
|
79
|
+
}
|
|
77
80
|
|
|
78
81
|
let pathWarn = false
|
|
79
82
|
if (!this.preservePaths) {
|
|
@@ -94,8 +97,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
94
97
|
|
|
95
98
|
this.absolute = normPath(opt.absolute || path.resolve(this.cwd, p))
|
|
96
99
|
|
|
97
|
-
if (this.path === '')
|
|
100
|
+
if (this.path === '') {
|
|
98
101
|
this.path = './'
|
|
102
|
+
}
|
|
99
103
|
|
|
100
104
|
if (pathWarn) {
|
|
101
105
|
this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, {
|
|
@@ -104,22 +108,25 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
104
108
|
})
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
if (this.statCache.has(this.absolute))
|
|
111
|
+
if (this.statCache.has(this.absolute)) {
|
|
108
112
|
this[ONLSTAT](this.statCache.get(this.absolute))
|
|
109
|
-
else
|
|
113
|
+
} else {
|
|
110
114
|
this[LSTAT]()
|
|
115
|
+
}
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
emit (ev, ...data) {
|
|
114
|
-
if (ev === 'error')
|
|
119
|
+
if (ev === 'error') {
|
|
115
120
|
this[HAD_ERROR] = true
|
|
121
|
+
}
|
|
116
122
|
return super.emit(ev, ...data)
|
|
117
123
|
}
|
|
118
124
|
|
|
119
125
|
[LSTAT] () {
|
|
120
126
|
fs.lstat(this.absolute, (er, stat) => {
|
|
121
|
-
if (er)
|
|
127
|
+
if (er) {
|
|
122
128
|
return this.emit('error', er)
|
|
129
|
+
}
|
|
123
130
|
this[ONLSTAT](stat)
|
|
124
131
|
})
|
|
125
132
|
}
|
|
@@ -127,8 +134,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
127
134
|
[ONLSTAT] (stat) {
|
|
128
135
|
this.statCache.set(this.absolute, stat)
|
|
129
136
|
this.stat = stat
|
|
130
|
-
if (!stat.isFile())
|
|
137
|
+
if (!stat.isFile()) {
|
|
131
138
|
stat.size = 0
|
|
139
|
+
}
|
|
132
140
|
this.type = getType(stat)
|
|
133
141
|
this.emit('stat', stat)
|
|
134
142
|
this[PROCESS]()
|
|
@@ -153,8 +161,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
153
161
|
}
|
|
154
162
|
|
|
155
163
|
[HEADER] () {
|
|
156
|
-
if (this.type === 'Directory' && this.portable)
|
|
164
|
+
if (this.type === 'Directory' && this.portable) {
|
|
157
165
|
this.noMtime = true
|
|
166
|
+
}
|
|
158
167
|
|
|
159
168
|
this.header = new Header({
|
|
160
169
|
path: this[PREFIX](this.path),
|
|
@@ -196,8 +205,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
[DIRECTORY] () {
|
|
199
|
-
if (this.path.
|
|
208
|
+
if (this.path.slice(-1) !== '/') {
|
|
200
209
|
this.path += '/'
|
|
210
|
+
}
|
|
201
211
|
this.stat.size = 0
|
|
202
212
|
this[HEADER]()
|
|
203
213
|
this.end()
|
|
@@ -205,8 +215,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
205
215
|
|
|
206
216
|
[SYMLINK] () {
|
|
207
217
|
fs.readlink(this.absolute, (er, linkpath) => {
|
|
208
|
-
if (er)
|
|
218
|
+
if (er) {
|
|
209
219
|
return this.emit('error', er)
|
|
220
|
+
}
|
|
210
221
|
this[ONREADLINK](linkpath)
|
|
211
222
|
})
|
|
212
223
|
}
|
|
@@ -230,31 +241,35 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
230
241
|
const linkKey = this.stat.dev + ':' + this.stat.ino
|
|
231
242
|
if (this.linkCache.has(linkKey)) {
|
|
232
243
|
const linkpath = this.linkCache.get(linkKey)
|
|
233
|
-
if (linkpath.indexOf(this.cwd) === 0)
|
|
244
|
+
if (linkpath.indexOf(this.cwd) === 0) {
|
|
234
245
|
return this[HARDLINK](linkpath)
|
|
246
|
+
}
|
|
235
247
|
}
|
|
236
248
|
this.linkCache.set(linkKey, this.absolute)
|
|
237
249
|
}
|
|
238
250
|
|
|
239
251
|
this[HEADER]()
|
|
240
|
-
if (this.stat.size === 0)
|
|
252
|
+
if (this.stat.size === 0) {
|
|
241
253
|
return this.end()
|
|
254
|
+
}
|
|
242
255
|
|
|
243
256
|
this[OPENFILE]()
|
|
244
257
|
}
|
|
245
258
|
|
|
246
259
|
[OPENFILE] () {
|
|
247
260
|
fs.open(this.absolute, 'r', (er, fd) => {
|
|
248
|
-
if (er)
|
|
261
|
+
if (er) {
|
|
249
262
|
return this.emit('error', er)
|
|
263
|
+
}
|
|
250
264
|
this[ONOPENFILE](fd)
|
|
251
265
|
})
|
|
252
266
|
}
|
|
253
267
|
|
|
254
268
|
[ONOPENFILE] (fd) {
|
|
255
269
|
this.fd = fd
|
|
256
|
-
if (this[HAD_ERROR])
|
|
270
|
+
if (this[HAD_ERROR]) {
|
|
257
271
|
return this[CLOSE]()
|
|
272
|
+
}
|
|
258
273
|
|
|
259
274
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512)
|
|
260
275
|
this.blockRemain = this.blockLen
|
|
@@ -318,10 +333,11 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
318
333
|
this.buf : this.buf.slice(this.offset, this.offset + bytesRead)
|
|
319
334
|
|
|
320
335
|
const flushed = this.write(writeBuf)
|
|
321
|
-
if (!flushed)
|
|
336
|
+
if (!flushed) {
|
|
322
337
|
this[AWAITDRAIN](() => this[ONDRAIN]())
|
|
323
|
-
else
|
|
338
|
+
} else {
|
|
324
339
|
this[ONDRAIN]()
|
|
340
|
+
}
|
|
325
341
|
}
|
|
326
342
|
|
|
327
343
|
[AWAITDRAIN] (cb) {
|
|
@@ -343,8 +359,9 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
343
359
|
|
|
344
360
|
[ONDRAIN] () {
|
|
345
361
|
if (!this.remain) {
|
|
346
|
-
if (this.blockRemain)
|
|
362
|
+
if (this.blockRemain) {
|
|
347
363
|
super.write(Buffer.alloc(this.blockRemain))
|
|
364
|
+
}
|
|
348
365
|
return this[CLOSE](er => er ? this.emit('error', er) : this.end())
|
|
349
366
|
}
|
|
350
367
|
|
|
@@ -412,8 +429,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
412
429
|
|
|
413
430
|
this.readEntry = readEntry
|
|
414
431
|
this.type = readEntry.type
|
|
415
|
-
if (this.type === 'Directory' && this.portable)
|
|
432
|
+
if (this.type === 'Directory' && this.portable) {
|
|
416
433
|
this.noMtime = true
|
|
434
|
+
}
|
|
417
435
|
|
|
418
436
|
this.prefix = opt.prefix || null
|
|
419
437
|
|
|
@@ -429,8 +447,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
429
447
|
this.ctime = this.portable ? null : readEntry.ctime
|
|
430
448
|
this.linkpath = normPath(readEntry.linkpath)
|
|
431
449
|
|
|
432
|
-
if (typeof opt.onwarn === 'function')
|
|
450
|
+
if (typeof opt.onwarn === 'function') {
|
|
433
451
|
this.on('warn', opt.onwarn)
|
|
452
|
+
}
|
|
434
453
|
|
|
435
454
|
let pathWarn = false
|
|
436
455
|
if (!this.preservePaths) {
|
|
@@ -500,15 +519,17 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
500
519
|
|
|
501
520
|
write (data) {
|
|
502
521
|
const writeLen = data.length
|
|
503
|
-
if (writeLen > this.blockRemain)
|
|
522
|
+
if (writeLen > this.blockRemain) {
|
|
504
523
|
throw new Error('writing more to entry than is appropriate')
|
|
524
|
+
}
|
|
505
525
|
this.blockRemain -= writeLen
|
|
506
526
|
return super.write(data)
|
|
507
527
|
}
|
|
508
528
|
|
|
509
529
|
end () {
|
|
510
|
-
if (this.blockRemain)
|
|
530
|
+
if (this.blockRemain) {
|
|
511
531
|
super.write(Buffer.alloc(this.blockRemain))
|
|
532
|
+
}
|
|
512
533
|
return super.end()
|
|
513
534
|
}
|
|
514
535
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "tar@^6.1.11",
|
|
3
|
-
"_id": "tar@6.1.
|
|
3
|
+
"_id": "tar@6.1.12",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-jU4TdemS31uABHd+Lt5WEYJuzn+TJTCBLljvIAHZOz6M9Os5pJ4dD+vRFLxPa/n3T0iEFzpi+0x1UfuDZYbRMw==",
|
|
6
6
|
"_location": "/tar",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -18,14 +18,12 @@
|
|
|
18
18
|
"_requiredBy": [
|
|
19
19
|
"/@mapbox/node-pre-gyp"
|
|
20
20
|
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/tar/-/tar-6.1.
|
|
22
|
-
"_shasum": "
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/tar/-/tar-6.1.12.tgz",
|
|
22
|
+
"_shasum": "3b742fb05669b55671fb769ab67a7791ea1a62e6",
|
|
23
23
|
"_spec": "tar@^6.1.11",
|
|
24
24
|
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/@mapbox/node-pre-gyp",
|
|
25
25
|
"author": {
|
|
26
|
-
"name": "
|
|
27
|
-
"email": "i@izs.me",
|
|
28
|
-
"url": "http://blog.izs.me/"
|
|
26
|
+
"name": "GitHub Inc."
|
|
29
27
|
},
|
|
30
28
|
"bugs": {
|
|
31
29
|
"url": "https://github.com/npm/node-tar/issues"
|
|
@@ -42,26 +40,23 @@
|
|
|
42
40
|
"deprecated": false,
|
|
43
41
|
"description": "tar for node",
|
|
44
42
|
"devDependencies": {
|
|
43
|
+
"@npmcli/eslint-config": "^4.0.0",
|
|
44
|
+
"@npmcli/template-oss": "4.8.0",
|
|
45
45
|
"chmodr": "^1.2.0",
|
|
46
46
|
"end-of-stream": "^1.4.3",
|
|
47
|
-
"eslint": "^7.17.0",
|
|
48
|
-
"eslint-plugin-import": "^2.22.1",
|
|
49
|
-
"eslint-plugin-node": "^11.1.0",
|
|
50
|
-
"eslint-plugin-promise": "^4.2.1",
|
|
51
|
-
"eslint-plugin-standard": "^5.0.0",
|
|
52
47
|
"events-to-array": "^1.1.2",
|
|
53
48
|
"mutate-fs": "^2.1.1",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"tar-stream": "^1.6.2"
|
|
49
|
+
"nock": "^13.2.9",
|
|
50
|
+
"rimraf": "^3.0.2",
|
|
51
|
+
"tap": "^16.0.1"
|
|
58
52
|
},
|
|
59
53
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
54
|
+
"node": ">=10"
|
|
61
55
|
},
|
|
62
56
|
"files": [
|
|
63
|
-
"
|
|
64
|
-
"lib
|
|
57
|
+
"bin/",
|
|
58
|
+
"lib/",
|
|
59
|
+
"index.js"
|
|
65
60
|
],
|
|
66
61
|
"homepage": "https://github.com/npm/node-tar#readme",
|
|
67
62
|
"license": "ISC",
|
|
@@ -71,22 +66,41 @@
|
|
|
71
66
|
"url": "git+https://github.com/npm/node-tar.git"
|
|
72
67
|
},
|
|
73
68
|
"scripts": {
|
|
74
|
-
"bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done",
|
|
75
|
-
"eslint": "eslint",
|
|
76
69
|
"genparse": "node scripts/generate-parse-fixtures.js",
|
|
77
|
-
"lint": "
|
|
70
|
+
"lint": "eslint \"**/*.js\"",
|
|
78
71
|
"lintfix": "npm run lint -- --fix",
|
|
72
|
+
"postlint": "template-oss-check",
|
|
79
73
|
"posttest": "npm run lint",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"test": "node test/fixtures/test.js",
|
|
84
|
-
"test:posix": "tap",
|
|
85
|
-
"test:win32": "tap --lines=98 --branches=98 --statements=98 --functions=98"
|
|
74
|
+
"snap": "tap",
|
|
75
|
+
"template-oss-apply": "template-oss-apply --force",
|
|
76
|
+
"test": "tap"
|
|
86
77
|
},
|
|
87
78
|
"tap": {
|
|
88
79
|
"coverage-map": "map.js",
|
|
89
|
-
"
|
|
80
|
+
"timeout": 0,
|
|
81
|
+
"nyc-arg": [
|
|
82
|
+
"--exclude",
|
|
83
|
+
"tap-snapshots/**"
|
|
84
|
+
]
|
|
90
85
|
},
|
|
91
|
-
"
|
|
86
|
+
"templateOSS": {
|
|
87
|
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
88
|
+
"version": "4.8.0",
|
|
89
|
+
"content": "scripts/template-oss",
|
|
90
|
+
"engines": ">=10",
|
|
91
|
+
"distPaths": [
|
|
92
|
+
"index.js"
|
|
93
|
+
],
|
|
94
|
+
"allowPaths": [
|
|
95
|
+
"/index.js"
|
|
96
|
+
],
|
|
97
|
+
"ciVersions": [
|
|
98
|
+
"10.x",
|
|
99
|
+
"12.x",
|
|
100
|
+
"14.x",
|
|
101
|
+
"16.x",
|
|
102
|
+
"18.x"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"version": "6.1.12"
|
|
92
106
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muhammara",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Create, read and modify PDF files and streams. A drop in replacement for hummusjs PDF library",
|
|
5
5
|
"homepage": "https://github.com/julianhille/Muhammarajs",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
'./include/freetype/internal',
|
|
15
15
|
'./include/freetype/internal/services'
|
|
16
16
|
],
|
|
17
|
+
'msvs_settings':
|
|
18
|
+
{
|
|
19
|
+
'VCCLCompilerTool':
|
|
20
|
+
{
|
|
21
|
+
'AdditionalOptions':
|
|
22
|
+
[
|
|
23
|
+
'/std:c++17',
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
17
27
|
'sources': [
|
|
18
28
|
'./src/base/ftbbox.c',
|
|
19
29
|
'./src/base/ftgxval.c',
|
|
@@ -12,6 +12,16 @@
|
|
|
12
12
|
}
|
|
13
13
|
}]
|
|
14
14
|
],
|
|
15
|
+
'msvs_settings':
|
|
16
|
+
{
|
|
17
|
+
'VCCLCompilerTool':
|
|
18
|
+
{
|
|
19
|
+
'AdditionalOptions':
|
|
20
|
+
[
|
|
21
|
+
'/std:c++17',
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
15
25
|
'dependencies': [
|
|
16
26
|
'<(module_root_dir)/src/deps/LibAesgm/binding.gyp:libaesgm',
|
|
17
27
|
'<(module_root_dir)/src/deps/FreeType/binding.gyp:freetype',
|