hetzner-cli 2.0.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/LICENSE +21 -0
- package/README.md +907 -0
- package/dist/auction/client.d.ts +4 -0
- package/dist/auction/client.js +103 -0
- package/dist/auction/commands.d.ts +2 -0
- package/dist/auction/commands.js +138 -0
- package/dist/auction/formatter.d.ts +3 -0
- package/dist/auction/formatter.js +87 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +39 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +4 -0
- package/dist/cloud/client.d.ts +511 -0
- package/dist/cloud/client.js +706 -0
- package/dist/cloud/commands/certificate.d.ts +2 -0
- package/dist/cloud/commands/certificate.js +77 -0
- package/dist/cloud/commands/context.d.ts +2 -0
- package/dist/cloud/commands/context.js +78 -0
- package/dist/cloud/commands/datacenter.d.ts +2 -0
- package/dist/cloud/commands/datacenter.js +20 -0
- package/dist/cloud/commands/firewall.d.ts +2 -0
- package/dist/cloud/commands/firewall.js +77 -0
- package/dist/cloud/commands/floating-ip.d.ts +2 -0
- package/dist/cloud/commands/floating-ip.js +83 -0
- package/dist/cloud/commands/image.d.ts +2 -0
- package/dist/cloud/commands/image.js +60 -0
- package/dist/cloud/commands/index.d.ts +2 -0
- package/dist/cloud/commands/index.js +41 -0
- package/dist/cloud/commands/iso.d.ts +2 -0
- package/dist/cloud/commands/iso.js +22 -0
- package/dist/cloud/commands/load-balancer-type.d.ts +2 -0
- package/dist/cloud/commands/load-balancer-type.js +20 -0
- package/dist/cloud/commands/load-balancer.d.ts +2 -0
- package/dist/cloud/commands/load-balancer.js +177 -0
- package/dist/cloud/commands/location.d.ts +2 -0
- package/dist/cloud/commands/location.js +20 -0
- package/dist/cloud/commands/network.d.ts +2 -0
- package/dist/cloud/commands/network.js +96 -0
- package/dist/cloud/commands/placement-group.d.ts +2 -0
- package/dist/cloud/commands/placement-group.js +53 -0
- package/dist/cloud/commands/primary-ip.d.ts +2 -0
- package/dist/cloud/commands/primary-ip.js +83 -0
- package/dist/cloud/commands/server-type.d.ts +2 -0
- package/dist/cloud/commands/server-type.js +20 -0
- package/dist/cloud/commands/server.d.ts +2 -0
- package/dist/cloud/commands/server.js +260 -0
- package/dist/cloud/commands/ssh-key.d.ts +2 -0
- package/dist/cloud/commands/ssh-key.js +63 -0
- package/dist/cloud/commands/volume.d.ts +2 -0
- package/dist/cloud/commands/volume.js +92 -0
- package/dist/cloud/context.d.ts +28 -0
- package/dist/cloud/context.js +172 -0
- package/dist/cloud/formatter.d.ts +37 -0
- package/dist/cloud/formatter.js +413 -0
- package/dist/cloud/helpers.d.ts +18 -0
- package/dist/cloud/helpers.js +48 -0
- package/dist/cloud/types.d.ts +398 -0
- package/dist/cloud/types.js +5 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +2 -0
- package/dist/formatter.d.ts +3 -0
- package/dist/formatter.js +6 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +17 -0
- package/dist/robot/client.d.ts +256 -0
- package/dist/robot/client.js +656 -0
- package/dist/robot/commands/auth.d.ts +2 -0
- package/dist/robot/commands/auth.js +54 -0
- package/dist/robot/commands/boot.d.ts +2 -0
- package/dist/robot/commands/boot.js +72 -0
- package/dist/robot/commands/cancel.d.ts +2 -0
- package/dist/robot/commands/cancel.js +36 -0
- package/dist/robot/commands/failover.d.ts +2 -0
- package/dist/robot/commands/failover.js +42 -0
- package/dist/robot/commands/firewall.d.ts +2 -0
- package/dist/robot/commands/firewall.js +66 -0
- package/dist/robot/commands/index.d.ts +2 -0
- package/dist/robot/commands/index.js +36 -0
- package/dist/robot/commands/interactive.d.ts +2 -0
- package/dist/robot/commands/interactive.js +134 -0
- package/dist/robot/commands/ip.d.ts +2 -0
- package/dist/robot/commands/ip.js +52 -0
- package/dist/robot/commands/key.d.ts +2 -0
- package/dist/robot/commands/key.js +64 -0
- package/dist/robot/commands/order.d.ts +2 -0
- package/dist/robot/commands/order.js +33 -0
- package/dist/robot/commands/rdns.d.ts +2 -0
- package/dist/robot/commands/rdns.js +41 -0
- package/dist/robot/commands/reset.d.ts +2 -0
- package/dist/robot/commands/reset.js +77 -0
- package/dist/robot/commands/server.d.ts +2 -0
- package/dist/robot/commands/server.js +29 -0
- package/dist/robot/commands/storagebox.d.ts +2 -0
- package/dist/robot/commands/storagebox.js +116 -0
- package/dist/robot/commands/subnet.d.ts +2 -0
- package/dist/robot/commands/subnet.js +21 -0
- package/dist/robot/commands/traffic.d.ts +2 -0
- package/dist/robot/commands/traffic.js +20 -0
- package/dist/robot/commands/vswitch.d.ts +2 -0
- package/dist/robot/commands/vswitch.js +64 -0
- package/dist/robot/commands/wol.d.ts +2 -0
- package/dist/robot/commands/wol.js +20 -0
- package/dist/robot/formatter.d.ts +58 -0
- package/dist/robot/formatter.js +500 -0
- package/dist/robot/types.d.ts +352 -0
- package/dist/robot/types.js +5 -0
- package/dist/shared/config.d.ts +86 -0
- package/dist/shared/config.js +273 -0
- package/dist/shared/formatter.d.ts +29 -0
- package/dist/shared/formatter.js +118 -0
- package/dist/shared/helpers.d.ts +17 -0
- package/dist/shared/helpers.js +72 -0
- package/dist/shared/reference.d.ts +2 -0
- package/dist/shared/reference.js +626 -0
- package/dist/types.d.ts +75 -0
- package/dist/types.js +1 -0
- package/package.json +112 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export type { Server, ServerSubnet, ServerDetails, Cancellation, ResetType, Reset, BootConfig, RescueConfig, LinuxConfig, VncConfig, WindowsConfig, PleskConfig, CpanelConfig, IP, Mac, Subnet, Failover, Rdns, SshKey, Firewall, FirewallRule, FirewallTemplate, VSwitch, VSwitchServer, VSwitchSubnet, VSwitchCloudNetwork, StorageBox, StorageBoxSnapshot, StorageBoxSnapshotPlan, StorageBoxSubaccount, Traffic, TrafficData, Wol, ServerProduct, ProductPrice, ServerMarketProduct, ServerTransaction, ServerTransactionProduct, ApiResponse, ApiError, } from './robot/types.js';
|
|
2
|
+
export interface AuctionDiskData {
|
|
3
|
+
nvme: number[];
|
|
4
|
+
sata: number[];
|
|
5
|
+
hdd: number[];
|
|
6
|
+
general: number[];
|
|
7
|
+
}
|
|
8
|
+
export interface AuctionIpPrice {
|
|
9
|
+
Monthly: number;
|
|
10
|
+
Hourly: number;
|
|
11
|
+
Amount: number;
|
|
12
|
+
}
|
|
13
|
+
export interface AuctionServer {
|
|
14
|
+
id: number;
|
|
15
|
+
key: number;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string[];
|
|
18
|
+
information: string[] | null;
|
|
19
|
+
cpu: string;
|
|
20
|
+
cpu_count: number;
|
|
21
|
+
is_highio: boolean;
|
|
22
|
+
is_ecc: boolean;
|
|
23
|
+
traffic: string;
|
|
24
|
+
bandwidth: number;
|
|
25
|
+
ram: string[];
|
|
26
|
+
ram_size: number;
|
|
27
|
+
price: number;
|
|
28
|
+
setup_price: number;
|
|
29
|
+
hourly_price: number;
|
|
30
|
+
hdd_arr: string[];
|
|
31
|
+
hdd_hr: string[];
|
|
32
|
+
hdd_size: number;
|
|
33
|
+
hdd_count: number;
|
|
34
|
+
serverDiskData: AuctionDiskData;
|
|
35
|
+
datacenter: string;
|
|
36
|
+
datacenter_hr: string;
|
|
37
|
+
specials: string[];
|
|
38
|
+
dist: string[];
|
|
39
|
+
fixed_price: boolean;
|
|
40
|
+
next_reduce: number;
|
|
41
|
+
next_reduce_hr: boolean;
|
|
42
|
+
next_reduce_timestamp: number;
|
|
43
|
+
ip_price: AuctionIpPrice;
|
|
44
|
+
category?: string;
|
|
45
|
+
cat_id?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface AuctionFilterOptions {
|
|
48
|
+
minPrice?: number;
|
|
49
|
+
maxPrice?: number;
|
|
50
|
+
maxHourlyPrice?: number;
|
|
51
|
+
minRam?: number;
|
|
52
|
+
maxRam?: number;
|
|
53
|
+
cpu?: string;
|
|
54
|
+
datacenter?: string;
|
|
55
|
+
minDiskSize?: number;
|
|
56
|
+
maxDiskSize?: number;
|
|
57
|
+
minDiskCount?: number;
|
|
58
|
+
maxDiskCount?: number;
|
|
59
|
+
diskType?: 'nvme' | 'sata' | 'hdd';
|
|
60
|
+
ecc?: boolean;
|
|
61
|
+
gpu?: boolean;
|
|
62
|
+
inic?: boolean;
|
|
63
|
+
highio?: boolean;
|
|
64
|
+
specials?: string;
|
|
65
|
+
fixedPrice?: boolean;
|
|
66
|
+
maxSetupPrice?: number;
|
|
67
|
+
minCpuCount?: number;
|
|
68
|
+
maxCpuCount?: number;
|
|
69
|
+
minBandwidth?: number;
|
|
70
|
+
text?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface AuctionResponse {
|
|
73
|
+
server: AuctionServer[];
|
|
74
|
+
serverCount: number;
|
|
75
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hetzner-cli",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Unified CLI and Node.js library for Hetzner Robot API (dedicated servers) and Cloud API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./dist/client.d.ts",
|
|
15
|
+
"import": "./dist/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./types": {
|
|
18
|
+
"types": "./dist/types.d.ts",
|
|
19
|
+
"import": "./dist/types.js"
|
|
20
|
+
},
|
|
21
|
+
"./cloud/client": {
|
|
22
|
+
"types": "./dist/cloud/client.d.ts",
|
|
23
|
+
"import": "./dist/cloud/client.js"
|
|
24
|
+
},
|
|
25
|
+
"./cloud/types": {
|
|
26
|
+
"types": "./dist/cloud/types.d.ts",
|
|
27
|
+
"import": "./dist/cloud/types.js"
|
|
28
|
+
},
|
|
29
|
+
"./robot/client": {
|
|
30
|
+
"types": "./dist/robot/client.d.ts",
|
|
31
|
+
"import": "./dist/robot/client.js"
|
|
32
|
+
},
|
|
33
|
+
"./robot/types": {
|
|
34
|
+
"types": "./dist/robot/types.d.ts",
|
|
35
|
+
"import": "./dist/robot/types.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"bin": {
|
|
39
|
+
"hetzner": "./dist/cli.js"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist/**/*.js",
|
|
43
|
+
"dist/**/*.d.ts",
|
|
44
|
+
"!dist/**/*.test.js",
|
|
45
|
+
"!dist/**/*.test.d.ts",
|
|
46
|
+
"README.md",
|
|
47
|
+
"LICENSE"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsc -p tsconfig.build.json",
|
|
51
|
+
"dev": "tsc --watch",
|
|
52
|
+
"start": "node dist/cli.js",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"lint": "eslint src/",
|
|
55
|
+
"lint:fix": "eslint src/ --fix",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"test:watch": "vitest",
|
|
58
|
+
"test:coverage": "vitest run --coverage",
|
|
59
|
+
"audit": "npm audit",
|
|
60
|
+
"check": "npm run typecheck && npm run lint && npm run test",
|
|
61
|
+
"prepublishOnly": "npm run check && npm run build"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"hetzner",
|
|
65
|
+
"hetzner-cloud",
|
|
66
|
+
"hetzner-robot",
|
|
67
|
+
"hcloud",
|
|
68
|
+
"api",
|
|
69
|
+
"cli",
|
|
70
|
+
"dedicated-server",
|
|
71
|
+
"cloud-server",
|
|
72
|
+
"server-management",
|
|
73
|
+
"datacenter",
|
|
74
|
+
"hosting",
|
|
75
|
+
"cloud",
|
|
76
|
+
"infrastructure",
|
|
77
|
+
"load-balancer",
|
|
78
|
+
"firewall",
|
|
79
|
+
"volume"
|
|
80
|
+
],
|
|
81
|
+
"sideEffects": false,
|
|
82
|
+
"author": "ytspar",
|
|
83
|
+
"license": "MIT",
|
|
84
|
+
"repository": {
|
|
85
|
+
"type": "git",
|
|
86
|
+
"url": "git+https://github.com/ytspar/hetzner-cli.git"
|
|
87
|
+
},
|
|
88
|
+
"bugs": {
|
|
89
|
+
"url": "https://github.com/ytspar/hetzner-cli/issues"
|
|
90
|
+
},
|
|
91
|
+
"homepage": "https://github.com/ytspar/hetzner-cli#readme",
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"@inquirer/prompts": "^8.2.0",
|
|
94
|
+
"cli-table3": "^0.6.5",
|
|
95
|
+
"commander": "^14.0.2",
|
|
96
|
+
"dotenv": "^17.2.4",
|
|
97
|
+
"keytar": "^7.9.0"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@eslint/js": "^9.0.0",
|
|
101
|
+
"@types/node": "^22.0.0",
|
|
102
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
103
|
+
"eslint": "^9.0.0",
|
|
104
|
+
"eslint-plugin-security": "^3.0.0",
|
|
105
|
+
"typescript": "^5.7.0",
|
|
106
|
+
"typescript-eslint": "^8.0.0",
|
|
107
|
+
"vitest": "^4.0.18"
|
|
108
|
+
},
|
|
109
|
+
"engines": {
|
|
110
|
+
"node": ">=18.0.0"
|
|
111
|
+
}
|
|
112
|
+
}
|