-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): prompts async methods + fixes
- Loading branch information
Guillaume Chau
committed
Apr 21, 2018
1 parent
a191d76
commit 75e86c6
Showing
15 changed files
with
229 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { createSchema, validateSync } = require('@vue/cli-shared-utils') | ||
|
||
const schema = createSchema(joi => ({ | ||
id: joi.string().required(), | ||
path: joi.string(), | ||
url: joi.string() | ||
})) | ||
|
||
exports.validate = (options) => { | ||
validateSync(options, schema) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { createSchema, validateSync } = require('@vue/cli-shared-utils') | ||
|
||
const schema = createSchema(joi => ({ | ||
id: joi.string().required(), | ||
name: joi.string().required(), | ||
description: joi.string(), | ||
link: joi.string().uri(), | ||
icon: joi.string(), | ||
files: joi.object({ | ||
json: joi.array().items(joi.string()), | ||
js: joi.array().items(joi.string()), | ||
yaml: joi.array().items(joi.string()), | ||
package: joi.string() | ||
}), | ||
onRead: joi.func().required(), | ||
onWrite: joi.func().required() | ||
})) | ||
|
||
exports.validate = (options) => { | ||
validateSync(options, schema) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { createSchema, validateSync } = require('@vue/cli-shared-utils') | ||
|
||
const schema = createSchema(joi => ({ | ||
match: joi.object().type(RegExp).required().description('Match a npm script command'), | ||
description: joi.string(), | ||
link: joi.string().uri(), | ||
prompts: joi.array(), | ||
views: joi.array().items(joi.object({ | ||
id: joi.string().required(), | ||
label: joi.string().required(), | ||
icon: joi.string(), | ||
component: joi.string().required() | ||
})), | ||
defaultView: joi.string(), | ||
onBeforeRun: joi.func(), | ||
onRun: joi.func(), | ||
onExit: joi.func() | ||
})) | ||
|
||
exports.validate = (options) => { | ||
validateSync(options, schema) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.