@dokploy/cli 0.29.3 → 0.29.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1846,6 +1846,24 @@ export function registerGeneratedCommands(program) {
1846
1846
  printOutput(data);
1847
1847
  }
1848
1848
  });
1849
+ g_compose
1850
+ .command('preview-template')
1851
+ .description('compose previewTemplate')
1852
+ .requiredOption('--base64 <value>', 'base64')
1853
+ .requiredOption('--appName <value>', 'appName')
1854
+ .option('--serverId <value>', 'serverId')
1855
+ .option('--json', 'Output raw JSON')
1856
+ .action(async (opts) => {
1857
+ const jsonOutput = opts.json;
1858
+ delete opts.json;
1859
+ const data = await apiPost("compose.previewTemplate", opts);
1860
+ if (jsonOutput) {
1861
+ console.log(JSON.stringify(data, null, 2));
1862
+ }
1863
+ else {
1864
+ printOutput(data);
1865
+ }
1866
+ });
1849
1867
  g_compose
1850
1868
  .command('process-template')
1851
1869
  .description('compose processTemplate')
@@ -2309,6 +2327,25 @@ export function registerGeneratedCommands(program) {
2309
2327
  printOutput(data);
2310
2328
  }
2311
2329
  });
2330
+ g_deployment
2331
+ .command('read-logs')
2332
+ .description('deployment readLogs')
2333
+ .requiredOption('--deploymentId <value>', 'deploymentId')
2334
+ .option('--tail <value>', 'tail')
2335
+ .option('--json', 'Output raw JSON')
2336
+ .action(async (opts) => {
2337
+ const jsonOutput = opts.json;
2338
+ delete opts.json;
2339
+ if (opts["tail"] != null)
2340
+ opts["tail"] = Number(opts["tail"]);
2341
+ const data = await apiGet("deployment.readLogs", opts);
2342
+ if (jsonOutput) {
2343
+ console.log(JSON.stringify(data, null, 2));
2344
+ }
2345
+ else {
2346
+ printOutput(data);
2347
+ }
2348
+ });
2312
2349
  g_deployment
2313
2350
  .command('remove-deployment')
2314
2351
  .description('deployment removeDeployment')
package/dist/index.js CHANGED
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
2
3
  import chalk from "chalk";
3
4
  import { program } from "commander";
4
5
  import { registerAuthCommand } from "./commands/auth.js";
5
6
  import { registerGeneratedCommands } from "./generated/commands.js";
7
+ const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
6
8
  const pkg = {
7
9
  name: "dokploy",
8
- version: "0.3.0",
10
+ version: packageJson.version,
9
11
  description: "Dokploy CLI - Manage your Dokploy server",
10
12
  };
11
13
  program
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dokploy/cli",
3
3
  "description": "A CLI to manage dokploy server remotely",
4
- "version": "0.29.3",
4
+ "version": "0.29.5",
5
5
  "author": "Mauricio Siu",
6
6
  "licenses": [
7
7
  {
@@ -42,7 +42,10 @@
42
42
  "license": "MIT",
43
43
  "main": "dist/index.js",
44
44
  "type": "module",
45
- "repository": "Dokploy/cli",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "Dokploy/cli"
48
+ },
46
49
  "types": "dist/index.d.ts",
47
50
  "scripts": {
48
51
  "build": "tsc -b",