@microtica/code-repository
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -15,3 +15,3 @@ /// <reference types="node" /> | ||
listVersions(repoName: string): Promise<RepoVersion[]>; | ||
downloadVersion(repoName: string, version: string, hooks?: _.Dictionary<NodeJS.WritableStream>): NodeJS.ReadableStream; | ||
downloadVersion(repoName: string, version: string, hooks?: _.Dictionary<NodeJS.WritableStream>, subPath?: string): NodeJS.ReadableStream; | ||
} |
@@ -96,3 +96,3 @@ "use strict"; | ||
} | ||
downloadVersion(repoName, version, hooks = {}) { | ||
downloadVersion(repoName, version, hooks = {}, subPath = "") { | ||
const downloadUrl = `${this.baseUrl}/${repoName}/get/${version}.zip`; | ||
@@ -105,3 +105,3 @@ const codeReponse = request(downloadUrl, { headers: this.headers }); | ||
const name = entry.path.substring(entry.path.indexOf('/') + 1); | ||
if (!name) | ||
if (!name && name.indexOf(subPath) !== 0) | ||
return; | ||
@@ -108,0 +108,0 @@ console.log('[INFO] Zip:', name); |
{ | ||
"name": "@microtica/code-repository", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Integration module with git repository providers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14314