Canvas: Generate Github nodes out of the dodo-app config
Change-Id: Ifc5b09deb39352a3025f7ea66ce39b421daac94d
diff --git a/apps/canvas/back/src/lib/nodejs.test.ts b/apps/canvas/back/src/lib/nodejs.test.ts
index 5de8423..579cad5 100644
--- a/apps/canvas/back/src/lib/nodejs.test.ts
+++ b/apps/canvas/back/src/lib/nodejs.test.ts
@@ -1,9 +1,7 @@
import { NodeJSAnalyzer } from "./nodejs.js";
-import { FileSystem, RealFileSystem } from "./fs.js";
+import { FileSystem } from "./fs.js";
import { Volume, IFs, createFsFromVolume } from "memfs";
import { test, expect } from "@jest/globals";
-import { expandValue } from "./env.js";
-import shell from "shelljs";
class InMemoryFileSystem implements FileSystem {
constructor(private readonly fs: IFs) {}
@@ -19,14 +17,6 @@
}
}
-test("canvas", async () => {
- const fs: FileSystem = new RealFileSystem("/home/gio/code/apps/canvas/back");
- const analyzer = new NodeJSAnalyzer();
- expect(analyzer.detect(fs, "/")).toBe(true);
- const info = await analyzer.analyze(fs, "/");
- console.log(info);
-});
-
test("nodejs", async () => {
return;
const root = "/";
@@ -55,29 +45,3 @@
const info = await analyzer.analyze(fs, root);
console.log(info);
});
-
-test("env", () => {
- console.log(expandValue("${PORT} ${DODO_VOLUME_DB}"));
- console.log(expandValue("$PORT $DODO_VOLUME_DB"));
- console.log(expandValue("${UNDEFINED:-${MACHINE}${UNDEFINED:-default}}"));
-});
-
-test("clone", async () => {
- expect(shell.which("ssh-agent")).toBeTruthy();
- expect(shell.which("ssh-add")).toBeTruthy();
- expect(shell.which("git")).toBeTruthy();
- expect(
- shell.exec(
- "GIT_SSH_COMMAND='ssh -i /home/gio/.ssh/key -o IdentitiesOnly=yes' git clone git@github.com:giolekva/dodo-blog.git /tmp/dodo-blog",
- ).code,
- ).toBe(0);
- const fs: FileSystem = new RealFileSystem("/tmp/dodo-blog");
- const analyzer = new NodeJSAnalyzer();
- expect(analyzer.detect(fs, "/")).toBe(true);
- const info = await analyzer.analyze(fs, "/");
- console.log(info);
-});
-
-test("keygen", () => {
- expect(shell.exec(`ssh-keygen -y -t ed25519 -f /tmp/key`).code).toBe(0);
-});