muhammara 2.1.0 → 2.2.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 +13 -1
- package/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md +3 -0
- package/node_modules/@mapbox/node-pre-gyp/package.json +6 -7
- package/node_modules/ansi-regex/package.json +1 -2
- package/node_modules/brace-expansion/package.json +2 -1
- package/node_modules/gauge/CHANGELOG.md +163 -0
- package/node_modules/gauge/LICENSE +13 -0
- package/node_modules/gauge/README.md +1 -1
- package/node_modules/gauge/{lib/base-theme.js → base-theme.js} +3 -7
- package/node_modules/gauge/{lib/error.js → error.js} +0 -0
- package/node_modules/gauge/{lib/has-color.js → has-color.js} +0 -0
- package/node_modules/gauge/{lib/index.js → index.js} +32 -89
- package/node_modules/gauge/package.json +42 -37
- package/node_modules/gauge/{lib/plumbing.js → plumbing.js} +1 -3
- package/node_modules/gauge/{lib/process.js → process.js} +0 -0
- package/node_modules/gauge/{lib/progress-bar.js → progress-bar.js} +5 -11
- package/node_modules/gauge/{lib/render-template.js → render-template.js} +24 -68
- package/node_modules/gauge/{lib/set-immediate.js → set-immediate.js} +0 -0
- package/node_modules/gauge/{lib/set-interval.js → set-interval.js} +0 -0
- package/node_modules/gauge/{lib/spin.js → spin.js} +0 -0
- package/node_modules/gauge/{lib/template-item.js → template-item.js} +6 -21
- package/node_modules/gauge/{lib/theme-set.js → theme-set.js} +23 -31
- package/node_modules/gauge/{lib/themes.js → themes.js} +13 -13
- package/node_modules/gauge/{lib/wide-truncate.js → wide-truncate.js} +3 -9
- package/node_modules/minimatch/README.md +22 -1
- package/node_modules/minimatch/minimatch.js +93 -69
- package/node_modules/minimatch/package.json +11 -10
- package/node_modules/minipass/index.js +6 -1
- package/node_modules/minipass/package.json +5 -5
- package/node_modules/node-fetch/lib/index.es.js +28 -2
- package/node_modules/node-fetch/lib/index.js +28 -2
- package/node_modules/node-fetch/lib/index.mjs +28 -2
- package/node_modules/node-fetch/package.json +13 -5
- package/node_modules/npmlog/LICENSE +15 -0
- package/node_modules/npmlog/{lib/log.js → log.js} +9 -9
- package/node_modules/npmlog/package.json +20 -31
- package/node_modules/object-assign/index.js +90 -0
- package/node_modules/object-assign/license +21 -0
- package/node_modules/object-assign/package.json +74 -0
- package/node_modules/object-assign/readme.md +61 -0
- package/node_modules/signal-exit/index.js +4 -2
- package/node_modules/signal-exit/package.json +5 -5
- package/package.json +1 -1
- package/src/deps/PDFWriter/CMakeLists.txt +8 -0
- package/src/deps/PDFWriter/DecryptionHelper.cpp +10 -8
- package/src/deps/PDFWriter/Deletable.h +46 -0
- package/src/deps/PDFWriter/DocumentContext.h +3 -3
- package/src/deps/PDFWriter/IDeletable.h +6 -0
- package/src/deps/PDFWriter/InputLZWDecodeStream.cpp +208 -0
- package/src/deps/PDFWriter/InputLZWDecodeStream.h +77 -0
- package/src/deps/PDFWriter/InputStreamSkipperStream.cpp +1 -1
- package/src/deps/PDFWriter/JPEGImageHandler.h +2 -2
- package/src/deps/PDFWriter/ObjectsContext.cpp +5 -0
- package/src/deps/PDFWriter/ObjectsContext.h +1 -0
- package/src/deps/PDFWriter/PDFDocumentHandler.cpp +19 -3
- package/src/deps/PDFWriter/PDFObject.cpp +13 -11
- package/src/deps/PDFWriter/PDFObject.h +7 -5
- package/src/deps/PDFWriter/PDFObjectParser.cpp +8 -0
- package/src/deps/PDFWriter/PDFObjectParser.h +6 -0
- package/src/deps/PDFWriter/PDFParser.cpp +25 -13
- package/src/deps/PDFWriter/PDFParserTokenizer.cpp +25 -24
- package/src/deps/PDFWriter/PDFParserTokenizer.h +1 -0
- package/src/deps/PDFWriter/PDFWriter.h +2 -2
- package/src/deps/PDFWriter/binding.gyp +2 -0
- package/node_modules/gauge/LICENSE.md +0 -20
- package/node_modules/gauge/lib/demo.js +0 -45
- package/node_modules/npmlog/LICENSE.md +0 -20
- package/src/deps/PDFWriter/InputPredictorPNGAverageStream.cpp +0 -120
- package/src/deps/PDFWriter/InputPredictorPNGAverageStream.h +0 -49
- package/src/deps/PDFWriter/InputPredictorPNGNoneStream.cpp +0 -109
- package/src/deps/PDFWriter/InputPredictorPNGNoneStream.h +0 -47
- package/src/deps/PDFWriter/InputPredictorPNGPaethStream.cpp +0 -136
- package/src/deps/PDFWriter/InputPredictorPNGPaethStream.h +0 -51
- package/src/deps/PDFWriter/InputPredictorPNGSubStream.cpp +0 -113
- package/src/deps/PDFWriter/InputPredictorPNGSubStream.h +0 -47
- package/src/deps/PDFWriter/InputPredictorPNGUpStream.cpp +0 -120
- package/src/deps/PDFWriter/InputPredictorPNGUpStream.h +0 -49
|
@@ -30,11 +30,11 @@ log.useColor = function () {
|
|
|
30
30
|
|
|
31
31
|
log.enableColor = function () {
|
|
32
32
|
colorEnabled = true
|
|
33
|
-
this.gauge.setTheme({
|
|
33
|
+
this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled})
|
|
34
34
|
}
|
|
35
35
|
log.disableColor = function () {
|
|
36
36
|
colorEnabled = false
|
|
37
|
-
this.gauge.setTheme({
|
|
37
|
+
this.gauge.setTheme({hasColor: colorEnabled, hasUnicode: unicodeEnabled})
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// default level
|
|
@@ -42,13 +42,13 @@ log.level = 'info'
|
|
|
42
42
|
|
|
43
43
|
log.gauge = new Gauge(stream, {
|
|
44
44
|
enabled: false, // no progress bars unless asked
|
|
45
|
-
theme: {
|
|
45
|
+
theme: {hasColor: log.useColor()},
|
|
46
46
|
template: [
|
|
47
|
-
{
|
|
48
|
-
{
|
|
49
|
-
{
|
|
47
|
+
{type: 'progressbar', length: 20},
|
|
48
|
+
{type: 'activityIndicator', kerning: 1, length: 1},
|
|
49
|
+
{type: 'section', default: ''},
|
|
50
50
|
':',
|
|
51
|
-
{
|
|
51
|
+
{type: 'logline', kerning: 1, default: ''},
|
|
52
52
|
],
|
|
53
53
|
})
|
|
54
54
|
|
|
@@ -62,12 +62,12 @@ var unicodeEnabled
|
|
|
62
62
|
|
|
63
63
|
log.enableUnicode = function () {
|
|
64
64
|
unicodeEnabled = true
|
|
65
|
-
this.gauge.setTheme({
|
|
65
|
+
this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
log.disableUnicode = function () {
|
|
69
69
|
unicodeEnabled = false
|
|
70
|
-
this.gauge.setTheme({
|
|
70
|
+
this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
log.setGaugeThemeset = function (themes) {
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_from": "npmlog@^
|
|
3
|
-
"_id": "npmlog@
|
|
2
|
+
"_from": "npmlog@^5.0.1",
|
|
3
|
+
"_id": "npmlog@5.0.1",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
|
|
6
6
|
"_location": "/npmlog",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
9
9
|
"type": "range",
|
|
10
10
|
"registry": true,
|
|
11
|
-
"raw": "npmlog@^
|
|
11
|
+
"raw": "npmlog@^5.0.1",
|
|
12
12
|
"name": "npmlog",
|
|
13
13
|
"escapedName": "npmlog",
|
|
14
|
-
"rawSpec": "^
|
|
14
|
+
"rawSpec": "^5.0.1",
|
|
15
15
|
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "^
|
|
16
|
+
"fetchSpec": "^5.0.1"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
19
|
"/@mapbox/node-pre-gyp"
|
|
20
20
|
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-
|
|
22
|
-
"_shasum": "
|
|
23
|
-
"_spec": "npmlog@^
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
|
|
22
|
+
"_shasum": "f06678e80e29419ad67ab964e0fa69959c1eb8b0",
|
|
23
|
+
"_spec": "npmlog@^5.0.1",
|
|
24
24
|
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/@mapbox/node-pre-gyp",
|
|
25
25
|
"author": {
|
|
26
|
-
"name": "
|
|
26
|
+
"name": "Isaac Z. Schlueter",
|
|
27
|
+
"email": "i@izs.me",
|
|
28
|
+
"url": "http://blog.izs.me/"
|
|
27
29
|
},
|
|
28
30
|
"bugs": {
|
|
29
31
|
"url": "https://github.com/npm/npmlog/issues"
|
|
@@ -32,46 +34,33 @@
|
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"are-we-there-yet": "^2.0.0",
|
|
34
36
|
"console-control-strings": "^1.1.0",
|
|
35
|
-
"gauge": "^
|
|
37
|
+
"gauge": "^3.0.0",
|
|
36
38
|
"set-blocking": "^2.0.0"
|
|
37
39
|
},
|
|
38
40
|
"deprecated": false,
|
|
39
41
|
"description": "logger for npm",
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@npmcli/
|
|
43
|
+
"@npmcli/lint": "^1.0.1",
|
|
42
44
|
"tap": "^15.0.9"
|
|
43
45
|
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": "^12.13.0 || ^14.15.0 || >=16"
|
|
46
|
-
},
|
|
47
46
|
"files": [
|
|
48
|
-
"
|
|
49
|
-
"lib"
|
|
47
|
+
"log.js"
|
|
50
48
|
],
|
|
51
49
|
"homepage": "https://github.com/npm/npmlog#readme",
|
|
52
50
|
"license": "ISC",
|
|
53
|
-
"main": "
|
|
51
|
+
"main": "log.js",
|
|
54
52
|
"name": "npmlog",
|
|
55
53
|
"repository": {
|
|
56
54
|
"type": "git",
|
|
57
55
|
"url": "git+https://github.com/npm/npmlog.git"
|
|
58
56
|
},
|
|
59
57
|
"scripts": {
|
|
60
|
-
"lint": "
|
|
58
|
+
"lint": "npm run npmclilint -- \"*.*js\" \"test/**/*.*js\"",
|
|
61
59
|
"lintfix": "npm run lint -- --fix",
|
|
62
60
|
"npmclilint": "npmcli-lint",
|
|
63
|
-
"postlint": "npm-template-check",
|
|
64
61
|
"postsnap": "npm run lintfix --",
|
|
65
|
-
"posttest": "npm run lint",
|
|
66
|
-
"
|
|
67
|
-
"prepublishOnly": "git push origin --follow-tags",
|
|
68
|
-
"preversion": "npm test",
|
|
69
|
-
"snap": "tap",
|
|
70
|
-
"test": "tap"
|
|
71
|
-
},
|
|
72
|
-
"tap": {
|
|
73
|
-
"branches": 95
|
|
62
|
+
"posttest": "npm run lint --",
|
|
63
|
+
"test": "tap test/*.js --branches=95"
|
|
74
64
|
},
|
|
75
|
-
"
|
|
76
|
-
"version": "6.0.0"
|
|
65
|
+
"version": "5.0.1"
|
|
77
66
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
/* eslint-disable no-unused-vars */
|
|
9
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
11
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
|
|
13
|
+
function toObject(val) {
|
|
14
|
+
if (val === null || val === undefined) {
|
|
15
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return Object(val);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function shouldUseNative() {
|
|
22
|
+
try {
|
|
23
|
+
if (!Object.assign) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
28
|
+
|
|
29
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
30
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
31
|
+
test1[5] = 'de';
|
|
32
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
37
|
+
var test2 = {};
|
|
38
|
+
for (var i = 0; i < 10; i++) {
|
|
39
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
40
|
+
}
|
|
41
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
42
|
+
return test2[n];
|
|
43
|
+
});
|
|
44
|
+
if (order2.join('') !== '0123456789') {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
49
|
+
var test3 = {};
|
|
50
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
51
|
+
test3[letter] = letter;
|
|
52
|
+
});
|
|
53
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
54
|
+
'abcdefghijklmnopqrst') {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return true;
|
|
59
|
+
} catch (err) {
|
|
60
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
66
|
+
var from;
|
|
67
|
+
var to = toObject(target);
|
|
68
|
+
var symbols;
|
|
69
|
+
|
|
70
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
71
|
+
from = Object(arguments[s]);
|
|
72
|
+
|
|
73
|
+
for (var key in from) {
|
|
74
|
+
if (hasOwnProperty.call(from, key)) {
|
|
75
|
+
to[key] = from[key];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (getOwnPropertySymbols) {
|
|
80
|
+
symbols = getOwnPropertySymbols(from);
|
|
81
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
82
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
83
|
+
to[symbols[i]] = from[symbols[i]];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return to;
|
|
90
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all 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,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_from": "object-assign@^4.1.1",
|
|
3
|
+
"_id": "object-assign@4.1.1",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
|
6
|
+
"_location": "/object-assign",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "object-assign@^4.1.1",
|
|
12
|
+
"name": "object-assign",
|
|
13
|
+
"escapedName": "object-assign",
|
|
14
|
+
"rawSpec": "^4.1.1",
|
|
15
|
+
"saveSpec": null,
|
|
16
|
+
"fetchSpec": "^4.1.1"
|
|
17
|
+
},
|
|
18
|
+
"_requiredBy": [
|
|
19
|
+
"/gauge"
|
|
20
|
+
],
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
|
22
|
+
"_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
|
|
23
|
+
"_spec": "object-assign@^4.1.1",
|
|
24
|
+
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/gauge",
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Sindre Sorhus",
|
|
27
|
+
"email": "sindresorhus@gmail.com",
|
|
28
|
+
"url": "sindresorhus.com"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/sindresorhus/object-assign/issues"
|
|
32
|
+
},
|
|
33
|
+
"bundleDependencies": false,
|
|
34
|
+
"deprecated": false,
|
|
35
|
+
"description": "ES2015 `Object.assign()` ponyfill",
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"ava": "^0.16.0",
|
|
38
|
+
"lodash": "^4.16.4",
|
|
39
|
+
"matcha": "^0.7.0",
|
|
40
|
+
"xo": "^0.16.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=0.10.0"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"index.js"
|
|
47
|
+
],
|
|
48
|
+
"homepage": "https://github.com/sindresorhus/object-assign#readme",
|
|
49
|
+
"keywords": [
|
|
50
|
+
"object",
|
|
51
|
+
"assign",
|
|
52
|
+
"extend",
|
|
53
|
+
"properties",
|
|
54
|
+
"es2015",
|
|
55
|
+
"ecmascript",
|
|
56
|
+
"harmony",
|
|
57
|
+
"ponyfill",
|
|
58
|
+
"prollyfill",
|
|
59
|
+
"polyfill",
|
|
60
|
+
"shim",
|
|
61
|
+
"browser"
|
|
62
|
+
],
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"name": "object-assign",
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/sindresorhus/object-assign.git"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"bench": "matcha bench.js",
|
|
71
|
+
"test": "xo && ava"
|
|
72
|
+
},
|
|
73
|
+
"version": "4.1.1"
|
|
74
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# object-assign [](https://travis-ci.org/sindresorhus/object-assign)
|
|
2
|
+
|
|
3
|
+
> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Use the built-in
|
|
7
|
+
|
|
8
|
+
Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
|
|
9
|
+
support `Object.assign()` :tada:. If you target only those environments, then by all
|
|
10
|
+
means, use `Object.assign()` instead of this package.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
$ npm install --save object-assign
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const objectAssign = require('object-assign');
|
|
24
|
+
|
|
25
|
+
objectAssign({foo: 0}, {bar: 1});
|
|
26
|
+
//=> {foo: 0, bar: 1}
|
|
27
|
+
|
|
28
|
+
// multiple sources
|
|
29
|
+
objectAssign({foo: 0}, {bar: 1}, {baz: 2});
|
|
30
|
+
//=> {foo: 0, bar: 1, baz: 2}
|
|
31
|
+
|
|
32
|
+
// overwrites equal keys
|
|
33
|
+
objectAssign({foo: 0}, {foo: 1}, {foo: 2});
|
|
34
|
+
//=> {foo: 2}
|
|
35
|
+
|
|
36
|
+
// ignores null and undefined sources
|
|
37
|
+
objectAssign({foo: 0}, null, {bar: 1}, undefined);
|
|
38
|
+
//=> {foo: 0, bar: 1}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## API
|
|
43
|
+
|
|
44
|
+
### objectAssign(target, [source, ...])
|
|
45
|
+
|
|
46
|
+
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Resources
|
|
50
|
+
|
|
51
|
+
- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## Related
|
|
55
|
+
|
|
56
|
+
- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -19,7 +19,9 @@ const processOk = function (process) {
|
|
|
19
19
|
// some kind of non-node environment, just no-op
|
|
20
20
|
/* istanbul ignore if */
|
|
21
21
|
if (!processOk(process)) {
|
|
22
|
-
module.exports = function () {
|
|
22
|
+
module.exports = function () {
|
|
23
|
+
return function () {}
|
|
24
|
+
}
|
|
23
25
|
} else {
|
|
24
26
|
var assert = require('assert')
|
|
25
27
|
var signals = require('./signals.js')
|
|
@@ -52,7 +54,7 @@ if (!processOk(process)) {
|
|
|
52
54
|
module.exports = function (cb, opts) {
|
|
53
55
|
/* istanbul ignore if */
|
|
54
56
|
if (!processOk(global.process)) {
|
|
55
|
-
return
|
|
57
|
+
return function () {}
|
|
56
58
|
}
|
|
57
59
|
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
|
|
58
60
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "signal-exit@^3.0.0",
|
|
3
|
-
"_id": "signal-exit@3.0.
|
|
3
|
+
"_id": "signal-exit@3.0.7",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
|
6
6
|
"_location": "/signal-exit",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"_requiredBy": [
|
|
19
19
|
"/gauge"
|
|
20
20
|
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.
|
|
22
|
-
"_shasum": "
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
|
22
|
+
"_shasum": "a9a1767f8af84155114eaabd73f99273c8f59ad9",
|
|
23
23
|
"_spec": "signal-exit@^3.0.0",
|
|
24
24
|
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/gauge",
|
|
25
25
|
"author": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"snap": "tap",
|
|
63
63
|
"test": "tap"
|
|
64
64
|
},
|
|
65
|
-
"version": "3.0.
|
|
65
|
+
"version": "3.0.7"
|
|
66
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muhammara",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Create, read and modify PDF files and streams. A drop in replacement for hummujs PDF library",
|
|
5
5
|
"homepage": "https://github.com/julianhille/Muhammarajs",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -80,6 +80,7 @@ InputDCTDecodeStream.cpp
|
|
|
80
80
|
InputFile.cpp
|
|
81
81
|
InputFileStream.cpp
|
|
82
82
|
InputFlateDecodeStream.cpp
|
|
83
|
+
InputLZWDecodeStream.cpp
|
|
83
84
|
InputLimitedStream.cpp
|
|
84
85
|
InputRC4XcodeStream.cpp
|
|
85
86
|
InputPFBDecodeStream.cpp
|
|
@@ -206,6 +207,7 @@ CIDFontWriter.h
|
|
|
206
207
|
CMYKRGBColor.h
|
|
207
208
|
ContainerIterator.h
|
|
208
209
|
DecryptionHelper.h
|
|
210
|
+
Deletable.h
|
|
209
211
|
DescendentFontWriter.h
|
|
210
212
|
DictionaryContext.h
|
|
211
213
|
DictOperand.h
|
|
@@ -233,6 +235,7 @@ IByteReaderWithPosition.h
|
|
|
233
235
|
IByteWriter.h
|
|
234
236
|
IByteWriterWithPosition.h
|
|
235
237
|
IContentContextListener.h
|
|
238
|
+
IDeletable.h
|
|
236
239
|
IDescendentFontWriter.h
|
|
237
240
|
IDocumentContextExtender.h
|
|
238
241
|
IFontDescriptorHelper.h
|
|
@@ -251,6 +254,7 @@ InputDCTDecodeStream.h
|
|
|
251
254
|
InputFile.h
|
|
252
255
|
InputFileStream.h
|
|
253
256
|
InputFlateDecodeStream.h
|
|
257
|
+
InputLZWDecodeStream.h
|
|
254
258
|
InputLimitedStream.h
|
|
255
259
|
InputRC4XcodeStream.h
|
|
256
260
|
InputPFBDecodeStream.h
|
|
@@ -553,6 +557,8 @@ InputFileStream.cpp
|
|
|
553
557
|
InputFileStream.h
|
|
554
558
|
InputFlateDecodeStream.cpp
|
|
555
559
|
InputFlateDecodeStream.h
|
|
560
|
+
InputLZWDecodeStream.cpp
|
|
561
|
+
InputLZWDecodeStream.h
|
|
556
562
|
InputLimitedStream.cpp
|
|
557
563
|
InputLimitedStream.h
|
|
558
564
|
InputRC4XcodeStream.cpp
|
|
@@ -636,6 +642,8 @@ UppercaseSequance.h
|
|
|
636
642
|
)
|
|
637
643
|
|
|
638
644
|
source_group("PDF Embedding\\Parsed Objects" FILES
|
|
645
|
+
Deletable.h
|
|
646
|
+
IDeletable.h
|
|
639
647
|
PDFArray.cpp
|
|
640
648
|
PDFArray.h
|
|
641
649
|
PDFBoolean.cpp
|
|
@@ -36,6 +36,7 @@ limitations under the License.
|
|
|
36
36
|
#include "InputRC4XcodeStream.h"
|
|
37
37
|
#include "InputAESDecodeStream.h"
|
|
38
38
|
#include "Trace.h"
|
|
39
|
+
#include "Deletable.h"
|
|
39
40
|
#include <memory>
|
|
40
41
|
|
|
41
42
|
using namespace std;
|
|
@@ -333,9 +334,9 @@ IByteReader* DecryptionHelper::CreateDefaultDecryptionFilterForStream(PDFStreamI
|
|
|
333
334
|
if (!IsEncrypted() || !CanDecryptDocument() || HasCryptFilterDefinition(mParser, inStream) || !mXcryptStreams)
|
|
334
335
|
return NULL;
|
|
335
336
|
|
|
336
|
-
|
|
337
|
+
IDeletable* savedEcnryptionKey = inStream->GetMetadata(scEcnryptionKeyMetadataKey);
|
|
337
338
|
if (savedEcnryptionKey) {
|
|
338
|
-
return CreateDecryptionReader(inToWrapStream, *((ByteList
|
|
339
|
+
return CreateDecryptionReader(inToWrapStream, *(((Deletable<ByteList>*)savedEcnryptionKey)->GetPtr()), mXcryptStreams->IsUsingAES());
|
|
339
340
|
}
|
|
340
341
|
else
|
|
341
342
|
return NULL;
|
|
@@ -346,7 +347,7 @@ IByteReader* DecryptionHelper::CreateDecryptionFilterForStream(PDFStreamInput*
|
|
|
346
347
|
if (!IsEncrypted() || !CanDecryptDocument())
|
|
347
348
|
return inToWrapStream;
|
|
348
349
|
|
|
349
|
-
|
|
350
|
+
IDeletable* savedEcnryptionKey = inStream->GetMetadata(scEcnryptionKeyMetadataKey);
|
|
350
351
|
if (!savedEcnryptionKey) {
|
|
351
352
|
// sign for no encryption here
|
|
352
353
|
return inToWrapStream;
|
|
@@ -354,7 +355,7 @@ IByteReader* DecryptionHelper::CreateDecryptionFilterForStream(PDFStreamInput*
|
|
|
354
355
|
XCryptionCommon* xcryption = GetFilterForName(mXcrypts, inCryptName);
|
|
355
356
|
|
|
356
357
|
if (xcryption && savedEcnryptionKey) {
|
|
357
|
-
return CreateDecryptionReader(inToWrapStream, *((ByteList
|
|
358
|
+
return CreateDecryptionReader(inToWrapStream, *(((Deletable<ByteList>*)savedEcnryptionKey)->GetPtr()), xcryption->IsUsingAES());
|
|
358
359
|
}
|
|
359
360
|
else
|
|
360
361
|
return inToWrapStream;
|
|
@@ -369,12 +370,13 @@ std::string DecryptionHelper::DecryptString(const std::string& inStringToDecrypt
|
|
|
369
370
|
if (!IsDecrypting() || !mXcryptStrings)
|
|
370
371
|
return inStringToDecrypt;
|
|
371
372
|
|
|
372
|
-
|
|
373
|
-
if (
|
|
373
|
+
IByteReader* decryptStream = CreateDecryptionReader(new InputStringStream(inStringToDecrypt), mXcryptStrings->GetCurrentObjectKey(), mXcryptStrings->IsUsingAES());
|
|
374
|
+
if (decryptStream) {
|
|
374
375
|
OutputStringBufferStream outputStream;
|
|
375
376
|
OutputStreamTraits traits(&outputStream);
|
|
376
|
-
traits.CopyToOutputStream(
|
|
377
|
+
traits.CopyToOutputStream(decryptStream);
|
|
377
378
|
|
|
379
|
+
delete decryptStream;
|
|
378
380
|
return outputStream.ToString();
|
|
379
381
|
}
|
|
380
382
|
else
|
|
@@ -453,7 +455,7 @@ void DecryptionHelper::OnObjectEnd(PDFObject* inObject) {
|
|
|
453
455
|
XCryptionCommon* streamCryptFilter = GetCryptForStream((PDFStreamInput*)inObject);
|
|
454
456
|
if (streamCryptFilter) {
|
|
455
457
|
ByteList* savedKey = new ByteList(streamCryptFilter->GetCurrentObjectKey());
|
|
456
|
-
inObject->SetMetadata(scEcnryptionKeyMetadataKey, savedKey);
|
|
458
|
+
inObject->SetMetadata(scEcnryptionKeyMetadataKey,new Deletable<ByteList>(savedKey));
|
|
457
459
|
}
|
|
458
460
|
}
|
|
459
461
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#include "IDeletable.h"
|
|
2
|
+
|
|
3
|
+
template <typename T>
|
|
4
|
+
class Deletable: public IDeletable {
|
|
5
|
+
public:
|
|
6
|
+
Deletable(T* inData);
|
|
7
|
+
virtual ~Deletable();
|
|
8
|
+
|
|
9
|
+
virtual void DeleteMe();
|
|
10
|
+
|
|
11
|
+
T* operator->();
|
|
12
|
+
|
|
13
|
+
T* GetPtr();
|
|
14
|
+
private:
|
|
15
|
+
T* mValue;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
template <typename T>
|
|
19
|
+
Deletable<T>::Deletable(T* inValue)
|
|
20
|
+
{
|
|
21
|
+
mValue = inValue;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
template <typename T>
|
|
25
|
+
Deletable<T>::~Deletable()
|
|
26
|
+
{
|
|
27
|
+
delete mValue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
template <typename T>
|
|
31
|
+
void Deletable<T>::DeleteMe()
|
|
32
|
+
{
|
|
33
|
+
delete this;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
template <typename T>
|
|
37
|
+
T* Deletable<T>::operator->()
|
|
38
|
+
{
|
|
39
|
+
return mValue;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
template <typename T>
|
|
43
|
+
T* Deletable<T>::GetPtr()
|
|
44
|
+
{
|
|
45
|
+
return mValue;
|
|
46
|
+
}
|
|
@@ -283,9 +283,9 @@ namespace PDFHummus
|
|
|
283
283
|
|
|
284
284
|
// some public image info services, for users of hummus
|
|
285
285
|
DoubleAndDoublePair GetImageDimensions(const std::string& inImageFile,unsigned long inImageIndex = 0, const PDFParsingOptions& inOptions = PDFParsingOptions::DefaultPDFParsingOptions());
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
286
|
+
DoubleAndDoublePair GetImageDimensions(IByteReaderWithPosition* inImageStream,unsigned long inImageIndex = 0, const PDFParsingOptions& inOptions = PDFParsingOptions::DefaultPDFParsingOptions());
|
|
287
|
+
EHummusImageType GetImageType(const std::string& inImageFile,unsigned long inImageIndex);
|
|
288
|
+
EHummusImageType GetImageType(IByteReaderWithPosition* inImageStream,unsigned long inImageIndex);
|
|
289
289
|
unsigned long GetImagePagesCount(const std::string& inImageFile, const PDFParsingOptions& inOptions = PDFParsingOptions::DefaultPDFParsingOptions());
|
|
290
290
|
|
|
291
291
|
|