Files
tehran_taj/apps/api/release/vendor/sharp/install/build.js
T
mahmoodandClaude Code 3e9f532c6c fix(images): ship Linux codecs and preserve original-image fallback
Vendor the locked sharp Linux runtime and verify it during Docker builds. Add complete image response lengths and persistent frontend fallbacks, with real-codec HTTP and isolated release regression tests. Refresh tested API, admin and customer release artifacts.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-26 18:12:21 +03:30

39 lines
860 B
JavaScript

/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
const {
useGlobalLibvips,
globalLibvipsVersion,
log,
spawnRebuild,
} = require('../dist/libvips.cjs');
log('Building from source');
log('See https://sharp.pixelplumbing.com/install#building-from-source');
try {
const addonApi = require('node-addon-api');
log(`Found node-addon-api ${addonApi.version || ''}`);
} catch (_err) {
log('Please add node-addon-api to your dependencies');
process.exit(1);
}
try {
const gyp = require('node-gyp');
log(`Found node-gyp ${gyp().version}`);
} catch (_err) {
log('Please add node-gyp to your dependencies');
process.exit(1);
}
if (useGlobalLibvips(log)) {
log(`Found globally-installed libvips v${globalLibvipsVersion()}`);
}
const status = spawnRebuild();
if (status !== 0) {
process.exit(status);
}