mirror of
https://github.com/docker/build-push-action.git
synced 2026-03-12 08:40:51 +00:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a531fa5a6 | ||
|
|
565d16e074 | ||
|
|
c473874c2c | ||
|
|
b94cedd686 | ||
|
|
76c8b42a58 | ||
|
|
920f0da143 | ||
|
|
e723b420bf | ||
|
|
f9deaa080c | ||
|
|
b4c22c3e33 | ||
|
|
a8587cb818 | ||
|
|
f2a733f179 | ||
|
|
35ab0dd217 | ||
|
|
46d5afd128 | ||
|
|
a8bb35be5a | ||
|
|
5c278cd8ab | ||
|
|
3b98ff3c03 | ||
|
|
6b88c3e647 | ||
|
|
0db984c182 | ||
|
|
35e3637576 | ||
|
|
a29353b5c7 | ||
|
|
241c03788f | ||
|
|
a6ea296fed | ||
|
|
13137a8f9b | ||
|
|
22b2fa68fc | ||
|
|
9ada3141a9 | ||
|
|
e53bafea73 | ||
|
|
b9335d6c83 | ||
|
|
d51711af0d | ||
|
|
b0a38c7db9 |
34
.github/labels.yml
vendored
34
.github/labels.yml
vendored
@@ -68,7 +68,6 @@
|
|||||||
name: ":question: question"
|
name: ":question: question"
|
||||||
color: "3f51b5"
|
color: "3f51b5"
|
||||||
description: ""
|
description: ""
|
||||||
from_name: "question"
|
|
||||||
- # upstream
|
- # upstream
|
||||||
name: ":eyes: upstream"
|
name: ":eyes: upstream"
|
||||||
color: "fbca04"
|
color: "fbca04"
|
||||||
@@ -77,3 +76,36 @@
|
|||||||
name: ":coffin: wontfix"
|
name: ":coffin: wontfix"
|
||||||
color: "ffffff"
|
color: "ffffff"
|
||||||
description: ""
|
description: ""
|
||||||
|
|
||||||
|
- # registry-aws-ecr
|
||||||
|
name: "registry-aws-ecr"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-azure-acr
|
||||||
|
name: "registry-azure-acr"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-dockerhub
|
||||||
|
name: "registry-dockerhub"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-github
|
||||||
|
name: "registry-github"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-google-gar
|
||||||
|
name: "registry-google-gar"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-google-gcr
|
||||||
|
name: "registry-google-gcr"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-nexus
|
||||||
|
name: "registry-nexus"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
- # registry-quay
|
||||||
|
name: "registry-quay"
|
||||||
|
color: "84858A"
|
||||||
|
description: ""
|
||||||
|
|||||||
22
.github/workflows/e2e.yml
vendored
22
.github/workflows/e2e.yml
vendored
@@ -32,6 +32,26 @@ jobs:
|
|||||||
slug: registry.gitlab.com/test1716/test
|
slug: registry.gitlab.com/test1716/test
|
||||||
username_secret: GITLAB_USERNAME
|
username_secret: GITLAB_USERNAME
|
||||||
password_secret: GITLAB_TOKEN
|
password_secret: GITLAB_TOKEN
|
||||||
|
-
|
||||||
|
registry: 175142243308.dkr.ecr.us-east-2.amazonaws.com
|
||||||
|
slug: 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action
|
||||||
|
username_secret: AWS_ACCESS_KEY_ID
|
||||||
|
password_secret: AWS_SECRET_ACCESS_KEY
|
||||||
|
-
|
||||||
|
registry: public.ecr.aws
|
||||||
|
slug: public.ecr.aws/q3b5f1u4/test-docker-action
|
||||||
|
username_secret: AWS_ACCESS_KEY_ID
|
||||||
|
password_secret: AWS_SECRET_ACCESS_KEY
|
||||||
|
-
|
||||||
|
registry: us-east4-docker.pkg.dev
|
||||||
|
slug: us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action
|
||||||
|
username_secret: GAR_USERNAME
|
||||||
|
password_secret: GAR_JSON_KEY
|
||||||
|
-
|
||||||
|
registry: gcr.io
|
||||||
|
slug: gcr.io/sandbox-298914/test-docker-action
|
||||||
|
username_secret: GCR_USERNAME
|
||||||
|
password_secret: GCR_JSON_KEY
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
@@ -66,6 +86,8 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||||
|
cache-from: type=registry,ref=${{ matrix.slug }}:master
|
||||||
|
cache-to: type=inline
|
||||||
-
|
-
|
||||||
name: Inspect image
|
name: Inspect image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -9,7 +9,7 @@
|
|||||||
`v2` of this action includes significant updates and now uses Docker [Buildx](https://github.com/docker/buildx). It
|
`v2` of this action includes significant updates and now uses Docker [Buildx](https://github.com/docker/buildx). It
|
||||||
works with 3 new actions ([login](https://github.com/docker/login-action), [setup-buildx](https://github.com/docker/setup-buildx-action)
|
works with 3 new actions ([login](https://github.com/docker/login-action), [setup-buildx](https://github.com/docker/setup-buildx-action)
|
||||||
and [setup-qemu](https://github.com/docker/setup-qemu-action)) that we have created. It's also rewritten as a
|
and [setup-qemu](https://github.com/docker/setup-qemu-action)) that we have created. It's also rewritten as a
|
||||||
[typescript-action](https://github.com/actions/typescript-action/) to be as closed as possible of the
|
[typescript-action](https://github.com/actions/typescript-action/) to be as close as possible of the
|
||||||
[GitHub Runner](https://github.com/actions/virtual-environments) during its execution.
|
[GitHub Runner](https://github.com/actions/virtual-environments) during its execution.
|
||||||
|
|
||||||
[Upgrade notes](UPGRADE.md) and many [usage examples](#usage) have been added to handle most use cases but `v1` is
|
[Upgrade notes](UPGRADE.md) and many [usage examples](#usage) have been added to handle most use cases but `v1` is
|
||||||
@@ -35,7 +35,7 @@ ___
|
|||||||
* [Multi-platform image](#multi-platform-image)
|
* [Multi-platform image](#multi-platform-image)
|
||||||
* [Advanced usage](#advanced-usage)
|
* [Advanced usage](#advanced-usage)
|
||||||
* [Push to multi-registries](#push-to-multi-registries)
|
* [Push to multi-registries](#push-to-multi-registries)
|
||||||
* [Cache to registry](#push-to-multi-registries)
|
* [Cache to registry](#cache-to-registry)
|
||||||
* [Local registry](#local-registry)
|
* [Local registry](#local-registry)
|
||||||
* [Export image to Docker](#export-image-to-docker)
|
* [Export image to Docker](#export-image-to-docker)
|
||||||
* [Leverage GitHub cache](#leverage-github-cache)
|
* [Leverage GitHub cache](#leverage-github-cache)
|
||||||
@@ -59,8 +59,8 @@ build-secrets, remote cache, etc. and different builder deployment/namespacing o
|
|||||||
|
|
||||||
### Git context
|
### Git context
|
||||||
|
|
||||||
The default behavior of this action is to use the [Git context invoked](https://github.com/docker/build-push-action/blob/master/src/context.ts#L31-L35)
|
The default behavior of this action is to use the Git context invoked by your workflow.
|
||||||
by your workflow.
|
(eg. `https://github.com/<owner>/<repo>.git#<ref>`)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: ci
|
name: ci
|
||||||
@@ -116,8 +116,8 @@ repository, you have to use a secret named `GIT_AUTH_TOKEN` to be able to authen
|
|||||||
GIT_AUTH_TOKEN=${{ secrets.MYTOKEN }}
|
GIT_AUTH_TOKEN=${{ secrets.MYTOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
> :warning: Subdir for Git context is [not yet supported](https://github.com/docker/build-push-action/issues/120).
|
> :warning: Subdir for Git context is not yet supported ([moby/buildkit#1684](https://github.com/moby/buildkit/issues/1684))
|
||||||
> For the moment you can use the [path context](#path-context).
|
> but you can use the [path context](#path-context) in the meantime.
|
||||||
|
|
||||||
> More info: https://docs.docker.com/engine/reference/commandline/build/#git-repositories
|
> More info: https://docs.docker.com/engine/reference/commandline/build/#git-repositories
|
||||||
|
|
||||||
@@ -608,7 +608,7 @@ Following inputs can be used as `step.with` keys
|
|||||||
|---------------------|----------|------------------------------------|
|
|---------------------|----------|------------------------------------|
|
||||||
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
|
||||||
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
|
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
|
||||||
| `file` | String | Path to the Dockerfile (default `./Dockerfile`) |
|
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
|
||||||
| `build-args` | List | List of build-time variables |
|
| `build-args` | List | List of build-time variables |
|
||||||
| `labels` | List | List of metadata for an image |
|
| `labels` | List | List of metadata for an image |
|
||||||
| `tags` | List/CSV | List of tags |
|
| `tags` | List/CSV | List of tags |
|
||||||
@@ -651,6 +651,7 @@ secrets: |
|
|||||||
|
|
||||||
bbbb
|
bbbb
|
||||||
ccc"
|
ccc"
|
||||||
|
"JSON_SECRET={""key1"":""value1"",""key2"":""value2""}"
|
||||||
```
|
```
|
||||||
|
|
||||||
| Key | Value |
|
| Key | Value |
|
||||||
@@ -660,6 +661,7 @@ secrets: |
|
|||||||
| `MYSECRET` | `aaaaaaaa\nbbbbbbb\nccccccccc` |
|
| `MYSECRET` | `aaaaaaaa\nbbbbbbb\nccccccccc` |
|
||||||
| `FOO` | `bar` |
|
| `FOO` | `bar` |
|
||||||
| `EMPTYLINE` | `aaaa\n\nbbbb\nccc` |
|
| `EMPTYLINE` | `aaaa\n\nbbbb\nccc` |
|
||||||
|
| `JSON_SECRET` | `{"key1":"value1","key2":"value2"}` |
|
||||||
|
|
||||||
> Note: all quote signs need to be doubled for escaping.
|
> Note: all quote signs need to be doubled for escaping.
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -162,7 +161,20 @@ describe('getArgs', () => {
|
|||||||
'--build-arg', 'MY_ARG=val1,val2,val3',
|
'--build-arg', 'MY_ARG=val1,val2,val3',
|
||||||
'--build-arg', 'ARG=val',
|
'--build-arg', 'ARG=val',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'0.4.2',
|
||||||
|
new Map<string, string>([
|
||||||
|
['tags', 'name/app:7.4, name/app:latest'],
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
'buildx',
|
||||||
|
'build',
|
||||||
|
'--tag', 'name/app:7.4',
|
||||||
|
'--tag', 'name/app:latest',
|
||||||
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'https://github.com/docker/build-push-action.git#test-jest'
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -179,7 +191,6 @@ describe('getArgs', () => {
|
|||||||
'--label', 'org.opencontainers.image.title=buildkit',
|
'--label', 'org.opencontainers.image.title=buildkit',
|
||||||
'--label', 'org.opencontainers.image.description=concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit',
|
'--label', 'org.opencontainers.image.description=concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit',
|
||||||
'--output', 'type=local,dest=./release-out',
|
'--output', 'type=local,dest=./release-out',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -193,7 +204,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--platform', 'linux/amd64,linux/arm64',
|
'--platform', 'linux/amd64,linux/arm64',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -206,7 +216,6 @@ describe('getArgs', () => {
|
|||||||
'buildx',
|
'buildx',
|
||||||
'build',
|
'build',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -221,7 +230,6 @@ describe('getArgs', () => {
|
|||||||
'build',
|
'build',
|
||||||
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
|
||||||
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'.'
|
'.'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@@ -236,7 +244,6 @@ describe('getArgs', () => {
|
|||||||
'build',
|
'build',
|
||||||
'--output', '.',
|
'--output', '.',
|
||||||
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
'--secret', 'id=GIT_AUTH_TOKEN,src=/tmp/.docker-build-push-jest/.tmpname-jest',
|
||||||
'--file', 'Dockerfile',
|
|
||||||
'https://github.com/docker/build-push-action.git#test-jest'
|
'https://github.com/docker/build-push-action.git#test-jest'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ inputs:
|
|||||||
file:
|
file:
|
||||||
description: "Path to the Dockerfile"
|
description: "Path to the Dockerfile"
|
||||||
required: false
|
required: false
|
||||||
default: './Dockerfile'
|
|
||||||
build-args:
|
build-args:
|
||||||
description: "List of build-time variables"
|
description: "List of build-time variables"
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
979
dist/index.js
generated
vendored
979
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__) {
|
||||||
|
|
||||||
@@ -1987,15 +1994,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) {
|
||||||
@@ -2275,6 +2279,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:
|
||||||
@@ -2451,9 +2471,344 @@ try {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 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");
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
@@ -2495,7 +2850,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
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));
|
||||||
@@ -3102,6 +3457,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)
|
||||||
@@ -3116,8 +3472,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 '<':
|
||||||
@@ -3129,6 +3485,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)) {
|
||||||
@@ -4658,7 +5016,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
|
||||||
}
|
}
|
||||||
@@ -4775,7 +5133,7 @@ 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);
|
const childProcess = __webpack_require__(4);
|
||||||
const path = __webpack_require__(622);
|
const path = __webpack_require__(622);
|
||||||
const util_1 = __webpack_require__(669);
|
const util_1 = __webpack_require__(669);
|
||||||
const ioUtil = __webpack_require__(962);
|
const ioUtil = __webpack_require__(962);
|
||||||
@@ -8426,12 +8784,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) {
|
||||||
@@ -8553,6 +8906,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)
|
||||||
@@ -9121,6 +9475,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) {}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 668:
|
/***/ 668:
|
||||||
@@ -10288,6 +11076,24 @@ exports.Octokit = Octokit;
|
|||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.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:
|
||||||
@@ -10337,12 +11143,7 @@ function removeHook (state, name, method) {
|
|||||||
// 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 (
|
||||||
@@ -10382,6 +11183,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()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10400,8 +11219,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))
|
||||||
@@ -10423,15 +11251,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) {
|
||||||
@@ -10480,6 +11326,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)
|
||||||
@@ -10491,6 +11341,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) => {
|
||||||
@@ -11553,37 +12406,34 @@ class Parser extends Transform {
|
|||||||
}
|
}
|
||||||
if(recordLength !== this.state.expectedRecordLength){
|
if(recordLength !== this.state.expectedRecordLength){
|
||||||
const err = columns === false ?
|
const err = columns === false ?
|
||||||
this.__error(
|
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
|
||||||
// Todo: rename CSV_INCONSISTENT_RECORD_LENGTH to
|
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
|
||||||
// CSV_RECORD_INCONSISTENT_FIELDS_LENGTH
|
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
|
||||||
new CsvError('CSV_INCONSISTENT_RECORD_LENGTH', [
|
'Invalid Record Length:',
|
||||||
'Invalid Record Length:',
|
`expect ${this.state.expectedRecordLength},`,
|
||||||
`expect ${this.state.expectedRecordLength},`,
|
`got ${recordLength} on line ${this.info.lines}`,
|
||||||
`got ${recordLength} on line ${this.info.lines}`,
|
], this.options, this.__context(), {
|
||||||
], this.options, this.__context(), {
|
record: record,
|
||||||
record: record,
|
})
|
||||||
})
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
this.__error(
|
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
|
||||||
// Todo: rename CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH to
|
// CSV_RECORD_INCONSISTENT_COLUMNS
|
||||||
// CSV_RECORD_INCONSISTENT_COLUMNS
|
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
|
||||||
new CsvError('CSV_RECORD_DONT_MATCH_COLUMNS_LENGTH', [
|
'Invalid Record Length:',
|
||||||
'Invalid Record Length:',
|
`columns length is ${columns.length},`, // rename columns
|
||||||
`columns length is ${columns.length},`, // rename columns
|
`got ${recordLength} on line ${this.info.lines}`,
|
||||||
`got ${recordLength} on line ${this.info.lines}`,
|
], this.options, this.__context(), {
|
||||||
], this.options, this.__context(), {
|
record: record,
|
||||||
record: record,
|
})
|
||||||
})
|
|
||||||
)
|
|
||||||
if(relax_column_count === true ||
|
if(relax_column_count === true ||
|
||||||
(relax_column_count_less === true && recordLength < this.state.expectedRecordLength) ||
|
(relax_column_count_less === true && recordLength < this.state.expectedRecordLength) ||
|
||||||
(relax_column_count_more === true && recordLength > this.state.expectedRecordLength) ){
|
(relax_column_count_more === true && recordLength > this.state.expectedRecordLength) ){
|
||||||
this.info.invalid_field_length++
|
this.info.invalid_field_length++
|
||||||
this.state.error = err
|
this.state.error = err
|
||||||
// Error is undefined with skip_lines_with_error
|
// Error is undefined with skip_lines_with_error
|
||||||
}else if(err !== undefined){
|
}else{
|
||||||
return err
|
const finalErr = this.__error(err)
|
||||||
|
if(finalErr) return finalErr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(skip_lines_with_empty_values === true){
|
if(skip_lines_with_empty_values === true){
|
||||||
@@ -12137,7 +12987,7 @@ function getInputs(defaultContext) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return {
|
return {
|
||||||
context: core.getInput('context') || defaultContext,
|
context: core.getInput('context') || defaultContext,
|
||||||
file: core.getInput('file') || 'Dockerfile',
|
file: core.getInput('file'),
|
||||||
buildArgs: yield getInputList('build-args', true),
|
buildArgs: yield getInputList('build-args', true),
|
||||||
labels: yield getInputList('labels', true),
|
labels: yield getInputList('labels', true),
|
||||||
tags: yield getInputList('tags'),
|
tags: yield getInputList('tags'),
|
||||||
@@ -12266,7 +13116,7 @@ function getInputList(name, ignoreComma) {
|
|||||||
}
|
}
|
||||||
res.push(output.join(','));
|
res.push(output.join(','));
|
||||||
}
|
}
|
||||||
return res.filter(item => item);
|
return res.filter(item => item).map(pat => pat.trim());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.getInputList = getInputList;
|
exports.getInputList = getInputList;
|
||||||
@@ -12318,15 +13168,18 @@ const compare = __webpack_require__(309)
|
|||||||
// - 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 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 any C is a = range, and GT or LT are set, 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
|
||||||
@@ -12349,6 +13202,9 @@ const subset = (sub, dom, options) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const simpleSubset = (sub, dom, options) => {
|
const simpleSubset = (sub, dom, options) => {
|
||||||
|
if (sub === dom)
|
||||||
|
return true
|
||||||
|
|
||||||
if (sub.length === 1 && sub[0].semver === ANY)
|
if (sub.length === 1 && sub[0].semver === ANY)
|
||||||
return dom.length === 1 && dom[0].semver === ANY
|
return dom.length === 1 && dom[0].semver === ANY
|
||||||
|
|
||||||
@@ -12387,6 +13243,7 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12398,7 +13255,7 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (gt) {
|
if (gt) {
|
||||||
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
|
||||||
@@ -12406,7 +13263,7 @@ const simpleSubset = (sub, dom, options) => {
|
|||||||
if (lt) {
|
if (lt) {
|
||||||
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
|
||||||
@@ -12625,13 +13482,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
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
"csv-parse": "^4.14.1",
|
"csv-parse": "^4.14.2",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.4",
|
||||||
"tmp": "^0.2.1"
|
"tmp": "^0.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function tmpNameSync(options?: tmp.TmpNameOptions): string {
|
|||||||
export async function getInputs(defaultContext: string): Promise<Inputs> {
|
export async function getInputs(defaultContext: string): Promise<Inputs> {
|
||||||
return {
|
return {
|
||||||
context: core.getInput('context') || defaultContext,
|
context: core.getInput('context') || defaultContext,
|
||||||
file: core.getInput('file') || 'Dockerfile',
|
file: core.getInput('file'),
|
||||||
buildArgs: await getInputList('build-args', true),
|
buildArgs: await getInputList('build-args', true),
|
||||||
labels: await getInputList('labels', true),
|
labels: await getInputList('labels', true),
|
||||||
tags: await getInputList('tags'),
|
tags: await getInputList('tags'),
|
||||||
@@ -183,7 +183,7 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise
|
|||||||
res.push(output.join(','));
|
res.push(output.join(','));
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.filter(item => item);
|
return res.filter(item => item).map(pat => pat.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
export const asyncForEach = async (array, callback) => {
|
export const asyncForEach = async (array, callback) => {
|
||||||
|
|||||||
30
yarn.lock
30
yarn.lock
@@ -1236,10 +1236,10 @@ cssstyle@^2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
cssom "~0.3.6"
|
cssom "~0.3.6"
|
||||||
|
|
||||||
csv-parse@*, csv-parse@^4.14.1:
|
csv-parse@*, csv-parse@^4.14.2:
|
||||||
version "4.14.1"
|
version "4.14.2"
|
||||||
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.1.tgz#b6b3736508fb94682fa6d450fe1755237221d291"
|
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-4.14.2.tgz#c1329cff95a99b8773a92c4e62f8bff114b34726"
|
||||||
integrity sha512-4wmcO7QbWtDAncGFaBwlWFPhEN4Akr64IbM4zvDwEOFekI8blLc04Nw7XjQjtSNy+3AUAgBgtUa9nWo5Cq89Xg==
|
integrity sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw==
|
||||||
|
|
||||||
dashdash@^1.12.0:
|
dashdash@^1.12.0:
|
||||||
version "1.14.1"
|
version "1.14.1"
|
||||||
@@ -2614,6 +2614,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"
|
||||||
@@ -3236,10 +3243,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.4:
|
||||||
version "7.3.2"
|
version "7.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
|
||||||
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
|
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
|
||||||
|
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"
|
||||||
@@ -3895,6 +3904,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