feat: add ssh key

This commit is contained in:
Mauricio Siu
2024-10-02 22:50:01 -06:00
parent f13e5d449c
commit d41c8c70c3
24 changed files with 3908 additions and 192 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE "ssh-key" ADD COLUMN "privateKey" text DEFAULT '' NOT NULL;

File diff suppressed because it is too large Load Diff

View File

@@ -267,6 +267,13 @@
"when": 1726988289562,
"tag": "0037_legal_namor",
"breakpoints": true
},
{
"idx": 38,
"version": "6",
"when": 1727903587684,
"tag": "0038_mushy_blindfold",
"breakpoints": true
}
]
}

View File

@@ -63,7 +63,7 @@ void app.prepare().then(async () => {
}
if (IS_CLOUD) {
await migration();
// await migration(); //TODO: Fix migration
}
server.listen(PORT);

View File

@@ -2,11 +2,7 @@ import type http from "node:http";
import { spawn } from "node-pty";
import { Client } from "ssh2";
import { WebSocketServer } from "ws";
import {
findServerById,
readSSHKey,
validateWebSocketRequest,
} from "@dokploy/builders";
import { findServerById, validateWebSocketRequest } from "@dokploy/builders";
import { getShell } from "./utils";
export const setupDockerContainerLogsWebSocketServer = (
@@ -52,7 +48,6 @@ export const setupDockerContainerLogsWebSocketServer = (
const server = await findServerById(serverId);
if (!server.sshKeyId) return;
const keys = await readSSHKey(server.sshKeyId);
const client = new Client();
new Promise<void>((resolve, reject) => {
client
@@ -84,7 +79,7 @@ export const setupDockerContainerLogsWebSocketServer = (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -2,11 +2,7 @@ import type http from "node:http";
import { spawn } from "node-pty";
import { Client } from "ssh2";
import { WebSocketServer } from "ws";
import {
findServerById,
readSSHKey,
validateWebSocketRequest,
} from "@dokploy/builders";
import { findServerById, validateWebSocketRequest } from "@dokploy/builders";
import { getShell } from "./utils";
export const setupDockerContainerTerminalWebSocketServer = (
@@ -53,7 +49,6 @@ export const setupDockerContainerTerminalWebSocketServer = (
if (!server.sshKeyId)
throw new Error("No SSH key available for this server");
const keys = await readSSHKey(server.sshKeyId);
const conn = new Client();
let stdout = "";
let stderr = "";
@@ -109,7 +104,7 @@ export const setupDockerContainerTerminalWebSocketServer = (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
} else {

View File

@@ -2,11 +2,7 @@ import { spawn } from "node:child_process";
import type http from "node:http";
import { Client } from "ssh2";
import { WebSocketServer } from "ws";
import {
findServerById,
readSSHKey,
validateWebSocketRequest,
} from "@dokploy/builders";
import { findServerById, validateWebSocketRequest } from "@dokploy/builders";
export const setupDeploymentLogsWebSocketServer = (
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>,
@@ -51,7 +47,6 @@ export const setupDeploymentLogsWebSocketServer = (
const server = await findServerById(serverId);
if (!server.sshKeyId) return;
const keys = await readSSHKey(server.sshKeyId);
const client = new Client();
new Promise<void>((resolve, reject) => {
client
@@ -83,7 +78,7 @@ export const setupDeploymentLogsWebSocketServer = (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -1,16 +1,16 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"outDir": "dist/",
"target": "ESNext",
"isolatedModules": false,
"noEmit": false,
"moduleResolution": "Node",
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "./server/**/*"]
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"outDir": "dist/",
"target": "ESNext",
"isolatedModules": false,
"noEmit": false,
"moduleResolution": "Node",
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "./server/**/*"]
}

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,14 @@
{
"name": "dokploy",
"private": true,
"workspaces": ["apps/*", "packages/*"],
"scripts": {
"dokploy:setup": "pnpm --filter=dokploy run setup",
"dokploy:dev": "pnpm --filter=dokploy run dev",
"dokploy:build": "pnpm --filter=dokploy run build",
"dokploy:start": "pnpm --filter=dokploy run start",
"test": "pnpm --filter=dokploy run test",
"builder:dev": "pnpm --filter=builders run dev",
"docker:build:canary": "./apps/dokploy/docker/build.sh canary",
"docs:dev": "pnpm --filter=docs run dev",
"docs:build": "pnpm --filter=docs run build",

View File

@@ -4,10 +4,8 @@ import path from "node:path";
build({
entryPoints: ["./src/**/*.ts", "./src/**/*.tsx"], // Punto de entrada principal de tu aplicación
outdir: "dist",
bundle: false, // Cambia a true si deseas bundlear tu código
platform: "node",
format: "esm",
target: ["esnext"],
sourcemap: false,
tsconfig: "./tsconfig.server.json",
plugins: [

View File

@@ -5,9 +5,9 @@
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"dev": "tsup --config ./tsup.ts --watch",
"build": "tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
"esbuild": "tsx ./esbuild.config.ts",
"dev": "tsc --project tsconfig.server.json --watch && tsc-alias -p tsconfig.server.json",
"build": "rm -rf ./dist && tsc --project tsconfig.server.json && tsc-alias -p tsconfig.server.json",
"esbuild": "tsx --watch ./esbuild.config.ts & tsc-alias -p tsconfig.server.json --watch",
"build:types": "tsc --emitDeclarationOnly --experimenta-dts"
},
"dependencies": {

View File

@@ -12,6 +12,7 @@ export const sshKeys = pgTable("ssh-key", {
.notNull()
.primaryKey()
.$defaultFn(() => nanoid()),
privateKey: text("privateKey").notNull().default(""),
publicKey: text("publicKey").notNull(),
name: text("name").notNull(),
description: text("description"),
@@ -37,6 +38,7 @@ export const apiCreateSshKey = createSchema
.pick({
name: true,
description: true,
privateKey: true,
publicKey: true,
})
.merge(sshKeyCreate.pick({ privateKey: true }));

View File

@@ -6,14 +6,10 @@ import {
type apiUpdateSshKey,
sshKeys,
} from "@/server/db/schema";
import { removeSSHKey, saveSSHKey } from "@/server/utils/filesystem/ssh";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
export const createSshKey = async ({
privateKey,
...input
}: typeof apiCreateSshKey._type) => {
export const createSshKey = async (input: typeof apiCreateSshKey._type) => {
await db.transaction(async (tx) => {
const sshKey = await tx
.insert(sshKeys)
@@ -22,10 +18,6 @@ export const createSshKey = async ({
.then((response) => response[0])
.catch((e) => console.error(e));
if (sshKey) {
saveSSHKey(sshKey.sshKeyId, sshKey.publicKey, privateKey);
}
if (!sshKey) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -44,8 +36,6 @@ export const removeSSHKeyById = async (
.where(eq(sshKeys.sshKeyId, sshKeyId))
.returning();
removeSSHKey(sshKeyId);
return result[0];
};

View File

@@ -12,7 +12,6 @@ import {
} from "@/server/setup/traefik-setup";
import { Client } from "ssh2";
import { recreateDirectory } from "../utils/filesystem/directory";
import { readSSHKey } from "../utils/filesystem/ssh";
import slug from "slugify";
@@ -70,13 +69,7 @@ const installRequirements = async (serverId: string, logPath: string) => {
writeStream.close();
throw new Error("No SSH Key found");
}
const keys = await readSSHKey(server.sshKeyId);
if (!keys.privateKey) {
writeStream.write("❌ No SSH Key found");
writeStream.close();
throw new Error("No SSH Key found");
}
return new Promise<void>((resolve, reject) => {
client
.once("ready", () => {
@@ -142,7 +135,7 @@ const installRequirements = async (serverId: string, logPath: string) => {
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -9,7 +9,6 @@ import {
recreateDirectory,
recreateDirectoryRemote,
} from "../filesystem/directory";
import { readSSHKey } from "../filesystem/ssh";
import { execAsyncRemote } from "../process/execAsync";
export const unzipDrop = async (zipFile: File, application: Application) => {
@@ -90,7 +89,6 @@ const getSFTPConnection = async (serverId: string): Promise<SFTPWrapper> => {
const server = await findServerById(serverId);
if (!server.sshKeyId) throw new Error("No SSH key available for this server");
const keys = await readSSHKey(server.sshKeyId);
return new Promise((resolve, reject) => {
const conn = new Client();
conn
@@ -104,7 +102,7 @@ const getSFTPConnection = async (serverId: string): Promise<SFTPWrapper> => {
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -1,99 +1,26 @@
import * as fs from "node:fs";
import * as path from "node:path";
import { paths } from "@/server/constants";
import { spawnAsync } from "../process/spawnAsync";
import * as ssh2 from "ssh2";
export const readSSHKey = async (id: string) => {
const { SSH_PATH } = paths();
export const generateSSHKey = async (type: "rsa" | "ed25519" = "rsa") => {
try {
if (!fs.existsSync(SSH_PATH)) {
fs.mkdirSync(SSH_PATH, { recursive: true });
if (type === "rsa") {
const keys = ssh2.utils.generateKeyPairSync("rsa", {
bits: 4096,
comment: "dokploy",
});
return {
privateKey: keys.private,
publicKey: keys.public,
};
}
const keys = ssh2.utils.generateKeyPairSync("ed25519", {
comment: "dokploy",
});
return {
privateKey: fs.readFileSync(path.join(SSH_PATH, `${id}_rsa`), {
encoding: "utf-8",
}),
publicKey: fs.readFileSync(path.join(SSH_PATH, `${id}_rsa.pub`), {
encoding: "utf-8",
}),
privateKey: keys.private,
publicKey: keys.public,
};
} catch (error) {
throw error;
}
};
export const saveSSHKey = async (
id: string,
publicKey: string,
privateKey: string,
) => {
const { SSH_PATH } = paths();
const applicationDirectory = SSH_PATH;
const privateKeyPath = path.join(applicationDirectory, `${id}_rsa`);
const publicKeyPath = path.join(applicationDirectory, `${id}_rsa.pub`);
const privateKeyStream = fs.createWriteStream(privateKeyPath, {
mode: 0o600,
});
privateKeyStream.write(privateKey);
privateKeyStream.end();
fs.writeFileSync(publicKeyPath, publicKey);
};
export const generateSSHKey = async (type: "rsa" | "ed25519" = "rsa") => {
const { SSH_PATH } = paths();
const applicationDirectory = SSH_PATH;
if (!fs.existsSync(applicationDirectory)) {
fs.mkdirSync(applicationDirectory, { recursive: true });
}
const keyPath = path.join(applicationDirectory, "temp_rsa");
if (fs.existsSync(`${keyPath}`)) {
fs.unlinkSync(`${keyPath}`);
}
if (fs.existsSync(`${keyPath}.pub`)) {
fs.unlinkSync(`${keyPath}.pub`);
}
const args = [
"-t",
type,
"-b",
"4096",
"-C",
"dokploy",
"-m",
"PEM",
"-f",
keyPath,
"-N",
"",
];
try {
await spawnAsync("ssh-keygen", args);
const data = await readSSHKey("temp");
await removeSSHKey("temp");
return data;
} catch (error) {
throw error;
}
};
export const removeSSHKey = async (id: string) => {
try {
const { SSH_PATH } = paths();
const publicKeyPath = path.join(SSH_PATH, `${id}_rsa.pub`);
const privateKeyPath = path.join(SSH_PATH, `${id}_rsa`);
await fs.promises.unlink(publicKeyPath);
await fs.promises.unlink(privateKeyPath);
} catch (error) {
throw error;
}
};

View File

@@ -2,7 +2,6 @@ import { exec } from "node:child_process";
import util from "node:util";
import { findServerById } from "@/server/services/server";
import { Client } from "ssh2";
import { readSSHKey } from "../filesystem/ssh";
export const execAsync = util.promisify(exec);
export const execAsyncRemote = async (
@@ -13,8 +12,6 @@ export const execAsyncRemote = async (
const server = await findServerById(serverId);
if (!server.sshKeyId) throw new Error("No SSH key available for this server");
const keys = await readSSHKey(server.sshKeyId);
let stdout = "";
let stderr = "";
return new Promise((resolve, reject) => {
@@ -62,7 +59,7 @@ export const execAsyncRemote = async (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -1,13 +1,11 @@
import { findServerById } from "@/server/services/server";
import { docker } from "@/server/constants";
import Dockerode from "dockerode";
import { readSSHKey } from "../filesystem/ssh";
export const getRemoteDocker = async (serverId?: string | null) => {
if (!serverId) return docker;
const server = await findServerById(serverId);
if (!server.sshKeyId) return docker;
const keys = await readSSHKey(server.sshKeyId);
const dockerode = new Dockerode({
host: server.ipAddress,
port: server.port,
@@ -15,7 +13,7 @@ export const getRemoteDocker = async (serverId?: string | null) => {
protocol: "ssh",
// @ts-ignore
sshOptions: {
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
},
});

View File

@@ -4,7 +4,6 @@ import { Client } from "ssh2";
import { WebSocketServer } from "ws";
import { findServerById } from "@/server/services/server";
import { validateWebSocketRequest } from "../auth/auth";
import { readSSHKey } from "../utils/filesystem/ssh";
import { getShell } from "./utils";
export const setupDockerContainerLogsWebSocketServer = (
@@ -50,7 +49,6 @@ export const setupDockerContainerLogsWebSocketServer = (
const server = await findServerById(serverId);
if (!server.sshKeyId) return;
const keys = await readSSHKey(server.sshKeyId);
const client = new Client();
new Promise<void>((resolve, reject) => {
client
@@ -82,7 +80,7 @@ export const setupDockerContainerLogsWebSocketServer = (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -4,7 +4,6 @@ import { Client } from "ssh2";
import { WebSocketServer } from "ws";
import { findServerById } from "@/server/services/server";
import { validateWebSocketRequest } from "../auth/auth";
import { readSSHKey } from "../utils/filesystem/ssh";
import { getShell } from "./utils";
export const setupDockerContainerTerminalWebSocketServer = (
@@ -51,7 +50,6 @@ export const setupDockerContainerTerminalWebSocketServer = (
if (!server.sshKeyId)
throw new Error("No SSH key available for this server");
const keys = await readSSHKey(server.sshKeyId);
const conn = new Client();
let stdout = "";
let stderr = "";
@@ -107,7 +105,7 @@ export const setupDockerContainerTerminalWebSocketServer = (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
} else {

View File

@@ -4,7 +4,6 @@ import { Client } from "ssh2";
import { WebSocketServer } from "ws";
import { findServerById } from "@/server/services/server";
import { validateWebSocketRequest } from "../auth/auth";
import { readSSHKey } from "../utils/filesystem/ssh";
export const setupDeploymentLogsWebSocketServer = (
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>,
@@ -49,7 +48,6 @@ export const setupDeploymentLogsWebSocketServer = (
const server = await findServerById(serverId);
if (!server.sshKeyId) return;
const keys = await readSSHKey(server.sshKeyId);
const client = new Client();
new Promise<void>((resolve, reject) => {
client
@@ -81,7 +79,7 @@ export const setupDeploymentLogsWebSocketServer = (
host: server.ipAddress,
port: server.port,
username: server.username,
privateKey: keys.privateKey,
privateKey: server.sshKey?.privateKey,
timeout: 99999,
});
});

View File

@@ -8,6 +8,7 @@
"noEmit": false,
"declaration": true,
"moduleResolution": "Node",
"rootDir": "./src",
"baseUrl": ".",
"incremental": false,
"jsx": "react-jsx",

40
pnpm-lock.yaml generated
View File

@@ -591,7 +591,7 @@ importers:
version: 3.1.2
otpauth:
specifier: ^9.2.3
version: 9.3.1
version: 9.3.4
postgres:
specifier: 3.4.4
version: 3.4.4
@@ -600,7 +600,7 @@ importers:
version: 6.0.2
qrcode:
specifier: ^1.5.3
version: 1.5.3
version: 1.5.4
react:
specifier: 18.2.0
version: 18.2.0
@@ -649,7 +649,7 @@ importers:
version: 2.1.6
'@types/nodemailer':
specifier: ^6.4.15
version: 6.4.15
version: 6.4.16
'@types/qrcode':
specifier: ^1.5.5
version: 1.5.5
@@ -1840,9 +1840,9 @@ packages:
cpu: [x64]
os: [win32]
'@noble/hashes@1.4.0':
resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==}
engines: {node: '>= 16'}
'@noble/hashes@1.5.0':
resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==}
engines: {node: ^14.21.3 || >=16}
'@node-rs/argon2-android-arm-eabi@1.7.0':
resolution: {integrity: sha512-udDqkr5P9E+wYX1SZwAVPdyfYvaF4ry9Tm+R9LkfSHbzWH0uhU6zjIwNRp7m+n4gx691rk+lqqDAIP8RLKwbhg==}
@@ -3519,8 +3519,8 @@ packages:
'@types/node@20.4.6':
resolution: {integrity: sha512-q0RkvNgMweWWIvSMDiXhflGUKMdIxBo2M2tYM/0kEGDueQByFzK4KZAgu5YHGFNxziTlppNpTIBcqHQAxlfHdA==}
'@types/nodemailer@6.4.15':
resolution: {integrity: sha512-0EBJxawVNjPkng1zm2vopRctuWVCxk34JcIlRuXSf54habUWdz1FB7wHDqOqvDa8Mtpt0Q3LTXQkAs2LNyK5jQ==}
'@types/nodemailer@6.4.16':
resolution: {integrity: sha512-uz6hN6Pp0upXMcilM61CoKyjT7sskBoOWpptkjjJp8jIMlTdc3xG01U7proKkXzruMS4hS0zqtHNkNPFB20rKQ==}
'@types/prop-types@15.7.12':
resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==}
@@ -4736,9 +4736,6 @@ packages:
emoji-regex@9.2.2:
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
encode-utf8@1.0.3:
resolution: {integrity: sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==}
end-of-stream@1.4.4:
resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==}
@@ -6729,8 +6726,8 @@ packages:
oslo@1.2.0:
resolution: {integrity: sha512-OoFX6rDsNcOQVAD2gQD/z03u4vEjWZLzJtwkmgfRF+KpQUXwdgEXErD7zNhyowmHwHefP+PM9Pw13pgpHMRlzw==}
otpauth@9.3.1:
resolution: {integrity: sha512-E6d2tMxPofHNk4sRFp+kqW7vQ+WJGO9VLI2N/W00DnI+ThskU12Qa10kyNSGklrzhN5c+wRUsN4GijVgCU2N9w==}
otpauth@9.3.4:
resolution: {integrity: sha512-qXv+lpsCUO9ewitLYfeDKbLYt7UUCivnU/fwGK2OqhgrCBsRkTUNKWsgKAhkXG3aistOY+jEeuL90JEBu6W3mQ==}
p-cancelable@3.0.0:
resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==}
@@ -7047,8 +7044,8 @@ packages:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
qrcode@1.5.3:
resolution: {integrity: sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==}
qrcode@1.5.4:
resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==}
engines: {node: '>=10.13.0'}
hasBin: true
@@ -9316,7 +9313,7 @@ snapshots:
'@next/swc-win32-x64-msvc@14.2.5':
optional: true
'@noble/hashes@1.4.0': {}
'@noble/hashes@1.5.0': {}
'@node-rs/argon2-android-arm-eabi@1.7.0':
optional: true
@@ -11594,7 +11591,7 @@ snapshots:
'@types/node@20.4.6': {}
'@types/nodemailer@6.4.15':
'@types/nodemailer@6.4.16':
dependencies:
'@types/node': 20.14.10
@@ -12838,8 +12835,6 @@ snapshots:
emoji-regex@9.2.2: {}
encode-utf8@1.0.3: {}
end-of-stream@1.4.4:
dependencies:
once: 1.4.0
@@ -15452,9 +15447,9 @@ snapshots:
'@node-rs/argon2': 1.7.0
'@node-rs/bcrypt': 1.9.0
otpauth@9.3.1:
otpauth@9.3.4:
dependencies:
'@noble/hashes': 1.4.0
'@noble/hashes': 1.5.0
p-cancelable@3.0.0: {}
@@ -15708,10 +15703,9 @@ snapshots:
punycode@2.3.1: {}
qrcode@1.5.3:
qrcode@1.5.4:
dependencies:
dijkstrajs: 1.0.3
encode-utf8: 1.0.3
pngjs: 5.0.0
yargs: 15.4.1