File tree Expand file tree Collapse file tree 13 files changed +165
-41
lines changed
Expand file tree Collapse file tree 13 files changed +165
-41
lines changed Original file line number Diff line number Diff line change 11import { getAppFromConfig } from '../../utilities/app-utils' ;
2- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
2+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
33import { CliConfig } from '../../models/config' ;
44
55const stringUtils = require ( 'ember-cli-string-utils' ) ;
@@ -27,7 +27,14 @@ export default Blueprint.extend({
2727
2828 normalizeEntityName : function ( entityName : string ) {
2929 const appConfig = getAppFromConfig ( this . options . app ) ;
30- const parsedPath = dynamicPathParser ( this . project , entityName . split ( '.' ) [ 0 ] , appConfig ) ;
30+ const dynamicPathOptions : DynamicPathOptions = {
31+ project : this . project ,
32+ entityName : entityName . split ( '.' ) [ 0 ] ,
33+ appConfig,
34+ dryRun : this . options . dryRun
35+ } ;
36+
37+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
3138
3239 this . dynamicPath = parsedPath ;
3340 return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as path from 'path';
44import { NodeHost } from '../../lib/ast-tools' ;
55import { CliConfig } from '../../models/config' ;
66import { getAppFromConfig } from '../../utilities/app-utils' ;
7- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
7+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
88import { resolveModulePath } from '../../utilities/resolve-module-file' ;
99
1010const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -124,7 +124,13 @@ export default Blueprint.extend({
124124
125125 normalizeEntityName : function ( entityName : string ) {
126126 const appConfig = getAppFromConfig ( this . options . app ) ;
127- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
127+ const dynamicPathOptions : DynamicPathOptions = {
128+ project : this . project ,
129+ entityName,
130+ appConfig,
131+ dryRun : this . options . dryRun
132+ } ;
133+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
128134
129135 this . dynamicPath = parsedPath ;
130136
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { NodeHost } from '../../lib/ast-tools';
44import { CliConfig } from '../../models/config' ;
55import { getAppFromConfig } from '../../utilities/app-utils' ;
66import { resolveModulePath } from '../../utilities/resolve-module-file' ;
7- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
7+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
88
99const stringUtils = require ( 'ember-cli-string-utils' ) ;
1010const astUtils = require ( '../../utilities/ast-utils' ) ;
@@ -77,7 +77,13 @@ export default Blueprint.extend({
7777
7878 normalizeEntityName : function ( entityName : string ) {
7979 const appConfig = getAppFromConfig ( this . options . app ) ;
80- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
80+ const dynamicPathOptions : DynamicPathOptions = {
81+ project : this . project ,
82+ entityName,
83+ appConfig,
84+ dryRun : this . options . dryRun
85+ } ;
86+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
8187
8288 this . dynamicPath = parsedPath ;
8389
Original file line number Diff line number Diff line change 11import { getAppFromConfig } from '../../utilities/app-utils' ;
2- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
2+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
33
44const stringUtils = require ( 'ember-cli-string-utils' ) ;
55const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -20,7 +20,13 @@ export default Blueprint.extend({
2020
2121 normalizeEntityName : function ( entityName : string ) {
2222 const appConfig = getAppFromConfig ( this . options . app ) ;
23- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
23+ const dynamicPathOptions : DynamicPathOptions = {
24+ project : this . project ,
25+ entityName,
26+ appConfig,
27+ dryRun : this . options . dryRun
28+ } ;
29+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
2430
2531 this . dynamicPath = parsedPath ;
2632 return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as path from 'path';
33import { oneLine } from 'common-tags' ;
44import { NodeHost } from '../../lib/ast-tools' ;
55import { CliConfig } from '../../models/config' ;
6- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
6+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
77import { getAppFromConfig } from '../../utilities/app-utils' ;
88import { resolveModulePath } from '../../utilities/resolve-module-file' ;
99
@@ -46,7 +46,13 @@ export default Blueprint.extend({
4646
4747 normalizeEntityName : function ( entityName : string ) {
4848 const appConfig = getAppFromConfig ( this . options . app ) ;
49- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
49+ const dynamicPathOptions : DynamicPathOptions = {
50+ project : this . project ,
51+ entityName,
52+ appConfig,
53+ dryRun : this . options . dryRun
54+ } ;
55+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
5056
5157 this . dynamicPath = parsedPath ;
5258 return parsedPath . name ;
Original file line number Diff line number Diff line change 11import { CliConfig } from '../../models/config' ;
22import { getAppFromConfig } from '../../utilities/app-utils' ;
3- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
3+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
44
55const stringUtils = require ( 'ember-cli-string-utils' ) ;
66const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -25,7 +25,13 @@ export default Blueprint.extend({
2525
2626 normalizeEntityName : function ( entityName : string ) {
2727 const appConfig = getAppFromConfig ( this . options . app ) ;
28- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
28+ const dynamicPathOptions : DynamicPathOptions = {
29+ project : this . project ,
30+ entityName,
31+ appConfig,
32+ dryRun : this . options . dryRun
33+ } ;
34+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
2935
3036 this . dynamicPath = parsedPath ;
3137 return parsedPath . name ;
Original file line number Diff line number Diff line change 1- import { CliConfig } from '../../models/config' ;
2- import { getAppFromConfig } from '../../utilities/app-utils' ;
3- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
1+ import { CliConfig } from '../../models/config' ;
2+ import { getAppFromConfig } from '../../utilities/app-utils' ;
3+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
44
55const path = require ( 'path' ) ;
66const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -39,7 +39,13 @@ export default Blueprint.extend({
3939 normalizeEntityName : function ( entityName : string ) {
4040 this . entityName = entityName ;
4141 const appConfig = getAppFromConfig ( this . options . app ) ;
42- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
42+ const dynamicPathOptions : DynamicPathOptions = {
43+ project : this . project ,
44+ entityName,
45+ appConfig,
46+ dryRun : this . options . dryRun
47+ } ;
48+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
4349
4450 this . dynamicPath = parsedPath ;
4551 return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as chalk from 'chalk';
22import * as path from 'path' ;
33import { NodeHost } from '../../lib/ast-tools' ;
44import { CliConfig } from '../../models/config' ;
5- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
5+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
66import { getAppFromConfig } from '../../utilities/app-utils' ;
77import { resolveModulePath } from '../../utilities/resolve-module-file' ;
88
@@ -72,7 +72,13 @@ export default Blueprint.extend({
7272
7373 normalizeEntityName : function ( entityName : string ) {
7474 const appConfig = getAppFromConfig ( this . options . app ) ;
75- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
75+ const dynamicPathOptions : DynamicPathOptions = {
76+ project : this . project ,
77+ entityName,
78+ appConfig,
79+ dryRun : this . options . dryRun
80+ } ;
81+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
7682
7783 this . dynamicPath = parsedPath ;
7884 return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as path from 'path';
33import { oneLine } from 'common-tags' ;
44import { NodeHost } from '../../lib/ast-tools' ;
55import { CliConfig } from '../../models/config' ;
6- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
6+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
77import { getAppFromConfig } from '../../utilities/app-utils' ;
88import { resolveModulePath } from '../../utilities/resolve-module-file' ;
99
@@ -51,7 +51,13 @@ export default Blueprint.extend({
5151
5252 normalizeEntityName : function ( entityName : string ) {
5353 const appConfig = getAppFromConfig ( this . options . app ) ;
54- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
54+ const dynamicPathOptions : DynamicPathOptions = {
55+ project : this . project ,
56+ entityName,
57+ appConfig,
58+ dryRun : this . options . dryRun
59+ } ;
60+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
5561
5662 this . dynamicPath = parsedPath ;
5763 return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ Blueprint.prototype.install = function(options) {
509509 ui . writeLine ( chalk . yellow ( 'You specified the dry-run flag, so no' +
510510 ' changes will be written.' ) ) ;
511511 }
512-
512+
513513 this . _normalizeEntityName ( options . entity ) ;
514514 this . _checkForPod ( options . verbose ) ;
515515 this . _checkInRepoAddonExists ( options . inRepoAddon ) ;
You can’t perform that action at this time.
0 commit comments