Add secure Node image webhook service

This commit is contained in:
2026-08-06 11:21:54 +00:00
parent 24073326b3
commit f04b81c606
22 changed files with 1116 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { buildLegacyInventory } from '../src/inventory.mjs';
test('legacy inventory preserves dirname to stem to basename shape', () => {
assert.deepEqual(buildLegacyInventory([
'game/back.jpg',
'icons/1047.jpg',
'icons/장수/유표.jpg',
'icons/장수/유표1.png',
]), {
'.': { '1047': '1047.jpg' },
'장수': { '유표': '유표.jpg', '유표1': '유표1.png' },
});
});
test('legacy duplicate stems retain the last Git path for PHP compatibility', () => {
assert.deepEqual(buildLegacyInventory(['icons/a/same.jpg', 'icons/a/same.png']), {
a: { same: 'same.png' },
});
});