mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 20:32:19 +01:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10f36c7c91 | ||
|
|
236e039b5f | ||
|
|
2f904a6aa6 | ||
|
|
2b3acb31e4 | ||
|
|
f14d276121 | ||
|
|
9eb8f9e108 | ||
|
|
69200f8579 | ||
|
|
3cf50c6d11 | ||
|
|
900499cd1c | ||
|
|
da7c321b3b | ||
|
|
739a95f1e7 | ||
|
|
bc6f48c683 | ||
|
|
cf07920706 | ||
|
|
3e0ab3eb25 | ||
|
|
c5ea31b9d7 | ||
|
|
bc06efb2e0 | ||
|
|
3b3c59db47 | ||
|
|
b51e0ae5b4 | ||
|
|
8b813b0c62 | ||
|
|
638f751056 | ||
|
|
d04830441a | ||
|
|
5dc353210f | ||
|
|
129fcc86a6 | ||
|
|
34e697e615 | ||
|
|
608a9dce06 | ||
|
|
bcfd41e8b4 | ||
|
|
0a102fbbed | ||
|
|
ef869fb22f | ||
|
|
1490c6e417 |
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
name: Feature request
|
name: Proposal
|
||||||
about: Suggest an idea for this project
|
about: Suggest an idea for this project
|
||||||
title: 'feat: This is a sample title'
|
title: 'proposal: This is a sample title'
|
||||||
labels: request
|
labels: proposal
|
||||||
assignees: peaceiris
|
assignees: peaceiris
|
||||||
|
|
||||||
---
|
---
|
||||||
16
.github/workflows/purge-readme-image-cache.yml
vendored
Normal file
16
.github/workflows/purge-readme-image-cache.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: Purge image cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '4 18 * * */7'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
purge:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- run: >
|
||||||
|
curl -sL https://github.com/${GITHUB_REPOSITORY} |
|
||||||
|
grep -oE '<img src="https?://camo.githubusercontent.com/[^"]+' |
|
||||||
|
sed -e 's/<img src="//' |
|
||||||
|
xargs -I % curl -sX PURGE %
|
||||||
17
.github/workflows/stale.yml
vendored
Normal file
17
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: Stale
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "6 6 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v1
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
stale-issue-message: 'This issue 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-close: 7
|
||||||
19
.github/workflows/test.yml
vendored
19
.github/workflows/test.yml
vendored
@@ -16,12 +16,10 @@ jobs:
|
|||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Read .nvmrc
|
- name: Read .nvmrc
|
||||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
|
||||||
id: nvm
|
id: nvm
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
@@ -30,7 +28,7 @@ jobs:
|
|||||||
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
node-version: '${{ steps.nvm.outputs.NVMRC }}'
|
||||||
|
|
||||||
- name: Cache
|
- name: Cache
|
||||||
uses: actions/cache@v1.0.1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -45,8 +43,13 @@ jobs:
|
|||||||
|
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
|
- name: Check ncc
|
||||||
|
run: |
|
||||||
|
npm run build
|
||||||
|
test -z "$(git status --short)"
|
||||||
|
|
||||||
- name: Upload test coverage
|
- name: Upload test coverage
|
||||||
uses: actions/upload-artifact@master
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: coverage
|
path: coverage
|
||||||
@@ -62,9 +65,7 @@ jobs:
|
|||||||
extended: [true, false]
|
extended: [true, false]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Test action
|
- name: Test action
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
24
.github/workflows/update-major-tag.yml
vendored
Normal file
24
.github/workflows/update-major-tag.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Update major tag
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Update major tag
|
||||||
|
if: github.event.release.prerelease == false
|
||||||
|
run: |
|
||||||
|
git config user.name "${GITHUB_ACTOR}"
|
||||||
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
|
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
||||||
|
export TAG_NAME="${GITHUB_REF##refs/tags/}"
|
||||||
|
export TAG_MAJOR="${TAG_NAME%%.*}"
|
||||||
|
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || git tag -d "${TAG_MAJOR}" ; git push origin --delete "${TAG_MAJOR}"
|
||||||
|
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || true
|
||||||
|
git push --tags origin
|
||||||
92
README.md
92
README.md
@@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## GitHub Actions for Hugo extended and Modules
|
## GitHub Actions for Hugo
|
||||||
|
|
||||||
- [gohugoio/hugo: The world’s fastest framework for building websites.](https://github.com/gohugoio/hugo)
|
- [gohugoio/hugo: The world’s fastest framework for building websites.](https://github.com/gohugoio/hugo)
|
||||||
|
|
||||||
We can run Hugo on a virtual machine of GitHub Actions by this Hugo action. Hugo extended version and Hugo Modules are supported.
|
We can run **Hugo** on a virtual machine of **GitHub Actions** by this Hugo action. **Hugo extended** version and **Hugo Modules** are supported.
|
||||||
|
|
||||||
From `v2.0.0`, this Hugo action migrated to a JavaScript (TypeScript) action. We no longer build or pull a Hugo docker image. Thanks to this change, we can complete this action less than **4 sec**. (A docker base action was taking about 1 min or more execution time to build or pull.)
|
From `v2`, this Hugo action migrated to a JavaScript (TypeScript) action. We no longer build or pull a Hugo docker image. Thanks to this change, we can complete this action less than **4 sec**. (A docker base action was taking about 1 min or more execution time to build or pull.)
|
||||||
|
|
||||||
| OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 |
|
| OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 |
|
||||||
|---|:---:|:---:|:---:|
|
|---|:---:|:---:|:---:|
|
||||||
@@ -24,15 +24,21 @@ From `v2.0.0`, this Hugo action migrated to a JavaScript (TypeScript) action. W
|
|||||||
|---|:---:|:---:|:---:|
|
|---|:---:|:---:|:---:|
|
||||||
| Support | ✅️ | ✅️ | ✅️ |
|
| Support | ✅️ | ✅️ | ✅️ |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
*Table of Contents*
|
|
||||||
|
|
||||||
- [Getting started](#getting-started)
|
- [Getting started](#getting-started)
|
||||||
- [⭐️ Create your workflow](#%EF%B8%8F-create-your-workflow)
|
- [⭐️ Create your workflow](#%EF%B8%8F-create-your-workflow)
|
||||||
- [Options](#options)
|
- [Options](#options)
|
||||||
- [⭐️ Use Hugo extended](#%EF%B8%8F-use-hugo-extended)
|
- [⭐️ Use Hugo extended](#%EF%B8%8F-use-hugo-extended)
|
||||||
- [⭐️ Use the latest version of Hugo](#%EF%B8%8F-use-the-latest-version-of-hugo)
|
- [⭐️ Use the latest version of Hugo](#%EF%B8%8F-use-the-latest-version-of-hugo)
|
||||||
|
- [Tips](#tips)
|
||||||
|
- [⭐️ Read Hugo version from file](#%EF%B8%8F-read-hugo-version-from-file)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
- [About the author](#about-the-author)
|
- [About the author](#about-the-author)
|
||||||
|
|
||||||
@@ -65,27 +71,31 @@ jobs:
|
|||||||
build-deploy:
|
build-deploy:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v1
|
||||||
# with:
|
# with:
|
||||||
# submodules: true
|
# submodules: true
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2.2.2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.58.3'
|
hugo-version: '0.59.1'
|
||||||
# extended: true
|
# extended: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2.5.0
|
uses: peaceiris/actions-gh-pages@v2
|
||||||
env:
|
env:
|
||||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
PUBLISH_DIR: ./public
|
PUBLISH_DIR: ./public
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<div align="right">
|
||||||
|
<a href="#table-of-contents">Back to TOC ☝️</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
@@ -96,9 +106,9 @@ Set `extended: true` to use a Hugo extended version.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2.2.2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.58.3'
|
hugo-version: '0.59.1'
|
||||||
extended: true
|
extended: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -108,13 +118,67 @@ Set `hugo-version: 'latest'` to use the latest version of Hugo.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v2.2.2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: 'latest'
|
hugo-version: 'latest'
|
||||||
```
|
```
|
||||||
|
|
||||||
This action fetches the latest version of Hugo by [hugo | Homebrew Formulae](https://formulae.brew.sh/formula/hugo)
|
This action fetches the latest version of Hugo by [hugo | Homebrew Formulae](https://formulae.brew.sh/formula/hugo)
|
||||||
|
|
||||||
|
<div align="right">
|
||||||
|
<a href="#table-of-contents">Back to TOC ☝️</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
### ⭐️ Read Hugo version from file
|
||||||
|
|
||||||
|
How to sync a Hugo version between a Docker Compose and a GitHub Actions workflow via `.env` file.
|
||||||
|
|
||||||
|
Write a `HUGO_VERSION` to the `.env` file like the following and push it to a remote branch.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
HUGO_VERSION=0.59.1
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, add a step to read a Hugo version from the `.env` file.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Read .env
|
||||||
|
id: hugo-version
|
||||||
|
run: |
|
||||||
|
. ./.env
|
||||||
|
echo "::set-output name=HUGO_VERSION::${HUGO_VERSION}"
|
||||||
|
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: '${{ steps.hugo-version.outputs.HUGO_VERSION }}'
|
||||||
|
extended: true
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is a `docker-compose.yml` example.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
hugo:
|
||||||
|
container_name: hugo
|
||||||
|
image: "peaceiris/hugo:v${HUGO_VERSION}"
|
||||||
|
# image: peaceiris/hugo:v${HUGO_VERSION}-mod # Hugo Modules
|
||||||
|
ports:
|
||||||
|
- 1313:1313
|
||||||
|
volumes:
|
||||||
|
- ${PWD}:/src
|
||||||
|
command:
|
||||||
|
- server
|
||||||
|
- --bind=0.0.0.0
|
||||||
|
- --buildDrafts
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
@@ -128,3 +192,9 @@ This action fetches the latest version of Hugo by [hugo | Homebrew Formulae](htt
|
|||||||
## About the author
|
## About the author
|
||||||
|
|
||||||
- [peaceiris's homepage](https://peaceiris.com/)
|
- [peaceiris's homepage](https://peaceiris.com/)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div align="right">
|
||||||
|
<a href="#table-of-contents">Back to TOC ☝️</a>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ describe('getOS', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('test exception', () => {
|
test('test exception', () => {
|
||||||
// expect(() => {
|
|
||||||
// getOS("win32");
|
|
||||||
// }).toThrowError("Windows is not supported");
|
|
||||||
expect(() => {
|
expect(() => {
|
||||||
getOS('centos');
|
getOS('centos');
|
||||||
}).toThrowError('centos is not supported');
|
}).toThrowError('centos is not supported');
|
||||||
|
|||||||
@@ -9,14 +9,11 @@ describe('getURL()', () => {
|
|||||||
const urlMacOS = `${baseURL}/hugo_0.58.2_macOS-64bit.tar.gz`;
|
const urlMacOS = `${baseURL}/hugo_0.58.2_macOS-64bit.tar.gz`;
|
||||||
const urlWindows = `${baseURL}/hugo_0.58.2_Windows-64bit.zip`;
|
const urlWindows = `${baseURL}/hugo_0.58.2_Windows-64bit.zip`;
|
||||||
expect(getURL('Linux', 'false', '0.58.2')).toBe(urlLinux);
|
expect(getURL('Linux', 'false', '0.58.2')).toBe(urlLinux);
|
||||||
|
expect(getURL('Linux', 'true', '0.58.2')).not.toBe(urlLinux);
|
||||||
|
expect(getURL('MyOS', 'false', '0.58.2')).not.toBe(urlLinux);
|
||||||
|
expect(getURL('Linux', 'false', '0.58.1')).not.toBe(urlLinux);
|
||||||
expect(getURL('Linux', 'true', '0.58.2')).toBe(urlLinuxExtended);
|
expect(getURL('Linux', 'true', '0.58.2')).toBe(urlLinuxExtended);
|
||||||
expect(getURL('macOS', 'false', '0.58.2')).toBe(urlMacOS);
|
expect(getURL('macOS', 'false', '0.58.2')).toBe(urlMacOS);
|
||||||
expect(getURL('Windows', 'false', '0.58.2')).toBe(urlWindows);
|
expect(getURL('Windows', 'false', '0.58.2')).toBe(urlWindows);
|
||||||
});
|
});
|
||||||
|
|
||||||
// test("test exception", () => {
|
|
||||||
// expect(() => {
|
|
||||||
// getURL("Linux", "hoge", "0.58.2");
|
|
||||||
// }).toThrowError("Invalid input (extended): hoge");
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
|
|||||||
45
lib/index.js
45
lib/index.js
@@ -358,6 +358,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const os = __webpack_require__(87);
|
const os = __webpack_require__(87);
|
||||||
const events = __webpack_require__(614);
|
const events = __webpack_require__(614);
|
||||||
const child = __webpack_require__(129);
|
const child = __webpack_require__(129);
|
||||||
|
const path = __webpack_require__(622);
|
||||||
|
const io = __webpack_require__(1);
|
||||||
|
const ioUtil = __webpack_require__(672);
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
/*
|
/*
|
||||||
@@ -703,6 +706,16 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
*/
|
*/
|
||||||
exec() {
|
exec() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// root the tool path if it is unrooted and contains relative pathing
|
||||||
|
if (!ioUtil.isRooted(this.toolPath) &&
|
||||||
|
(this.toolPath.includes('/') ||
|
||||||
|
(IS_WINDOWS && this.toolPath.includes('\\')))) {
|
||||||
|
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
|
||||||
|
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
|
||||||
|
}
|
||||||
|
// if the tool is only a file name, then resolve it from the PATH
|
||||||
|
// otherwise verify it exists (add extension on Windows if necessary)
|
||||||
|
this.toolPath = yield io.which(this.toolPath, true);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this._debug(`exec tool: ${this.toolPath}`);
|
this._debug(`exec tool: ${this.toolPath}`);
|
||||||
this._debug('arguments:');
|
this._debug('arguments:');
|
||||||
@@ -1907,7 +1920,7 @@ const get_latest_version_1 = __importDefault(__webpack_require__(307));
|
|||||||
const installer_1 = __importDefault(__webpack_require__(923));
|
const installer_1 = __importDefault(__webpack_require__(923));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const dump = () => __awaiter(this, void 0, void 0, function* () {
|
const showVersion = () => __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('hugo version');
|
yield exec.exec('hugo version');
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
@@ -1917,7 +1930,7 @@ function run() {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
console.log(`Hugo version: ${latestVersion} (${hugoVersion})`);
|
console.log(`Hugo version: ${latestVersion} (${hugoVersion})`);
|
||||||
yield installer_1.default(latestVersion);
|
yield installer_1.default(latestVersion);
|
||||||
yield dump();
|
yield showVersion();
|
||||||
});
|
});
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
core.setFailed(error);
|
core.setFailed(error);
|
||||||
@@ -1926,7 +1939,7 @@ function run() {
|
|||||||
else {
|
else {
|
||||||
console.log(`Hugo version: ${hugoVersion}`);
|
console.log(`Hugo version: ${hugoVersion}`);
|
||||||
yield installer_1.default(hugoVersion);
|
yield installer_1.default(hugoVersion);
|
||||||
yield dump();
|
yield showVersion();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
@@ -5153,6 +5166,18 @@ const tc = __importStar(__webpack_require__(533));
|
|||||||
const io = __importStar(__webpack_require__(1));
|
const io = __importStar(__webpack_require__(1));
|
||||||
const get_os_1 = __importDefault(__webpack_require__(443));
|
const get_os_1 = __importDefault(__webpack_require__(443));
|
||||||
const get_url_1 = __importDefault(__webpack_require__(901));
|
const get_url_1 = __importDefault(__webpack_require__(901));
|
||||||
|
const path = __importStar(__webpack_require__(622));
|
||||||
|
let tempDir = process.env['RUNNER_TEMPDIRECTORY'] || '';
|
||||||
|
if (!tempDir) {
|
||||||
|
let baseTempLocation;
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
baseTempLocation = process.env['USERPROFILE'] || 'C:\\';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
baseTempLocation = `${process.env.HOME}`;
|
||||||
|
}
|
||||||
|
tempDir = path.join(baseTempLocation, 'tmp');
|
||||||
|
}
|
||||||
function installer(version) {
|
function installer(version) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
@@ -5162,17 +5187,25 @@ function installer(version) {
|
|||||||
console.log(`Operating System: ${osName}`);
|
console.log(`Operating System: ${osName}`);
|
||||||
const hugoURL = get_url_1.default(osName, extended, version);
|
const hugoURL = get_url_1.default(osName, extended, version);
|
||||||
core.debug(`hugoURL: ${hugoURL}`);
|
core.debug(`hugoURL: ${hugoURL}`);
|
||||||
const hugoPath = `${process.env.HOME}/bin`;
|
let baseLocation;
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
baseLocation = process.env['USERPROFILE'] || 'C:\\';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
baseLocation = `${process.env.HOME}`;
|
||||||
|
}
|
||||||
|
const hugoPath = path.join(baseLocation, 'hugobin');
|
||||||
yield io.mkdirP(hugoPath);
|
yield io.mkdirP(hugoPath);
|
||||||
core.addPath(hugoPath);
|
core.addPath(hugoPath);
|
||||||
|
yield io.mkdirP(tempDir);
|
||||||
const hugoAssets = yield tc.downloadTool(hugoURL);
|
const hugoAssets = yield tc.downloadTool(hugoURL);
|
||||||
let hugoBin = '';
|
let hugoBin = '';
|
||||||
if (osName === 'Windows') {
|
if (osName === 'Windows') {
|
||||||
const hugoExtractedFolder = yield tc.extractZip(hugoAssets, '/tmp');
|
const hugoExtractedFolder = yield tc.extractZip(hugoAssets, tempDir);
|
||||||
hugoBin = `${hugoExtractedFolder}/hugo.exe`;
|
hugoBin = `${hugoExtractedFolder}/hugo.exe`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const hugoExtractedFolder = yield tc.extractTar(hugoAssets, '/tmp');
|
const hugoExtractedFolder = yield tc.extractTar(hugoAssets, tempDir);
|
||||||
hugoBin = `${hugoExtractedFolder}/hugo`;
|
hugoBin = `${hugoExtractedFolder}/hugo`;
|
||||||
}
|
}
|
||||||
yield io.mv(hugoBin, hugoPath);
|
yield io.mv(hugoBin, hugoPath);
|
||||||
|
|||||||
366
package-lock.json
generated
366
package-lock.json
generated
@@ -10,9 +10,12 @@
|
|||||||
"integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw=="
|
"integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw=="
|
||||||
},
|
},
|
||||||
"@actions/exec": {
|
"@actions/exec": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.2.tgz",
|
||||||
"integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ=="
|
"integrity": "sha512-Yo/wfcFuxbVjAaAfvx3aGLhMEuonOahas2jf8BwyA52IkXTAmLi7YVZTpGAQG/lTxuGoNLg9slTWQD4rr7rMDQ==",
|
||||||
|
"requires": {
|
||||||
|
"@actions/io": "^1.0.1"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@actions/io": {
|
"@actions/io": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@@ -566,9 +569,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "12.12.8",
|
"version": "12.12.17",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz",
|
||||||
"integrity": "sha512-XLla8N+iyfjvsa0KKV+BP/iGSoTmwxsu5Ci5sM33z9TjohF72DEz95iNvD6pPmemvbQgxAv/909G73gUn8QR7w==",
|
"integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/normalize-package-data": {
|
"@types/normalize-package-data": {
|
||||||
@@ -599,36 +602,37 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/experimental-utils": {
|
"@typescript-eslint/experimental-utils": {
|
||||||
"version": "2.7.0",
|
"version": "2.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz",
|
||||||
"integrity": "sha512-9/L/OJh2a5G2ltgBWJpHRfGnt61AgDeH6rsdg59BH0naQseSwR7abwHq3D5/op0KYD/zFT4LS5gGvWcMmegTEg==",
|
"integrity": "sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json-schema": "^7.0.3",
|
"@types/json-schema": "^7.0.3",
|
||||||
"@typescript-eslint/typescript-estree": "2.7.0",
|
"@typescript-eslint/typescript-estree": "2.11.0",
|
||||||
"eslint-scope": "^5.0.0"
|
"eslint-scope": "^5.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "2.7.0",
|
"version": "2.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.11.0.tgz",
|
||||||
"integrity": "sha512-ctC0g0ZvYclxMh/xI+tyqP0EC2fAo6KicN9Wm2EIao+8OppLfxji7KAGJosQHSGBj3TcqUrA96AjgXuKa5ob2g==",
|
"integrity": "sha512-DyGXeqhb3moMioEFZIHIp7oXBBh7dEfPTzGrlyP0Mi9ScCra4SWEGs3kPd18mG7Sy9Wy8z88zmrw5tSGL6r/6A==",
|
||||||
"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.7.0",
|
"@typescript-eslint/experimental-utils": "2.11.0",
|
||||||
"@typescript-eslint/typescript-estree": "2.7.0",
|
"@typescript-eslint/typescript-estree": "2.11.0",
|
||||||
"eslint-visitor-keys": "^1.1.0"
|
"eslint-visitor-keys": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "2.7.0",
|
"version": "2.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz",
|
||||||
"integrity": "sha512-vVCE/DY72N4RiJ/2f10PTyYekX2OLaltuSIBqeHYI44GQ940VCYioInIb8jKMrK9u855OEJdFC+HmWAZTnC+Ag==",
|
"integrity": "sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
"glob": "^7.1.4",
|
"eslint-visitor-keys": "^1.1.0",
|
||||||
|
"glob": "^7.1.6",
|
||||||
"is-glob": "^4.0.1",
|
"is-glob": "^4.0.1",
|
||||||
"lodash.unescape": "4.0.1",
|
"lodash.unescape": "4.0.1",
|
||||||
"semver": "^6.3.0",
|
"semver": "^6.3.0",
|
||||||
@@ -644,6 +648,20 @@
|
|||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||||
|
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@@ -1192,12 +1210,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"cli-cursor": {
|
"cli-cursor": {
|
||||||
"version": "2.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
||||||
"integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
|
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"restore-cursor": "^2.0.0"
|
"restore-cursor": "^3.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cli-truncate": {
|
"cli-truncate": {
|
||||||
@@ -1704,9 +1722,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint": {
|
"eslint": {
|
||||||
"version": "6.6.0",
|
"version": "6.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz",
|
||||||
"integrity": "sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g==",
|
"integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.0.0",
|
"@babel/code-frame": "^7.0.0",
|
||||||
@@ -1724,7 +1742,7 @@
|
|||||||
"file-entry-cache": "^5.0.1",
|
"file-entry-cache": "^5.0.1",
|
||||||
"functional-red-black-tree": "^1.0.1",
|
"functional-red-black-tree": "^1.0.1",
|
||||||
"glob-parent": "^5.0.0",
|
"glob-parent": "^5.0.0",
|
||||||
"globals": "^11.7.0",
|
"globals": "^12.1.0",
|
||||||
"ignore": "^4.0.6",
|
"ignore": "^4.0.6",
|
||||||
"import-fresh": "^3.0.0",
|
"import-fresh": "^3.0.0",
|
||||||
"imurmurhash": "^0.1.4",
|
"imurmurhash": "^0.1.4",
|
||||||
@@ -1737,7 +1755,7 @@
|
|||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
"optionator": "^0.8.2",
|
"optionator": "^0.8.3",
|
||||||
"progress": "^2.0.0",
|
"progress": "^2.0.0",
|
||||||
"regexpp": "^2.0.1",
|
"regexpp": "^2.0.1",
|
||||||
"semver": "^6.1.2",
|
"semver": "^6.1.2",
|
||||||
@@ -1757,17 +1775,46 @@
|
|||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"globals": {
|
||||||
|
"version": "12.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz",
|
||||||
|
"integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"type-fest": "^0.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"optionator": {
|
||||||
|
"version": "0.8.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||||
|
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"deep-is": "~0.1.3",
|
||||||
|
"fast-levenshtein": "~2.0.6",
|
||||||
|
"levn": "~0.3.0",
|
||||||
|
"prelude-ls": "~1.1.2",
|
||||||
|
"type-check": "~0.3.2",
|
||||||
|
"word-wrap": "~1.2.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "6.3.0",
|
"version": "6.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
|
},
|
||||||
|
"type-fest": {
|
||||||
|
"version": "0.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
||||||
|
"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2131,13 +2178,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"figures": {
|
"figures": {
|
||||||
"version": "1.7.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz",
|
||||||
"integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
|
"integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"escape-string-regexp": "^1.0.5",
|
"escape-string-regexp": "^1.0.5"
|
||||||
"object-assign": "^4.1.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file-entry-cache": {
|
"file-entry-cache": {
|
||||||
@@ -2921,9 +2967,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"handlebars": {
|
"handlebars": {
|
||||||
"version": "4.3.1",
|
"version": "4.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz",
|
||||||
"integrity": "sha512-c0HoNHzDiHpBt4Kqe99N8tdLPKAnGCQ73gYMPWtAYM4PwGnf7xl8PBUHJqh9ijlzt2uQKaSRxbXRt+rZ7M2/kA==",
|
"integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"neo-async": "^2.6.0",
|
"neo-async": "^2.6.0",
|
||||||
@@ -3045,9 +3091,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"version": "3.0.9",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/husky/-/husky-3.0.9.tgz",
|
"resolved": "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz",
|
||||||
"integrity": "sha512-Yolhupm7le2/MqC1VYLk/cNmYxsSsqKkTyBhzQHhPK1jFnC89mmmNVuGtLNabjDI6Aj8UNIr0KpRNuBkiC4+sg==",
|
"integrity": "sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
@@ -3154,9 +3200,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"import-fresh": {
|
"import-fresh": {
|
||||||
"version": "3.1.0",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
|
||||||
"integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==",
|
"integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"parent-module": "^1.0.0",
|
"parent-module": "^1.0.0",
|
||||||
@@ -3231,22 +3277,19 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-escapes": {
|
"ansi-escapes": {
|
||||||
"version": "4.2.1",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz",
|
||||||
"integrity": "sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q==",
|
"integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"type-fest": "^0.5.2"
|
"type-fest": "^0.8.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cli-cursor": {
|
"ansi-regex": {
|
||||||
"version": "3.1.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||||
"integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
|
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"requires": {
|
|
||||||
"restore-cursor": "^3.1.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"emoji-regex": {
|
"emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
@@ -3254,61 +3297,38 @@
|
|||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"figures": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"escape-string-regexp": "^1.0.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mimic-fn": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"onetime": {
|
|
||||||
"version": "5.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
|
|
||||||
"integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"mimic-fn": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"restore-cursor": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"onetime": "^5.1.0",
|
|
||||||
"signal-exit": "^3.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "4.1.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
|
||||||
"integrity": "sha512-NrX+1dVVh+6Y9dnQ19pR0pP4FiEIlUvdTGn8pw6CKTNq5sgib2nIhmUNT5TAmhWmvKr3WcxBcP3E8nWezuipuQ==",
|
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"emoji-regex": "^8.0.0",
|
"emoji-regex": "^8.0.0",
|
||||||
"is-fullwidth-code-point": "^3.0.0",
|
"is-fullwidth-code-point": "^3.0.0",
|
||||||
"strip-ansi": "^5.2.0"
|
"strip-ansi": "^6.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^5.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type-fest": {
|
"type-fest": {
|
||||||
"version": "0.5.2",
|
"version": "0.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
|
||||||
"integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==",
|
"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4289,9 +4309,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"version": "9.4.3",
|
"version": "9.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.5.0.tgz",
|
||||||
"integrity": "sha512-PejnI+rwOAmKAIO+5UuAZU9gxdej/ovSEOAY34yMfC3OS4Ac82vCBPzAWLReR9zCPOMqeVwQRaZ3bUBpAsaL2Q==",
|
"integrity": "sha512-nawMob9cb/G1J98nb8v3VC/E8rcX1rryUYXVZ69aT9kde6YWX+uvNOEHY5yf2gcWcTJGiD0kqXmCnS3oD75GIA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
@@ -4424,9 +4444,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"path-key": {
|
"path-key": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
"integrity": "sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==",
|
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"shebang-command": {
|
"shebang-command": {
|
||||||
@@ -4454,9 +4474,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"which": {
|
"which": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||||
"integrity": "sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==",
|
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"isexe": "^2.0.0"
|
"isexe": "^2.0.0"
|
||||||
@@ -4536,6 +4556,16 @@
|
|||||||
"supports-color": "^2.0.0"
|
"supports-color": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"figures": {
|
||||||
|
"version": "1.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
|
||||||
|
"integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"object-assign": "^4.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"indent-string": {
|
"indent-string": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
|
||||||
@@ -4580,6 +4610,15 @@
|
|||||||
"figures": "^2.0.0"
|
"figures": "^2.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"cli-cursor": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"restore-cursor": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"figures": {
|
"figures": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
|
||||||
@@ -4588,6 +4627,31 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"escape-string-regexp": "^1.0.5"
|
"escape-string-regexp": "^1.0.5"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"mimic-fn": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"onetime": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"mimic-fn": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"restore-cursor": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"onetime": "^2.0.0",
|
||||||
|
"signal-exit": "^3.0.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4663,6 +4727,40 @@
|
|||||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"cli-cursor": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"restore-cursor": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mimic-fn": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"onetime": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"mimic-fn": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"restore-cursor": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"onetime": "^2.0.0",
|
||||||
|
"signal-exit": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||||
@@ -5556,30 +5654,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"restore-cursor": {
|
"restore-cursor": {
|
||||||
"version": "2.0.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
|
||||||
"integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
|
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"onetime": "^2.0.0",
|
"onetime": "^5.1.0",
|
||||||
"signal-exit": "^3.0.2"
|
"signal-exit": "^3.0.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"mimic-fn": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"onetime": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
|
|
||||||
"integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"mimic-fn": "^1.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ret": {
|
"ret": {
|
||||||
@@ -6279,9 +6360,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"version": "24.1.0",
|
"version": "24.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.2.0.tgz",
|
||||||
"integrity": "sha512-HEGfrIEAZKfu1pkaxB9au17b1d9b56YZSqz5eCVE8mX68+5reOvlM93xGOzzCREIov9mdH7JBG+s0UyNAqr0tQ==",
|
"integrity": "sha512-Yc+HLyldlIC9iIK8xEN7tV960Or56N49MDP7hubCZUeI7EbIOTsas6rXCMB4kQjLACJ7eDOF4xWEO5qumpKsag==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs-logger": "0.x",
|
"bs-logger": "0.x",
|
||||||
@@ -6373,20 +6454,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.7.2",
|
"version": "3.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz",
|
||||||
"integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==",
|
"integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"uglify-js": {
|
"uglify-js": {
|
||||||
"version": "3.6.0",
|
"version": "3.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz",
|
||||||
"integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
|
"integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"commander": "~2.20.0",
|
"commander": "~2.20.3",
|
||||||
"source-map": "~0.6.1"
|
"source-map": "~0.6.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"underscore": {
|
"underscore": {
|
||||||
@@ -6574,6 +6664,12 @@
|
|||||||
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
|
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"word-wrap": {
|
||||||
|
"version": "1.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||||
|
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"wordwrap": {
|
"wordwrap": {
|
||||||
"version": "0.0.3",
|
"version": "0.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
||||||
|
|||||||
16
package.json
16
package.json
@@ -47,23 +47,23 @@
|
|||||||
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.0",
|
"@actions/core": "^1.2.0",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.2",
|
||||||
"@actions/io": "^1.0.1",
|
"@actions/io": "^1.0.1",
|
||||||
"@actions/tool-cache": "^1.1.2",
|
"@actions/tool-cache": "^1.1.2",
|
||||||
"xmlhttprequest": "^1.8.0"
|
"xmlhttprequest": "^1.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^24.0.23",
|
"@types/jest": "^24.0.23",
|
||||||
"@types/node": "^12.12.8",
|
"@types/node": "^12.12.17",
|
||||||
"@typescript-eslint/parser": "^2.7.0",
|
"@typescript-eslint/parser": "^2.11.0",
|
||||||
"@zeit/ncc": "^0.20.5",
|
"@zeit/ncc": "^0.20.5",
|
||||||
"eslint": "^6.6.0",
|
"eslint": "^6.7.2",
|
||||||
"husky": "^3.0.9",
|
"husky": "^3.1.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^24.9.0",
|
||||||
"jest-circus": "^24.9.0",
|
"jest-circus": "^24.9.0",
|
||||||
"lint-staged": "^9.4.3",
|
"lint-staged": "^9.5.0",
|
||||||
"prettier": "1.19.1",
|
"prettier": "1.19.1",
|
||||||
"ts-jest": "^24.1.0",
|
"ts-jest": "^24.2.0",
|
||||||
"typescript": "^3.7.2"
|
"typescript": "^3.7.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ export default function getOS(platform: string) {
|
|||||||
return 'macOS';
|
return 'macOS';
|
||||||
} else if (platform === 'win32') {
|
} else if (platform === 'win32') {
|
||||||
return 'Windows';
|
return 'Windows';
|
||||||
// throw new Error("Windows is not supported");
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`${platform} is not supported`);
|
throw new Error(`${platform} is not supported`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import installer from './installer';
|
|||||||
|
|
||||||
// most @actions toolkit packages have async methods
|
// most @actions toolkit packages have async methods
|
||||||
async function run() {
|
async function run() {
|
||||||
const dump = async () => {
|
const showVersion = async () => {
|
||||||
// Show version
|
|
||||||
await exec.exec('hugo version');
|
await exec.exec('hugo version');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ async function run() {
|
|||||||
async function(latestVersion): Promise<void> {
|
async function(latestVersion): Promise<void> {
|
||||||
console.log(`Hugo version: ${latestVersion} (${hugoVersion})`);
|
console.log(`Hugo version: ${latestVersion} (${hugoVersion})`);
|
||||||
await installer(latestVersion);
|
await installer(latestVersion);
|
||||||
await dump();
|
await showVersion();
|
||||||
},
|
},
|
||||||
function(error) {
|
function(error) {
|
||||||
core.setFailed(error);
|
core.setFailed(error);
|
||||||
@@ -27,7 +26,7 @@ async function run() {
|
|||||||
} else {
|
} else {
|
||||||
console.log(`Hugo version: ${hugoVersion}`);
|
console.log(`Hugo version: ${hugoVersion}`);
|
||||||
await installer(hugoVersion);
|
await installer(hugoVersion);
|
||||||
await dump();
|
await showVersion();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|||||||
@@ -3,6 +3,18 @@ import * as tc from '@actions/tool-cache';
|
|||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
import getOS from './get-os';
|
import getOS from './get-os';
|
||||||
import getURL from './get-url';
|
import getURL from './get-url';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
|
let tempDir: string = process.env['RUNNER_TEMPDIRECTORY'] || '';
|
||||||
|
if (!tempDir) {
|
||||||
|
let baseTempLocation: string;
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
baseTempLocation = process.env['USERPROFILE'] || 'C:\\';
|
||||||
|
} else {
|
||||||
|
baseTempLocation = `${process.env.HOME}`;
|
||||||
|
}
|
||||||
|
tempDir = path.join(baseTempLocation, 'tmp');
|
||||||
|
}
|
||||||
|
|
||||||
export default async function installer(version: string) {
|
export default async function installer(version: string) {
|
||||||
try {
|
try {
|
||||||
@@ -15,23 +27,30 @@ export default async function installer(version: string) {
|
|||||||
const hugoURL: string = getURL(osName, extended, version);
|
const hugoURL: string = getURL(osName, extended, version);
|
||||||
core.debug(`hugoURL: ${hugoURL}`);
|
core.debug(`hugoURL: ${hugoURL}`);
|
||||||
|
|
||||||
const hugoPath: string = `${process.env.HOME}/bin`;
|
let baseLocation: string;
|
||||||
|
if (process.platform === 'win32') {
|
||||||
|
baseLocation = process.env['USERPROFILE'] || 'C:\\';
|
||||||
|
} else {
|
||||||
|
baseLocation = `${process.env.HOME}`;
|
||||||
|
}
|
||||||
|
const hugoPath: string = path.join(baseLocation, 'hugobin');
|
||||||
await io.mkdirP(hugoPath);
|
await io.mkdirP(hugoPath);
|
||||||
core.addPath(hugoPath);
|
core.addPath(hugoPath);
|
||||||
|
|
||||||
// Download and extract Hugo binary
|
// Download and extract Hugo binary
|
||||||
|
await io.mkdirP(tempDir);
|
||||||
const hugoAssets: string = await tc.downloadTool(hugoURL);
|
const hugoAssets: string = await tc.downloadTool(hugoURL);
|
||||||
let hugoBin: string = '';
|
let hugoBin: string = '';
|
||||||
if (osName === 'Windows') {
|
if (osName === 'Windows') {
|
||||||
const hugoExtractedFolder: string = await tc.extractZip(
|
const hugoExtractedFolder: string = await tc.extractZip(
|
||||||
hugoAssets,
|
hugoAssets,
|
||||||
'/tmp'
|
tempDir
|
||||||
);
|
);
|
||||||
hugoBin = `${hugoExtractedFolder}/hugo.exe`;
|
hugoBin = `${hugoExtractedFolder}/hugo.exe`;
|
||||||
} else {
|
} else {
|
||||||
const hugoExtractedFolder: string = await tc.extractTar(
|
const hugoExtractedFolder: string = await tc.extractTar(
|
||||||
hugoAssets,
|
hugoAssets,
|
||||||
'/tmp'
|
tempDir
|
||||||
);
|
);
|
||||||
hugoBin = `${hugoExtractedFolder}/hugo`;
|
hugoBin = `${hugoExtractedFolder}/hugo`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user