Compare commits
64 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
de30867634 | 5 days ago |
|
|
94f57482d8 | 5 days ago |
|
|
27173685d7 | 5 days ago |
|
|
8ed8ece47c | 5 days ago |
|
|
2133d1712a | 5 days ago |
|
|
bebcd8f390 | 6 days ago |
|
|
a3f8b56eb8 | 6 days ago |
|
|
5e178f1185 | 6 days ago |
|
|
dbf1bb58c7 | 6 days ago |
|
|
b4f9e48f9d | 6 days ago |
|
|
139e1274c0 | 6 days ago |
|
|
693b70024e | 6 days ago |
|
|
01a13d0bbd | 6 days ago |
|
|
eb6512707b | 1 week ago |
|
|
1031bc45c5 | 1 week ago |
|
|
344ec24f8d | 1 week ago |
|
|
dbac3ca1e5 | 2 weeks ago |
|
|
b0bdd3ad21 | 2 weeks ago |
|
|
3cb57ac71c | 2 weeks ago |
|
|
f64672cf50 | 2 weeks ago |
|
|
63e92d1fdf | 3 weeks ago |
|
|
155e77ab84 | 3 weeks ago |
|
|
d08e5c354a | 3 weeks ago |
|
|
cbd2dff9a0 | 3 weeks ago |
|
|
f76f51f129 | 3 weeks ago |
|
|
7d03e66b5f | 3 weeks ago |
|
|
98f853d923 | 3 weeks ago |
|
|
cadccf6e8c | 3 weeks ago |
|
|
03fe8775e3 | 3 weeks ago |
|
|
827e36650e | 3 weeks ago |
|
|
e25db879d0 | 3 weeks ago |
|
|
1ac2573b5c | 3 weeks ago |
|
|
5b9c34fb44 | 3 weeks ago |
|
|
61cac19eba | 3 weeks ago |
|
|
9a57217389 | 3 weeks ago |
|
|
975aafcd3e | 3 weeks ago |
|
|
2c65e9c5d3 | 3 weeks ago |
|
|
230fd87864 | 3 weeks ago |
|
|
7c68264114 | 3 weeks ago |
|
|
1d41182205 | 3 weeks ago |
|
|
6b3878c083 | 3 weeks ago |
|
|
582091f7f9 | 3 weeks ago |
|
|
38de52285e | 3 weeks ago |
|
|
5bc2aa100a | 3 weeks ago |
|
|
f939b4c816 | 3 weeks ago |
|
|
b4bda282d6 | 3 weeks ago |
|
|
683985cc23 | 3 weeks ago |
|
|
8913706d4e | 3 weeks ago |
|
|
2505ca301c | 3 weeks ago |
|
|
2faeb55053 | 3 weeks ago |
|
|
217eea940b | 3 weeks ago |
|
|
4003f769ac | 3 weeks ago |
|
|
dbbef96a17 | 3 weeks ago |
|
|
d2c9f1ec18 | 3 weeks ago |
|
|
2bd26e7129 | 3 weeks ago |
|
|
4c8333398a | 3 weeks ago |
|
|
ce71e4f44d | 4 weeks ago |
|
|
b66574c6d1 | 4 weeks ago |
|
|
db4ff6ca90 | 4 weeks ago |
|
|
10e90e3645 | 1 month ago |
|
|
5262538458 | 1 month ago |
|
|
cd130e45cb | 1 month ago |
|
|
806c75105a | 1 month ago |
|
|
c4ca8486a6 | 1 month ago |
@ -0,0 +1,45 @@
|
|||||||
|
name: codeql
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'releases/v*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
NODE_VERSION: "24"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
-
|
||||||
|
name: Enable corepack
|
||||||
|
run: |
|
||||||
|
corepack enable
|
||||||
|
yarn --version
|
||||||
|
-
|
||||||
|
name: Set up Node
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
-
|
||||||
|
name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v4
|
||||||
|
with:
|
||||||
|
languages: javascript-typescript
|
||||||
|
build-mode: none
|
||||||
|
-
|
||||||
|
name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v4
|
||||||
|
with:
|
||||||
|
category: "/language:javascript-typescript"
|
||||||
File diff suppressed because one or more lines are too long
@ -1,207 +0,0 @@
|
|||||||
import {jest} from '@jest/globals';
|
|
||||||
|
|
||||||
export const context = {
|
|
||||||
repo: {
|
|
||||||
owner: 'docker',
|
|
||||||
repo: 'build-push-action'
|
|
||||||
},
|
|
||||||
ref: 'refs/heads/master',
|
|
||||||
runId: 123456789,
|
|
||||||
payload: {
|
|
||||||
after: '860c1904a1ce19322e91ac35af1ab07466440c37',
|
|
||||||
base_ref: null,
|
|
||||||
before: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
|
|
||||||
commits: [
|
|
||||||
{
|
|
||||||
author: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
committer: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
distinct: true,
|
|
||||||
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
|
|
||||||
message: 'hello dev',
|
|
||||||
timestamp: '2022-04-19T11:27:24+02:00',
|
|
||||||
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
|
|
||||||
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
compare: 'https://github.com/docker/test-docker-action/compare/5f3331d7f704...860c1904a1ce',
|
|
||||||
created: false,
|
|
||||||
deleted: false,
|
|
||||||
forced: false,
|
|
||||||
head_commit: {
|
|
||||||
author: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
committer: {
|
|
||||||
email: 'crazy-max@users.noreply.github.com',
|
|
||||||
name: 'CrazyMax',
|
|
||||||
username: 'crazy-max'
|
|
||||||
},
|
|
||||||
distinct: true,
|
|
||||||
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
|
|
||||||
message: 'hello dev',
|
|
||||||
timestamp: '2022-04-19T11:27:24+02:00',
|
|
||||||
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
|
|
||||||
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
|
|
||||||
},
|
|
||||||
organization: {
|
|
||||||
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
|
|
||||||
description: 'Docker helps developers bring their ideas to life by conquering the complexity of app development.',
|
|
||||||
events_url: 'https://api.github.com/orgs/docker/events',
|
|
||||||
hooks_url: 'https://api.github.com/orgs/docker/hooks',
|
|
||||||
id: 5429470,
|
|
||||||
issues_url: 'https://api.github.com/orgs/docker/issues',
|
|
||||||
login: 'docker',
|
|
||||||
members_url: 'https://api.github.com/orgs/docker/members{/member}',
|
|
||||||
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
|
|
||||||
public_members_url: 'https://api.github.com/orgs/docker/public_members{/member}',
|
|
||||||
repos_url: 'https://api.github.com/orgs/docker/repos',
|
|
||||||
url: 'https://api.github.com/orgs/docker'
|
|
||||||
},
|
|
||||||
pusher: {
|
|
||||||
email: 'github@crazymax.dev',
|
|
||||||
name: 'crazy-max'
|
|
||||||
},
|
|
||||||
ref: 'refs/heads/dev',
|
|
||||||
repository: {
|
|
||||||
allow_forking: true,
|
|
||||||
archive_url: 'https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}',
|
|
||||||
archived: false,
|
|
||||||
assignees_url: 'https://api.github.com/repos/docker/test-docker-action/assignees{/user}',
|
|
||||||
blobs_url: 'https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}',
|
|
||||||
branches_url: 'https://api.github.com/repos/docker/test-docker-action/branches{/branch}',
|
|
||||||
clone_url: 'https://github.com/docker/test-docker-action.git',
|
|
||||||
collaborators_url: 'https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}',
|
|
||||||
comments_url: 'https://api.github.com/repos/docker/test-docker-action/comments{/number}',
|
|
||||||
commits_url: 'https://api.github.com/repos/docker/test-docker-action/commits{/sha}',
|
|
||||||
compare_url: 'https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}',
|
|
||||||
contents_url: 'https://api.github.com/repos/docker/test-docker-action/contents/{+path}',
|
|
||||||
contributors_url: 'https://api.github.com/repos/docker/test-docker-action/contributors',
|
|
||||||
created_at: 1596792180,
|
|
||||||
default_branch: 'master',
|
|
||||||
deployments_url: 'https://api.github.com/repos/docker/test-docker-action/deployments',
|
|
||||||
description: 'Test "Docker" Actions',
|
|
||||||
disabled: false,
|
|
||||||
downloads_url: 'https://api.github.com/repos/docker/test-docker-action/downloads',
|
|
||||||
events_url: 'https://api.github.com/repos/docker/test-docker-action/events',
|
|
||||||
fork: false,
|
|
||||||
forks: 1,
|
|
||||||
forks_count: 1,
|
|
||||||
forks_url: 'https://api.github.com/repos/docker/test-docker-action/forks',
|
|
||||||
full_name: 'docker/test-docker-action',
|
|
||||||
git_commits_url: 'https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}',
|
|
||||||
git_refs_url: 'https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}',
|
|
||||||
git_tags_url: 'https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}',
|
|
||||||
git_url: 'git://github.com/docker/test-docker-action.git',
|
|
||||||
has_downloads: true,
|
|
||||||
has_issues: true,
|
|
||||||
has_pages: false,
|
|
||||||
has_projects: true,
|
|
||||||
has_wiki: true,
|
|
||||||
homepage: '',
|
|
||||||
hooks_url: 'https://api.github.com/repos/docker/test-docker-action/hooks',
|
|
||||||
html_url: 'https://github.com/docker/test-docker-action',
|
|
||||||
id: 285789493,
|
|
||||||
is_template: false,
|
|
||||||
issue_comment_url: 'https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}',
|
|
||||||
issue_events_url: 'https://api.github.com/repos/docker/test-docker-action/issues/events{/number}',
|
|
||||||
issues_url: 'https://api.github.com/repos/docker/test-docker-action/issues{/number}',
|
|
||||||
keys_url: 'https://api.github.com/repos/docker/test-docker-action/keys{/key_id}',
|
|
||||||
labels_url: 'https://api.github.com/repos/docker/test-docker-action/labels{/name}',
|
|
||||||
language: 'JavaScript',
|
|
||||||
languages_url: 'https://api.github.com/repos/docker/test-docker-action/languages',
|
|
||||||
license: {
|
|
||||||
key: 'mit',
|
|
||||||
name: 'MIT License',
|
|
||||||
node_id: 'MDc6TGljZW5zZTEz',
|
|
||||||
spdx_id: 'MIT',
|
|
||||||
url: 'https://api.github.com/licenses/mit'
|
|
||||||
},
|
|
||||||
master_branch: 'master',
|
|
||||||
merges_url: 'https://api.github.com/repos/docker/test-docker-action/merges',
|
|
||||||
milestones_url: 'https://api.github.com/repos/docker/test-docker-action/milestones{/number}',
|
|
||||||
mirror_url: null,
|
|
||||||
name: 'test-docker-action',
|
|
||||||
node_id: 'MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=',
|
|
||||||
notifications_url: 'https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}',
|
|
||||||
open_issues: 6,
|
|
||||||
open_issues_count: 6,
|
|
||||||
organization: 'docker',
|
|
||||||
owner: {
|
|
||||||
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
|
|
||||||
email: 'info@docker.com',
|
|
||||||
events_url: 'https://api.github.com/users/docker/events{/privacy}',
|
|
||||||
followers_url: 'https://api.github.com/users/docker/followers',
|
|
||||||
following_url: 'https://api.github.com/users/docker/following{/other_user}',
|
|
||||||
gists_url: 'https://api.github.com/users/docker/gists{/gist_id}',
|
|
||||||
gravatar_id: '',
|
|
||||||
html_url: 'https://github.com/docker',
|
|
||||||
id: 5429470,
|
|
||||||
login: 'docker',
|
|
||||||
name: 'docker',
|
|
||||||
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
|
|
||||||
organizations_url: 'https://api.github.com/users/docker/orgs',
|
|
||||||
received_events_url: 'https://api.github.com/users/docker/received_events',
|
|
||||||
repos_url: 'https://api.github.com/users/docker/repos',
|
|
||||||
site_admin: false,
|
|
||||||
starred_url: 'https://api.github.com/users/docker/starred{/owner}{/repo}',
|
|
||||||
subscriptions_url: 'https://api.github.com/users/docker/subscriptions',
|
|
||||||
type: 'Organization',
|
|
||||||
url: 'https://api.github.com/users/docker'
|
|
||||||
},
|
|
||||||
private: true,
|
|
||||||
pulls_url: 'https://api.github.com/repos/docker/test-docker-action/pulls{/number}',
|
|
||||||
pushed_at: 1650360446,
|
|
||||||
releases_url: 'https://api.github.com/repos/docker/test-docker-action/releases{/id}',
|
|
||||||
size: 796,
|
|
||||||
ssh_url: 'git@github.com:docker/test-docker-action.git',
|
|
||||||
stargazers: 0,
|
|
||||||
stargazers_count: 0,
|
|
||||||
stargazers_url: 'https://api.github.com/repos/docker/test-docker-action/stargazers',
|
|
||||||
statuses_url: 'https://api.github.com/repos/docker/test-docker-action/statuses/{sha}',
|
|
||||||
subscribers_url: 'https://api.github.com/repos/docker/test-docker-action/subscribers',
|
|
||||||
subscription_url: 'https://api.github.com/repos/docker/test-docker-action/subscription',
|
|
||||||
svn_url: 'https://github.com/docker/test-docker-action',
|
|
||||||
tags_url: 'https://api.github.com/repos/docker/test-docker-action/tags',
|
|
||||||
teams_url: 'https://api.github.com/repos/docker/test-docker-action/teams',
|
|
||||||
topics: [],
|
|
||||||
trees_url: 'https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}',
|
|
||||||
updated_at: '2022-04-19T09:05:09Z',
|
|
||||||
url: 'https://github.com/docker/test-docker-action',
|
|
||||||
visibility: 'private',
|
|
||||||
watchers: 0,
|
|
||||||
watchers_count: 0
|
|
||||||
},
|
|
||||||
sender: {
|
|
||||||
avatar_url: 'https://avatars.githubusercontent.com/u/1951866?v=4',
|
|
||||||
events_url: 'https://api.github.com/users/crazy-max/events{/privacy}',
|
|
||||||
followers_url: 'https://api.github.com/users/crazy-max/followers',
|
|
||||||
following_url: 'https://api.github.com/users/crazy-max/following{/other_user}',
|
|
||||||
gists_url: 'https://api.github.com/users/crazy-max/gists{/gist_id}',
|
|
||||||
gravatar_id: '',
|
|
||||||
html_url: 'https://github.com/crazy-max',
|
|
||||||
id: 1951866,
|
|
||||||
login: 'crazy-max',
|
|
||||||
node_id: 'MDQ6VXNlcjE5NTE4NjY=',
|
|
||||||
organizations_url: 'https://api.github.com/users/crazy-max/orgs',
|
|
||||||
received_events_url: 'https://api.github.com/users/crazy-max/received_events',
|
|
||||||
repos_url: 'https://api.github.com/users/crazy-max/repos',
|
|
||||||
site_admin: false,
|
|
||||||
starred_url: 'https://api.github.com/users/crazy-max/starred{/owner}{/repo}',
|
|
||||||
subscriptions_url: 'https://api.github.com/users/crazy-max/subscriptions',
|
|
||||||
type: 'User',
|
|
||||||
url: 'https://api.github.com/users/crazy-max'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getOctokit = jest.fn();
|
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "builder2",
|
||||||
|
"driver": "docker-container",
|
||||||
|
"lastActivity": "2023-01-16 09:45:23 +0000 UTC",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"buildkit": "v0.11.0",
|
||||||
|
"buildkitd-flags": "--debug --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
|
||||||
|
"driver-opts": [
|
||||||
|
"BUILDKIT_STEP_LOG_MAX_SIZE=10485760",
|
||||||
|
"BUILDKIT_STEP_LOG_MAX_SPEED=10485760",
|
||||||
|
"JAEGER_TRACE=localhost:6831",
|
||||||
|
"image=moby/buildkit:latest",
|
||||||
|
"network=host"
|
||||||
|
],
|
||||||
|
"endpoint": "unix:///var/run/docker.sock",
|
||||||
|
"name": "builder20",
|
||||||
|
"platforms": "linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6",
|
||||||
|
"status": "running"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,362 +0,0 @@
|
|||||||
{
|
|
||||||
"id": 1296269,
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
|
|
||||||
"name": "Hello-World",
|
|
||||||
"full_name": "octocat/Hello-World",
|
|
||||||
"owner": {
|
|
||||||
"login": "octocat",
|
|
||||||
"id": 1,
|
|
||||||
"node_id": "MDQ6VXNlcjE=",
|
|
||||||
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"url": "https://api.github.com/users/octocat",
|
|
||||||
"html_url": "https://github.com/octocat",
|
|
||||||
"followers_url": "https://api.github.com/users/octocat/followers",
|
|
||||||
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
|
||||||
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
|
||||||
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
|
||||||
"repos_url": "https://api.github.com/users/octocat/repos",
|
|
||||||
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
|
||||||
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
|
||||||
"type": "User",
|
|
||||||
"site_admin": false
|
|
||||||
},
|
|
||||||
"private": false,
|
|
||||||
"html_url": "https://github.com/octocat/Hello-World",
|
|
||||||
"description": "This your first repo!",
|
|
||||||
"fork": false,
|
|
||||||
"url": "https://api.github.com/repos/octocat/Hello-World",
|
|
||||||
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
|
|
||||||
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
|
|
||||||
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
|
|
||||||
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
|
|
||||||
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
|
|
||||||
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
|
|
||||||
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
|
|
||||||
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
|
|
||||||
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
|
|
||||||
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
|
|
||||||
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
|
|
||||||
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
|
|
||||||
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
|
|
||||||
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
|
|
||||||
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
|
|
||||||
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
|
|
||||||
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
|
|
||||||
"git_url": "git:github.com/octocat/Hello-World.git",
|
|
||||||
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
|
|
||||||
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
|
|
||||||
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
|
|
||||||
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
|
|
||||||
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
|
|
||||||
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
|
|
||||||
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
|
|
||||||
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
|
|
||||||
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
|
|
||||||
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
|
|
||||||
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
|
|
||||||
"ssh_url": "git@github.com:octocat/Hello-World.git",
|
|
||||||
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
|
|
||||||
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
|
|
||||||
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
|
|
||||||
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
|
|
||||||
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
|
|
||||||
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
|
|
||||||
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
|
|
||||||
"clone_url": "https://github.com/octocat/Hello-World.git",
|
|
||||||
"mirror_url": "git:git.example.com/octocat/Hello-World",
|
|
||||||
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
|
|
||||||
"svn_url": "https://svn.github.com/octocat/Hello-World",
|
|
||||||
"homepage": "https://github.com",
|
|
||||||
"language": null,
|
|
||||||
"forks_count": 9,
|
|
||||||
"stargazers_count": 80,
|
|
||||||
"watchers_count": 80,
|
|
||||||
"size": 108,
|
|
||||||
"default_branch": "master",
|
|
||||||
"open_issues_count": 0,
|
|
||||||
"is_template": true,
|
|
||||||
"topics": [
|
|
||||||
"octocat",
|
|
||||||
"atom",
|
|
||||||
"electron",
|
|
||||||
"api"
|
|
||||||
],
|
|
||||||
"has_issues": true,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_downloads": true,
|
|
||||||
"archived": false,
|
|
||||||
"disabled": false,
|
|
||||||
"visibility": "public",
|
|
||||||
"pushed_at": "2011-01-26T19:06:43Z",
|
|
||||||
"created_at": "2011-01-26T19:01:12Z",
|
|
||||||
"updated_at": "2011-01-26T19:14:43Z",
|
|
||||||
"permissions": {
|
|
||||||
"pull": true,
|
|
||||||
"triage": true,
|
|
||||||
"push": false,
|
|
||||||
"maintain": false,
|
|
||||||
"admin": false
|
|
||||||
},
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"template_repository": null,
|
|
||||||
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"delete_branch_on_merge": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"subscribers_count": 42,
|
|
||||||
"network_count": 0,
|
|
||||||
"license": {
|
|
||||||
"key": "mit",
|
|
||||||
"name": "MIT License",
|
|
||||||
"spdx_id": "MIT",
|
|
||||||
"url": "https://api.github.com/licenses/mit",
|
|
||||||
"node_id": "MDc6TGljZW5zZW1pdA=="
|
|
||||||
},
|
|
||||||
"organization": {
|
|
||||||
"login": "octocat",
|
|
||||||
"id": 1,
|
|
||||||
"node_id": "MDQ6VXNlcjE=",
|
|
||||||
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"url": "https://api.github.com/users/octocat",
|
|
||||||
"html_url": "https://github.com/octocat",
|
|
||||||
"followers_url": "https://api.github.com/users/octocat/followers",
|
|
||||||
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
|
||||||
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
|
||||||
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
|
||||||
"repos_url": "https://api.github.com/users/octocat/repos",
|
|
||||||
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
|
||||||
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
|
||||||
"type": "Organization",
|
|
||||||
"site_admin": false
|
|
||||||
},
|
|
||||||
"parent": {
|
|
||||||
"id": 1296269,
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
|
|
||||||
"name": "Hello-World",
|
|
||||||
"full_name": "octocat/Hello-World",
|
|
||||||
"owner": {
|
|
||||||
"login": "octocat",
|
|
||||||
"id": 1,
|
|
||||||
"node_id": "MDQ6VXNlcjE=",
|
|
||||||
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"url": "https://api.github.com/users/octocat",
|
|
||||||
"html_url": "https://github.com/octocat",
|
|
||||||
"followers_url": "https://api.github.com/users/octocat/followers",
|
|
||||||
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
|
||||||
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
|
||||||
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
|
||||||
"repos_url": "https://api.github.com/users/octocat/repos",
|
|
||||||
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
|
||||||
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
|
||||||
"type": "User",
|
|
||||||
"site_admin": false
|
|
||||||
},
|
|
||||||
"private": false,
|
|
||||||
"html_url": "https://github.com/octocat/Hello-World",
|
|
||||||
"description": "This your first repo!",
|
|
||||||
"fork": false,
|
|
||||||
"url": "https://api.github.com/repos/octocat/Hello-World",
|
|
||||||
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
|
|
||||||
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
|
|
||||||
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
|
|
||||||
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
|
|
||||||
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
|
|
||||||
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
|
|
||||||
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
|
|
||||||
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
|
|
||||||
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
|
|
||||||
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
|
|
||||||
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
|
|
||||||
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
|
|
||||||
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
|
|
||||||
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
|
|
||||||
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
|
|
||||||
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
|
|
||||||
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
|
|
||||||
"git_url": "git:github.com/octocat/Hello-World.git",
|
|
||||||
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
|
|
||||||
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
|
|
||||||
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
|
|
||||||
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
|
|
||||||
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
|
|
||||||
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
|
|
||||||
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
|
|
||||||
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
|
|
||||||
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
|
|
||||||
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
|
|
||||||
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
|
|
||||||
"ssh_url": "git@github.com:octocat/Hello-World.git",
|
|
||||||
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
|
|
||||||
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
|
|
||||||
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
|
|
||||||
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
|
|
||||||
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
|
|
||||||
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
|
|
||||||
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
|
|
||||||
"clone_url": "https://github.com/octocat/Hello-World.git",
|
|
||||||
"mirror_url": "git:git.example.com/octocat/Hello-World",
|
|
||||||
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
|
|
||||||
"svn_url": "https://svn.github.com/octocat/Hello-World",
|
|
||||||
"homepage": "https://github.com",
|
|
||||||
"language": null,
|
|
||||||
"forks_count": 9,
|
|
||||||
"stargazers_count": 80,
|
|
||||||
"watchers_count": 80,
|
|
||||||
"size": 108,
|
|
||||||
"default_branch": "master",
|
|
||||||
"open_issues_count": 0,
|
|
||||||
"is_template": true,
|
|
||||||
"topics": [
|
|
||||||
"octocat",
|
|
||||||
"atom",
|
|
||||||
"electron",
|
|
||||||
"api"
|
|
||||||
],
|
|
||||||
"has_issues": true,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_downloads": true,
|
|
||||||
"archived": false,
|
|
||||||
"disabled": false,
|
|
||||||
"visibility": "public",
|
|
||||||
"pushed_at": "2011-01-26T19:06:43Z",
|
|
||||||
"created_at": "2011-01-26T19:01:12Z",
|
|
||||||
"updated_at": "2011-01-26T19:14:43Z",
|
|
||||||
"permissions": {
|
|
||||||
"admin": false,
|
|
||||||
"push": false,
|
|
||||||
"pull": true
|
|
||||||
},
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"template_repository": null,
|
|
||||||
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"delete_branch_on_merge": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"subscribers_count": 42,
|
|
||||||
"network_count": 0
|
|
||||||
},
|
|
||||||
"source": {
|
|
||||||
"id": 1296269,
|
|
||||||
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
|
|
||||||
"name": "Hello-World",
|
|
||||||
"full_name": "octocat/Hello-World",
|
|
||||||
"owner": {
|
|
||||||
"login": "octocat",
|
|
||||||
"id": 1,
|
|
||||||
"node_id": "MDQ6VXNlcjE=",
|
|
||||||
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
|
||||||
"gravatar_id": "",
|
|
||||||
"url": "https://api.github.com/users/octocat",
|
|
||||||
"html_url": "https://github.com/octocat",
|
|
||||||
"followers_url": "https://api.github.com/users/octocat/followers",
|
|
||||||
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
|
||||||
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
|
||||||
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
|
||||||
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
|
||||||
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
|
||||||
"repos_url": "https://api.github.com/users/octocat/repos",
|
|
||||||
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
|
||||||
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
|
||||||
"type": "User",
|
|
||||||
"site_admin": false
|
|
||||||
},
|
|
||||||
"private": false,
|
|
||||||
"html_url": "https://github.com/octocat/Hello-World",
|
|
||||||
"description": "This your first repo!",
|
|
||||||
"fork": false,
|
|
||||||
"url": "https://api.github.com/repos/octocat/Hello-World",
|
|
||||||
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
|
|
||||||
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
|
|
||||||
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
|
|
||||||
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
|
|
||||||
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
|
|
||||||
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
|
|
||||||
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
|
|
||||||
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
|
|
||||||
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
|
|
||||||
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
|
|
||||||
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
|
|
||||||
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
|
|
||||||
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
|
|
||||||
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
|
|
||||||
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
|
|
||||||
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
|
|
||||||
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
|
|
||||||
"git_url": "git:github.com/octocat/Hello-World.git",
|
|
||||||
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
|
|
||||||
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
|
|
||||||
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
|
|
||||||
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
|
|
||||||
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
|
|
||||||
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
|
|
||||||
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
|
|
||||||
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
|
|
||||||
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
|
|
||||||
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
|
|
||||||
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
|
|
||||||
"ssh_url": "git@github.com:octocat/Hello-World.git",
|
|
||||||
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
|
|
||||||
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
|
|
||||||
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
|
|
||||||
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
|
|
||||||
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
|
|
||||||
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
|
|
||||||
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
|
|
||||||
"clone_url": "https://github.com/octocat/Hello-World.git",
|
|
||||||
"mirror_url": "git:git.example.com/octocat/Hello-World",
|
|
||||||
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
|
|
||||||
"svn_url": "https://svn.github.com/octocat/Hello-World",
|
|
||||||
"homepage": "https://github.com",
|
|
||||||
"language": null,
|
|
||||||
"forks_count": 9,
|
|
||||||
"stargazers_count": 80,
|
|
||||||
"watchers_count": 80,
|
|
||||||
"size": 108,
|
|
||||||
"default_branch": "master",
|
|
||||||
"open_issues_count": 0,
|
|
||||||
"is_template": true,
|
|
||||||
"topics": [
|
|
||||||
"octocat",
|
|
||||||
"atom",
|
|
||||||
"electron",
|
|
||||||
"api"
|
|
||||||
],
|
|
||||||
"has_issues": true,
|
|
||||||
"has_projects": true,
|
|
||||||
"has_wiki": true,
|
|
||||||
"has_pages": false,
|
|
||||||
"has_downloads": true,
|
|
||||||
"archived": false,
|
|
||||||
"disabled": false,
|
|
||||||
"visibility": "public",
|
|
||||||
"pushed_at": "2011-01-26T19:06:43Z",
|
|
||||||
"created_at": "2011-01-26T19:01:12Z",
|
|
||||||
"updated_at": "2011-01-26T19:14:43Z",
|
|
||||||
"permissions": {
|
|
||||||
"admin": false,
|
|
||||||
"push": false,
|
|
||||||
"pull": true
|
|
||||||
},
|
|
||||||
"allow_rebase_merge": true,
|
|
||||||
"template_repository": null,
|
|
||||||
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
|
|
||||||
"allow_squash_merge": true,
|
|
||||||
"delete_branch_on_merge": true,
|
|
||||||
"allow_merge_commit": true,
|
|
||||||
"subscribers_count": 42,
|
|
||||||
"network_count": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
import fs from 'node:fs';
|
||||||
|
import os from 'node:os';
|
||||||
|
import path from 'node:path';
|
||||||
|
import {vi} from 'vitest';
|
||||||
|
|
||||||
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-build-push-action-'));
|
||||||
|
|
||||||
|
const githubPayload = {
|
||||||
|
repository: {
|
||||||
|
private: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const githubEventPath = path.join(tmpDir, 'github-event.json');
|
||||||
|
fs.writeFileSync(githubEventPath, JSON.stringify(githubPayload));
|
||||||
|
|
||||||
|
process.env = Object.assign({}, process.env, {
|
||||||
|
TEMP: tmpDir,
|
||||||
|
GITHUB_REPOSITORY: 'docker/build-push-action',
|
||||||
|
GITHUB_REF: 'refs/heads/master',
|
||||||
|
GITHUB_RUN_ID: '123456789',
|
||||||
|
GITHUB_RUN_ATTEMPT: '1',
|
||||||
|
GITHUB_EVENT_PATH: githubEventPath,
|
||||||
|
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
||||||
|
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
||||||
|
});
|
||||||
|
|
||||||
|
vi.mock('@actions/github', () => ({
|
||||||
|
context: {
|
||||||
|
repo: {
|
||||||
|
owner: 'docker',
|
||||||
|
repo: 'build-push-action'
|
||||||
|
},
|
||||||
|
ref: 'refs/heads/master',
|
||||||
|
runId: 123456789,
|
||||||
|
payload: githubPayload
|
||||||
|
},
|
||||||
|
getOctokit: vi.fn()
|
||||||
|
}));
|
||||||
@ -0,0 +1,301 @@
|
|||||||
|
export const id = 606;
|
||||||
|
export const ids = [606];
|
||||||
|
export const modules = {
|
||||||
|
|
||||||
|
/***/ 606:
|
||||||
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||||||
|
|
||||||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||||
|
/* harmony export */ "default": () => (/* binding */ pMap)
|
||||||
|
/* harmony export */ });
|
||||||
|
/* unused harmony exports pMapIterable, pMapSkip */
|
||||||
|
async function pMap(
|
||||||
|
iterable,
|
||||||
|
mapper,
|
||||||
|
{
|
||||||
|
concurrency = Number.POSITIVE_INFINITY,
|
||||||
|
stopOnError = true,
|
||||||
|
signal,
|
||||||
|
} = {},
|
||||||
|
) {
|
||||||
|
return new Promise((resolve_, reject_) => {
|
||||||
|
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
||||||
|
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof mapper !== 'function') {
|
||||||
|
throw new TypeError('Mapper function is required');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
||||||
|
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = [];
|
||||||
|
const errors = [];
|
||||||
|
const skippedIndexesMap = new Map();
|
||||||
|
let isRejected = false;
|
||||||
|
let isResolved = false;
|
||||||
|
let isIterableDone = false;
|
||||||
|
let resolvingCount = 0;
|
||||||
|
let currentIndex = 0;
|
||||||
|
const iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
||||||
|
|
||||||
|
const signalListener = () => {
|
||||||
|
reject(signal.reason);
|
||||||
|
};
|
||||||
|
|
||||||
|
const cleanup = () => {
|
||||||
|
signal?.removeEventListener('abort', signalListener);
|
||||||
|
};
|
||||||
|
|
||||||
|
const resolve = value => {
|
||||||
|
resolve_(value);
|
||||||
|
cleanup();
|
||||||
|
};
|
||||||
|
|
||||||
|
const reject = reason => {
|
||||||
|
isRejected = true;
|
||||||
|
isResolved = true;
|
||||||
|
reject_(reason);
|
||||||
|
cleanup();
|
||||||
|
};
|
||||||
|
|
||||||
|
if (signal) {
|
||||||
|
if (signal.aborted) {
|
||||||
|
reject(signal.reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
signal.addEventListener('abort', signalListener, {once: true});
|
||||||
|
}
|
||||||
|
|
||||||
|
const next = async () => {
|
||||||
|
if (isResolved) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const nextItem = await iterator.next();
|
||||||
|
|
||||||
|
const index = currentIndex;
|
||||||
|
currentIndex++;
|
||||||
|
|
||||||
|
// Note: `iterator.next()` can be called many times in parallel.
|
||||||
|
// This can cause multiple calls to this `next()` function to
|
||||||
|
// receive a `nextItem` with `done === true`.
|
||||||
|
// The shutdown logic that rejects/resolves must be protected
|
||||||
|
// so it runs only one time as the `skippedIndex` logic is
|
||||||
|
// non-idempotent.
|
||||||
|
if (nextItem.done) {
|
||||||
|
isIterableDone = true;
|
||||||
|
|
||||||
|
if (resolvingCount === 0 && !isResolved) {
|
||||||
|
if (!stopOnError && errors.length > 0) {
|
||||||
|
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isResolved = true;
|
||||||
|
|
||||||
|
if (skippedIndexesMap.size === 0) {
|
||||||
|
resolve(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pureResult = [];
|
||||||
|
|
||||||
|
// Support multiple `pMapSkip`'s.
|
||||||
|
for (const [index, value] of result.entries()) {
|
||||||
|
if (skippedIndexesMap.get(index) === pMapSkip) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pureResult.push(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve(pureResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
resolvingCount++;
|
||||||
|
|
||||||
|
// Intentionally detached
|
||||||
|
(async () => {
|
||||||
|
try {
|
||||||
|
const element = await nextItem.value;
|
||||||
|
|
||||||
|
if (isResolved) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const value = await mapper(element, index);
|
||||||
|
|
||||||
|
// Use Map to stage the index of the element.
|
||||||
|
if (value === pMapSkip) {
|
||||||
|
skippedIndexesMap.set(index, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
result[index] = value;
|
||||||
|
|
||||||
|
resolvingCount--;
|
||||||
|
await next();
|
||||||
|
} catch (error) {
|
||||||
|
if (stopOnError) {
|
||||||
|
reject(error);
|
||||||
|
} else {
|
||||||
|
errors.push(error);
|
||||||
|
resolvingCount--;
|
||||||
|
|
||||||
|
// In that case we can't really continue regardless of `stopOnError` state
|
||||||
|
// since an iterable is likely to continue throwing after it throws once.
|
||||||
|
// If we continue calling `next()` indefinitely we will likely end up
|
||||||
|
// in an infinite loop of failed iteration.
|
||||||
|
try {
|
||||||
|
await next();
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Create the concurrent runners in a detached (non-awaited)
|
||||||
|
// promise. We need this so we can await the `next()` calls
|
||||||
|
// to stop creating runners before hitting the concurrency limit
|
||||||
|
// if the iterable has already been marked as done.
|
||||||
|
// NOTE: We *must* do this for async iterators otherwise we'll spin up
|
||||||
|
// infinite `next()` calls by default and never start the event loop.
|
||||||
|
(async () => {
|
||||||
|
for (let index = 0; index < concurrency; index++) {
|
||||||
|
try {
|
||||||
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
await next();
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isIterableDone || isRejected) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function pMapIterable(
|
||||||
|
iterable,
|
||||||
|
mapper,
|
||||||
|
{
|
||||||
|
concurrency = Number.POSITIVE_INFINITY,
|
||||||
|
backpressure = concurrency,
|
||||||
|
} = {},
|
||||||
|
) {
|
||||||
|
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
||||||
|
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof mapper !== 'function') {
|
||||||
|
throw new TypeError('Mapper function is required');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
||||||
|
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {
|
||||||
|
throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${concurrency}) and up or \`Infinity\`, got \`${backpressure}\` (${typeof backpressure})`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
async * [Symbol.asyncIterator]() {
|
||||||
|
const iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
|
||||||
|
|
||||||
|
const promises = [];
|
||||||
|
let pendingPromisesCount = 0;
|
||||||
|
let isDone = false;
|
||||||
|
let index = 0;
|
||||||
|
|
||||||
|
function trySpawn() {
|
||||||
|
if (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pendingPromisesCount++;
|
||||||
|
|
||||||
|
const promise = (async () => {
|
||||||
|
const {done, value} = await iterator.next();
|
||||||
|
|
||||||
|
if (done) {
|
||||||
|
pendingPromisesCount--;
|
||||||
|
return {done: true};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spawn if still below concurrency and backpressure limit
|
||||||
|
trySpawn();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const returnValue = await mapper(await value, index++);
|
||||||
|
|
||||||
|
pendingPromisesCount--;
|
||||||
|
|
||||||
|
if (returnValue === pMapSkip) {
|
||||||
|
const index = promises.indexOf(promise);
|
||||||
|
|
||||||
|
if (index > 0) {
|
||||||
|
promises.splice(index, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spawn if still below backpressure limit and just dropped below concurrency limit
|
||||||
|
trySpawn();
|
||||||
|
|
||||||
|
return {done: false, value: returnValue};
|
||||||
|
} catch (error) {
|
||||||
|
pendingPromisesCount--;
|
||||||
|
isDone = true;
|
||||||
|
return {error};
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
promises.push(promise);
|
||||||
|
}
|
||||||
|
|
||||||
|
trySpawn();
|
||||||
|
|
||||||
|
while (promises.length > 0) {
|
||||||
|
const {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop
|
||||||
|
|
||||||
|
promises.shift();
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (done) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spawn if just dropped below backpressure limit and below the concurrency limit
|
||||||
|
trySpawn();
|
||||||
|
|
||||||
|
if (value === pMapSkip) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
yield value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const pMapSkip = Symbol('skip');
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//# sourceMappingURL=606.index.js.map
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"type": "module"
|
||||||
|
}
|
||||||
@ -1,58 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
||||||
const {defineConfig, globalIgnores} = require('eslint/config');
|
|
||||||
const {fixupConfigRules, fixupPluginRules} = require('@eslint/compat');
|
|
||||||
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
|
|
||||||
const jestPlugin = require('eslint-plugin-jest');
|
|
||||||
const prettier = require('eslint-plugin-prettier');
|
|
||||||
const globals = require('globals');
|
|
||||||
const tsParser = require('@typescript-eslint/parser');
|
|
||||||
const js = require('@eslint/js');
|
|
||||||
const {FlatCompat} = require('@eslint/eslintrc');
|
|
||||||
|
|
||||||
// __dirname and __filename exist natively in CommonJS
|
|
||||||
const compat = new FlatCompat({
|
|
||||||
baseDirectory: __dirname,
|
|
||||||
recommendedConfig: js.configs.recommended,
|
|
||||||
allConfig: js.configs.all
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = defineConfig([
|
|
||||||
globalIgnores(['dist/**/*', 'coverage/**/*', 'node_modules/**/*']),
|
|
||||||
{
|
|
||||||
// prettier-ignore
|
|
||||||
extends: fixupConfigRules(
|
|
||||||
compat.extends(
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:@typescript-eslint/eslint-recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'plugin:jest/recommended',
|
|
||||||
'plugin:prettier/recommended'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
plugins: {
|
|
||||||
'@typescript-eslint': fixupPluginRules(typescriptEslint),
|
|
||||||
jest: fixupPluginRules(jestPlugin),
|
|
||||||
prettier: fixupPluginRules(prettier)
|
|
||||||
},
|
|
||||||
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
...globals.jest
|
|
||||||
},
|
|
||||||
parser: tsParser,
|
|
||||||
ecmaVersion: 'latest',
|
|
||||||
sourceType: 'module'
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
'@typescript-eslint/no-require-imports': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
allowAsImport: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
import {defineConfig} from 'eslint/config';
|
||||||
|
import js from '@eslint/js';
|
||||||
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
||||||
|
import vitest from '@vitest/eslint-plugin';
|
||||||
|
import globals from 'globals';
|
||||||
|
import eslintConfigPrettier from 'eslint-config-prettier/flat';
|
||||||
|
import eslintPluginPrettier from 'eslint-plugin-prettier';
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
ignores: ['.yarn/**/*', 'coverage/**/*', 'dist/**/*']
|
||||||
|
},
|
||||||
|
js.configs.recommended,
|
||||||
|
...tseslint.configs['flat/recommended'],
|
||||||
|
eslintConfigPrettier,
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['__tests__/**'],
|
||||||
|
...vitest.configs.recommended,
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node,
|
||||||
|
...vitest.environments.env.globals
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
...vitest.configs.recommended.rules,
|
||||||
|
'vitest/no-conditional-expect': 'error',
|
||||||
|
'vitest/no-disabled-tests': 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
plugins: {
|
||||||
|
prettier: eslintPluginPrettier
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'prettier/prettier': 'error',
|
||||||
|
'@typescript-eslint/no-require-imports': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
allowAsImport: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
@ -1,29 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
||||||
const fs = require('fs');
|
|
||||||
const os = require('os');
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-build-push-action-'));
|
|
||||||
|
|
||||||
process.env = Object.assign({}, process.env, {
|
|
||||||
TEMP: tmpDir,
|
|
||||||
GITHUB_REPOSITORY: 'docker/build-push-action',
|
|
||||||
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
|
||||||
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
clearMocks: false,
|
|
||||||
testEnvironment: 'node',
|
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
|
||||||
testMatch: ['**/*.test.ts'],
|
|
||||||
transform: {
|
|
||||||
'^.+\\.ts$': 'ts-jest'
|
|
||||||
},
|
|
||||||
moduleNameMapper: {
|
|
||||||
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
|
|
||||||
},
|
|
||||||
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
|
|
||||||
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
|
|
||||||
verbose: true
|
|
||||||
};
|
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
import {defineConfig} from 'vitest/config';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
clearMocks: true,
|
||||||
|
environment: 'node',
|
||||||
|
setupFiles: ['./__tests__/setup.unit.ts'],
|
||||||
|
include: ['**/*.test.ts'],
|
||||||
|
coverage: {
|
||||||
|
provider: 'v8',
|
||||||
|
reporter: ['clover'],
|
||||||
|
include: ['src/**/*.ts'],
|
||||||
|
exclude: ['src/**/main.ts']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue