mirror of
https://github.com/Dokploy/cli.git
synced 2026-06-15 20:25:22 +02:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7088565ac | ||
|
|
468543e309 | ||
|
|
90d0d15013 | ||
|
|
befe6e830a | ||
|
|
a80497db88 | ||
|
|
0429c61fdd | ||
|
|
a93ed49886 | ||
|
|
8e552f974a | ||
|
|
18c44440ba | ||
|
|
865ac21c03 | ||
|
|
9390b36ec0 | ||
|
|
8bbdc2ce11 | ||
|
|
2d0df3ed37 | ||
|
|
91f779fcaf | ||
|
|
49ed66ac12 | ||
|
|
cd876c92a7 | ||
|
|
b6331a6471 | ||
|
|
2df05732e6 | ||
|
|
5985ee7229 | ||
|
|
044d22110a | ||
|
|
a593c3025d | ||
|
|
f552309885 | ||
|
|
74e5482e35 | ||
|
|
a6aa7ab5f4 | ||
|
|
22d0dd10e0 | ||
|
|
05ca9f8ce4 |
1272
openapi.json
1272
openapi.json
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,18 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import chalk from "chalk";
|
||||
import { program } from "commander";
|
||||
import { registerAuthCommand } from "./commands/auth.js";
|
||||
import { registerGeneratedCommands } from "./generated/commands.js";
|
||||
|
||||
const packageJson = JSON.parse(
|
||||
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
|
||||
) as { version: string };
|
||||
|
||||
const pkg = {
|
||||
name: "dokploy",
|
||||
version: "0.3.0",
|
||||
version: packageJson.version,
|
||||
description: "Dokploy CLI - Manage your Dokploy server",
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { execFileSync } from "node:child_process";
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
@@ -6,6 +7,9 @@ import { describe, expect, it } from "vitest";
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const ROOT = path.resolve(__dirname, "..");
|
||||
const CLI = path.join(ROOT, "dist", "index.js");
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(path.join(ROOT, "package.json"), "utf8"),
|
||||
) as { version: string };
|
||||
|
||||
function run(...args: string[]): string {
|
||||
return execFileSync("node", [CLI, ...args], {
|
||||
@@ -25,7 +29,7 @@ describe("CLI", () => {
|
||||
|
||||
it("should show version with --version", () => {
|
||||
const output = run("--version");
|
||||
expect(output.trim()).toMatch(/^\d+\.\d+\.\d+$/);
|
||||
expect(output.trim()).toBe(packageJson.version);
|
||||
});
|
||||
|
||||
it("should show subcommands for application", () => {
|
||||
|
||||
Reference in New Issue
Block a user