@actions/core
Advanced tools
+6
-43
@@ -1,40 +0,3 @@ | ||
| "use strict"; | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.issueCommand = issueCommand; | ||
| exports.issue = issue; | ||
| const os = __importStar(require("os")); | ||
| const utils_1 = require("./utils"); | ||
| import * as os from 'os'; | ||
| import { toCommandValue } from './utils.js'; | ||
| /** | ||
@@ -73,7 +36,7 @@ * Issues a command to the GitHub Actions runner | ||
| */ | ||
| function issueCommand(command, properties, message) { | ||
| export function issueCommand(command, properties, message) { | ||
| const cmd = new Command(command, properties, message); | ||
| process.stdout.write(cmd.toString() + os.EOL); | ||
| } | ||
| function issue(name, message = '') { | ||
| export function issue(name, message = '') { | ||
| issueCommand(name, {}, message); | ||
@@ -116,3 +79,3 @@ } | ||
| function escapeData(s) { | ||
| return (0, utils_1.toCommandValue)(s) | ||
| return toCommandValue(s) | ||
| .replace(/%/g, '%25') | ||
@@ -123,3 +86,3 @@ .replace(/\r/g, '%0D') | ||
| function escapeProperty(s) { | ||
| return (0, utils_1.toCommandValue)(s) | ||
| return toCommandValue(s) | ||
| .replace(/%/g, '%25') | ||
@@ -126,0 +89,0 @@ .replace(/\r/g, '%0D') |
+4
-4
@@ -215,14 +215,14 @@ /** | ||
| */ | ||
| export { summary } from './summary'; | ||
| export { summary } from './summary.js'; | ||
| /** | ||
| * @deprecated use core.summary | ||
| */ | ||
| export { markdownSummary } from './summary'; | ||
| export { markdownSummary } from './summary.js'; | ||
| /** | ||
| * Path exports | ||
| */ | ||
| export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils'; | ||
| export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils.js'; | ||
| /** | ||
| * Platform utilities exports | ||
| */ | ||
| export * as platform from './platform'; | ||
| export * as platform from './platform.js'; |
+51
-113
@@ -1,35 +0,1 @@ | ||
| "use strict"; | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -44,35 +10,12 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.ExitCode = void 0; | ||
| exports.exportVariable = exportVariable; | ||
| exports.setSecret = setSecret; | ||
| exports.addPath = addPath; | ||
| exports.getInput = getInput; | ||
| exports.getMultilineInput = getMultilineInput; | ||
| exports.getBooleanInput = getBooleanInput; | ||
| exports.setOutput = setOutput; | ||
| exports.setCommandEcho = setCommandEcho; | ||
| exports.setFailed = setFailed; | ||
| exports.isDebug = isDebug; | ||
| exports.debug = debug; | ||
| exports.error = error; | ||
| exports.warning = warning; | ||
| exports.notice = notice; | ||
| exports.info = info; | ||
| exports.startGroup = startGroup; | ||
| exports.endGroup = endGroup; | ||
| exports.group = group; | ||
| exports.saveState = saveState; | ||
| exports.getState = getState; | ||
| exports.getIDToken = getIDToken; | ||
| const command_1 = require("./command"); | ||
| const file_command_1 = require("./file-command"); | ||
| const utils_1 = require("./utils"); | ||
| const os = __importStar(require("os")); | ||
| const path = __importStar(require("path")); | ||
| const oidc_utils_1 = require("./oidc-utils"); | ||
| import { issue, issueCommand } from './command.js'; | ||
| import { issueFileCommand, prepareKeyValueMessage } from './file-command.js'; | ||
| import { toCommandProperties, toCommandValue } from './utils.js'; | ||
| import * as os from 'os'; | ||
| import * as path from 'path'; | ||
| import { OidcClient } from './oidc-utils.js'; | ||
| /** | ||
| * The code to exit an action | ||
| */ | ||
| var ExitCode; | ||
| export var ExitCode; | ||
| (function (ExitCode) { | ||
@@ -87,3 +30,3 @@ /** | ||
| ExitCode[ExitCode["Failure"] = 1] = "Failure"; | ||
| })(ExitCode || (exports.ExitCode = ExitCode = {})); | ||
| })(ExitCode || (ExitCode = {})); | ||
| //----------------------------------------------------------------------- | ||
@@ -98,10 +41,10 @@ // Variables | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| function exportVariable(name, val) { | ||
| const convertedVal = (0, utils_1.toCommandValue)(val); | ||
| export function exportVariable(name, val) { | ||
| const convertedVal = toCommandValue(val); | ||
| process.env[name] = convertedVal; | ||
| const filePath = process.env['GITHUB_ENV'] || ''; | ||
| if (filePath) { | ||
| return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); | ||
| return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); | ||
| } | ||
| (0, command_1.issueCommand)('set-env', { name }, convertedVal); | ||
| issueCommand('set-env', { name }, convertedVal); | ||
| } | ||
@@ -137,4 +80,4 @@ /** | ||
| */ | ||
| function setSecret(secret) { | ||
| (0, command_1.issueCommand)('add-mask', {}, secret); | ||
| export function setSecret(secret) { | ||
| issueCommand('add-mask', {}, secret); | ||
| } | ||
@@ -145,9 +88,9 @@ /** | ||
| */ | ||
| function addPath(inputPath) { | ||
| export function addPath(inputPath) { | ||
| const filePath = process.env['GITHUB_PATH'] || ''; | ||
| if (filePath) { | ||
| (0, file_command_1.issueFileCommand)('PATH', inputPath); | ||
| issueFileCommand('PATH', inputPath); | ||
| } | ||
| else { | ||
| (0, command_1.issueCommand)('add-path', {}, inputPath); | ||
| issueCommand('add-path', {}, inputPath); | ||
| } | ||
@@ -165,3 +108,3 @@ process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; | ||
| */ | ||
| function getInput(name, options) { | ||
| export function getInput(name, options) { | ||
| const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; | ||
@@ -184,3 +127,3 @@ if (options && options.required && !val) { | ||
| */ | ||
| function getMultilineInput(name, options) { | ||
| export function getMultilineInput(name, options) { | ||
| const inputs = getInput(name, options) | ||
@@ -204,3 +147,3 @@ .split('\n') | ||
| */ | ||
| function getBooleanInput(name, options) { | ||
| export function getBooleanInput(name, options) { | ||
| const trueValue = ['true', 'True', 'TRUE']; | ||
@@ -223,9 +166,9 @@ const falseValue = ['false', 'False', 'FALSE']; | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| function setOutput(name, value) { | ||
| export function setOutput(name, value) { | ||
| const filePath = process.env['GITHUB_OUTPUT'] || ''; | ||
| if (filePath) { | ||
| return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); | ||
| return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value)); | ||
| } | ||
| process.stdout.write(os.EOL); | ||
| (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); | ||
| issueCommand('set-output', { name }, toCommandValue(value)); | ||
| } | ||
@@ -237,4 +180,4 @@ /** | ||
| */ | ||
| function setCommandEcho(enabled) { | ||
| (0, command_1.issue)('echo', enabled ? 'on' : 'off'); | ||
| export function setCommandEcho(enabled) { | ||
| issue('echo', enabled ? 'on' : 'off'); | ||
| } | ||
@@ -249,3 +192,3 @@ //----------------------------------------------------------------------- | ||
| */ | ||
| function setFailed(message) { | ||
| export function setFailed(message) { | ||
| process.exitCode = ExitCode.Failure; | ||
@@ -260,3 +203,3 @@ error(message); | ||
| */ | ||
| function isDebug() { | ||
| export function isDebug() { | ||
| return process.env['RUNNER_DEBUG'] === '1'; | ||
@@ -268,4 +211,4 @@ } | ||
| */ | ||
| function debug(message) { | ||
| (0, command_1.issueCommand)('debug', {}, message); | ||
| export function debug(message) { | ||
| issueCommand('debug', {}, message); | ||
| } | ||
@@ -277,4 +220,4 @@ /** | ||
| */ | ||
| function error(message, properties = {}) { | ||
| (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); | ||
| export function error(message, properties = {}) { | ||
| issueCommand('error', toCommandProperties(properties), message instanceof Error ? message.toString() : message); | ||
| } | ||
@@ -286,4 +229,4 @@ /** | ||
| */ | ||
| function warning(message, properties = {}) { | ||
| (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); | ||
| export function warning(message, properties = {}) { | ||
| issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message); | ||
| } | ||
@@ -295,4 +238,4 @@ /** | ||
| */ | ||
| function notice(message, properties = {}) { | ||
| (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); | ||
| export function notice(message, properties = {}) { | ||
| issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); | ||
| } | ||
@@ -303,3 +246,3 @@ /** | ||
| */ | ||
| function info(message) { | ||
| export function info(message) { | ||
| process.stdout.write(message + os.EOL); | ||
@@ -314,4 +257,4 @@ } | ||
| */ | ||
| function startGroup(name) { | ||
| (0, command_1.issue)('group', name); | ||
| export function startGroup(name) { | ||
| issue('group', name); | ||
| } | ||
@@ -321,4 +264,4 @@ /** | ||
| */ | ||
| function endGroup() { | ||
| (0, command_1.issue)('endgroup'); | ||
| export function endGroup() { | ||
| issue('endgroup'); | ||
| } | ||
@@ -333,3 +276,3 @@ /** | ||
| */ | ||
| function group(name, fn) { | ||
| export function group(name, fn) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
@@ -357,8 +300,8 @@ startGroup(name); | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| function saveState(name, value) { | ||
| export function saveState(name, value) { | ||
| const filePath = process.env['GITHUB_STATE'] || ''; | ||
| if (filePath) { | ||
| return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); | ||
| return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); | ||
| } | ||
| (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); | ||
| issueCommand('save-state', { name }, toCommandValue(value)); | ||
| } | ||
@@ -371,8 +314,8 @@ /** | ||
| */ | ||
| function getState(name) { | ||
| export function getState(name) { | ||
| return process.env[`STATE_${name}`] || ''; | ||
| } | ||
| function getIDToken(aud) { | ||
| export function getIDToken(aud) { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return yield oidc_utils_1.OidcClient.getIDToken(aud); | ||
| return yield OidcClient.getIDToken(aud); | ||
| }); | ||
@@ -383,20 +326,15 @@ } | ||
| */ | ||
| var summary_1 = require("./summary"); | ||
| Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } }); | ||
| export { summary } from './summary.js'; | ||
| /** | ||
| * @deprecated use core.summary | ||
| */ | ||
| var summary_2 = require("./summary"); | ||
| Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); | ||
| export { markdownSummary } from './summary.js'; | ||
| /** | ||
| * Path exports | ||
| */ | ||
| var path_utils_1 = require("./path-utils"); | ||
| Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); | ||
| Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); | ||
| Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); | ||
| export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils.js'; | ||
| /** | ||
| * Platform utilities exports | ||
| */ | ||
| exports.platform = __importStar(require("./platform")); | ||
| export * as platform from './platform.js'; | ||
| //# sourceMappingURL=core.js.map |
+8
-45
@@ -1,46 +0,9 @@ | ||
| "use strict"; | ||
| // For internal use, subject to change. | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.issueFileCommand = issueFileCommand; | ||
| exports.prepareKeyValueMessage = prepareKeyValueMessage; | ||
| // We use any as a valid input type | ||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
| const crypto = __importStar(require("crypto")); | ||
| const fs = __importStar(require("fs")); | ||
| const os = __importStar(require("os")); | ||
| const utils_1 = require("./utils"); | ||
| function issueFileCommand(command, message) { | ||
| import * as crypto from 'crypto'; | ||
| import * as fs from 'fs'; | ||
| import * as os from 'os'; | ||
| import { toCommandValue } from './utils.js'; | ||
| export function issueFileCommand(command, message) { | ||
| const filePath = process.env[`GITHUB_${command}`]; | ||
@@ -53,9 +16,9 @@ if (!filePath) { | ||
| } | ||
| fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { | ||
| fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { | ||
| encoding: 'utf8' | ||
| }); | ||
| } | ||
| function prepareKeyValueMessage(key, value) { | ||
| export function prepareKeyValueMessage(key, value) { | ||
| const delimiter = `ghadelimiter_${crypto.randomUUID()}`; | ||
| const convertedValue = (0, utils_1.toCommandValue)(value); | ||
| const convertedValue = toCommandValue(value); | ||
| // These should realistically never happen, but just in case someone finds a | ||
@@ -62,0 +25,0 @@ // way to exploit uuid generation let's not allow keys or values that contain |
+7
-11
@@ -1,2 +0,1 @@ | ||
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,8 +10,6 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.OidcClient = void 0; | ||
| const http_client_1 = require("@actions/http-client"); | ||
| const auth_1 = require("@actions/http-client/lib/auth"); | ||
| const core_1 = require("./core"); | ||
| class OidcClient { | ||
| import { HttpClient } from '@actions/http-client'; | ||
| import { BearerCredentialHandler } from '@actions/http-client/lib/auth'; | ||
| import { debug, setSecret } from './core.js'; | ||
| export class OidcClient { | ||
| static createHttpClient(allowRetry = true, maxRetry = 10) { | ||
@@ -23,3 +20,3 @@ const requestOptions = { | ||
| }; | ||
| return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); | ||
| return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); | ||
| } | ||
@@ -67,5 +64,5 @@ static getRequestToken() { | ||
| } | ||
| (0, core_1.debug)(`ID token url is ${id_token_url}`); | ||
| debug(`ID token url is ${id_token_url}`); | ||
| const id_token = yield OidcClient.getCall(id_token_url); | ||
| (0, core_1.setSecret)(id_token); | ||
| setSecret(id_token); | ||
| return id_token; | ||
@@ -79,3 +76,2 @@ } | ||
| } | ||
| exports.OidcClient = OidcClient; | ||
| //# sourceMappingURL=oidc-utils.js.map |
+4
-42
@@ -1,40 +0,2 @@ | ||
| "use strict"; | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.toPosixPath = toPosixPath; | ||
| exports.toWin32Path = toWin32Path; | ||
| exports.toPlatformPath = toPlatformPath; | ||
| const path = __importStar(require("path")); | ||
| import * as path from 'path'; | ||
| /** | ||
@@ -47,3 +9,3 @@ * toPosixPath converts the given path to the posix form. On Windows, \\ will be | ||
| */ | ||
| function toPosixPath(pth) { | ||
| export function toPosixPath(pth) { | ||
| return pth.replace(/[\\]/g, '/'); | ||
@@ -58,3 +20,3 @@ } | ||
| */ | ||
| function toWin32Path(pth) { | ||
| export function toWin32Path(pth) { | ||
| return pth.replace(/[/]/g, '\\'); | ||
@@ -70,5 +32,5 @@ } | ||
| */ | ||
| function toPlatformPath(pth) { | ||
| export function toPlatformPath(pth) { | ||
| return pth.replace(/[/\\]/g, path.sep); | ||
| } | ||
| //# sourceMappingURL=path-utils.js.map |
| export declare const platform: NodeJS.Platform; | ||
| export declare const arch: string; | ||
| export declare const arch: NodeJS.Architecture; | ||
| export declare const isWindows: boolean; | ||
@@ -4,0 +4,0 @@ export declare const isMacOS: boolean; |
+15
-55
@@ -1,35 +0,1 @@ | ||
| "use strict"; | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -44,10 +10,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| }; | ||
| var __importDefault = (this && this.__importDefault) || function (mod) { | ||
| return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; | ||
| exports.getDetails = getDetails; | ||
| const os_1 = __importDefault(require("os")); | ||
| const exec = __importStar(require("@actions/exec")); | ||
| import os from 'os'; | ||
| import * as exec from '@actions/exec'; | ||
| const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -87,20 +47,20 @@ const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { | ||
| }); | ||
| exports.platform = os_1.default.platform(); | ||
| exports.arch = os_1.default.arch(); | ||
| exports.isWindows = exports.platform === 'win32'; | ||
| exports.isMacOS = exports.platform === 'darwin'; | ||
| exports.isLinux = exports.platform === 'linux'; | ||
| function getDetails() { | ||
| export const platform = os.platform(); | ||
| export const arch = os.arch(); | ||
| export const isWindows = platform === 'win32'; | ||
| export const isMacOS = platform === 'darwin'; | ||
| export const isLinux = platform === 'linux'; | ||
| export function getDetails() { | ||
| return __awaiter(this, void 0, void 0, function* () { | ||
| return Object.assign(Object.assign({}, (yield (exports.isWindows | ||
| return Object.assign(Object.assign({}, (yield (isWindows | ||
| ? getWindowsInfo() | ||
| : exports.isMacOS | ||
| : isMacOS | ||
| ? getMacOsInfo() | ||
| : getLinuxInfo()))), { platform: exports.platform, | ||
| arch: exports.arch, | ||
| isWindows: exports.isWindows, | ||
| isMacOS: exports.isMacOS, | ||
| isLinux: exports.isLinux }); | ||
| : getLinuxInfo()))), { platform, | ||
| arch, | ||
| isWindows, | ||
| isMacOS, | ||
| isLinux }); | ||
| }); | ||
| } | ||
| //# sourceMappingURL=platform.js.map |
+11
-14
@@ -1,2 +0,1 @@ | ||
| "use strict"; | ||
| var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,9 +10,7 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; | ||
| const os_1 = require("os"); | ||
| const fs_1 = require("fs"); | ||
| const { access, appendFile, writeFile } = fs_1.promises; | ||
| exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; | ||
| exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; | ||
| import { EOL } from 'os'; | ||
| import { constants, promises } from 'fs'; | ||
| const { access, appendFile, writeFile } = promises; | ||
| export const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; | ||
| export const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; | ||
| class Summary { | ||
@@ -34,8 +31,8 @@ constructor() { | ||
| } | ||
| const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; | ||
| const pathFromEnv = process.env[SUMMARY_ENV_VAR]; | ||
| if (!pathFromEnv) { | ||
| throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); | ||
| throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); | ||
| } | ||
| try { | ||
| yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); | ||
| yield access(pathFromEnv, constants.R_OK | constants.W_OK); | ||
| } | ||
@@ -136,3 +133,3 @@ catch (_a) { | ||
| addEOL() { | ||
| return this.addRaw(os_1.EOL); | ||
| return this.addRaw(EOL); | ||
| } | ||
@@ -284,4 +281,4 @@ /** | ||
| */ | ||
| exports.markdownSummary = _summary; | ||
| exports.summary = _summary; | ||
| export const markdownSummary = _summary; | ||
| export const summary = _summary; | ||
| //# sourceMappingURL=summary.js.map |
+2
-2
@@ -1,3 +0,3 @@ | ||
| import { AnnotationProperties } from './core'; | ||
| import { CommandProperties } from './command'; | ||
| import { AnnotationProperties } from './core.js'; | ||
| import { CommandProperties } from './command.js'; | ||
| /** | ||
@@ -4,0 +4,0 @@ * Sanitizes an input into a string so it can be passed into issueCommand safely |
+2
-6
@@ -1,7 +0,3 @@ | ||
| "use strict"; | ||
| // We use any as a valid input type | ||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.toCommandValue = toCommandValue; | ||
| exports.toCommandProperties = toCommandProperties; | ||
| /** | ||
@@ -11,3 +7,3 @@ * Sanitizes an input into a string so it can be passed into issueCommand safely | ||
| */ | ||
| function toCommandValue(input) { | ||
| export function toCommandValue(input) { | ||
| if (input === null || input === undefined) { | ||
@@ -27,3 +23,3 @@ return ''; | ||
| */ | ||
| function toCommandProperties(annotationProperties) { | ||
| export function toCommandProperties(annotationProperties) { | ||
| if (!Object.keys(annotationProperties).length) { | ||
@@ -30,0 +26,0 @@ return {}; |
+11
-4
| { | ||
| "name": "@actions/core", | ||
| "version": "2.0.3", | ||
| "version": "3.0.0", | ||
| "description": "Actions core lib", | ||
@@ -12,4 +12,11 @@ "keywords": [ | ||
| "license": "MIT", | ||
| "type": "module", | ||
| "main": "lib/core.js", | ||
| "types": "lib/core.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./lib/core.d.ts", | ||
| "import": "./lib/core.js" | ||
| } | ||
| }, | ||
| "directories": { | ||
@@ -40,8 +47,8 @@ "lib": "lib", | ||
| "dependencies": { | ||
| "@actions/exec": "^2.0.0", | ||
| "@actions/http-client": "^3.0.2" | ||
| "@actions/exec": "^3.0.0", | ||
| "@actions/http-client": "^4.0.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^16.18.112" | ||
| "@types/node": "^25.1.0" | ||
| } | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Yes
NaN86197
-10.26%1448
-13.45%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated