Skip to content

Commit

Permalink
Merge pull request #175 from sliit-foss/feat/actions-exec-type-support
Browse files Browse the repository at this point in the history
Add #104 Type support for actions-exec-wrapper added
  • Loading branch information
Akalanka47000 authored Apr 14, 2024
2 parents 79d2024 + f86e4e5 commit 5aaa0aa
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 32 deletions.
65 changes: 33 additions & 32 deletions packages/actions-exec-wrapper/package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
{
"name": "@sliit-foss/actions-exec-wrapper",
"version": "1.1.1",
"description": "A wrapper around the @actions/exec module which promisifies the console output of a command",
"main": "dist/index.js",
"scripts": {
"build": "node ../../scripts/esbuild.config.js",
"build:watch": "bash ../../scripts/esbuild.watch.sh",
"bump-version": "bash ../../scripts/bump-version.sh --name=@sliit-foss/actions-exec-wrapper",
"lint": "bash ../../scripts/lint.sh",
"release": "bash ../../scripts/release.sh",
"test": "bash ../../scripts/test/test.sh"
},
"dependencies": {
"@actions/exec": "1.1.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sliit-foss/npm-catalogue.git"
},
"keywords": [
"@actions/exec",
"actions-exec-wrapper",
"console-output"
],
"author": "SLIIT FOSS",
"license": "MIT",
"bugs": {
"url": "https://github.com/sliit-foss/npm-catalogue/issues"
},
"homepage": "https://github.com/sliit-foss/npm-catalogue/blob/main/packages/actions-exec-wrapper/readme.md"
}
{
"name": "@sliit-foss/actions-exec-wrapper",
"version": "1.1.1",
"description": "A wrapper around the @actions/exec module which promisifies the console output of a command",
"main": "dist/index.js",
"types": "types/index.d.ts",
"scripts": {
"build": "node ../../scripts/esbuild.config.js",
"build:watch": "bash ../../scripts/esbuild.watch.sh",
"bump-version": "bash ../../scripts/bump-version.sh --name=@sliit-foss/actions-exec-wrapper",
"lint": "bash ../../scripts/lint.sh",
"release": "bash ../../scripts/release.sh",
"test": "bash ../../scripts/test/test.sh"
},
"dependencies": {
"@actions/exec": "1.1.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sliit-foss/npm-catalogue.git"
},
"keywords": [
"@actions/exec",
"actions-exec-wrapper",
"console-output"
],
"author": "SLIIT FOSS",
"license": "MIT",
"bugs": {
"url": "https://github.com/sliit-foss/npm-catalogue/issues"
},
"homepage": "https://github.com/sliit-foss/npm-catalogue/blob/main/packages/actions-exec-wrapper/readme.md"
}
14 changes: 14 additions & 0 deletions packages/actions-exec-wrapper/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* @description Runs a given CLI command and return's it's standard output(stdout)
* @param command The command to be run
* @returns Command output wrapped around a promise
* @example
* exec("npm --version")
* .then((result) => {
* console.log(result);
* })
* .catch((error) => {
* console.log(error);
* });
*/
export default function execute(command: string): Promise<string>;

0 comments on commit 5aaa0aa

Please sign in to comment.