File tree Expand file tree Collapse file tree 13 files changed +163
-39
lines changed Expand file tree Collapse file tree 13 files changed +163
-39
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 @@ -5,7 +5,7 @@ import { oneLine } from 'common-tags';
5
5
import { NodeHost } from '../../lib/ast-tools' ;
6
6
import { CliConfig } from '../../models/config' ;
7
7
import { getAppFromConfig } from '../../utilities/app-utils' ;
8
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
8
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
9
9
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
10
10
11
11
const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -125,7 +125,13 @@ export default Blueprint.extend({
125
125
126
126
normalizeEntityName : function ( entityName : string ) {
127
127
const appConfig = getAppFromConfig ( this . options . app ) ;
128
- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
128
+ const dynamicPathOptions : DynamicPathOptions = {
129
+ project : this . project ,
130
+ entityName,
131
+ appConfig,
132
+ dryRun : this . options . dryRun
133
+ } ;
134
+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
129
135
130
136
this . dynamicPath = parsedPath ;
131
137
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { NodeHost } from '../../lib/ast-tools';
5
5
import { CliConfig } from '../../models/config' ;
6
6
import { getAppFromConfig } from '../../utilities/app-utils' ;
7
7
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
8
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
8
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
9
9
10
10
const stringUtils = require ( 'ember-cli-string-utils' ) ;
11
11
const astUtils = require ( '../../utilities/ast-utils' ) ;
@@ -78,7 +78,13 @@ export default Blueprint.extend({
78
78
79
79
normalizeEntityName : function ( entityName : string ) {
80
80
const appConfig = getAppFromConfig ( this . options . app ) ;
81
- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
81
+ const dynamicPathOptions : DynamicPathOptions = {
82
+ project : this . project ,
83
+ entityName,
84
+ appConfig,
85
+ dryRun : this . options . dryRun
86
+ } ;
87
+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
82
88
83
89
this . dynamicPath = parsedPath ;
84
90
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 @@ -5,7 +5,7 @@ import { NodeHost } from '../../lib/ast-tools';
5
5
import { CliConfig } from '../../models/config' ;
6
6
import { getAppFromConfig } from '../../utilities/app-utils' ;
7
7
import { resolveModulePath } from '../../utilities/resolve-module-file' ;
8
- import { dynamicPathParser } from '../../utilities/dynamic-path-parser' ;
8
+ import { dynamicPathParser , DynamicPathOptions } from '../../utilities/dynamic-path-parser' ;
9
9
10
10
const stringUtils = require ( 'ember-cli-string-utils' ) ;
11
11
const Blueprint = require ( '../../ember-cli/lib/models/blueprint' ) ;
@@ -58,7 +58,13 @@ export default Blueprint.extend({
58
58
normalizeEntityName : function ( entityName : string ) {
59
59
this . entityName = entityName ;
60
60
const appConfig = getAppFromConfig ( this . options . app ) ;
61
- const parsedPath = dynamicPathParser ( this . project , entityName , appConfig ) ;
61
+ const dynamicPathOptions : DynamicPathOptions = {
62
+ project : this . project ,
63
+ entityName,
64
+ appConfig,
65
+ dryRun : this . options . dryRun
66
+ } ;
67
+ const parsedPath = dynamicPathParser ( dynamicPathOptions ) ;
62
68
63
69
this . dynamicPath = parsedPath ;
64
70
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 @@ -517,7 +517,7 @@ Blueprint.prototype.install = function(options) {
517
517
ui . writeLine ( chalk . yellow ( 'You specified the dry-run flag, so no' +
518
518
' changes will be written.' ) ) ;
519
519
}
520
-
520
+
521
521
this . _normalizeEntityName ( options . entity ) ;
522
522
this . _checkForPod ( options . verbose ) ;
523
523
this . _checkInRepoAddonExists ( options . inRepoAddon ) ;
You can’t perform that action at this time.
0 commit comments