Leo Lamprecht
8 years ago
No known key found for this signature in database
GPG Key ID: B08517883D5E0E10
1 changed files with
12 additions and
5 deletions
-
lib/index.js
|
|
@ -129,17 +129,24 @@ export default class Now extends EventEmitter { |
|
|
|
// array has a group of files with the same sha but different path
|
|
|
|
const files = await Promise.all(Array.prototype.concat.apply([], await Promise.all((Array.from(this._files)).map(async ([sha, {data, names}]) => { |
|
|
|
return await names.map(async name => { |
|
|
|
if (this._static && toRelative(name, this._path) !== 'package.json') { |
|
|
|
name = this.pathInsideContent(name) |
|
|
|
} |
|
|
|
let mode |
|
|
|
|
|
|
|
if (this._static) { |
|
|
|
if (toRelative(name, this._path) === 'package.json') { |
|
|
|
mode = 33261 |
|
|
|
} else { |
|
|
|
const st = await (followSymlinks ? stat(name) : lstat(name)) |
|
|
|
mode = st.mode |
|
|
|
|
|
|
|
const st = await (followSymlinks ? stat(name) : lstat(name)) |
|
|
|
name = this.pathInsideContent(name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
|
sha, |
|
|
|
size: data.length, |
|
|
|
file: toRelative(name, this._path), |
|
|
|
mode: st.mode |
|
|
|
mode |
|
|
|
} |
|
|
|
}) |
|
|
|
})))) |
|
|
|