dockup-cli 1.0.1 → 1.1.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/bin/dockup +2 -0
- package/dist/commands/agent.js +356 -0
- package/dist/commands/auth.js +123 -126
- package/dist/commands/database.js +315 -563
- package/dist/commands/env.js +125 -93
- package/dist/commands/link.js +148 -189
- package/dist/commands/logs.js +100 -82
- package/dist/commands/open.js +69 -41
- package/dist/commands/projects.js +128 -94
- package/dist/commands/push.js +138 -122
- package/dist/commands/service.js +143 -119
- package/dist/commands/status.js +116 -89
- package/dist/commands/workspace.js +210 -220
- package/dist/index.js +75 -179
- package/dist/lib/api.js +241 -191
- package/dist/lib/config.js +135 -142
- package/dist/lib/flags.js +36 -0
- package/dist/lib/output.js +65 -0
- package/dist/lib/target.js +40 -0
- package/dockupcli.md +185 -0
- package/package.json +13 -25
- package/dist/commands/auth.d.ts +0 -5
- package/dist/commands/database.d.ts +0 -16
- package/dist/commands/env.d.ts +0 -5
- package/dist/commands/link.d.ts +0 -2
- package/dist/commands/logs.d.ts +0 -4
- package/dist/commands/open.d.ts +0 -3
- package/dist/commands/projects.d.ts +0 -2
- package/dist/commands/push.d.ts +0 -3
- package/dist/commands/service.d.ts +0 -8
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/workspace.d.ts +0 -10
- package/dist/index.d.ts +0 -2
- package/dist/lib/api.d.ts +0 -39
- package/dist/lib/config.d.ts +0 -51
package/package.json
CHANGED
|
@@ -1,49 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dockup-cli",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "Dockup CLI -
|
|
3
|
+
"version": "1.1.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": "
|
|
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",
|
package/dist/commands/auth.d.ts
DELETED
|
@@ -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>;
|
package/dist/commands/env.d.ts
DELETED
package/dist/commands/link.d.ts
DELETED
package/dist/commands/logs.d.ts
DELETED
package/dist/commands/open.d.ts
DELETED
package/dist/commands/push.d.ts
DELETED
|
@@ -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
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 {};
|
package/dist/lib/config.d.ts
DELETED
|
@@ -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;
|