publishing v1 of action

This commit is contained in:
Paul Merlin 2019-09-21 16:11:55 +02:00
parent 91baa89272
commit 2d5ca45eab
569 changed files with 61688 additions and 2 deletions

9
node_modules/string-argv/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,9 @@
# Changelog
## v0.3.0 (2019-04-16)
**Dev Experience Changes**
- Project now compiled with TypeScript and provides typings
## v0.2.0 (2019-04-14)
**Parsing Behavior Changes**
- Now parses multiple nested quotes and content when there are no spaces [7d9b897](https://github.com/mccormicka/string-argv/commit/7d9b89730ea112b829f2591e3e9cae4c0d0cc285)

21
node_modules/string-argv/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright 2014 Anthony McCormick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

58
node_modules/string-argv/README.md generated vendored Normal file
View file

@ -0,0 +1,58 @@
# What is it?
`string-argv` parses a string into an argument array to mimic `process.argv`.
This is useful when testing Command Line Utilities that you want to pass arguments to and is the opposite of what the other argv utilities do.
# Installation
```
npm install string-argv --save
```
# Usage
```ts
// Typescript
import stringArgv from 'string-argv';
const args = stringArgv(
'-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"',
'node',
'testing.js'
);
console.log(args);
```
```js
// Javascript
var { parseArgsStringToArgv } = require('string-argv');
var args = parseArgsStringToArgv(
'-testing test -valid=true --quotes "test quotes" "nested \'quotes\'" --key="some value" --title="Peter\'s Friends"',
'node',
'testing.js'
);
console.log(args);
/** output
[ 'node',
'testing.js',
'-testing',
'test',
'-valid=true',
'--quotes',
'test quotes',
'nested \'quotes\'',
'--key="some value"',
'--title="Peter\'s Friends"' ]
**/
```
## params
__required__: __arguments__ String: arguments that you would normally pass to the command line.
__optional__: __environment__ String: Adds to the environment position in the argv array. If ommitted then there is no need to call argv.split(2) to remove the environment/file values. However if your cli.parse method expects a valid argv value then you should include this value.
__optional__: __file__ String: file that called the arguments. If omitted then there is no need to call argv.split(2) to remove the environment/file values. However if your cli.parse method expects a valid argv value then you should include this value.

2
node_modules/string-argv/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
export { parseArgsStringToArgv as default, parseArgsStringToArgv };
declare function parseArgsStringToArgv(value: string, env?: string, file?: string): string[];

44
node_modules/string-argv/index.js generated vendored Normal file
View file

@ -0,0 +1,44 @@
"use strict";
exports.__esModule = true;
function parseArgsStringToArgv(value, env, file) {
// ([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*) Matches nested quotes until the first space outside of quotes
// [^\s'"]+ or Match if not a space ' or "
// (['"])([^\5]*?)\5 or Match "quoted text" without quotes
// `\3` and `\5` are a backreference to the quote style (' or ") captured
var myRegexp = /([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi;
var myString = value;
var myArray = [];
if (env) {
myArray.push(env);
}
if (file) {
myArray.push(file);
}
var match;
do {
// Each call to exec returns the next regex match as an array
match = myRegexp.exec(myString);
if (match !== null) {
// Index 1 in the array is the captured group if it exists
// Index 0 is the matched text, which we use if no captured group exists
myArray.push(firstString(match[1], match[6], match[0]));
}
} while (match !== null);
return myArray;
}
exports["default"] = parseArgsStringToArgv;
exports.parseArgsStringToArgv = parseArgsStringToArgv;
// Accepts any number of arguments, and returns the first one that is a string
// (even an empty string)
function firstString() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
for (var i = 0; i < args.length; i++) {
var arg = args[i];
if (typeof arg === "string") {
return arg;
}
}
}

70
node_modules/string-argv/package.json generated vendored Normal file
View file

@ -0,0 +1,70 @@
{
"_args": [
[
"string-argv@0.3.1",
"/Users/paul/src/codeartisans/gradle-command-action"
]
],
"_from": "string-argv@0.3.1",
"_id": "string-argv@0.3.1",
"_inBundle": false,
"_integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==",
"_location": "/string-argv",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "string-argv@0.3.1",
"name": "string-argv",
"escapedName": "string-argv",
"rawSpec": "0.3.1",
"saveSpec": null,
"fetchSpec": "0.3.1"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
"_spec": "0.3.1",
"_where": "/Users/paul/src/codeartisans/gradle-command-action",
"author": {
"name": "Anthony McCormick",
"email": "anthony.mccormick@gmail.com"
},
"bugs": {
"url": "https://github.com/mccormicka/string-argv/issues"
},
"contributors": [
{
"name": "Michael Ferris",
"email": "mike.ferri@hotmail.com"
}
],
"dependencies": {},
"description": "string-argv parses a string into an argument array to mimic process.argv. This is useful when testing Command Line Utilities that you want to pass arguments to.",
"devDependencies": {
"jasmine": "^2.4.1",
"typescript": "^3.4.3"
},
"engines": {
"node": ">=0.6.19"
},
"homepage": "https://github.com/mccormicka/string-argv",
"keywords": [
"argv"
],
"license": "MIT",
"main": "index",
"name": "string-argv",
"repository": {
"type": "git",
"url": "git+https://github.com/mccormicka/string-argv.git"
},
"scripts": {
"build": "tsc -p .",
"prepublishOnly": "npm test",
"test": "npm run build & jasmine --config=test/config.json"
},
"types": "index.d.ts",
"version": "0.3.1"
}