8 Commits
v2 ... v1.1

26 changed files with 275 additions and 371 deletions

View File

@ -15,15 +15,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
node-version: '12.x' node-version: '12.x'
- uses: actions/setup-java@v1
with:
java-version: '1.8'
- run: npm version - run: npm version
- run: npm ci - run: npm ci
- run: npm audit - run: npm audit

View File

@ -5,13 +5,6 @@ This action setup maven environment for use in action by:
- create maven settings.xml - create maven settings.xml
- set ```interactiveMode``` to false - useful in CI system - set ```interactiveMode``` to false - useful in CI system
- after job finish generated settings.xml will be removed to prevent cache or left sensitive data on build system - after job finish generated settings.xml will be removed to prevent cache or left sensitive data on build system
- add server to servers with id=github, username=$GITHUB_ACTOR and password=$GITHUB_TOKEN
# Contributions
- Contributions are welcome!
- Give a star - if you want to encourage me to work on a project
- Don't hesitate create issue
# Usage # Usage
See [action.yml](action.yml) See [action.yml](action.yml)
@ -19,13 +12,13 @@ See [action.yml](action.yml)
Create default ```settings.xml```: Create default ```settings.xml```:
```yml ```yml
steps: steps:
- uses: s4u/maven-settings-action@v2.0 - uses: s4u/maven-settings-action@v1
``` ```
Create ```settings.xml``` with server section: Create ```settings.xml``` with server section:
```yml ```yml
steps: steps:
- uses: s4u/maven-settings-action@v2.0 - uses: s4u/maven-settings-action@v1
with: with:
servers: '[{"id": "serverId", "username": "username", "password": "password"}]' servers: '[{"id": "serverId", "username": "username", "password": "password"}]'
``` ```
@ -33,7 +26,7 @@ steps:
Create ```settings.xml``` with maven properties: Create ```settings.xml``` with maven properties:
```yml ```yml
steps: steps:
- uses: s4u/maven-settings-action@v2.0 - uses: s4u/maven-settings-action@v1
with: with:
properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]' properties: '[{"propertyName1": "propertyValue1"}, {"propertyName2": "propertyValue2"}]'
``` ```
@ -41,27 +34,24 @@ steps:
Create ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list Create ```settings.xml``` with https://oss.sonatype.org/content/repositories/snapshots in repository list
```yml ```yml
steps: steps:
- uses: s4u/maven-settings-action@v2.0 - uses: s4u/maven-settings-action@v1
with: with:
sonatypeSnapshots: true sonatypeSnapshots: true
``` ```
Do not override existing ```settings.xml```, from version 2.0 file is override by default : Override existing existing ```settings.xml```:
```yml ```yml
steps: steps:
- uses: s4u/maven-settings-action@v2.0 - uses: s4u/maven-settings-action@v1
with: with:
override: false override: true
``` ```
Do not add github to server in ```settings.xml```, by default is added:
```yml
steps:
- uses: s4u/maven-settings-action@v2.0
with:
githubServer: false
```
# License # License
The scripts and documentation in this project are released under the [MIT License](LICENSE) The scripts and documentation in this project are released under the [MIT License](LICENSE)
# Contributions
Contributions are welcome!

View File

@ -18,13 +18,8 @@ inputs:
required: false required: false
override: override:
description: 'override existing settings.xml file' description: 'override existing settings.xml file'
default: "true" default: "false"
required: false required: false
githubServer:
description: 'add to settings.xml servers server-id: github; username=$GITHUB_ACTOR and password=$GITHUB_TOKEN'
default: "true"
required: false
runs: runs:

View File

@ -82,12 +82,6 @@ try {
core.warning('myInput was not set'); core.warning('myInput was not set');
} }
if (core.isDebug()) {
// curl -v https://github.com
} else {
// curl https://github.com
}
// Do stuff // Do stuff
} }
catch (err) { catch (err) {

View File

@ -55,10 +55,6 @@ export declare function setOutput(name: string, value: string): void;
* @param message add error issue message * @param message add error issue message
*/ */
export declare function setFailed(message: string): void; export declare function setFailed(message: string): void;
/**
* Gets whether Actions Step Debug is on or not
*/
export declare function isDebug(): boolean;
/** /**
* Writes debug message to user log * Writes debug message to user log
* @param message debug message * @param message debug message

View File

@ -104,13 +104,6 @@ exports.setFailed = setFailed;
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// Logging Commands // Logging Commands
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/**
* Gets whether Actions Step Debug is on or not
*/
function isDebug() {
return process.env['RUNNER_DEBUG'] === '1';
}
exports.isDebug = isDebug;
/** /**
* Writes debug message to user log * Writes debug message to user log
* @param message debug message * @param message debug message

View File

@ -1 +1 @@
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAE7C,uCAAwB;AACxB,2CAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,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S,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}

View File

@ -1,16 +1,40 @@
{ {
"name": "@actions/core", "_args": [
"version": "1.2.3", [
"description": "Actions core lib", "@actions/core@1.2.2",
"keywords": [ "."
"github", ]
"actions",
"core"
], ],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core", "_from": "@actions/core@1.2.2",
"license": "MIT", "_id": "@actions/core@1.2.2",
"main": "lib/core.js", "_inBundle": false,
"types": "lib/core.d.ts", "_integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg==",
"_location": "/@actions/core",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@actions/core@1.2.2",
"name": "@actions/core",
"escapedName": "@actions%2fcore",
"scope": "@actions",
"rawSpec": "1.2.2",
"saveSpec": null,
"fetchSpec": "1.2.2"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz",
"_spec": "1.2.2",
"_where": ".",
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"description": "Actions core lib",
"devDependencies": {
"@types/node": "^12.0.2"
},
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@ -18,6 +42,15 @@
"files": [ "files": [
"lib" "lib"
], ],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
"keywords": [
"github",
"actions",
"core"
],
"license": "MIT",
"main": "lib/core.js",
"name": "@actions/core",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
@ -31,14 +64,6 @@
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"bugs": { "types": "lib/core.d.ts",
"url": "https://github.com/actions/toolkit/issues" "version": "1.2.2"
},
"devDependencies": {
"@types/node": "^12.0.2"
}
,"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz"
,"_integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w=="
,"_from": "@actions/core@1.2.3"
} }

15
node_modules/xmldom/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,15 @@
language: node_js
cache:
npm: false
node_js:
- '0.10'
branches:
only:
- master
- proof
- travis-ci
script: npm test

92
node_modules/xmldom/CHANGELOG.md generated vendored
View File

@ -1,92 +0,0 @@
## 0.3.0
- Node >=10.x now required.
- Added getElementsByClassName method.
- Added Node to the list of exports
- Added lowercase of åäö in entityMap.
- Moved existing sources into `lib` subdirectory.
- Removed `.npmignore` in favor of `files` entry in package.json.
- More `package.json` refactoring.
- Replaced CHANGELOG with more rigorous file.
- Replaced LICENSE with more rigorous file.
- Removed component.json (deprecated package manager https://github.com/componentjs/guide)
- `proof` devDep updated to latest.
- Fixed CI.
- README updates.
## 0.2.1
- More package.json refactoring.
## 0.2.0
- Now publishing under xmldom npm package again; retiring xmldom-alpha.
- Remove coveralls.
- Disable cache in travis.
- Other refactoring.
## 0.1.28 (via xmldom-alpha npm package)
- Removed __proto__ accessor.
- Appended HTML entities defaults.
## 0.1.27 (via xmldom-alpha npm package)
- Various bug fixes.
- Don't ask why 0.1.26 and 0.1.25 were skipped. `¯\_(ツ)_/¯`
## 0.1.24 (via xmldom-alpha package)
- Added node filter.
## 0.1.23 (via xmldom-alpha npm package)
- Added namespace support for nest node serialize.
- Various other bug fixes.
## 0.1.22
- Merge XMLNS serialization.
- Removed \r from source string.
- Print namespaces for child elements.
- Switch references to nodeType to use named constants.
- Add nodelist toString support.
## 0.1.21
- Fixed serialize bug.
## 0.1.20
- Optimized invalid XML support.
- Added toString sorter for attributes output.
- Added html self closed node button.
- Added `*` NS support for getElementsByTagNameNS.
- Converted attribute's value to string in setAttributeNS.
- Added support for HTML entities for HTML docs only.
- Fixed TypeError when Document is created with DocumentType.
## 0.1.19
- Fixed issue #68, infinite loop on unclosed comment.
- Added error report for unclosed tag.
- Various other fixes.
## 0.1.18
- Added default `ns` support.
- parseFromString now renders entirely plain text documents as textNode.
- Enabled option to ignore white space on parsing.
## 0.1.16
- Correctly handle multibyte Unicode greater than two byts. #57. #56.
- Initial unit testing and test coverage. #53. #46. #19.
- Create Bower `component.json` #52.
## 0.1.8
- Add: some test case from node-o3-xml(excludes xpath support)
- Fix: remove existed attribute before setting (bug introduced in v0.1.5)
- Fix: index direct access for childNodes and any NodeList collection(not w3c standard)
- Fix: remove last child bug

8
node_modules/xmldom/LICENSE generated vendored Normal file
View File

@ -0,0 +1,8 @@
You can choose any one of those:
The MIT License (MIT):
link:http://opensource.org/licenses/MIT
LGPL:
http://www.gnu.org/licenses/lgpl.html

4
node_modules/xmldom/LICENSE.md generated vendored
View File

@ -1,4 +0,0 @@
You can choose any one of these licenses:
- MIT: https://opensource.org/licenses/MIT
- LGPL: http://www.gnu.org/licenses/lgpl.html

4
node_modules/xmldom/__package__.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
this.addScript('dom.js',['DOMImplementation','XMLSerializer']);
this.addScript('dom-parser.js',['DOMHandler','DOMParser'],
['DOMImplementation','XMLReader']);
this.addScript('sax.js','XMLReader');

14
node_modules/xmldom/changelog generated vendored Normal file
View File

@ -0,0 +1,14 @@
### Version 0.1.16
Sat May 4 14:58:03 UTC 2013
* Correctly handle multibyte Unicode greater than two byts. #57. #56.
* Initial unit testing and test coverage. #53. #46. #19.
* Create Bower `component.json` #52.
### Version 0.1.8
* Add: some test case from node-o3-xml(excludes xpath support)
* Fix: remove existed attribute before setting (bug introduced in v0.1.5)
* Fix: index direct access for childNodes and any NodeList collection(not w3c standard)
* Fix: remove last child bug

10
node_modules/xmldom/component.json generated vendored Normal file
View File

@ -0,0 +1,10 @@
{
"name": "xmldom",
"version": "0.1.15",
"main": "dom-parser.js",
"ignore": [
"**/.*",
"node_modules",
"components"
]
}

View File

@ -1,5 +1,6 @@
function DOMParser(options){ function DOMParser(options){
this.options = options ||{locator:{}}; this.options = options ||{locator:{}};
} }
DOMParser.prototype.parseFromString = function(source,mimeType){ DOMParser.prototype.parseFromString = function(source,mimeType){

View File

@ -608,21 +608,6 @@ Document.prototype = {
return rtv; return rtv;
}, },
getElementsByClassName: function(className) {
const pattern = new RegExp(`(^|\\s)${className}(\\s|$)`);
return new LiveNodeList(this, base => {
var ls = [];
_visitNode(base.documentElement, node => {
if(node !== base && node.nodeType == ELEMENT_NODE) {
if(pattern.test(node.getAttribute('class'))) {
ls.push(node);
}
}
});
return ls;
});
},
//document factory method: //document factory method:
createElement : function(tagName){ createElement : function(tagName){
var node = new Element(); var node = new Element();
@ -1250,7 +1235,6 @@ try{
} }
//if(typeof require == 'function'){ //if(typeof require == 'function'){
exports.Node = Node;
exports.DOMImplementation = DOMImplementation; exports.DOMImplementation = DOMImplementation;
exports.XMLSerializer = XMLSerializer; exports.XMLSerializer = XMLSerializer;
//} //}

View File

@ -9,9 +9,7 @@ exports.entityMap = {
Acirc: "Â", Acirc: "Â",
Atilde: "Ã", Atilde: "Ã",
Auml: "Ä", Auml: "Ä",
auml: "ä",
Aring: "Å", Aring: "Å",
aring: "å",
AElig: "Æ", AElig: "Æ",
Ccedil: "Ç", Ccedil: "Ç",
Egrave: "È", Egrave: "È",
@ -29,7 +27,6 @@ exports.entityMap = {
Ocirc: "Ô", Ocirc: "Ô",
Otilde: "Õ", Otilde: "Õ",
Ouml: "Ö", Ouml: "Ö",
ouml: "ö",
Oslash: "Ø", Oslash: "Ø",
Ugrave: "Ù", Ugrave: "Ù",
Uacute: "Ú", Uacute: "Ú",

130
node_modules/xmldom/package.json generated vendored
View File

@ -1,7 +1,67 @@
{ {
"name": "xmldom", "_args": [
"version": "0.3.0", [
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.", "xmldom@0.2.1",
"."
]
],
"_from": "xmldom@0.2.1",
"_id": "xmldom@0.2.1",
"_inBundle": false,
"_integrity": "sha512-kXXiYvmblIgEemGeB75y97FyaZavx6SQhGppLw5TKWAD2Wd0KAly0g23eVLh17YcpxZpnFym1Qk/eaRjy1APPg==",
"_location": "/xmldom",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "xmldom@0.2.1",
"name": "xmldom",
"escapedName": "xmldom",
"rawSpec": "0.2.1",
"saveSpec": null,
"fetchSpec": "0.2.1"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.2.1.tgz",
"_spec": "0.2.1",
"_where": ".",
"author": {
"name": "jindw",
"email": "jindw@xidea.org",
"url": "http://www.xidea.org"
},
"bugs": {
"url": "http://github.com/xmldom/xmldom/issues",
"email": "jindw@xidea.org"
},
"contributors": [
{
"name": "Yaron Naveh",
"email": "yaronn01@gmail.com",
"url": "http://webservices20.blogspot.com/"
},
{
"name": "Harutyun Amirjanyan",
"email": "amirjanyan@gmail.com",
"url": "https://github.com/nightwing"
},
{
"name": "Alan Gutierrez",
"email": "alan@prettyrobots.com",
"url": "http://www.prettyrobots.com/"
}
],
"dependencies": {},
"description": "A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).",
"devDependencies": {
"proof": "0.0.28"
},
"engines": {
"node": ">=0.1"
},
"homepage": "https://github.com/xmldom/xmldom",
"keywords": [ "keywords": [
"w3c", "w3c",
"dom", "dom",
@ -11,66 +71,22 @@
"DOMParser", "DOMParser",
"XMLSerializer" "XMLSerializer"
], ],
"author": "jindw <jindw@xidea.org> (http://www.xidea.org)", "license": "(LGPL-2.0 or MIT)",
"homepage": "https://github.com/xmldom/xmldom", "main": "./dom-parser.js",
"repository": {
"type": "git",
"url": "git://github.com/xmldom/xmldom.git"
},
"main": "lib/dom-parser.js",
"files": [
"lib"
],
"scripts": {
"test": "proof platform win32 && proof test */*/*.t.js || t/test"
},
"engines": {
"node": ">=10.0.0"
},
"dependencies": {},
"devDependencies": {
"proof": "~7.0.9"
},
"maintainers": [ "maintainers": [
{
"name": "brodybits",
"email": "chris@brody.consulting",
"url": "https://github.com/brodybits"
}
],
"contributors": [
{ {
"name": "jindw", "name": "jindw",
"email": "jindw@xidea.org", "email": "jindw@xidea.org",
"url": "http://www.xidea.org" "url": "http://www.xidea.org"
},
{
"name": "Yaron Naveh",
"email": "yaronn01@gmail.com",
"web": "http://webservices20.blogspot.com/"
},
{
"name": "Harutyun Amirjanyan",
"email": "amirjanyan@gmail.com",
"web": "https://github.com/nightwing"
},
{
"name": "Alan Gutierrez",
"email": "alan@prettyrobots.com",
"web": "http://www.prettyrobots.com/"
},
{
"name": "Eric Newport",
"email": "kethinov@gmail.com",
"web": "https://github.com/kethinov"
} }
], ],
"bugs": { "name": "xmldom",
"url": "https://github.com/xmldom/xmldom/issues" "repository": {
"type": "git",
"url": "git://github.com/xmldom/xmldom.git"
}, },
"license": "(LGPL-2.0 OR MIT)" "scripts": {
"test": "proof platform win32 && proof test */*/*.t.js || t/test"
,"_resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.3.0.tgz" },
,"_integrity": "sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g==" "version": "0.2.1"
,"_from": "xmldom@0.3.0"
} }

4
node_modules/xmldom/readme.md generated vendored
View File

@ -1,11 +1,9 @@
# XMLDOM [![Build Status](https://secure.travis-ci.org/xmldom/xmldom.png?branch=master)](http://travis-ci.org/xmldom/xmldom) [![NPM version](https://badge.fury.io/js/xmldom.png)](http://badge.fury.io/js/xmldom) # XMLDOM [![Build Status](https://secure.travis-ci.org/bigeasy/xmldom.png?branch=master)](http://travis-ci.org/bigeasy/xmldom) [![Coverage Status](https://coveralls.io/repos/bigeasy/xmldom/badge.png?branch=master)](https://coveralls.io/r/bigeasy/xmldom) [![NPM version](https://badge.fury.io/js/xmldom.png)](http://badge.fury.io/js/xmldom)
A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully
compatible with `W3C DOM level2`; and some compatible with `level3`. Supports compatible with `W3C DOM level2`; and some compatible with `level3`. Supports
`DOMParser` and `XMLSerializer` interface such as in browser. `DOMParser` and `XMLSerializer` interface such as in browser.
**Original project location:** <https://github.com/jindw/xmldom>
Install: Install:
------- -------
>npm install xmldom >npm install xmldom

64
node_modules/xpath/package.json generated vendored
View File

@ -1,13 +1,38 @@
{ {
"name": "xpath", "_args": [
"version": "0.0.27", [
"description": "DOM 3 XPath implemention and helper for node.js.", "xpath@0.0.27",
"engines": { "."
"node": ">=0.6.0" ]
],
"_from": "xpath@0.0.27",
"_id": "xpath@0.0.27",
"_inBundle": false,
"_integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==",
"_location": "/xpath",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "xpath@0.0.27",
"name": "xpath",
"escapedName": "xpath",
"rawSpec": "0.0.27",
"saveSpec": null,
"fetchSpec": "0.0.27"
}, },
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz",
"_spec": "0.0.27",
"_where": ".",
"author": { "author": {
"name": "Cameron McCormack" "name": "Cameron McCormack"
}, },
"bugs": {
"url": "https://github.com/goto100/xpath/issues"
},
"contributors": [ "contributors": [
{ {
"name": "goto100" "name": "goto100"
@ -17,26 +42,29 @@
} }
], ],
"dependencies": {}, "dependencies": {},
"description": "DOM 3 XPath implemention and helper for node.js.",
"devDependencies": { "devDependencies": {
"nodeunit": ">=0.6.4", "nodeunit": ">=0.6.4",
"xmldom": "^0.1.19" "xmldom": "^0.1.19"
}, },
"typings": "./xpath.d.ts", "engines": {
"scripts": { "node": ">=0.6.0"
"test": "./node_modules/.bin/nodeunit test.js"
}, },
"repository": { "homepage": "https://github.com/goto100/xpath#readme",
"type": "git",
"url": "https://github.com/goto100/xpath.git"
},
"main": "./xpath.js",
"keywords": [ "keywords": [
"xpath", "xpath",
"xml" "xml"
], ],
"license": "MIT" "license": "MIT",
"main": "./xpath.js",
,"_resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz" "name": "xpath",
,"_integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==" "repository": {
,"_from": "xpath@0.0.27" "type": "git",
"url": "git+https://github.com/goto100/xpath.git"
},
"scripts": {
"test": "nodeunit test.js"
},
"typings": "./xpath.d.ts",
"version": "0.0.27"
} }

30
package-lock.json generated
View File

@ -5,9 +5,9 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@actions/core": { "@actions/core": {
"version": "1.2.3", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz",
"integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w==" "integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg=="
}, },
"@babel/code-frame": { "@babel/code-frame": {
"version": "7.5.5", "version": "7.5.5",
@ -849,9 +849,9 @@
"dev": true "dev": true
}, },
"acorn": { "acorn": {
"version": "7.1.1", "version": "7.1.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
"dev": true "dev": true
}, },
"acorn-globals": { "acorn-globals": {
@ -865,9 +865,9 @@
}, },
"dependencies": { "dependencies": {
"acorn": { "acorn": {
"version": "6.4.1", "version": "6.4.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==",
"dev": true "dev": true
} }
} }
@ -1853,9 +1853,9 @@
}, },
"dependencies": { "dependencies": {
"acorn": { "acorn": {
"version": "7.1.1", "version": "7.1.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
"dev": true "dev": true
} }
} }
@ -6222,9 +6222,9 @@
"dev": true "dev": true
}, },
"xmldom": { "xmldom": {
"version": "0.3.0", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.3.0.tgz", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.2.1.tgz",
"integrity": "sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g==" "integrity": "sha512-kXXiYvmblIgEemGeB75y97FyaZavx6SQhGppLw5TKWAD2Wd0KAly0g23eVLh17YcpxZpnFym1Qk/eaRjy1APPg=="
}, },
"xpath": { "xpath": {
"version": "0.0.27", "version": "0.0.27",

View File

@ -24,8 +24,8 @@
}, },
"homepage": "https://github.com/s4u/maven-settings-action#readme", "homepage": "https://github.com/s4u/maven-settings-action#readme",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.3", "@actions/core": "^1.2.2",
"xmldom": "^0.3.0", "xmldom": "^0.2.1",
"xpath": "0.0.27" "xpath": "0.0.27"
}, },
"devDependencies": { "devDependencies": {

View File

@ -52,34 +52,6 @@ function writeSettings(settingsPath, templateXml) {
fs.writeFileSync(settingsPath, settingStr); fs.writeFileSync(settingsPath, settingStr);
} }
function createElementWithText(template, tag, text) {
const tagXml = template.createElement(tag);
tagXml.textContent = text;
return tagXml;
}
function fillServer(template, id, username, password) {
const serverXml = template.createElement('server');
if (!id || !username || !password) {
core.setFailed('servers must contain id, username and password');
return;
}
const idXml = createElementWithText(template, 'id', id);
serverXml.appendChild(idXml);
const usernameXml = createElementWithText(template, 'username', username);
serverXml.appendChild(usernameXml);
const passwordXml = createElementWithText(template, 'password', password);
serverXml.appendChild(passwordXml);
const serversXml = template.getElementsByTagName('servers')[0];
serversXml.appendChild(serverXml);
}
function fillServers(template) { function fillServers(template) {
const servers = core.getInput('servers'); const servers = core.getInput('servers');
@ -88,21 +60,19 @@ function fillServers(template) {
return; return;
} }
JSON.parse(servers).forEach((server) => fillServer(template, server.id, server.username, server.password)); const serversXml = template.getElementsByTagName('servers')[0];
}
function isInputTrue(inputName) { JSON.parse(servers).forEach((server) => {
const val = core.getInput(inputName);
return val && val.toLocaleLowerCase() == 'true';
}
function fillServerForGithub(templateXml) { const serverXml = template.createElement('server');
serversXml.appendChild(serverXml);
if (!isInputTrue('githubServer')) { for (const key in server) {
return; const keyXml = template.createElement(key);
} keyXml.textContent = server[key];
serverXml.appendChild(keyXml);
fillServer(templateXml, 'github', '${env.GITHUB_ACTOR}', '${env.GITHUB_TOKEN}'); }
});
} }
function activateProfile(template, profileId) { function activateProfile(template, profileId) {
@ -136,7 +106,8 @@ function fillProperties(template) {
} }
function addSonatypeSnapshots(template) { function addSonatypeSnapshots(template) {
if (isInputTrue('sonatypeSnapshots')) { const val = core.getInput('sonatypeSnapshots');
if (val && val.toLocaleLowerCase() == 'true') {
activateProfile(template, '_sonatype-snapshots_') activateProfile(template, '_sonatype-snapshots_')
} }
} }
@ -148,7 +119,8 @@ function generate() {
core.info('Prepare maven setings: ' + settingsPath); core.info('Prepare maven setings: ' + settingsPath);
if (fs.existsSync(settingsPath)) { if (fs.existsSync(settingsPath)) {
if (isInputTrue('override')) { const val = core.getInput("override");
if (val && val.toLocaleLowerCase() == 'true') {
core.info('maven settings.xml already exists - override'); core.info('maven settings.xml already exists - override');
} else { } else {
core.warning('maven settings.xml already exists - skip'); core.warning('maven settings.xml already exists - skip');
@ -158,7 +130,6 @@ function generate() {
const templateXml = getSettingsTemplate(); const templateXml = getSettingsTemplate();
fillServers(templateXml); fillServers(templateXml);
fillServerForGithub(templateXml);
fillProperties(templateXml); fillProperties(templateXml);
addSonatypeSnapshots(templateXml); addSonatypeSnapshots(templateXml);
writeSettings(settingsPath, templateXml); writeSettings(settingsPath, templateXml);
@ -185,7 +156,6 @@ module.exports = {
getSettingsTemplate, getSettingsTemplate,
writeSettings, writeSettings,
fillServers, fillServers,
fillServerForGithub,
fillProperties, fillProperties,
addSonatypeSnapshots, addSonatypeSnapshots,
generate, generate,

View File

@ -87,7 +87,7 @@ afterAll(() => {
afterEach(() => { afterEach(() => {
for (key in process.env) { for (key in process.env) {
if (key.match(/^INPUT_/) || key.match(/^GITHUB_/)) { if (key.match(/^INPUT_/)) {
delete process.env[key]; delete process.env[key];
} }
} }
@ -162,38 +162,6 @@ test('fillServers two servers', () => {
"</servers>"); "</servers>");
}); });
test('fillServers incorrect fields', () => {
const xml = new DOMParser().parseFromString("<servers/>");
process.env['INPUT_SERVERS'] = '[{"idx": "id1"}]';
settings.fillServers(xml);
const xmlStr = new XMLSerializer().serializeToString(xml);
expect(xmlStr).toBe('<servers/>');
expect(consoleOutput).toEqual(
expect.arrayContaining([
expect.stringMatching(/::error::servers must contain id, username and password/)
])
);
});
test('fillServers github', () => {
const xml = new DOMParser().parseFromString("<servers/>");
process.env['INPUT_GITHUBSERVER'] = 'true';
settings.fillServerForGithub(xml);
const xmlStr = new XMLSerializer().serializeToString(xml);
expect(xmlStr).toBe('<servers><server><id>github</id><username>${env.GITHUB_ACTOR}</username><password>${env.GITHUB_TOKEN}</password></server></servers>');
expect(consoleOutput).toEqual([]);
});
test('addSonatypeSnapshots activate', () => { test('addSonatypeSnapshots activate', () => {
process.env['INPUT_SONATYPESNAPSHOTS'] = "true"; process.env['INPUT_SONATYPESNAPSHOTS'] = "true";
@ -311,7 +279,7 @@ test('cleanup - ok', () => {
test('genereate', () => { test('genereate', () => {
process.env['INPUT_SERVERS'] = '[{"id": "serverId", "username": "username", "password": "password"}]'; process.env['INPUT_SERVERS'] = '[{"id": "serverId", "username": "username", "password": "password"}]';
process.env['INPUT_PROPERTIES'] = '[{"prop1": "value1"}, {"prop2": "value2"}]' process.env['INPUT_PROPERTIES'] = '[{"prop1": "value1"}, {"prop2": "value2"}]'
process.env['INPUT_SONATYPESNAPSHOT'] = true; process.env['INPUT_SONATYPESNAPSHOT'] = true;