- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
482 B
JavaScript
22 lines
482 B
JavaScript
'use strict';
|
|
const {PNG} = require('pngjs');
|
|
|
|
module.exports = async (buffer, options) => {
|
|
if (!Buffer.isBuffer(buffer)) {
|
|
throw new TypeError(`Expected \`buffer\` to be of type \`Buffer\` but received type \`${typeof buffer}\``);
|
|
}
|
|
|
|
return new Promise((resolve, reject) => {
|
|
let png = new PNG(options);
|
|
|
|
png.on('metadata', data => {
|
|
png = Object.assign(png, data);
|
|
});
|
|
|
|
png.on('error', reject);
|
|
png.on('parsed', () => resolve(png));
|
|
|
|
png.end(buffer);
|
|
});
|
|
};
|