Skip to content

Commit

Permalink
Обновлен ключ для сертификата скачивания
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiontik committed Feb 2, 2024
1 parent 0fec226 commit 57e27a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ npx archpkg install [email protected]
### Ключи
* **-cleancache** - очищает кэш после завершения работы;
* **-save** - вносит необходимые изменения в архкод автоматически;
* **-cert:<путь>** - указывает путь к ssl сертификату;
* **-downloadcert:<путь>** - указывает путь к ssl сертификату;
* **-cachefolder:<путь>** - указывает путь к кэшу.

## remove <идентификатор пакета>
Expand Down
10 changes: 3 additions & 7 deletions cli/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ const repoAPI = {
if (!this.env.token) {
log.begin('Try to get access to repo...');
const response = await doRequest(
this.makeGetParams(
this.makeURL(this.routes.access.guestToken).toString()
)
);
const code = response && response.statusCode;
if (response && code !== 201) {
Expand All @@ -517,9 +515,7 @@ const repoAPI = {
},
async fetchSourceOfPackage(package) {
await this.getAccess();
const url = this.makeGetParams(
this.makeURL(`${this.routes.repo.download}${package}`).toString()
);
const url = this.makeURL(`${this.routes.repo.download}${package}`).toString();
log.begin(`Try to get link of package...`);
const response = await doRequest(url, {
auth: {
Expand Down Expand Up @@ -577,7 +573,7 @@ const commandFlags = {
cleancache: false, // Признак очистки кэша после установки
save: false, // Признак необходимости автоматически подключить пакеты в dochub.yaml
cachefolder: null, // Корневой путь к кэшу
cert: SSL_CERT || null // Путь к ssl сертификату
downloadcert: SSL_CERT || null // Сертификат для скачивания
};

const run = async () => {
Expand All @@ -600,7 +596,7 @@ const run = async () => {

packageAPI.beginInstall({
cacheFolder: commandFlags.cachefolder,
cert: commandFlags.cert
cert: commandFlags.downloadcert
});

const command = params[2];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archpkg",
"version": "1.0.32",
"version": "1.0.34",
"description": "The DocHub metamodel repository manager.",
"private": false,
"main": "index.js",
Expand Down

0 comments on commit 57e27a3

Please sign in to comment.