添加 docker runsh 命令

This commit is contained in:
cheney
2026-06-17 09:13:30 +08:00
parent e05ce19eac
commit 0132be7586
9 changed files with 771 additions and 11 deletions
+27
View File
@@ -11,6 +11,32 @@ async function createRemote() {
return remote
}
function writeFixtureProject(tempDir, version, content) {
const projectDir = path.resolve(tempDir, `fixture-${version}`);
fs.mkdirSync(projectDir, { recursive: true });
const filePath = path.resolve(projectDir, "myapp.txt");
fs.writeFileSync(filePath, content, "utf-8");
fs.writeFileSync(path.resolve(projectDir, "meta.json"), JSON.stringify({
id: "myapp",
version,
desc: "test app",
official_url: "https://example.test/myapp",
dist: [
{
path: filePath,
os: "any",
platform: "any",
filename: "myapp.txt",
type: "data"
}
]
}, null, 4), "utf-8");
return projectDir;
}
let tempDir;
let localStore;
@@ -98,3 +124,4 @@ describe("remote module public API", () => {
expect(fs.existsSync(path.resolve(localStore, "modules", "myapp", "versions", "1.0.0"))).toBe(false);
});
});