"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/angular/cli/models/schematic-command.ts" between
angular-cli-11.0.1.tar.gz and angular-cli-11.0.2.tar.gz

About: Angular CLI is a command line interface for Angular.

schematic-command.ts  (angular-cli-11.0.1):schematic-command.ts  (angular-cli-11.0.2)
skipping to change at line 260 skipping to change at line 260
registry: new schema.CoreSchemaRegistry(formats.standardFormats), registry: new schema.CoreSchemaRegistry(formats.standardFormats),
resolvePaths: !!this.workspace resolvePaths: !!this.workspace
// Workspace // Workspace
? this.collectionName === this.defaultCollectionName ? this.collectionName === this.defaultCollectionName
// Favor __dirname for @schematics/angular to use the build-in version // Favor __dirname for @schematics/angular to use the build-in version
? [__dirname, process.cwd(), root] ? [__dirname, process.cwd(), root]
: [process.cwd(), root, __dirname] : [process.cwd(), root, __dirname]
// Global // Global
: [__dirname, process.cwd()], : [__dirname, process.cwd()],
schemaValidation: true, schemaValidation: true,
optionTransforms: [
// Add configuration file defaults
async (schematic, current) => ({
...(await getSchematicDefaults(schematic.collection.name, schematic.na
me, getProjectName())),
...current,
}),
],
}); });
const getProjectName = () => { const getProjectName = () => {
if (this.workspace) { if (this.workspace) {
const projectNames = getProjectsByPath(this.workspace, process.cwd(), th is.workspace.basePath); const projectNames = getProjectsByPath(this.workspace, process.cwd(), th is.workspace.basePath);
if (projectNames.length === 1) { if (projectNames.length === 1) {
return projectNames[0]; return projectNames[0];
} else { } else {
if (projectNames.length > 1) { if (projectNames.length > 1) {
skipping to change at line 287 skipping to change at line 294
const defaultProjectName = this.workspace.extensions['defaultProject'] ; const defaultProjectName = this.workspace.extensions['defaultProject'] ;
if (typeof defaultProjectName === 'string' && defaultProjectName) { if (typeof defaultProjectName === 'string' && defaultProjectName) {
return defaultProjectName; return defaultProjectName;
} }
} }
} }
return undefined; return undefined;
}; };
const defaultOptionTransform = async (
schematic: FileSystemSchematicDescription,
current: {},
) => ({
...(await getSchematicDefaults(schematic.collection.name, schematic.name,
getProjectName())),
...current,
});
workflow.engineHost.registerOptionsTransform(defaultOptionTransform);
workflow.registry.addPostTransform(schema.transforms.addUndefinedDefaults); workflow.registry.addPostTransform(schema.transforms.addUndefinedDefaults);
workflow.registry.addSmartDefaultProvider('projectName', getProjectName); workflow.registry.addSmartDefaultProvider('projectName', getProjectName);
workflow.registry.useXDeprecatedProvider(msg => this.logger.warn(msg)); workflow.registry.useXDeprecatedProvider(msg => this.logger.warn(msg));
let shouldReportAnalytics = true; let shouldReportAnalytics = true;
workflow.engineHost.registerOptionsTransform(async (_, options) => { workflow.engineHost.registerOptionsTransform(async (_, options) => {
if (shouldReportAnalytics) { if (shouldReportAnalytics) {
shouldReportAnalytics = false; shouldReportAnalytics = false;
await this.reportAnalytics([this.description.name], options as Arguments ); await this.reportAnalytics([this.description.name], options as Arguments );
} }
 End of changes. 2 change blocks. 
11 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)