forked from alexa/ask-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
888 changed files
with
99,678 additions
and
42,689 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
.github | ||
dist | ||
build | ||
node_modules | ||
docs | ||
scripts | ||
*.md |
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,12 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": false, | ||
"embeddedLanguageFormatting": "auto", | ||
"printWidth": 140, | ||
"proseWrap": "never", | ||
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
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,8 @@ | ||
{ | ||
"printWidth": 140, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
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 |
---|---|---|
|
@@ -9,13 +9,14 @@ Below are typical steps to follow if you want to contribute: | |
git clone [email protected]:<your-account>/ask-cli.git | ||
``` | ||
3. Run `npm install` at the root of the repo | ||
4. Run `npm test` to verify that the tests are passing | ||
5. Make your code change(s) | ||
3. Run `npm test` to verify that the tests are still passing. If you added a new functionality, add tests to ensure that we have adequate test coverage. | ||
4. Run `npm run build` to compile the Typescript part of the source code and tests | ||
5. Run `npm test` to verify that the tests are passing | ||
6. Make your code change(s) | ||
7. Run `npm test` to verify that the tests are still passing. If you added a new functionality, add tests to ensure that we have adequate test coverage. | ||
You can check test coverage by running `npm run test:report` | ||
4. Commit your work. Your commit message should follow [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/). We have a pre commit hook to validate the commit message. | ||
5. Send us a pull request, answering any default questions in the pull request interface. The pull request should be going to `develop` branch. | ||
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. | ||
8. Commit your work. Your commit message should follow [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/). We have a pre commit hook to validate the commit message. | ||
9. Send us a pull request, answering any default questions in the pull request interface. The pull request should be going to `develop` branch. | ||
10. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. | ||
|
||
|
||
## Branch Organization | ||
|
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
#!/usr/bin/env node | ||
|
||
import {commander, SKILL_COMMAND_MAP} from "../lib/commands/skill/skill-commander"; | ||
|
||
commander.parse(process.argv); | ||
|
||
if (!process.argv.slice(2).length) { | ||
commander.outputHelp(); | ||
} else if (SKILL_COMMAND_MAP[process.argv[2]] === undefined) { | ||
console.error('Command not recognized. Please run "ask skill" to check the user instructions.'); | ||
process.exit(1); | ||
} |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
#!/usr/bin/env node | ||
|
||
import Messenger from "../lib/view/messenger"; | ||
import jsonView from "../lib/view/json-view"; | ||
import {makeSmapiCommander} from "../lib/commands/smapi/smapi-commander"; | ||
|
||
const commander = makeSmapiCommander(); | ||
|
||
if (!process.argv.slice(2).length) { | ||
commander.outputHelp(); | ||
} else { | ||
commander | ||
.parseAsync(process.argv) | ||
.then((result) => Messenger.getInstance().info(result)) | ||
.catch((err) => { | ||
Messenger.getInstance().error(jsonView.toString(err)); | ||
process.exit(1); | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
#!/usr/bin/env node | ||
import {commander, UTIL_COMMAND_MAP} from "../lib/commands/util/util-commander"; | ||
|
||
commander.parse(process.argv); | ||
|
||
if (!process.argv.slice(2).length) { | ||
commander.outputHelp(); | ||
} else if (UTIL_COMMAND_MAP[process.argv[2]] === undefined) { | ||
console.error('Command not recognized. Please run "ask util" to check the user instructions.'); | ||
process.exit(1); | ||
} |
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
#!/usr/bin/env node | ||
import semver from "semver"; | ||
|
||
if (!semver.gte(process.version, "8.3.0")) { | ||
console.log("Version of node.js doesn't meet minimum requirement."); | ||
console.log("Please ensure system has node.js version 8.3.0 or higher."); | ||
process.exit(1); | ||
} | ||
|
||
import { Command } from 'commander'; | ||
const commander = new Command(); | ||
|
||
import {createCommand as configureCommand} from "../lib/commands/configure"; | ||
import {createCommand as deployCommand} from "../lib/commands/deploy"; | ||
import {createCommand as newCommand} from "../lib/commands/new"; | ||
import {createCommand as initCommand} from "../lib/commands/init"; | ||
import {createCommand as dialogCommand} from "../lib/commands/dialog"; | ||
import {createCommand as runCommand} from "../lib/commands/run"; | ||
|
||
[configureCommand, deployCommand, newCommand, initCommand, dialogCommand, runCommand].forEach( | ||
(command) => command(commander), | ||
); | ||
|
||
commander | ||
.description("Command Line Interface for Alexa Skill Kit") | ||
.command("smapi", "list of Alexa Skill Management API commands") | ||
.command("skill", "increase the productivity when managing skill metadata") | ||
.command("util", "tooling functions when using ask-cli to manage Alexa Skill") | ||
.version(require("../package.json").version) | ||
.parse(process.argv); | ||
|
||
const ALLOWED_ASK_ARGV_2 = [ | ||
"configure", | ||
"deploy", | ||
"new", | ||
"init", | ||
"dialog", | ||
"smapi", | ||
"skill", | ||
"util", | ||
"help", | ||
"-v", | ||
"--version", | ||
"-h", | ||
"--help", | ||
"run", | ||
]; | ||
if (process.argv[2] && ALLOWED_ASK_ARGV_2.indexOf(process.argv[2]) === -1) { | ||
console.log('Command not recognized. Please run "ask" to check the user instructions.'); | ||
process.exit(1); | ||
} |
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,12 @@ | ||
#!/usr/bin/env node | ||
|
||
import {commander, SKILL_COMMAND_MAP} from "../lib/commands/skill/skill-commander"; | ||
|
||
commander.parse(process.argv); | ||
|
||
if (!process.argv.slice(2).length) { | ||
commander.outputHelp(); | ||
} else if (SKILL_COMMAND_MAP[process.argv[2]] === undefined) { | ||
console.error('Command not recognized. Please run "ask skill" to check the user instructions.'); | ||
process.exit(1); | ||
} |
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,19 @@ | ||
#!/usr/bin/env node | ||
|
||
import Messenger from "../lib/view/messenger"; | ||
import jsonView from "../lib/view/json-view"; | ||
import {makeSmapiCommander} from "../lib/commands/smapi/smapi-commander"; | ||
|
||
const commander = makeSmapiCommander(); | ||
|
||
if (!process.argv.slice(2).length) { | ||
commander.outputHelp(); | ||
} else { | ||
commander | ||
.parseAsync(process.argv) | ||
.then((result) => Messenger.getInstance().info(result)) | ||
.catch((err) => { | ||
Messenger.getInstance().error(jsonView.toString(err)); | ||
process.exit(1); | ||
}); | ||
} |
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 @@ | ||
#!/usr/bin/env node | ||
import {commander, UTIL_COMMAND_MAP} from "../lib/commands/util/util-commander"; | ||
|
||
commander.parse(process.argv); | ||
|
||
if (!process.argv.slice(2).length) { | ||
commander.outputHelp(); | ||
} else if (UTIL_COMMAND_MAP[process.argv[2]] === undefined) { | ||
console.error('Command not recognized. Please run "ask util" to check the user instructions.'); | ||
process.exit(1); | ||
} |
Oops, something went wrong.