统一 Rust 与 TypeScript 格式化门禁
纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口 完成项目 TypeScript/Prettier 与 Rust 全量格式化 修复 Pingora expected executable 门禁的空白敏感误报 同步开发运维文档与 AGC skill pack 格式化忽略规则
This commit is contained in:
@@ -40,9 +40,19 @@ describe('ImageCanvasFileModel', () => {
|
||||
it('probes common upload image dimensions from file headers', async () => {
|
||||
const png = makeFile(
|
||||
[
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a,
|
||||
0x89,
|
||||
0x50,
|
||||
0x4e,
|
||||
0x47,
|
||||
0x0d,
|
||||
0x0a,
|
||||
0x1a,
|
||||
0x0a,
|
||||
...uint32be(13),
|
||||
0x49, 0x48, 0x44, 0x52,
|
||||
0x49,
|
||||
0x48,
|
||||
0x44,
|
||||
0x52,
|
||||
...uint32be(1536),
|
||||
...uint32be(1024),
|
||||
8,
|
||||
@@ -56,25 +66,53 @@ describe('ImageCanvasFileModel', () => {
|
||||
);
|
||||
const jpeg = makeFile(
|
||||
[
|
||||
0xff, 0xd8,
|
||||
0xff, 0xe0,
|
||||
0xff,
|
||||
0xd8,
|
||||
0xff,
|
||||
0xe0,
|
||||
...uint16be(16),
|
||||
0x4a, 0x46, 0x49, 0x46,
|
||||
0, 1, 1, 0, 0, 1, 0, 1, 0, 0,
|
||||
0xff, 0xc0,
|
||||
0x4a,
|
||||
0x46,
|
||||
0x49,
|
||||
0x46,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0xff,
|
||||
0xc0,
|
||||
...uint16be(17),
|
||||
8,
|
||||
...uint16be(720),
|
||||
...uint16be(1280),
|
||||
3,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
],
|
||||
'画布.jpg',
|
||||
'image/jpeg',
|
||||
);
|
||||
const gif = makeFile(
|
||||
[
|
||||
0x47, 0x49, 0x46, 0x38, 0x39, 0x61,
|
||||
0x47,
|
||||
0x49,
|
||||
0x46,
|
||||
0x38,
|
||||
0x39,
|
||||
0x61,
|
||||
...uint16le(640),
|
||||
...uint16le(480),
|
||||
0,
|
||||
@@ -86,10 +124,19 @@ describe('ImageCanvasFileModel', () => {
|
||||
);
|
||||
const webp = makeFile(
|
||||
[
|
||||
0x52, 0x49, 0x46, 0x46,
|
||||
0x52,
|
||||
0x49,
|
||||
0x46,
|
||||
0x46,
|
||||
...uint32le(22),
|
||||
0x57, 0x45, 0x42, 0x50,
|
||||
0x56, 0x50, 0x38, 0x58,
|
||||
0x57,
|
||||
0x45,
|
||||
0x42,
|
||||
0x50,
|
||||
0x56,
|
||||
0x50,
|
||||
0x38,
|
||||
0x58,
|
||||
...uint32le(10),
|
||||
0,
|
||||
0,
|
||||
@@ -103,7 +150,8 @@ describe('ImageCanvasFileModel', () => {
|
||||
);
|
||||
const bmp = makeFile(
|
||||
[
|
||||
0x42, 0x4d,
|
||||
0x42,
|
||||
0x4d,
|
||||
...uint32le(54),
|
||||
0,
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user