dockup-cli 1.0.2 → 1.2.0

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.
package/package.json CHANGED
@@ -1,49 +1,37 @@
1
1
  {
2
2
  "name": "dockup-cli",
3
- "version": "1.0.2",
4
- "description": "Dockup CLI - Manage your databases and workspaces from the terminal",
3
+ "version": "1.2.0",
4
+ "description": "Dockup CLI - deploy, env, logs, registry & more from your terminal (agent-friendly --json)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "dockup": "dist/index.js"
7
+ "dockup": "./bin/dockup"
8
8
  },
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "bin",
12
+ "dockupcli.md"
11
13
  ],
14
+ "engines": {
15
+ "node": ">=18"
16
+ },
12
17
  "scripts": {
13
18
  "build": "tsc",
14
19
  "dev": "ts-node src/index.ts",
15
20
  "start": "node dist/index.js",
16
21
  "prepublishOnly": "npm run build"
17
22
  },
18
- "keywords": [
19
- "cli",
20
- "dockup",
21
- "database",
22
- "postgresql",
23
- "mysql",
24
- "mongodb",
25
- "redis",
26
- "deploy",
27
- "paas"
28
- ],
29
- "author": "Dockup",
30
- "license": "MIT",
31
- "repository": {
32
- "type": "git",
33
- "url": "https://github.com/dockup/cli.git"
34
- },
35
- "homepage": "https://dockup.dev",
36
- "engines": {
37
- "node": ">=18.0.0"
38
- },
39
23
  "dependencies": {
24
+ "axios": "^1.6.0",
40
25
  "chalk": "^4.1.2",
41
26
  "commander": "^11.1.0",
27
+ "conf": "^10.2.0",
28
+ "inquirer": "^8.2.6",
42
29
  "node-fetch": "^2.7.0",
43
30
  "open": "^8.4.2",
44
31
  "ora": "^5.4.1"
45
32
  },
46
33
  "devDependencies": {
34
+ "@types/inquirer": "^8.2.10",
47
35
  "@types/node": "^20.10.0",
48
36
  "@types/node-fetch": "^2.6.13",
49
37
  "ts-node": "^10.9.2",
@@ -1,5 +0,0 @@
1
- export declare function login(options: {
2
- token?: string;
3
- }): Promise<void>;
4
- export declare function logout(): Promise<void>;
5
- export declare function whoami(): Promise<void>;
@@ -1,16 +0,0 @@
1
- export declare function databaseList(): Promise<void>;
2
- export declare function databaseCreate(options: {
3
- name?: string;
4
- type?: string;
5
- }): Promise<void>;
6
- export declare function databaseRename(slug?: string): Promise<void>;
7
- export declare function databaseDelete(slug?: string): Promise<void>;
8
- export declare function databaseCredentials(slug?: string): Promise<void>;
9
- export declare function databaseInfo(slug?: string): Promise<void>;
10
- export declare function databaseLogs(slug?: string, options?: {
11
- tail?: string;
12
- }): Promise<void>;
13
- export declare function databaseRestart(slug?: string): Promise<void>;
14
- export declare function databaseSize(slug?: string): Promise<void>;
15
- export declare function databaseBackupList(slug?: string): Promise<void>;
16
- export declare function databaseBackupCreate(slug?: string): Promise<void>;
@@ -1,5 +0,0 @@
1
- export declare function envList(): Promise<void>;
2
- export declare function envSet(keyValue: string, options: {
3
- secret?: boolean;
4
- }): Promise<void>;
5
- export declare function envRemove(key: string): Promise<void>;
@@ -1,2 +0,0 @@
1
- export declare function link(target?: string): Promise<void>;
2
- export declare function unlink(): Promise<void>;
@@ -1,4 +0,0 @@
1
- export declare function logs(options: {
2
- tail?: string;
3
- follow?: boolean;
4
- }): Promise<void>;
@@ -1,3 +0,0 @@
1
- export declare function open(options: {
2
- dashboard?: boolean;
3
- }): Promise<void>;
@@ -1,2 +0,0 @@
1
- export declare function listProjects(): Promise<void>;
2
- export declare function listServices(projectSlug?: string): Promise<void>;
@@ -1,3 +0,0 @@
1
- export declare function push(branch?: string, options?: {
2
- force?: boolean;
3
- }): Promise<void>;
@@ -1,8 +0,0 @@
1
- export declare function startService(): Promise<void>;
2
- export declare function stopService(): Promise<void>;
3
- export declare function restartService(): Promise<void>;
4
- export declare function deployService(): Promise<void>;
5
- export declare function serviceLogs(options: {
6
- tail?: string;
7
- follow?: boolean;
8
- }): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function status(): Promise<void>;
@@ -1,10 +0,0 @@
1
- export declare function workspaceList(): Promise<void>;
2
- export declare function workspaceCreate(options: {
3
- name?: string;
4
- }): Promise<void>;
5
- export declare function workspaceSelect(): Promise<void>;
6
- export declare function workspaceRename(options: {
7
- name?: string;
8
- }): Promise<void>;
9
- export declare function workspaceDelete(): Promise<void>;
10
- export declare function workspaceCurrent(): Promise<void>;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/lib/api.d.ts DELETED
@@ -1,39 +0,0 @@
1
- declare class ApiClient {
2
- private getHeaders;
3
- get<T = any>(path: string): Promise<T>;
4
- post<T = any>(path: string, body?: any): Promise<T>;
5
- put<T = any>(path: string, body?: any): Promise<T>;
6
- delete<T = any>(path: string): Promise<T>;
7
- verifyToken(): Promise<{
8
- id: string;
9
- email: string;
10
- name: string;
11
- } | null>;
12
- getProjects(): Promise<any[]>;
13
- getServices(projectSlug: string): Promise<any[]>;
14
- deploy(projectSlug: string, serviceSlug: string, options?: {
15
- branch?: string;
16
- }): Promise<any>;
17
- getServiceStatus(projectSlug: string, serviceSlug: string): Promise<any>;
18
- getEnvVariables(projectSlug: string, serviceSlug: string): Promise<any[]>;
19
- setEnvVariable(projectSlug: string, serviceSlug: string, key: string, value: string, isSecret?: boolean): Promise<void>;
20
- deleteEnvVariable(projectSlug: string, serviceSlug: string, key: string): Promise<void>;
21
- getWorkspaces(): Promise<any[]>;
22
- createWorkspace(name: string): Promise<any>;
23
- renameWorkspace(id: string, name: string): Promise<any>;
24
- deleteWorkspace(id: string): Promise<void>;
25
- getDatabases(projectSlug: string): Promise<any[]>;
26
- createDatabase(projectSlug: string, name: string, dbType: string, dbVersion?: string): Promise<any>;
27
- getDatabase(projectSlug: string, dbSlug: string): Promise<any>;
28
- renameDatabase(projectSlug: string, dbSlug: string, name: string): Promise<any>;
29
- deleteDatabase(projectSlug: string, dbSlug: string): Promise<void>;
30
- getDatabaseCredentials(projectSlug: string, dbSlug: string): Promise<any>;
31
- restartDatabase(projectSlug: string, dbSlug: string): Promise<any>;
32
- getDatabaseLogs(projectSlug: string, dbSlug: string, tail?: number): Promise<any>;
33
- getDatabaseSize(projectSlug: string, dbSlug: string): Promise<any>;
34
- getDatabaseBackups(projectSlug: string, dbSlug: string): Promise<any>;
35
- createDatabaseBackup(projectSlug: string, dbSlug: string): Promise<any>;
36
- deleteDatabaseBackup(projectSlug: string, dbSlug: string, backupId: string): Promise<any>;
37
- }
38
- export declare const api: ApiClient;
39
- export {};
@@ -1,51 +0,0 @@
1
- interface ConfigData {
2
- token?: string;
3
- user?: {
4
- id: string;
5
- email: string;
6
- name: string;
7
- };
8
- apiUrl?: string;
9
- currentWorkspace?: {
10
- id: string;
11
- name: string;
12
- slug: string;
13
- };
14
- }
15
- declare const config: {
16
- get(key: keyof ConfigData): any;
17
- set(key: keyof ConfigData, value: any): void;
18
- delete(key: keyof ConfigData): void;
19
- clear(): void;
20
- };
21
- export interface User {
22
- id: string;
23
- email: string;
24
- name: string;
25
- }
26
- export interface ProjectConfig {
27
- projectSlug: string;
28
- serviceSlug: string;
29
- serviceName: string;
30
- projectName: string;
31
- }
32
- export interface Workspace {
33
- id: string;
34
- name: string;
35
- slug: string;
36
- }
37
- export declare function getToken(): string | undefined;
38
- export declare function setToken(token: string): void;
39
- export declare function clearToken(): void;
40
- export declare function getUser(): User | undefined;
41
- export declare function setUser(user: User): void;
42
- export declare function getApiUrl(): string;
43
- export declare function getCurrentWorkspace(): Workspace | undefined;
44
- export declare function setCurrentWorkspace(workspace: Workspace): void;
45
- export declare function clearCurrentWorkspace(): void;
46
- export declare function setApiUrl(url: string): void;
47
- export declare function getProjectConfig(): ProjectConfig | null;
48
- export declare function saveProjectConfig(projectConfig: ProjectConfig): void;
49
- export declare function removeProjectConfig(): boolean;
50
- export declare function isLoggedIn(): boolean;
51
- export default config;