muhammara 2.1.0 → 2.4.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 +33 -1
- package/README.md +2 -2
- package/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md +7 -0
- package/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js +1 -1
- package/node_modules/@mapbox/node-pre-gyp/package.json +11 -12
- package/node_modules/ansi-regex/package.json +1 -2
- package/node_modules/brace-expansion/package.json +2 -1
- package/node_modules/concat-map/package.json +1 -1
- package/node_modules/console-control-strings/package.json +1 -1
- package/node_modules/debug/README.md +3 -0
- package/node_modules/debug/package.json +5 -5
- package/node_modules/debug/src/common.js +1 -1
- package/node_modules/delegates/package.json +1 -1
- package/node_modules/detect-libc/README.md +124 -42
- package/node_modules/detect-libc/index.d.ts +11 -0
- package/node_modules/detect-libc/lib/detect-libc.js +166 -80
- package/node_modules/detect-libc/lib/process.js +16 -0
- package/node_modules/detect-libc/package.json +20 -19
- package/node_modules/fs.realpath/package.json +1 -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/glob/common.js +2 -0
- package/node_modules/glob/glob.js +4 -1
- package/node_modules/glob/package.json +9 -6
- package/node_modules/glob/sync.js +6 -3
- package/node_modules/has-unicode/package.json +1 -1
- package/node_modules/https-proxy-agent/dist/agent.js +2 -5
- package/node_modules/https-proxy-agent/dist/agent.js.map +1 -1
- package/node_modules/https-proxy-agent/package.json +5 -5
- package/node_modules/inflight/package.json +1 -1
- package/node_modules/minimatch/README.md +22 -1
- package/node_modules/minimatch/minimatch.js +93 -69
- package/node_modules/minimatch/package.json +16 -15
- 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 +18 -10
- 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/once/package.json +1 -1
- package/node_modules/path-is-absolute/package.json +1 -1
- package/node_modules/semver/README.md +3 -1
- package/node_modules/semver/bin/semver.js +19 -9
- package/node_modules/semver/classes/comparator.js +3 -2
- package/node_modules/semver/classes/index.js +1 -1
- package/node_modules/semver/classes/range.js +31 -22
- package/node_modules/semver/classes/semver.js +1 -1
- package/node_modules/semver/functions/cmp.js +8 -4
- package/node_modules/semver/functions/coerce.js +3 -2
- package/node_modules/semver/functions/inc.js +4 -1
- package/node_modules/semver/functions/parse.js +1 -1
- package/node_modules/semver/internal/constants.js +2 -2
- package/node_modules/semver/internal/identifiers.js +1 -1
- package/node_modules/semver/internal/parse-options.js +3 -3
- package/node_modules/semver/internal/re.js +3 -3
- package/node_modules/semver/package.json +46 -13
- package/node_modules/semver/ranges/min-version.js +2 -1
- package/node_modules/semver/ranges/outside.js +1 -1
- package/node_modules/semver/ranges/simplify.js +15 -12
- package/node_modules/semver/ranges/subset.js +53 -31
- package/node_modules/set-blocking/package.json +1 -1
- 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/DocumentCopyingContextDriver.cpp +6 -6
- 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/detect-libc/.npmignore +0 -7
- package/node_modules/detect-libc/bin/detect-libc.js +0 -18
- 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/node_modules/semver/CHANGELOG.md +0 -111
- 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
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.4.0] - 2022-06-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Electron 18.1, 18.2, 18.3
|
|
15
|
+
- Electron 19.0
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Update npm dist url to the new url for electron builds
|
|
20
|
+
|
|
21
|
+
## [2.3.0] - 2022-05-04
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Builds for node and electron with arm64 on darwin (Apple M1)
|
|
26
|
+
- Add electron 18
|
|
27
|
+
|
|
28
|
+
## [2.2.0] - 2022-03-05
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Update PDFWriter dependency to the newest available versoin
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- Electron version: 17.0, 17.1
|
|
37
|
+
- NodeJs 17.6.0
|
|
38
|
+
|
|
10
39
|
## [2.1.0] - 2021-12-03
|
|
11
40
|
|
|
12
41
|
### Added
|
|
@@ -195,7 +224,10 @@ with the following changes.
|
|
|
195
224
|
|
|
196
225
|
* Initial release
|
|
197
226
|
|
|
198
|
-
[Unreleased]: https://github.com/julianhille/MuhammaraJS/compare/2.
|
|
227
|
+
[Unreleased]: https://github.com/julianhille/MuhammaraJS/compare/2.4.0...HEAD
|
|
228
|
+
[2.4.0]: https://github.com/julianhille/MuhammaraJS/compare/2.3.0...2.4.0
|
|
229
|
+
[2.3.0]: https://github.com/julianhille/MuhammaraJS/compare/2.2.0...2.3.0
|
|
230
|
+
[2.2.0]: https://github.com/julianhille/MuhammaraJS/compare/2.1.0...2.2.0
|
|
199
231
|
[2.1.0]: https://github.com/julianhille/MuhammaraJS/compare/2.0.0...2.1.0
|
|
200
232
|
[2.0.0]: https://github.com/julianhille/MuhammaraJS/compare/1.10.0...2.0.0
|
|
201
233
|
[1.10.0]: https://github.com/julianhille/MuhammaraJS/compare/1.9.0...1.10.0
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ electron versions because we needed to upgrade node-pre-gyp.
|
|
|
25
25
|
# Installation
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
npm install
|
|
28
|
+
npm install muhammara
|
|
29
29
|
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -34,7 +34,7 @@ npm install
|
|
|
34
34
|
Replace:
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
-
let hummus = require('
|
|
37
|
+
let hummus = require('hummus')
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
With:
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# node-pre-gyp changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.9
|
|
4
|
+
- Upgraded node-fetch to 2.6.7 to address [CVE-2022-0235](https://www.cve.org/CVERecord?id=CVE-2022-0235)
|
|
5
|
+
- Upgraded detect-libc to 2.0.0 to use non-blocking NodeJS(>=12) Report API
|
|
6
|
+
|
|
7
|
+
## 1.0.8
|
|
8
|
+
- Downgraded npmlog to maintain node v10 and v8 support (https://github.com/mapbox/node-pre-gyp/pull/624)
|
|
9
|
+
|
|
3
10
|
## 1.0.7
|
|
4
11
|
- Upgraded nyc and npmlog to address https://github.com/advisories/GHSA-93q8-gq69-wqmw
|
|
5
12
|
|
|
@@ -302,7 +302,7 @@ module.exports.evaluate = function(package_json, options, napi_build_version) {
|
|
|
302
302
|
target_platform: options.target_platform || process.platform,
|
|
303
303
|
arch: options.target_arch || process.arch,
|
|
304
304
|
target_arch: options.target_arch || process.arch,
|
|
305
|
-
libc: options.target_libc || detect_libc.
|
|
305
|
+
libc: options.target_libc || detect_libc.familySync() || 'unknown',
|
|
306
306
|
module_main: package_json.main,
|
|
307
307
|
toolset: options.toolset || '', // address https://github.com/mapbox/node-pre-gyp/issues/119
|
|
308
308
|
bucket: package_json.binary.bucket,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@mapbox/node-pre-gyp@^1.0.5",
|
|
3
|
-
"_id": "@mapbox/node-pre-gyp@1.0.
|
|
3
|
+
"_id": "@mapbox/node-pre-gyp@1.0.9",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==",
|
|
6
6
|
"_location": "/@mapbox/node-pre-gyp",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"_requiredBy": [
|
|
20
20
|
"/"
|
|
21
21
|
],
|
|
22
|
-
"_resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.
|
|
23
|
-
"_shasum": "
|
|
22
|
+
"_resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.9.tgz",
|
|
23
|
+
"_shasum": "09a8781a3a036151cdebbe8719d6f8b25d4058bc",
|
|
24
24
|
"_spec": "@mapbox/node-pre-gyp@^1.0.5",
|
|
25
25
|
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS",
|
|
26
26
|
"author": {
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"detect-libc": "^
|
|
38
|
+
"detect-libc": "^2.0.0",
|
|
39
39
|
"https-proxy-agent": "^5.0.0",
|
|
40
40
|
"make-dir": "^3.1.0",
|
|
41
|
-
"node-fetch": "^2.6.
|
|
41
|
+
"node-fetch": "^2.6.7",
|
|
42
42
|
"nopt": "^5.0.0",
|
|
43
|
-
"npmlog": "^
|
|
43
|
+
"npmlog": "^5.0.1",
|
|
44
44
|
"rimraf": "^3.0.2",
|
|
45
45
|
"semver": "^7.3.5",
|
|
46
46
|
"tar": "^6.1.11"
|
|
@@ -50,16 +50,15 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@mapbox/cloudfriend": "^5.1.0",
|
|
52
52
|
"@mapbox/eslint-config-mapbox": "^3.0.0",
|
|
53
|
-
"
|
|
54
|
-
"aws-sdk": "^2.1012.0",
|
|
53
|
+
"aws-sdk": "^2.1087.0",
|
|
55
54
|
"codecov": "^3.8.3",
|
|
56
55
|
"eslint": "^7.32.0",
|
|
57
56
|
"eslint-plugin-node": "^11.1.0",
|
|
58
57
|
"mock-aws-s3": "^4.0.2",
|
|
59
58
|
"nock": "^12.0.3",
|
|
60
|
-
"node-addon-api": "^4.
|
|
59
|
+
"node-addon-api": "^4.3.0",
|
|
61
60
|
"nyc": "^15.1.0",
|
|
62
|
-
"tape": "^5.
|
|
61
|
+
"tape": "^5.5.2",
|
|
63
62
|
"tar-fs": "^2.1.1"
|
|
64
63
|
},
|
|
65
64
|
"homepage": "https://github.com/mapbox/node-pre-gyp#readme",
|
|
@@ -94,5 +93,5 @@
|
|
|
94
93
|
"update-crosswalk": "node scripts/abi_crosswalk.js",
|
|
95
94
|
"upload-coverage": "nyc report --reporter json && codecov --clear --flags=unit --file=./coverage/coverage-final.json"
|
|
96
95
|
},
|
|
97
|
-
"version": "1.0.
|
|
96
|
+
"version": "1.0.9"
|
|
98
97
|
}
|
|
@@ -16,13 +16,12 @@
|
|
|
16
16
|
"fetchSpec": "^5.0.1"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
|
-
"/gauge",
|
|
20
19
|
"/strip-ansi"
|
|
21
20
|
],
|
|
22
21
|
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
|
23
22
|
"_shasum": "082cb2c89c9fe8659a311a53bd6a4dc5301db304",
|
|
24
23
|
"_spec": "ansi-regex@^5.0.1",
|
|
25
|
-
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/
|
|
24
|
+
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/strip-ansi",
|
|
26
25
|
"author": {
|
|
27
26
|
"name": "Sindre Sorhus",
|
|
28
27
|
"email": "sindresorhus@gmail.com",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"fetchSpec": "^1.1.7"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
|
-
"/minimatch"
|
|
19
|
+
"/minimatch",
|
|
20
|
+
"/mocha/minimatch"
|
|
20
21
|
],
|
|
21
22
|
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
|
22
23
|
"_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_from": "concat-map@0.0.1",
|
|
3
3
|
"_id": "concat-map@0.0.1",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
|
6
6
|
"_location": "/concat-map",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_from": "console-control-strings@^1.1.0",
|
|
3
3
|
"_id": "console-control-strings@1.1.0",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
|
|
6
6
|
"_location": "/console-control-strings",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -241,6 +241,9 @@ setInterval(function(){
|
|
|
241
241
|
}, 1200);
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
+
In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
|
|
245
|
+
|
|
246
|
+
<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
|
|
244
247
|
|
|
245
248
|
## Output streams
|
|
246
249
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "debug@4",
|
|
3
|
-
"_id": "debug@4.3.
|
|
3
|
+
"_id": "debug@4.3.4",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
|
6
6
|
"_location": "/debug",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"/agent-base",
|
|
20
20
|
"/https-proxy-agent"
|
|
21
21
|
],
|
|
22
|
-
"_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.
|
|
23
|
-
"_shasum": "
|
|
22
|
+
"_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
|
23
|
+
"_shasum": "1319f6579357f2338d3337d2cdd4914bb5dcc865",
|
|
24
24
|
"_spec": "debug@4",
|
|
25
25
|
"_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/https-proxy-agent",
|
|
26
26
|
"author": {
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"test:coverage": "cat ./coverage/lcov.info | coveralls",
|
|
99
99
|
"test:node": "istanbul cover _mocha -- test.js"
|
|
100
100
|
},
|
|
101
|
-
"version": "4.3.
|
|
101
|
+
"version": "4.3.4"
|
|
102
102
|
}
|
|
@@ -179,7 +179,7 @@ function setup(env) {
|
|
|
179
179
|
namespaces = split[i].replace(/\*/g, '.*?');
|
|
180
180
|
|
|
181
181
|
if (namespaces[0] === '-') {
|
|
182
|
-
createDebug.skips.push(new RegExp('^' + namespaces.
|
|
182
|
+
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
183
183
|
} else {
|
|
184
184
|
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
185
185
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_from": "delegates@^1.0.0",
|
|
3
3
|
"_id": "delegates@1.0.0",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "
|
|
5
|
+
"_integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
|
|
6
6
|
"_location": "/delegates",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
# detect-libc
|
|
2
2
|
|
|
3
|
-
Node.js module to detect the C standard library (libc)
|
|
4
|
-
|
|
3
|
+
Node.js module to detect details of the C standard library (libc)
|
|
4
|
+
implementation provided by a given Linux system.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
[prebuild](https://www.npmjs.com/package/prebuild),
|
|
8
|
-
[prebuild-ci](https://www.npmjs.com/package/prebuild-ci) and
|
|
9
|
-
[prebuild-install](https://www.npmjs.com/package/prebuild-install),
|
|
10
|
-
therefore allowing build and provision of pre-compiled binaries
|
|
11
|
-
for musl-based Linux e.g. Alpine as well as glibc-based.
|
|
6
|
+
Currently supports detection of GNU glibc and MUSL libc.
|
|
12
7
|
|
|
13
|
-
|
|
8
|
+
Provides asychronous and synchronous functions for the
|
|
9
|
+
family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`).
|
|
10
|
+
|
|
11
|
+
For previous v1.x releases, please see the
|
|
12
|
+
[v1](https://github.com/lovell/detect-libc/tree/v1) branch.
|
|
14
13
|
|
|
15
14
|
## Install
|
|
16
15
|
|
|
@@ -18,54 +17,137 @@ Currently supports libc detection of `glibc` and `musl`.
|
|
|
18
17
|
npm install detect-libc
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
##
|
|
20
|
+
## API
|
|
21
|
+
|
|
22
|
+
### GLIBC
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
const GLIBC: string = 'glibc';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A String constant containing the value `glibc`.
|
|
29
|
+
|
|
30
|
+
### MUSL
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const MUSL: string = 'musl';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
A String constant containing the value `musl`.
|
|
37
|
+
|
|
38
|
+
### family
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
function family(): Promise<string | null>;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Resolves asychronously with:
|
|
22
45
|
|
|
23
|
-
|
|
46
|
+
* `glibc` or `musl` when the libc family can be determined
|
|
47
|
+
* `null` when the libc family cannot be determined
|
|
48
|
+
* `null` when run on a non-Linux platform
|
|
24
49
|
|
|
25
50
|
```js
|
|
26
|
-
const {
|
|
51
|
+
const { family, GLIBC, MUSL } = require('detect-libc');
|
|
52
|
+
|
|
53
|
+
switch (await family()) {
|
|
54
|
+
case GLIBC: ...
|
|
55
|
+
case MUSL: ...
|
|
56
|
+
case null: ...
|
|
57
|
+
}
|
|
27
58
|
```
|
|
28
59
|
|
|
29
|
-
|
|
30
|
-
* `MUSL` is a String containing the value "musl" for comparison with `family`.
|
|
31
|
-
* `family` is a String representing the system libc family.
|
|
32
|
-
* `version` is a String representing the system libc version number.
|
|
33
|
-
* `isNonGlibcLinux` is a Boolean representing whether the system is a non-glibc Linux, e.g. Alpine.
|
|
60
|
+
### familySync
|
|
34
61
|
|
|
35
|
-
|
|
62
|
+
```ts
|
|
63
|
+
function familySync(): string | null;
|
|
64
|
+
```
|
|
36
65
|
|
|
37
|
-
|
|
38
|
-
the child command will be run with the `LIBC` environment variable
|
|
39
|
-
set to the relevant value.
|
|
66
|
+
Synchronous version of `family()`.
|
|
40
67
|
|
|
41
|
-
|
|
68
|
+
```js
|
|
69
|
+
const { familySync, GLIBC, MUSL } = require('detect-libc');
|
|
42
70
|
|
|
43
|
-
|
|
71
|
+
switch (familySync()) {
|
|
72
|
+
case GLIBC: ...
|
|
73
|
+
case MUSL: ...
|
|
74
|
+
case null: ...
|
|
75
|
+
}
|
|
76
|
+
```
|
|
44
77
|
|
|
45
|
-
|
|
46
|
-
|
|
78
|
+
### version
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
function version(): Promise<string | null>;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Resolves asychronously with:
|
|
85
|
+
|
|
86
|
+
* The version when it can be determined
|
|
87
|
+
* `null` when the libc family cannot be determined
|
|
88
|
+
* `null` when run on a non-Linux platform
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
const { version } = require('detect-libc');
|
|
92
|
+
|
|
93
|
+
const v = await version();
|
|
94
|
+
if (v) {
|
|
95
|
+
const [major, minor, patch] = v.split('.');
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### versionSync
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
function versionSync(): string | null;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Synchronous version of `version()`.
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
const { versionSync } = require('detect-libc');
|
|
109
|
+
|
|
110
|
+
const v = versionSync();
|
|
111
|
+
if (v) {
|
|
112
|
+
const [major, minor, patch] = v.split('.');
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### isNonGlibcLinux
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
function isNonGlibcLinux(): Promise<boolean>;
|
|
47
120
|
```
|
|
48
121
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
122
|
+
Resolves asychronously with:
|
|
123
|
+
|
|
124
|
+
* `false` when the libc family is `glibc`
|
|
125
|
+
* `true` when the libc family is not `glibc`
|
|
126
|
+
* `false` when run on a non-Linux platform
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
const { isNonGlibcLinux } = require('detect-libc');
|
|
130
|
+
|
|
131
|
+
if (await isNonGlibcLinux()) { ... }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### isNonGlibcLinuxSync
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
function isNonGlibcLinuxSync(): boolean;
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Synchronous version of `isNonGlibcLinux()`.
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
const { isNonGlibcLinuxSync } = require('detect-libc');
|
|
144
|
+
|
|
145
|
+
if (isNonGlibcLinuxSync()) { ... }
|
|
64
146
|
```
|
|
65
147
|
|
|
66
|
-
##
|
|
148
|
+
## Licensing
|
|
67
149
|
|
|
68
|
-
Copyright 2017 Lovell Fuller
|
|
150
|
+
Copyright 2017, 2022 Lovell Fuller
|
|
69
151
|
|
|
70
152
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
71
153
|
you may not use this file except in compliance with the License.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const GLIBC: 'glibc';
|
|
2
|
+
export const MUSL: 'musl';
|
|
3
|
+
|
|
4
|
+
export function family(): Promise<string | null>;
|
|
5
|
+
export function familySync(): string | null;
|
|
6
|
+
|
|
7
|
+
export function isNonGlibcLinux(): Promise<boolean>;
|
|
8
|
+
export function isNonGlibcLinuxSync(): boolean;
|
|
9
|
+
|
|
10
|
+
export function version(): Promise<string | null>;
|
|
11
|
+
export function versionSync(): string | null;
|