Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e7babf5222 | |||
| 63660ecc03 | |||
| 336e27f383 | |||
| 9174571ea4 | |||
| 4a722b79b7 | |||
| 866dc35403 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiclient.xyz/hetznercloud",
|
"name": "@apiclient.xyz/hetznercloud",
|
||||||
"version": "1.0.8",
|
"version": "1.0.11",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "an unofficial api client for the hetzner cloud api",
|
"description": "an unofficial api client for the hetzner cloud api",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
|||||||
+2
-1
@@ -19,7 +19,8 @@ tap.test('should be able to list all servers', async () => {
|
|||||||
tap.test('should be able to create a server', async () => {
|
tap.test('should be able to create a server', async () => {
|
||||||
const newServer = await testAccount.createServer({
|
const newServer = await testAccount.createServer({
|
||||||
name: 'testserver',
|
name: 'testserver',
|
||||||
location: 'nbg1'
|
location: 'nbg1',
|
||||||
|
labels: {},
|
||||||
});
|
});
|
||||||
expect(newServer).toBeInstanceOf(hetznercloud.HetznerServer);
|
expect(newServer).toBeInstanceOf(hetznercloud.HetznerServer);
|
||||||
console.log(newServer);
|
console.log(newServer);
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@apiclient.xyz/hetznercloud',
|
name: '@apiclient.xyz/hetznercloud',
|
||||||
version: '1.0.8',
|
version: '1.0.11',
|
||||||
description: 'an unofficial api client for the hetzner cloud api'
|
description: 'an unofficial api client for the hetzner cloud api'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export class HetznerServer {
|
|||||||
optionsArg: {
|
optionsArg: {
|
||||||
name: string;
|
name: string;
|
||||||
location: 'nbg1';
|
location: 'nbg1';
|
||||||
|
labels: {[key: string]: string},
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const server = new HetznerServer(hetznerAccountRefArg);
|
const server = new HetznerServer(hetznerAccountRefArg);
|
||||||
@@ -19,7 +20,7 @@ export class HetznerServer {
|
|||||||
image: 'ubuntu-22.04',
|
image: 'ubuntu-22.04',
|
||||||
server_type: 'cx11',
|
server_type: 'cx11',
|
||||||
start_after_create: true,
|
start_after_create: true,
|
||||||
labels: {},
|
labels: optionsArg.labels || {} as any,
|
||||||
location: optionsArg.location,
|
location: optionsArg.location,
|
||||||
public_net: {
|
public_net: {
|
||||||
enable_ipv4: true,
|
enable_ipv4: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user