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 1
1
import { getAppFromConfig } from '../../utilities/app-utils' ;
2
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
2
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
3
3
import { CliConfig } from '../../models/config' ;
4
4
5
5
const stringUtils = require ( 'ember-cli-string-utils' ) ;
@@ -27,7 +27,14 @@ export default Blueprint.extend({
27
27
28
28
normalizeEntityName : function ( entityName : string ) {
29
29
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 ) ;
31
38
32
39
this . dynamicPath = parsedPath ;
33
40
return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as path from 'path';
4
4
import { NodeHost } from '../../lib/ast-tools' ;
5
5
import { CliConfig } from '../../models/config' ;
6
6
import { getAppFromConfig } from '../../utilities/app-utils' ;
7
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
7
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
8
8
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
9
9
10
10
const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -124,7 +124,13 @@ export default Blueprint.extend({
124
124
125
125
normalizeEntityName : function ( entityName : string ) {
126
126
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 ) ;
128
134
129
135
this . dynamicPath = parsedPath ;
130
136
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { NodeHost } from '../../lib/ast-tools';
4
4
import { CliConfig } from '../../models/config' ;
5
5
import { getAppFromConfig } from '../../utilities/app-utils' ;
6
6
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
7
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
7
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
8
8
9
9
const stringUtils = require ( 'ember-cli-string-utils' ) ;
10
10
const astUtils = require ( '../../utilities/ast-utils' ) ;
@@ -77,7 +77,13 @@ export default Blueprint.extend({
77
77
78
78
normalizeEntityName : function ( entityName : string ) {
79
79
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 ) ;
81
87
82
88
this . dynamicPath = parsedPath ;
83
89
Original file line number Diff line number Diff line change 1
1
import { getAppFromConfig } from '../../utilities/app-utils' ;
2
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
2
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
3
3
4
4
const stringUtils = require ( 'ember-cli-string-utils' ) ;
5
5
const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -20,7 +20,13 @@ export default Blueprint.extend({
20
20
21
21
normalizeEntityName : function ( entityName : string ) {
22
22
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 ) ;
24
30
25
31
this . dynamicPath = parsedPath ;
26
32
return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as path from 'path';
3
3
import { oneLine } from 'common-tags' ;
4
4
import { NodeHost } from '../../lib/ast-tools' ;
5
5
import { CliConfig } from '../../models/config' ;
6
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
6
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
7
7
import { getAppFromConfig } from '../../utilities/app-utils' ;
8
8
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
9
9
@@ -46,7 +46,13 @@ export default Blueprint.extend({
46
46
47
47
normalizeEntityName : function ( entityName : string ) {
48
48
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 ) ;
50
56
51
57
this . dynamicPath = parsedPath ;
52
58
return parsedPath . name ;
Original file line number Diff line number Diff line change 1
1
import { CliConfig } from '../../models/config' ;
2
2
import { getAppFromConfig } from '../../utilities/app-utils' ;
3
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
3
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
4
4
5
5
const stringUtils = require ( 'ember-cli-string-utils' ) ;
6
6
const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -25,7 +25,13 @@ export default Blueprint.extend({
25
25
26
26
normalizeEntityName : function ( entityName : string ) {
27
27
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 ) ;
29
35
30
36
this . dynamicPath = parsedPath ;
31
37
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' ;
4
4
5
5
const path = require ( 'path' ) ;
6
6
const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -39,7 +39,13 @@ export default Blueprint.extend({
39
39
normalizeEntityName : function ( entityName : string ) {
40
40
this . entityName = entityName ;
41
41
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 ) ;
43
49
44
50
this . dynamicPath = parsedPath ;
45
51
return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as chalk from 'chalk';
2
2
import * as path from 'path' ;
3
3
import { NodeHost } from '../../lib/ast-tools' ;
4
4
import { CliConfig } from '../../models/config' ;
5
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
5
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
6
6
import { getAppFromConfig } from '../../utilities/app-utils' ;
7
7
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
8
8
@@ -72,7 +72,13 @@ export default Blueprint.extend({
72
72
73
73
normalizeEntityName : function ( entityName : string ) {
74
74
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 ) ;
76
82
77
83
this . dynamicPath = parsedPath ;
78
84
return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as path from 'path';
3
3
import { oneLine } from 'common-tags' ;
4
4
import { NodeHost } from '../../lib/ast-tools' ;
5
5
import { CliConfig } from '../../models/config' ;
6
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
6
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
7
7
import { getAppFromConfig } from '../../utilities/app-utils' ;
8
8
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
9
9
@@ -51,7 +51,13 @@ export default Blueprint.extend({
51
51
52
52
normalizeEntityName : function ( entityName : string ) {
53
53
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 ) ;
55
61
56
62
this . dynamicPath = parsedPath ;
57
63
return parsedPath . name ;
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ Blueprint.prototype.install = function(options) {
509
509
ui . writeLine ( chalk . yellow ( 'You specified the dry-run flag, so no' +
510
510
' changes will be written.' ) ) ;
511
511
}
512
-
512
+
513
513
this . _normalizeEntityName ( options . entity ) ;
514
514
this . _checkForPod ( options . verbose ) ;
515
515
this . _checkInRepoAddonExists ( options . inRepoAddon ) ;
You can’t perform that action at this time.
0 commit comments