Skip to content

Commit

Permalink
merge v2.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michail committed Mar 30, 2023
1 parent 4aed528 commit a0afbc3
Show file tree
Hide file tree
Showing 888 changed files with 99,678 additions and 42,689 deletions.
7 changes: 0 additions & 7 deletions .babelrc.js

This file was deleted.

22 changes: 2 additions & 20 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,10 @@
"footer-leading-blank": [1, "always"],
"subject-empty": [2, "never"],
"subject-full-stop": [2, "never", "."],
"subject-case": [
2,
"never",
["sentence-case", "pascal-case", "start-case", "upper-case"]
],
"subject-case": [2, "never", ["sentence-case", "pascal-case", "start-case", "upper-case"]],
"scope-case": [2, "always", "lower-case"],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
[
"chore",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
]
]
"type-enum": [2, "always", ["chore", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"]]
}
}
51 changes: 0 additions & 51 deletions .eslintrc.json

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Dependency directories
node_modules/
package-lock.json
build
dist/
package/

# Logs
logs
Expand All @@ -23,3 +25,5 @@ test/temp

.vagrant

# distribution files
*.tgz
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ docs
jsconfig.json
scripts
test
package-lock.json
build
*.tgz
lib
bin
!dist/**
dist/test
.husky
.prettierrc
.prettierignore
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.github
dist
build
node_modules
docs
scripts
*.md
12 changes: 12 additions & 0 deletions .prettierrc
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
}
8 changes: 8 additions & 0 deletions .prettierrc.json
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
}
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions bin/ask-skill.js

This file was deleted.

12 changes: 12 additions & 0 deletions bin/ask-skill.ts
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);
}
19 changes: 0 additions & 19 deletions bin/ask-smapi.js

This file was deleted.

19 changes: 19 additions & 0 deletions bin/ask-smapi.ts
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);
});
}
13 changes: 0 additions & 13 deletions bin/ask-util.js

This file was deleted.

11 changes: 11 additions & 0 deletions bin/ask-util.ts
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);
}
33 changes: 0 additions & 33 deletions bin/ask.js

This file was deleted.

51 changes: 51 additions & 0 deletions bin/ask.ts
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);
}
12 changes: 12 additions & 0 deletions bin/askx-skill.ts
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);
}
19 changes: 19 additions & 0 deletions bin/askx-smapi.ts
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);
});
}
11 changes: 11 additions & 0 deletions bin/askx-util.ts
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);
}
Loading

0 comments on commit a0afbc3

Please sign in to comment.