release: 1.3.4
This commit is contained in:
@@ -455,11 +455,9 @@ describe("更新安全工具", () => {
|
||||
await mkdir(path.join(source, "dist", "server"), { recursive: true });
|
||||
await mkdir(path.join(source, "bin"), { recursive: true });
|
||||
await mkdir(path.join(source, "scripts"), { recursive: true });
|
||||
await mkdir(path.join(source, "runtime", "bin"), { recursive: true });
|
||||
await writeFile(path.join(source, "dist", "server", "large.js"), Buffer.alloc(2 * 1024 * 1024, 0x41));
|
||||
await writeFile(path.join(source, "bin", "tallynote"), "#!/bin/sh\n");
|
||||
await writeFile(path.join(source, "scripts", "runner.sh"), "#!/bin/sh\n");
|
||||
await writeFile(path.join(source, "runtime", "bin", "node"), "node");
|
||||
const archive = path.join(root, "release.tar.gz");
|
||||
await createSafeArchive(source, archive);
|
||||
expect((await stat(archive)).size).toBeLessThan(64 * 1024);
|
||||
@@ -472,7 +470,7 @@ describe("更新安全工具", () => {
|
||||
expect((await stat(path.join(destination, "dist", "server", "large.js"))).mode & 0o777).toBe(0o644);
|
||||
expect((await stat(path.join(destination, "bin", "tallynote"))).mode & 0o777).toBe(0o755);
|
||||
expect((await stat(path.join(destination, "scripts", "runner.sh"))).mode & 0o777).toBe(0o755);
|
||||
expect((await stat(path.join(destination, "runtime", "bin", "node"))).mode & 0o777).toBe(0o755);
|
||||
expect(await stat(path.join(destination, "runtime")).catch(() => null)).toBeNull();
|
||||
} finally {
|
||||
await rm(root, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user