mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 03:57:27 +00:00
Expose all actions toolkit packages
This commit is contained in:
parent
b251c3e139
commit
481922faaa
6 changed files with 71446 additions and 172 deletions
61626
dist/index.js
vendored
61626
dist/index.js
vendored
File diff suppressed because one or more lines are too long
9970
package-lock.json
generated
9970
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -35,9 +35,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@actions/artifact": "^0.5.0",
|
||||||
|
"@actions/cache": "^1.0.6",
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
|
"@actions/glob": "^0.1.1",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
|
"@actions/tool-cache": "^1.6.1",
|
||||||
"@octokit/core": "^3.2.1",
|
"@octokit/core": "^3.2.1",
|
||||||
"@octokit/plugin-paginate-rest": "^2.6.0",
|
"@octokit/plugin-paginate-rest": "^2.6.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "4.2.1"
|
"@octokit/plugin-rest-endpoint-methods": "4.2.1"
|
||||||
|
|
|
||||||
8
src/actions.ts
Normal file
8
src/actions.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
export * as artifact from '@actions/artifact'
|
||||||
|
export * as cache from '@actions/cache'
|
||||||
|
export * as core from '@actions/core'
|
||||||
|
export * as exec from '@actions/exec'
|
||||||
|
export * as github from '@actions/github'
|
||||||
|
export * as glob from '@actions/glob'
|
||||||
|
export * as io from '@actions/io'
|
||||||
|
export * as toolCache from '@actions/tool-cache'
|
||||||
|
|
@ -2,10 +2,12 @@ import * as core from '@actions/core'
|
||||||
import {Context} from '@actions/github/lib/context'
|
import {Context} from '@actions/github/lib/context'
|
||||||
import {GitHub} from '@actions/github/lib/utils'
|
import {GitHub} from '@actions/github/lib/utils'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
|
import * as actions from './actions'
|
||||||
|
|
||||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||||
|
|
||||||
type AsyncFunctionArguments = {
|
type AsyncFunctionArguments = {
|
||||||
|
actions: typeof actions
|
||||||
context: Context
|
context: Context
|
||||||
core: typeof core
|
core: typeof core
|
||||||
github: InstanceType<typeof GitHub>
|
github: InstanceType<typeof GitHub>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {context, getOctokit} from '@actions/github'
|
import {context, getOctokit} from '@actions/github'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
|
import * as actions from './actions'
|
||||||
import {callAsyncFunction} from './async-function'
|
import {callAsyncFunction} from './async-function'
|
||||||
|
|
||||||
process.on('unhandledRejection', handleError)
|
process.on('unhandledRejection', handleError)
|
||||||
|
|
@ -28,7 +29,7 @@ async function main(): Promise<void> {
|
||||||
|
|
||||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||||
const result = await callAsyncFunction(
|
const result = await callAsyncFunction(
|
||||||
{require: require, github, context, core, io},
|
{require: require, github, context, core, io, actions},
|
||||||
script
|
script
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue