Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
parent
cf5b0a9041
commit
a196a714b8
5388 changed files with 2176737 additions and 71701 deletions
27
node_modules/compress-commons/lib/util/index.js
generated
vendored
Normal file
27
node_modules/compress-commons/lib/util/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* node-compress-commons
|
||||
*
|
||||
* Copyright (c) 2014 Chris Talkington, contributors.
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
|
||||
*/
|
||||
var Stream = require('stream').Stream;
|
||||
var PassThrough = require('readable-stream').PassThrough;
|
||||
var isStream = require('is-stream');
|
||||
|
||||
var util = module.exports = {};
|
||||
|
||||
util.normalizeInputSource = function(source) {
|
||||
if (source === null) {
|
||||
return Buffer.alloc(0);
|
||||
} else if (typeof source === 'string') {
|
||||
return Buffer.from(source);
|
||||
} else if (isStream(source) && !source._readableState) {
|
||||
var normalized = new PassThrough();
|
||||
source.pipe(normalized);
|
||||
|
||||
return normalized;
|
||||
}
|
||||
|
||||
return source;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue