Skip to content

Commit a2af264

Browse files
committed
Review amendments
1 parent 91032cd commit a2af264

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

lib/commands/register.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,10 @@ function confirm(properties) {
111111
default: plugin.toString() || 'not specified',
112112
required: true
113113
},
114-
repositoryType: {
115-
description: chalk.cyan('repository type (e.g. git)'),
116-
message: 'Please provide a repository type',
117-
pattern: /.+/,
118-
type: 'string',
119-
default: properties.repository ? properties.repository.type : undefined,
120-
required: true
121-
},
122114
repositoryUrl: {
123115
description: chalk.cyan('repository URL'),
124-
message: 'Please provide a repository URL of the form [git@][<protocol>]<domain><path>.git',
125-
pattern: /((git|ssh|http(s)?)|(git@[\w\.]+))(:(\/\/)?)([\w\.@\:/\-~]+)(\.git)(\/)?/,
116+
message: 'Please provide a repository URL of the form git://<domain><path>.git',
117+
pattern: /git:\/\/([\w\.@\:/\-~]+)(\.git)(\/)?/,
126118
type: 'string',
127119
default: properties.repository ? properties.repository.url : undefined,
128120
required: true
@@ -157,8 +149,8 @@ function confirm(properties) {
157149

158150
properties.name = confirmation.name;
159151

160-
if (confirmation.repositoryType && confirmation.repositoryUrl) {
161-
properties.repository = {type:confirmation.repositoryType, url:confirmation.repositoryUrl};
152+
if (confirmation.repositoryUrl) {
153+
properties.repository = {type:'git', url:confirmation.repositoryUrl};
162154
}
163155

164156
properties.framework = confirmation.framework;

0 commit comments

Comments
 (0)