diff --git a/CHANGELOG.md b/CHANGELOG.md index 4528cab..600681c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ CHANGELOG ========= +6.7.1 +----- +* Added getZoneFile function 6.7.0 ----- diff --git a/composer.json b/composer.json index 0698b82..e6e8f3d 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "symfony/console": "^4.3", "symfony/finder": "^4.3", "symfony/filesystem": "^4.3", - "transip/transip-api-php": "^6.7", + "transip/transip-api-php": "^6.7.1", "symfony/yaml": "^4.3", "webmozart/path-util": "^2.3" }, diff --git a/composer.lock b/composer.lock index 6960321..51de15d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "41a6ed02bad9624599fa3fa81a596538", + "content-hash": "556a242e1769c713677b8fab8d4c3c67", "packages": [ { "name": "guzzlehttp/guzzle", @@ -1467,16 +1467,16 @@ }, { "name": "transip/transip-api-php", - "version": "v6.7.0", + "version": "v6.7.1", "source": { "type": "git", "url": "https://github.com/transip/transip-api-php.git", - "reference": "fb0693f07adf81591e7bfe3c874eb590de133002" + "reference": "502ddb67dd1aea45fe953187842e937a03d857dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/transip/transip-api-php/zipball/fb0693f07adf81591e7bfe3c874eb590de133002", - "reference": "fb0693f07adf81591e7bfe3c874eb590de133002", + "url": "https://api.github.com/repos/transip/transip-api-php/zipball/502ddb67dd1aea45fe953187842e937a03d857dc", + "reference": "502ddb67dd1aea45fe953187842e937a03d857dc", "shasum": "" }, "require": { @@ -1509,9 +1509,9 @@ "description": "TransIP Rest API Library", "support": { "issues": "https://github.com/transip/transip-api-php/issues", - "source": "https://github.com/transip/transip-api-php/tree/v6.7.0" + "source": "https://github.com/transip/transip-api-php/tree/v6.7.1" }, - "time": "2021-05-07T13:59:41+00:00" + "time": "2021-05-14T08:33:50+00:00" }, { "name": "webmozart/assert", diff --git a/src/Command/Domain/Dns/GetZoneFile.php b/src/Command/Domain/Dns/GetZoneFile.php new file mode 100644 index 0000000..bf0cb8e --- /dev/null +++ b/src/Command/Domain/Dns/GetZoneFile.php @@ -0,0 +1,34 @@ +setName('domain:dns:getzonefile') + ->setDescription('Get DNS zonefile for a domain') + ->setHelp('Provide a name to retrieve the DNS Records for a specific domain') + ->addArgument(Field::DOMAIN_NAME, InputArgument::REQUIRED, Field::DOMAIN_NAME__DESC); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $domainName = $input->getArgument(Field::DOMAIN_NAME); + $dnsEntries = $this->getTransipApi()->domainDns()->getByDomainName($domainName); + $table = new Table($output); + $table->setStyle('compact'); + $table->setRows(array_map(function (DnsEntry $row) { + return [$row->getName(), $row->getType(), $row->getExpire(), $row->getRdata()]; + }, $dnsEntries)); + $table->render(); + } +} diff --git a/src/Settings/Settings.php b/src/Settings/Settings.php index 91fd240..a4ff881 100644 --- a/src/Settings/Settings.php +++ b/src/Settings/Settings.php @@ -15,7 +15,7 @@ class Settings private const CONFIG_FILE_NAME = 'cli-config.json'; public const TRANSIP_API_ENDPOINT = 'https://api.transip.nl/v6'; - public const TRANSIP_CLI_VERSION = '6.7.0'; + public const TRANSIP_CLI_VERSION = '6.7.1'; /** * @var string