openportal 0.1.0 → 0.1.1
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/package.json +10 -4
- package/web/.next/static/{b-zSCTvx5IzLyCj7s91p4 → A7pW-dtFIbPCSkvE8uenX}/_buildManifest.js +5 -5
- package/web/.next/static/chunks/{d3520c0622de77ff.js → 2e7bfb90c343ca96.js} +2 -2
- package/web/.next/static/chunks/{c2c14edbf40dd531.js → 8f80b41262ef70b6.js} +1 -1
- package/web/.next/static/chunks/{6ed981794a42d949.js → 967a1e0002fe9ae6.js} +2 -2
- package/web/.next/static/chunks/{688448a61fbd7d50.js → 9b265e2198b5525f.js} +2 -2
- package/web/.next/static/chunks/{c617a4c7a78d4946.js → aebf799dac29fe08.js} +2 -2
- package/web/.next/static/chunks/{d091e73f46572c38.js → c20ae04df8cc28be.js} +2 -2
- package/web/.next/static/chunks/{fe47781ce8074a57.js → d316d63225992c76.js} +2 -2
- package/web/.next/static/chunks/{turbopack-f44fd3803d0d6727.js → turbopack-1837909a677d116b.js} +1 -1
- package/web/.next/static/chunks/{turbopack-03c9848eaf268db1.js → turbopack-26688626142ac58f.js} +1 -1
- package/web/.next/static/chunks/{turbopack-bc49f2e78bf92fdb.js → turbopack-27558c851386934e.js} +1 -1
- package/web/.next/static/chunks/{turbopack-d90c5e114da5fc51.js → turbopack-92c911b9efda2756.js} +1 -1
- package/web/.next/static/chunks/{turbopack-ededbd49a3a234ea.js → turbopack-c40ec6674624f1d7.js} +1 -1
- package/web/.next/static/chunks/{turbopack-b3b62a2520d01d7e.js → turbopack-f4c0881f9723f5a5.js} +1 -1
- package/web/apps/web/.next/BUILD_ID +1 -1
- package/web/apps/web/.next/build-manifest.json +14 -14
- package/web/apps/web/.next/required-server-files.json +1 -1
- package/web/apps/web/.next/server/middleware-build-manifest.js +12 -12
- package/web/apps/web/.next/server/pages/404.html +1 -1
- package/web/apps/web/.next/server/pages/500.html +1 -1
- package/web/apps/web/.next/server/pages/_app/build-manifest.json +2 -2
- package/web/apps/web/.next/server/pages/_app/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/_error/build-manifest.json +2 -2
- package/web/apps/web/.next/server/pages/_error/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/index/build-manifest.json +2 -2
- package/web/apps/web/.next/server/pages/index/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/index.html +1 -1
- package/web/apps/web/.next/server/pages/session/[id]/build-manifest.json +2 -2
- package/web/apps/web/.next/server/pages/session/[id]/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/session/[id].html +1 -1
- package/web/apps/web/.next/server/pages/settings/build-manifest.json +2 -2
- package/web/apps/web/.next/server/pages/settings/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/settings.html +1 -1
- package/web/apps/web/.next/server/pages/terminal/build-manifest.json +2 -2
- package/web/apps/web/.next/server/pages/terminal/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/terminal.html +1 -1
- package/web/apps/web/server.js +1 -1
- package/web/node_modules/.bun/@img+colour@1.0.0/node_modules/@img/colour/color.cjs +0 -1594
- package/web/node_modules/.bun/@img+colour@1.0.0/node_modules/@img/colour/index.cjs +0 -1
- package/web/node_modules/.bun/@img+colour@1.0.0/node_modules/@img/colour/package.json +0 -45
- package/web/node_modules/.bun/@img+sharp-darwin-arm64@0.34.5/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/web/node_modules/.bun/@img+sharp-darwin-arm64@0.34.5/node_modules/@img/sharp-darwin-arm64/package.json +0 -40
- package/web/node_modules/.bun/@img+sharp-libvips-darwin-arm64@1.2.4/node_modules/@img/sharp-libvips-darwin-arm64/README.md +0 -46
- package/web/node_modules/.bun/@img+sharp-libvips-darwin-arm64@1.2.4/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +0 -220
- package/web/node_modules/.bun/@img+sharp-libvips-darwin-arm64@1.2.4/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +0 -1
- package/web/node_modules/.bun/@img+sharp-libvips-darwin-arm64@1.2.4/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
- package/web/node_modules/.bun/@img+sharp-libvips-darwin-arm64@1.2.4/node_modules/@img/sharp-libvips-darwin-arm64/package.json +0 -36
- package/web/node_modules/.bun/@img+sharp-libvips-darwin-arm64@1.2.4/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +0 -30
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +0 -6
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +0 -38
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +0 -6
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js +0 -6
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js +0 -13
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js +0 -6
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_get.js +0 -8
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_init.js +0 -7
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_set.js +0 -9
- package/web/node_modules/.bun/@swc+helpers@0.5.15/node_modules/@swc/helpers/package.json +0 -471
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/channel.js +0 -177
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/colour.js +0 -195
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/composite.js +0 -212
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/constructor.js +0 -499
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/index.js +0 -16
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/input.js +0 -809
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/is.js +0 -143
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/libvips.js +0 -207
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/operation.js +0 -1016
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/output.js +0 -1666
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/resize.js +0 -595
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/sharp.js +0 -121
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/lib/utility.js +0 -291
- package/web/node_modules/.bun/sharp@0.34.5/node_modules/sharp/package.json +0 -202
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/_tsc.js +0 -133818
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/_tsserver.js +0 -659
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/_typingsInstaller.js +0 -222
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/tsc.js +0 -8
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/tsserver.js +0 -8
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/tsserverlibrary.js +0 -21
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typesMap.json +0 -497
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typescript.js +0 -200276
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/typingsInstaller.js +0 -8
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/watchGuard.js +0 -53
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
- package/web/node_modules/.bun/typescript@5.9.3/node_modules/typescript/package.json +0 -120
- /package/web/.next/static/{b-zSCTvx5IzLyCj7s91p4 → A7pW-dtFIbPCSkvE8uenX}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{b-zSCTvx5IzLyCj7s91p4 → A7pW-dtFIbPCSkvE8uenX}/_ssgManifest.js +0 -0
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright 2013 Lovell Fuller and others.
|
|
3
|
-
SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Is this value defined and not null?
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
const defined = (val) => typeof val !== 'undefined' && val !== null;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Is this value an object?
|
|
14
|
-
* @private
|
|
15
|
-
*/
|
|
16
|
-
const object = (val) => typeof val === 'object';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Is this value a plain object?
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const plainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Is this value a function?
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
const fn = (val) => typeof val === 'function';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Is this value a boolean?
|
|
32
|
-
* @private
|
|
33
|
-
*/
|
|
34
|
-
const bool = (val) => typeof val === 'boolean';
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Is this value a Buffer object?
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
const buffer = (val) => val instanceof Buffer;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
const typedArray = (val) => {
|
|
47
|
-
if (defined(val)) {
|
|
48
|
-
switch (val.constructor) {
|
|
49
|
-
case Uint8Array:
|
|
50
|
-
case Uint8ClampedArray:
|
|
51
|
-
case Int8Array:
|
|
52
|
-
case Uint16Array:
|
|
53
|
-
case Int16Array:
|
|
54
|
-
case Uint32Array:
|
|
55
|
-
case Int32Array:
|
|
56
|
-
case Float32Array:
|
|
57
|
-
case Float64Array:
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return false;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Is this value an ArrayBuffer object?
|
|
67
|
-
* @private
|
|
68
|
-
*/
|
|
69
|
-
const arrayBuffer = (val) => val instanceof ArrayBuffer;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Is this value a non-empty string?
|
|
73
|
-
* @private
|
|
74
|
-
*/
|
|
75
|
-
const string = (val) => typeof val === 'string' && val.length > 0;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Is this value a real number?
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
const number = (val) => typeof val === 'number' && !Number.isNaN(val);
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Is this value an integer?
|
|
85
|
-
* @private
|
|
86
|
-
*/
|
|
87
|
-
const integer = (val) => Number.isInteger(val);
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Is this value within an inclusive given range?
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
const inRange = (val, min, max) => val >= min && val <= max;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Is this value within the elements of an array?
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
99
|
-
const inArray = (val, list) => list.includes(val);
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Create an Error with a message relating to an invalid parameter.
|
|
103
|
-
*
|
|
104
|
-
* @param {string} name - parameter name.
|
|
105
|
-
* @param {string} expected - description of the type/value/range expected.
|
|
106
|
-
* @param {*} actual - the value received.
|
|
107
|
-
* @returns {Error} Containing the formatted message.
|
|
108
|
-
* @private
|
|
109
|
-
*/
|
|
110
|
-
const invalidParameterError = (name, expected, actual) => new Error(
|
|
111
|
-
`Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Ensures an Error from C++ contains a JS stack.
|
|
116
|
-
*
|
|
117
|
-
* @param {Error} native - Error with message from C++.
|
|
118
|
-
* @param {Error} context - Error with stack from JS.
|
|
119
|
-
* @returns {Error} Error with message and stack.
|
|
120
|
-
* @private
|
|
121
|
-
*/
|
|
122
|
-
const nativeError = (native, context) => {
|
|
123
|
-
context.message = native.message;
|
|
124
|
-
return context;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
module.exports = {
|
|
128
|
-
defined,
|
|
129
|
-
object,
|
|
130
|
-
plainObject,
|
|
131
|
-
fn,
|
|
132
|
-
bool,
|
|
133
|
-
buffer,
|
|
134
|
-
typedArray,
|
|
135
|
-
arrayBuffer,
|
|
136
|
-
string,
|
|
137
|
-
number,
|
|
138
|
-
integer,
|
|
139
|
-
inRange,
|
|
140
|
-
inArray,
|
|
141
|
-
invalidParameterError,
|
|
142
|
-
nativeError
|
|
143
|
-
};
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright 2013 Lovell Fuller and others.
|
|
3
|
-
SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
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
|
-
/* node:coverage ignore next */
|
|
16
|
-
const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || config.libvips;
|
|
17
|
-
const minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
|
|
18
|
-
|
|
19
|
-
const prebuiltPlatforms = [
|
|
20
|
-
'darwin-arm64', 'darwin-x64',
|
|
21
|
-
'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-riscv64', 'linux-s390x', 'linux-x64',
|
|
22
|
-
'linuxmusl-arm64', 'linuxmusl-x64',
|
|
23
|
-
'win32-arm64', '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
|
-
/* node:coverage ignore next */
|
|
40
|
-
const runtimeLibc = () => detectLibc.isNonGlibcLinuxSync() ? detectLibc.familySync() : '';
|
|
41
|
-
|
|
42
|
-
const runtimePlatformArch = () => `${process.platform}${runtimeLibc()}-${process.arch}`;
|
|
43
|
-
|
|
44
|
-
const buildPlatformArch = () => {
|
|
45
|
-
/* node:coverage ignore next 3 */
|
|
46
|
-
if (isEmscripten()) {
|
|
47
|
-
return 'wasm32';
|
|
48
|
-
}
|
|
49
|
-
const { npm_config_arch, npm_config_platform, npm_config_libc } = process.env;
|
|
50
|
-
const libc = typeof npm_config_libc === 'string' ? npm_config_libc : runtimeLibc();
|
|
51
|
-
return `${npm_config_platform || process.platform}${libc}-${npm_config_arch || process.arch}`;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const buildSharpLibvipsIncludeDir = () => {
|
|
55
|
-
try {
|
|
56
|
-
return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
|
|
57
|
-
} catch {
|
|
58
|
-
/* node:coverage ignore next 5 */
|
|
59
|
-
try {
|
|
60
|
-
return require('@img/sharp-libvips-dev/include');
|
|
61
|
-
} catch {}
|
|
62
|
-
}
|
|
63
|
-
return '';
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const buildSharpLibvipsCPlusPlusDir = () => {
|
|
67
|
-
/* node:coverage ignore next 4 */
|
|
68
|
-
try {
|
|
69
|
-
return require('@img/sharp-libvips-dev/cplusplus');
|
|
70
|
-
} catch {}
|
|
71
|
-
return '';
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const buildSharpLibvipsLibDir = () => {
|
|
75
|
-
try {
|
|
76
|
-
return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
|
|
77
|
-
} catch {
|
|
78
|
-
/* node:coverage ignore next 5 */
|
|
79
|
-
try {
|
|
80
|
-
return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
|
|
81
|
-
} catch {}
|
|
82
|
-
}
|
|
83
|
-
return '';
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/* node:coverage disable */
|
|
87
|
-
|
|
88
|
-
const isUnsupportedNodeRuntime = () => {
|
|
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
|
-
const isEmscripten = () => {
|
|
97
|
-
const { CC } = process.env;
|
|
98
|
-
return Boolean(CC?.endsWith('/emcc'));
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
const isRosetta = () => {
|
|
102
|
-
if (process.platform === 'darwin' && process.arch === 'x64') {
|
|
103
|
-
const translated = spawnSync('sysctl sysctl.proc_translated', spawnSyncOptions).stdout;
|
|
104
|
-
return (translated || '').trim() === 'sysctl.proc_translated: 1';
|
|
105
|
-
}
|
|
106
|
-
return false;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
/* node:coverage enable */
|
|
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()}`], {
|
|
117
|
-
includePrerelease: true
|
|
118
|
-
}).version;
|
|
119
|
-
return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
|
|
120
|
-
} catch {}
|
|
121
|
-
return '';
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/* node:coverage disable */
|
|
125
|
-
|
|
126
|
-
const spawnRebuild = () =>
|
|
127
|
-
spawnSync(`node-gyp rebuild --directory=src ${isEmscripten() ? '--nodedir=emscripten' : ''}`, {
|
|
128
|
-
...spawnSyncOptions,
|
|
129
|
-
stdio: 'inherit'
|
|
130
|
-
}).status;
|
|
131
|
-
|
|
132
|
-
const globalLibvipsVersion = () => {
|
|
133
|
-
if (process.platform !== 'win32') {
|
|
134
|
-
const globalLibvipsVersion = spawnSync('pkg-config --modversion vips-cpp', {
|
|
135
|
-
...spawnSyncOptions,
|
|
136
|
-
env: {
|
|
137
|
-
...process.env,
|
|
138
|
-
PKG_CONFIG_PATH: pkgConfigPath()
|
|
139
|
-
}
|
|
140
|
-
}).stdout;
|
|
141
|
-
return (globalLibvipsVersion || '').trim();
|
|
142
|
-
} else {
|
|
143
|
-
return '';
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/* node:coverage enable */
|
|
148
|
-
|
|
149
|
-
const pkgConfigPath = () => {
|
|
150
|
-
if (process.platform !== 'win32') {
|
|
151
|
-
/* node:coverage ignore next 4 */
|
|
152
|
-
const brewPkgConfigPath = spawnSync(
|
|
153
|
-
'which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',
|
|
154
|
-
spawnSyncOptions
|
|
155
|
-
).stdout || '';
|
|
156
|
-
return [
|
|
157
|
-
brewPkgConfigPath.trim(),
|
|
158
|
-
process.env.PKG_CONFIG_PATH,
|
|
159
|
-
'/usr/local/lib/pkgconfig',
|
|
160
|
-
'/usr/lib/pkgconfig',
|
|
161
|
-
'/usr/local/libdata/pkgconfig',
|
|
162
|
-
'/usr/libdata/pkgconfig'
|
|
163
|
-
].filter(Boolean).join(':');
|
|
164
|
-
} else {
|
|
165
|
-
return '';
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const skipSearch = (status, reason, logger) => {
|
|
170
|
-
if (logger) {
|
|
171
|
-
logger(`Detected ${reason}, skipping search for globally-installed libvips`);
|
|
172
|
-
}
|
|
173
|
-
return status;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
const useGlobalLibvips = (logger) => {
|
|
177
|
-
if (Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS) === true) {
|
|
178
|
-
return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS', logger);
|
|
179
|
-
}
|
|
180
|
-
if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) {
|
|
181
|
-
return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', logger);
|
|
182
|
-
}
|
|
183
|
-
/* node:coverage ignore next 3 */
|
|
184
|
-
if (isRosetta()) {
|
|
185
|
-
return skipSearch(false, 'Rosetta', logger);
|
|
186
|
-
}
|
|
187
|
-
const globalVipsVersion = globalLibvipsVersion();
|
|
188
|
-
/* node:coverage ignore next */
|
|
189
|
-
return !!globalVipsVersion && semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
module.exports = {
|
|
193
|
-
minimumLibvipsVersion,
|
|
194
|
-
prebuiltPlatforms,
|
|
195
|
-
buildPlatformArch,
|
|
196
|
-
buildSharpLibvipsIncludeDir,
|
|
197
|
-
buildSharpLibvipsCPlusPlusDir,
|
|
198
|
-
buildSharpLibvipsLibDir,
|
|
199
|
-
isUnsupportedNodeRuntime,
|
|
200
|
-
runtimePlatformArch,
|
|
201
|
-
log,
|
|
202
|
-
yarnLocator,
|
|
203
|
-
spawnRebuild,
|
|
204
|
-
globalLibvipsVersion,
|
|
205
|
-
pkgConfigPath,
|
|
206
|
-
useGlobalLibvips
|
|
207
|
-
};
|