mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 20:32:19 +01:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35c200d21 | ||
|
|
1710cea6fb | ||
|
|
3907220f13 | ||
|
|
747598e8dc | ||
|
|
022950c85b | ||
|
|
e375f4fff3 | ||
|
|
ac7a2d661b | ||
|
|
40cba97ea7 | ||
|
|
e8c9424357 | ||
|
|
aa532f2f96 | ||
|
|
24f14e4ba9 | ||
|
|
2fb0c15ce0 | ||
|
|
f18cf68aea | ||
|
|
aed27b9707 | ||
|
|
4f359ec551 | ||
|
|
a9aa73f7b4 | ||
|
|
aeba6547bb | ||
|
|
8eef9fcb44 | ||
|
|
3cb9216401 | ||
|
|
20ff13abbd | ||
|
|
6812c21f18 | ||
|
|
a1b1127907 | ||
|
|
02c90246b4 | ||
|
|
5000d1a8b6 | ||
|
|
63038f397f | ||
|
|
7e8dab4a15 | ||
|
|
8f4af8fa35 | ||
|
|
b8b4d74381 | ||
|
|
94853340b9 | ||
|
|
de65f3e128 | ||
|
|
c00fd7be83 | ||
|
|
7c0de2ddec | ||
|
|
236f382aa6 | ||
|
|
1bb54b05c8 | ||
|
|
b28afd97fa | ||
|
|
46a6a3afdf | ||
|
|
6e5afb7c2e | ||
|
|
737fda5741 | ||
|
|
c58f4ce12d |
@@ -2,7 +2,7 @@ version: 1
|
|||||||
update_configs:
|
update_configs:
|
||||||
- package_manager: "javascript"
|
- package_manager: "javascript"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
update_schedule: "weekly"
|
update_schedule: "daily"
|
||||||
default_labels:
|
default_labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
commit_message:
|
commit_message:
|
||||||
|
|||||||
@@ -1,7 +1,2 @@
|
|||||||
.*
|
.*
|
||||||
|
*
|
||||||
!.eslintrc.json
|
|
||||||
!.prettierrc.json
|
|
||||||
|
|
||||||
coverage
|
|
||||||
node_modules
|
|
||||||
|
|||||||
@@ -7,3 +7,7 @@ indent_size = 2
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = tab
|
||||||
|
|||||||
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -17,17 +17,10 @@ jobs:
|
|||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: echo "${GITHUB_CONTEXT}"
|
run: echo "${GITHUB_CONTEXT}"
|
||||||
|
|
||||||
- name: Install hub
|
- name: Install github/hub
|
||||||
run: |
|
run: |
|
||||||
HUB_VERSION="2.13.0"
|
export HUB_VERSION="2.14.1"
|
||||||
HUB_NAME="hub-linux-amd64-${HUB_VERSION}"
|
curl -fsSL https://github.com/github/hub/raw/40e421edd2c63d57bb8daa4bb9bbdfa21e8becf9/script/get | bash -s "${HUB_VERSION}"
|
||||||
HUB_TARBALL="${HUB_NAME}.tgz"
|
|
||||||
wget -q "https://github.com/github/hub/releases/download/v${HUB_VERSION}/${HUB_TARBALL}"
|
|
||||||
tar -zxvf "./${HUB_TARBALL}"
|
|
||||||
mkdir ~/bin
|
|
||||||
cp "./${HUB_NAME}/bin/hub" ~/bin/
|
|
||||||
echo "::add-path::~/bin/"
|
|
||||||
rm -rf "./${HUB_NAME}" "./${HUB_TARBALL}"
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
env:
|
env:
|
||||||
@@ -35,8 +28,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
||||||
echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md
|
echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md
|
||||||
sed -i "1iRelease ${TAG_NAME}\n" ./release_notes.md
|
RELEASE_NAME="$(jq -r '.name' ./package.json)"
|
||||||
hub release create \
|
sed -i "1i${RELEASE_NAME} ${TAG_NAME}\n" ./release_notes.md
|
||||||
|
./bin/hub release create \
|
||||||
--draft \
|
--draft \
|
||||||
--prerelease \
|
--prerelease \
|
||||||
--file ./release_notes.md \
|
--file ./release_notes.md \
|
||||||
|
|||||||
1
.github/workflows/stale.yml
vendored
1
.github/workflows/stale.yml
vendored
@@ -15,4 +15,3 @@ jobs:
|
|||||||
stale-pr-message: 'This pull request is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
|
stale-pr-message: 'This pull request is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
|
||||||
days-before-stale: 21
|
days-before-stale: 21
|
||||||
days-before-close: 7
|
days-before-close: 7
|
||||||
operations-per-run: 1
|
|
||||||
|
|||||||
75
CHANGELOG.md
75
CHANGELOG.md
@@ -2,6 +2,81 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.4.5](https://github.com/peaceiris/actions-hugo/compare/v2.4.4...v2.4.5) (2020-02-04)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* Add engines field ([aeba654](https://github.com/peaceiris/actions-hugo/commit/aeba6547bbb28e39b29e7d03f6978c80d6c09931))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 25.1.0 to 25.1.1 ([f18cf68](https://github.com/peaceiris/actions-hugo/commit/f18cf68aea6a7d00504e6335efedb30a14f8c021))
|
||||||
|
* bump @types/node from 13.5.0 to 13.5.1 ([a9aa73f](https://github.com/peaceiris/actions-hugo/commit/a9aa73f7b42aadd8e6bbbf77ad51143b99f18e40))
|
||||||
|
* bump @types/node from 13.5.1 to 13.5.2 ([aed27b9](https://github.com/peaceiris/actions-hugo/commit/aed27b97077aed97ef3c9e27ee7066a5a7a55c40))
|
||||||
|
* bump @types/node from 13.5.2 to 13.5.3 ([e8c9424](https://github.com/peaceiris/actions-hugo/commit/e8c9424357a611602420145f8f289752b2521863))
|
||||||
|
* bump @types/node from 13.5.3 to 13.7.0 ([e375f4f](https://github.com/peaceiris/actions-hugo/commit/e375f4fff3fc25ace239150a37912746292b4e67))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0 ([3907220](https://github.com/peaceiris/actions-hugo/commit/3907220f13b04e23a4d300439cdc11b05ea034c1))
|
||||||
|
* bump @typescript-eslint/parser from 2.18.0 to 2.19.0 (#170) ([747598e](https://github.com/peaceiris/actions-hugo/commit/747598e8dc8f2f8ea8c3a8964531e3c7fa1b11d7)), closes [#170](https://github.com/peaceiris/actions-hugo/issues/170)
|
||||||
|
* bump lint-staged from 10.0.3 to 10.0.4 ([4f359ec](https://github.com/peaceiris/actions-hugo/commit/4f359ec551fa404b81d7a5832b16a3729874c611))
|
||||||
|
* bump lint-staged from 10.0.4 to 10.0.5 ([2fb0c15](https://github.com/peaceiris/actions-hugo/commit/2fb0c15ce023c9b4831e1acab7d97c0ba50d5a9d))
|
||||||
|
* bump lint-staged from 10.0.5 to 10.0.6 ([aa532f2](https://github.com/peaceiris/actions-hugo/commit/aa532f2f962cb4c9473f59fd4adbf67f4bfc3554))
|
||||||
|
* bump lint-staged from 10.0.6 to 10.0.7 ([ac7a2d6](https://github.com/peaceiris/actions-hugo/commit/ac7a2d661b0cb2b28f9967e2c65567f3b6ef9abc))
|
||||||
|
* bump ts-jest from 25.0.0 to 25.1.0 ([24f14e4](https://github.com/peaceiris/actions-hugo/commit/24f14e4ba907ee0920a608a0cf204387f1a26d53))
|
||||||
|
* bump ts-jest from 25.1.0 to 25.2.0 ([022950c](https://github.com/peaceiris/actions-hugo/commit/022950c85b46b0e873e66b5d6732b02ea09aa566))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* add Dependabot badge ([40cba97](https://github.com/peaceiris/actions-hugo/commit/40cba97ea7d81fcbaccd754f9d4e2f28db6afbf3))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.4](https://github.com/peaceiris/actions-hugo/compare/v2.4.3...v2.4.4) (2020-01-28)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* ignore failure ([7c0de2d](https://github.com/peaceiris/actions-hugo/commit/7c0de2ddec0ad6a617eed9a78836b75151c9f870))
|
||||||
|
* update git (#150) ([c00fd7b](https://github.com/peaceiris/actions-hugo/commit/c00fd7be83dad02c1e07a09bfb526a3e2d67fa75)), closes [#150](https://github.com/peaceiris/actions-hugo/issues/150)
|
||||||
|
* update name ([8f4af8f](https://github.com/peaceiris/actions-hugo/commit/8f4af8fa35a55337783683108d969c57a9541dae))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* remove operations-per-run ([de65f3e](https://github.com/peaceiris/actions-hugo/commit/de65f3e1283667e67fe0676a6498d02951ee22d5))
|
||||||
|
* use github/hub install script [skip ci] ([7e8dab4](https://github.com/peaceiris/actions-hugo/commit/7e8dab4a1585bb1241a44c53eeae4acc25fe0661))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @types/jest from 24.9.1 to 25.1.0 ([02c9024](https://github.com/peaceiris/actions-hugo/commit/02c90246b441e21119ffe228b29c43ac443ca688))
|
||||||
|
* bump @typescript-eslint/eslint-plugin from 2.17.0 to 2.18.0 ([a1b1127](https://github.com/peaceiris/actions-hugo/commit/a1b1127907729bf5a7533f63111feaf16919ee1b))
|
||||||
|
* bump @typescript-eslint/parser from 2.17.0 to 2.18.0 ([6812c21](https://github.com/peaceiris/actions-hugo/commit/6812c21f1895dbef58aca3a976d0d3852d660dd0))
|
||||||
|
* bump lint-staged from 10.0.2 to 10.0.3 ([5000d1a](https://github.com/peaceiris/actions-hugo/commit/5000d1a8b64a136a7350b3f3debc93fb21872a06))
|
||||||
|
|
||||||
|
### docs
|
||||||
|
|
||||||
|
* Add release feed badge ([b8b4d74](https://github.com/peaceiris/actions-hugo/commit/b8b4d743819166af3ff7f530bbdc6d3480913cb9))
|
||||||
|
* update badge ([63038f3](https://github.com/peaceiris/actions-hugo/commit/63038f397f199600101c79aca6bc505c8718d1b7))
|
||||||
|
|
||||||
|
### fix
|
||||||
|
|
||||||
|
* action failure status (#151) ([9485334](https://github.com/peaceiris/actions-hugo/commit/94853340b9510c41a18016dbaa8d41e42044300c)), closes [#151](https://github.com/peaceiris/actions-hugo/issues/151) [#149](https://github.com/peaceiris/actions-hugo/issues/149)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.3](https://github.com/peaceiris/actions-hugo/compare/v2.4.2...v2.4.3) (2020-01-24)
|
||||||
|
|
||||||
|
|
||||||
|
### chore
|
||||||
|
|
||||||
|
* Change update_schedule from weekly to daily ([737fda5](https://github.com/peaceiris/actions-hugo/commit/737fda5741cb12d8992d4c75e249bd0392e162a7))
|
||||||
|
|
||||||
|
### deps
|
||||||
|
|
||||||
|
* bump @actions/core from 1.2.1 to 1.2.2 ([6e5afb7](https://github.com/peaceiris/actions-hugo/commit/6e5afb7c2e3739813acca54db234f1c13cf1e596))
|
||||||
|
* bump @actions/tool-cache from 1.3.0 to 1.3.1 ([46a6a3a](https://github.com/peaceiris/actions-hugo/commit/46a6a3afdff838a10f9f9e063170cfc02c197611))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.4.2](https://github.com/peaceiris/actions-hugo/compare/v2.4.1...v2.4.2) (2020-01-23)
|
## [2.4.2](https://github.com/peaceiris/actions-hugo/compare/v2.4.1...v2.4.2) (2020-01-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
ARG NODE_VERSION
|
||||||
|
|
||||||
|
FROM node:${NODE_VERSION}-buster-slim
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-l", "-c"]
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
|
||||||
|
ca-certificates \
|
||||||
|
wget && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /git
|
||||||
|
ENV GIT_VERSION="2.25.0"
|
||||||
|
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
|
||||||
|
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
|
||||||
|
rm "./v${GIT_VERSION}.tar.gz" && \
|
||||||
|
cd "./git-${GIT_VERSION}" && \
|
||||||
|
make configure && \
|
||||||
|
./configure --prefix=/usr && \
|
||||||
|
make all && \
|
||||||
|
make install
|
||||||
|
|
||||||
|
WORKDIR /repo
|
||||||
|
|
||||||
|
CMD [ "bash" ]
|
||||||
7
Makefile
7
Makefile
@@ -1,8 +1,9 @@
|
|||||||
cmd := "bash"
|
cmd := "bash"
|
||||||
msg := ""
|
msg := ""
|
||||||
IMAGE_NAME := actions-hugo-dev:latest
|
IMAGE_NAME := actions_hugo_dev:latest
|
||||||
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --file ./__tests__/Dockerfile
|
NODE_VERSION := $(shell cat ./.nvmrc)
|
||||||
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/etc/gitconfig $(IMAGE_NAME)
|
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
|
||||||
|
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases)
|
[](https://github.com/peaceiris/actions-hugo/releases)
|
||||||

|

|
||||||
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
[](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
|
||||||
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
[](https://codecov.io/gh/peaceiris/actions-hugo)
|
||||||
|
[](https://github.com/peaceiris/actions-hugo/releases.atom)
|
||||||
|
[](https://dependabot.com)
|
||||||
|
|
||||||
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
FROM node:12-slim
|
|
||||||
|
|
||||||
WORKDIR /repo
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get -y install --no-install-recommends \
|
|
||||||
git \
|
|
||||||
bash && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
CMD [ "bash" ]
|
|
||||||
486
lib/index.js
486
lib/index.js
@@ -934,6 +934,13 @@ class ExecState extends events.EventEmitter {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 16:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("tls");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 18:
|
/***/ 18:
|
||||||
/***/ (function() {
|
/***/ (function() {
|
||||||
|
|
||||||
@@ -1006,28 +1013,22 @@ function showVersion(cmd, args) {
|
|||||||
exports.showVersion = showVersion;
|
exports.showVersion = showVersion;
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
const toolVersion = core.getInput('hugo-version');
|
||||||
const toolVersion = core.getInput('hugo-version');
|
let installVersion = '';
|
||||||
let installVersion = '';
|
let result = {
|
||||||
let result = {
|
exitcode: 0,
|
||||||
exitcode: 0,
|
output: ''
|
||||||
output: ''
|
};
|
||||||
};
|
if (toolVersion === '' || toolVersion === 'latest') {
|
||||||
if (toolVersion === '' || toolVersion === 'latest') {
|
installVersion = yield get_latest_version_1.getLatestVersion(constants_1.Tool.Org, constants_1.Tool.Repo, 'brew');
|
||||||
installVersion = yield get_latest_version_1.getLatestVersion(constants_1.Tool.Org, constants_1.Tool.Repo, 'brew');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
installVersion = toolVersion;
|
|
||||||
}
|
|
||||||
core.info(`${constants_1.Tool.Name} version: ${installVersion}`);
|
|
||||||
yield installer_1.installer(installVersion);
|
|
||||||
result = yield showVersion(constants_1.Tool.CmdName, [constants_1.Tool.CmdOptVersion]);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
else {
|
||||||
core.setFailed(`Action failed with error ${e}`);
|
installVersion = toolVersion;
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
|
core.info(`${constants_1.Tool.Name} version: ${installVersion}`);
|
||||||
|
yield installer_1.installer(installVersion);
|
||||||
|
result = yield showVersion(constants_1.Tool.CmdName, [constants_1.Tool.CmdOptVersion]);
|
||||||
|
return result;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.run = run;
|
exports.run = run;
|
||||||
@@ -1050,10 +1051,274 @@ module.exports = function nodeRNG() {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 157:
|
/***/ 141:
|
||||||
/***/ (function() {
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
eval("require")("tunnel");
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
var net = __webpack_require__(631);
|
||||||
|
var tls = __webpack_require__(16);
|
||||||
|
var http = __webpack_require__(605);
|
||||||
|
var https = __webpack_require__(211);
|
||||||
|
var events = __webpack_require__(614);
|
||||||
|
var assert = __webpack_require__(357);
|
||||||
|
var util = __webpack_require__(669);
|
||||||
|
|
||||||
|
|
||||||
|
exports.httpOverHttp = httpOverHttp;
|
||||||
|
exports.httpsOverHttp = httpsOverHttp;
|
||||||
|
exports.httpOverHttps = httpOverHttps;
|
||||||
|
exports.httpsOverHttps = httpsOverHttps;
|
||||||
|
|
||||||
|
|
||||||
|
function httpOverHttp(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = http.request;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpsOverHttp(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = http.request;
|
||||||
|
agent.createSocket = createSecureSocket;
|
||||||
|
agent.defaultPort = 443;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpOverHttps(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = https.request;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpsOverHttps(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = https.request;
|
||||||
|
agent.createSocket = createSecureSocket;
|
||||||
|
agent.defaultPort = 443;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function TunnelingAgent(options) {
|
||||||
|
var self = this;
|
||||||
|
self.options = options || {};
|
||||||
|
self.proxyOptions = self.options.proxy || {};
|
||||||
|
self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
|
||||||
|
self.requests = [];
|
||||||
|
self.sockets = [];
|
||||||
|
|
||||||
|
self.on('free', function onFree(socket, host, port, localAddress) {
|
||||||
|
var options = toOptions(host, port, localAddress);
|
||||||
|
for (var i = 0, len = self.requests.length; i < len; ++i) {
|
||||||
|
var pending = self.requests[i];
|
||||||
|
if (pending.host === options.host && pending.port === options.port) {
|
||||||
|
// Detect the request to connect same origin server,
|
||||||
|
// reuse the connection.
|
||||||
|
self.requests.splice(i, 1);
|
||||||
|
pending.request.onSocket(socket);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
socket.destroy();
|
||||||
|
self.removeSocket(socket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
util.inherits(TunnelingAgent, events.EventEmitter);
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
|
||||||
|
var self = this;
|
||||||
|
var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));
|
||||||
|
|
||||||
|
if (self.sockets.length >= this.maxSockets) {
|
||||||
|
// We are over limit so we'll add it to the queue.
|
||||||
|
self.requests.push(options);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we are under maxSockets create a new one.
|
||||||
|
self.createSocket(options, function(socket) {
|
||||||
|
socket.on('free', onFree);
|
||||||
|
socket.on('close', onCloseOrRemove);
|
||||||
|
socket.on('agentRemove', onCloseOrRemove);
|
||||||
|
req.onSocket(socket);
|
||||||
|
|
||||||
|
function onFree() {
|
||||||
|
self.emit('free', socket, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCloseOrRemove(err) {
|
||||||
|
self.removeSocket(socket);
|
||||||
|
socket.removeListener('free', onFree);
|
||||||
|
socket.removeListener('close', onCloseOrRemove);
|
||||||
|
socket.removeListener('agentRemove', onCloseOrRemove);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
|
||||||
|
var self = this;
|
||||||
|
var placeholder = {};
|
||||||
|
self.sockets.push(placeholder);
|
||||||
|
|
||||||
|
var connectOptions = mergeOptions({}, self.proxyOptions, {
|
||||||
|
method: 'CONNECT',
|
||||||
|
path: options.host + ':' + options.port,
|
||||||
|
agent: false,
|
||||||
|
headers: {
|
||||||
|
host: options.host + ':' + options.port
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (options.localAddress) {
|
||||||
|
connectOptions.localAddress = options.localAddress;
|
||||||
|
}
|
||||||
|
if (connectOptions.proxyAuth) {
|
||||||
|
connectOptions.headers = connectOptions.headers || {};
|
||||||
|
connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
|
||||||
|
new Buffer(connectOptions.proxyAuth).toString('base64');
|
||||||
|
}
|
||||||
|
|
||||||
|
debug('making CONNECT request');
|
||||||
|
var connectReq = self.request(connectOptions);
|
||||||
|
connectReq.useChunkedEncodingByDefault = false; // for v0.6
|
||||||
|
connectReq.once('response', onResponse); // for v0.6
|
||||||
|
connectReq.once('upgrade', onUpgrade); // for v0.6
|
||||||
|
connectReq.once('connect', onConnect); // for v0.7 or later
|
||||||
|
connectReq.once('error', onError);
|
||||||
|
connectReq.end();
|
||||||
|
|
||||||
|
function onResponse(res) {
|
||||||
|
// Very hacky. This is necessary to avoid http-parser leaks.
|
||||||
|
res.upgrade = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onUpgrade(res, socket, head) {
|
||||||
|
// Hacky.
|
||||||
|
process.nextTick(function() {
|
||||||
|
onConnect(res, socket, head);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onConnect(res, socket, head) {
|
||||||
|
connectReq.removeAllListeners();
|
||||||
|
socket.removeAllListeners();
|
||||||
|
|
||||||
|
if (res.statusCode !== 200) {
|
||||||
|
debug('tunneling socket could not be established, statusCode=%d',
|
||||||
|
res.statusCode);
|
||||||
|
socket.destroy();
|
||||||
|
var error = new Error('tunneling socket could not be established, ' +
|
||||||
|
'statusCode=' + res.statusCode);
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (head.length > 0) {
|
||||||
|
debug('got illegal response body from proxy');
|
||||||
|
socket.destroy();
|
||||||
|
var error = new Error('got illegal response body from proxy');
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
debug('tunneling connection has established');
|
||||||
|
self.sockets[self.sockets.indexOf(placeholder)] = socket;
|
||||||
|
return cb(socket);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onError(cause) {
|
||||||
|
connectReq.removeAllListeners();
|
||||||
|
|
||||||
|
debug('tunneling socket could not be established, cause=%s\n',
|
||||||
|
cause.message, cause.stack);
|
||||||
|
var error = new Error('tunneling socket could not be established, ' +
|
||||||
|
'cause=' + cause.message);
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
|
||||||
|
var pos = this.sockets.indexOf(socket)
|
||||||
|
if (pos === -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.sockets.splice(pos, 1);
|
||||||
|
|
||||||
|
var pending = this.requests.shift();
|
||||||
|
if (pending) {
|
||||||
|
// If we have pending requests and a socket gets closed a new one
|
||||||
|
// needs to be created to take over in the pool for the one that closed.
|
||||||
|
this.createSocket(pending, function(socket) {
|
||||||
|
pending.request.onSocket(socket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function createSecureSocket(options, cb) {
|
||||||
|
var self = this;
|
||||||
|
TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
|
||||||
|
var hostHeader = options.request.getHeader('host');
|
||||||
|
var tlsOptions = mergeOptions({}, self.options, {
|
||||||
|
socket: socket,
|
||||||
|
servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host
|
||||||
|
});
|
||||||
|
|
||||||
|
// 0 is dummy port for v0.6
|
||||||
|
var secureSocket = tls.connect(0, tlsOptions);
|
||||||
|
self.sockets[self.sockets.indexOf(socket)] = secureSocket;
|
||||||
|
cb(secureSocket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function toOptions(host, port, localAddress) {
|
||||||
|
if (typeof host === 'string') { // since v0.10
|
||||||
|
return {
|
||||||
|
host: host,
|
||||||
|
port: port,
|
||||||
|
localAddress: localAddress
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return host; // for v0.11 or later
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeOptions(target) {
|
||||||
|
for (var i = 1, len = arguments.length; i < len; ++i) {
|
||||||
|
var overrides = arguments[i];
|
||||||
|
if (typeof overrides === 'object') {
|
||||||
|
var keys = Object.keys(overrides);
|
||||||
|
for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
|
||||||
|
var k = keys[j];
|
||||||
|
if (overrides[k] !== undefined) {
|
||||||
|
target[k] = overrides[k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var debug;
|
||||||
|
if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
|
||||||
|
debug = function() {
|
||||||
|
var args = Array.prototype.slice.call(arguments);
|
||||||
|
if (typeof args[0] === 'string') {
|
||||||
|
args[0] = 'TUNNEL: ' + args[0];
|
||||||
|
} else {
|
||||||
|
args.unshift('TUNNEL:');
|
||||||
|
}
|
||||||
|
console.error.apply(console, args);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
debug = function() {};
|
||||||
|
}
|
||||||
|
exports.debug = debug; // for test
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -1128,8 +1393,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const core = __importStar(__webpack_require__(470));
|
||||||
const main = __importStar(__webpack_require__(131));
|
const main = __importStar(__webpack_require__(131));
|
||||||
main.run();
|
try {
|
||||||
|
main.run();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
core.setFailed(`Action failed with error ${e}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -1160,17 +1431,24 @@ module.exports = require("crypto");
|
|||||||
|
|
||||||
"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 = __webpack_require__(87);
|
const os = __importStar(__webpack_require__(87));
|
||||||
/**
|
/**
|
||||||
* Commands
|
* Commands
|
||||||
*
|
*
|
||||||
* Command Format:
|
* Command Format:
|
||||||
* ##[name key=value;key=value]message
|
* ::name key=value,key=value::message
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
* ##[warning]This is the user warning message
|
* ::warning::This is the message
|
||||||
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
* ::set-env name=MY_VAR::some value
|
||||||
*/
|
*/
|
||||||
function issueCommand(command, properties, message) {
|
function issueCommand(command, properties, message) {
|
||||||
const cmd = new Command(command, properties, message);
|
const cmd = new Command(command, properties, message);
|
||||||
@@ -1206,30 +1484,28 @@ class Command {
|
|||||||
else {
|
else {
|
||||||
cmdStr += ',';
|
cmdStr += ',';
|
||||||
}
|
}
|
||||||
// safely append the val - avoid blowing up when attempting to
|
cmdStr += `${key}=${escapeProperty(val)}`;
|
||||||
// call .replace() if message is not a string for some reason
|
|
||||||
cmdStr += `${key}=${escape(`${val || ''}`)}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmdStr += CMD_STRING;
|
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
|
||||||
// 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.replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
return (s || '')
|
||||||
|
.replace(/%/g, '%25')
|
||||||
|
.replace(/\r/g, '%0D')
|
||||||
|
.replace(/\n/g, '%0A');
|
||||||
}
|
}
|
||||||
function escape(s) {
|
function escapeProperty(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, '%5D')
|
.replace(/:/g, '%3A')
|
||||||
.replace(/;/g, '%3B');
|
.replace(/,/g, '%2C');
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=command.js.map
|
//# sourceMappingURL=command.js.map
|
||||||
|
|
||||||
@@ -2924,10 +3200,17 @@ 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 = __webpack_require__(431);
|
const command_1 = __webpack_require__(431);
|
||||||
const os = __webpack_require__(87);
|
const os = __importStar(__webpack_require__(87));
|
||||||
const path = __webpack_require__(622);
|
const path = __importStar(__webpack_require__(622));
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
*/
|
*/
|
||||||
@@ -3126,15 +3409,25 @@ 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;
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = __webpack_require__(470);
|
const core = __importStar(__webpack_require__(470));
|
||||||
const io = __webpack_require__(1);
|
const io = __importStar(__webpack_require__(1));
|
||||||
const fs = __webpack_require__(747);
|
const fs = __importStar(__webpack_require__(747));
|
||||||
const os = __webpack_require__(87);
|
const os = __importStar(__webpack_require__(87));
|
||||||
const path = __webpack_require__(622);
|
const path = __importStar(__webpack_require__(622));
|
||||||
const httpm = __webpack_require__(539);
|
const httpm = __importStar(__webpack_require__(539));
|
||||||
const semver = __webpack_require__(550);
|
const semver = __importStar(__webpack_require__(550));
|
||||||
const uuidV4 = __webpack_require__(826);
|
const v4_1 = __importDefault(__webpack_require__(826));
|
||||||
const exec_1 = __webpack_require__(986);
|
const exec_1 = __webpack_require__(986);
|
||||||
const assert_1 = __webpack_require__(357);
|
const assert_1 = __webpack_require__(357);
|
||||||
class HTTPError extends Error {
|
class HTTPError extends Error {
|
||||||
@@ -3188,7 +3481,7 @@ function downloadTool(url, dest) {
|
|||||||
allowRetries: true,
|
allowRetries: true,
|
||||||
maxRetries: 3
|
maxRetries: 3
|
||||||
});
|
});
|
||||||
dest = dest || path.join(tempDirectory, uuidV4());
|
dest = dest || path.join(tempDirectory, v4_1.default());
|
||||||
yield io.mkdirP(path.dirname(dest));
|
yield io.mkdirP(path.dirname(dest));
|
||||||
core.debug(`Downloading ${url}`);
|
core.debug(`Downloading ${url}`);
|
||||||
core.debug(`Downloading ${dest}`);
|
core.debug(`Downloading ${dest}`);
|
||||||
@@ -3525,7 +3818,7 @@ function _createExtractFolder(dest) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (!dest) {
|
if (!dest) {
|
||||||
// create a temp dir
|
// create a temp dir
|
||||||
dest = path.join(tempDirectory, uuidV4());
|
dest = path.join(tempDirectory, v4_1.default());
|
||||||
}
|
}
|
||||||
yield io.mkdirP(dest);
|
yield io.mkdirP(dest);
|
||||||
return dest;
|
return dest;
|
||||||
@@ -3594,7 +3887,6 @@ const url = __webpack_require__(835);
|
|||||||
const http = __webpack_require__(605);
|
const http = __webpack_require__(605);
|
||||||
const https = __webpack_require__(211);
|
const https = __webpack_require__(211);
|
||||||
const pm = __webpack_require__(950);
|
const pm = __webpack_require__(950);
|
||||||
let fs;
|
|
||||||
let tunnel;
|
let tunnel;
|
||||||
var HttpCodes;
|
var HttpCodes;
|
||||||
(function (HttpCodes) {
|
(function (HttpCodes) {
|
||||||
@@ -3625,6 +3917,15 @@ var HttpCodes;
|
|||||||
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
||||||
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
|
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
|
||||||
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
|
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
|
||||||
|
/**
|
||||||
|
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
||||||
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
||||||
|
*/
|
||||||
|
function getProxyUrl(serverUrl) {
|
||||||
|
let proxyUrl = pm.getProxyUrl(url.parse(serverUrl));
|
||||||
|
return proxyUrl ? proxyUrl.href : '';
|
||||||
|
}
|
||||||
|
exports.getProxyUrl = getProxyUrl;
|
||||||
const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect];
|
const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect];
|
||||||
const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout];
|
const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout];
|
||||||
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
|
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
|
||||||
@@ -3815,7 +4116,6 @@ class HttpClient {
|
|||||||
*/
|
*/
|
||||||
requestRawWithCallback(info, data, onResult) {
|
requestRawWithCallback(info, data, onResult) {
|
||||||
let socket;
|
let socket;
|
||||||
let isDataString = typeof (data) === 'string';
|
|
||||||
if (typeof (data) === 'string') {
|
if (typeof (data) === 'string') {
|
||||||
info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
|
info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
|
||||||
}
|
}
|
||||||
@@ -3858,6 +4158,15 @@ class HttpClient {
|
|||||||
req.end();
|
req.end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Gets an http agent. This function is useful when you need an http agent that handles
|
||||||
|
* routing through a proxy server - depending upon the url and proxy environment variables.
|
||||||
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
||||||
|
*/
|
||||||
|
getAgent(serverUrl) {
|
||||||
|
let parsedUrl = url.parse(serverUrl);
|
||||||
|
return this._getAgent(parsedUrl);
|
||||||
|
}
|
||||||
_prepareRequest(method, requestUrl, headers) {
|
_prepareRequest(method, requestUrl, headers) {
|
||||||
const info = {};
|
const info = {};
|
||||||
info.parsedUrl = requestUrl;
|
info.parsedUrl = requestUrl;
|
||||||
@@ -3911,7 +4220,7 @@ class HttpClient {
|
|||||||
if (useProxy) {
|
if (useProxy) {
|
||||||
// If using proxy, need tunnel
|
// If using proxy, need tunnel
|
||||||
if (!tunnel) {
|
if (!tunnel) {
|
||||||
tunnel = __webpack_require__(157);
|
tunnel = __webpack_require__(856);
|
||||||
}
|
}
|
||||||
const agentOptions = {
|
const agentOptions = {
|
||||||
maxSockets: maxSockets,
|
maxSockets: maxSockets,
|
||||||
@@ -5586,6 +5895,13 @@ module.exports = require("path");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 631:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("net");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 669:
|
/***/ 669:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
@@ -5906,6 +6222,14 @@ module.exports = v4;
|
|||||||
|
|
||||||
module.exports = require("url");
|
module.exports = require("url");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 856:
|
||||||
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
|
module.exports = __webpack_require__(141);
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 901:
|
/***/ 901:
|
||||||
@@ -6051,23 +6375,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const url = __webpack_require__(835);
|
const url = __webpack_require__(835);
|
||||||
function getProxyUrl(reqUrl) {
|
function getProxyUrl(reqUrl) {
|
||||||
let usingSsl = reqUrl.protocol === 'https:';
|
let usingSsl = reqUrl.protocol === 'https:';
|
||||||
let noProxy = process.env["no_proxy"] ||
|
|
||||||
process.env["NO_PROXY"];
|
|
||||||
let bypass;
|
|
||||||
if (noProxy && typeof noProxy === 'string') {
|
|
||||||
let bypassList = noProxy.split(',');
|
|
||||||
for (let i = 0; i < bypassList.length; i++) {
|
|
||||||
let item = bypassList[i];
|
|
||||||
if (item &&
|
|
||||||
typeof item === "string" &&
|
|
||||||
reqUrl.host.toLocaleLowerCase() == item.trim().toLocaleLowerCase()) {
|
|
||||||
bypass = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let proxyUrl;
|
let proxyUrl;
|
||||||
if (bypass) {
|
if (checkBypass(reqUrl)) {
|
||||||
return proxyUrl;
|
return proxyUrl;
|
||||||
}
|
}
|
||||||
let proxyVar;
|
let proxyVar;
|
||||||
@@ -6085,6 +6394,39 @@ function getProxyUrl(reqUrl) {
|
|||||||
return proxyUrl;
|
return proxyUrl;
|
||||||
}
|
}
|
||||||
exports.getProxyUrl = getProxyUrl;
|
exports.getProxyUrl = getProxyUrl;
|
||||||
|
function checkBypass(reqUrl) {
|
||||||
|
if (!reqUrl.hostname) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || '';
|
||||||
|
if (!noProxy) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Determine the request port
|
||||||
|
let reqPort;
|
||||||
|
if (reqUrl.port) {
|
||||||
|
reqPort = Number(reqUrl.port);
|
||||||
|
}
|
||||||
|
else if (reqUrl.protocol === 'http:') {
|
||||||
|
reqPort = 80;
|
||||||
|
}
|
||||||
|
else if (reqUrl.protocol === 'https:') {
|
||||||
|
reqPort = 443;
|
||||||
|
}
|
||||||
|
// Format the request hostname and hostname with port
|
||||||
|
let upperReqHosts = [reqUrl.hostname.toUpperCase()];
|
||||||
|
if (typeof reqPort === 'number') {
|
||||||
|
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
|
||||||
|
}
|
||||||
|
// Compare request host against noproxy
|
||||||
|
for (let upperNoProxyItem of noProxy.split(',').map(x => x.trim().toUpperCase()).filter(x => x)) {
|
||||||
|
if (upperReqHosts.some(x => x === upperNoProxyItem)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
exports.checkBypass = checkBypass;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|||||||
295
package-lock.json
generated
295
package-lock.json
generated
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "hugo-action",
|
"name": "hugo-action",
|
||||||
"version": "2.4.2",
|
"version": "2.4.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": {
|
"@actions/core": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz",
|
||||||
"integrity": "sha512-xD+CQd9p4lU7ZfRqmUcbJpqR+Ss51rJRVeXMyOLrZQImN9/8Sy/BEUBnHO/UKD3z03R686PVTLfEPmkropGuLw=="
|
"integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg=="
|
||||||
},
|
},
|
||||||
"@actions/exec": {
|
"@actions/exec": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -18,9 +18,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@actions/http-client": {
|
"@actions/http-client": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.3.tgz",
|
||||||
"integrity": "sha512-vy5DhqTJ1gtEkpRrD/6BHhUlkeyccrOX0BT9KmtO5TWxe5KSSwVHFE+J15Z0dG+tJwZJ/nHC4slUIyqpkahoMg=="
|
"integrity": "sha512-wFwh1U4adB/Zsk4cc9kVqaBOHoknhp/pJQk+aWTocbAZWpIl4Zx/At83WFRLXvxB+5HVTWOACM6qjULMZfQSfw==",
|
||||||
|
"requires": {
|
||||||
|
"tunnel": "0.0.6"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@actions/io": {
|
"@actions/io": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -28,13 +31,13 @@
|
|||||||
"integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
|
"integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
|
||||||
},
|
},
|
||||||
"@actions/tool-cache": {
|
"@actions/tool-cache": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.3.1.tgz",
|
||||||
"integrity": "sha512-pbv32I89niDShw1YTDo0OFQmWPkZPElE7e3So1jfEzjIyzGRfYIzshwOVhemJZLcDtzo3kxO3GFDAmuVvub/6w==",
|
"integrity": "sha512-sKoEJv0/c7WzjPEq2PO12Sc8QdEp58XIBHMm3c4lUn/iZWgLz9HBeCuFGpLQjDvXJNfLZ4g+WD+rMjgOmpH4Ag==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/core": "^1.2.0",
|
"@actions/core": "^1.2.0",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^1.0.0",
|
||||||
"@actions/http-client": "^1.0.1",
|
"@actions/http-client": "^1.0.3",
|
||||||
"@actions/io": "^1.0.1",
|
"@actions/io": "^1.0.1",
|
||||||
"semver": "^6.1.0",
|
"semver": "^6.1.0",
|
||||||
"uuid": "^3.3.2"
|
"uuid": "^3.3.2"
|
||||||
@@ -1147,14 +1150,67 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jest/types": {
|
"@jest/types": {
|
||||||
"version": "24.9.0",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@jest/types/-/types-25.1.0.tgz",
|
||||||
"integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==",
|
"integrity": "sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/istanbul-lib-coverage": "^2.0.0",
|
"@types/istanbul-lib-coverage": "^2.0.0",
|
||||||
"@types/istanbul-reports": "^1.1.1",
|
"@types/istanbul-reports": "^1.1.1",
|
||||||
"@types/yargs": "^13.0.0"
|
"@types/yargs": "^15.0.0",
|
||||||
|
"chalk": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||||
|
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/color-name": "^1.1.1",
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.1.0",
|
||||||
|
"supports-color": "^7.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@samverschueren/stream-to-observable": {
|
"@samverschueren/stream-to-observable": {
|
||||||
@@ -1254,12 +1310,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/jest": {
|
"@types/jest": {
|
||||||
"version": "24.9.1",
|
"version": "25.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.1.tgz",
|
||||||
"integrity": "sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q==",
|
"integrity": "sha512-bKSZJYZJLzwaoVYNN4W3A0RvKNYsrLm5tsuXaMlfYDxKf4gY2sFrMYneCugNQWGg1gjPW+FHBwNrwPzEi4sIsw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"jest-diff": "^24.3.0"
|
"jest-diff": "^25.1.0",
|
||||||
|
"pretty-format": "^25.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/json-schema": {
|
"@types/json-schema": {
|
||||||
@@ -1269,9 +1326,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "13.5.0",
|
"version": "13.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.0.tgz",
|
||||||
"integrity": "sha512-Onhn+z72D2O2Pb2ql2xukJ55rglumsVo1H6Fmyi8mlU9SvKdBk/pUSUAiBY/d9bAOF7VVWajX3sths/+g6ZiAQ==",
|
"integrity": "sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node-fetch": {
|
"@types/node-fetch": {
|
||||||
@@ -1296,9 +1353,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/yargs": {
|
"@types/yargs": {
|
||||||
"version": "13.0.6",
|
"version": "15.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.2.tgz",
|
||||||
"integrity": "sha512-IkltIncDQWv6fcAvnHtJ6KtkmY/vtR3bViOaCzpj/A3yNhlfZAgxNe6AEQD1cQrkYD+YsKVo08DSxvNKEsD7BA==",
|
"integrity": "sha512-hFkuAp58M2xOc1QgJhkFrLMnqa8KWTFRTnzrI1zlEcOfg3DZ0eH3aPAo/N6QlVVu8E4KS4xD1jtEG3rdQYFmIg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/yargs-parser": "*"
|
"@types/yargs-parser": "*"
|
||||||
@@ -1311,12 +1368,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "2.17.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.19.0.tgz",
|
||||||
"integrity": "sha512-tg/OMOtPeXlvk0ES8mZzEZ4gd1ruSE03nsKcK+teJhxYv5CPCXK6Mb/OK6NpB4+CqGTHs4MVeoSZXNFqpT1PyQ==",
|
"integrity": "sha512-u7IcQ9qwsB6U806LupZmINRnQjC+RJyv36sV/ugaFWMHTbFm/hlLTRx3gGYJgHisxcGSTnf+I/fPDieRMhPSQQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/experimental-utils": "2.17.0",
|
"@typescript-eslint/experimental-utils": "2.19.0",
|
||||||
"eslint-utils": "^1.4.3",
|
"eslint-utils": "^1.4.3",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"regexpp": "^3.0.0",
|
"regexpp": "^3.0.0",
|
||||||
@@ -1324,20 +1381,20 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/experimental-utils": {
|
"@typescript-eslint/experimental-utils": {
|
||||||
"version": "2.17.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz",
|
||||||
"integrity": "sha512-2bNf+mZ/3mj5/3CP56v+ldRK3vFy9jOvmCPs/Gr2DeSJh+asPZrhFniv4QmQsHWQFPJFWhFHgkGgJeRmK4m8iQ==",
|
"integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.3",
|
"@types/json-schema": "^7.0.3",
|
||||||
"@typescript-eslint/typescript-estree": "2.17.0",
|
"@typescript-eslint/typescript-estree": "2.19.0",
|
||||||
"eslint-scope": "^5.0.0"
|
"eslint-scope": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "2.17.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz",
|
||||||
"integrity": "sha512-g0eVRULGnEEUakxRfJO0s0Hr1LLQqsI6OrkiCLpdHtdJJek+wyd8mb00vedqAoWldeDcOcP8plqw8/jx9Gr3Lw==",
|
"integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
@@ -1404,32 +1461,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "2.17.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.19.0.tgz",
|
||||||
"integrity": "sha512-k1g3gRQ4fwfJoIfgUpz78AovicSWKFANmvTfkAHP24MgJHjWfZI6ya7tsQZt1sLczvP4G9BE5G5MgADHdmJB/w==",
|
"integrity": "sha512-s0jZoxAWjHnuidbbN7aA+BFVXn4TCcxEVGPV8lWMxZglSs3NRnFFAlL+aIENNmzB2/1jUJuySi6GiM6uACPmpg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-visitor-keys": "^1.0.0",
|
"@types/eslint-visitor-keys": "^1.0.0",
|
||||||
"@typescript-eslint/experimental-utils": "2.17.0",
|
"@typescript-eslint/experimental-utils": "2.19.0",
|
||||||
"@typescript-eslint/typescript-estree": "2.17.0",
|
"@typescript-eslint/typescript-estree": "2.19.0",
|
||||||
"eslint-visitor-keys": "^1.1.0"
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/experimental-utils": {
|
"@typescript-eslint/experimental-utils": {
|
||||||
"version": "2.17.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.19.0.tgz",
|
||||||
"integrity": "sha512-2bNf+mZ/3mj5/3CP56v+ldRK3vFy9jOvmCPs/Gr2DeSJh+asPZrhFniv4QmQsHWQFPJFWhFHgkGgJeRmK4m8iQ==",
|
"integrity": "sha512-zwpg6zEOPbhB3+GaQfufzlMUOO6GXCNZq6skk+b2ZkZAIoBhVoanWK255BS1g5x9bMwHpLhX0Rpn5Fc3NdCZdg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.3",
|
"@types/json-schema": "^7.0.3",
|
||||||
"@typescript-eslint/typescript-estree": "2.17.0",
|
"@typescript-eslint/typescript-estree": "2.19.0",
|
||||||
"eslint-scope": "^5.0.0"
|
"eslint-scope": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "2.17.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.19.0.tgz",
|
||||||
"integrity": "sha512-g0eVRULGnEEUakxRfJO0s0Hr1LLQqsI6OrkiCLpdHtdJJek+wyd8mb00vedqAoWldeDcOcP8plqw8/jx9Gr3Lw==",
|
"integrity": "sha512-n6/Xa37k0jQdwpUszffi19AlNbVCR0sdvCs3DmSKMD7wBttKY31lhD2fug5kMD91B2qW4mQldaTEc1PEzvGu8w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
@@ -2819,9 +2876,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"diff-sequences": {
|
"diff-sequences": {
|
||||||
"version": "24.9.0",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-25.1.0.tgz",
|
||||||
"integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==",
|
"integrity": "sha512-nFIfVk5B/NStCsJ+zaPO4vYuLjlzQ6uFvPxzYyHlejNZ/UGa7G/n7peOXVrVNvRuyfstt+mZQYGpjxg9Z6N8Kw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"doctrine": {
|
"doctrine": {
|
||||||
@@ -6276,15 +6333,67 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-diff": {
|
"jest-diff": {
|
||||||
"version": "24.9.0",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-25.1.0.tgz",
|
||||||
"integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==",
|
"integrity": "sha512-nepXgajT+h017APJTreSieh4zCqnSHEJ1iT8HDlewu630lSJ4Kjjr9KNzm+kzGwwcpsDE6Snx1GJGzzsefaEHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^2.0.1",
|
"chalk": "^3.0.0",
|
||||||
"diff-sequences": "^24.9.0",
|
"diff-sequences": "^25.1.0",
|
||||||
"jest-get-type": "^24.9.0",
|
"jest-get-type": "^25.1.0",
|
||||||
"pretty-format": "^24.9.0"
|
"pretty-format": "^25.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||||
|
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/color-name": "^1.1.1",
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.1.0",
|
||||||
|
"supports-color": "^7.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-docblock": {
|
"jest-docblock": {
|
||||||
@@ -6586,9 +6695,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jest-get-type": {
|
"jest-get-type": {
|
||||||
"version": "24.9.0",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-25.1.0.tgz",
|
||||||
"integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==",
|
"integrity": "sha512-yWkBnT+5tMr8ANB6V+OjmrIJufHtCAqI5ic2H40v+tRqxDmE0PGnIiTyvRWFOMtmVHYpwRqyazDbTnhpjsGvLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"jest-haste-map": {
|
"jest-haste-map": {
|
||||||
@@ -8377,9 +8486,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"version": "10.0.2",
|
"version": "10.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.7.tgz",
|
||||||
"integrity": "sha512-ZldhtIfT7bynVa7nmU/1jbK05r9hYQXbIQqZSotqdBCAcGJDEUqaUB7kG3ZCdoe9Qkj6HUM3x2yjCGJRxPUQLA==",
|
"integrity": "sha512-Byj0F4l7GYUpYYHEqyFH69NiI6ICTg0CeCKbhRorL+ickbzILKUlZLiyCkljZV02wnoh7yH7PmFyYm9PRNwk9g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
@@ -9706,15 +9815,48 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"pretty-format": {
|
"pretty-format": {
|
||||||
"version": "24.9.0",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.1.0.tgz",
|
||||||
"integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==",
|
"integrity": "sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jest/types": "^24.9.0",
|
"@jest/types": "^25.1.0",
|
||||||
"ansi-regex": "^4.0.0",
|
"ansi-regex": "^5.0.0",
|
||||||
"ansi-styles": "^3.2.0",
|
"ansi-styles": "^4.0.0",
|
||||||
"react-is": "^16.8.4"
|
"react-is": "^16.12.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||||
|
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/color-name": "^1.1.1",
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
@@ -10950,9 +11092,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"version": "25.0.0",
|
"version": "25.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-25.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-25.2.0.tgz",
|
||||||
"integrity": "sha512-F+hZg3j7XYOFpXJteXb4lnqy7vQzTmpTmX7AJT6pvSGeZejyXj1Lk0ArpnrEPOpv6Zu/NugHc5W7FINngC9WZQ==",
|
"integrity": "sha512-VaRdb0da46eorLfuHEFf0G3d+jeREcV+Wb/SvW71S4y9Oe8SHWU+m1WY/3RaMknrBsnvmVH0/rRjT8dkgeffNQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs-logger": "0.x",
|
"bs-logger": "0.x",
|
||||||
@@ -10999,6 +11141,11 @@
|
|||||||
"tslib": "^1.8.1"
|
"tslib": "^1.8.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tunnel": {
|
||||||
|
"version": "0.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||||
|
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
|
||||||
|
},
|
||||||
"tunnel-agent": {
|
"tunnel-agent": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
|
|||||||
24
package.json
24
package.json
@@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "hugo-action",
|
"name": "actions-hugo",
|
||||||
"version": "2.4.2",
|
"version": "2.4.5",
|
||||||
"description": "GitHub Actions for Hugo",
|
"description": "GitHub Actions for Hugo",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.14.1",
|
||||||
|
"npm": ">=6.13.7"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint ./{src,__tests__}/**/*.ts",
|
"lint": "eslint ./{src,__tests__}/**/*.ts",
|
||||||
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
|
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
|
||||||
@@ -47,29 +51,29 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.1",
|
"@actions/core": "^1.2.2",
|
||||||
"@actions/exec": "^1.0.3",
|
"@actions/exec": "^1.0.3",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.3.0",
|
"@actions/tool-cache": "^1.3.1",
|
||||||
"node-fetch": "^2.6.0"
|
"node-fetch": "^2.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^24.9.1",
|
"@types/jest": "^25.1.1",
|
||||||
"@types/node": "^13.5.0",
|
"@types/node": "^13.7.0",
|
||||||
"@types/node-fetch": "^2.5.4",
|
"@types/node-fetch": "^2.5.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.17.0",
|
"@typescript-eslint/eslint-plugin": "^2.19.0",
|
||||||
"@typescript-eslint/parser": "^2.17.0",
|
"@typescript-eslint/parser": "^2.19.0",
|
||||||
"@zeit/ncc": "^0.21.0",
|
"@zeit/ncc": "^0.21.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-plugin-jest": "^23.6.0",
|
"eslint-plugin-jest": "^23.6.0",
|
||||||
"husky": "^4.2.1",
|
"husky": "^4.2.1",
|
||||||
"jest": "^25.1.0",
|
"jest": "^25.1.0",
|
||||||
"jest-circus": "^25.1.0",
|
"jest-circus": "^25.1.0",
|
||||||
"lint-staged": "^10.0.2",
|
"lint-staged": "^10.0.7",
|
||||||
"nock": "^11.7.2",
|
"nock": "^11.7.2",
|
||||||
"prettier": "1.19.1",
|
"prettier": "1.19.1",
|
||||||
"standard-version": "^7.1.0",
|
"standard-version": "^7.1.0",
|
||||||
"ts-jest": "^25.0.0",
|
"ts-jest": "^25.2.0",
|
||||||
"typescript": "^3.7.5"
|
"typescript": "^3.7.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fi
|
|||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git pull origin master
|
git pull origin master
|
||||||
git tag -d v2
|
git tag -d v2 || true
|
||||||
git pull origin --tags
|
git pull origin --tags
|
||||||
|
|
||||||
npm ci
|
npm ci
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
import * as core from '@actions/core';
|
||||||
import * as main from './main';
|
import * as main from './main';
|
||||||
|
|
||||||
main.run();
|
try {
|
||||||
|
main.run();
|
||||||
|
} catch (e) {
|
||||||
|
core.setFailed(`Action failed with error ${e}`);
|
||||||
|
}
|
||||||
|
|||||||
37
src/main.ts
37
src/main.ts
@@ -34,28 +34,23 @@ export async function showVersion(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function run(): Promise<ActionResult> {
|
export async function run(): Promise<ActionResult> {
|
||||||
try {
|
const toolVersion: string = core.getInput('hugo-version');
|
||||||
const toolVersion: string = core.getInput('hugo-version');
|
let installVersion = '';
|
||||||
let installVersion = '';
|
|
||||||
|
|
||||||
let result: ActionResult = {
|
let result: ActionResult = {
|
||||||
exitcode: 0,
|
exitcode: 0,
|
||||||
output: ''
|
output: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (toolVersion === '' || toolVersion === 'latest') {
|
if (toolVersion === '' || toolVersion === 'latest') {
|
||||||
installVersion = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
|
installVersion = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
|
||||||
} else {
|
} else {
|
||||||
installVersion = toolVersion;
|
installVersion = toolVersion;
|
||||||
}
|
|
||||||
|
|
||||||
core.info(`${Tool.Name} version: ${installVersion}`);
|
|
||||||
await installer(installVersion);
|
|
||||||
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
} catch (e) {
|
|
||||||
core.setFailed(`Action failed with error ${e}`);
|
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.info(`${Tool.Name} version: ${installVersion}`);
|
||||||
|
await installer(installVersion);
|
||||||
|
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user