Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_processBlueprint: function(type, name, options) {
var mainBlueprint = Blueprint.lookup(name, {
ui: this.ui,
analytics: this.analytics,
project: this.project,
// need to check blueprint paths from addons
paths: options.paths || [ path.resolve(__dirname, '..', '..', 'blueprints') ]
});
return Promise.resolve()
.then(function() {
return mainBlueprint[type](options);
})
.then(function() {
if (name === 'addon-import') { return; }
var testBlueprint = mainBlueprint.lookupBlueprint(name + '-test', {
ui: this.ui,
analytics: this.analytics,
processBlueprint: function(type, name, options, extras) {
// TODO remove this private ember-cli usage - will break in future versions of ember-cli
var Blueprint = require('ember-cli/lib/models/blueprint');
var bluePrint = Blueprint.lookup(name, {
paths: [ path.resolve(this.path, '../') ]
});
Object.keys(extras || {}).forEach(function(k) {
bluePrint[k] = extras[k];
});
return Promise.resolve().then(function() {
return bluePrint[type](merge({}, options));
});
},
_processBlueprint: function(type, name, options) {
var mainBlueprint = Blueprint.lookup(name, {
ui: this.ui,
analytics: this.analytics,
project: this.project,
paths: this.project.blueprintLookupPaths()
});
var thisBlueprint = this;
return RSVP.Promise.resolve()
.then(function() {
return mainBlueprint[type](options);
})
.then(function() {
var testBlueprint = mainBlueprint.lookupBlueprint(name + '-test', {
ui: thisBlueprint.ui,
analytics: thisBlueprint.analytics,
module.exports = function(dasherizedName, project) {
var projectPaths = project ? project.blueprintLookupPaths() : [];
projectPaths = projectPaths.filter(function(p) {
return p !== coffeeScriptPath;
});
projectPaths = projectPaths.concat(legacyBlueprintsPath());
return Blueprint.lookup(dasherizedName, {
paths: projectPaths
});
};
invoke: function(name) {
var blueprint = Blueprint.lookup(name, {
paths: this.project.blueprintLookupPaths(),
ui: this.ui,
analyctics: this.analyctics,
project: this.project,
ignoreMissing: true
});
return blueprint[this._operation](this._options);
}
});
beforeInstall(options) {
let libBlueprint = Blueprint.lookup('lib', {
ui: this.ui,
analytics: this.analytics,
project: this.project,
});
return libBlueprint.install(options);
},