Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc53e9f872 | |||
| 646ab4d18c | |||
| aaeb025217 | |||
| 21e37a7a16 | |||
| 4e0dfb0356 | |||
| 84780647da | |||
| 1645d7881a | |||
| 88351db20f | |||
| 18cbf8693f | |||
| 7d64a2bc4d | |||
| 4c327e5e32 | |||
| a898928bd3 | |||
| aba8182422 | |||
| 5412ab524b | |||
| 2f175e9d64 | |||
| d2b1018234 | |||
| e7babf5222 | |||
| 63660ecc03 | |||
| 336e27f383 | |||
| 9174571ea4 | |||
| 4a722b79b7 | |||
| 866dc35403 | |||
| 84d74a131a | |||
| 929404fadd | |||
| 332a4a4195 | |||
| 07d625fa1f | |||
| e7cafd9c1c | |||
| 60725ecdcb | |||
| 8144432377 | |||
| 76a6a2fdb3 | |||
| 1993016c92 | |||
| 51feac6bb3 | |||
| 620e160059 | |||
| 8322e8defd | |||
| 0ac4c6d9a1 | |||
| d4f777d0e6 |
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
|
||||
"spaces": 2,
|
||||
"generator-cli": {
|
||||
"version": "7.2.0"
|
||||
}
|
||||
}
|
||||
+8
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiclient.xyz/hetznercloud",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"private": false,
|
||||
"description": "an unofficial api client for the hetzner cloud api",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -19,10 +19,15 @@
|
||||
"@git.zone/tsbundle": "^2.0.5",
|
||||
"@git.zone/tsrun": "^1.2.46",
|
||||
"@git.zone/tstest": "^1.0.44",
|
||||
"@push.rocks/qenv": "^6.0.5",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.8.7"
|
||||
"@types/node": "^20.11.22"
|
||||
},
|
||||
"dependencies": {
|
||||
"@push.rocks/smartrequest": "^2.0.21",
|
||||
"@tempfix/hetzner-openapi": "^1.0.4",
|
||||
"@tsclass/tsclass": "^4.0.52"
|
||||
},
|
||||
"dependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitlab.com/apiclient.xyz/hetznercloud.git"
|
||||
|
||||
Generated
+87
-60
@@ -4,6 +4,17 @@ settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
dependencies:
|
||||
'@push.rocks/smartrequest':
|
||||
specifier: ^2.0.21
|
||||
version: 2.0.21
|
||||
'@tempfix/hetzner-openapi':
|
||||
specifier: ^1.0.4
|
||||
version: 1.0.4
|
||||
'@tsclass/tsclass':
|
||||
specifier: ^4.0.52
|
||||
version: 4.0.52
|
||||
|
||||
devDependencies:
|
||||
'@git.zone/tsbuild':
|
||||
specifier: ^2.1.25
|
||||
@@ -13,16 +24,19 @@ devDependencies:
|
||||
version: 2.0.15
|
||||
'@git.zone/tsrun':
|
||||
specifier: ^1.2.46
|
||||
version: 1.2.46(@types/node@20.11.10)
|
||||
version: 1.2.46(@types/node@20.11.22)
|
||||
'@git.zone/tstest':
|
||||
specifier: ^1.0.44
|
||||
version: 1.0.86(@types/node@20.11.10)(sinon@17.0.1)
|
||||
version: 1.0.86(@types/node@20.11.22)(sinon@17.0.1)
|
||||
'@push.rocks/qenv':
|
||||
specifier: ^6.0.5
|
||||
version: 6.0.5
|
||||
'@push.rocks/tapbundle':
|
||||
specifier: ^5.0.15
|
||||
version: 5.0.15(sinon@17.0.1)
|
||||
'@types/node':
|
||||
specifier: ^20.8.7
|
||||
version: 20.11.10
|
||||
specifier: ^20.11.22
|
||||
version: 20.11.22
|
||||
|
||||
packages:
|
||||
|
||||
@@ -66,7 +80,7 @@ packages:
|
||||
'@push.rocks/smartstream': 3.0.30
|
||||
'@push.rocks/smarttime': 4.0.6
|
||||
'@push.rocks/webstore': 2.0.13
|
||||
'@tsclass/tsclass': 4.0.46
|
||||
'@tsclass/tsclass': 4.0.52
|
||||
'@types/express': 4.17.21
|
||||
body-parser: 1.20.2
|
||||
cors: 2.8.5
|
||||
@@ -126,6 +140,12 @@ packages:
|
||||
js-tokens: 4.0.0
|
||||
dev: true
|
||||
|
||||
/@configvault.io/interfaces@1.0.17:
|
||||
resolution: {integrity: sha512-bEcCUR2VBDJsTin8HQh8Uw/mlYl2v8A3jMIaQ+MTB9Hrqd6CZL2dL7iJdWyFl/3EIX+LDxWFR+Oq7liIq7w+1Q==}
|
||||
dependencies:
|
||||
'@api.global/typedrequest-interfaces': 3.0.1
|
||||
dev: true
|
||||
|
||||
/@cspotcode/source-map-support@0.8.1:
|
||||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -375,13 +395,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@git.zone/tsrun@1.2.46(@types/node@20.11.10):
|
||||
/@git.zone/tsrun@1.2.46(@types/node@20.11.22):
|
||||
resolution: {integrity: sha512-8miFVBle9Mnjx+uPGI/P+EuWcIOXWjBAkdjN5IYbdp5Ytt4xQODCLh4JSnC9h56UeU1nUxCAxZeJs2e9TXrivA==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@push.rocks/smartfile': 10.0.41
|
||||
'@push.rocks/smartshell': 3.0.3
|
||||
ts-node: 10.9.2(@types/node@20.11.10)(typescript@5.1.6)
|
||||
ts-node: 10.9.2(@types/node@20.11.22)(typescript@5.1.6)
|
||||
typescript: 5.1.6
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
@@ -389,13 +409,13 @@ packages:
|
||||
- '@types/node'
|
||||
dev: true
|
||||
|
||||
/@git.zone/tstest@1.0.86(@types/node@20.11.10)(sinon@17.0.1):
|
||||
/@git.zone/tstest@1.0.86(@types/node@20.11.22)(sinon@17.0.1):
|
||||
resolution: {integrity: sha512-ec95MNeA21L+ob+lvLVCmwPTTC1BY+v/JHLYZ9DOZ9+9buLgx+cJ7VkwGBJCnlWJtqEtJosUrFKTih36iNuT3g==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@api.global/typedserver': 3.0.20
|
||||
'@git.zone/tsbundle': 2.0.15
|
||||
'@git.zone/tsrun': 1.2.46(@types/node@20.11.10)
|
||||
'@git.zone/tsrun': 1.2.46(@types/node@20.11.22)
|
||||
'@push.rocks/consolecolor': 2.0.1
|
||||
'@push.rocks/smartbrowser': 2.0.6
|
||||
'@push.rocks/smartdelay': 3.0.5
|
||||
@@ -588,6 +608,16 @@ packages:
|
||||
symbol-tree: 3.2.4
|
||||
dev: true
|
||||
|
||||
/@push.rocks/qenv@6.0.5:
|
||||
resolution: {integrity: sha512-Id/eSKKqSDUGe+0Cp5HEJ58J1iVv1jQseLUMs9kFTPYwG+NJSETUCRsJV50w5cPv8bRFcSkSU+xVbUbOc1p29A==}
|
||||
dependencies:
|
||||
'@api.global/typedrequest': 3.0.4
|
||||
'@configvault.io/interfaces': 1.0.17
|
||||
'@push.rocks/smartfile': 11.0.4
|
||||
'@push.rocks/smartlog': 3.0.3
|
||||
'@push.rocks/smartpath': 5.0.11
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartbrowser@2.0.6:
|
||||
resolution: {integrity: sha512-Ne+KCVhV/DROc1rHRRw59K6h0+LpQAK9fdOUtgDZ7laLPmB/tmnbUh3IuRDNcIY1iVA9pydoobwjnTjVgio9eQ==}
|
||||
dependencies:
|
||||
@@ -809,7 +839,7 @@ packages:
|
||||
'@push.rocks/smartpromise': 4.0.3
|
||||
'@push.rocks/smartpuppeteer': 2.0.2
|
||||
'@push.rocks/smartunique': 3.0.6
|
||||
'@tsclass/tsclass': 4.0.46
|
||||
'@tsclass/tsclass': 4.0.52
|
||||
'@types/express': 4.17.21
|
||||
express: 4.18.2
|
||||
pdf-merger-js: 3.4.0
|
||||
@@ -823,7 +853,6 @@ packages:
|
||||
|
||||
/@push.rocks/smartpromise@4.0.3:
|
||||
resolution: {integrity: sha512-z3lIso4/6KK3c6NFTVGZ7AOBsGURf8ha3qQtX/OxjZFk5dqS//8PLd0XqghVdIaUlRGmJ7Sfds/efZERWn1tAg==}
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartpuppeteer@2.0.2:
|
||||
resolution: {integrity: sha512-EcYCT0PX++WjfHp7W5UYX3t8x5gSNpJMMUvhA7SHz8b2t76ItslNWxprRcF0CUQyN1fozbf5StZf7dwdGc/dIA==}
|
||||
@@ -846,7 +875,6 @@ packages:
|
||||
'@push.rocks/smarturl': 3.0.7
|
||||
agentkeepalive: 4.5.0
|
||||
form-data: 4.0.0
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartrx@3.0.7:
|
||||
resolution: {integrity: sha512-qCWy0s3RLAgGSnaw/Gu0BNaJ59CsI6RK5OJDCCqxc7P2X/S755vuLtnAR5/0dEjdhCHXHX9ytPZx+o9g/CNiyA==}
|
||||
@@ -874,7 +902,7 @@ packages:
|
||||
'@push.rocks/smartxml': 1.0.8
|
||||
'@push.rocks/smartyaml': 2.0.5
|
||||
'@push.rocks/webrequest': 3.0.34
|
||||
'@tsclass/tsclass': 4.0.46
|
||||
'@tsclass/tsclass': 4.0.52
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartsocket@2.0.24:
|
||||
@@ -968,7 +996,6 @@ packages:
|
||||
|
||||
/@push.rocks/smarturl@3.0.7:
|
||||
resolution: {integrity: sha512-nx4EWjQD9JeO7QVbOsxd1PFeDQYoSQOOOYCZ+r7QWXHLJG52iYzgvJDCQyX6p705HDkYMJWozW2ZzhR22qLKbw==}
|
||||
dev: true
|
||||
|
||||
/@push.rocks/smartxml@1.0.8:
|
||||
resolution: {integrity: sha512-idrPsBj9t6oxkLZJZgWtyZK6PnQ5BVDbBErk0UfGanXgSWJc+ZEKNYjVqr850+Na3+y0CT6AQdug7pnaokygwg==}
|
||||
@@ -1300,6 +1327,10 @@ packages:
|
||||
defer-to-connect: 2.0.1
|
||||
dev: true
|
||||
|
||||
/@tempfix/hetzner-openapi@1.0.4:
|
||||
resolution: {integrity: sha512-PzURoAHokF8VaIVlzWOLUw7ixtAbhQRVnzGeOcUG2/aoTB8pHILChZiZ2yB9+BVb7hmngc0WNwM9hXc8tuXB6g==}
|
||||
dev: false
|
||||
|
||||
/@tempfix/watcher@2.3.0:
|
||||
resolution: {integrity: sha512-a2qVQffcrnetehvwsN+LdipxQ6jejwZLgAvS9/91+C0gP4CKyikY01c0tSs0I4tSL7qHdCw1Fx0quLw+A9uyLA==}
|
||||
dependencies:
|
||||
@@ -1312,11 +1343,10 @@ packages:
|
||||
type-fest: 2.19.0
|
||||
dev: true
|
||||
|
||||
/@tsclass/tsclass@4.0.46:
|
||||
resolution: {integrity: sha512-UovPUvlozv1ftJp4KW5tt4MP/LQCNP3lSCinjyIrLkopOymczyzONUGvSAAwOBf1XBE9bO0tI4KtRuXWN9XBXQ==}
|
||||
/@tsclass/tsclass@4.0.52:
|
||||
resolution: {integrity: sha512-yjASmfnDvgWA1OKYXbz4diLIrPBSk5BpPStKuVkAhrhN8Xw4lc6/oSiJpsosEd8GDwr/FPsY2lgN8/5674vM0w==}
|
||||
dependencies:
|
||||
type-fest: 4.10.1
|
||||
dev: true
|
||||
type-fest: 4.10.2
|
||||
|
||||
/@tsconfig/node10@1.0.9:
|
||||
resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==}
|
||||
@@ -1337,7 +1367,7 @@ packages:
|
||||
/@types/accepts@1.3.7:
|
||||
resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/babel__code-frame@7.0.6:
|
||||
@@ -1348,7 +1378,7 @@ packages:
|
||||
resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
|
||||
dependencies:
|
||||
'@types/connect': 3.4.38
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/buffer-json@2.0.3:
|
||||
@@ -1368,21 +1398,21 @@ packages:
|
||||
/@types/clean-css@4.2.11:
|
||||
resolution: {integrity: sha512-Y8n81lQVTAfP2TOdtJJEsCoYl1AnOkqDqMvXb9/7pfgZZ7r8YrEyurrAvAoAjHOGXKRybay+5CsExqIH6liccw==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@types/co-body@6.1.3:
|
||||
resolution: {integrity: sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
'@types/qs': 6.9.11
|
||||
dev: true
|
||||
|
||||
/@types/connect@3.4.38:
|
||||
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/content-disposition@0.5.8:
|
||||
@@ -1403,13 +1433,13 @@ packages:
|
||||
'@types/connect': 3.4.38
|
||||
'@types/express': 4.17.21
|
||||
'@types/keygrip': 1.0.6
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/cors@2.8.17:
|
||||
resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/debounce@1.2.4:
|
||||
@@ -1423,7 +1453,7 @@ packages:
|
||||
/@types/express-serve-static-core@4.17.42:
|
||||
resolution: {integrity: sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
'@types/qs': 6.9.11
|
||||
'@types/range-parser': 1.2.7
|
||||
'@types/send': 0.17.4
|
||||
@@ -1441,21 +1471,21 @@ packages:
|
||||
/@types/from2@2.3.5:
|
||||
resolution: {integrity: sha512-giavnjf3kNlJnE+HpZA1CQ3UKHxgehzsTuIMGda8pGMbOiLYGVNADEskey44OZcADHm/HOoBany8IV+0x28XFw==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/fs-extra@11.0.4:
|
||||
resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
|
||||
dependencies:
|
||||
'@types/jsonfile': 6.1.4
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/glob@8.1.0:
|
||||
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
|
||||
dependencies:
|
||||
'@types/minimatch': 5.1.2
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/html-minifier@4.0.5:
|
||||
@@ -1505,7 +1535,7 @@ packages:
|
||||
/@types/jsonfile@6.1.4:
|
||||
resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/keygrip@1.0.6:
|
||||
@@ -1528,7 +1558,7 @@ packages:
|
||||
'@types/http-errors': 2.0.4
|
||||
'@types/keygrip': 1.0.6
|
||||
'@types/koa-compose': 3.2.8
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/mime-types@2.1.4:
|
||||
@@ -1555,8 +1585,8 @@ packages:
|
||||
resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==}
|
||||
dev: true
|
||||
|
||||
/@types/node@20.11.10:
|
||||
resolution: {integrity: sha512-rZEfe/hJSGYmdfX9tvcPMYeYPW2sNl50nsw4jZmRcaG0HIAb0WYEpsB05GOb53vjqpyE9GUhlDQ4jLSoB5q9kg==}
|
||||
/@types/node@20.11.22:
|
||||
resolution: {integrity: sha512-/G+IxWxma6V3E+pqK1tSl2Fo1kl41pK1yeCyDsgkF9WlVAme4j5ISYM2zR11bgLFJGLN5sVK40T4RJNuiZbEjA==}
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
dev: true
|
||||
@@ -1589,7 +1619,7 @@ packages:
|
||||
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
|
||||
dependencies:
|
||||
'@types/mime': 1.3.5
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/serve-static@1.15.5:
|
||||
@@ -1597,7 +1627,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/http-errors': 2.0.4
|
||||
'@types/mime': 3.0.4
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/sinon-chai@3.2.12:
|
||||
@@ -1624,7 +1654,7 @@ packages:
|
||||
/@types/through2@2.0.41:
|
||||
resolution: {integrity: sha512-ryQ0tidWkb1O1JuYvWKyMLYEtOWDqF5mHerJzKz/gQpoAaJq2l/dsMPBF0B5BNVT34rbARYJ5/tsZwLfUi2kwQ==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/trusted-types@2.0.7:
|
||||
@@ -1652,20 +1682,20 @@ packages:
|
||||
/@types/ws@7.4.7:
|
||||
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/ws@8.5.10:
|
||||
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
|
||||
/@types/yauzl@2.10.3:
|
||||
resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
@@ -1760,6 +1790,11 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: true
|
||||
|
||||
/@xmldom/xmldom@0.8.10:
|
||||
resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
dev: true
|
||||
|
||||
/accepts@1.3.8:
|
||||
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
@@ -1793,7 +1828,6 @@ packages:
|
||||
engines: {node: '>= 8.0.0'}
|
||||
dependencies:
|
||||
humanize-ms: 1.2.1
|
||||
dev: true
|
||||
|
||||
/aggregate-error@4.0.1:
|
||||
resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==}
|
||||
@@ -1932,7 +1966,6 @@ packages:
|
||||
|
||||
/asynckit@0.4.0:
|
||||
resolution: {integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=}
|
||||
dev: true
|
||||
|
||||
/available-typed-arrays@1.0.5:
|
||||
resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==}
|
||||
@@ -2258,7 +2291,6 @@ packages:
|
||||
engines: {node: '>= 0.8'}
|
||||
dependencies:
|
||||
delayed-stream: 1.0.0
|
||||
dev: true
|
||||
|
||||
/commander@2.20.3:
|
||||
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||
@@ -2469,7 +2501,6 @@ packages:
|
||||
/delayed-stream@1.0.0:
|
||||
resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: true
|
||||
|
||||
/delegates@1.0.0:
|
||||
resolution: {integrity: sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=}
|
||||
@@ -2509,8 +2540,8 @@ packages:
|
||||
engines: {node: '>=0.3.1'}
|
||||
dev: true
|
||||
|
||||
/diff@5.1.0:
|
||||
resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==}
|
||||
/diff@5.2.0:
|
||||
resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==}
|
||||
engines: {node: '>=0.3.1'}
|
||||
dev: true
|
||||
|
||||
@@ -2597,7 +2628,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/cookie': 0.4.1
|
||||
'@types/cors': 2.8.17
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
accepts: 1.3.8
|
||||
base64id: 2.0.0
|
||||
cookie: 0.4.2
|
||||
@@ -2952,7 +2983,6 @@ packages:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.35
|
||||
dev: true
|
||||
|
||||
/forwarded@0.2.0:
|
||||
resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}
|
||||
@@ -3277,7 +3307,6 @@ packages:
|
||||
resolution: {integrity: sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=}
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
|
||||
/iconv-lite@0.4.24:
|
||||
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
|
||||
@@ -3954,14 +3983,12 @@ packages:
|
||||
/mime-db@1.52.0:
|
||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/mime-types@2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
dependencies:
|
||||
mime-db: 1.52.0
|
||||
dev: true
|
||||
|
||||
/mime@1.6.0:
|
||||
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
|
||||
@@ -4079,7 +4106,6 @@ packages:
|
||||
|
||||
/ms@2.1.3:
|
||||
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
||||
dev: true
|
||||
|
||||
/nanocolors@0.2.13:
|
||||
resolution: {integrity: sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==}
|
||||
@@ -4102,8 +4128,8 @@ packages:
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: true
|
||||
|
||||
/nise@5.1.7:
|
||||
resolution: {integrity: sha512-wWtNUhkT7k58uvWTB/Gy26eA/EJKtPZFVAhEilN5UYVmmGRYOURbejRUyKm0Uu9XVEW7K5nBOZfR8VMB4QR2RQ==}
|
||||
/nise@5.1.9:
|
||||
resolution: {integrity: sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==}
|
||||
dependencies:
|
||||
'@sinonjs/commons': 3.0.1
|
||||
'@sinonjs/fake-timers': 11.2.2
|
||||
@@ -4364,6 +4390,8 @@ packages:
|
||||
resolution: {integrity: sha512-mXF9AIgnvq1DP/ZM2R28tAfxP2wKZHYa2DjV0R1KCwcqSzm5Iqh1XQq9rdfAt6dp2DuPP0VHZIaCALc2v1cL5A==}
|
||||
engines: {node: '>=14.18.0', npm: '>=6.14.15'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@xmldom/xmldom': 0.8.10
|
||||
dev: true
|
||||
bundledDependencies:
|
||||
- '@xmldom/xmldom'
|
||||
@@ -4828,8 +4856,8 @@ packages:
|
||||
'@sinonjs/commons': 3.0.1
|
||||
'@sinonjs/fake-timers': 11.2.2
|
||||
'@sinonjs/samsam': 8.0.0
|
||||
diff: 5.1.0
|
||||
nise: 5.1.7
|
||||
diff: 5.2.0
|
||||
nise: 5.1.9
|
||||
supports-color: 7.2.0
|
||||
dev: true
|
||||
|
||||
@@ -5170,7 +5198,7 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/ts-node@10.9.2(@types/node@20.11.10)(typescript@5.1.6):
|
||||
/ts-node@10.9.2(@types/node@20.11.22)(typescript@5.1.6):
|
||||
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -5189,7 +5217,7 @@ packages:
|
||||
'@tsconfig/node12': 1.0.11
|
||||
'@tsconfig/node14': 1.0.3
|
||||
'@tsconfig/node16': 1.0.4
|
||||
'@types/node': 20.11.10
|
||||
'@types/node': 20.11.22
|
||||
acorn: 8.11.3
|
||||
acorn-walk: 8.3.2
|
||||
arg: 4.1.3
|
||||
@@ -5225,10 +5253,9 @@ packages:
|
||||
engines: {node: '>=12.20'}
|
||||
dev: true
|
||||
|
||||
/type-fest@4.10.1:
|
||||
resolution: {integrity: sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==}
|
||||
/type-fest@4.10.2:
|
||||
resolution: {integrity: sha512-anpAG63wSpdEbLwOqH8L84urkL6PiVIov3EMmgIhhThevh9aiMQov+6Btx0wldNcvm4wV+e2/Rt1QdDwKHFbHw==}
|
||||
engines: {node: '>=16'}
|
||||
dev: true
|
||||
|
||||
/type-is@1.6.18:
|
||||
resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
|
||||
|
||||
@@ -23,8 +23,17 @@ PackagePhobia (package size on registry) | [ | [](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
Use TypeScript for best in class intellisense
|
||||
For further information read the linked docs at the top of this readme.
|
||||
A modern approach to talking to the hetzner API.
|
||||
|
||||
```typescript
|
||||
// assuming top level await here
|
||||
import hetznerCloud from '@apiclient.xyz/hetznercloud'
|
||||
const myhetznerAccount = new hetznerCloud.HetznerAccount('myToken');
|
||||
const servers = await myhetznerAccount.getServers();
|
||||
for (const server of servers) {
|
||||
await server.delete();
|
||||
}
|
||||
```
|
||||
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
|
||||
+39
-5
@@ -1,8 +1,42 @@
|
||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||||
import * as hetznercloud from '../ts/index.js'
|
||||
import * as hetznercloud from '../ts/index.js';
|
||||
import * as qenv from '@push.rocks/qenv';
|
||||
const testQenv = new qenv.Qenv('./', './.nogit/');
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(hetznercloud)
|
||||
})
|
||||
let testAccount: hetznercloud.HetznerAccount;
|
||||
|
||||
tap.start()
|
||||
tap.test('should create a valid hetzer account', async () => {
|
||||
testAccount = new hetznercloud.HetznerAccount(
|
||||
await testQenv.getEnvVarOnDemand('HETZNER_API_TOKEN')
|
||||
);
|
||||
expect(testAccount).toBeInstanceOf(hetznercloud.HetznerAccount);
|
||||
});
|
||||
|
||||
tap.test('should be able to list all servers', async () => {
|
||||
const servers = await testAccount.getServers();
|
||||
expect(servers).toBeArray();
|
||||
console.log(JSON.stringify(servers, null, 2));
|
||||
});
|
||||
|
||||
const testserver = tap.test('should be able to create a server', async (toolsArg) => {
|
||||
const newServer = await testAccount.createServer({
|
||||
name: 'testserver',
|
||||
location: 'nbg1',
|
||||
type: 'cpx41',
|
||||
labels: {
|
||||
servezoneId: 'testzone',
|
||||
},
|
||||
});
|
||||
expect(newServer).toBeInstanceOf(hetznercloud.HetznerServer);
|
||||
console.log(newServer);
|
||||
await toolsArg.delayFor(10000);
|
||||
return newServer;
|
||||
});
|
||||
|
||||
tap.test('should be able to delete a server', async () => {
|
||||
const testServer: hetznercloud.HetznerServer =
|
||||
await (testserver.testResultPromise as Promise<hetznercloud.HetznerServer>);
|
||||
// await testServer.delete();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@apiclient.xyz/hetznercloud',
|
||||
version: '1.0.2',
|
||||
version: '1.1.0',
|
||||
description: 'an unofficial api client for the hetzner cloud api'
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import { HetznerServer } from './classes.server.js';
|
||||
import * as plugins from './hetznercloud.plugins.js';
|
||||
|
||||
export class HetznerAccount {
|
||||
public token: string;
|
||||
constructor(tokenArg: string) {
|
||||
this.token = tokenArg;
|
||||
}
|
||||
|
||||
public async getServers() {
|
||||
return HetznerServer.getServers(this);
|
||||
}
|
||||
|
||||
public async getServersByLabel(labelObject: plugins.tsclass.typeFestOwn.SecondArgument<typeof HetznerServer.getServersByLabel>) {
|
||||
return HetznerServer.getServersByLabel(this, labelObject);
|
||||
}
|
||||
|
||||
public async createServer(optionsArg: plugins.tsclass.typeFestOwn.SecondArgument<typeof HetznerServer.create>) {
|
||||
return HetznerServer.create(this, optionsArg);
|
||||
}
|
||||
|
||||
/**
|
||||
* request things from the hetzner API
|
||||
* @param methodArg
|
||||
* @param pathArg
|
||||
* @param payloadArg
|
||||
*/
|
||||
public request = async (methodArg: string, pathArg: string, payloadArg: any) => {
|
||||
const url = `https://api.hetzner.cloud/v1${pathArg}`;
|
||||
console.log(`Url: ${url}`);
|
||||
console.log(`Method: ${methodArg}`);
|
||||
console.log(`Payload: ${JSON.stringify(payloadArg, null, 2)}`);
|
||||
const response = await plugins.smartrequest.request(url, {
|
||||
method: methodArg,
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.token}`,
|
||||
},
|
||||
requestBody: payloadArg,
|
||||
keepAlive: false,
|
||||
});
|
||||
console.log(response.statusCode);
|
||||
console.log(response.body);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// Hetzner Cloud Firewall Class
|
||||
import type { HetznerAccount } from './classes.account.js';
|
||||
import * as plugins from './hetznercloud.plugins.js';
|
||||
import * as types from './types.js';
|
||||
|
||||
export class HetznerFirewall {
|
||||
// STATIC
|
||||
public static create = async (
|
||||
hetznerAccountRefArg: HetznerAccount,
|
||||
optionsArg: {
|
||||
name: string;
|
||||
labels?: {[key: string]: string},
|
||||
rules: types.IFirewall['rules'],
|
||||
}
|
||||
) => {
|
||||
const firewall = new HetznerFirewall(hetznerAccountRefArg);
|
||||
|
||||
const createFirewallUrl = '/firewalls';
|
||||
const createFirewallPayload: types.TFirewallCreateRequestBody = {
|
||||
name: optionsArg.name,
|
||||
labels: optionsArg.labels || {} as any,
|
||||
rules: optionsArg.rules
|
||||
};
|
||||
const response = await firewall.hetznerAccountRef.request(
|
||||
'POST',
|
||||
createFirewallUrl,
|
||||
createFirewallPayload
|
||||
);
|
||||
firewall.data = (response.body as types.TFirewallCreateResponseBody).firewall;
|
||||
return firewall;
|
||||
}
|
||||
|
||||
public static getFirewalls = async (hetznerAccountRefArg: HetznerAccount) => {
|
||||
const firewallsGetUrl = '/firewalls';
|
||||
const response = await hetznerAccountRefArg.request('GET', firewallsGetUrl, {});
|
||||
const firewallsDataArray = (response.body as types.TFirewallsGetResponseBody).firewalls;
|
||||
const firewalls: HetznerFirewall[] = [];
|
||||
for (const firewallData of firewallsDataArray) {
|
||||
const firewall = new HetznerFirewall(hetznerAccountRefArg);
|
||||
firewall.data = firewallData;
|
||||
firewalls.push(firewall);
|
||||
}
|
||||
return firewalls;
|
||||
}
|
||||
|
||||
public static getFirewallsByLabel = async (hetznerAccountRefArg: HetznerAccount, labelObject: {[key: string]: string}) => {
|
||||
const firewalls = await HetznerFirewall.getFirewalls(hetznerAccountRefArg);
|
||||
const results: HetznerFirewall[] = [];
|
||||
for (const firewall of firewalls) {
|
||||
let isMatch = true;
|
||||
for (const key in labelObject) {
|
||||
if (firewall.data.labels[key] !== labelObject[key]) {
|
||||
isMatch = false;
|
||||
}
|
||||
}
|
||||
if (isMatch) {
|
||||
results.push(firewall);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public data: types.IFirewall;
|
||||
public hetznerAccountRef: HetznerAccount;
|
||||
|
||||
constructor(hetznerAccountRefArg: HetznerAccount) {
|
||||
this.hetznerAccountRef = hetznerAccountRefArg;
|
||||
}
|
||||
|
||||
public async delete() {
|
||||
await this.hetznerAccountRef.request('DELETE', `/firewalls/${this.data.id}`, {});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import type { HetznerAccount } from './classes.account.js';
|
||||
import * as plugins from './hetznercloud.plugins.js';
|
||||
import * as types from './types.js';
|
||||
|
||||
export class HetznerServer {
|
||||
// STATIC
|
||||
public static async create(
|
||||
hetznerAccountRefArg: HetznerAccount,
|
||||
optionsArg: {
|
||||
name: string;
|
||||
type: types.THetznerCloudServerName;
|
||||
location: types.THetznerCloudLocationName;
|
||||
labels?: {[key: string]: string},
|
||||
userData?: string,
|
||||
}
|
||||
) {
|
||||
const server = new HetznerServer(hetznerAccountRefArg);
|
||||
|
||||
const createServerUrl = '/servers';
|
||||
const createServerPayload: types.TServerCreateRequestBody = {
|
||||
name: optionsArg.name,
|
||||
image: 'ubuntu-22.04',
|
||||
server_type: optionsArg.type,
|
||||
start_after_create: true,
|
||||
labels: optionsArg.labels || {} as any,
|
||||
location: optionsArg.location,
|
||||
user_data: optionsArg.userData || '',
|
||||
public_net: {
|
||||
enable_ipv4: true,
|
||||
enable_ipv6: true,
|
||||
},
|
||||
};
|
||||
const response = await server.hetznerAccountRef.request(
|
||||
'POST',
|
||||
createServerUrl,
|
||||
createServerPayload
|
||||
);
|
||||
server.data = (response.body as types.TServerCreateResponseBody).server;
|
||||
return server;
|
||||
}
|
||||
|
||||
public static async getServers(hetznerAccountRefArg: HetznerAccount) {
|
||||
const serversGetUrl = '/servers';
|
||||
const response = await hetznerAccountRefArg.request('GET', serversGetUrl, {});
|
||||
const serversDataArray = (response.body as types.TServersGetResponseBody).servers;
|
||||
const servers: HetznerServer[] = [];
|
||||
for (const serverData of serversDataArray) {
|
||||
const server = new HetznerServer(hetznerAccountRefArg);
|
||||
server.data = serverData;
|
||||
servers.push(server);
|
||||
}
|
||||
return servers;
|
||||
}
|
||||
|
||||
public static async getServersByLabel(hetznerAccountRefArg: HetznerAccount, labelObject: {[key: string]: string}) {
|
||||
const servers = await HetznerServer.getServers(hetznerAccountRefArg);
|
||||
const results: HetznerServer[] = [];
|
||||
for (const server of servers) {
|
||||
let isMatch = true;
|
||||
for (const key in labelObject) {
|
||||
if (server.data.labels[key] !== labelObject[key]) {
|
||||
isMatch = false;
|
||||
}
|
||||
}
|
||||
if (isMatch) {
|
||||
results.push(server);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public hetznerAccountRef: HetznerAccount;
|
||||
public data: types.IServer;
|
||||
|
||||
constructor(hetznerAccountRefArg: HetznerAccount) {
|
||||
this.hetznerAccountRef = hetznerAccountRefArg;
|
||||
}
|
||||
|
||||
public async delete() {
|
||||
await this.hetznerAccountRef.request('DELETE', `/servers/${this.data.id}`, {});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import type { HetznerAccount } from './classes.account.js';
|
||||
import type { HetznerServer } from './classes.server.js';
|
||||
import * as plugins from './hetznercloud.plugins.js';
|
||||
import * as types from './types.js';
|
||||
|
||||
export class Volume {
|
||||
public static create = async (
|
||||
hetznerAccountRefArg: HetznerAccount,
|
||||
optionsArg: {
|
||||
name: string;
|
||||
size: number;
|
||||
location: types.THetznerCloudLocationName;
|
||||
labels?: {[key: string]: string},
|
||||
server: HetznerServer,
|
||||
}
|
||||
) => {
|
||||
const volume = new Volume(hetznerAccountRefArg);
|
||||
|
||||
const createVolumeUrl = '/volumes';
|
||||
const createVolumePayload: types.TVolumeCreateRequestBody = {
|
||||
name: optionsArg.name,
|
||||
size: optionsArg.size,
|
||||
location: optionsArg.location,
|
||||
labels: optionsArg.labels || {} as any,
|
||||
server: optionsArg.server.data.id,
|
||||
format: 'xfs'
|
||||
};
|
||||
const response = await volume.hetznerAccountRef.request(
|
||||
'POST',
|
||||
createVolumeUrl,
|
||||
createVolumePayload
|
||||
);
|
||||
volume.data = (response.body as types.TVolumeCreateResponseBody).volume;
|
||||
return volume;
|
||||
}
|
||||
|
||||
public static getVolumes = async (hetznerAccountRefArg: HetznerAccount) => {
|
||||
const volumesGetUrl = '/volumes';
|
||||
const response = await hetznerAccountRefArg.request('GET', volumesGetUrl, {});
|
||||
const volumesDataArray = (response.body as types.TVolumeGetResponseBody).volumes;
|
||||
const volumes: Volume[] = [];
|
||||
for (const volumeData of volumesDataArray) {
|
||||
const volume = new Volume(hetznerAccountRefArg);
|
||||
volume.data = volumeData;
|
||||
volumes.push(volume);
|
||||
}
|
||||
return volumes;
|
||||
}
|
||||
|
||||
public static getVolumesByLabel = async (hetznerAccountRefArg: HetznerAccount, labelObject: {[key: string]: string}) => {
|
||||
const volumes = await Volume.getVolumes(hetznerAccountRefArg);
|
||||
const results: Volume[] = [];
|
||||
for (const volume of volumes) {
|
||||
let isMatch = true;
|
||||
for (const key in labelObject) {
|
||||
if (volume.data.labels[key] !== labelObject[key]) {
|
||||
isMatch = false;
|
||||
}
|
||||
}
|
||||
if (isMatch) {
|
||||
results.push(volume);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public data: types.IVolume;
|
||||
public hetznerAccountRef: HetznerAccount;
|
||||
|
||||
constructor(hetznerAccountRefArg: HetznerAccount) {
|
||||
this.hetznerAccountRef = hetznerAccountRefArg;
|
||||
}
|
||||
|
||||
public delete = async () => {
|
||||
await this.hetznerAccountRef.request('DELETE', `/volumes/${this.data.id}`, {});
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,19 @@
|
||||
const removeme = {};
|
||||
import * as hetznerOpenapi from '@tempfix/hetzner-openapi';
|
||||
|
||||
export {
|
||||
removeme
|
||||
hetznerOpenapi
|
||||
}
|
||||
|
||||
// @push.rocks
|
||||
import * as smartrequest from '@push.rocks/smartrequest';
|
||||
|
||||
export {
|
||||
smartrequest,
|
||||
}
|
||||
|
||||
// @tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass,
|
||||
}
|
||||
|
||||
+4
-3
@@ -1,3 +1,4 @@
|
||||
import * as plugins from './hetznercloud.plugins.js';
|
||||
|
||||
export let demoExport = 'Hi there! :) This is an exported string';
|
||||
export * from './classes.account.js';
|
||||
export * from './classes.server.js';
|
||||
export * from './classes.volume.js';
|
||||
export * from './classes.firewall.js';
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
import * as plugins from './hetznercloud.plugins.js';
|
||||
|
||||
// datacenters
|
||||
export type TDatacenters = plugins.hetznerOpenapi.paths['/datacenters']['get']['responses']['200']['content']['application/json'];
|
||||
|
||||
// servers
|
||||
export type IServer = plugins.hetznerOpenapi.paths['/servers/{id}']['get']['responses']['200']['content']['application/json']['server'];
|
||||
export type TServersGetRequestBody = {};
|
||||
export type TServersGetResponseBody = plugins.hetznerOpenapi.paths['/servers']['get']['responses']['200']['content']['application/json'];
|
||||
export type TServerCreateRequestBody = plugins.hetznerOpenapi.paths['/servers']['post']['requestBody']['content']['application/json'];
|
||||
export type TServerCreateResponseBody = plugins.hetznerOpenapi.paths['/servers']['post']['responses']['201']['content']['application/json'];
|
||||
export type TServerDeleteRequestBody = plugins.hetznerOpenapi.paths['/servers/{id}']['delete'];
|
||||
|
||||
// server types
|
||||
export type THetznerCloudServerName =
|
||||
| 'cx11'
|
||||
| 'cx21'
|
||||
| 'cx31'
|
||||
| 'cx41'
|
||||
| 'cx51'
|
||||
| 'ccx11'
|
||||
| 'ccx21'
|
||||
| 'ccx31'
|
||||
| 'ccx41'
|
||||
| 'ccx51'
|
||||
| 'ccx13'
|
||||
| 'ccx23'
|
||||
| 'ccx33'
|
||||
| 'ccx43'
|
||||
| 'ccx53'
|
||||
| 'ccx63'
|
||||
| 'cpx11'
|
||||
| 'cpx21'
|
||||
| 'cpx31'
|
||||
| 'cpx41'
|
||||
| 'cpx51'
|
||||
| 'cpx61'
|
||||
| 'cpx70'
|
||||
| 'cpx71'
|
||||
| 'cpx90';
|
||||
|
||||
// location types
|
||||
export type THetznerCloudLocationName = 'fsn1' | 'nbg1' | 'hel1' | 'ash' | 'hil';
|
||||
|
||||
// volumes
|
||||
export type IVolume = plugins.hetznerOpenapi.paths['/volumes/{id}']['get']['responses']['200']['content']['application/json']['volume'];
|
||||
export type TVolumeGetRequestBody = {};
|
||||
export type TVolumeGetResponseBody = plugins.hetznerOpenapi.paths['/volumes']['get']['responses']['200']['content']['application/json'];
|
||||
export type TVolumeCreateRequestBody = plugins.hetznerOpenapi.paths['/volumes']['post']['requestBody']['content']['application/json'];
|
||||
export type TVolumeCreateResponseBody = plugins.hetznerOpenapi.paths['/volumes']['post']['responses']['201']['content']['application/json'];
|
||||
export type TVolumeDeleteRequestBody = plugins.hetznerOpenapi.paths['/volumes/{id}']['delete'];
|
||||
|
||||
// firewalls
|
||||
export type IFirewall = plugins.hetznerOpenapi.paths['/firewalls/{id}']['get']['responses']['200']['content']['application/json']['firewall'];
|
||||
export type TFirewallsGetRequestBody = {};
|
||||
export type TFirewallsGetResponseBody = plugins.hetznerOpenapi.paths['/firewalls']['get']['responses']['200']['content']['application/json'];
|
||||
export type TFirewallCreateRequestBody = plugins.hetznerOpenapi.paths['/firewalls']['post']['requestBody']['content']['application/json'];
|
||||
export type TFirewallCreateResponseBody = plugins.hetznerOpenapi.paths['/firewalls']['post']['responses']['201']['content']['application/json'];
|
||||
export type TFirewallDeleteRequestBody = plugins.hetznerOpenapi.paths['/firewalls/{id}']['delete'];
|
||||
@@ -1,4 +0,0 @@
|
||||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
||||
@@ -1,23 +0,0 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -1,258 +0,0 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
api.ts
|
||||
api/actionsApi.ts
|
||||
api/apis.ts
|
||||
api/certificateActionsApi.ts
|
||||
api/certificatesApi.ts
|
||||
api/datacentersApi.ts
|
||||
api/firewallActionsApi.ts
|
||||
api/firewallsApi.ts
|
||||
api/floatingIPActionsApi.ts
|
||||
api/floatingIPsApi.ts
|
||||
api/iSOsApi.ts
|
||||
api/imageActionsApi.ts
|
||||
api/imagesApi.ts
|
||||
api/loadBalancerActionsApi.ts
|
||||
api/loadBalancerTypesApi.ts
|
||||
api/loadBalancersApi.ts
|
||||
api/locationsApi.ts
|
||||
api/networkActionsApi.ts
|
||||
api/networksApi.ts
|
||||
api/placementGroupsApi.ts
|
||||
api/pricingApi.ts
|
||||
api/primaryIPActionsApi.ts
|
||||
api/primaryIPsApi.ts
|
||||
api/sSHKeysApi.ts
|
||||
api/serverActionsApi.ts
|
||||
api/serverTypesApi.ts
|
||||
api/serversApi.ts
|
||||
api/volumeActionsApi.ts
|
||||
api/volumesApi.ts
|
||||
git_push.sh
|
||||
model/action.ts
|
||||
model/actionError.ts
|
||||
model/actionResourcesInner.ts
|
||||
model/actionResponse.ts
|
||||
model/actionsResponse.ts
|
||||
model/actionsResponseMeta.ts
|
||||
model/actionsResponseMetaPagination.ts
|
||||
model/addDeleteRouteRequest.ts
|
||||
model/addSubnetRequest.ts
|
||||
model/addTargetRequest.ts
|
||||
model/addTargetRequestLabelSelector.ts
|
||||
model/addTargetRequestServer.ts
|
||||
model/addToPlacementGroupRequest.ts
|
||||
model/applyToResourcesRequest.ts
|
||||
model/assignFloatingIPRequest.ts
|
||||
model/assignPrimaryIPRequest.ts
|
||||
model/attachToNetworkRequest.ts
|
||||
model/attachVolumeRequest.ts
|
||||
model/certificate.ts
|
||||
model/certificateResponse.ts
|
||||
model/certificateStatus.ts
|
||||
model/certificateStatusError.ts
|
||||
model/certificateUsedByInner.ts
|
||||
model/certificatesResponse.ts
|
||||
model/changeDNSPTRRequest.ts
|
||||
model/changeIPRangeRequest.ts
|
||||
model/changeLoadbalancerDnsPtrRequest.ts
|
||||
model/changeProtectionRequest.ts
|
||||
model/changeProtectionRequest1.ts
|
||||
model/changeProtectionRequest2.ts
|
||||
model/changeTypeRequest.ts
|
||||
model/createCertificateRequest.ts
|
||||
model/createCertificateResponse.ts
|
||||
model/createFirewallRequest.ts
|
||||
model/createFirewallRequestApplyToInner.ts
|
||||
model/createFirewallRequestApplyToInnerLabelSelector.ts
|
||||
model/createFirewallRequestApplyToInnerServer.ts
|
||||
model/createFirewallResponse.ts
|
||||
model/createFloatingIPRequest.ts
|
||||
model/createImageRequest.ts
|
||||
model/createLoadBalancerRequest.ts
|
||||
model/createLoadBalancerRequestLabels.ts
|
||||
model/createNetworkRequest.ts
|
||||
model/createNetworkRequestSubnetsInner.ts
|
||||
model/createPlacementGroupRequest.ts
|
||||
model/createPlacementGroupResponse.ts
|
||||
model/createPrimaryIPRequest.ts
|
||||
model/createPrimaryIPResponse.ts
|
||||
model/createServerRequest.ts
|
||||
model/createServerRequestFirewallsInner.ts
|
||||
model/createServerRequestPublicNet.ts
|
||||
model/createServerResponse.ts
|
||||
model/createVolumeRequest.ts
|
||||
model/datacentersGet200Response.ts
|
||||
model/datacentersGet200ResponseDatacentersInner.ts
|
||||
model/datacentersGet200ResponseDatacentersInnerLocation.ts
|
||||
model/datacentersGet200ResponseDatacentersInnerServerTypes.ts
|
||||
model/datacentersIdGet200Response.ts
|
||||
model/deleteSubnetRequest.ts
|
||||
model/deprecationInfo.ts
|
||||
model/detachFromNetworkRequest.ts
|
||||
model/firewall.ts
|
||||
model/firewallAppliedToInner.ts
|
||||
model/firewallAppliedToInnerAppliedToResourcesInner.ts
|
||||
model/firewallAppliedToInnerAppliedToResourcesInnerServer.ts
|
||||
model/firewallAppliedToInnerLabelSelector.ts
|
||||
model/firewallApplyToResources.ts
|
||||
model/firewallApplyToResourcesLabelSelector.ts
|
||||
model/firewallApplyToResourcesServer.ts
|
||||
model/firewallRemoveFromResources.ts
|
||||
model/firewallResponse.ts
|
||||
model/firewallsResponse.ts
|
||||
model/floatingIpsGet200Response.ts
|
||||
model/floatingIpsGet200ResponseFloatingIpsInner.ts
|
||||
model/floatingIpsGet200ResponseFloatingIpsInnerDnsPtrInner.ts
|
||||
model/floatingIpsGet200ResponseFloatingIpsInnerHomeLocation.ts
|
||||
model/floatingIpsGet200ResponseFloatingIpsInnerProtection.ts
|
||||
model/floatingIpsIdActionsGet200Response.ts
|
||||
model/floatingIpsIdGet200Response.ts
|
||||
model/floatingIpsPost201Response.ts
|
||||
model/imagesGet200Response.ts
|
||||
model/imagesGet200ResponseImagesInner.ts
|
||||
model/imagesGet200ResponseImagesInnerCreatedFrom.ts
|
||||
model/imagesIdActionsChangeProtectionPostRequest.ts
|
||||
model/imagesIdGet200Response.ts
|
||||
model/isosGet200Response.ts
|
||||
model/isosGet200ResponseIsosInner.ts
|
||||
model/isosIdGet200Response.ts
|
||||
model/loadBalancerAlgorithm.ts
|
||||
model/loadBalancerService.ts
|
||||
model/loadBalancerServiceHTTP.ts
|
||||
model/loadBalancerServiceHTTP1.ts
|
||||
model/loadBalancerServiceHealthCheck.ts
|
||||
model/loadBalancerServiceHealthCheckHttp.ts
|
||||
model/loadBalancerTarget.ts
|
||||
model/loadBalancerTargetHealthStatusInner.ts
|
||||
model/loadBalancerTargetIP.ts
|
||||
model/loadBalancerTargetLabelSelector.ts
|
||||
model/loadBalancerTargetServer.ts
|
||||
model/loadBalancerTargetTarget.ts
|
||||
model/loadBalancerTypesGet200Response.ts
|
||||
model/loadBalancerTypesGet200ResponseLoadBalancerTypesInner.ts
|
||||
model/loadBalancerTypesGet200ResponseLoadBalancerTypesInnerPricesInner.ts
|
||||
model/loadBalancerTypesGet200ResponseLoadBalancerTypesInnerPricesInnerPriceHourly.ts
|
||||
model/loadBalancerTypesGet200ResponseLoadBalancerTypesInnerPricesInnerPriceMonthly.ts
|
||||
model/loadBalancerTypesIdGet200Response.ts
|
||||
model/loadBalancersGet200Response.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInner.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInnerAlgorithm.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInnerLocation.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInnerPrivateNetInner.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInnerPublicNet.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInnerPublicNetIpv4.ts
|
||||
model/loadBalancersGet200ResponseLoadBalancersInnerPublicNetIpv6.ts
|
||||
model/loadBalancersIdActionsAttachToNetworkPostRequest.ts
|
||||
model/loadBalancersIdActionsChangeAlgorithmPostRequest.ts
|
||||
model/loadBalancersIdActionsChangeProtectionPostRequest.ts
|
||||
model/loadBalancersIdActionsDeleteServicePostRequest.ts
|
||||
model/loadBalancersIdActionsDetachFromNetworkPostRequest.ts
|
||||
model/loadBalancersIdGet200Response.ts
|
||||
model/loadBalancersIdMetricsGet200Response.ts
|
||||
model/loadBalancersIdMetricsGet200ResponseMetrics.ts
|
||||
model/loadBalancersIdMetricsGet200ResponseMetricsTimeSeriesValue.ts
|
||||
model/loadBalancersIdMetricsGet200ResponseMetricsTimeSeriesValueValuesInnerInner.ts
|
||||
model/loadBalancersIdPutRequest.ts
|
||||
model/loadBalancersPost201Response.ts
|
||||
model/locationsGet200Response.ts
|
||||
model/locationsIdGet200Response.ts
|
||||
model/models.ts
|
||||
model/networksGet200Response.ts
|
||||
model/networksGet200ResponseNetworksInner.ts
|
||||
model/networksGet200ResponseNetworksInnerProtection.ts
|
||||
model/networksGet200ResponseNetworksInnerRoutesInner.ts
|
||||
model/networksGet200ResponseNetworksInnerSubnetsInner.ts
|
||||
model/networksPost201Response.ts
|
||||
model/nullableAction.ts
|
||||
model/placementGroup.ts
|
||||
model/placementGroupNullable.ts
|
||||
model/placementGroupResponse.ts
|
||||
model/placementGroupsResponse.ts
|
||||
model/pricingGet200Response.ts
|
||||
model/pricingGet200ResponsePricing.ts
|
||||
model/pricingGet200ResponsePricingFloatingIp.ts
|
||||
model/pricingGet200ResponsePricingFloatingIpPriceMonthly.ts
|
||||
model/pricingGet200ResponsePricingFloatingIpsInner.ts
|
||||
model/pricingGet200ResponsePricingFloatingIpsInnerPricesInner.ts
|
||||
model/pricingGet200ResponsePricingFloatingIpsInnerPricesInnerPriceMonthly.ts
|
||||
model/pricingGet200ResponsePricingImage.ts
|
||||
model/pricingGet200ResponsePricingLoadBalancerTypesInner.ts
|
||||
model/pricingGet200ResponsePricingLoadBalancerTypesInnerPricesInner.ts
|
||||
model/pricingGet200ResponsePricingLoadBalancerTypesInnerPricesInnerPriceHourly.ts
|
||||
model/pricingGet200ResponsePricingLoadBalancerTypesInnerPricesInnerPriceMonthly.ts
|
||||
model/pricingGet200ResponsePricingPrimaryIpsInner.ts
|
||||
model/pricingGet200ResponsePricingPrimaryIpsInnerPricesInner.ts
|
||||
model/pricingGet200ResponsePricingPrimaryIpsInnerPricesInnerPriceHourly.ts
|
||||
model/pricingGet200ResponsePricingPrimaryIpsInnerPricesInnerPriceMonthly.ts
|
||||
model/pricingGet200ResponsePricingServerBackup.ts
|
||||
model/pricingGet200ResponsePricingServerTypesInner.ts
|
||||
model/pricingGet200ResponsePricingServerTypesInnerPricesInner.ts
|
||||
model/pricingGet200ResponsePricingServerTypesInnerPricesInnerPriceHourly.ts
|
||||
model/pricingGet200ResponsePricingServerTypesInnerPricesInnerPriceMonthly.ts
|
||||
model/pricingGet200ResponsePricingTraffic.ts
|
||||
model/pricingGet200ResponsePricingVolume.ts
|
||||
model/primaryIP.ts
|
||||
model/primaryIPDatacenter.ts
|
||||
model/primaryIPDnsPtrInner.ts
|
||||
model/primaryIPResponse.ts
|
||||
model/primaryIPsResponse.ts
|
||||
model/rebuildServerRequest.ts
|
||||
model/removeFromResourcesRequest.ts
|
||||
model/removeTargetRequest.ts
|
||||
model/rule.ts
|
||||
model/serverPublicNetFirewall.ts
|
||||
model/serverTypesGet200Response.ts
|
||||
model/serverTypesGet200ResponseServerTypesInner.ts
|
||||
model/serverTypesIdGet200Response.ts
|
||||
model/serversGet200Response.ts
|
||||
model/serversGet200ResponseServersInner.ts
|
||||
model/serversGet200ResponseServersInnerDatacenter.ts
|
||||
model/serversGet200ResponseServersInnerImage.ts
|
||||
model/serversGet200ResponseServersInnerIso.ts
|
||||
model/serversGet200ResponseServersInnerPrivateNetInner.ts
|
||||
model/serversGet200ResponseServersInnerProtection.ts
|
||||
model/serversGet200ResponseServersInnerPublicNet.ts
|
||||
model/serversGet200ResponseServersInnerPublicNetIpv4.ts
|
||||
model/serversGet200ResponseServersInnerPublicNetIpv6.ts
|
||||
model/serversGet200ResponseServersInnerPublicNetIpv6DnsPtrInner.ts
|
||||
model/serversGet200ResponseServersInnerServerType.ts
|
||||
model/serversIdActionsAttachIsoPostRequest.ts
|
||||
model/serversIdActionsChangeAliasIpsPostRequest.ts
|
||||
model/serversIdActionsChangeDnsPtrPostRequest.ts
|
||||
model/serversIdActionsChangeProtectionPostRequest.ts
|
||||
model/serversIdActionsChangeTypePostRequest.ts
|
||||
model/serversIdActionsCreateImagePost201Response.ts
|
||||
model/serversIdActionsEnableRescuePost201Response.ts
|
||||
model/serversIdActionsEnableRescuePostRequest.ts
|
||||
model/serversIdActionsRebuildPost201Response.ts
|
||||
model/serversIdActionsRequestConsolePost201Response.ts
|
||||
model/serversIdDelete200Response.ts
|
||||
model/serversIdGet200Response.ts
|
||||
model/setRulesRequest.ts
|
||||
model/sshKeysGet200Response.ts
|
||||
model/sshKeysGet200ResponseSshKeysInner.ts
|
||||
model/sshKeysIdPutRequest.ts
|
||||
model/sshKeysPost201Response.ts
|
||||
model/sshKeysPostRequest.ts
|
||||
model/updateCertificateRequest.ts
|
||||
model/updateFirewallRequest.ts
|
||||
model/updateFloatingIPRequest.ts
|
||||
model/updateImageRequest.ts
|
||||
model/updateLoadBalancerService.ts
|
||||
model/updateLoadBalancerServiceHealthCheck.ts
|
||||
model/updateLoadBalancerServiceHealthCheckHttp.ts
|
||||
model/updateNetworkRequest.ts
|
||||
model/updateNetworkRequestLabels.ts
|
||||
model/updatePlacementGroupRequest.ts
|
||||
model/updatePrimaryIPRequest.ts
|
||||
model/updateServerRequest.ts
|
||||
model/updateVolumeRequest.ts
|
||||
model/volumesGet200Response.ts
|
||||
model/volumesGet200ResponseVolumesInner.ts
|
||||
model/volumesGet200ResponseVolumesInnerLocation.ts
|
||||
model/volumesIdActionsChangeProtectionPostRequest.ts
|
||||
model/volumesIdActionsResizePostRequest.ts
|
||||
model/volumesIdGet200Response.ts
|
||||
model/volumesPost201Response.ts
|
||||
@@ -1 +0,0 @@
|
||||
7.2.0
|
||||
@@ -1,3 +0,0 @@
|
||||
// This is the entrypoint for the package
|
||||
export * from './api/apis';
|
||||
export * from './model/models';
|
||||
File diff suppressed because one or more lines are too long
@@ -1,66 +0,0 @@
|
||||
export * from './actionsApi';
|
||||
import { ActionsApi } from './actionsApi';
|
||||
export * from './certificateActionsApi';
|
||||
import { CertificateActionsApi } from './certificateActionsApi';
|
||||
export * from './certificatesApi';
|
||||
import { CertificatesApi } from './certificatesApi';
|
||||
export * from './datacentersApi';
|
||||
import { DatacentersApi } from './datacentersApi';
|
||||
export * from './firewallActionsApi';
|
||||
import { FirewallActionsApi } from './firewallActionsApi';
|
||||
export * from './firewallsApi';
|
||||
import { FirewallsApi } from './firewallsApi';
|
||||
export * from './floatingIPActionsApi';
|
||||
import { FloatingIPActionsApi } from './floatingIPActionsApi';
|
||||
export * from './floatingIPsApi';
|
||||
import { FloatingIPsApi } from './floatingIPsApi';
|
||||
export * from './iSOsApi';
|
||||
import { ISOsApi } from './iSOsApi';
|
||||
export * from './imageActionsApi';
|
||||
import { ImageActionsApi } from './imageActionsApi';
|
||||
export * from './imagesApi';
|
||||
import { ImagesApi } from './imagesApi';
|
||||
export * from './loadBalancerActionsApi';
|
||||
import { LoadBalancerActionsApi } from './loadBalancerActionsApi';
|
||||
export * from './loadBalancerTypesApi';
|
||||
import { LoadBalancerTypesApi } from './loadBalancerTypesApi';
|
||||
export * from './loadBalancersApi';
|
||||
import { LoadBalancersApi } from './loadBalancersApi';
|
||||
export * from './locationsApi';
|
||||
import { LocationsApi } from './locationsApi';
|
||||
export * from './networkActionsApi';
|
||||
import { NetworkActionsApi } from './networkActionsApi';
|
||||
export * from './networksApi';
|
||||
import { NetworksApi } from './networksApi';
|
||||
export * from './placementGroupsApi';
|
||||
import { PlacementGroupsApi } from './placementGroupsApi';
|
||||
export * from './pricingApi';
|
||||
import { PricingApi } from './pricingApi';
|
||||
export * from './primaryIPActionsApi';
|
||||
import { PrimaryIPActionsApi } from './primaryIPActionsApi';
|
||||
export * from './primaryIPsApi';
|
||||
import { PrimaryIPsApi } from './primaryIPsApi';
|
||||
export * from './sSHKeysApi';
|
||||
import { SSHKeysApi } from './sSHKeysApi';
|
||||
export * from './serverActionsApi';
|
||||
import { ServerActionsApi } from './serverActionsApi';
|
||||
export * from './serverTypesApi';
|
||||
import { ServerTypesApi } from './serverTypesApi';
|
||||
export * from './serversApi';
|
||||
import { ServersApi } from './serversApi';
|
||||
export * from './volumeActionsApi';
|
||||
import { VolumeActionsApi } from './volumeActionsApi';
|
||||
export * from './volumesApi';
|
||||
import { VolumesApi } from './volumesApi';
|
||||
import * as http from 'http';
|
||||
|
||||
export class HttpError extends Error {
|
||||
constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) {
|
||||
super('HTTP request failed');
|
||||
this.name = 'HttpError';
|
||||
}
|
||||
}
|
||||
|
||||
export { RequestFile } from '../model/models';
|
||||
|
||||
export const APIS = [ActionsApi, CertificateActionsApi, CertificatesApi, DatacentersApi, FirewallActionsApi, FirewallsApi, FloatingIPActionsApi, FloatingIPsApi, ISOsApi, ImageActionsApi, ImagesApi, LoadBalancerActionsApi, LoadBalancerTypesApi, LoadBalancersApi, LocationsApi, NetworkActionsApi, NetworksApi, PlacementGroupsApi, PricingApi, PrimaryIPActionsApi, PrimaryIPsApi, SSHKeysApi, ServerActionsApi, ServerTypesApi, ServersApi, VolumeActionsApi, VolumesApi];
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,57 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user