From e007e14d133733cff9f35555f6f0f31e6c3df401 Mon Sep 17 00:00:00 2001 From: Vlad Marchuk Date: Tue, 18 Nov 2025 14:10:44 +0300 Subject: [PATCH 1/3] fix(filesDownload): enhance download files with addon --- src/commands/filesDownload.addon.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/commands/filesDownload.addon.ts b/src/commands/filesDownload.addon.ts index a611487..ae72f77 100644 --- a/src/commands/filesDownload.addon.ts +++ b/src/commands/filesDownload.addon.ts @@ -1,4 +1,4 @@ -import { promises as fs } from 'fs'; +import path from 'path'; import Printer from '../printer'; import { isCommandSupported } from '../services/uplinkSetupHelper'; import readResourceFileService from '../services/readResourceFile'; @@ -23,15 +23,12 @@ export default async (params: FilesDownloadParams): Promise => { `Resource type ${resource.type} is not supported, use StorageProvider type for this command`, ); - const localPath = preparePath(params.localDirectory).replace(/\/$/, ''); - const exists = await fs.stat(localPath).catch(() => null); - - if (!exists) { - await fs.mkdir(localPath, { recursive: true }); - } else if (!exists.isDirectory()) { - throw new Error('localDirectory argument must be the path to a folder'); + let localPath = preparePath(params.localDirectory).replace(/\/$/, ''); + if (resource.filepath) { + localPath = path.join(localPath, resource.filepath); } + Printer.print(`Downloading file to ${localPath}`); try { const { download } = await import('@super-protocol/sp-files-addon'); await download(resource, localPath, { From 8a56d6928f3f8847bf1c19f051af149803a4c146 Mon Sep 17 00:00:00 2001 From: Vlad Marchuk Date: Tue, 18 Nov 2025 15:07:40 +0300 Subject: [PATCH 2/3] 0.14.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3d17010..1659eea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@super-protocol/ctl", - "version": "0.14.4", + "version": "0.14.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@super-protocol/ctl", - "version": "0.14.4", + "version": "0.14.5", "license": "MIT", "dependencies": { "@amplitude/node": "^1.10.2", diff --git a/package.json b/package.json index cb3e6f8..f3693ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@super-protocol/ctl", - "version": "0.14.4", + "version": "0.14.5", "description": "A tool for publishing values in a secure and reliable way.", "main": "./build/index.js", "type": "commonjs", From fb4d0b50515c46744fc8d491803a86de1b8a228e Mon Sep 17 00:00:00 2001 From: Vlad Marchuk Date: Mon, 9 Feb 2026 16:23:04 +0300 Subject: [PATCH 3/3] 0.14.6 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1659eea..29d3cdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@super-protocol/ctl", - "version": "0.14.5", + "version": "0.14.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@super-protocol/ctl", - "version": "0.14.5", + "version": "0.14.6", "license": "MIT", "dependencies": { "@amplitude/node": "^1.10.2", diff --git a/package.json b/package.json index f3693ff..36314c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@super-protocol/ctl", - "version": "0.14.5", + "version": "0.14.6", "description": "A tool for publishing values in a secure and reliable way.", "main": "./build/index.js", "type": "commonjs",