Compare commits

..

4 Commits

Author SHA1 Message Date
philkunz e7babf5222 1.0.11 2024-02-17 21:59:11 +01:00
philkunz 63660ecc03 fix(core): update 2024-02-17 21:59:10 +01:00
philkunz 336e27f383 1.0.10 2024-02-17 21:58:11 +01:00
philkunz 9174571ea4 fix(core): update 2024-02-17 21:58:10 +01:00
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@apiclient.xyz/hetznercloud", "name": "@apiclient.xyz/hetznercloud",
"version": "1.0.9", "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
View File
@@ -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);
+1 -1
View File
@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@apiclient.xyz/hetznercloud', name: '@apiclient.xyz/hetznercloud',
version: '1.0.9', version: '1.0.11',
description: 'an unofficial api client for the hetzner cloud api' description: 'an unofficial api client for the hetzner cloud api'
} }
+2 -1
View File
@@ -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,