mirror of
https://github.com/Azure/setup-helm.git
synced 2025-09-09 13:36:37 +00:00
committed by
GitHub
parent
20d2b4f98d
commit
e4f3964f67
26
node_modules/@babel/helper-module-imports/lib/import-injector.js
generated
vendored
26
node_modules/@babel/helper-module-imports/lib/import-injector.js
generated
vendored
@ -51,35 +51,25 @@ class ImportInjector {
|
||||
}
|
||||
|
||||
addSideEffect(importedSourceIn, opts) {
|
||||
return this._generateImport(this._applyDefaults(importedSourceIn, opts), false);
|
||||
return this._generateImport(this._applyDefaults(importedSourceIn, opts), void 0);
|
||||
}
|
||||
|
||||
_applyDefaults(importedSource, opts, isInit = false) {
|
||||
const optsList = [];
|
||||
let newOpts;
|
||||
|
||||
if (typeof importedSource === "string") {
|
||||
optsList.push({
|
||||
newOpts = Object.assign({}, this._defaultOpts, {
|
||||
importedSource
|
||||
});
|
||||
optsList.push(opts);
|
||||
}, opts);
|
||||
} else {
|
||||
_assert(!opts, "Unexpected secondary arguments.");
|
||||
|
||||
optsList.push(importedSource);
|
||||
newOpts = Object.assign({}, this._defaultOpts, importedSource);
|
||||
}
|
||||
|
||||
const newOpts = Object.assign({}, this._defaultOpts);
|
||||
|
||||
for (const opts of optsList) {
|
||||
if (!opts) continue;
|
||||
Object.keys(newOpts).forEach(key => {
|
||||
if (opts[key] !== undefined) newOpts[key] = opts[key];
|
||||
});
|
||||
|
||||
if (!isInit) {
|
||||
if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
|
||||
if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
|
||||
}
|
||||
if (!isInit && opts) {
|
||||
if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
|
||||
if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
|
||||
}
|
||||
|
||||
return newOpts;
|
||||
|
Reference in New Issue
Block a user