mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-15 00:00:30 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24fd865d62 | |||
| c16c7e68b1 | |||
| caa38170bf | |||
| 524b9d4c60 | |||
| bc5e386b37 | |||
| cf4f2545cb |
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -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
|
||||||
|
|||||||
36
README.md
36
README.md
@ -4,14 +4,6 @@
|
|||||||
This action setup maven environment for use in action by:
|
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
|
|
||||||
- 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 +11,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 +25,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 +33,15 @@ 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 :
|
|
||||||
```yml
|
|
||||||
steps:
|
|
||||||
- uses: s4u/maven-settings-action@v2.0
|
|
||||||
with:
|
|
||||||
override: false
|
|
||||||
```
|
|
||||||
|
|
||||||
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!
|
||||||
|
|||||||
10
action.yml
10
action.yml
@ -16,18 +16,8 @@ inputs:
|
|||||||
description: 'add https://oss.sonatype.org/content/repositories/snapshots to repository list - true or false'
|
description: 'add https://oss.sonatype.org/content/repositories/snapshots to repository list - true or false'
|
||||||
default: "false"
|
default: "false"
|
||||||
required: false
|
required: false
|
||||||
override:
|
|
||||||
description: 'override existing settings.xml file'
|
|
||||||
default: "true"
|
|
||||||
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:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'index.js'
|
main: 'index.js'
|
||||||
post: 'cleanup.js'
|
|
||||||
|
|||||||
36
cleanup.js
36
cleanup.js
@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Slawomir Jaranowski and contributors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const core = require('@actions/core');
|
|
||||||
const settings = require('./settings');
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
try {
|
|
||||||
settings.cleanup();
|
|
||||||
} catch (error) {
|
|
||||||
core.setFailed(error.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
run();
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Slawomir Jaranowski and contributors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const cp = require('child_process');
|
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path');
|
|
||||||
const process = require('process');
|
|
||||||
|
|
||||||
const cleanupPath = path.join(__dirname, 'cleanup.js');
|
|
||||||
|
|
||||||
const testHomePath = fs.mkdtempSync(".m2");
|
|
||||||
const settingsPath = path.join(testHomePath, '.m2', 'settings.xml');
|
|
||||||
|
|
||||||
beforeAll(() => {
|
|
||||||
if (!fs.existsSync(testHomePath)) {
|
|
||||||
fs.mkdirSync(testHomePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
process.env['HOME'] = testHomePath;
|
|
||||||
process.env['USERPROFILE'] = testHomePath;
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
|
|
||||||
try {
|
|
||||||
fs.rmdirSync(path.dirname(settingsPath));
|
|
||||||
} catch (error) {
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
fs.rmdirSync(testHomePath);
|
|
||||||
} catch (error) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
test('run with default values', () => {
|
|
||||||
cp.execSync(`node ${cleanupPath}`, { env: process.env }).toString();
|
|
||||||
})
|
|
||||||
48
index.js
48
index.js
@ -1,37 +1,35 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Slawomir Jaranowski and contributors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
const path = require('path');
|
||||||
|
const fs = require('fs');
|
||||||
|
const os = require('os');
|
||||||
const settings = require('./settings');
|
const settings = require('./settings');
|
||||||
|
|
||||||
|
|
||||||
|
// most @actions toolkit packages have async methods
|
||||||
async function run() {
|
async function run() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
settings.generate();
|
const settingsPath = path.join(os.homedir(), '.m2', 'settings.xml');
|
||||||
|
|
||||||
|
core.info('Prepare maven setings: ' + settingsPath);
|
||||||
|
|
||||||
|
if (fs.existsSync(settingsPath)) {
|
||||||
|
core.warning('maven settings.xml already exists - skip');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const templateXml = settings.getSettingsTemplate();
|
||||||
|
settings.fillServers(templateXml);
|
||||||
|
settings.fillProperties(templateXml);
|
||||||
|
settings.addSonatypeSnapshots(templateXml);
|
||||||
|
settings.writeSettings(settingsPath, templateXml);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
||||||
|
module.exports = { run };
|
||||||
|
|||||||
@ -1,27 +1,3 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Slawomir Jaranowski and contributors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const process = require('process');
|
const process = require('process');
|
||||||
const cp = require('child_process');
|
const cp = require('child_process');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
@ -48,33 +24,30 @@ afterEach(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs.rmdirSync(path.dirname(settingsPath));
|
fs.rmdirSync(path.dirname(settingsPath));
|
||||||
} catch (error) {
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
fs.rmdirSync(testHomePath);
|
fs.rmdirSync(testHomePath);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test('run with all feature', () => {
|
test('run with default values', () => {
|
||||||
|
|
||||||
process.env['INPUT_SERVERS'] = '[{"id": "serverId", "username": "username", "password": "password"}]';
|
|
||||||
process.env['INPUT_PROPERTIES'] = '[{"prop1": "value1"}, {"prop2": "value2"}]'
|
|
||||||
process.env['INPUT_SONATYPESNAPSHOT'] = true;
|
|
||||||
|
|
||||||
cp.execSync(`node ${indexPath}`, { env: process.env }).toString();
|
|
||||||
|
|
||||||
|
console.log(cp.execSync(`node ${indexPath}`, { env: process.env }).toString());
|
||||||
|
const settingsStatus = fs.lstatSync(settingsPath);
|
||||||
|
expect(settingsStatus.isFile()).toBeTruthy();
|
||||||
|
expect(settingsStatus.size).toBeGreaterThan(0);
|
||||||
|
})
|
||||||
|
|
||||||
|
test('run with all feature', () => {
|
||||||
|
|
||||||
|
process.env['INPUT_SERVERES'] = '[{"id": "serverId", "username": "username", "password": "password"}]';
|
||||||
|
process.env['INPUT_PROPERTIES'] = '[{"prop1": "value1"}, {"prop2": "value2"}]'
|
||||||
|
process.env['INPUT_SONATYPESNAPSHOT'] = true;
|
||||||
|
|
||||||
|
console.log(cp.execSync(`node ${indexPath}`, { env: process.env }).toString());
|
||||||
const settingsStatus = fs.lstatSync(settingsPath);
|
const settingsStatus = fs.lstatSync(settingsPath);
|
||||||
expect(settingsStatus.isFile()).toBeTruthy();
|
expect(settingsStatus.isFile()).toBeTruthy();
|
||||||
expect(settingsStatus.size).toBeGreaterThan(0);
|
expect(settingsStatus.size).toBeGreaterThan(0);
|
||||||
|
|
||||||
const settingsBody = fs.readFileSync(settingsPath).toString();
|
|
||||||
expect(settingsBody).toMatch('<settings>');
|
|
||||||
expect(settingsBody).toMatch('<servers><server><id>serverId</id><username>username</username><password>password</password></server></servers>');
|
|
||||||
expect(settingsBody).toMatch('prop1');
|
|
||||||
})
|
})
|
||||||
|
|||||||
6
node_modules/@actions/core/README.md
generated
vendored
6
node_modules/@actions/core/README.md
generated
vendored
@ -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) {
|
||||||
|
|||||||
6
node_modules/@actions/core/lib/command.d.ts
generated
vendored
6
node_modules/@actions/core/lib/command.d.ts
generated
vendored
@ -5,11 +5,11 @@ interface CommandProperties {
|
|||||||
* Commands
|
* Commands
|
||||||
*
|
*
|
||||||
* Command Format:
|
* Command Format:
|
||||||
* ::name key=value,key=value::message
|
* ##[name key=value;key=value]message
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
* ::warning::This is the message
|
* ##[warning]This is the user warning message
|
||||||
* ::set-env name=MY_VAR::some value
|
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
||||||
*/
|
*/
|
||||||
export declare function issueCommand(command: string, properties: CommandProperties, message: string): void;
|
export declare function issueCommand(command: string, properties: CommandProperties, message: string): void;
|
||||||
export declare function issue(name: string, message?: string): void;
|
export declare function issue(name: string, message?: string): void;
|
||||||
|
|||||||
46
node_modules/@actions/core/lib/command.js
generated
vendored
46
node_modules/@actions/core/lib/command.js
generated
vendored
@ -1,22 +1,15 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
||||||
result["default"] = mod;
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const os = __importStar(require("os"));
|
const os = require("os");
|
||||||
/**
|
/**
|
||||||
* Commands
|
* Commands
|
||||||
*
|
*
|
||||||
* Command Format:
|
* Command Format:
|
||||||
* ::name key=value,key=value::message
|
* ##[name key=value;key=value]message
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
* ::warning::This is the message
|
* ##[warning]This is the user warning message
|
||||||
* ::set-env name=MY_VAR::some value
|
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
||||||
*/
|
*/
|
||||||
function issueCommand(command, properties, message) {
|
function issueCommand(command, properties, message) {
|
||||||
const cmd = new Command(command, properties, message);
|
const cmd = new Command(command, properties, message);
|
||||||
@ -41,38 +34,33 @@ class Command {
|
|||||||
let cmdStr = CMD_STRING + this.command;
|
let cmdStr = CMD_STRING + this.command;
|
||||||
if (this.properties && Object.keys(this.properties).length > 0) {
|
if (this.properties && Object.keys(this.properties).length > 0) {
|
||||||
cmdStr += ' ';
|
cmdStr += ' ';
|
||||||
let first = true;
|
|
||||||
for (const key in this.properties) {
|
for (const key in this.properties) {
|
||||||
if (this.properties.hasOwnProperty(key)) {
|
if (this.properties.hasOwnProperty(key)) {
|
||||||
const val = this.properties[key];
|
const val = this.properties[key];
|
||||||
if (val) {
|
if (val) {
|
||||||
if (first) {
|
// safely append the val - avoid blowing up when attempting to
|
||||||
first = false;
|
// call .replace() if message is not a string for some reason
|
||||||
}
|
cmdStr += `${key}=${escape(`${val || ''}`)},`;
|
||||||
else {
|
|
||||||
cmdStr += ',';
|
|
||||||
}
|
|
||||||
cmdStr += `${key}=${escapeProperty(val)}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
|
cmdStr += CMD_STRING;
|
||||||
|
// safely append the message - avoid blowing up when attempting to
|
||||||
|
// call .replace() if message is not a string for some reason
|
||||||
|
const message = `${this.message || ''}`;
|
||||||
|
cmdStr += escapeData(message);
|
||||||
return cmdStr;
|
return cmdStr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function escapeData(s) {
|
function escapeData(s) {
|
||||||
return (s || '')
|
return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
||||||
.replace(/%/g, '%25')
|
|
||||||
.replace(/\r/g, '%0D')
|
|
||||||
.replace(/\n/g, '%0A');
|
|
||||||
}
|
}
|
||||||
function escapeProperty(s) {
|
function escape(s) {
|
||||||
return (s || '')
|
return s
|
||||||
.replace(/%/g, '%25')
|
|
||||||
.replace(/\r/g, '%0D')
|
.replace(/\r/g, '%0D')
|
||||||
.replace(/\n/g, '%0A')
|
.replace(/\n/g, '%0A')
|
||||||
.replace(/:/g, '%3A')
|
.replace(/]/g, '%5D')
|
||||||
.replace(/,/g, '%2C');
|
.replace(/;/g, '%3B');
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=command.js.map
|
//# sourceMappingURL=command.js.map
|
||||||
2
node_modules/@actions/core/lib/command.js.map
generated
vendored
2
node_modules/@actions/core/lib/command.js.map
generated
vendored
@ -1 +1 @@
|
|||||||
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACr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CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"}
|
||||||
4
node_modules/@actions/core/lib/core.d.ts
generated
vendored
4
node_modules/@actions/core/lib/core.d.ts
generated
vendored
@ -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
|
||||||
|
|||||||
18
node_modules/@actions/core/lib/core.js
generated
vendored
18
node_modules/@actions/core/lib/core.js
generated
vendored
@ -8,17 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
||||||
result["default"] = mod;
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const command_1 = require("./command");
|
const command_1 = require("./command");
|
||||||
const os = __importStar(require("os"));
|
const os = require("os");
|
||||||
const path = __importStar(require("path"));
|
const path = require("path");
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
*/
|
*/
|
||||||
@ -104,13 +97,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
|
||||||
|
|||||||
2
node_modules/@actions/core/lib/core.js.map
generated
vendored
2
node_modules/@actions/core/lib/core.js.map
generated
vendored
@ -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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CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,SAAgB,SAAS,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"}
|
||||||
69
node_modules/@actions/core/package.json
generated
vendored
69
node_modules/@actions/core/package.json
generated
vendored
@ -1,16 +1,40 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/core",
|
"_args": [
|
||||||
"version": "1.2.3",
|
[
|
||||||
"description": "Actions core lib",
|
"@actions/core@1.2.0",
|
||||||
"keywords": [
|
"."
|
||||||
"github",
|
]
|
||||||
"actions",
|
|
||||||
"core"
|
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
|
"_from": "@actions/core@1.2.0",
|
||||||
"license": "MIT",
|
"_id": "@actions/core@1.2.0",
|
||||||
"main": "lib/core.js",
|
"_inBundle": false,
|
||||||
"types": "lib/core.d.ts",
|
"_integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==",
|
||||||
|
"_location": "/@actions/core",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@actions/core@1.2.0",
|
||||||
|
"name": "@actions/core",
|
||||||
|
"escapedName": "@actions%2fcore",
|
||||||
|
"scope": "@actions",
|
||||||
|
"rawSpec": "1.2.0",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "1.2.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
|
||||||
|
"_spec": "1.2.0",
|
||||||
|
"_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"
|
||||||
},
|
},
|
||||||
@ -27,18 +60,8 @@
|
|||||||
"directory": "packages/core"
|
"directory": "packages/core"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"audit-moderate": "npm install && npm audit --audit-level=moderate",
|
|
||||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||||
"tsc": "tsc"
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"version": "1.2.0"
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
}
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
|
|||||||
5
node_modules/xmldom/.npmignore
generated
vendored
Normal file
5
node_modules/xmldom/.npmignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
test
|
||||||
|
t
|
||||||
|
travis.yml
|
||||||
|
.project
|
||||||
|
changelog
|
||||||
22
node_modules/xmldom/.travis.yml
generated
vendored
Normal file
22
node_modules/xmldom/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
language: node_js
|
||||||
|
|
||||||
|
node_js:
|
||||||
|
- '0.10'
|
||||||
|
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- proof
|
||||||
|
- travis-ci
|
||||||
|
|
||||||
|
# Not using `npm install --dev` because it is recursive. It will pull in the all
|
||||||
|
# development dependencies for CoffeeScript. Way too much spew in the Travis CI
|
||||||
|
# build output.
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- npm install
|
||||||
|
- npm install istanbul coveralls
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- secure: "BxUHTsa1WVANLQoimilbZwa1MCWSdM9hOmPWBE/rsYb7uT/iiqkRXXwnWhKtN5CLvTvIQbiAzq4iyPID0S8UHrnxClYQrOuA6QkrtwgIEuDAmijao/bgxobPOremvkwXcpMGIwzYKyYQQtSEaEIQbqf6gSSKW9dBh/GZ/vfTsqo="
|
||||||
92
node_modules/xmldom/CHANGELOG.md
generated
vendored
92
node_modules/xmldom/CHANGELOG.md
generated
vendored
@ -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
8
node_modules/xmldom/LICENSE
generated
vendored
Normal 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
4
node_modules/xmldom/LICENSE.md
generated
vendored
@ -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
4
node_modules/xmldom/__package__.js
generated
vendored
Normal 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
14
node_modules/xmldom/changelog
generated
vendored
Normal 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
10
node_modules/xmldom/component.json
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "xmldom",
|
||||||
|
"version": "0.1.15",
|
||||||
|
"main": "dom-parser.js",
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"node_modules",
|
||||||
|
"components"
|
||||||
|
]
|
||||||
|
}
|
||||||
32
node_modules/xmldom/lib/dom-parser.js → node_modules/xmldom/dom-parser.js
generated
vendored
32
node_modules/xmldom/lib/dom-parser.js → node_modules/xmldom/dom-parser.js
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
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){
|
||||||
var options = this.options;
|
var options = this.options;
|
||||||
var sax = new XMLReader();
|
var sax = new XMLReader();
|
||||||
@ -9,15 +9,16 @@ DOMParser.prototype.parseFromString = function(source,mimeType){
|
|||||||
var errorHandler = options.errorHandler;
|
var errorHandler = options.errorHandler;
|
||||||
var locator = options.locator;
|
var locator = options.locator;
|
||||||
var defaultNSMap = options.xmlns||{};
|
var defaultNSMap = options.xmlns||{};
|
||||||
var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;
|
var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
|
||||||
var entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"};
|
|
||||||
if(locator){
|
if(locator){
|
||||||
domBuilder.setDocumentLocator(locator)
|
domBuilder.setDocumentLocator(locator)
|
||||||
}
|
}
|
||||||
|
|
||||||
sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
|
sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
|
||||||
sax.domBuilder = options.domBuilder || domBuilder;
|
sax.domBuilder = options.domBuilder || domBuilder;
|
||||||
if(isHTML){
|
if(/\/x?html?$/.test(mimeType)){
|
||||||
|
entityMap.nbsp = '\xa0';
|
||||||
|
entityMap.copy = '\xa9';
|
||||||
defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
|
defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
|
||||||
}
|
}
|
||||||
defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';
|
defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';
|
||||||
@ -57,8 +58,8 @@ function buildErrorHandler(errorImpl,domBuilder,locator){
|
|||||||
/**
|
/**
|
||||||
* +ContentHandler+ErrorHandler
|
* +ContentHandler+ErrorHandler
|
||||||
* +LexicalHandler+EntityResolver2
|
* +LexicalHandler+EntityResolver2
|
||||||
* -DeclHandler-DTDHandler
|
* -DeclHandler-DTDHandler
|
||||||
*
|
*
|
||||||
* DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
|
* DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
|
||||||
* DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
|
* DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
|
||||||
* @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
|
* @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
|
||||||
@ -73,7 +74,7 @@ function position(locator,node){
|
|||||||
/**
|
/**
|
||||||
* @see org.xml.sax.ContentHandler#startDocument
|
* @see org.xml.sax.ContentHandler#startDocument
|
||||||
* @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
|
* @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
|
||||||
*/
|
*/
|
||||||
DOMHandler.prototype = {
|
DOMHandler.prototype = {
|
||||||
startDocument : function() {
|
startDocument : function() {
|
||||||
this.doc = new DOMImplementation().createDocument(null, null, null);
|
this.doc = new DOMImplementation().createDocument(null, null, null);
|
||||||
@ -87,7 +88,7 @@ DOMHandler.prototype = {
|
|||||||
var len = attrs.length;
|
var len = attrs.length;
|
||||||
appendElement(this, el);
|
appendElement(this, el);
|
||||||
this.currentElement = el;
|
this.currentElement = el;
|
||||||
|
|
||||||
this.locator && position(this.locator,el)
|
this.locator && position(this.locator,el)
|
||||||
for (var i = 0 ; i < len; i++) {
|
for (var i = 0 ; i < len; i++) {
|
||||||
var namespaceURI = attrs.getURI(i);
|
var namespaceURI = attrs.getURI(i);
|
||||||
@ -150,7 +151,7 @@ DOMHandler.prototype = {
|
|||||||
this.locator && position(this.locator,comm)
|
this.locator && position(this.locator,comm)
|
||||||
appendElement(this, comm);
|
appendElement(this, comm);
|
||||||
},
|
},
|
||||||
|
|
||||||
startCDATA:function() {
|
startCDATA:function() {
|
||||||
//used in characters() methods
|
//used in characters() methods
|
||||||
this.cdata = true;
|
this.cdata = true;
|
||||||
@ -158,7 +159,7 @@ DOMHandler.prototype = {
|
|||||||
endCDATA:function() {
|
endCDATA:function() {
|
||||||
this.cdata = false;
|
this.cdata = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
startDTD:function(name, publicId, systemId) {
|
startDTD:function(name, publicId, systemId) {
|
||||||
var impl = this.doc.implementation;
|
var impl = this.doc.implementation;
|
||||||
if (impl && impl.createDocumentType) {
|
if (impl && impl.createDocumentType) {
|
||||||
@ -243,9 +244,8 @@ function appendElement (hander,node) {
|
|||||||
}//appendChild and setAttributeNS are preformance key
|
}//appendChild and setAttributeNS are preformance key
|
||||||
|
|
||||||
//if(typeof require == 'function'){
|
//if(typeof require == 'function'){
|
||||||
var htmlEntity = require('./entities');
|
var XMLReader = require('./sax').XMLReader;
|
||||||
var XMLReader = require('./sax').XMLReader;
|
var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
|
||||||
var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
|
exports.XMLSerializer = require('./dom').XMLSerializer ;
|
||||||
exports.XMLSerializer = require('./dom').XMLSerializer ;
|
exports.DOMParser = DOMParser;
|
||||||
exports.DOMParser = DOMParser;
|
|
||||||
//}
|
//}
|
||||||
22
node_modules/xmldom/lib/dom.js → node_modules/xmldom/dom.js
generated
vendored
22
node_modules/xmldom/lib/dom.js → node_modules/xmldom/dom.js
generated
vendored
@ -16,6 +16,10 @@ function copy(src,dest){
|
|||||||
*/
|
*/
|
||||||
function _extends(Class,Super){
|
function _extends(Class,Super){
|
||||||
var pt = Class.prototype;
|
var pt = Class.prototype;
|
||||||
|
if(Object.create){
|
||||||
|
var ppt = Object.create(Super.prototype)
|
||||||
|
pt.__proto__ = ppt;
|
||||||
|
}
|
||||||
if(!(pt instanceof Super)){
|
if(!(pt instanceof Super)){
|
||||||
function t(){};
|
function t(){};
|
||||||
t.prototype = Super.prototype;
|
t.prototype = Super.prototype;
|
||||||
@ -608,21 +612,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();
|
||||||
@ -927,7 +916,7 @@ XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){
|
|||||||
Node.prototype.toString = nodeSerializeToString;
|
Node.prototype.toString = nodeSerializeToString;
|
||||||
function nodeSerializeToString(isHtml,nodeFilter){
|
function nodeSerializeToString(isHtml,nodeFilter){
|
||||||
var buf = [];
|
var buf = [];
|
||||||
var refNode = this.nodeType == 9 && this.documentElement || this;
|
var refNode = this.nodeType == 9?this.documentElement:this;
|
||||||
var prefix = refNode.prefix;
|
var prefix = refNode.prefix;
|
||||||
var uri = refNode.namespaceURI;
|
var uri = refNode.namespaceURI;
|
||||||
|
|
||||||
@ -1250,7 +1239,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;
|
||||||
//}
|
//}
|
||||||
247
node_modules/xmldom/lib/entities.js
generated
vendored
247
node_modules/xmldom/lib/entities.js
generated
vendored
@ -1,247 +0,0 @@
|
|||||||
exports.entityMap = {
|
|
||||||
lt: '<',
|
|
||||||
gt: '>',
|
|
||||||
amp: '&',
|
|
||||||
quot: '"',
|
|
||||||
apos: "'",
|
|
||||||
Agrave: "À",
|
|
||||||
Aacute: "Á",
|
|
||||||
Acirc: "Â",
|
|
||||||
Atilde: "Ã",
|
|
||||||
Auml: "Ä",
|
|
||||||
auml: "ä",
|
|
||||||
Aring: "Å",
|
|
||||||
aring: "å",
|
|
||||||
AElig: "Æ",
|
|
||||||
Ccedil: "Ç",
|
|
||||||
Egrave: "È",
|
|
||||||
Eacute: "É",
|
|
||||||
Ecirc: "Ê",
|
|
||||||
Euml: "Ë",
|
|
||||||
Igrave: "Ì",
|
|
||||||
Iacute: "Í",
|
|
||||||
Icirc: "Î",
|
|
||||||
Iuml: "Ï",
|
|
||||||
ETH: "Ð",
|
|
||||||
Ntilde: "Ñ",
|
|
||||||
Ograve: "Ò",
|
|
||||||
Oacute: "Ó",
|
|
||||||
Ocirc: "Ô",
|
|
||||||
Otilde: "Õ",
|
|
||||||
Ouml: "Ö",
|
|
||||||
ouml: "ö",
|
|
||||||
Oslash: "Ø",
|
|
||||||
Ugrave: "Ù",
|
|
||||||
Uacute: "Ú",
|
|
||||||
Ucirc: "Û",
|
|
||||||
Uuml: "Ü",
|
|
||||||
Yacute: "Ý",
|
|
||||||
THORN: "Þ",
|
|
||||||
szlig: "ß",
|
|
||||||
agrave: "à",
|
|
||||||
aacute: "á",
|
|
||||||
acirc: "â",
|
|
||||||
atilde: "ã",
|
|
||||||
auml: "ä",
|
|
||||||
aring: "å",
|
|
||||||
aelig: "æ",
|
|
||||||
ccedil: "ç",
|
|
||||||
egrave: "è",
|
|
||||||
eacute: "é",
|
|
||||||
ecirc: "ê",
|
|
||||||
euml: "ë",
|
|
||||||
igrave: "ì",
|
|
||||||
iacute: "í",
|
|
||||||
icirc: "î",
|
|
||||||
iuml: "ï",
|
|
||||||
eth: "ð",
|
|
||||||
ntilde: "ñ",
|
|
||||||
ograve: "ò",
|
|
||||||
oacute: "ó",
|
|
||||||
ocirc: "ô",
|
|
||||||
otilde: "õ",
|
|
||||||
ouml: "ö",
|
|
||||||
oslash: "ø",
|
|
||||||
ugrave: "ù",
|
|
||||||
uacute: "ú",
|
|
||||||
ucirc: "û",
|
|
||||||
uuml: "ü",
|
|
||||||
yacute: "ý",
|
|
||||||
thorn: "þ",
|
|
||||||
yuml: "ÿ",
|
|
||||||
nbsp: " ",
|
|
||||||
iexcl: "¡",
|
|
||||||
cent: "¢",
|
|
||||||
pound: "£",
|
|
||||||
curren: "¤",
|
|
||||||
yen: "¥",
|
|
||||||
brvbar: "¦",
|
|
||||||
sect: "§",
|
|
||||||
uml: "¨",
|
|
||||||
copy: "©",
|
|
||||||
ordf: "ª",
|
|
||||||
laquo: "«",
|
|
||||||
not: "¬",
|
|
||||||
shy: "",
|
|
||||||
reg: "®",
|
|
||||||
macr: "¯",
|
|
||||||
deg: "°",
|
|
||||||
plusmn: "±",
|
|
||||||
sup2: "²",
|
|
||||||
sup3: "³",
|
|
||||||
acute: "´",
|
|
||||||
micro: "µ",
|
|
||||||
para: "¶",
|
|
||||||
middot: "·",
|
|
||||||
cedil: "¸",
|
|
||||||
sup1: "¹",
|
|
||||||
ordm: "º",
|
|
||||||
raquo: "»",
|
|
||||||
frac14: "¼",
|
|
||||||
frac12: "½",
|
|
||||||
frac34: "¾",
|
|
||||||
iquest: "¿",
|
|
||||||
times: "×",
|
|
||||||
divide: "÷",
|
|
||||||
forall: "∀",
|
|
||||||
part: "∂",
|
|
||||||
exist: "∃",
|
|
||||||
empty: "∅",
|
|
||||||
nabla: "∇",
|
|
||||||
isin: "∈",
|
|
||||||
notin: "∉",
|
|
||||||
ni: "∋",
|
|
||||||
prod: "∏",
|
|
||||||
sum: "∑",
|
|
||||||
minus: "−",
|
|
||||||
lowast: "∗",
|
|
||||||
radic: "√",
|
|
||||||
prop: "∝",
|
|
||||||
infin: "∞",
|
|
||||||
ang: "∠",
|
|
||||||
and: "∧",
|
|
||||||
or: "∨",
|
|
||||||
cap: "∩",
|
|
||||||
cup: "∪",
|
|
||||||
'int': "∫",
|
|
||||||
there4: "∴",
|
|
||||||
sim: "∼",
|
|
||||||
cong: "≅",
|
|
||||||
asymp: "≈",
|
|
||||||
ne: "≠",
|
|
||||||
equiv: "≡",
|
|
||||||
le: "≤",
|
|
||||||
ge: "≥",
|
|
||||||
sub: "⊂",
|
|
||||||
sup: "⊃",
|
|
||||||
nsub: "⊄",
|
|
||||||
sube: "⊆",
|
|
||||||
supe: "⊇",
|
|
||||||
oplus: "⊕",
|
|
||||||
otimes: "⊗",
|
|
||||||
perp: "⊥",
|
|
||||||
sdot: "⋅",
|
|
||||||
Alpha: "Α",
|
|
||||||
Beta: "Β",
|
|
||||||
Gamma: "Γ",
|
|
||||||
Delta: "Δ",
|
|
||||||
Epsilon: "Ε",
|
|
||||||
Zeta: "Ζ",
|
|
||||||
Eta: "Η",
|
|
||||||
Theta: "Θ",
|
|
||||||
Iota: "Ι",
|
|
||||||
Kappa: "Κ",
|
|
||||||
Lambda: "Λ",
|
|
||||||
Mu: "Μ",
|
|
||||||
Nu: "Ν",
|
|
||||||
Xi: "Ξ",
|
|
||||||
Omicron: "Ο",
|
|
||||||
Pi: "Π",
|
|
||||||
Rho: "Ρ",
|
|
||||||
Sigma: "Σ",
|
|
||||||
Tau: "Τ",
|
|
||||||
Upsilon: "Υ",
|
|
||||||
Phi: "Φ",
|
|
||||||
Chi: "Χ",
|
|
||||||
Psi: "Ψ",
|
|
||||||
Omega: "Ω",
|
|
||||||
alpha: "α",
|
|
||||||
beta: "β",
|
|
||||||
gamma: "γ",
|
|
||||||
delta: "δ",
|
|
||||||
epsilon: "ε",
|
|
||||||
zeta: "ζ",
|
|
||||||
eta: "η",
|
|
||||||
theta: "θ",
|
|
||||||
iota: "ι",
|
|
||||||
kappa: "κ",
|
|
||||||
lambda: "λ",
|
|
||||||
mu: "μ",
|
|
||||||
nu: "ν",
|
|
||||||
xi: "ξ",
|
|
||||||
omicron: "ο",
|
|
||||||
pi: "π",
|
|
||||||
rho: "ρ",
|
|
||||||
sigmaf: "ς",
|
|
||||||
sigma: "σ",
|
|
||||||
tau: "τ",
|
|
||||||
upsilon: "υ",
|
|
||||||
phi: "φ",
|
|
||||||
chi: "χ",
|
|
||||||
psi: "ψ",
|
|
||||||
omega: "ω",
|
|
||||||
thetasym: "ϑ",
|
|
||||||
upsih: "ϒ",
|
|
||||||
piv: "ϖ",
|
|
||||||
OElig: "Œ",
|
|
||||||
oelig: "œ",
|
|
||||||
Scaron: "Š",
|
|
||||||
scaron: "š",
|
|
||||||
Yuml: "Ÿ",
|
|
||||||
fnof: "ƒ",
|
|
||||||
circ: "ˆ",
|
|
||||||
tilde: "˜",
|
|
||||||
ensp: " ",
|
|
||||||
emsp: " ",
|
|
||||||
thinsp: " ",
|
|
||||||
zwnj: "",
|
|
||||||
zwj: "",
|
|
||||||
lrm: "",
|
|
||||||
rlm: "",
|
|
||||||
ndash: "–",
|
|
||||||
mdash: "—",
|
|
||||||
lsquo: "‘",
|
|
||||||
rsquo: "’",
|
|
||||||
sbquo: "‚",
|
|
||||||
ldquo: "“",
|
|
||||||
rdquo: "”",
|
|
||||||
bdquo: "„",
|
|
||||||
dagger: "†",
|
|
||||||
Dagger: "‡",
|
|
||||||
bull: "•",
|
|
||||||
hellip: "…",
|
|
||||||
permil: "‰",
|
|
||||||
prime: "′",
|
|
||||||
Prime: "″",
|
|
||||||
lsaquo: "‹",
|
|
||||||
rsaquo: "›",
|
|
||||||
oline: "‾",
|
|
||||||
euro: "€",
|
|
||||||
trade: "™",
|
|
||||||
larr: "←",
|
|
||||||
uarr: "↑",
|
|
||||||
rarr: "→",
|
|
||||||
darr: "↓",
|
|
||||||
harr: "↔",
|
|
||||||
crarr: "↵",
|
|
||||||
lceil: "⌈",
|
|
||||||
rceil: "⌉",
|
|
||||||
lfloor: "⌊",
|
|
||||||
rfloor: "⌋",
|
|
||||||
loz: "◊",
|
|
||||||
spades: "♠",
|
|
||||||
clubs: "♣",
|
|
||||||
hearts: "♥",
|
|
||||||
diams: "♦"
|
|
||||||
};
|
|
||||||
//for(var n in exports.entityMap){console.log(exports.entityMap[n].charCodeAt())}
|
|
||||||
134
node_modules/xmldom/package.json
generated
vendored
134
node_modules/xmldom/package.json
generated
vendored
@ -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.1.27",
|
||||||
|
"."
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_from": "xmldom@0.1.27",
|
||||||
|
"_id": "xmldom@0.1.27",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=",
|
||||||
|
"_location": "/xmldom",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "xmldom@0.1.27",
|
||||||
|
"name": "xmldom",
|
||||||
|
"escapedName": "xmldom",
|
||||||
|
"rawSpec": "0.1.27",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "0.1.27"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
|
||||||
|
"_spec": "0.1.27",
|
||||||
|
"_where": ".",
|
||||||
|
"author": {
|
||||||
|
"name": "jindw",
|
||||||
|
"email": "jindw@xidea.org",
|
||||||
|
"url": "http://www.xidea.org"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "http://github.com/jindw/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/jindw/xmldom",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"w3c",
|
"w3c",
|
||||||
"dom",
|
"dom",
|
||||||
@ -11,66 +71,28 @@
|
|||||||
"DOMParser",
|
"DOMParser",
|
||||||
"XMLSerializer"
|
"XMLSerializer"
|
||||||
],
|
],
|
||||||
"author": "jindw <jindw@xidea.org> (http://www.xidea.org)",
|
"licenses": [
|
||||||
"homepage": "https://github.com/xmldom/xmldom",
|
|
||||||
"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": [
|
|
||||||
{
|
{
|
||||||
"name": "brodybits",
|
"type": "LGPL",
|
||||||
"email": "chris@brody.consulting",
|
"url": "http://www.gnu.org/licenses/lgpl.html",
|
||||||
"url": "https://github.com/brodybits"
|
"MIT": "http://opensource.org/licenses/MIT"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributors": [
|
"main": "./dom-parser.js",
|
||||||
|
"maintainers": [
|
||||||
{
|
{
|
||||||
"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/jindw/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.1.27"
|
||||||
,"_from": "xmldom@0.3.0"
|
}
|
||||||
}
|
|
||||||
|
|||||||
4
node_modules/xmldom/readme.md
generated
vendored
4
node_modules/xmldom/readme.md
generated
vendored
@ -1,11 +1,9 @@
|
|||||||
# XMLDOM [](http://travis-ci.org/xmldom/xmldom) [](http://badge.fury.io/js/xmldom)
|
# XMLDOM [](http://travis-ci.org/bigeasy/xmldom) [](https://coveralls.io/r/bigeasy/xmldom) [](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
|
||||||
|
|||||||
17
node_modules/xmldom/lib/sax.js → node_modules/xmldom/sax.js
generated
vendored
17
node_modules/xmldom/lib/sax.js → node_modules/xmldom/sax.js
generated
vendored
@ -600,6 +600,23 @@ ElementAttributes.prototype = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function _set_proto_(thiz,parent){
|
||||||
|
thiz.__proto__ = parent;
|
||||||
|
return thiz;
|
||||||
|
}
|
||||||
|
if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
|
||||||
|
_set_proto_ = function(thiz,parent){
|
||||||
|
function p(){};
|
||||||
|
p.prototype = parent;
|
||||||
|
p = new p();
|
||||||
|
for(parent in thiz){
|
||||||
|
p[parent] = thiz[parent];
|
||||||
|
}
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function split(source,start){
|
function split(source,start){
|
||||||
var match;
|
var match;
|
||||||
var buf = [];
|
var buf = [];
|
||||||
66
node_modules/xpath/package.json
generated
vendored
66
node_modules/xpath/package.json
generated
vendored
@ -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"
|
||||||
|
}
|
||||||
|
|||||||
4469
package-lock.json
generated
4469
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,12 +24,12 @@
|
|||||||
},
|
},
|
||||||
"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.0",
|
||||||
"xmldom": "^0.3.0",
|
"xmldom": "^0.1.27",
|
||||||
"xpath": "0.0.27"
|
"xpath": "0.0.27"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.7.1",
|
||||||
"jest": "^25.1.0"
|
"jest": "^24.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
128
settings.js
128
settings.js
@ -1,40 +1,10 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Slawomir Jaranowski and contributors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
const os = require('os');
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const DOMParser = require('xmldom').DOMParser;
|
const DOMParser = require('xmldom').DOMParser;
|
||||||
const XMLSerializer = require('xmldom').XMLSerializer;
|
const XMLSerializer = require('xmldom').XMLSerializer;
|
||||||
const xpath = require('xpath');
|
const xpath = require('xpath');
|
||||||
|
|
||||||
|
|
||||||
function getSettingsPath() {
|
|
||||||
return path.join(os.homedir(), '.m2', 'settings.xml');
|
|
||||||
}
|
|
||||||
|
|
||||||
function getSettingsTemplate() {
|
function getSettingsTemplate() {
|
||||||
const templatePath = path.join(__dirname, 'templates', 'settings.xml');
|
const templatePath = path.join(__dirname, 'templates', 'settings.xml');
|
||||||
const templateStr = fs.readFileSync(templatePath).toString();
|
const templateStr = fs.readFileSync(templatePath).toString();
|
||||||
@ -52,34 +22,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 +30,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,58 +76,16 @@ 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_')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function generate() {
|
|
||||||
|
|
||||||
const settingsPath = getSettingsPath();
|
|
||||||
|
|
||||||
core.info('Prepare maven setings: ' + settingsPath);
|
|
||||||
|
|
||||||
if (fs.existsSync(settingsPath)) {
|
|
||||||
if (isInputTrue('override')) {
|
|
||||||
core.info('maven settings.xml already exists - override');
|
|
||||||
} else {
|
|
||||||
core.warning('maven settings.xml already exists - skip');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const templateXml = getSettingsTemplate();
|
|
||||||
fillServers(templateXml);
|
|
||||||
fillServerForGithub(templateXml);
|
|
||||||
fillProperties(templateXml);
|
|
||||||
addSonatypeSnapshots(templateXml);
|
|
||||||
writeSettings(settingsPath, templateXml);
|
|
||||||
core.saveState('maven-settings', 'ok');
|
|
||||||
}
|
|
||||||
|
|
||||||
function cleanup() {
|
|
||||||
|
|
||||||
const mavenSettingsState = core.getState('maven-settings');
|
|
||||||
const settingsPath = getSettingsPath();
|
|
||||||
if (mavenSettingsState == 'ok') {
|
|
||||||
if (fs.existsSync(settingsPath)) {
|
|
||||||
fs.unlinkSync(settingsPath);
|
|
||||||
core.info('Cleanup maven setings: ' + settingsPath + ' - file was removed');
|
|
||||||
} else {
|
|
||||||
core.warning('Cleanup maven setings: ' + settingsPath + ' - file not exist');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.info('Cleanup maven setings: ' + settingsPath + ' - file wasn\'t generated by action');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getSettingsTemplate,
|
getSettingsTemplate,
|
||||||
writeSettings,
|
writeSettings,
|
||||||
fillServers,
|
fillServers,
|
||||||
fillServerForGithub,
|
|
||||||
fillProperties,
|
fillProperties,
|
||||||
addSonatypeSnapshots,
|
addSonatypeSnapshots
|
||||||
generate,
|
|
||||||
cleanup
|
|
||||||
}
|
}
|
||||||
|
|||||||
179
settings.test.js
179
settings.test.js
@ -1,29 +1,4 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2020 Slawomir Jaranowski and contributors
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const os = require('os');
|
|
||||||
const process = require('process');
|
|
||||||
const DOMParser = require('xmldom').DOMParser;
|
const DOMParser = require('xmldom').DOMParser;
|
||||||
const XMLSerializer = require('xmldom').XMLSerializer;
|
const XMLSerializer = require('xmldom').XMLSerializer;
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
@ -36,20 +11,6 @@ var xmlTestProfile = undefined;
|
|||||||
const testHomePath = fs.mkdtempSync(".m2");
|
const testHomePath = fs.mkdtempSync(".m2");
|
||||||
const settingsPath = path.join(testHomePath, '.m2', 'settings.xml');
|
const settingsPath = path.join(testHomePath, '.m2', 'settings.xml');
|
||||||
|
|
||||||
var consoleOutput = [];
|
|
||||||
|
|
||||||
beforeAll(() => {
|
|
||||||
if (!fs.existsSync(testHomePath)) {
|
|
||||||
fs.mkdirSync(testHomePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
process.env['HOME'] = testHomePath;
|
|
||||||
process.env['USERPROFILE'] = testHomePath;
|
|
||||||
os.homedir = () => testHomePath;
|
|
||||||
|
|
||||||
process.stdout.write = output => consoleOutput.push(output);
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
xmlTestProfile = new DOMParser().parseFromString(`<settings>
|
xmlTestProfile = new DOMParser().parseFromString(`<settings>
|
||||||
<profiles>
|
<profiles>
|
||||||
@ -69,25 +30,12 @@ beforeEach(() => {
|
|||||||
</profiles>
|
</profiles>
|
||||||
</settings>`);
|
</settings>`);
|
||||||
|
|
||||||
consoleOutput = [];
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
try {
|
|
||||||
fs.rmdirSync(path.dirname(settingsPath));
|
|
||||||
} catch (error) {
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
fs.rmdirSync(testHomePath);
|
|
||||||
} catch (error) {
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -98,6 +46,14 @@ afterEach(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
try {
|
||||||
|
fs.rmdirSync(path.dirname(settingsPath));
|
||||||
|
fs.rmdirSync(testHomePath);
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test('template should be read', () => {
|
test('template should be read', () => {
|
||||||
|
|
||||||
const template = settings.getSettingsTemplate();
|
const template = settings.getSettingsTemplate();
|
||||||
@ -162,38 +118,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";
|
||||||
@ -269,88 +193,3 @@ test('fillProperties do nothing if no params', () => {
|
|||||||
</profiles>
|
</profiles>
|
||||||
</settings>`);
|
</settings>`);
|
||||||
})
|
})
|
||||||
|
|
||||||
test('cleanup - not generated', () => {
|
|
||||||
|
|
||||||
settings.cleanup();
|
|
||||||
|
|
||||||
expect(consoleOutput).toEqual(
|
|
||||||
expect.arrayContaining([
|
|
||||||
expect.stringMatching(/Cleanup maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml - file wasn\'t generated by action/)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
test('cleanup - not exist', () => {
|
|
||||||
|
|
||||||
process.env['STATE_maven-settings'] = 'ok';
|
|
||||||
|
|
||||||
settings.cleanup();
|
|
||||||
|
|
||||||
expect(consoleOutput).toEqual(
|
|
||||||
expect.arrayContaining([
|
|
||||||
expect.stringMatching(/::warning::Cleanup maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml - file not exist/)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
test('cleanup - ok', () => {
|
|
||||||
|
|
||||||
process.env['STATE_maven-settings'] = 'ok';
|
|
||||||
fs.closeSync(fs.openSync(settingsPath, 'w'));
|
|
||||||
|
|
||||||
settings.cleanup();
|
|
||||||
|
|
||||||
expect(consoleOutput).toEqual(
|
|
||||||
expect.arrayContaining([
|
|
||||||
expect.stringMatching(/Cleanup maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml - file was removed/)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
expect(fs.existsSync(settingsPath)).not.toBeTruthy();
|
|
||||||
})
|
|
||||||
|
|
||||||
test('genereate', () => {
|
|
||||||
|
|
||||||
process.env['INPUT_SERVERS'] = '[{"id": "serverId", "username": "username", "password": "password"}]';
|
|
||||||
process.env['INPUT_PROPERTIES'] = '[{"prop1": "value1"}, {"prop2": "value2"}]'
|
|
||||||
process.env['INPUT_SONATYPESNAPSHOT'] = true;
|
|
||||||
|
|
||||||
settings.generate();
|
|
||||||
|
|
||||||
expect(consoleOutput).toEqual(
|
|
||||||
expect.arrayContaining([
|
|
||||||
expect.stringMatching(/Prepare maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml/),
|
|
||||||
expect.stringMatching(/:save-state name=maven-settings::ok/)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
test('genereate - skip', () => {
|
|
||||||
|
|
||||||
fs.closeSync(fs.openSync(settingsPath, 'w'));
|
|
||||||
|
|
||||||
settings.generate();
|
|
||||||
|
|
||||||
expect(consoleOutput).toEqual(
|
|
||||||
expect.arrayContaining([
|
|
||||||
expect.stringMatching(/Prepare maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml/),
|
|
||||||
expect.stringMatching(/::warning::maven settings.xml already exists - skip/)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|
||||||
test('genereate - override', () => {
|
|
||||||
|
|
||||||
fs.closeSync(fs.openSync(settingsPath, 'w'));
|
|
||||||
process.env['INPUT_OVERRIDE'] = 'true';
|
|
||||||
|
|
||||||
settings.generate();
|
|
||||||
|
|
||||||
expect(consoleOutput).toEqual(
|
|
||||||
expect.arrayContaining([
|
|
||||||
expect.stringMatching(/Prepare maven setings: \..+[\/\\]{1,2}\.m2[\/\\]{1,2}settings.xml/),
|
|
||||||
expect.stringMatching(/maven settings.xml already exists - override/),
|
|
||||||
expect.stringMatching(/:save-state name=maven-settings::ok/)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user