@microtica/code-repository
Advanced tools
Comparing version 0.1.17 to 0.1.18
@@ -6,4 +6,2 @@ "use strict"; | ||
const through = require("through2"); | ||
const unzip = require("unzip-stream"); | ||
const archiver = require("archiver"); | ||
class Bitbucket { | ||
@@ -101,19 +99,15 @@ constructor(credentials) { | ||
const output = through(); | ||
const archive = archiver('zip', { | ||
zlib: { level: 9 } | ||
}); | ||
archive.pipe(output); | ||
// const archive = archiver('zip', { | ||
// zlib: { level: 9 } | ||
// }); | ||
// archive.pipe(output); | ||
request(`https://${this.credentials.username}:${this.credentials.password}@bitbucket.org/${repoName}/get/${version}.zip`).pipe(stream); | ||
stream.pipe(unzip.Parse()) | ||
.on('entry', (entry) => { | ||
console.log(entry.path); | ||
archive.append(entry, { name: entry.path.substring(entry.path.indexOf('/') + 1) }); | ||
// name?: string; | ||
// prefix?: string; | ||
// stats?: fs.Stats; | ||
// date?: Date | string; | ||
// mode?: number; | ||
}); | ||
stream.on('finish', () => archive.finalize()); | ||
return output; | ||
// stream.pipe(unzip.Parse()) | ||
// .on('entry', (entry: Buffer & { path: string }) => { | ||
// const name = entry.path.substring(entry.path.indexOf('/') + 1); | ||
// if (!name) return; | ||
// archive.append(entry, { name: entry.path.substring(entry.path.indexOf('/') + 1) }) | ||
// }); | ||
// stream.on('finish', () => archive.finalize()); | ||
return stream; | ||
} | ||
@@ -120,0 +114,0 @@ } |
{ | ||
"name": "@microtica/code-repository", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"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
12503
184