@cliphijack/santaclaude 1.0.17 → 1.0.18
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 +1 -1
- package/santaclaude.js +2 -2
package/package.json
CHANGED
package/santaclaude.js
CHANGED
|
@@ -308,7 +308,7 @@ description: 산타 Gbrain — 내 노트·문서·지식 폴더에서 답을
|
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
// 확장자 → MIME (보낼 파일 타입 판별)
|
|
311
|
-
const EXT_MIME = { png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', webp: 'image/webp', svg: 'image/svg+xml', bmp: 'image/bmp', pdf: 'application/pdf', txt: 'text/plain', md: 'text/markdown', csv: 'text/csv', json: 'application/json', log: 'text/plain', html: 'text/html', xml: 'text/xml', mp3: 'audio/mpeg', wav: 'audio/wav', ogg: 'audio/ogg', m4a: 'audio/mp4', flac: 'audio/flac', mp4: 'video/mp4', webm: 'video/webm', mov: 'video/quicktime', mkv: 'video/x-matroska', zip: 'application/zip', gz: 'application/gzip', tar: 'application/x-tar' };
|
|
311
|
+
const EXT_MIME = { png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', webp: 'image/webp', svg: 'image/svg+xml', bmp: 'image/bmp', pdf: 'application/pdf', txt: 'text/plain', md: 'text/markdown', csv: 'text/csv', json: 'application/json', log: 'text/plain', html: 'text/html', xml: 'text/xml', mp3: 'audio/mpeg', wav: 'audio/wav', ogg: 'audio/ogg', m4a: 'audio/mp4', flac: 'audio/flac', mp4: 'video/mp4', webm: 'video/webm', mov: 'video/quicktime', mkv: 'video/x-matroska', zip: 'application/zip', gz: 'application/gzip', tar: 'application/x-tar', xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', xls: 'application/vnd.ms-excel', docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', doc: 'application/msword', pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', ppt: 'application/vnd.ms-powerpoint', rtf: 'application/rtf', yaml: 'text/yaml', yml: 'text/yaml' };
|
|
312
312
|
function installDefaultSkills(cwd) {
|
|
313
313
|
const base = cwd && fs.existsSync(cwd) ? cwd : os.homedir();
|
|
314
314
|
for (const [name, files] of Object.entries(DEFAULT_SKILLS)) {
|
|
@@ -404,7 +404,7 @@ async function run(conf) {
|
|
|
404
404
|
const j = await r.json();
|
|
405
405
|
const mime = String(j.mime || '');
|
|
406
406
|
if (!mime.startsWith('image/')) allImg = false;
|
|
407
|
-
const safe = String(im.name || j.name || '').replace(/[
|
|
407
|
+
const safe = String(im.name || j.name || '').replace(/[\/\\\x00-\x1f]/g, '').replace(/\s+/g, '_').slice(0, 80); // 한글 등 유니코드 보존, 경로·제어문자만 제거(execFileSync 무쉘이라 안전)
|
|
408
408
|
let fname;
|
|
409
409
|
if (safe && /\.[A-Za-z0-9]+$/.test(safe)) fname = Date.now() + '_' + paths.length + '_' + safe; // 원본 파일명·확장자 보존
|
|
410
410
|
else { const ext = MIME_EXT[mime] || (mime.includes('png') ? 'png' : mime.includes('webp') ? 'webp' : mime.startsWith('image/') ? 'jpg' : 'bin'); fname = Date.now() + '_' + paths.length + '.' + ext; }
|