@min-pack/sharp-x86-64-v1 0.33.5
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/LICENSE +191 -0
- package/README.md +6 -0
- package/index.js +1 -0
- package/package.json +7 -0
- package/pkg/lib/channel.js +174 -0
- package/pkg/lib/colour.js +180 -0
- package/pkg/lib/composite.js +210 -0
- package/pkg/lib/constructor.js +452 -0
- package/pkg/lib/index.js +16 -0
- package/pkg/lib/input.js +658 -0
- package/pkg/lib/is.js +169 -0
- package/pkg/lib/libvips.js +203 -0
- package/pkg/lib/operation.js +958 -0
- package/pkg/lib/output.js +1587 -0
- package/pkg/lib/resize.js +587 -0
- package/pkg/lib/sharp.js +114 -0
- package/pkg/lib/utility.js +296 -0
- package/pkg/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/pkg/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.42 +0 -0
- package/pkg/node_modules/@img/sharp-libvips-linux-x64/package.json +42 -0
- package/pkg/node_modules/@img/sharp-libvips-linux-x64/versions.json +30 -0
- package/pkg/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/pkg/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.42 +0 -0
- package/pkg/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/pkg/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/pkg/node_modules/@img/sharp-linux-x64/LICENSE +191 -0
- package/pkg/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/pkg/node_modules/@img/sharp-linux-x64/package.json +46 -0
- package/pkg/node_modules/@img/sharp-linuxmusl-x64/LICENSE +191 -0
- package/pkg/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/pkg/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/pkg/node_modules/color/LICENSE +21 -0
- package/pkg/node_modules/color/index.js +496 -0
- package/pkg/node_modules/color/package.json +47 -0
- package/pkg/node_modules/color-convert/LICENSE +21 -0
- package/pkg/node_modules/color-convert/conversions.js +839 -0
- package/pkg/node_modules/color-convert/index.js +81 -0
- package/pkg/node_modules/color-convert/package.json +48 -0
- package/pkg/node_modules/color-convert/route.js +97 -0
- package/pkg/node_modules/color-name/LICENSE +8 -0
- package/pkg/node_modules/color-name/index.js +152 -0
- package/pkg/node_modules/color-name/package.json +28 -0
- package/pkg/node_modules/color-string/LICENSE +21 -0
- package/pkg/node_modules/color-string/index.js +242 -0
- package/pkg/node_modules/color-string/package.json +39 -0
- package/pkg/node_modules/detect-libc/LICENSE +201 -0
- package/pkg/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/pkg/node_modules/detect-libc/lib/elf.js +39 -0
- package/pkg/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/pkg/node_modules/detect-libc/lib/process.js +24 -0
- package/pkg/node_modules/detect-libc/package.json +44 -0
- package/pkg/node_modules/is-arrayish/LICENSE +21 -0
- package/pkg/node_modules/is-arrayish/index.js +9 -0
- package/pkg/node_modules/is-arrayish/package.json +45 -0
- package/pkg/node_modules/semver/LICENSE +15 -0
- package/pkg/node_modules/semver/bin/semver.js +191 -0
- package/pkg/node_modules/semver/classes/comparator.js +143 -0
- package/pkg/node_modules/semver/classes/index.js +7 -0
- package/pkg/node_modules/semver/classes/range.js +557 -0
- package/pkg/node_modules/semver/classes/semver.js +333 -0
- package/pkg/node_modules/semver/functions/clean.js +8 -0
- package/pkg/node_modules/semver/functions/cmp.js +54 -0
- package/pkg/node_modules/semver/functions/coerce.js +62 -0
- package/pkg/node_modules/semver/functions/compare-build.js +9 -0
- package/pkg/node_modules/semver/functions/compare-loose.js +5 -0
- package/pkg/node_modules/semver/functions/compare.js +7 -0
- package/pkg/node_modules/semver/functions/diff.js +60 -0
- package/pkg/node_modules/semver/functions/eq.js +5 -0
- package/pkg/node_modules/semver/functions/gt.js +5 -0
- package/pkg/node_modules/semver/functions/gte.js +5 -0
- package/pkg/node_modules/semver/functions/inc.js +21 -0
- package/pkg/node_modules/semver/functions/lt.js +5 -0
- package/pkg/node_modules/semver/functions/lte.js +5 -0
- package/pkg/node_modules/semver/functions/major.js +5 -0
- package/pkg/node_modules/semver/functions/minor.js +5 -0
- package/pkg/node_modules/semver/functions/neq.js +5 -0
- package/pkg/node_modules/semver/functions/parse.js +18 -0
- package/pkg/node_modules/semver/functions/patch.js +5 -0
- package/pkg/node_modules/semver/functions/prerelease.js +8 -0
- package/pkg/node_modules/semver/functions/rcompare.js +5 -0
- package/pkg/node_modules/semver/functions/rsort.js +5 -0
- package/pkg/node_modules/semver/functions/satisfies.js +12 -0
- package/pkg/node_modules/semver/functions/sort.js +5 -0
- package/pkg/node_modules/semver/functions/valid.js +8 -0
- package/pkg/node_modules/semver/index.js +91 -0
- package/pkg/node_modules/semver/internal/constants.js +37 -0
- package/pkg/node_modules/semver/internal/debug.js +11 -0
- package/pkg/node_modules/semver/internal/identifiers.js +29 -0
- package/pkg/node_modules/semver/internal/lrucache.js +42 -0
- package/pkg/node_modules/semver/internal/parse-options.js +17 -0
- package/pkg/node_modules/semver/internal/re.js +223 -0
- package/pkg/node_modules/semver/package.json +78 -0
- package/pkg/node_modules/semver/preload.js +4 -0
- package/pkg/node_modules/semver/range.bnf +16 -0
- package/pkg/node_modules/semver/ranges/gtr.js +6 -0
- package/pkg/node_modules/semver/ranges/intersects.js +9 -0
- package/pkg/node_modules/semver/ranges/ltr.js +6 -0
- package/pkg/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/pkg/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/pkg/node_modules/semver/ranges/min-version.js +63 -0
- package/pkg/node_modules/semver/ranges/outside.js +82 -0
- package/pkg/node_modules/semver/ranges/simplify.js +49 -0
- package/pkg/node_modules/semver/ranges/subset.js +249 -0
- package/pkg/node_modules/semver/ranges/to-comparators.js +10 -0
- package/pkg/node_modules/semver/ranges/valid.js +13 -0
- package/pkg/node_modules/simple-swizzle/LICENSE +21 -0
- package/pkg/node_modules/simple-swizzle/index.js +29 -0
- package/pkg/node_modules/simple-swizzle/package.json +36 -0
- package/pkg/package.json +24 -0
package/pkg/lib/is.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// Copyright 2013 Lovell Fuller and others.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Is this value defined and not null?
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
10
|
+
const defined = function (val) {
|
|
11
|
+
return typeof val !== 'undefined' && val !== null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Is this value an object?
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
const object = function (val) {
|
|
19
|
+
return typeof val === 'object';
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Is this value a plain object?
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
const plainObject = function (val) {
|
|
27
|
+
return Object.prototype.toString.call(val) === '[object Object]';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Is this value a function?
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
const fn = function (val) {
|
|
35
|
+
return typeof val === 'function';
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Is this value a boolean?
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
const bool = function (val) {
|
|
43
|
+
return typeof val === 'boolean';
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Is this value a Buffer object?
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
const buffer = function (val) {
|
|
51
|
+
return val instanceof Buffer;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
const typedArray = function (val) {
|
|
59
|
+
if (defined(val)) {
|
|
60
|
+
switch (val.constructor) {
|
|
61
|
+
case Uint8Array:
|
|
62
|
+
case Uint8ClampedArray:
|
|
63
|
+
case Int8Array:
|
|
64
|
+
case Uint16Array:
|
|
65
|
+
case Int16Array:
|
|
66
|
+
case Uint32Array:
|
|
67
|
+
case Int32Array:
|
|
68
|
+
case Float32Array:
|
|
69
|
+
case Float64Array:
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return false;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Is this value an ArrayBuffer object?
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
const arrayBuffer = function (val) {
|
|
82
|
+
return val instanceof ArrayBuffer;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Is this value a non-empty string?
|
|
87
|
+
* @private
|
|
88
|
+
*/
|
|
89
|
+
const string = function (val) {
|
|
90
|
+
return typeof val === 'string' && val.length > 0;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Is this value a real number?
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
const number = function (val) {
|
|
98
|
+
return typeof val === 'number' && !Number.isNaN(val);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Is this value an integer?
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
const integer = function (val) {
|
|
106
|
+
return Number.isInteger(val);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Is this value within an inclusive given range?
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
const inRange = function (val, min, max) {
|
|
114
|
+
return val >= min && val <= max;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Is this value within the elements of an array?
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
const inArray = function (val, list) {
|
|
122
|
+
return list.includes(val);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Create an Error with a message relating to an invalid parameter.
|
|
127
|
+
*
|
|
128
|
+
* @param {string} name - parameter name.
|
|
129
|
+
* @param {string} expected - description of the type/value/range expected.
|
|
130
|
+
* @param {*} actual - the value received.
|
|
131
|
+
* @returns {Error} Containing the formatted message.
|
|
132
|
+
* @private
|
|
133
|
+
*/
|
|
134
|
+
const invalidParameterError = function (name, expected, actual) {
|
|
135
|
+
return new Error(
|
|
136
|
+
`Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Ensures an Error from C++ contains a JS stack.
|
|
142
|
+
*
|
|
143
|
+
* @param {Error} native - Error with message from C++.
|
|
144
|
+
* @param {Error} context - Error with stack from JS.
|
|
145
|
+
* @returns {Error} Error with message and stack.
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
148
|
+
const nativeError = function (native, context) {
|
|
149
|
+
context.message = native.message;
|
|
150
|
+
return context;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
module.exports = {
|
|
154
|
+
defined,
|
|
155
|
+
object,
|
|
156
|
+
plainObject,
|
|
157
|
+
fn,
|
|
158
|
+
bool,
|
|
159
|
+
buffer,
|
|
160
|
+
typedArray,
|
|
161
|
+
arrayBuffer,
|
|
162
|
+
string,
|
|
163
|
+
number,
|
|
164
|
+
integer,
|
|
165
|
+
inRange,
|
|
166
|
+
inArray,
|
|
167
|
+
invalidParameterError,
|
|
168
|
+
nativeError
|
|
169
|
+
};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// Copyright 2013 Lovell Fuller and others.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const { spawnSync } = require('node:child_process');
|
|
7
|
+
const { createHash } = require('node:crypto');
|
|
8
|
+
const semverCoerce = require('semver/functions/coerce');
|
|
9
|
+
const semverGreaterThanOrEqualTo = require('semver/functions/gte');
|
|
10
|
+
const semverSatisfies = require('semver/functions/satisfies');
|
|
11
|
+
const detectLibc = require('detect-libc');
|
|
12
|
+
|
|
13
|
+
const { config, engines, optionalDependencies } = require('../package.json');
|
|
14
|
+
|
|
15
|
+
const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || /* istanbul ignore next */
|
|
16
|
+
config.libvips;
|
|
17
|
+
const minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
|
|
18
|
+
|
|
19
|
+
const prebuiltPlatforms = [
|
|
20
|
+
'darwin-arm64', 'darwin-x64',
|
|
21
|
+
'linux-arm', 'linux-arm64', 'linux-s390x', 'linux-x64',
|
|
22
|
+
'linuxmusl-arm64', 'linuxmusl-x64',
|
|
23
|
+
'win32-ia32', 'win32-x64'
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const spawnSyncOptions = {
|
|
27
|
+
encoding: 'utf8',
|
|
28
|
+
shell: true
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const log = (item) => {
|
|
32
|
+
if (item instanceof Error) {
|
|
33
|
+
console.error(`sharp: Installation error: ${item.message}`);
|
|
34
|
+
} else {
|
|
35
|
+
console.log(`sharp: ${item}`);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/* istanbul ignore next */
|
|
40
|
+
const runtimeLibc = () => detectLibc.isNonGlibcLinuxSync() ? detectLibc.familySync() : '';
|
|
41
|
+
|
|
42
|
+
const runtimePlatformArch = () => `${process.platform}${runtimeLibc()}-${process.arch}`;
|
|
43
|
+
|
|
44
|
+
/* istanbul ignore next */
|
|
45
|
+
const buildPlatformArch = () => {
|
|
46
|
+
if (isEmscripten()) {
|
|
47
|
+
return 'wasm32';
|
|
48
|
+
}
|
|
49
|
+
/* eslint camelcase: ["error", { allow: ["^npm_config_"] }] */
|
|
50
|
+
const { npm_config_arch, npm_config_platform, npm_config_libc } = process.env;
|
|
51
|
+
const libc = typeof npm_config_libc === 'string' ? npm_config_libc : runtimeLibc();
|
|
52
|
+
return `${npm_config_platform || process.platform}${libc}-${npm_config_arch || process.arch}`;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const buildSharpLibvipsIncludeDir = () => {
|
|
56
|
+
try {
|
|
57
|
+
return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
|
|
58
|
+
} catch {
|
|
59
|
+
try {
|
|
60
|
+
return require('@img/sharp-libvips-dev/include');
|
|
61
|
+
} catch {}
|
|
62
|
+
}
|
|
63
|
+
/* istanbul ignore next */
|
|
64
|
+
return '';
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const buildSharpLibvipsCPlusPlusDir = () => {
|
|
68
|
+
try {
|
|
69
|
+
return require('@img/sharp-libvips-dev/cplusplus');
|
|
70
|
+
} catch {}
|
|
71
|
+
/* istanbul ignore next */
|
|
72
|
+
return '';
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const buildSharpLibvipsLibDir = () => {
|
|
76
|
+
try {
|
|
77
|
+
return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
|
|
78
|
+
} catch {
|
|
79
|
+
try {
|
|
80
|
+
return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
|
|
81
|
+
} catch {}
|
|
82
|
+
}
|
|
83
|
+
/* istanbul ignore next */
|
|
84
|
+
return '';
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const isUnsupportedNodeRuntime = () => {
|
|
88
|
+
/* istanbul ignore next */
|
|
89
|
+
if (process.release?.name === 'node' && process.versions) {
|
|
90
|
+
if (!semverSatisfies(process.versions.node, engines.node)) {
|
|
91
|
+
return { found: process.versions.node, expected: engines.node };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/* istanbul ignore next */
|
|
97
|
+
const isEmscripten = () => {
|
|
98
|
+
const { CC } = process.env;
|
|
99
|
+
return Boolean(CC && CC.endsWith('/emcc'));
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const isRosetta = () => {
|
|
103
|
+
/* istanbul ignore next */
|
|
104
|
+
if (process.platform === 'darwin' && process.arch === 'x64') {
|
|
105
|
+
const translated = spawnSync('sysctl sysctl.proc_translated', spawnSyncOptions).stdout;
|
|
106
|
+
return (translated || '').trim() === 'sysctl.proc_translated: 1';
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const sha512 = (s) => createHash('sha512').update(s).digest('hex');
|
|
112
|
+
|
|
113
|
+
const yarnLocator = () => {
|
|
114
|
+
try {
|
|
115
|
+
const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
|
|
116
|
+
const npmVersion = semverCoerce(optionalDependencies[`@img/sharp-libvips-${buildPlatformArch()}`]).version;
|
|
117
|
+
return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
|
|
118
|
+
} catch {}
|
|
119
|
+
return '';
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/* istanbul ignore next */
|
|
123
|
+
const spawnRebuild = () =>
|
|
124
|
+
spawnSync(`node-gyp rebuild --directory=src ${isEmscripten() ? '--nodedir=emscripten' : ''}`, {
|
|
125
|
+
...spawnSyncOptions,
|
|
126
|
+
stdio: 'inherit'
|
|
127
|
+
}).status;
|
|
128
|
+
|
|
129
|
+
const globalLibvipsVersion = () => {
|
|
130
|
+
if (process.platform !== 'win32') {
|
|
131
|
+
const globalLibvipsVersion = spawnSync('pkg-config --modversion vips-cpp', {
|
|
132
|
+
...spawnSyncOptions,
|
|
133
|
+
env: {
|
|
134
|
+
...process.env,
|
|
135
|
+
PKG_CONFIG_PATH: pkgConfigPath()
|
|
136
|
+
}
|
|
137
|
+
}).stdout;
|
|
138
|
+
/* istanbul ignore next */
|
|
139
|
+
return (globalLibvipsVersion || '').trim();
|
|
140
|
+
} else {
|
|
141
|
+
return '';
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/* istanbul ignore next */
|
|
146
|
+
const pkgConfigPath = () => {
|
|
147
|
+
if (process.platform !== 'win32') {
|
|
148
|
+
const brewPkgConfigPath = spawnSync(
|
|
149
|
+
'which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',
|
|
150
|
+
spawnSyncOptions
|
|
151
|
+
).stdout || '';
|
|
152
|
+
return [
|
|
153
|
+
brewPkgConfigPath.trim(),
|
|
154
|
+
process.env.PKG_CONFIG_PATH,
|
|
155
|
+
'/usr/local/lib/pkgconfig',
|
|
156
|
+
'/usr/lib/pkgconfig',
|
|
157
|
+
'/usr/local/libdata/pkgconfig',
|
|
158
|
+
'/usr/libdata/pkgconfig'
|
|
159
|
+
].filter(Boolean).join(':');
|
|
160
|
+
} else {
|
|
161
|
+
return '';
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const skipSearch = (status, reason, logger) => {
|
|
166
|
+
if (logger) {
|
|
167
|
+
logger(`Detected ${reason}, skipping search for globally-installed libvips`);
|
|
168
|
+
}
|
|
169
|
+
return status;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const useGlobalLibvips = (logger) => {
|
|
173
|
+
if (Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS) === true) {
|
|
174
|
+
return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS', logger);
|
|
175
|
+
}
|
|
176
|
+
if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) {
|
|
177
|
+
return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', logger);
|
|
178
|
+
}
|
|
179
|
+
/* istanbul ignore next */
|
|
180
|
+
if (isRosetta()) {
|
|
181
|
+
return skipSearch(false, 'Rosetta', logger);
|
|
182
|
+
}
|
|
183
|
+
const globalVipsVersion = globalLibvipsVersion();
|
|
184
|
+
return !!globalVipsVersion && /* istanbul ignore next */
|
|
185
|
+
semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
module.exports = {
|
|
189
|
+
minimumLibvipsVersion,
|
|
190
|
+
prebuiltPlatforms,
|
|
191
|
+
buildPlatformArch,
|
|
192
|
+
buildSharpLibvipsIncludeDir,
|
|
193
|
+
buildSharpLibvipsCPlusPlusDir,
|
|
194
|
+
buildSharpLibvipsLibDir,
|
|
195
|
+
isUnsupportedNodeRuntime,
|
|
196
|
+
runtimePlatformArch,
|
|
197
|
+
log,
|
|
198
|
+
yarnLocator,
|
|
199
|
+
spawnRebuild,
|
|
200
|
+
globalLibvipsVersion,
|
|
201
|
+
pkgConfigPath,
|
|
202
|
+
useGlobalLibvips
|
|
203
|
+
};
|