mirror of
https://github.com/docker/login-action.git
synced 2026-03-31 16:50:48 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f054a8b539 | ||
|
|
0644d98afe | ||
|
|
9e433e18cf | ||
|
|
39efbd2c12 | ||
|
|
4608add020 | ||
|
|
4fd5d8ead6 | ||
|
|
e2346b6971 | ||
|
|
2051808c83 | ||
|
|
7c220e1b8d | ||
|
|
f4cae19820 | ||
|
|
e5ad366574 | ||
|
|
45bc0ebd6b | ||
|
|
79068f5240 | ||
|
|
8e670da7a1 | ||
|
|
76901a9025 | ||
|
|
31f1bb4610 | ||
|
|
28eb30dcb6 | ||
|
|
03b00fbeba | ||
|
|
5934fe3407 | ||
|
|
3cba154eb7 | ||
|
|
986a54f35b | ||
|
|
fdb725ed4b | ||
|
|
bab7dcbf29 | ||
|
|
c0d23108f7 | ||
|
|
c902ecc709 | ||
|
|
b612a76a31 |
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -4,8 +4,6 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "06:00"
|
|
||||||
timezone: "Europe/Paris"
|
|
||||||
labels:
|
labels:
|
||||||
- ":game_die: dependencies"
|
- ":game_die: dependencies"
|
||||||
- ":robot: bot"
|
- ":robot: bot"
|
||||||
@@ -13,8 +11,6 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "06:00"
|
|
||||||
timezone: "Europe/Paris"
|
|
||||||
allow:
|
allow:
|
||||||
- dependency-type: "production"
|
- dependency-type: "production"
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@@ -28,6 +28,27 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
logout:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
logout:
|
||||||
|
- false
|
||||||
|
- true
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Login to GitHub Container Registry
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
logout: ${{ matrix.logout }}
|
||||||
|
|
||||||
dind:
|
dind:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
@@ -143,20 +164,6 @@ jobs:
|
|||||||
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
|
||||||
github-package:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Login to GitHub Package Registry
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
registry: docker.pkg.github.com
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
github-container:
|
github-container:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
29
README.md
29
README.md
@@ -14,7 +14,6 @@ ___
|
|||||||
|
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
* [Docker Hub](#docker-hub)
|
* [Docker Hub](#docker-hub)
|
||||||
* [GitHub Packages Docker Registry](#github-packages-docker-registry)
|
|
||||||
* [GitHub Container Registry](#github-container-registry)
|
* [GitHub Container Registry](#github-container-registry)
|
||||||
* [GitLab](#gitlab)
|
* [GitLab](#gitlab)
|
||||||
* [Azure Container Registry (ACR)](#azure-container-registry-acr)
|
* [Azure Container Registry (ACR)](#azure-container-registry-acr)
|
||||||
@@ -54,34 +53,6 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### GitHub Packages Docker Registry
|
|
||||||
|
|
||||||
> :warning: GitHub Packages Docker Registry (aka `docker.pkg.github.com`) **is deprecated** and will sunset early next
|
|
||||||
> year. It's strongly advised to [migrate to GitHub Container Registry](https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images)
|
|
||||||
> instead.
|
|
||||||
|
|
||||||
You can configure the Docker client to use [GitHub Packages to publish and retrieve docker images](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages).
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
login:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Login to GitHub Packages Docker Registry
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: docker.pkg.github.com
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
```
|
|
||||||
|
|
||||||
### GitHub Container Registry
|
### GitHub Container Registry
|
||||||
|
|
||||||
To use the [GitHub Container Registry](https://docs.github.com/en/packages/getting-started-with-github-container-registry),
|
To use the [GitHub Container Registry](https://docs.github.com/en/packages/getting-started-with-github-container-registry),
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {getInputs} from '../src/context';
|
|||||||
test('with password and username getInputs does not throw error', async () => {
|
test('with password and username getInputs does not throw error', async () => {
|
||||||
process.env['INPUT_USERNAME'] = 'dbowie';
|
process.env['INPUT_USERNAME'] = 'dbowie';
|
||||||
process.env['INPUT_PASSWORD'] = 'groundcontrol';
|
process.env['INPUT_PASSWORD'] = 'groundcontrol';
|
||||||
|
process.env['INPUT_LOGOUT'] = 'true';
|
||||||
expect(() => {
|
expect(() => {
|
||||||
getInputs();
|
getInputs();
|
||||||
}).not.toThrowError();
|
}).not.toThrowError();
|
||||||
|
|||||||
@@ -7,9 +7,14 @@ import * as exec from '@actions/exec';
|
|||||||
process.env['RUNNER_TEMP'] = path.join(__dirname, 'runner');
|
process.env['RUNNER_TEMP'] = path.join(__dirname, 'runner');
|
||||||
|
|
||||||
test('loginStandard calls exec', async () => {
|
test('loginStandard calls exec', async () => {
|
||||||
const execSpy: jest.SpyInstance = jest.spyOn(exec, 'exec');
|
const execSpy: jest.SpyInstance = jest.spyOn(exec, 'getExecOutput');
|
||||||
// don't let exec try to actually run the commands
|
execSpy.mockImplementation(() =>
|
||||||
execSpy.mockImplementation(() => {});
|
Promise.resolve({
|
||||||
|
exitCode: expect.any(Number),
|
||||||
|
stdout: expect.any(Function),
|
||||||
|
stderr: expect.any(Function)
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const username: string = 'dbowie';
|
const username: string = 'dbowie';
|
||||||
const password: string = 'groundcontrol';
|
const password: string = 'groundcontrol';
|
||||||
@@ -20,30 +25,25 @@ test('loginStandard calls exec', async () => {
|
|||||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['login', '--password-stdin', '--username', username, registry], {
|
expect(execSpy).toHaveBeenCalledWith(`docker`, ['login', '--password-stdin', '--username', username, registry], {
|
||||||
input: Buffer.from(password),
|
input: Buffer.from(password),
|
||||||
silent: true,
|
silent: true,
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true
|
||||||
listeners: expect.objectContaining({
|
|
||||||
stdout: expect.any(Function),
|
|
||||||
stderr: expect.any(Function)
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('logout calls exec', async () => {
|
test('logout calls exec', async () => {
|
||||||
const execSpy: jest.SpyInstance = jest.spyOn(exec, 'exec');
|
const execSpy: jest.SpyInstance = jest.spyOn(exec, 'getExecOutput');
|
||||||
// don't let exec try to actually run the commands
|
execSpy.mockImplementation(() =>
|
||||||
execSpy.mockImplementation(() => {});
|
Promise.resolve({
|
||||||
|
exitCode: expect.any(Number),
|
||||||
|
stdout: expect.any(Function),
|
||||||
|
stderr: expect.any(Function)
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const registry: string = 'https://ghcr.io';
|
const registry: string = 'https://ghcr.io';
|
||||||
|
|
||||||
await logout(registry);
|
await logout(registry);
|
||||||
|
|
||||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['logout', registry], {
|
expect(execSpy).toHaveBeenCalledWith(`docker`, ['logout', registry], {
|
||||||
silent: false,
|
ignoreReturnCode: true
|
||||||
ignoreReturnCode: true,
|
|
||||||
input: Buffer.from(''),
|
|
||||||
listeners: expect.objectContaining({
|
|
||||||
stdout: expect.any(Function),
|
|
||||||
stderr: expect.any(Function)
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ test('errors without username and password', async () => {
|
|||||||
const platSpy = jest.spyOn(osm, 'platform');
|
const platSpy = jest.spyOn(osm, 'platform');
|
||||||
platSpy.mockImplementation(() => 'linux');
|
platSpy.mockImplementation(() => 'linux');
|
||||||
|
|
||||||
|
process.env['INPUT_LOGOUT'] = 'true'; // default value
|
||||||
|
|
||||||
const coreSpy: jest.SpyInstance = jest.spyOn(core, 'setFailed');
|
const coreSpy: jest.SpyInstance = jest.spyOn(core, 'setFailed');
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
@@ -32,10 +34,13 @@ test('successful with username and password', async () => {
|
|||||||
const password: string = 'groundcontrol';
|
const password: string = 'groundcontrol';
|
||||||
process.env[`INPUT_PASSWORD`] = password;
|
process.env[`INPUT_PASSWORD`] = password;
|
||||||
|
|
||||||
|
const logout: boolean = false;
|
||||||
|
process.env['INPUT_LOGOUT'] = String(logout);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
|
|
||||||
expect(setRegistrySpy).toHaveBeenCalledWith('');
|
expect(setRegistrySpy).toHaveBeenCalledWith('');
|
||||||
expect(setLogoutSpy).toHaveBeenCalledWith('');
|
expect(setLogoutSpy).toHaveBeenCalledWith(logout);
|
||||||
expect(dockerSpy).toHaveBeenCalledWith('', username, password);
|
expect(dockerSpy).toHaveBeenCalledWith('', username, password);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -57,8 +62,8 @@ test('calls docker login', async () => {
|
|||||||
const registry: string = 'ghcr.io';
|
const registry: string = 'ghcr.io';
|
||||||
process.env[`INPUT_REGISTRY`] = registry;
|
process.env[`INPUT_REGISTRY`] = registry;
|
||||||
|
|
||||||
const logout: string = 'true';
|
const logout: boolean = true;
|
||||||
process.env['INPUT_LOGOUT'] = logout;
|
process.env['INPUT_LOGOUT'] = String(logout);
|
||||||
|
|
||||||
await run();
|
await run();
|
||||||
|
|
||||||
|
|||||||
1600
dist/index.js
generated
vendored
1600
dist/index.js
generated
vendored
@@ -49,6 +49,13 @@ module.exports =
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ({
|
/******/ ({
|
||||||
|
|
||||||
|
/***/ 4:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("child_process");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 8:
|
/***/ 8:
|
||||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
@@ -117,15 +124,12 @@ const debug = __webpack_require__(427)
|
|||||||
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(293)
|
const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(293)
|
||||||
const { re, t } = __webpack_require__(523)
|
const { re, t } = __webpack_require__(523)
|
||||||
|
|
||||||
|
const parseOptions = __webpack_require__(785)
|
||||||
const { compareIdentifiers } = __webpack_require__(463)
|
const { compareIdentifiers } = __webpack_require__(463)
|
||||||
class SemVer {
|
class SemVer {
|
||||||
constructor (version, options) {
|
constructor (version, options) {
|
||||||
if (!options || typeof options !== 'object') {
|
options = parseOptions(options)
|
||||||
options = {
|
|
||||||
loose: !!options,
|
|
||||||
includePrerelease: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (version instanceof SemVer) {
|
if (version instanceof SemVer) {
|
||||||
if (version.loose === !!options.loose &&
|
if (version.loose === !!options.loose &&
|
||||||
version.includePrerelease === !!options.includePrerelease) {
|
version.includePrerelease === !!options.includePrerelease) {
|
||||||
@@ -405,6 +409,22 @@ class SemVer {
|
|||||||
module.exports = SemVer
|
module.exports = SemVer
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 91:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function (Yallist) {
|
||||||
|
Yallist.prototype[Symbol.iterator] = function* () {
|
||||||
|
for (let walker = this.head; walker; walker = walker.next) {
|
||||||
|
yield walker.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 98:
|
/***/ 98:
|
||||||
@@ -544,9 +564,344 @@ module.exports = gt
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 129:
|
/***/ 129:
|
||||||
/***/ (function(module) {
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
// A linked list to keep track of recently-used-ness
|
||||||
|
const Yallist = __webpack_require__(665)
|
||||||
|
|
||||||
|
const MAX = Symbol('max')
|
||||||
|
const LENGTH = Symbol('length')
|
||||||
|
const LENGTH_CALCULATOR = Symbol('lengthCalculator')
|
||||||
|
const ALLOW_STALE = Symbol('allowStale')
|
||||||
|
const MAX_AGE = Symbol('maxAge')
|
||||||
|
const DISPOSE = Symbol('dispose')
|
||||||
|
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
|
||||||
|
const LRU_LIST = Symbol('lruList')
|
||||||
|
const CACHE = Symbol('cache')
|
||||||
|
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
|
||||||
|
|
||||||
|
const naiveLength = () => 1
|
||||||
|
|
||||||
|
// lruList is a yallist where the head is the youngest
|
||||||
|
// item, and the tail is the oldest. the list contains the Hit
|
||||||
|
// objects as the entries.
|
||||||
|
// Each Hit object has a reference to its Yallist.Node. This
|
||||||
|
// never changes.
|
||||||
|
//
|
||||||
|
// cache is a Map (or PseudoMap) that matches the keys to
|
||||||
|
// the Yallist.Node object.
|
||||||
|
class LRUCache {
|
||||||
|
constructor (options) {
|
||||||
|
if (typeof options === 'number')
|
||||||
|
options = { max: options }
|
||||||
|
|
||||||
|
if (!options)
|
||||||
|
options = {}
|
||||||
|
|
||||||
|
if (options.max && (typeof options.max !== 'number' || options.max < 0))
|
||||||
|
throw new TypeError('max must be a non-negative number')
|
||||||
|
// Kind of weird to have a default max of Infinity, but oh well.
|
||||||
|
const max = this[MAX] = options.max || Infinity
|
||||||
|
|
||||||
|
const lc = options.length || naiveLength
|
||||||
|
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
|
||||||
|
this[ALLOW_STALE] = options.stale || false
|
||||||
|
if (options.maxAge && typeof options.maxAge !== 'number')
|
||||||
|
throw new TypeError('maxAge must be a number')
|
||||||
|
this[MAX_AGE] = options.maxAge || 0
|
||||||
|
this[DISPOSE] = options.dispose
|
||||||
|
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
|
||||||
|
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
|
||||||
|
this.reset()
|
||||||
|
}
|
||||||
|
|
||||||
|
// resize the cache when the max changes.
|
||||||
|
set max (mL) {
|
||||||
|
if (typeof mL !== 'number' || mL < 0)
|
||||||
|
throw new TypeError('max must be a non-negative number')
|
||||||
|
|
||||||
|
this[MAX] = mL || Infinity
|
||||||
|
trim(this)
|
||||||
|
}
|
||||||
|
get max () {
|
||||||
|
return this[MAX]
|
||||||
|
}
|
||||||
|
|
||||||
|
set allowStale (allowStale) {
|
||||||
|
this[ALLOW_STALE] = !!allowStale
|
||||||
|
}
|
||||||
|
get allowStale () {
|
||||||
|
return this[ALLOW_STALE]
|
||||||
|
}
|
||||||
|
|
||||||
|
set maxAge (mA) {
|
||||||
|
if (typeof mA !== 'number')
|
||||||
|
throw new TypeError('maxAge must be a non-negative number')
|
||||||
|
|
||||||
|
this[MAX_AGE] = mA
|
||||||
|
trim(this)
|
||||||
|
}
|
||||||
|
get maxAge () {
|
||||||
|
return this[MAX_AGE]
|
||||||
|
}
|
||||||
|
|
||||||
|
// resize the cache when the lengthCalculator changes.
|
||||||
|
set lengthCalculator (lC) {
|
||||||
|
if (typeof lC !== 'function')
|
||||||
|
lC = naiveLength
|
||||||
|
|
||||||
|
if (lC !== this[LENGTH_CALCULATOR]) {
|
||||||
|
this[LENGTH_CALCULATOR] = lC
|
||||||
|
this[LENGTH] = 0
|
||||||
|
this[LRU_LIST].forEach(hit => {
|
||||||
|
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
|
||||||
|
this[LENGTH] += hit.length
|
||||||
|
})
|
||||||
|
}
|
||||||
|
trim(this)
|
||||||
|
}
|
||||||
|
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
|
||||||
|
|
||||||
|
get length () { return this[LENGTH] }
|
||||||
|
get itemCount () { return this[LRU_LIST].length }
|
||||||
|
|
||||||
|
rforEach (fn, thisp) {
|
||||||
|
thisp = thisp || this
|
||||||
|
for (let walker = this[LRU_LIST].tail; walker !== null;) {
|
||||||
|
const prev = walker.prev
|
||||||
|
forEachStep(this, fn, walker, thisp)
|
||||||
|
walker = prev
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
forEach (fn, thisp) {
|
||||||
|
thisp = thisp || this
|
||||||
|
for (let walker = this[LRU_LIST].head; walker !== null;) {
|
||||||
|
const next = walker.next
|
||||||
|
forEachStep(this, fn, walker, thisp)
|
||||||
|
walker = next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
keys () {
|
||||||
|
return this[LRU_LIST].toArray().map(k => k.key)
|
||||||
|
}
|
||||||
|
|
||||||
|
values () {
|
||||||
|
return this[LRU_LIST].toArray().map(k => k.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
reset () {
|
||||||
|
if (this[DISPOSE] &&
|
||||||
|
this[LRU_LIST] &&
|
||||||
|
this[LRU_LIST].length) {
|
||||||
|
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
|
||||||
|
}
|
||||||
|
|
||||||
|
this[CACHE] = new Map() // hash of items by key
|
||||||
|
this[LRU_LIST] = new Yallist() // list of items in order of use recency
|
||||||
|
this[LENGTH] = 0 // length of items in the list
|
||||||
|
}
|
||||||
|
|
||||||
|
dump () {
|
||||||
|
return this[LRU_LIST].map(hit =>
|
||||||
|
isStale(this, hit) ? false : {
|
||||||
|
k: hit.key,
|
||||||
|
v: hit.value,
|
||||||
|
e: hit.now + (hit.maxAge || 0)
|
||||||
|
}).toArray().filter(h => h)
|
||||||
|
}
|
||||||
|
|
||||||
|
dumpLru () {
|
||||||
|
return this[LRU_LIST]
|
||||||
|
}
|
||||||
|
|
||||||
|
set (key, value, maxAge) {
|
||||||
|
maxAge = maxAge || this[MAX_AGE]
|
||||||
|
|
||||||
|
if (maxAge && typeof maxAge !== 'number')
|
||||||
|
throw new TypeError('maxAge must be a number')
|
||||||
|
|
||||||
|
const now = maxAge ? Date.now() : 0
|
||||||
|
const len = this[LENGTH_CALCULATOR](value, key)
|
||||||
|
|
||||||
|
if (this[CACHE].has(key)) {
|
||||||
|
if (len > this[MAX]) {
|
||||||
|
del(this, this[CACHE].get(key))
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const node = this[CACHE].get(key)
|
||||||
|
const item = node.value
|
||||||
|
|
||||||
|
// dispose of the old one before overwriting
|
||||||
|
// split out into 2 ifs for better coverage tracking
|
||||||
|
if (this[DISPOSE]) {
|
||||||
|
if (!this[NO_DISPOSE_ON_SET])
|
||||||
|
this[DISPOSE](key, item.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
item.now = now
|
||||||
|
item.maxAge = maxAge
|
||||||
|
item.value = value
|
||||||
|
this[LENGTH] += len - item.length
|
||||||
|
item.length = len
|
||||||
|
this.get(key)
|
||||||
|
trim(this)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
const hit = new Entry(key, value, len, now, maxAge)
|
||||||
|
|
||||||
|
// oversized objects fall out of cache automatically.
|
||||||
|
if (hit.length > this[MAX]) {
|
||||||
|
if (this[DISPOSE])
|
||||||
|
this[DISPOSE](key, value)
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
this[LENGTH] += hit.length
|
||||||
|
this[LRU_LIST].unshift(hit)
|
||||||
|
this[CACHE].set(key, this[LRU_LIST].head)
|
||||||
|
trim(this)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
has (key) {
|
||||||
|
if (!this[CACHE].has(key)) return false
|
||||||
|
const hit = this[CACHE].get(key).value
|
||||||
|
return !isStale(this, hit)
|
||||||
|
}
|
||||||
|
|
||||||
|
get (key) {
|
||||||
|
return get(this, key, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
peek (key) {
|
||||||
|
return get(this, key, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
pop () {
|
||||||
|
const node = this[LRU_LIST].tail
|
||||||
|
if (!node)
|
||||||
|
return null
|
||||||
|
|
||||||
|
del(this, node)
|
||||||
|
return node.value
|
||||||
|
}
|
||||||
|
|
||||||
|
del (key) {
|
||||||
|
del(this, this[CACHE].get(key))
|
||||||
|
}
|
||||||
|
|
||||||
|
load (arr) {
|
||||||
|
// reset the cache
|
||||||
|
this.reset()
|
||||||
|
|
||||||
|
const now = Date.now()
|
||||||
|
// A previous serialized cache has the most recent items first
|
||||||
|
for (let l = arr.length - 1; l >= 0; l--) {
|
||||||
|
const hit = arr[l]
|
||||||
|
const expiresAt = hit.e || 0
|
||||||
|
if (expiresAt === 0)
|
||||||
|
// the item was created without expiration in a non aged cache
|
||||||
|
this.set(hit.k, hit.v)
|
||||||
|
else {
|
||||||
|
const maxAge = expiresAt - now
|
||||||
|
// dont add already expired items
|
||||||
|
if (maxAge > 0) {
|
||||||
|
this.set(hit.k, hit.v, maxAge)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prune () {
|
||||||
|
this[CACHE].forEach((value, key) => get(this, key, false))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const get = (self, key, doUse) => {
|
||||||
|
const node = self[CACHE].get(key)
|
||||||
|
if (node) {
|
||||||
|
const hit = node.value
|
||||||
|
if (isStale(self, hit)) {
|
||||||
|
del(self, node)
|
||||||
|
if (!self[ALLOW_STALE])
|
||||||
|
return undefined
|
||||||
|
} else {
|
||||||
|
if (doUse) {
|
||||||
|
if (self[UPDATE_AGE_ON_GET])
|
||||||
|
node.value.now = Date.now()
|
||||||
|
self[LRU_LIST].unshiftNode(node)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hit.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const isStale = (self, hit) => {
|
||||||
|
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
|
||||||
|
return false
|
||||||
|
|
||||||
|
const diff = Date.now() - hit.now
|
||||||
|
return hit.maxAge ? diff > hit.maxAge
|
||||||
|
: self[MAX_AGE] && (diff > self[MAX_AGE])
|
||||||
|
}
|
||||||
|
|
||||||
|
const trim = self => {
|
||||||
|
if (self[LENGTH] > self[MAX]) {
|
||||||
|
for (let walker = self[LRU_LIST].tail;
|
||||||
|
self[LENGTH] > self[MAX] && walker !== null;) {
|
||||||
|
// We know that we're about to delete this one, and also
|
||||||
|
// what the next least recently used key will be, so just
|
||||||
|
// go ahead and set it now.
|
||||||
|
const prev = walker.prev
|
||||||
|
del(self, walker)
|
||||||
|
walker = prev
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const del = (self, node) => {
|
||||||
|
if (node) {
|
||||||
|
const hit = node.value
|
||||||
|
if (self[DISPOSE])
|
||||||
|
self[DISPOSE](hit.key, hit.value)
|
||||||
|
|
||||||
|
self[LENGTH] -= hit.length
|
||||||
|
self[CACHE].delete(hit.key)
|
||||||
|
self[LRU_LIST].removeNode(node)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Entry {
|
||||||
|
constructor (key, value, length, now, maxAge) {
|
||||||
|
this.key = key
|
||||||
|
this.value = value
|
||||||
|
this.length = length
|
||||||
|
this.now = now
|
||||||
|
this.maxAge = maxAge || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const forEachStep = (self, fn, node, thisp) => {
|
||||||
|
let hit = node.value
|
||||||
|
if (isStale(self, hit)) {
|
||||||
|
del(self, node)
|
||||||
|
if (!self[ALLOW_STALE])
|
||||||
|
hit = undefined
|
||||||
|
}
|
||||||
|
if (hit)
|
||||||
|
fn.call(thisp, hit.value, hit.key, self)
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = LRUCache
|
||||||
|
|
||||||
module.exports = require("child_process");
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@@ -569,6 +924,25 @@ module.exports = compareBuild
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@@ -578,20 +952,15 @@ 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 });
|
||||||
|
exports.argStringToArray = exports.ToolRunner = void 0;
|
||||||
const os = __importStar(__webpack_require__(87));
|
const os = __importStar(__webpack_require__(87));
|
||||||
const events = __importStar(__webpack_require__(614));
|
const events = __importStar(__webpack_require__(614));
|
||||||
const child = __importStar(__webpack_require__(129));
|
const child = __importStar(__webpack_require__(4));
|
||||||
const path = __importStar(__webpack_require__(622));
|
const path = __importStar(__webpack_require__(622));
|
||||||
const io = __importStar(__webpack_require__(436));
|
const io = __importStar(__webpack_require__(436));
|
||||||
const ioUtil = __importStar(__webpack_require__(962));
|
const ioUtil = __importStar(__webpack_require__(962));
|
||||||
|
const timers_1 = __webpack_require__(213);
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
/*
|
/*
|
||||||
@@ -661,11 +1030,12 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
s = s.substring(n + os.EOL.length);
|
s = s.substring(n + os.EOL.length);
|
||||||
n = s.indexOf(os.EOL);
|
n = s.indexOf(os.EOL);
|
||||||
}
|
}
|
||||||
strBuffer = s;
|
return s;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
// streaming lines to console is best effort. Don't fail a build.
|
// streaming lines to console is best effort. Don't fail a build.
|
||||||
this._debug(`error processing line. Failed with error ${err}`);
|
this._debug(`error processing line. Failed with error ${err}`);
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_getSpawnFileName() {
|
_getSpawnFileName() {
|
||||||
@@ -947,7 +1317,7 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
// if the tool is only a file name, then resolve it from the PATH
|
// if the tool is only a file name, then resolve it from the PATH
|
||||||
// otherwise verify it exists (add extension on Windows if necessary)
|
// otherwise verify it exists (add extension on Windows if necessary)
|
||||||
this.toolPath = yield io.which(this.toolPath, true);
|
this.toolPath = yield io.which(this.toolPath, true);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||||
this._debug(`exec tool: ${this.toolPath}`);
|
this._debug(`exec tool: ${this.toolPath}`);
|
||||||
this._debug('arguments:');
|
this._debug('arguments:');
|
||||||
for (const arg of this.args) {
|
for (const arg of this.args) {
|
||||||
@@ -961,9 +1331,12 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
state.on('debug', (message) => {
|
state.on('debug', (message) => {
|
||||||
this._debug(message);
|
this._debug(message);
|
||||||
});
|
});
|
||||||
|
if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
|
||||||
|
return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
|
||||||
|
}
|
||||||
const fileName = this._getSpawnFileName();
|
const fileName = this._getSpawnFileName();
|
||||||
const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
|
const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
|
||||||
const stdbuffer = '';
|
let stdbuffer = '';
|
||||||
if (cp.stdout) {
|
if (cp.stdout) {
|
||||||
cp.stdout.on('data', (data) => {
|
cp.stdout.on('data', (data) => {
|
||||||
if (this.options.listeners && this.options.listeners.stdout) {
|
if (this.options.listeners && this.options.listeners.stdout) {
|
||||||
@@ -972,14 +1345,14 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
if (!optionsNonNull.silent && optionsNonNull.outStream) {
|
if (!optionsNonNull.silent && optionsNonNull.outStream) {
|
||||||
optionsNonNull.outStream.write(data);
|
optionsNonNull.outStream.write(data);
|
||||||
}
|
}
|
||||||
this._processLineBuffer(data, stdbuffer, (line) => {
|
stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
|
||||||
if (this.options.listeners && this.options.listeners.stdline) {
|
if (this.options.listeners && this.options.listeners.stdline) {
|
||||||
this.options.listeners.stdline(line);
|
this.options.listeners.stdline(line);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const errbuffer = '';
|
let errbuffer = '';
|
||||||
if (cp.stderr) {
|
if (cp.stderr) {
|
||||||
cp.stderr.on('data', (data) => {
|
cp.stderr.on('data', (data) => {
|
||||||
state.processStderr = true;
|
state.processStderr = true;
|
||||||
@@ -994,7 +1367,7 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
: optionsNonNull.outStream;
|
: optionsNonNull.outStream;
|
||||||
s.write(data);
|
s.write(data);
|
||||||
}
|
}
|
||||||
this._processLineBuffer(data, errbuffer, (line) => {
|
errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
|
||||||
if (this.options.listeners && this.options.listeners.errline) {
|
if (this.options.listeners && this.options.listeners.errline) {
|
||||||
this.options.listeners.errline(line);
|
this.options.listeners.errline(line);
|
||||||
}
|
}
|
||||||
@@ -1041,7 +1414,7 @@ class ToolRunner extends events.EventEmitter {
|
|||||||
}
|
}
|
||||||
cp.stdin.end(this.options.input);
|
cp.stdin.end(this.options.input);
|
||||||
}
|
}
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1127,7 +1500,7 @@ class ExecState extends events.EventEmitter {
|
|||||||
this._setResult();
|
this._setResult();
|
||||||
}
|
}
|
||||||
else if (this.processExited) {
|
else if (this.processExited) {
|
||||||
this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);
|
this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_debug(message) {
|
_debug(message) {
|
||||||
@@ -1195,6 +1568,7 @@ const minVersion = (range, loose) => {
|
|||||||
for (let i = 0; i < range.set.length; ++i) {
|
for (let i = 0; i < range.set.length; ++i) {
|
||||||
const comparators = range.set[i]
|
const comparators = range.set[i]
|
||||||
|
|
||||||
|
let setMin = null
|
||||||
comparators.forEach((comparator) => {
|
comparators.forEach((comparator) => {
|
||||||
// Clone to avoid manipulating the comparator's semver object.
|
// Clone to avoid manipulating the comparator's semver object.
|
||||||
const compver = new SemVer(comparator.semver.version)
|
const compver = new SemVer(comparator.semver.version)
|
||||||
@@ -1209,8 +1583,8 @@ const minVersion = (range, loose) => {
|
|||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case '':
|
case '':
|
||||||
case '>=':
|
case '>=':
|
||||||
if (!minver || gt(minver, compver)) {
|
if (!setMin || gt(compver, setMin)) {
|
||||||
minver = compver
|
setMin = compver
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case '<':
|
case '<':
|
||||||
@@ -1222,6 +1596,8 @@ const minVersion = (range, loose) => {
|
|||||||
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if (setMin && (!minver || gt(minver, setMin)))
|
||||||
|
minver = setMin
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minver && range.test(minver)) {
|
if (minver && range.test(minver)) {
|
||||||
@@ -1240,6 +1616,25 @@ module.exports = minVersion
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@@ -1249,14 +1644,8 @@ 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 });
|
||||||
|
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||||
const command_1 = __webpack_require__(351);
|
const command_1 = __webpack_require__(351);
|
||||||
const file_command_1 = __webpack_require__(717);
|
const file_command_1 = __webpack_require__(717);
|
||||||
const utils_1 = __webpack_require__(278);
|
const utils_1 = __webpack_require__(278);
|
||||||
@@ -1323,7 +1712,9 @@ function addPath(inputPath) {
|
|||||||
}
|
}
|
||||||
exports.addPath = addPath;
|
exports.addPath = addPath;
|
||||||
/**
|
/**
|
||||||
* Gets the value of an input. The value is also trimmed.
|
* Gets the value of an input.
|
||||||
|
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
|
||||||
|
* Returns an empty string if the value is not defined.
|
||||||
*
|
*
|
||||||
* @param name name of the input to get
|
* @param name name of the input to get
|
||||||
* @param options optional. See InputOptions.
|
* @param options optional. See InputOptions.
|
||||||
@@ -1334,9 +1725,49 @@ function getInput(name, options) {
|
|||||||
if (options && options.required && !val) {
|
if (options && options.required && !val) {
|
||||||
throw new Error(`Input required and not supplied: ${name}`);
|
throw new Error(`Input required and not supplied: ${name}`);
|
||||||
}
|
}
|
||||||
|
if (options && options.trimWhitespace === false) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
return val.trim();
|
return val.trim();
|
||||||
}
|
}
|
||||||
exports.getInput = getInput;
|
exports.getInput = getInput;
|
||||||
|
/**
|
||||||
|
* Gets the values of an multiline input. Each value is also trimmed.
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns string[]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function getMultilineInput(name, options) {
|
||||||
|
const inputs = getInput(name, options)
|
||||||
|
.split('\n')
|
||||||
|
.filter(x => x !== '');
|
||||||
|
return inputs;
|
||||||
|
}
|
||||||
|
exports.getMultilineInput = getMultilineInput;
|
||||||
|
/**
|
||||||
|
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
|
||||||
|
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
|
||||||
|
* The return value is also in boolean type.
|
||||||
|
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns boolean
|
||||||
|
*/
|
||||||
|
function getBooleanInput(name, options) {
|
||||||
|
const trueValue = ['true', 'True', 'TRUE'];
|
||||||
|
const falseValue = ['false', 'False', 'FALSE'];
|
||||||
|
const val = getInput(name, options);
|
||||||
|
if (trueValue.includes(val))
|
||||||
|
return true;
|
||||||
|
if (falseValue.includes(val))
|
||||||
|
return false;
|
||||||
|
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
|
||||||
|
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||||
|
}
|
||||||
|
exports.getBooleanInput = getBooleanInput;
|
||||||
/**
|
/**
|
||||||
* Sets the value of an output.
|
* Sets the value of an output.
|
||||||
*
|
*
|
||||||
@@ -1345,6 +1776,7 @@ exports.getInput = getInput;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function setOutput(name, value) {
|
function setOutput(name, value) {
|
||||||
|
process.stdout.write(os.EOL);
|
||||||
command_1.issueCommand('set-output', { name }, value);
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
}
|
}
|
||||||
exports.setOutput = setOutput;
|
exports.setOutput = setOutput;
|
||||||
@@ -1488,6 +1920,13 @@ const lt = (a, b, loose) => compare(a, b, loose) < 0
|
|||||||
module.exports = lt
|
module.exports = lt
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 213:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("timers");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 278:
|
/***/ 278:
|
||||||
@@ -1498,6 +1937,7 @@ module.exports = lt
|
|||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.toCommandValue = void 0;
|
||||||
/**
|
/**
|
||||||
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
* @param input input to sanitize into a string
|
* @param input input to sanitize into a string
|
||||||
@@ -1568,6 +2008,13 @@ const diff = (version1, version2) => {
|
|||||||
module.exports = diff
|
module.exports = diff
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 304:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("string_decoder");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 309:
|
/***/ 309:
|
||||||
@@ -1598,14 +2045,27 @@ module.exports = ltr
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
result["default"] = mod;
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.issue = exports.issueCommand = void 0;
|
||||||
const os = __importStar(__webpack_require__(87));
|
const os = __importStar(__webpack_require__(87));
|
||||||
const utils_1 = __webpack_require__(278);
|
const utils_1 = __webpack_require__(278);
|
||||||
/**
|
/**
|
||||||
@@ -1799,7 +2259,7 @@ const outside = (version, range, hilo, options) => {
|
|||||||
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it satisifes the range it is not outside
|
// If it satisfies the range it is not outside
|
||||||
if (satisfies(version, range, options)) {
|
if (satisfies(version, range, options)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -1880,6 +2340,25 @@ module.exports = debug
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@@ -1890,11 +2369,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const childProcess = __webpack_require__(129);
|
exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
|
||||||
const path = __webpack_require__(622);
|
const assert_1 = __webpack_require__(357);
|
||||||
|
const childProcess = __importStar(__webpack_require__(4));
|
||||||
|
const path = __importStar(__webpack_require__(622));
|
||||||
const util_1 = __webpack_require__(669);
|
const util_1 = __webpack_require__(669);
|
||||||
const ioUtil = __webpack_require__(962);
|
const ioUtil = __importStar(__webpack_require__(962));
|
||||||
const exec = util_1.promisify(childProcess.exec);
|
const exec = util_1.promisify(childProcess.exec);
|
||||||
|
const execFile = util_1.promisify(childProcess.execFile);
|
||||||
/**
|
/**
|
||||||
* Copies a file or folder.
|
* Copies a file or folder.
|
||||||
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
|
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
|
||||||
@@ -1905,14 +2387,14 @@ const exec = util_1.promisify(childProcess.exec);
|
|||||||
*/
|
*/
|
||||||
function cp(source, dest, options = {}) {
|
function cp(source, dest, options = {}) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { force, recursive } = readCopyOptions(options);
|
const { force, recursive, copySourceDirectory } = readCopyOptions(options);
|
||||||
const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
|
const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
|
||||||
// Dest is an existing file, but not forcing
|
// Dest is an existing file, but not forcing
|
||||||
if (destStat && destStat.isFile() && !force) {
|
if (destStat && destStat.isFile() && !force) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If dest is an existing directory, should copy inside.
|
// If dest is an existing directory, should copy inside.
|
||||||
const newDest = destStat && destStat.isDirectory()
|
const newDest = destStat && destStat.isDirectory() && copySourceDirectory
|
||||||
? path.join(dest, path.basename(source))
|
? path.join(dest, path.basename(source))
|
||||||
: dest;
|
: dest;
|
||||||
if (!(yield ioUtil.exists(source))) {
|
if (!(yield ioUtil.exists(source))) {
|
||||||
@@ -1977,12 +2459,22 @@ function rmRF(inputPath) {
|
|||||||
if (ioUtil.IS_WINDOWS) {
|
if (ioUtil.IS_WINDOWS) {
|
||||||
// Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
|
// Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
|
||||||
// program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
|
// program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
|
||||||
|
// Check for invalid characters
|
||||||
|
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
|
||||||
|
if (/[*"<>|]/.test(inputPath)) {
|
||||||
|
throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
|
const cmdPath = ioUtil.getCmdPath();
|
||||||
if (yield ioUtil.isDirectory(inputPath, true)) {
|
if (yield ioUtil.isDirectory(inputPath, true)) {
|
||||||
yield exec(`rd /s /q "${inputPath}"`);
|
yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
||||||
|
env: { inputPath }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yield exec(`del /f /a "${inputPath}"`);
|
yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
||||||
|
env: { inputPath }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
@@ -2015,7 +2507,7 @@ function rmRF(inputPath) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isDir) {
|
if (isDir) {
|
||||||
yield exec(`rm -rf "${inputPath}"`);
|
yield execFile(`rm`, [`-rf`, `${inputPath}`]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
yield ioUtil.unlink(inputPath);
|
yield ioUtil.unlink(inputPath);
|
||||||
@@ -2033,7 +2525,8 @@ exports.rmRF = rmRF;
|
|||||||
*/
|
*/
|
||||||
function mkdirP(fsPath) {
|
function mkdirP(fsPath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield ioUtil.mkdirP(fsPath);
|
assert_1.ok(fsPath, 'a path argument must be provided');
|
||||||
|
yield ioUtil.mkdir(fsPath, { recursive: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.mkdirP = mkdirP;
|
exports.mkdirP = mkdirP;
|
||||||
@@ -2061,62 +2554,80 @@ function which(tool, check) {
|
|||||||
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
|
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
try {
|
const matches = yield findInPath(tool);
|
||||||
// build the list of extensions to try
|
if (matches && matches.length > 0) {
|
||||||
const extensions = [];
|
return matches[0];
|
||||||
if (ioUtil.IS_WINDOWS && process.env.PATHEXT) {
|
|
||||||
for (const extension of process.env.PATHEXT.split(path.delimiter)) {
|
|
||||||
if (extension) {
|
|
||||||
extensions.push(extension);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// if it's rooted, return it if exists. otherwise return empty.
|
|
||||||
if (ioUtil.isRooted(tool)) {
|
|
||||||
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
|
|
||||||
if (filePath) {
|
|
||||||
return filePath;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
// if any path separators, return empty
|
|
||||||
if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
// build the list of directories
|
|
||||||
//
|
|
||||||
// Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
|
|
||||||
// it feels like we should not do this. Checking the current directory seems like more of a use
|
|
||||||
// case of a shell, and the which() function exposed by the toolkit should strive for consistency
|
|
||||||
// across platforms.
|
|
||||||
const directories = [];
|
|
||||||
if (process.env.PATH) {
|
|
||||||
for (const p of process.env.PATH.split(path.delimiter)) {
|
|
||||||
if (p) {
|
|
||||||
directories.push(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// return the first match
|
|
||||||
for (const directory of directories) {
|
|
||||||
const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions);
|
|
||||||
if (filePath) {
|
|
||||||
return filePath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
throw new Error(`which failed with message ${err.message}`);
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.which = which;
|
exports.which = which;
|
||||||
|
/**
|
||||||
|
* Returns a list of all occurrences of the given tool on the system path.
|
||||||
|
*
|
||||||
|
* @returns Promise<string[]> the paths of the tool
|
||||||
|
*/
|
||||||
|
function findInPath(tool) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (!tool) {
|
||||||
|
throw new Error("parameter 'tool' is required");
|
||||||
|
}
|
||||||
|
// build the list of extensions to try
|
||||||
|
const extensions = [];
|
||||||
|
if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
|
||||||
|
for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
|
||||||
|
if (extension) {
|
||||||
|
extensions.push(extension);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if it's rooted, return it if exists. otherwise return empty.
|
||||||
|
if (ioUtil.isRooted(tool)) {
|
||||||
|
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
|
||||||
|
if (filePath) {
|
||||||
|
return [filePath];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
// if any path separators, return empty
|
||||||
|
if (tool.includes(path.sep)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
// build the list of directories
|
||||||
|
//
|
||||||
|
// Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
|
||||||
|
// it feels like we should not do this. Checking the current directory seems like more of a use
|
||||||
|
// case of a shell, and the which() function exposed by the toolkit should strive for consistency
|
||||||
|
// across platforms.
|
||||||
|
const directories = [];
|
||||||
|
if (process.env.PATH) {
|
||||||
|
for (const p of process.env.PATH.split(path.delimiter)) {
|
||||||
|
if (p) {
|
||||||
|
directories.push(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// find all matches
|
||||||
|
const matches = [];
|
||||||
|
for (const directory of directories) {
|
||||||
|
const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
|
||||||
|
if (filePath) {
|
||||||
|
matches.push(filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return matches;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.findInPath = findInPath;
|
||||||
function readCopyOptions(options) {
|
function readCopyOptions(options) {
|
||||||
const force = options.force == null ? true : options.force;
|
const force = options.force == null ? true : options.force;
|
||||||
const recursive = Boolean(options.recursive);
|
const recursive = Boolean(options.recursive);
|
||||||
return { force, recursive };
|
const copySourceDirectory = options.copySourceDirectory == null
|
||||||
|
? true
|
||||||
|
: Boolean(options.copySourceDirectory);
|
||||||
|
return { force, recursive, copySourceDirectory };
|
||||||
}
|
}
|
||||||
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
|
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@@ -2275,6 +2786,25 @@ module.exports = coerce
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@@ -2284,14 +2814,9 @@ 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 });
|
||||||
|
exports.getExecOutput = exports.exec = void 0;
|
||||||
|
const string_decoder_1 = __webpack_require__(304);
|
||||||
const tr = __importStar(__webpack_require__(159));
|
const tr = __importStar(__webpack_require__(159));
|
||||||
/**
|
/**
|
||||||
* Exec a command.
|
* Exec a command.
|
||||||
@@ -2317,6 +2842,51 @@ function exec(commandLine, args, options) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.exec = exec;
|
exports.exec = exec;
|
||||||
|
/**
|
||||||
|
* Exec a command and get the output.
|
||||||
|
* Output will be streamed to the live console.
|
||||||
|
* Returns promise with the exit code and collected stdout and stderr
|
||||||
|
*
|
||||||
|
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
|
||||||
|
* @param args optional arguments for tool. Escaping is handled by the lib.
|
||||||
|
* @param options optional exec options. See ExecOptions
|
||||||
|
* @returns Promise<ExecOutput> exit code, stdout, and stderr
|
||||||
|
*/
|
||||||
|
function getExecOutput(commandLine, args, options) {
|
||||||
|
var _a, _b;
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let stdout = '';
|
||||||
|
let stderr = '';
|
||||||
|
//Using string decoder covers the case where a mult-byte character is split
|
||||||
|
const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
|
||||||
|
const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
|
||||||
|
const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
|
||||||
|
const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
|
||||||
|
const stdErrListener = (data) => {
|
||||||
|
stderr += stderrDecoder.write(data);
|
||||||
|
if (originalStdErrListener) {
|
||||||
|
originalStdErrListener(data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const stdOutListener = (data) => {
|
||||||
|
stdout += stdoutDecoder.write(data);
|
||||||
|
if (originalStdoutListener) {
|
||||||
|
originalStdoutListener(data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
|
||||||
|
const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
|
||||||
|
//flush any remaining characters
|
||||||
|
stdout += stdoutDecoder.end();
|
||||||
|
stderr += stderrDecoder.end();
|
||||||
|
return {
|
||||||
|
exitCode,
|
||||||
|
stdout,
|
||||||
|
stderr
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.getExecOutput = getExecOutput;
|
||||||
//# sourceMappingURL=exec.js.map
|
//# sourceMappingURL=exec.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -2540,12 +3110,7 @@ class Comparator {
|
|||||||
return ANY
|
return ANY
|
||||||
}
|
}
|
||||||
constructor (comp, options) {
|
constructor (comp, options) {
|
||||||
if (!options || typeof options !== 'object') {
|
options = parseOptions(options)
|
||||||
options = {
|
|
||||||
loose: !!options,
|
|
||||||
includePrerelease: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (comp instanceof Comparator) {
|
if (comp instanceof Comparator) {
|
||||||
if (comp.loose === !!options.loose) {
|
if (comp.loose === !!options.loose) {
|
||||||
@@ -2667,6 +3232,7 @@ class Comparator {
|
|||||||
|
|
||||||
module.exports = Comparator
|
module.exports = Comparator
|
||||||
|
|
||||||
|
const parseOptions = __webpack_require__(785)
|
||||||
const {re, t} = __webpack_require__(523)
|
const {re, t} = __webpack_require__(523)
|
||||||
const cmp = __webpack_require__(98)
|
const cmp = __webpack_require__(98)
|
||||||
const debug = __webpack_require__(427)
|
const debug = __webpack_require__(427)
|
||||||
@@ -2829,6 +3395,440 @@ if (!exports.IsPost) {
|
|||||||
}
|
}
|
||||||
//# sourceMappingURL=state-helper.js.map
|
//# sourceMappingURL=state-helper.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 665:
|
||||||
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = Yallist
|
||||||
|
|
||||||
|
Yallist.Node = Node
|
||||||
|
Yallist.create = Yallist
|
||||||
|
|
||||||
|
function Yallist (list) {
|
||||||
|
var self = this
|
||||||
|
if (!(self instanceof Yallist)) {
|
||||||
|
self = new Yallist()
|
||||||
|
}
|
||||||
|
|
||||||
|
self.tail = null
|
||||||
|
self.head = null
|
||||||
|
self.length = 0
|
||||||
|
|
||||||
|
if (list && typeof list.forEach === 'function') {
|
||||||
|
list.forEach(function (item) {
|
||||||
|
self.push(item)
|
||||||
|
})
|
||||||
|
} else if (arguments.length > 0) {
|
||||||
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||||
|
self.push(arguments[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return self
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.removeNode = function (node) {
|
||||||
|
if (node.list !== this) {
|
||||||
|
throw new Error('removing node which does not belong to this list')
|
||||||
|
}
|
||||||
|
|
||||||
|
var next = node.next
|
||||||
|
var prev = node.prev
|
||||||
|
|
||||||
|
if (next) {
|
||||||
|
next.prev = prev
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prev) {
|
||||||
|
prev.next = next
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node === this.head) {
|
||||||
|
this.head = next
|
||||||
|
}
|
||||||
|
if (node === this.tail) {
|
||||||
|
this.tail = prev
|
||||||
|
}
|
||||||
|
|
||||||
|
node.list.length--
|
||||||
|
node.next = null
|
||||||
|
node.prev = null
|
||||||
|
node.list = null
|
||||||
|
|
||||||
|
return next
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.unshiftNode = function (node) {
|
||||||
|
if (node === this.head) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.list) {
|
||||||
|
node.list.removeNode(node)
|
||||||
|
}
|
||||||
|
|
||||||
|
var head = this.head
|
||||||
|
node.list = this
|
||||||
|
node.next = head
|
||||||
|
if (head) {
|
||||||
|
head.prev = node
|
||||||
|
}
|
||||||
|
|
||||||
|
this.head = node
|
||||||
|
if (!this.tail) {
|
||||||
|
this.tail = node
|
||||||
|
}
|
||||||
|
this.length++
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.pushNode = function (node) {
|
||||||
|
if (node === this.tail) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.list) {
|
||||||
|
node.list.removeNode(node)
|
||||||
|
}
|
||||||
|
|
||||||
|
var tail = this.tail
|
||||||
|
node.list = this
|
||||||
|
node.prev = tail
|
||||||
|
if (tail) {
|
||||||
|
tail.next = node
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tail = node
|
||||||
|
if (!this.head) {
|
||||||
|
this.head = node
|
||||||
|
}
|
||||||
|
this.length++
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.push = function () {
|
||||||
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||||
|
push(this, arguments[i])
|
||||||
|
}
|
||||||
|
return this.length
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.unshift = function () {
|
||||||
|
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||||
|
unshift(this, arguments[i])
|
||||||
|
}
|
||||||
|
return this.length
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.pop = function () {
|
||||||
|
if (!this.tail) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
var res = this.tail.value
|
||||||
|
this.tail = this.tail.prev
|
||||||
|
if (this.tail) {
|
||||||
|
this.tail.next = null
|
||||||
|
} else {
|
||||||
|
this.head = null
|
||||||
|
}
|
||||||
|
this.length--
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.shift = function () {
|
||||||
|
if (!this.head) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
var res = this.head.value
|
||||||
|
this.head = this.head.next
|
||||||
|
if (this.head) {
|
||||||
|
this.head.prev = null
|
||||||
|
} else {
|
||||||
|
this.tail = null
|
||||||
|
}
|
||||||
|
this.length--
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.forEach = function (fn, thisp) {
|
||||||
|
thisp = thisp || this
|
||||||
|
for (var walker = this.head, i = 0; walker !== null; i++) {
|
||||||
|
fn.call(thisp, walker.value, i, this)
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.forEachReverse = function (fn, thisp) {
|
||||||
|
thisp = thisp || this
|
||||||
|
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
|
||||||
|
fn.call(thisp, walker.value, i, this)
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.get = function (n) {
|
||||||
|
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
|
||||||
|
// abort out of the list early if we hit a cycle
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
if (i === n && walker !== null) {
|
||||||
|
return walker.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.getReverse = function (n) {
|
||||||
|
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
|
||||||
|
// abort out of the list early if we hit a cycle
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
if (i === n && walker !== null) {
|
||||||
|
return walker.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.map = function (fn, thisp) {
|
||||||
|
thisp = thisp || this
|
||||||
|
var res = new Yallist()
|
||||||
|
for (var walker = this.head; walker !== null;) {
|
||||||
|
res.push(fn.call(thisp, walker.value, this))
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.mapReverse = function (fn, thisp) {
|
||||||
|
thisp = thisp || this
|
||||||
|
var res = new Yallist()
|
||||||
|
for (var walker = this.tail; walker !== null;) {
|
||||||
|
res.push(fn.call(thisp, walker.value, this))
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.reduce = function (fn, initial) {
|
||||||
|
var acc
|
||||||
|
var walker = this.head
|
||||||
|
if (arguments.length > 1) {
|
||||||
|
acc = initial
|
||||||
|
} else if (this.head) {
|
||||||
|
walker = this.head.next
|
||||||
|
acc = this.head.value
|
||||||
|
} else {
|
||||||
|
throw new TypeError('Reduce of empty list with no initial value')
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; walker !== null; i++) {
|
||||||
|
acc = fn(acc, walker.value, i)
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.reduceReverse = function (fn, initial) {
|
||||||
|
var acc
|
||||||
|
var walker = this.tail
|
||||||
|
if (arguments.length > 1) {
|
||||||
|
acc = initial
|
||||||
|
} else if (this.tail) {
|
||||||
|
walker = this.tail.prev
|
||||||
|
acc = this.tail.value
|
||||||
|
} else {
|
||||||
|
throw new TypeError('Reduce of empty list with no initial value')
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = this.length - 1; walker !== null; i--) {
|
||||||
|
acc = fn(acc, walker.value, i)
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.toArray = function () {
|
||||||
|
var arr = new Array(this.length)
|
||||||
|
for (var i = 0, walker = this.head; walker !== null; i++) {
|
||||||
|
arr[i] = walker.value
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.toArrayReverse = function () {
|
||||||
|
var arr = new Array(this.length)
|
||||||
|
for (var i = 0, walker = this.tail; walker !== null; i++) {
|
||||||
|
arr[i] = walker.value
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.slice = function (from, to) {
|
||||||
|
to = to || this.length
|
||||||
|
if (to < 0) {
|
||||||
|
to += this.length
|
||||||
|
}
|
||||||
|
from = from || 0
|
||||||
|
if (from < 0) {
|
||||||
|
from += this.length
|
||||||
|
}
|
||||||
|
var ret = new Yallist()
|
||||||
|
if (to < from || to < 0) {
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
if (from < 0) {
|
||||||
|
from = 0
|
||||||
|
}
|
||||||
|
if (to > this.length) {
|
||||||
|
to = this.length
|
||||||
|
}
|
||||||
|
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
for (; walker !== null && i < to; i++, walker = walker.next) {
|
||||||
|
ret.push(walker.value)
|
||||||
|
}
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.sliceReverse = function (from, to) {
|
||||||
|
to = to || this.length
|
||||||
|
if (to < 0) {
|
||||||
|
to += this.length
|
||||||
|
}
|
||||||
|
from = from || 0
|
||||||
|
if (from < 0) {
|
||||||
|
from += this.length
|
||||||
|
}
|
||||||
|
var ret = new Yallist()
|
||||||
|
if (to < from || to < 0) {
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
if (from < 0) {
|
||||||
|
from = 0
|
||||||
|
}
|
||||||
|
if (to > this.length) {
|
||||||
|
to = this.length
|
||||||
|
}
|
||||||
|
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
for (; walker !== null && i > from; i--, walker = walker.prev) {
|
||||||
|
ret.push(walker.value)
|
||||||
|
}
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
|
||||||
|
if (start > this.length) {
|
||||||
|
start = this.length - 1
|
||||||
|
}
|
||||||
|
if (start < 0) {
|
||||||
|
start = this.length + start;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
|
||||||
|
walker = walker.next
|
||||||
|
}
|
||||||
|
|
||||||
|
var ret = []
|
||||||
|
for (var i = 0; walker && i < deleteCount; i++) {
|
||||||
|
ret.push(walker.value)
|
||||||
|
walker = this.removeNode(walker)
|
||||||
|
}
|
||||||
|
if (walker === null) {
|
||||||
|
walker = this.tail
|
||||||
|
}
|
||||||
|
|
||||||
|
if (walker !== this.head && walker !== this.tail) {
|
||||||
|
walker = walker.prev
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < nodes.length; i++) {
|
||||||
|
walker = insert(this, walker, nodes[i])
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
Yallist.prototype.reverse = function () {
|
||||||
|
var head = this.head
|
||||||
|
var tail = this.tail
|
||||||
|
for (var walker = head; walker !== null; walker = walker.prev) {
|
||||||
|
var p = walker.prev
|
||||||
|
walker.prev = walker.next
|
||||||
|
walker.next = p
|
||||||
|
}
|
||||||
|
this.head = tail
|
||||||
|
this.tail = head
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
function insert (self, node, value) {
|
||||||
|
var inserted = node === self.head ?
|
||||||
|
new Node(value, null, node, self) :
|
||||||
|
new Node(value, node, node.next, self)
|
||||||
|
|
||||||
|
if (inserted.next === null) {
|
||||||
|
self.tail = inserted
|
||||||
|
}
|
||||||
|
if (inserted.prev === null) {
|
||||||
|
self.head = inserted
|
||||||
|
}
|
||||||
|
|
||||||
|
self.length++
|
||||||
|
|
||||||
|
return inserted
|
||||||
|
}
|
||||||
|
|
||||||
|
function push (self, item) {
|
||||||
|
self.tail = new Node(item, self.tail, null, self)
|
||||||
|
if (!self.head) {
|
||||||
|
self.head = self.tail
|
||||||
|
}
|
||||||
|
self.length++
|
||||||
|
}
|
||||||
|
|
||||||
|
function unshift (self, item) {
|
||||||
|
self.head = new Node(item, null, self.head, self)
|
||||||
|
if (!self.tail) {
|
||||||
|
self.tail = self.head
|
||||||
|
}
|
||||||
|
self.length++
|
||||||
|
}
|
||||||
|
|
||||||
|
function Node (value, prev, next, list) {
|
||||||
|
if (!(this instanceof Node)) {
|
||||||
|
return new Node(value, prev, next, list)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.list = list
|
||||||
|
this.value = value
|
||||||
|
|
||||||
|
if (prev) {
|
||||||
|
prev.next = this
|
||||||
|
this.prev = prev
|
||||||
|
} else {
|
||||||
|
this.prev = null
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next) {
|
||||||
|
next.prev = this
|
||||||
|
this.next = next
|
||||||
|
} else {
|
||||||
|
this.next = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// add if support for Symbol.iterator is present
|
||||||
|
__webpack_require__(91)(Yallist)
|
||||||
|
} catch (er) {}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 669:
|
/***/ 669:
|
||||||
@@ -2879,14 +3879,27 @@ module.exports = toComparators
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// For internal use, subject to change.
|
// For internal use, subject to change.
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
result["default"] = mod;
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.issueCommand = void 0;
|
||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
const fs = __importStar(__webpack_require__(747));
|
const fs = __importStar(__webpack_require__(747));
|
||||||
@@ -2934,69 +3947,6 @@ module.exports = require("fs");
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 757:
|
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.exec = void 0;
|
|
||||||
const actionsExec = __importStar(__webpack_require__(514));
|
|
||||||
exports.exec = (command, args = [], silent, stdin) => __awaiter(void 0, void 0, void 0, function* () {
|
|
||||||
let stdout = '';
|
|
||||||
let stderr = '';
|
|
||||||
const options = {
|
|
||||||
silent: silent,
|
|
||||||
ignoreReturnCode: true,
|
|
||||||
input: Buffer.from(stdin || '')
|
|
||||||
};
|
|
||||||
options.listeners = {
|
|
||||||
stdout: (data) => {
|
|
||||||
stdout += data.toString();
|
|
||||||
},
|
|
||||||
stderr: (data) => {
|
|
||||||
stderr += data.toString();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const returnCode = yield actionsExec.exec(command, args, options);
|
|
||||||
return {
|
|
||||||
success: returnCode === 0,
|
|
||||||
stdout: stdout.trim(),
|
|
||||||
stderr: stderr.trim()
|
|
||||||
};
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=exec.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 758:
|
/***/ 758:
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
@@ -3032,9 +3982,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.loginECR = exports.loginStandard = exports.logout = exports.login = void 0;
|
exports.loginECR = exports.loginStandard = exports.logout = exports.login = void 0;
|
||||||
const core = __importStar(__webpack_require__(186));
|
|
||||||
const aws = __importStar(__webpack_require__(981));
|
const aws = __importStar(__webpack_require__(981));
|
||||||
const execm = __importStar(__webpack_require__(757));
|
const core = __importStar(__webpack_require__(186));
|
||||||
|
const exec = __importStar(__webpack_require__(514));
|
||||||
function login(registry, username, password) {
|
function login(registry, username, password) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (yield aws.isECR(registry)) {
|
if (yield aws.isECR(registry)) {
|
||||||
@@ -3048,9 +3998,13 @@ function login(registry, username, password) {
|
|||||||
exports.login = login;
|
exports.login = login;
|
||||||
function logout(registry) {
|
function logout(registry) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield execm.exec('docker', ['logout', registry], false).then(res => {
|
yield exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput('docker', ['logout', registry], {
|
||||||
core.warning(res.stderr);
|
ignoreReturnCode: true
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
core.warning(res.stderr.trim());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -3070,9 +4024,15 @@ function loginStandard(registry, username, password) {
|
|||||||
else {
|
else {
|
||||||
core.info(`Logging into Docker Hub...`);
|
core.info(`Logging into Docker Hub...`);
|
||||||
}
|
}
|
||||||
yield execm.exec('docker', loginArgs, true, password).then(res => {
|
yield exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput('docker', loginArgs, {
|
||||||
throw new Error(res.stderr);
|
ignoreReturnCode: true,
|
||||||
|
silent: true,
|
||||||
|
input: Buffer.from(password)
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
}
|
}
|
||||||
core.info(`Login Succeeded!`);
|
core.info(`Login Succeeded!`);
|
||||||
});
|
});
|
||||||
@@ -3097,9 +4057,14 @@ function loginECR(registry, username, password) {
|
|||||||
const loginCmds = yield aws.getDockerLoginCmds(cliVersion, registry, region, accountIDs);
|
const loginCmds = yield aws.getDockerLoginCmds(cliVersion, registry, region, accountIDs);
|
||||||
core.info(`Logging into ${registry}...`);
|
core.info(`Logging into ${registry}...`);
|
||||||
loginCmds.forEach((loginCmd, index) => {
|
loginCmds.forEach((loginCmd, index) => {
|
||||||
execm.exec(loginCmd, [], true).then(res => {
|
exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput(loginCmd, [], {
|
||||||
throw new Error(res.stderr);
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
}
|
}
|
||||||
if (loginCmds.length > 1) {
|
if (loginCmds.length > 1) {
|
||||||
core.info(`Login Succeeded! (${index}/${loginCmds.length})`);
|
core.info(`Login Succeeded! (${index}/${loginCmds.length})`);
|
||||||
@@ -3114,6 +4079,24 @@ function loginECR(registry, username, password) {
|
|||||||
exports.loginECR = loginECR;
|
exports.loginECR = loginECR;
|
||||||
//# sourceMappingURL=docker.js.map
|
//# sourceMappingURL=docker.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 785:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
// parse out just the options we care about so we always get a consistent
|
||||||
|
// obj with keys in a consistent order.
|
||||||
|
const opts = ['includePrerelease', 'loose', 'rtl']
|
||||||
|
const parseOptions = options =>
|
||||||
|
!options ? {}
|
||||||
|
: typeof options !== 'object' ? { loose: true }
|
||||||
|
: opts.filter(k => options[k]).reduce((options, k) => {
|
||||||
|
options[k] = true
|
||||||
|
return options
|
||||||
|
}, {})
|
||||||
|
module.exports = parseOptions
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 804:
|
/***/ 804:
|
||||||
@@ -3132,12 +4115,7 @@ module.exports = compareLoose
|
|||||||
// hoisted class for cyclic dependency
|
// hoisted class for cyclic dependency
|
||||||
class Range {
|
class Range {
|
||||||
constructor (range, options) {
|
constructor (range, options) {
|
||||||
if (!options || typeof options !== 'object') {
|
options = parseOptions(options)
|
||||||
options = {
|
|
||||||
loose: !!options,
|
|
||||||
includePrerelease: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (range instanceof Range) {
|
if (range instanceof Range) {
|
||||||
if (
|
if (
|
||||||
@@ -3177,6 +4155,24 @@ class Range {
|
|||||||
throw new TypeError(`Invalid SemVer Range: ${range}`)
|
throw new TypeError(`Invalid SemVer Range: ${range}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we have any that are not the null set, throw out null sets.
|
||||||
|
if (this.set.length > 1) {
|
||||||
|
// keep the first one, in case they're all null sets
|
||||||
|
const first = this.set[0]
|
||||||
|
this.set = this.set.filter(c => !isNullSet(c[0]))
|
||||||
|
if (this.set.length === 0)
|
||||||
|
this.set = [first]
|
||||||
|
else if (this.set.length > 1) {
|
||||||
|
// if we have any that are *, then the range is just *
|
||||||
|
for (const c of this.set) {
|
||||||
|
if (c.length === 1 && isAny(c[0])) {
|
||||||
|
this.set = [c]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.format()
|
this.format()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3195,8 +4191,17 @@ class Range {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parseRange (range) {
|
parseRange (range) {
|
||||||
const loose = this.options.loose
|
|
||||||
range = range.trim()
|
range = range.trim()
|
||||||
|
|
||||||
|
// memoize range parsing for performance.
|
||||||
|
// this is a very hot path, and fully deterministic.
|
||||||
|
const memoOpts = Object.keys(this.options).join(',')
|
||||||
|
const memoKey = `parseRange:${memoOpts}:${range}`
|
||||||
|
const cached = cache.get(memoKey)
|
||||||
|
if (cached)
|
||||||
|
return cached
|
||||||
|
|
||||||
|
const loose = this.options.loose
|
||||||
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
||||||
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
||||||
range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
|
range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
|
||||||
@@ -3218,15 +4223,33 @@ class Range {
|
|||||||
// ready to be split into comparators.
|
// ready to be split into comparators.
|
||||||
|
|
||||||
const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
||||||
return range
|
const rangeList = range
|
||||||
.split(' ')
|
.split(' ')
|
||||||
.map(comp => parseComparator(comp, this.options))
|
.map(comp => parseComparator(comp, this.options))
|
||||||
.join(' ')
|
.join(' ')
|
||||||
.split(/\s+/)
|
.split(/\s+/)
|
||||||
|
// >=0.0.0 is equivalent to *
|
||||||
.map(comp => replaceGTE0(comp, this.options))
|
.map(comp => replaceGTE0(comp, this.options))
|
||||||
// in loose mode, throw out any that are not valid comparators
|
// in loose mode, throw out any that are not valid comparators
|
||||||
.filter(this.options.loose ? comp => !!comp.match(compRe) : () => true)
|
.filter(this.options.loose ? comp => !!comp.match(compRe) : () => true)
|
||||||
.map(comp => new Comparator(comp, this.options))
|
.map(comp => new Comparator(comp, this.options))
|
||||||
|
|
||||||
|
// if any comparators are the null set, then replace with JUST null set
|
||||||
|
// if more than one comparator, remove any * comparators
|
||||||
|
// also, don't include the same comparator more than once
|
||||||
|
const l = rangeList.length
|
||||||
|
const rangeMap = new Map()
|
||||||
|
for (const comp of rangeList) {
|
||||||
|
if (isNullSet(comp))
|
||||||
|
return [comp]
|
||||||
|
rangeMap.set(comp.value, comp)
|
||||||
|
}
|
||||||
|
if (rangeMap.size > 1 && rangeMap.has(''))
|
||||||
|
rangeMap.delete('')
|
||||||
|
|
||||||
|
const result = [...rangeMap.values()]
|
||||||
|
cache.set(memoKey, result)
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
intersects (range, options) {
|
intersects (range, options) {
|
||||||
@@ -3275,6 +4298,10 @@ class Range {
|
|||||||
}
|
}
|
||||||
module.exports = Range
|
module.exports = Range
|
||||||
|
|
||||||
|
const LRU = __webpack_require__(129)
|
||||||
|
const cache = new LRU({ max: 1000 })
|
||||||
|
|
||||||
|
const parseOptions = __webpack_require__(785)
|
||||||
const Comparator = __webpack_require__(532)
|
const Comparator = __webpack_require__(532)
|
||||||
const debug = __webpack_require__(427)
|
const debug = __webpack_require__(427)
|
||||||
const SemVer = __webpack_require__(88)
|
const SemVer = __webpack_require__(88)
|
||||||
@@ -3286,6 +4313,9 @@ const {
|
|||||||
caretTrimReplace
|
caretTrimReplace
|
||||||
} = __webpack_require__(523)
|
} = __webpack_require__(523)
|
||||||
|
|
||||||
|
const isNullSet = c => c.value === '<0.0.0-0'
|
||||||
|
const isAny = c => c.value === ''
|
||||||
|
|
||||||
// take a set of comparators and determine whether there
|
// take a set of comparators and determine whether there
|
||||||
// exists a version which can satisfy it
|
// exists a version which can satisfy it
|
||||||
const isSatisfiable = (comparators, options) => {
|
const isSatisfiable = (comparators, options) => {
|
||||||
@@ -3659,7 +4689,7 @@ function getInputs() {
|
|||||||
registry: core.getInput('registry'),
|
registry: core.getInput('registry'),
|
||||||
username: core.getInput('username'),
|
username: core.getInput('username'),
|
||||||
password: core.getInput('password'),
|
password: core.getInput('password'),
|
||||||
logout: core.getInput('logout')
|
logout: core.getBooleanInput('logout')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
exports.getInputs = getInputs;
|
exports.getInputs = getInputs;
|
||||||
@@ -3684,37 +4714,51 @@ module.exports = clean
|
|||||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
const Range = __webpack_require__(828)
|
const Range = __webpack_require__(828)
|
||||||
const { ANY } = __webpack_require__(532)
|
const Comparator = __webpack_require__(532)
|
||||||
|
const { ANY } = Comparator
|
||||||
const satisfies = __webpack_require__(55)
|
const satisfies = __webpack_require__(55)
|
||||||
const compare = __webpack_require__(309)
|
const compare = __webpack_require__(309)
|
||||||
|
|
||||||
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
||||||
// - Every simple range `r1, r2, ...` is a subset of some `R1, R2, ...`
|
// - Every simple range `r1, r2, ...` is a null set, OR
|
||||||
|
// - Every simple range `r1, r2, ...` which is not a null set is a subset of
|
||||||
|
// some `R1, R2, ...`
|
||||||
//
|
//
|
||||||
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
||||||
// - If c is only the ANY comparator
|
// - If c is only the ANY comparator
|
||||||
// - If C is only the ANY comparator, return true
|
// - If C is only the ANY comparator, return true
|
||||||
// - Else return false
|
// - Else if in prerelease mode, return false
|
||||||
|
// - else replace c with `[>=0.0.0]`
|
||||||
|
// - If C is only the ANY comparator
|
||||||
|
// - if in prerelease mode, return true
|
||||||
|
// - else replace C with `[>=0.0.0]`
|
||||||
// - Let EQ be the set of = comparators in c
|
// - Let EQ be the set of = comparators in c
|
||||||
// - If EQ is more than one, return true (null set)
|
// - If EQ is more than one, return true (null set)
|
||||||
// - Let GT be the highest > or >= comparator in c
|
// - Let GT be the highest > or >= comparator in c
|
||||||
// - Let LT be the lowest < or <= comparator in c
|
// - Let LT be the lowest < or <= comparator in c
|
||||||
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
||||||
|
// - If any C is a = range, and GT or LT are set, return false
|
||||||
// - If EQ
|
// - If EQ
|
||||||
// - If GT, and EQ does not satisfy GT, return true (null set)
|
// - If GT, and EQ does not satisfy GT, return true (null set)
|
||||||
// - If LT, and EQ does not satisfy LT, return true (null set)
|
// - If LT, and EQ does not satisfy LT, return true (null set)
|
||||||
// - If EQ satisfies every C, return true
|
// - If EQ satisfies every C, return true
|
||||||
// - Else return false
|
// - Else return false
|
||||||
// - If GT
|
// - If GT
|
||||||
// - If GT is lower than any > or >= comp in C, return false
|
// - If GT.semver is lower than any > or >= comp in C, return false
|
||||||
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
||||||
|
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||||
|
// - If no C has a prerelease and the GT.semver tuple, return false
|
||||||
// - If LT
|
// - If LT
|
||||||
// - If LT.semver is greater than that of any > comp in C, return false
|
// - If LT.semver is greater than any < or <= comp in C, return false
|
||||||
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
||||||
// - If any C is a = range, and GT or LT are set, return false
|
// - If GT.semver has a prerelease, and not in prerelease mode
|
||||||
|
// - If no C has a prerelease and the LT.semver tuple, return false
|
||||||
// - Else return true
|
// - Else return true
|
||||||
|
|
||||||
const subset = (sub, dom, options) => {
|
const subset = (sub, dom, options = {}) => {
|
||||||
|
if (sub === dom)
|
||||||
|
return true
|
||||||
|
|
||||||
sub = new Range(sub, options)
|
sub = new Range(sub, options)
|
||||||
dom = new Range(dom, options)
|
dom = new Range(dom, options)
|
||||||
let sawNonNull = false
|
let sawNonNull = false
|
||||||
@@ -3737,8 +4781,24 @@ const subset = (sub, dom, options) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const simpleSubset = (sub, dom, options) => {
|
const simpleSubset = (sub, dom, options) => {
|
||||||
if (sub.length === 1 && sub[0].semver === ANY)
|
if (sub === dom)
|
||||||
return dom.length === 1 && dom[0].semver === ANY
|
return true
|
||||||
|
|
||||||
|
if (sub.length === 1 && sub[0].semver === ANY) {
|
||||||
|
if (dom.length === 1 && dom[0].semver === ANY)
|
||||||
|
return true
|
||||||
|
else if (options.includePrerelease)
|
||||||
|
sub = [ new Comparator('>=0.0.0-0') ]
|
||||||
|
else
|
||||||
|
sub = [ new Comparator('>=0.0.0') ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dom.length === 1 && dom[0].semver === ANY) {
|
||||||
|
if (options.includePrerelease)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
dom = [ new Comparator('>=0.0.0') ]
|
||||||
|
}
|
||||||
|
|
||||||
const eqSet = new Set()
|
const eqSet = new Set()
|
||||||
let gt, lt
|
let gt, lt
|
||||||
@@ -3775,26 +4835,57 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (!satisfies(eq, String(c), options))
|
if (!satisfies(eq, String(c), options))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
let higher, lower
|
let higher, lower
|
||||||
let hasDomLT, hasDomGT
|
let hasDomLT, hasDomGT
|
||||||
|
// if the subset has a prerelease, we need a comparator in the superset
|
||||||
|
// with the same tuple and a prerelease, or it's not a subset
|
||||||
|
let needDomLTPre = lt &&
|
||||||
|
!options.includePrerelease &&
|
||||||
|
lt.semver.prerelease.length ? lt.semver : false
|
||||||
|
let needDomGTPre = gt &&
|
||||||
|
!options.includePrerelease &&
|
||||||
|
gt.semver.prerelease.length ? gt.semver : false
|
||||||
|
// exception: <1.2.3-0 is the same as <1.2.3
|
||||||
|
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
||||||
|
lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
|
||||||
|
needDomLTPre = false
|
||||||
|
}
|
||||||
|
|
||||||
for (const c of dom) {
|
for (const c of dom) {
|
||||||
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
|
||||||
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
|
||||||
if (gt) {
|
if (gt) {
|
||||||
|
if (needDomGTPre) {
|
||||||
|
if (c.semver.prerelease && c.semver.prerelease.length &&
|
||||||
|
c.semver.major === needDomGTPre.major &&
|
||||||
|
c.semver.minor === needDomGTPre.minor &&
|
||||||
|
c.semver.patch === needDomGTPre.patch) {
|
||||||
|
needDomGTPre = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.operator === '>' || c.operator === '>=') {
|
if (c.operator === '>' || c.operator === '>=') {
|
||||||
higher = higherGT(gt, c, options)
|
higher = higherGT(gt, c, options)
|
||||||
if (higher === c)
|
if (higher === c && higher !== gt)
|
||||||
return false
|
return false
|
||||||
} else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options))
|
} else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (lt) {
|
if (lt) {
|
||||||
|
if (needDomLTPre) {
|
||||||
|
if (c.semver.prerelease && c.semver.prerelease.length &&
|
||||||
|
c.semver.major === needDomLTPre.major &&
|
||||||
|
c.semver.minor === needDomLTPre.minor &&
|
||||||
|
c.semver.patch === needDomLTPre.patch) {
|
||||||
|
needDomLTPre = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (c.operator === '<' || c.operator === '<=') {
|
if (c.operator === '<' || c.operator === '<=') {
|
||||||
lower = lowerLT(lt, c, options)
|
lower = lowerLT(lt, c, options)
|
||||||
if (lower === c)
|
if (lower === c && lower !== lt)
|
||||||
return false
|
return false
|
||||||
} else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options))
|
} else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options))
|
||||||
return false
|
return false
|
||||||
@@ -3812,6 +4903,12 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (lt && hasDomGT && !gt && gtltComp !== 0)
|
if (lt && hasDomGT && !gt && gtltComp !== 0)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
// we needed a prerelease range in a specific tuple, but didn't get one
|
||||||
|
// then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
|
||||||
|
// because it includes prereleases in the 1.2.3 tuple
|
||||||
|
if (needDomGTPre || needDomLTPre)
|
||||||
|
return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3891,13 +4988,9 @@ const {MAX_LENGTH} = __webpack_require__(293)
|
|||||||
const { re, t } = __webpack_require__(523)
|
const { re, t } = __webpack_require__(523)
|
||||||
const SemVer = __webpack_require__(88)
|
const SemVer = __webpack_require__(88)
|
||||||
|
|
||||||
|
const parseOptions = __webpack_require__(785)
|
||||||
const parse = (version, options) => {
|
const parse = (version, options) => {
|
||||||
if (!options || typeof options !== 'object') {
|
options = parseOptions(options)
|
||||||
options = {
|
|
||||||
loose: !!options,
|
|
||||||
includePrerelease: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (version instanceof SemVer) {
|
if (version instanceof SemVer) {
|
||||||
return version
|
return version
|
||||||
@@ -3933,6 +5026,25 @@ module.exports = parse
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@@ -3944,9 +5056,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
var _a;
|
var _a;
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const assert_1 = __webpack_require__(357);
|
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
|
||||||
const fs = __webpack_require__(747);
|
const fs = __importStar(__webpack_require__(747));
|
||||||
const path = __webpack_require__(622);
|
const path = __importStar(__webpack_require__(622));
|
||||||
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
||||||
exports.IS_WINDOWS = process.platform === 'win32';
|
exports.IS_WINDOWS = process.platform === 'win32';
|
||||||
function exists(fsPath) {
|
function exists(fsPath) {
|
||||||
@@ -3987,49 +5099,6 @@ function isRooted(p) {
|
|||||||
return p.startsWith('/');
|
return p.startsWith('/');
|
||||||
}
|
}
|
||||||
exports.isRooted = isRooted;
|
exports.isRooted = isRooted;
|
||||||
/**
|
|
||||||
* Recursively create a directory at `fsPath`.
|
|
||||||
*
|
|
||||||
* This implementation is optimistic, meaning it attempts to create the full
|
|
||||||
* path first, and backs up the path stack from there.
|
|
||||||
*
|
|
||||||
* @param fsPath The path to create
|
|
||||||
* @param maxDepth The maximum recursion depth
|
|
||||||
* @param depth The current recursion depth
|
|
||||||
*/
|
|
||||||
function mkdirP(fsPath, maxDepth = 1000, depth = 1) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
assert_1.ok(fsPath, 'a path argument must be provided');
|
|
||||||
fsPath = path.resolve(fsPath);
|
|
||||||
if (depth >= maxDepth)
|
|
||||||
return exports.mkdir(fsPath);
|
|
||||||
try {
|
|
||||||
yield exports.mkdir(fsPath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
switch (err.code) {
|
|
||||||
case 'ENOENT': {
|
|
||||||
yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);
|
|
||||||
yield exports.mkdir(fsPath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
let stats;
|
|
||||||
try {
|
|
||||||
stats = yield exports.stat(fsPath);
|
|
||||||
}
|
|
||||||
catch (err2) {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
if (!stats.isDirectory())
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.mkdirP = mkdirP;
|
|
||||||
/**
|
/**
|
||||||
* Best effort attempt to determine whether a file exists and is executable.
|
* Best effort attempt to determine whether a file exists and is executable.
|
||||||
* @param filePath file path to check
|
* @param filePath file path to check
|
||||||
@@ -4126,6 +5195,12 @@ function isUnixExecutable(stats) {
|
|||||||
((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
|
((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
|
||||||
((stats.mode & 64) > 0 && stats.uid === process.getuid()));
|
((stats.mode & 64) > 0 && stats.uid === process.getuid()));
|
||||||
}
|
}
|
||||||
|
// Get the path of cmd.exe in windows
|
||||||
|
function getCmdPath() {
|
||||||
|
var _a;
|
||||||
|
return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
|
||||||
|
}
|
||||||
|
exports.getCmdPath = getCmdPath;
|
||||||
//# sourceMappingURL=io-util.js.map
|
//# sourceMappingURL=io-util.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -4166,8 +5241,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.getDockerLoginCmds = exports.parseCLIVersion = exports.getCLIVersion = exports.execCLI = exports.getCLI = exports.getAccountIDs = exports.getRegion = exports.isPubECR = exports.isECR = void 0;
|
exports.getDockerLoginCmds = exports.parseCLIVersion = exports.getCLIVersion = exports.execCLI = exports.getCLI = exports.getAccountIDs = exports.getRegion = exports.isPubECR = exports.isECR = void 0;
|
||||||
const semver = __importStar(__webpack_require__(383));
|
const semver = __importStar(__webpack_require__(383));
|
||||||
|
const exec = __importStar(__webpack_require__(514));
|
||||||
const io = __importStar(__webpack_require__(436));
|
const io = __importStar(__webpack_require__(436));
|
||||||
const execm = __importStar(__webpack_require__(757));
|
|
||||||
const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/;
|
const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/;
|
||||||
exports.isECR = (registry) => {
|
exports.isECR = (registry) => {
|
||||||
return ecrRegistryRegex.test(registry) || exports.isPubECR(registry);
|
return ecrRegistryRegex.test(registry) || exports.isPubECR(registry);
|
||||||
@@ -4203,11 +5278,16 @@ exports.getCLI = () => __awaiter(void 0, void 0, void 0, function* () {
|
|||||||
return io.which('aws', true);
|
return io.which('aws', true);
|
||||||
});
|
});
|
||||||
exports.execCLI = (args) => __awaiter(void 0, void 0, void 0, function* () {
|
exports.execCLI = (args) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
return execm.exec(yield exports.getCLI(), args, true).then(res => {
|
return exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput(yield exports.getCLI(), args, {
|
||||||
throw new Error(res.stderr);
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
}
|
}
|
||||||
else if (res.stderr != '') {
|
else if (res.stderr.length > 0) {
|
||||||
return res.stderr.trim();
|
return res.stderr.trim();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.4.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.1.1",
|
||||||
"semver": "^7.3.2"
|
"semver": "^7.3.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.3",
|
"@types/jest": "^26.0.3",
|
||||||
|
|||||||
25
src/aws.ts
25
src/aws.ts
@@ -1,6 +1,6 @@
|
|||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
|
import * as exec from '@actions/exec';
|
||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
import * as execm from './exec';
|
|
||||||
|
|
||||||
const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/;
|
const ecrRegistryRegex = /^(([0-9]{12})\.dkr\.ecr\.(.+)\.amazonaws\.com(.cn)?)(\/([^:]+)(:.+)?)?$/;
|
||||||
|
|
||||||
@@ -43,15 +43,20 @@ export const getCLI = async (): Promise<string> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const execCLI = async (args: string[]): Promise<string> => {
|
export const execCLI = async (args: string[]): Promise<string> => {
|
||||||
return execm.exec(await getCLI(), args, true).then(res => {
|
return exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput(await getCLI(), args, {
|
||||||
throw new Error(res.stderr);
|
ignoreReturnCode: true,
|
||||||
} else if (res.stderr != '') {
|
silent: true
|
||||||
return res.stderr.trim();
|
})
|
||||||
} else {
|
.then(res => {
|
||||||
return res.stdout.trim();
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
}
|
throw new Error(res.stderr.trim());
|
||||||
});
|
} else if (res.stderr.length > 0) {
|
||||||
|
return res.stderr.trim();
|
||||||
|
} else {
|
||||||
|
return res.stdout.trim();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCLIVersion = async (): Promise<string> => {
|
export const getCLIVersion = async (): Promise<string> => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export interface Inputs {
|
|||||||
registry: string;
|
registry: string;
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
logout: string;
|
logout: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getInputs(): Inputs {
|
export function getInputs(): Inputs {
|
||||||
@@ -12,6 +12,6 @@ export function getInputs(): Inputs {
|
|||||||
registry: core.getInput('registry'),
|
registry: core.getInput('registry'),
|
||||||
username: core.getInput('username'),
|
username: core.getInput('username'),
|
||||||
password: core.getInput('password'),
|
password: core.getInput('password'),
|
||||||
logout: core.getInput('logout')
|
logout: core.getBooleanInput('logout')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as core from '@actions/core';
|
|
||||||
import * as aws from './aws';
|
import * as aws from './aws';
|
||||||
import * as execm from './exec';
|
import * as core from '@actions/core';
|
||||||
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
export async function login(registry: string, username: string, password: string): Promise<void> {
|
export async function login(registry: string, username: string, password: string): Promise<void> {
|
||||||
if (await aws.isECR(registry)) {
|
if (await aws.isECR(registry)) {
|
||||||
@@ -11,11 +11,15 @@ export async function login(registry: string, username: string, password: string
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function logout(registry: string): Promise<void> {
|
export async function logout(registry: string): Promise<void> {
|
||||||
await execm.exec('docker', ['logout', registry], false).then(res => {
|
await exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput('docker', ['logout', registry], {
|
||||||
core.warning(res.stderr);
|
ignoreReturnCode: true
|
||||||
}
|
})
|
||||||
});
|
.then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
core.warning(res.stderr.trim());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loginStandard(registry: string, username: string, password: string): Promise<void> {
|
export async function loginStandard(registry: string, username: string, password: string): Promise<void> {
|
||||||
@@ -32,12 +36,18 @@ export async function loginStandard(registry: string, username: string, password
|
|||||||
} else {
|
} else {
|
||||||
core.info(`Logging into Docker Hub...`);
|
core.info(`Logging into Docker Hub...`);
|
||||||
}
|
}
|
||||||
await execm.exec('docker', loginArgs, true, password).then(res => {
|
await exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput('docker', loginArgs, {
|
||||||
throw new Error(res.stderr);
|
ignoreReturnCode: true,
|
||||||
}
|
silent: true,
|
||||||
core.info(`Login Succeeded!`);
|
input: Buffer.from(password)
|
||||||
});
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
|
}
|
||||||
|
core.info(`Login Succeeded!`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loginECR(registry: string, username: string, password: string): Promise<void> {
|
export async function loginECR(registry: string, username: string, password: string): Promise<void> {
|
||||||
@@ -60,15 +70,20 @@ export async function loginECR(registry: string, username: string, password: str
|
|||||||
|
|
||||||
core.info(`Logging into ${registry}...`);
|
core.info(`Logging into ${registry}...`);
|
||||||
loginCmds.forEach((loginCmd, index) => {
|
loginCmds.forEach((loginCmd, index) => {
|
||||||
execm.exec(loginCmd, [], true).then(res => {
|
exec
|
||||||
if (res.stderr != '' && !res.success) {
|
.getExecOutput(loginCmd, [], {
|
||||||
throw new Error(res.stderr);
|
ignoreReturnCode: true,
|
||||||
}
|
silent: true
|
||||||
if (loginCmds.length > 1) {
|
})
|
||||||
core.info(`Login Succeeded! (${index}/${loginCmds.length})`);
|
.then(res => {
|
||||||
} else {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
core.info('Login Succeeded!');
|
throw new Error(res.stderr.trim());
|
||||||
}
|
}
|
||||||
});
|
if (loginCmds.length > 1) {
|
||||||
|
core.info(`Login Succeeded! (${index}/${loginCmds.length})`);
|
||||||
|
} else {
|
||||||
|
core.info('Login Succeeded!');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
40
src/exec.ts
40
src/exec.ts
@@ -1,40 +0,0 @@
|
|||||||
import * as actionsExec from '@actions/exec';
|
|
||||||
import {ExecOptions} from '@actions/exec';
|
|
||||||
|
|
||||||
export interface ExecResult {
|
|
||||||
success: boolean;
|
|
||||||
stdout: string;
|
|
||||||
stderr: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const exec = async (
|
|
||||||
command: string,
|
|
||||||
args: string[] = [],
|
|
||||||
silent: boolean,
|
|
||||||
stdin?: string
|
|
||||||
): Promise<ExecResult> => {
|
|
||||||
let stdout: string = '';
|
|
||||||
let stderr: string = '';
|
|
||||||
|
|
||||||
const options: ExecOptions = {
|
|
||||||
silent: silent,
|
|
||||||
ignoreReturnCode: true,
|
|
||||||
input: Buffer.from(stdin || '')
|
|
||||||
};
|
|
||||||
options.listeners = {
|
|
||||||
stdout: (data: Buffer) => {
|
|
||||||
stdout += data.toString();
|
|
||||||
},
|
|
||||||
stderr: (data: Buffer) => {
|
|
||||||
stderr += data.toString();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const returnCode: number = await actionsExec.exec(command, args, options);
|
|
||||||
|
|
||||||
return {
|
|
||||||
success: returnCode === 0,
|
|
||||||
stdout: stdout.trim(),
|
|
||||||
stderr: stderr.trim()
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -8,7 +8,7 @@ export function setRegistry(registry: string) {
|
|||||||
core.saveState('registry', registry);
|
core.saveState('registry', registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setLogout(logout: string) {
|
export function setLogout(logout: boolean) {
|
||||||
core.saveState('logout', logout);
|
core.saveState('logout', logout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
46
yarn.lock
46
yarn.lock
@@ -2,22 +2,22 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@actions/core@^1.2.6":
|
"@actions/core@^1.4.0":
|
||||||
version "1.2.6"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.6.tgz#a78d49f41a4def18e88ce47c2cac615d5694bf09"
|
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.4.0.tgz#cf2e6ee317e314b03886adfeb20e448d50d6e524"
|
||||||
integrity sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==
|
integrity sha512-CGx2ilGq5i7zSLgiiGUtBCxhRRxibJYU6Fim0Q1Wg2aQL2LTnF27zbqZOrxfvFQ55eSBW0L8uVStgtKMpa0Qlg==
|
||||||
|
|
||||||
"@actions/exec@^1.0.4":
|
"@actions/exec@^1.1.0":
|
||||||
version "1.0.4"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/exec/-/exec-1.0.4.tgz#99d75310e62e59fc37d2ee6dcff6d4bffadd3a5d"
|
resolved "https://registry.yarnpkg.com/@actions/exec/-/exec-1.1.0.tgz#53441d968e56d2fec69ad3f15773d4d94e01162c"
|
||||||
integrity sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==
|
integrity sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/io" "^1.0.1"
|
"@actions/io" "^1.0.1"
|
||||||
|
|
||||||
"@actions/io@^1.0.1", "@actions/io@^1.0.2":
|
"@actions/io@^1.0.1", "@actions/io@^1.1.1":
|
||||||
version "1.0.2"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.0.2.tgz#2f614b6e69ce14d191180451eb38e6576a6e6b27"
|
resolved "https://registry.yarnpkg.com/@actions/io/-/io-1.1.1.tgz#4a157406309e212ab27ed3ae30e8c1d641686a66"
|
||||||
integrity sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==
|
integrity sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==
|
||||||
|
|
||||||
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
|
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
|
||||||
version "7.10.4"
|
version "7.10.4"
|
||||||
@@ -2483,6 +2483,13 @@ lru-cache@^4.1.5:
|
|||||||
pseudomap "^1.0.2"
|
pseudomap "^1.0.2"
|
||||||
yallist "^2.1.2"
|
yallist "^2.1.2"
|
||||||
|
|
||||||
|
lru-cache@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||||
|
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||||
|
dependencies:
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
make-dir@^3.0.0:
|
make-dir@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
||||||
@@ -3100,10 +3107,12 @@ saxes@^5.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||||
|
|
||||||
semver@7.x, semver@^7.3.2:
|
semver@7.x, semver@^7.3.2, semver@^7.3.5:
|
||||||
version "7.3.2"
|
version "7.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||||
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
|
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
semver@^6.0.0, semver@^6.3.0:
|
semver@^6.0.0, semver@^6.3.0:
|
||||||
version "6.3.0"
|
version "6.3.0"
|
||||||
@@ -3742,6 +3751,11 @@ yallist@^2.1.2:
|
|||||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
||||||
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
|
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
|
||||||
|
|
||||||
|
yallist@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||||
|
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||||
|
|
||||||
yargs-parser@18.x, yargs-parser@^18.1.2:
|
yargs-parser@18.x, yargs-parser@^18.1.2:
|
||||||
version "18.1.3"
|
version "18.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
|
||||||
|
|||||||
Reference in New Issue
Block a user