Showing preview only (2,283K chars total). Download the full file or copy to clipboard to get everything.
Repository: garygrossgarten/github-action-scp
Branch: master
Commit: ed477632dd30
Files: 17
Total size: 2.2 MB
Directory structure:
gitextract_06o2uh5w/
├── .github/
│ └── workflows/
│ └── scp-example-workflow.yml
├── .gitignore
├── .node-version
├── .prettierignore
├── .prettierrc.json
├── LICENSE
├── action.yml
├── dist/
│ ├── build/
│ │ └── Release/
│ │ └── cpufeatures.node
│ ├── index.js
│ └── lib/
│ └── protocol/
│ └── crypto/
│ └── build/
│ └── Release/
│ └── sshcrypto.node
├── lib/
│ ├── index.js
│ └── keyboard.js
├── package.json
├── readme.md
├── src/
│ ├── index.ts
│ └── keyboard.ts
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/scp-example-workflow.yml
================================================
name: scp copy folder to remote via SSH
on:
push:
branches: ['master']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
CI: true
LOCAL: test
steps:
- name: checkout
uses: actions/checkout@v6
- name: setup demo
run: |
mkdir test
touch test/oof.txt
touch test/.dot.txt
- name: Copy folder content recursively to remote
uses: ./
with:
local: test
remote: scp/directory
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.PRIVATE_KEY}}
- name: Copy folder content recursively to remote (clean directory)
uses: ./
with:
local: test
remote: scp/directory
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.PRIVATE_KEY}}
rmRemote: true
dotfiles: true
- name: Copy folder content recursively to remote (atomic put)
uses: ./
with:
local: test
remote: scp/atomic
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.PRIVATE_KEY}}
rmRemote: true
dotfiles: true
atomicPut: true
- name: Copy single file to remote
uses: ./
with:
local: test/oof.txt
remote: scp/single/readme.md
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.PRIVATE_KEY}}
- name: Copy dotfile to remote
uses: ./
with:
local: test/.dot.txt
remote: scp/single/.dot.txt
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.PRIVATE_KEY}}
dotfiles: true
- name: Copy with user/pw
uses: ./
with:
local: test/oof.txt
remote: scp/user/pw/oof.txt
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
- name: With ENV
uses: ./
with:
local: ${{ env.LOCAL }}
remote: scp/directory
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.PRIVATE_KEY}}
rmRemote: true
dotfiles: true
================================================
FILE: .gitignore
================================================
node_modules
.env
================================================
FILE: .node-version
================================================
24.14.0
================================================
FILE: .prettierignore
================================================
dist/
lib/
node_modules/
================================================
FILE: .prettierrc.json
================================================
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2018 fivethree
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: action.yml
================================================
name: Copy via ssh
author: garygrossgarten
description: Github Action to copy a folder to a remote server using SSH
inputs:
local:
description: "Path to the local folder you want to copy."
required: true
remote:
description: "Path on the remote server to copy to."
required: true
dotfiles:
description: "Determines if files with leading dot (.) on folder copy is included"
required: false
default: false
rmRemote:
description: "If it is a directory, remote files in it will be deleted before the copy is started."
required: false
concurrency:
description: "Number of concurrent file transfers."
required: false
default: 1
recursive:
description: "Wether copy of directory should be recursive"
required: false
default: true
verbose:
description: "Log status of every file copy"
required: false
default: true
host:
description: "Hostname or IP address of the server."
required: false
default: "localhost"
username:
description: "Username for authentication."
required: false
port:
description: "Port number of the server."
required: false
default: "22"
privateKey:
description: "File Location or string that contains a private key for either key-based or hostbased user authentication (OpenSSH format)"
required: false
password:
description: "Password for password-based user authentication."
required: false
passphrase:
description: "For an encrypted private key, this is the passphrase used to decrypt it."
required: false
tryKeyboard:
description: "Try keyboard-interactive user authentication if primary user authentication method fails."
required: false
atomicPut:
description: "Upload files to temporary file first, then rename once upload completed"
required: false
default: false
runs:
using: "node24"
main: "dist/index.js"
branding:
color: "purple"
icon: "copy"
================================================
FILE: dist/index.js
================================================
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 1188:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(7484));
const node_ssh_1 = __nccwpck_require__(1227);
const path_1 = __importDefault(__nccwpck_require__(6928));
const ssh2_streams_1 = __nccwpck_require__(4440);
const fs_1 = __importDefault(__nccwpck_require__(9896));
const keyboard_1 = __nccwpck_require__(7615);
const path_2 = __importDefault(__nccwpck_require__(6928));
function run() {
return __awaiter(this, void 0, void 0, function* () {
const host = core.getInput('host') || 'localhost';
const username = core.getInput('username');
const port = +core.getInput('port') || 22;
const privateKey = core.getInput('privateKey');
const password = core.getInput('password');
const passphrase = core.getInput('passphrase');
const tryKeyboard = !!core.getInput('tryKeyboard');
const verbose = !!core.getInput('verbose') || true;
const recursive = !!core.getInput('recursive') || true;
const concurrency = +core.getInput('concurrency') || 1;
const local = core.getInput('local');
const dotfiles = !!core.getInput('dotfiles') || true;
const remote = core.getInput('remote');
const rmRemote = !!core.getInput('rmRemote') || false;
const atomicPut = core.getInput('atomicPut');
if (atomicPut) {
// patch SFTPStream to atomically rename files
const originalFastPut = ssh2_streams_1.SFTPStream.prototype.fastPut;
ssh2_streams_1.SFTPStream.prototype.fastPut = function (localPath, remotePath, opts, cb) {
const parsedPath = path_2.default.posix.parse(remotePath);
parsedPath.base = '.' + parsedPath.base;
const tmpRemotePath = path_2.default.posix.format(parsedPath);
const that = this;
originalFastPut.apply(this, [
localPath,
tmpRemotePath,
opts,
function (error, result) {
if (error) {
cb(error, result);
}
else {
that.ext_openssh_rename(tmpRemotePath, remotePath, cb);
}
}
]);
};
}
try {
const ssh = yield connect(host, username, port, privateKey, password, passphrase, tryKeyboard);
yield scp(ssh, local, remote, dotfiles, concurrency, verbose, recursive, rmRemote);
ssh.dispose();
}
catch (err) {
core.setFailed(err);
}
});
}
function connect() {
return __awaiter(this, arguments, void 0, function* (host = 'localhost', username, port = 22, privateKey, password, passphrase, tryKeyboard) {
const ssh = new node_ssh_1.NodeSSH();
console.log(`Establishing a SSH connection to ${host}.`);
try {
const config = {
host: host,
port: port,
username: username,
password: password,
passphrase: passphrase,
tryKeyboard: tryKeyboard,
onKeyboardInteractive: tryKeyboard ? (0, keyboard_1.keyboardFunction)(password) : null
};
if (privateKey) {
console.log('using provided private key');
config.privateKey = privateKey;
}
yield ssh.connect(config);
console.log(`🤝 Connected to ${host}.`);
}
catch (err) {
console.error(`⚠️ The GitHub Action couldn't connect to ${host}.`, err);
core.setFailed(err.message);
}
return ssh;
});
}
function scp(ssh_1, local_1, remote_1) {
return __awaiter(this, arguments, void 0, function* (ssh, local, remote, dotfiles = false, concurrency, verbose = true, recursive = true, rmRemote = false) {
console.log(`Starting scp Action: ${local} to ${remote}`);
try {
if (isDirectory(local)) {
if (rmRemote) {
yield cleanDirectory(ssh, remote);
}
yield putDirectory(ssh, local, remote, dotfiles, concurrency, verbose, recursive);
}
else {
yield putFile(ssh, local, remote, verbose);
}
ssh.dispose();
console.log('✅ scp Action finished.');
}
catch (err) {
console.error(`⚠️ An error happened:(.`, err.message, err.stack);
ssh.dispose();
process.abort();
core.setFailed(err.message);
}
});
}
function putDirectory(ssh_1, local_1, remote_1) {
return __awaiter(this, arguments, void 0, function* (ssh, local, remote, dotfiles = false, concurrency = 3, verbose = false, recursive = true) {
const failed = [];
const successful = [];
const status = yield ssh.putDirectory(local, remote, {
recursive: recursive,
concurrency: concurrency,
validate: (path) => !path_1.default.basename(path).startsWith('.') || dotfiles,
tick: function (localPath, remotePath, error) {
if (error) {
if (verbose) {
console.log(`❕copy failed for ${localPath}.`);
}
failed.push({ local: localPath, remote: remotePath });
}
else {
if (verbose) {
console.log(`✔ successfully copied ${localPath}.`);
}
successful.push({ local: localPath, remote: remotePath });
}
}
});
console.log(`The copy of directory ${local} was ${status ? 'successful' : 'unsuccessful'}.`);
if (failed.length > 0) {
console.log('failed transfers', failed.join(', '));
yield putMany(failed, (failed) => __awaiter(this, void 0, void 0, function* () {
console.log(`Retrying to copy ${failed.local} to ${failed.remote}.`);
yield putFile(ssh, failed.local, failed.remote, true);
}));
}
});
}
function cleanDirectory(ssh_1, remote_1) {
return __awaiter(this, arguments, void 0, function* (ssh, remote, verbose = true) {
try {
yield ssh.execCommand(`rm -rf ${remote}/*`);
if (verbose) {
console.log(`✔ Successfully deleted all files of ${remote}.`);
}
}
catch (error) {
console.error(`⚠️ An error happened:(.`, error.message, error.stack);
ssh.dispose();
core.setFailed(error.message);
}
});
}
function putFile(ssh_1, local_1, remote_1) {
return __awaiter(this, arguments, void 0, function* (ssh, local, remote, verbose = true) {
try {
yield ssh.putFile(local, remote);
if (verbose) {
console.log(`✔ Successfully copied file ${local} to remote ${remote}.`);
}
}
catch (error) {
console.error(`⚠️ An error happened:(.`, error.message, error.stack);
ssh.dispose();
core.setFailed(error.message);
}
});
}
function isDirectory(path) {
return fs_1.default.existsSync(path) && fs_1.default.lstatSync(path).isDirectory();
}
function putMany(array, asyncFunction) {
return __awaiter(this, void 0, void 0, function* () {
for (const el of array) {
yield asyncFunction(el);
}
});
}
process.on('uncaughtException', (err) => {
if (err['code'] !== 'ECONNRESET')
throw err;
});
run();
/***/ }),
/***/ 7615:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.keyboardFunction = void 0;
const keyboardFunction = password => (name, instructions, instructionsLang, prompts, finish) => {
if (prompts.length > 0 &&
prompts[0].prompt.toLowerCase().includes('password')) {
finish([password]);
}
};
exports.keyboardFunction = keyboardFunction;
/***/ }),
/***/ 4914:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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(__nccwpck_require__(857));
const utils_1 = __nccwpck_require__(302);
/**
* Issues a command to the GitHub Actions runner
*
* @param command - The command name to issue
* @param properties - Additional properties for the command (key-value pairs)
* @param message - The message to include with the command
* @remarks
* This function outputs a specially formatted string to stdout that the Actions
* runner interprets as a command. These commands can control workflow behavior,
* set outputs, create annotations, mask values, and more.
*
* Command Format:
* ::name key=value,key=value::message
*
* @example
* ```typescript
* // Issue a warning annotation
* issueCommand('warning', {}, 'This is a warning message');
* // Output: ::warning::This is a warning message
*
* // Set an environment variable
* issueCommand('set-env', { name: 'MY_VAR' }, 'some value');
* // Output: ::set-env name=MY_VAR::some value
*
* // Add a secret mask
* issueCommand('add-mask', {}, 'secretValue123');
* // Output: ::add-mask::secretValue123
* ```
*
* @internal
* This is an internal utility function that powers the public API functions
* such as setSecret, warning, error, and exportVariable.
*/
function issueCommand(command, properties, message) {
const cmd = new Command(command, properties, message);
process.stdout.write(cmd.toString() + os.EOL);
}
function issue(name, message = '') {
issueCommand(name, {}, message);
}
const CMD_STRING = '::';
class Command {
constructor(command, properties, message) {
if (!command) {
command = 'missing.command';
}
this.command = command;
this.properties = properties;
this.message = message;
}
toString() {
let cmdStr = CMD_STRING + this.command;
if (this.properties && Object.keys(this.properties).length > 0) {
cmdStr += ' ';
let first = true;
for (const key in this.properties) {
if (this.properties.hasOwnProperty(key)) {
const val = this.properties[key];
if (val) {
if (first) {
first = false;
}
else {
cmdStr += ',';
}
cmdStr += `${key}=${escapeProperty(val)}`;
}
}
}
}
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
return cmdStr;
}
}
function escapeData(s) {
return (0, utils_1.toCommandValue)(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A');
}
function escapeProperty(s) {
return (0, utils_1.toCommandValue)(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A')
.replace(/:/g, '%3A')
.replace(/,/g, '%2C');
}
//# sourceMappingURL=command.js.map
/***/ }),
/***/ 7484:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.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 = __nccwpck_require__(4914);
const file_command_1 = __nccwpck_require__(4753);
const utils_1 = __nccwpck_require__(302);
const os = __importStar(__nccwpck_require__(857));
const path = __importStar(__nccwpck_require__(6928));
const oidc_utils_1 = __nccwpck_require__(5306);
/**
* The code to exit an action
*/
var ExitCode;
(function (ExitCode) {
/**
* A code indicating that the action was successful
*/
ExitCode[ExitCode["Success"] = 0] = "Success";
/**
* A code indicating that the action was a failure
*/
ExitCode[ExitCode["Failure"] = 1] = "Failure";
})(ExitCode || (exports.ExitCode = ExitCode = {}));
//-----------------------------------------------------------------------
// Variables
//-----------------------------------------------------------------------
/**
* Sets env variable for this action and future actions in the job
* @param name the name of the variable to set
* @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function exportVariable(name, val) {
const convertedVal = (0, utils_1.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));
}
(0, command_1.issueCommand)('set-env', { name }, convertedVal);
}
/**
* Registers a secret which will get masked from logs
*
* @param secret - Value of the secret to be masked
* @remarks
* This function instructs the Actions runner to mask the specified value in any
* logs produced during the workflow run. Once registered, the secret value will
* be replaced with asterisks (***) whenever it appears in console output, logs,
* or error messages.
*
* This is useful for protecting sensitive information such as:
* - API keys
* - Access tokens
* - Authentication credentials
* - URL parameters containing signatures (SAS tokens)
*
* Note that masking only affects future logs; any previous appearances of the
* secret in logs before calling this function will remain unmasked.
*
* @example
* ```typescript
* // Register an API token as a secret
* const apiToken = "abc123xyz456";
* setSecret(apiToken);
*
* // Now any logs containing this value will show *** instead
* console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***"
* ```
*/
function setSecret(secret) {
(0, command_1.issueCommand)('add-mask', {}, secret);
}
/**
* Prepends inputPath to the PATH (for this action and future actions)
* @param inputPath
*/
function addPath(inputPath) {
const filePath = process.env['GITHUB_PATH'] || '';
if (filePath) {
(0, file_command_1.issueFileCommand)('PATH', inputPath);
}
else {
(0, command_1.issueCommand)('add-path', {}, inputPath);
}
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
}
/**
* Gets the value of an input.
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
* Returns an empty string if the value is not defined.
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns string
*/
function getInput(name, options) {
const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
}
if (options && options.trimWhitespace === false) {
return val;
}
return val.trim();
}
/**
* Gets the values of an multiline input. Each value is also trimmed.
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns string[]
*
*/
function getMultilineInput(name, options) {
const inputs = getInput(name, options)
.split('\n')
.filter(x => x !== '');
if (options && options.trimWhitespace === false) {
return inputs;
}
return inputs.map(input => input.trim());
}
/**
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
* The return value is also in boolean type.
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
*
* @param name name of the input to get
* @param options optional. See InputOptions.
* @returns boolean
*/
function getBooleanInput(name, options) {
const trueValue = ['true', 'True', 'TRUE'];
const falseValue = ['false', 'False', 'FALSE'];
const val = getInput(name, options);
if (trueValue.includes(val))
return true;
if (falseValue.includes(val))
return false;
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
/**
* Sets the value of an output.
*
* @param name name of the output to set
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
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));
}
process.stdout.write(os.EOL);
(0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value));
}
/**
* Enables or disables the echoing of commands into stdout for the rest of the step.
* Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
*
*/
function setCommandEcho(enabled) {
(0, command_1.issue)('echo', enabled ? 'on' : 'off');
}
//-----------------------------------------------------------------------
// Results
//-----------------------------------------------------------------------
/**
* Sets the action status to failed.
* When the action exits it will be with an exit code of 1
* @param message add error issue message
*/
function setFailed(message) {
process.exitCode = ExitCode.Failure;
error(message);
}
//-----------------------------------------------------------------------
// Logging Commands
//-----------------------------------------------------------------------
/**
* Gets whether Actions Step Debug is on or not
*/
function isDebug() {
return process.env['RUNNER_DEBUG'] === '1';
}
/**
* Writes debug message to user log
* @param message debug message
*/
function debug(message) {
(0, command_1.issueCommand)('debug', {}, message);
}
/**
* Adds an error issue
* @param message error issue message. Errors will be converted to string via toString()
* @param properties optional properties to add to the annotation.
*/
function error(message, properties = {}) {
(0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
}
/**
* Adds a warning issue
* @param message warning issue message. Errors will be converted to string via toString()
* @param properties optional properties to add to the annotation.
*/
function warning(message, properties = {}) {
(0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
}
/**
* Adds a notice issue
* @param message notice issue message. Errors will be converted to string via toString()
* @param properties optional properties to add to the annotation.
*/
function notice(message, properties = {}) {
(0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
}
/**
* Writes info to log with console.log.
* @param message info message
*/
function info(message) {
process.stdout.write(message + os.EOL);
}
/**
* Begin an output group.
*
* Output until the next `groupEnd` will be foldable in this group
*
* @param name The name of the output group
*/
function startGroup(name) {
(0, command_1.issue)('group', name);
}
/**
* End an output group.
*/
function endGroup() {
(0, command_1.issue)('endgroup');
}
/**
* Wrap an asynchronous function call in a group.
*
* Returns the same type as the function itself.
*
* @param name The name of the group
* @param fn The function to wrap in the group
*/
function group(name, fn) {
return __awaiter(this, void 0, void 0, function* () {
startGroup(name);
let result;
try {
result = yield fn();
}
finally {
endGroup();
}
return result;
});
}
//-----------------------------------------------------------------------
// Wrapper action state
//-----------------------------------------------------------------------
/**
* Saves state for current action, the state can only be retrieved by this action's post job execution.
*
* @param name name of the state to store
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
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));
}
(0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value));
}
/**
* Gets the value of an state set by this action's main execution.
*
* @param name name of the state to get
* @returns string
*/
function getState(name) {
return process.env[`STATE_${name}`] || '';
}
function getIDToken(aud) {
return __awaiter(this, void 0, void 0, function* () {
return yield oidc_utils_1.OidcClient.getIDToken(aud);
});
}
/**
* Summary exports
*/
var summary_1 = __nccwpck_require__(1847);
Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
/**
* @deprecated use core.summary
*/
var summary_2 = __nccwpck_require__(1847);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
/**
* Path exports
*/
var path_utils_1 = __nccwpck_require__(1976);
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; } }));
/**
* Platform utilities exports
*/
exports.platform = __importStar(__nccwpck_require__(8968));
//# sourceMappingURL=core.js.map
/***/ }),
/***/ 4753:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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(__nccwpck_require__(6982));
const fs = __importStar(__nccwpck_require__(9896));
const os = __importStar(__nccwpck_require__(857));
const utils_1 = __nccwpck_require__(302);
function issueFileCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
throw new Error(`Unable to find environment variable for file command ${command}`);
}
if (!fs.existsSync(filePath)) {
throw new Error(`Missing file at path: ${filePath}`);
}
fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {
encoding: 'utf8'
});
}
function prepareKeyValueMessage(key, value) {
const delimiter = `ghadelimiter_${crypto.randomUUID()}`;
const convertedValue = (0, utils_1.toCommandValue)(value);
// These should realistically never happen, but just in case someone finds a
// way to exploit uuid generation let's not allow keys or values that contain
// the delimiter.
if (key.includes(delimiter)) {
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
}
if (convertedValue.includes(delimiter)) {
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
}
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
}
//# sourceMappingURL=file-command.js.map
/***/ }),
/***/ 5306:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(4844);
const auth_1 = __nccwpck_require__(4552);
const core_1 = __nccwpck_require__(7484);
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
};
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
}
static getRequestToken() {
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
if (!token) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
}
return token;
}
static getIDTokenUrl() {
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
if (!runtimeUrl) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
}
return runtimeUrl;
}
static getCall(id_token_url) {
return __awaiter(this, void 0, void 0, function* () {
var _a;
const httpclient = OidcClient.createHttpClient();
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
throw new Error('Response json body do not have ID Token field');
}
return id_token;
});
}
static getIDToken(audience) {
return __awaiter(this, void 0, void 0, function* () {
try {
// New ID Token is requested from action service
let id_token_url = OidcClient.getIDTokenUrl();
if (audience) {
const encodedAudience = encodeURIComponent(audience);
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
}
(0, core_1.debug)(`ID token url is ${id_token_url}`);
const id_token = yield OidcClient.getCall(id_token_url);
(0, core_1.setSecret)(id_token);
return id_token;
}
catch (error) {
throw new Error(`Error message: ${error.message}`);
}
});
}
}
exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map
/***/ }),
/***/ 1976:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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(__nccwpck_require__(6928));
/**
* toPosixPath converts the given path to the posix form. On Windows, \\ will be
* replaced with /.
*
* @param pth. Path to transform.
* @return string Posix path.
*/
function toPosixPath(pth) {
return pth.replace(/[\\]/g, '/');
}
/**
* toWin32Path converts the given path to the win32 form. On Linux, / will be
* replaced with \\.
*
* @param pth. Path to transform.
* @return string Win32 path.
*/
function toWin32Path(pth) {
return pth.replace(/[/]/g, '\\');
}
/**
* toPlatformPath converts the given path to a platform-specific path. It does
* this by replacing instances of / and \ with the platform-specific path
* separator.
*
* @param pth The path to platformize.
* @return string The platform-specific path.
*/
function toPlatformPath(pth) {
return pth.replace(/[/\\]/g, path.sep);
}
//# sourceMappingURL=path-utils.js.map
/***/ }),
/***/ 8968:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
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(__nccwpck_require__(857));
const exec = __importStar(__nccwpck_require__(5236));
const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, {
silent: true
});
const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, {
silent: true
});
return {
name: name.trim(),
version: version.trim()
};
});
const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b, _c, _d;
const { stdout } = yield exec.getExecOutput('sw_vers', undefined, {
silent: true
});
const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '';
const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : '';
return {
name,
version
};
});
const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () {
const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
silent: true
});
const [name, version] = stdout.trim().split('\n');
return {
name,
version
};
});
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() {
return __awaiter(this, void 0, void 0, function* () {
return Object.assign(Object.assign({}, (yield (exports.isWindows
? getWindowsInfo()
: exports.isMacOS
? getMacOsInfo()
: getLinuxInfo()))), { platform: exports.platform,
arch: exports.arch,
isWindows: exports.isWindows,
isMacOS: exports.isMacOS,
isLinux: exports.isLinux });
});
}
//# sourceMappingURL=platform.js.map
/***/ }),
/***/ 1847:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
const os_1 = __nccwpck_require__(857);
const fs_1 = __nccwpck_require__(9896);
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';
class Summary {
constructor() {
this._buffer = '';
}
/**
* Finds the summary file path from the environment, rejects if env var is not found or file does not exist
* Also checks r/w permissions.
*
* @returns step summary file path
*/
filePath() {
return __awaiter(this, void 0, void 0, function* () {
if (this._filePath) {
return this._filePath;
}
const pathFromEnv = process.env[exports.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.`);
}
try {
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
}
catch (_a) {
throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
}
this._filePath = pathFromEnv;
return this._filePath;
});
}
/**
* Wraps content in an HTML tag, adding any HTML attributes
*
* @param {string} tag HTML tag to wrap
* @param {string | null} content content within the tag
* @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
*
* @returns {string} content wrapped in HTML element
*/
wrap(tag, content, attrs = {}) {
const htmlAttrs = Object.entries(attrs)
.map(([key, value]) => ` ${key}="${value}"`)
.join('');
if (!content) {
return `<${tag}${htmlAttrs}>`;
}
return `<${tag}${htmlAttrs}>${content}</${tag}>`;
}
/**
* Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
*
* @param {SummaryWriteOptions} [options] (optional) options for write operation
*
* @returns {Promise<Summary>} summary instance
*/
write(options) {
return __awaiter(this, void 0, void 0, function* () {
const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
const filePath = yield this.filePath();
const writeFunc = overwrite ? writeFile : appendFile;
yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
return this.emptyBuffer();
});
}
/**
* Clears the summary buffer and wipes the summary file
*
* @returns {Summary} summary instance
*/
clear() {
return __awaiter(this, void 0, void 0, function* () {
return this.emptyBuffer().write({ overwrite: true });
});
}
/**
* Returns the current summary buffer as a string
*
* @returns {string} string of summary buffer
*/
stringify() {
return this._buffer;
}
/**
* If the summary buffer is empty
*
* @returns {boolen} true if the buffer is empty
*/
isEmptyBuffer() {
return this._buffer.length === 0;
}
/**
* Resets the summary buffer without writing to summary file
*
* @returns {Summary} summary instance
*/
emptyBuffer() {
this._buffer = '';
return this;
}
/**
* Adds raw text to the summary buffer
*
* @param {string} text content to add
* @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
*
* @returns {Summary} summary instance
*/
addRaw(text, addEOL = false) {
this._buffer += text;
return addEOL ? this.addEOL() : this;
}
/**
* Adds the operating system-specific end-of-line marker to the buffer
*
* @returns {Summary} summary instance
*/
addEOL() {
return this.addRaw(os_1.EOL);
}
/**
* Adds an HTML codeblock to the summary buffer
*
* @param {string} code content to render within fenced code block
* @param {string} lang (optional) language to syntax highlight code
*
* @returns {Summary} summary instance
*/
addCodeBlock(code, lang) {
const attrs = Object.assign({}, (lang && { lang }));
const element = this.wrap('pre', this.wrap('code', code), attrs);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML list to the summary buffer
*
* @param {string[]} items list of items to render
* @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
*
* @returns {Summary} summary instance
*/
addList(items, ordered = false) {
const tag = ordered ? 'ol' : 'ul';
const listItems = items.map(item => this.wrap('li', item)).join('');
const element = this.wrap(tag, listItems);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML table to the summary buffer
*
* @param {SummaryTableCell[]} rows table rows
*
* @returns {Summary} summary instance
*/
addTable(rows) {
const tableBody = rows
.map(row => {
const cells = row
.map(cell => {
if (typeof cell === 'string') {
return this.wrap('td', cell);
}
const { header, data, colspan, rowspan } = cell;
const tag = header ? 'th' : 'td';
const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
return this.wrap(tag, data, attrs);
})
.join('');
return this.wrap('tr', cells);
})
.join('');
const element = this.wrap('table', tableBody);
return this.addRaw(element).addEOL();
}
/**
* Adds a collapsable HTML details element to the summary buffer
*
* @param {string} label text for the closed state
* @param {string} content collapsable content
*
* @returns {Summary} summary instance
*/
addDetails(label, content) {
const element = this.wrap('details', this.wrap('summary', label) + content);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML image tag to the summary buffer
*
* @param {string} src path to the image you to embed
* @param {string} alt text description of the image
* @param {SummaryImageOptions} options (optional) addition image attributes
*
* @returns {Summary} summary instance
*/
addImage(src, alt, options) {
const { width, height } = options || {};
const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML section heading element
*
* @param {string} text heading text
* @param {number | string} [level=1] (optional) the heading level, default: 1
*
* @returns {Summary} summary instance
*/
addHeading(text, level) {
const tag = `h${level}`;
const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
? tag
: 'h1';
const element = this.wrap(allowedTag, text);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML thematic break (<hr>) to the summary buffer
*
* @returns {Summary} summary instance
*/
addSeparator() {
const element = this.wrap('hr', null);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML line break (<br>) to the summary buffer
*
* @returns {Summary} summary instance
*/
addBreak() {
const element = this.wrap('br', null);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML blockquote to the summary buffer
*
* @param {string} text quote text
* @param {string} cite (optional) citation url
*
* @returns {Summary} summary instance
*/
addQuote(text, cite) {
const attrs = Object.assign({}, (cite && { cite }));
const element = this.wrap('blockquote', text, attrs);
return this.addRaw(element).addEOL();
}
/**
* Adds an HTML anchor tag to the summary buffer
*
* @param {string} text link text/content
* @param {string} href hyperlink
*
* @returns {Summary} summary instance
*/
addLink(text, href) {
const element = this.wrap('a', text, { href });
return this.addRaw(element).addEOL();
}
}
const _summary = new Summary();
/**
* @deprecated use `core.summary`
*/
exports.markdownSummary = _summary;
exports.summary = _summary;
//# sourceMappingURL=summary.js.map
/***/ }),
/***/ 302:
/***/ ((__unused_webpack_module, exports) => {
"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;
/**
* Sanitizes an input into a string so it can be passed into issueCommand safely
* @param input input to sanitize into a string
*/
function toCommandValue(input) {
if (input === null || input === undefined) {
return '';
}
else if (typeof input === 'string' || input instanceof String) {
return input;
}
return JSON.stringify(input);
}
/**
*
* @param annotationProperties
* @returns The command properties to send with the actual annotation command
* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
*/
function toCommandProperties(annotationProperties) {
if (!Object.keys(annotationProperties).length) {
return {};
}
return {
title: annotationProperties.title,
file: annotationProperties.file,
line: annotationProperties.startLine,
endLine: annotationProperties.endLine,
col: annotationProperties.startColumn,
endColumn: annotationProperties.endColumn
};
}
//# sourceMappingURL=utils.js.map
/***/ }),
/***/ 5236:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.exec = exec;
exports.getExecOutput = getExecOutput;
const string_decoder_1 = __nccwpck_require__(3193);
const tr = __importStar(__nccwpck_require__(6665));
/**
* Exec a command.
* Output will be streamed to the live console.
* Returns promise with return code
*
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
* @param args optional arguments for tool. Escaping is handled by the lib.
* @param options optional exec options. See ExecOptions
* @returns Promise<number> exit code
*/
function exec(commandLine, args, options) {
return __awaiter(this, void 0, void 0, function* () {
const commandArgs = tr.argStringToArray(commandLine);
if (commandArgs.length === 0) {
throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
}
// Path to tool to execute should be first arg
const toolPath = commandArgs[0];
args = commandArgs.slice(1).concat(args || []);
const runner = new tr.ToolRunner(toolPath, args, options);
return runner.exec();
});
}
/**
* Exec a command and get the output.
* Output will be streamed to the live console.
* Returns promise with the exit code and collected stdout and stderr
*
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
* @param args optional arguments for tool. Escaping is handled by the lib.
* @param options optional exec options. See ExecOptions
* @returns Promise<ExecOutput> exit code, stdout, and stderr
*/
function getExecOutput(commandLine, args, options) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b;
let stdout = '';
let stderr = '';
//Using string decoder covers the case where a mult-byte character is split
const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
const stdErrListener = (data) => {
stderr += stderrDecoder.write(data);
if (originalStdErrListener) {
originalStdErrListener(data);
}
};
const stdOutListener = (data) => {
stdout += stdoutDecoder.write(data);
if (originalStdoutListener) {
originalStdoutListener(data);
}
};
const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
//flush any remaining characters
stdout += stdoutDecoder.end();
stderr += stderrDecoder.end();
return {
exitCode,
stdout,
stderr
};
});
}
//# sourceMappingURL=exec.js.map
/***/ }),
/***/ 6665:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ToolRunner = void 0;
exports.argStringToArray = argStringToArray;
const os = __importStar(__nccwpck_require__(857));
const events = __importStar(__nccwpck_require__(4434));
const child = __importStar(__nccwpck_require__(5317));
const path = __importStar(__nccwpck_require__(6928));
const io = __importStar(__nccwpck_require__(4994));
const ioUtil = __importStar(__nccwpck_require__(5207));
const timers_1 = __nccwpck_require__(3557);
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
* Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
*/
class ToolRunner extends events.EventEmitter {
constructor(toolPath, args, options) {
super();
if (!toolPath) {
throw new Error("Parameter 'toolPath' cannot be null or empty.");
}
this.toolPath = toolPath;
this.args = args || [];
this.options = options || {};
}
_debug(message) {
if (this.options.listeners && this.options.listeners.debug) {
this.options.listeners.debug(message);
}
}
_getCommandString(options, noPrefix) {
const toolPath = this._getSpawnFileName();
const args = this._getSpawnArgs(options);
let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool
if (IS_WINDOWS) {
// Windows + cmd file
if (this._isCmdFile()) {
cmd += toolPath;
for (const a of args) {
cmd += ` ${a}`;
}
}
// Windows + verbatim
else if (options.windowsVerbatimArguments) {
cmd += `"${toolPath}"`;
for (const a of args) {
cmd += ` ${a}`;
}
}
// Windows (regular)
else {
cmd += this._windowsQuoteCmdArg(toolPath);
for (const a of args) {
cmd += ` ${this._windowsQuoteCmdArg(a)}`;
}
}
}
else {
// OSX/Linux - this can likely be improved with some form of quoting.
// creating processes on Unix is fundamentally different than Windows.
// on Unix, execvp() takes an arg array.
cmd += toolPath;
for (const a of args) {
cmd += ` ${a}`;
}
}
return cmd;
}
_processLineBuffer(data, strBuffer, onLine) {
try {
let s = strBuffer + data.toString();
let n = s.indexOf(os.EOL);
while (n > -1) {
const line = s.substring(0, n);
onLine(line);
// the rest of the string ...
s = s.substring(n + os.EOL.length);
n = s.indexOf(os.EOL);
}
return s;
}
catch (err) {
// streaming lines to console is best effort. Don't fail a build.
this._debug(`error processing line. Failed with error ${err}`);
return '';
}
}
_getSpawnFileName() {
if (IS_WINDOWS) {
if (this._isCmdFile()) {
return process.env['COMSPEC'] || 'cmd.exe';
}
}
return this.toolPath;
}
_getSpawnArgs(options) {
if (IS_WINDOWS) {
if (this._isCmdFile()) {
let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
for (const a of this.args) {
argline += ' ';
argline += options.windowsVerbatimArguments
? a
: this._windowsQuoteCmdArg(a);
}
argline += '"';
return [argline];
}
}
return this.args;
}
_endsWith(str, end) {
return str.endsWith(end);
}
_isCmdFile() {
const upperToolPath = this.toolPath.toUpperCase();
return (this._endsWith(upperToolPath, '.CMD') ||
this._endsWith(upperToolPath, '.BAT'));
}
_windowsQuoteCmdArg(arg) {
// for .exe, apply the normal quoting rules that libuv applies
if (!this._isCmdFile()) {
return this._uvQuoteCmdArg(arg);
}
// otherwise apply quoting rules specific to the cmd.exe command line parser.
// the libuv rules are generic and are not designed specifically for cmd.exe
// command line parser.
//
// for a detailed description of the cmd.exe command line parser, refer to
// http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912
// need quotes for empty arg
if (!arg) {
return '""';
}
// determine whether the arg needs to be quoted
const cmdSpecialChars = [
' ',
'\t',
'&',
'(',
')',
'[',
']',
'{',
'}',
'^',
'=',
';',
'!',
"'",
'+',
',',
'`',
'~',
'|',
'<',
'>',
'"'
];
let needsQuotes = false;
for (const char of arg) {
if (cmdSpecialChars.some(x => x === char)) {
needsQuotes = true;
break;
}
}
// short-circuit if quotes not needed
if (!needsQuotes) {
return arg;
}
// the following quoting rules are very similar to the rules that by libuv applies.
//
// 1) wrap the string in quotes
//
// 2) double-up quotes - i.e. " => ""
//
// this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately
// doesn't work well with a cmd.exe command line.
//
// note, replacing " with "" also works well if the arg is passed to a downstream .NET console app.
// for example, the command line:
// foo.exe "myarg:""my val"""
// is parsed by a .NET console app into an arg array:
// [ "myarg:\"my val\"" ]
// which is the same end result when applying libuv quoting rules. although the actual
// command line from libuv quoting rules would look like:
// foo.exe "myarg:\"my val\""
//
// 3) double-up slashes that precede a quote,
// e.g. hello \world => "hello \world"
// hello\"world => "hello\\""world"
// hello\\"world => "hello\\\\""world"
// hello world\ => "hello world\\"
//
// technically this is not required for a cmd.exe command line, or the batch argument parser.
// the reasons for including this as a .cmd quoting rule are:
//
// a) this is optimized for the scenario where the argument is passed from the .cmd file to an
// external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.
//
// b) it's what we've been doing previously (by deferring to node default behavior) and we
// haven't heard any complaints about that aspect.
//
// note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be
// escaped when used on the command line directly - even though within a .cmd file % can be escaped
// by using %%.
//
// the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts
// the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.
//
// one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would
// often work, since it is unlikely that var^ would exist, and the ^ character is removed when the
// variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args
// to an external program.
//
// an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.
// % can be escaped within a .cmd file.
let reverse = '"';
let quoteHit = true;
for (let i = arg.length; i > 0; i--) {
// walk the string in reverse
reverse += arg[i - 1];
if (quoteHit && arg[i - 1] === '\\') {
reverse += '\\'; // double the slash
}
else if (arg[i - 1] === '"') {
quoteHit = true;
reverse += '"'; // double the quote
}
else {
quoteHit = false;
}
}
reverse += '"';
return reverse.split('').reverse().join('');
}
_uvQuoteCmdArg(arg) {
// Tool runner wraps child_process.spawn() and needs to apply the same quoting as
// Node in certain cases where the undocumented spawn option windowsVerbatimArguments
// is used.
//
// Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,
// see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),
// pasting copyright notice from Node within this function:
//
// Copyright Joyent, Inc. and other Node contributors. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
if (!arg) {
// Need double quotation for empty argument
return '""';
}
if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) {
// No quotation needed
return arg;
}
if (!arg.includes('"') && !arg.includes('\\')) {
// No embedded double quotes or backslashes, so I can just wrap
// quote marks around the whole thing.
return `"${arg}"`;
}
// Expected input/output:
// input : hello"world
// output: "hello\"world"
// input : hello""world
// output: "hello\"\"world"
// input : hello\world
// output: hello\world
// input : hello\\world
// output: hello\\world
// input : hello\"world
// output: "hello\\\"world"
// input : hello\\"world
// output: "hello\\\\\"world"
// input : hello world\
// output: "hello world\\" - note the comment in libuv actually reads "hello world\"
// but it appears the comment is wrong, it should be "hello world\\"
let reverse = '"';
let quoteHit = true;
for (let i = arg.length; i > 0; i--) {
// walk the string in reverse
reverse += arg[i - 1];
if (quoteHit && arg[i - 1] === '\\') {
reverse += '\\';
}
else if (arg[i - 1] === '"') {
quoteHit = true;
reverse += '\\';
}
else {
quoteHit = false;
}
}
reverse += '"';
return reverse.split('').reverse().join('');
}
_cloneExecOptions(options) {
options = options || {};
const result = {
cwd: options.cwd || process.cwd(),
env: options.env || process.env,
silent: options.silent || false,
windowsVerbatimArguments: options.windowsVerbatimArguments || false,
failOnStdErr: options.failOnStdErr || false,
ignoreReturnCode: options.ignoreReturnCode || false,
delay: options.delay || 10000
};
result.outStream = options.outStream || process.stdout;
result.errStream = options.errStream || process.stderr;
return result;
}
_getSpawnOptions(options, toolPath) {
options = options || {};
const result = {};
result.cwd = options.cwd;
result.env = options.env;
result['windowsVerbatimArguments'] =
options.windowsVerbatimArguments || this._isCmdFile();
if (options.windowsVerbatimArguments) {
result.argv0 = `"${toolPath}"`;
}
return result;
}
/**
* Exec a tool.
* Output will be streamed to the live console.
* Returns promise with return code
*
* @param tool path to tool to exec
* @param options optional exec options. See ExecOptions
* @returns number
*/
exec() {
return __awaiter(this, void 0, void 0, function* () {
// root the tool path if it is unrooted and contains relative pathing
if (!ioUtil.isRooted(this.toolPath) &&
(this.toolPath.includes('/') ||
(IS_WINDOWS && this.toolPath.includes('\\')))) {
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
}
// if the tool is only a file name, then resolve it from the PATH
// otherwise verify it exists (add extension on Windows if necessary)
this.toolPath = yield io.which(this.toolPath, true);
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
this._debug(`exec tool: ${this.toolPath}`);
this._debug('arguments:');
for (const arg of this.args) {
this._debug(` ${arg}`);
}
const optionsNonNull = this._cloneExecOptions(this.options);
if (!optionsNonNull.silent && optionsNonNull.outStream) {
optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);
}
const state = new ExecState(optionsNonNull, this.toolPath);
state.on('debug', (message) => {
this._debug(message);
});
if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
}
const fileName = this._getSpawnFileName();
const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
let stdbuffer = '';
if (cp.stdout) {
cp.stdout.on('data', (data) => {
if (this.options.listeners && this.options.listeners.stdout) {
this.options.listeners.stdout(data);
}
if (!optionsNonNull.silent && optionsNonNull.outStream) {
optionsNonNull.outStream.write(data);
}
stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
if (this.options.listeners && this.options.listeners.stdline) {
this.options.listeners.stdline(line);
}
});
});
}
let errbuffer = '';
if (cp.stderr) {
cp.stderr.on('data', (data) => {
state.processStderr = true;
if (this.options.listeners && this.options.listeners.stderr) {
this.options.listeners.stderr(data);
}
if (!optionsNonNull.silent &&
optionsNonNull.errStream &&
optionsNonNull.outStream) {
const s = optionsNonNull.failOnStdErr
? optionsNonNull.errStream
: optionsNonNull.outStream;
s.write(data);
}
errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
if (this.options.listeners && this.options.listeners.errline) {
this.options.listeners.errline(line);
}
});
});
}
cp.on('error', (err) => {
state.processError = err.message;
state.processExited = true;
state.processClosed = true;
state.CheckComplete();
});
cp.on('exit', (code) => {
state.processExitCode = code;
state.processExited = true;
this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);
state.CheckComplete();
});
cp.on('close', (code) => {
state.processExitCode = code;
state.processExited = true;
state.processClosed = true;
this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);
state.CheckComplete();
});
state.on('done', (error, exitCode) => {
if (stdbuffer.length > 0) {
this.emit('stdline', stdbuffer);
}
if (errbuffer.length > 0) {
this.emit('errline', errbuffer);
}
cp.removeAllListeners();
if (error) {
reject(error);
}
else {
resolve(exitCode);
}
});
if (this.options.input) {
if (!cp.stdin) {
throw new Error('child process missing stdin');
}
cp.stdin.end(this.options.input);
}
}));
});
}
}
exports.ToolRunner = ToolRunner;
/**
* Convert an arg string to an array of args. Handles escaping
*
* @param argString string of arguments
* @returns string[] array of arguments
*/
function argStringToArray(argString) {
const args = [];
let inQuotes = false;
let escaped = false;
let arg = '';
function append(c) {
// we only escape double quotes.
if (escaped && c !== '"') {
arg += '\\';
}
arg += c;
escaped = false;
}
for (let i = 0; i < argString.length; i++) {
const c = argString.charAt(i);
if (c === '"') {
if (!escaped) {
inQuotes = !inQuotes;
}
else {
append(c);
}
continue;
}
if (c === '\\' && escaped) {
append(c);
continue;
}
if (c === '\\' && inQuotes) {
escaped = true;
continue;
}
if (c === ' ' && !inQuotes) {
if (arg.length > 0) {
args.push(arg);
arg = '';
}
continue;
}
append(c);
}
if (arg.length > 0) {
args.push(arg.trim());
}
return args;
}
class ExecState extends events.EventEmitter {
constructor(options, toolPath) {
super();
this.processClosed = false; // tracks whether the process has exited and stdio is closed
this.processError = '';
this.processExitCode = 0;
this.processExited = false; // tracks whether the process has exited
this.processStderr = false; // tracks whether stderr was written to
this.delay = 10000; // 10 seconds
this.done = false;
this.timeout = null;
if (!toolPath) {
throw new Error('toolPath must not be empty');
}
this.options = options;
this.toolPath = toolPath;
if (options.delay) {
this.delay = options.delay;
}
}
CheckComplete() {
if (this.done) {
return;
}
if (this.processClosed) {
this._setResult();
}
else if (this.processExited) {
this.timeout = (0, timers_1.setTimeout)(ExecState.HandleTimeout, this.delay, this);
}
}
_debug(message) {
this.emit('debug', message);
}
_setResult() {
// determine whether there is an error
let error;
if (this.processExited) {
if (this.processError) {
error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);
}
else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
}
else if (this.processStderr && this.options.failOnStdErr) {
error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);
}
}
// clear the timeout
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = null;
}
this.done = true;
this.emit('done', error, this.processExitCode);
}
static HandleTimeout(state) {
if (state.done) {
return;
}
if (!state.processClosed && state.processExited) {
const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
state._debug(message);
}
state._setResult();
}
}
//# sourceMappingURL=toolrunner.js.map
/***/ }),
/***/ 4552:
/***/ (function(__unused_webpack_module, exports) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
class BasicCredentialHandler {
constructor(username, password) {
this.username = username;
this.password = password;
}
prepareRequest(options) {
if (!options.headers) {
throw Error('The request has no headers');
}
options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
}
// This handler cannot handle 401
canHandleAuthentication() {
return false;
}
handleAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('not implemented');
});
}
}
exports.BasicCredentialHandler = BasicCredentialHandler;
class BearerCredentialHandler {
constructor(token) {
this.token = token;
}
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
if (!options.headers) {
throw Error('The request has no headers');
}
options.headers['Authorization'] = `Bearer ${this.token}`;
}
// This handler cannot handle 401
canHandleAuthentication() {
return false;
}
handleAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('not implemented');
});
}
}
exports.BearerCredentialHandler = BearerCredentialHandler;
class PersonalAccessTokenCredentialHandler {
constructor(token) {
this.token = token;
}
// currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401
prepareRequest(options) {
if (!options.headers) {
throw Error('The request has no headers');
}
options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
}
// This handler cannot handle 401
canHandleAuthentication() {
return false;
}
handleAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error('not implemented');
});
}
}
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
//# sourceMappingURL=auth.js.map
/***/ }),
/***/ 4844:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
/* eslint-disable @typescript-eslint/no-explicit-any */
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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HttpClient = exports.HttpClientResponse = exports.HttpClientError = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
exports.getProxyUrl = getProxyUrl;
exports.isHttps = isHttps;
const http = __importStar(__nccwpck_require__(8611));
const https = __importStar(__nccwpck_require__(5692));
const pm = __importStar(__nccwpck_require__(4988));
const tunnel = __importStar(__nccwpck_require__(770));
const undici_1 = __nccwpck_require__(6752);
var HttpCodes;
(function (HttpCodes) {
HttpCodes[HttpCodes["OK"] = 200] = "OK";
HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
var Headers;
(function (Headers) {
Headers["Accept"] = "accept";
Headers["ContentType"] = "content-type";
})(Headers || (exports.Headers = Headers = {}));
var MediaTypes;
(function (MediaTypes) {
MediaTypes["ApplicationJson"] = "application/json";
})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));
/**
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
function getProxyUrl(serverUrl) {
const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : '';
}
const HttpRedirectCodes = [
HttpCodes.MovedPermanently,
HttpCodes.ResourceMoved,
HttpCodes.SeeOther,
HttpCodes.TemporaryRedirect,
HttpCodes.PermanentRedirect
];
const HttpResponseRetryCodes = [
HttpCodes.BadGateway,
HttpCodes.ServiceUnavailable,
HttpCodes.GatewayTimeout
];
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
const ExponentialBackoffCeiling = 10;
const ExponentialBackoffTimeSlice = 5;
class HttpClientError extends Error {
constructor(message, statusCode) {
super(message);
this.name = 'HttpClientError';
this.statusCode = statusCode;
Object.setPrototypeOf(this, HttpClientError.prototype);
}
}
exports.HttpClientError = HttpClientError;
class HttpClientResponse {
constructor(message) {
this.message = message;
}
readBody() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
let output = Buffer.alloc(0);
this.message.on('data', (chunk) => {
output = Buffer.concat([output, chunk]);
});
this.message.on('end', () => {
resolve(output.toString());
});
}));
});
}
readBodyBuffer() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
const chunks = [];
this.message.on('data', (chunk) => {
chunks.push(chunk);
});
this.message.on('end', () => {
resolve(Buffer.concat(chunks));
});
}));
});
}
}
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
const parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === 'https:';
}
class HttpClient {
constructor(userAgent, handlers, requestOptions) {
this._ignoreSslError = false;
this._allowRedirects = true;
this._allowRedirectDowngrade = false;
this._maxRedirects = 50;
this._allowRetries = false;
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
if (requestOptions.ignoreSslError != null) {
this._ignoreSslError = requestOptions.ignoreSslError;
}
this._socketTimeout = requestOptions.socketTimeout;
if (requestOptions.allowRedirects != null) {
this._allowRedirects = requestOptions.allowRedirects;
}
if (requestOptions.allowRedirectDowngrade != null) {
this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
}
if (requestOptions.maxRedirects != null) {
this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
}
if (requestOptions.keepAlive != null) {
this._keepAlive = requestOptions.keepAlive;
}
if (requestOptions.allowRetries != null) {
this._allowRetries = requestOptions.allowRetries;
}
if (requestOptions.maxRetries != null) {
this._maxRetries = requestOptions.maxRetries;
}
}
}
options(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
});
}
get(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('GET', requestUrl, null, additionalHeaders || {});
});
}
del(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('DELETE', requestUrl, null, additionalHeaders || {});
});
}
post(requestUrl, data, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('POST', requestUrl, data, additionalHeaders || {});
});
}
patch(requestUrl, data, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('PATCH', requestUrl, data, additionalHeaders || {});
});
}
put(requestUrl, data, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('PUT', requestUrl, data, additionalHeaders || {});
});
}
head(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request('HEAD', requestUrl, null, additionalHeaders || {});
});
}
sendStream(verb, requestUrl, stream, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request(verb, requestUrl, stream, additionalHeaders);
});
}
/**
* Gets a typed object from an endpoint
* Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
*/
getJson(requestUrl_1) {
return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
const res = yield this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
postJson(requestUrl_1, obj_1) {
return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] =
this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
const res = yield this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
putJson(requestUrl_1, obj_1) {
return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] =
this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
const res = yield this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
patchJson(requestUrl_1, obj_1) {
return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] =
this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
const res = yield this.patch(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
/**
* Makes a raw http request.
* All other methods such as get, post, patch, and request ultimately call this.
* Prefer get, del, post and patch
*/
request(verb, requestUrl, data, headers) {
return __awaiter(this, void 0, void 0, function* () {
if (this._disposed) {
throw new Error('Client has already been disposed.');
}
const parsedUrl = new URL(requestUrl);
let info = this._prepareRequest(verb, parsedUrl, headers);
// Only perform retries on reads since writes may not be idempotent.
const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
? this._maxRetries + 1
: 1;
let numTries = 0;
let response;
do {
response = yield this.requestRaw(info, data);
// Check if it's an authentication challenge
if (response &&
response.message &&
response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (const handler of this.handlers) {
if (handler.canHandleAuthentication(response)) {
authenticationHandler = handler;
break;
}
}
if (authenticationHandler) {
return authenticationHandler.handleAuthentication(this, info, data);
}
else {
// We have received an unauthorized response but have no handlers to handle it.
// Let the response return to the caller.
return response;
}
}
let redirectsRemaining = this._maxRedirects;
while (response.message.statusCode &&
HttpRedirectCodes.includes(response.message.statusCode) &&
this._allowRedirects &&
redirectsRemaining > 0) {
const redirectUrl = response.message.headers['location'];
if (!redirectUrl) {
// if there's no location to redirect to, we won't
break;
}
const parsedRedirectUrl = new URL(redirectUrl);
if (parsedUrl.protocol === 'https:' &&
parsedUrl.protocol !== parsedRedirectUrl.protocol &&
!this._allowRedirectDowngrade) {
throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
}
// we need to finish reading the response before reassigning response
// which will leak the open socket.
yield response.readBody();
// strip authorization header if redirected to a different hostname
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (const header in headers) {
// header names are case insensitive
if (header.toLowerCase() === 'authorization') {
delete headers[header];
}
}
}
// let's make the request with the new redirectUrl
info = this._prepareRequest(verb, parsedRedirectUrl, headers);
response = yield this.requestRaw(info, data);
redirectsRemaining--;
}
if (!response.message.statusCode ||
!HttpResponseRetryCodes.includes(response.message.statusCode)) {
// If not a retry code, return immediately instead of retrying
return response;
}
numTries += 1;
if (numTries < maxTries) {
yield response.readBody();
yield this._performExponentialBackoff(numTries);
}
} while (numTries < maxTries);
return response;
});
}
/**
* Needs to be called if keepAlive is set to true in request options.
*/
dispose() {
if (this._agent) {
this._agent.destroy();
}
this._disposed = true;
}
/**
* Raw request.
* @param info
* @param data
*/
requestRaw(info, data) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
function callbackForResult(err, res) {
if (err) {
reject(err);
}
else if (!res) {
// If `err` is not passed, then `res` must be passed.
reject(new Error('Unknown error'));
}
else {
resolve(res);
}
}
this.requestRawWithCallback(info, data, callbackForResult);
});
});
}
/**
* Raw request with callback.
* @param info
* @param data
* @param onResult
*/
requestRawWithCallback(info, data, onResult) {
if (typeof data === 'string') {
if (!info.options.headers) {
info.options.headers = {};
}
info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
}
let callbackCalled = false;
function handleResult(err, res) {
if (!callbackCalled) {
callbackCalled = true;
onResult(err, res);
}
}
const req = info.httpModule.request(info.options, (msg) => {
const res = new HttpClientResponse(msg);
handleResult(undefined, res);
});
let socket;
req.on('socket', sock => {
socket = sock;
});
// If we ever get disconnected, we want the socket to timeout eventually
req.setTimeout(this._socketTimeout || 3 * 60000, () => {
if (socket) {
socket.end();
}
handleResult(new Error(`Request timeout: ${info.options.path}`));
});
req.on('error', function (err) {
// err has statusCode property
// res should have headers
handleResult(err);
});
if (data && typeof data === 'string') {
req.write(data, 'utf8');
}
if (data && typeof data !== 'string') {
data.on('close', function () {
req.end();
});
data.pipe(req);
}
else {
req.end();
}
}
/**
* Gets an http agent. This function is useful when you need an http agent that handles
* routing through a proxy server - depending upon the url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
getAgent(serverUrl) {
const parsedUrl = new URL(serverUrl);
return this._getAgent(parsedUrl);
}
getAgentDispatcher(serverUrl) {
const parsedUrl = new URL(serverUrl);
const proxyUrl = pm.getProxyUrl(parsedUrl);
const useProxy = proxyUrl && proxyUrl.hostname;
if (!useProxy) {
return;
}
return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
}
_prepareRequest(method, requestUrl, headers) {
const info = {};
info.parsedUrl = requestUrl;
const usingSsl = info.parsedUrl.protocol === 'https:';
info.httpModule = usingSsl ? https : http;
const defaultPort = usingSsl ? 443 : 80;
info.options = {};
info.options.host = info.parsedUrl.hostname;
info.options.port = info.parsedUrl.port
? parseInt(info.parsedUrl.port)
: defaultPort;
info.options.path =
(info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
info.options.method = method;
info.options.headers = this._mergeHeaders(headers);
if (this.userAgent != null) {
info.options.headers['user-agent'] = this.userAgent;
}
info.options.agent = this._getAgent(info.parsedUrl);
// gives handlers an opportunity to participate
if (this.handlers) {
for (const handler of this.handlers) {
handler.prepareRequest(info.options);
}
}
return info;
}
_mergeHeaders(headers) {
if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
}
return lowercaseKeys(headers || {});
}
/**
* Gets an existing header value or returns a default.
* Handles converting number header values to strings since HTTP headers must be strings.
* Note: This returns string | string[] since some headers can have multiple values.
* For headers that must always be a single string (like Content-Type), use the
* specialized _getExistingOrDefaultContentTypeHeader method instead.
*/
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
const headerValue = lowercaseKeys(this.requestOptions.headers)[header];
if (headerValue) {
clientHeader =
typeof headerValue === 'number' ? headerValue.toString() : headerValue;
}
}
const additionalValue = additionalHeaders[header];
if (additionalValue !== undefined) {
return typeof additionalValue === 'number'
? additionalValue.toString()
: additionalValue;
}
if (clientHeader !== undefined) {
return clientHeader;
}
return _default;
}
/**
* Specialized version of _getExistingOrDefaultHeader for Content-Type header.
* Always returns a single string (not an array) since Content-Type should be a single value.
* Converts arrays to comma-separated strings and numbers to strings to ensure type safety.
* This was split from _getExistingOrDefaultHeader to provide stricter typing for callers
* that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]).
*/
_getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) {
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType];
if (headerValue) {
if (typeof headerValue === 'number') {
clientHeader = String(headerValue);
}
else if (Array.isArray(headerValue)) {
clientHeader = headerValue.join(', ');
}
else {
clientHeader = headerValue;
}
}
}
const additionalValue = additionalHeaders[Headers.ContentType];
// Return the first non-undefined value, converting numbers or arrays to strings if necessary
if (additionalValue !== undefined) {
if (typeof additionalValue === 'number') {
return String(additionalValue);
}
else if (Array.isArray(additionalValue)) {
return additionalValue.join(', ');
}
else {
return additionalValue;
}
}
if (clientHeader !== undefined) {
return clientHeader;
}
return _default;
}
_getAgent(parsedUrl) {
let agent;
const proxyUrl = pm.getProxyUrl(parsedUrl);
const useProxy = proxyUrl && proxyUrl.hostname;
if (this._keepAlive && useProxy) {
agent = this._proxyAgent;
}
if (!useProxy) {
agent = this._agent;
}
// if agent is already assigned use that agent.
if (agent) {
return agent;
}
const usingSsl = parsedUrl.protocol === 'https:';
let maxSockets = 100;
if (this.requestOptions) {
maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
}
// This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
if (proxyUrl && proxyUrl.hostname) {
const agentOptions = {
maxSockets,
keepAlive: this._keepAlive,
proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
})), { host: proxyUrl.hostname, port: proxyUrl.port })
};
let tunnelAgent;
const overHttps = proxyUrl.protocol === 'https:';
if (usingSsl) {
tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
}
else {
tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
}
agent = tunnelAgent(agentOptions);
this._proxyAgent = agent;
}
// if tunneling agent isn't assigned create a new agent
if (!agent) {
const options = { keepAlive: this._keepAlive, maxSockets };
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
this._agent = agent;
}
if (usingSsl && this._ignoreSslError) {
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
// we have to cast it to any and change it directly
agent.options = Object.assign(agent.options || {}, {
rejectUnauthorized: false
});
}
return agent;
}
_getProxyAgentDispatcher(parsedUrl, proxyUrl) {
let proxyAgent;
if (this._keepAlive) {
proxyAgent = this._proxyAgentDispatcher;
}
// if agent is already assigned use that agent.
if (proxyAgent) {
return proxyAgent;
}
const usingSsl = parsedUrl.protocol === 'https:';
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
})));
this._proxyAgentDispatcher = proxyAgent;
if (usingSsl && this._ignoreSslError) {
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
// we have to cast it to any and change it directly
proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
rejectUnauthorized: false
});
}
return proxyAgent;
}
_getUserAgentWithOrchestrationId(userAgent) {
const baseUserAgent = userAgent || 'actions/http-client';
const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
if (orchId) {
// Sanitize the orchestration ID to ensure it contains only valid characters
// Valid characters: 0-9, a-z, _, -, .
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
}
return baseUserAgent;
}
_performExponentialBackoff(retryNumber) {
return __awaiter(this, void 0, void 0, function* () {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise(resolve => setTimeout(() => resolve(), ms));
});
}
_processResponse(res, options) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const statusCode = res.message.statusCode || 0;
const response = {
statusCode,
result: null,
headers: {}
};
// not found leads to null obj returned
if (statusCode === HttpCodes.NotFound) {
resolve(response);
}
// get the result from the body
function dateTimeDeserializer(key, value) {
if (typeof value === 'string') {
const a = new Date(value);
if (!isNaN(a.valueOf())) {
return a;
}
}
return value;
}
let obj;
let contents;
try {
contents = yield res.readBody();
if (contents && contents.length > 0) {
if (options && options.deserializeDates) {
obj = JSON.parse(contents, dateTimeDeserializer);
}
else {
obj = JSON.parse(contents);
}
response.result = obj;
}
response.headers = res.message.headers;
}
catch (err) {
// Invalid resource (contents not json); leaving result obj null
}
// note that 3xx redirects are handled by the http layer.
if (statusCode > 299) {
let msg;
// if exception/error in body, attempt to get better error
if (obj && obj.message) {
msg = obj.message;
}
else if (contents && contents.length > 0) {
// it may be the case that the exception is in the body message as string
msg = contents;
}
else {
msg = `Failed request: (${statusCode})`;
}
const err = new HttpClientError(msg, statusCode);
err.result = response.result;
reject(err);
}
else {
resolve(response);
}
}));
});
}
}
exports.HttpClient = HttpClient;
const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 4988:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getProxyUrl = getProxyUrl;
exports.checkBypass = checkBypass;
function getProxyUrl(reqUrl) {
const usingSsl = reqUrl.protocol === 'https:';
if (checkBypass(reqUrl)) {
return undefined;
}
const proxyVar = (() => {
if (usingSsl) {
return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
}
else {
return process.env['http_proxy'] || process.env['HTTP_PROXY'];
}
})();
if (proxyVar) {
try {
return new DecodedURL(proxyVar);
}
catch (_a) {
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
return new DecodedURL(`http://${proxyVar}`);
}
}
else {
return undefined;
}
}
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
const reqHost = reqUrl.hostname;
if (isLoopbackAddress(reqHost)) {
return true;
}
const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
if (!noProxy) {
return false;
}
// Determine the request port
let reqPort;
if (reqUrl.port) {
reqPort = Number(reqUrl.port);
}
else if (reqUrl.protocol === 'http:') {
reqPort = 80;
}
else if (reqUrl.protocol === 'https:') {
reqPort = 443;
}
// Format the request hostname and hostname with port
const upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === 'number') {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
// Compare request host against noproxy
for (const upperNoProxyItem of noProxy
.split(',')
.map(x => x.trim().toUpperCase())
.filter(x => x)) {
if (upperNoProxyItem === '*' ||
upperReqHosts.some(x => x === upperNoProxyItem ||
x.endsWith(`.${upperNoProxyItem}`) ||
(upperNoProxyItem.startsWith('.') &&
x.endsWith(`${upperNoProxyItem}`)))) {
return true;
}
}
return false;
}
function isLoopbackAddress(host) {
const hostLower = host.toLowerCase();
return (hostLower === 'localhost' ||
hostLower.startsWith('127.') ||
hostLower.startsWith('[::1]') ||
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
}
class DecodedURL extends URL {
constructor(url, base) {
super(url, base);
this._decodedUsername = decodeURIComponent(super.username);
this._decodedPassword = decodeURIComponent(super.password);
}
get username() {
return this._decodedUsername;
}
get password() {
return this._decodedPassword;
}
}
//# sourceMappingURL=proxy.js.map
/***/ }),
/***/ 5207:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var _a;
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
exports.readlink = readlink;
exports.exists = exists;
exports.isDirectory = isDirectory;
exports.isRooted = isRooted;
exports.tryGetExecutablePath = tryGetExecutablePath;
exports.getCmdPath = getCmdPath;
const fs = __importStar(__nccwpck_require__(9896));
const path = __importStar(__nccwpck_require__(6928));
_a = fs.promises
// export const {open} = 'fs'
, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
// export const {open} = 'fs'
exports.IS_WINDOWS = process.platform === 'win32';
/**
* Custom implementation of readlink to ensure Windows junctions
* maintain trailing backslash for backward compatibility with Node.js < 24
*
* In Node.js 20, Windows junctions (directory symlinks) always returned paths
* with trailing backslashes. Node.js 24 removed this behavior, which breaks
* code that relied on this format for path operations.
*
* This implementation restores the Node 20 behavior by adding a trailing
* backslash to all junction results on Windows.
*/
function readlink(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
const result = yield fs.promises.readlink(fsPath);
// On Windows, restore Node 20 behavior: add trailing backslash to all results
// since junctions on Windows are always directory links
if (exports.IS_WINDOWS && !result.endsWith('\\')) {
return `${result}\\`;
}
return result;
});
}
// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
exports.UV_FS_O_EXLOCK = 0x10000000;
exports.READONLY = fs.constants.O_RDONLY;
function exists(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
try {
yield (0, exports.stat)(fsPath);
}
catch (err) {
if (err.code === 'ENOENT') {
return false;
}
throw err;
}
return true;
});
}
function isDirectory(fsPath_1) {
return __awaiter(this, arguments, void 0, function* (fsPath, useStat = false) {
const stats = useStat ? yield (0, exports.stat)(fsPath) : yield (0, exports.lstat)(fsPath);
return stats.isDirectory();
});
}
/**
* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
*/
function isRooted(p) {
p = normalizeSeparators(p);
if (!p) {
throw new Error('isRooted() parameter "p" cannot be empty');
}
if (exports.IS_WINDOWS) {
return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
); // e.g. C: or C:\hello
}
return p.startsWith('/');
}
/**
* Best effort attempt to determine whether a file exists and is executable.
* @param filePath file path to check
* @param extensions additional file extensions to try
* @return if file exists and is executable, returns the file path. otherwise empty string.
*/
function tryGetExecutablePath(filePath, extensions) {
return __awaiter(this, void 0, void 0, function* () {
let stats = undefined;
try {
// test file exists
stats = yield (0, exports.stat)(filePath);
}
catch (err) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
}
}
if (stats && stats.isFile()) {
if (exports.IS_WINDOWS) {
// on Windows, test for valid extension
const upperExt = path.extname(filePath).toUpperCase();
if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
return filePath;
}
}
else {
if (isUnixExecutable(stats)) {
return filePath;
}
}
}
// try each extension
const originalFilePath = filePath;
for (const extension of extensions) {
filePath = originalFilePath + extension;
stats = undefined;
try {
stats = yield (0, exports.stat)(filePath);
}
catch (err) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
}
}
if (stats && stats.isFile()) {
if (exports.IS_WINDOWS) {
// preserve the case of the actual file (since an extension was appended)
try {
const directory = path.dirname(filePath);
const upperName = path.basename(filePath).toUpperCase();
for (const actualName of yield (0, exports.readdir)(directory)) {
if (upperName === actualName.toUpperCase()) {
filePath = path.join(directory, actualName);
break;
}
}
}
catch (err) {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);
}
return filePath;
}
else {
if (isUnixExecutable(stats)) {
return filePath;
}
}
}
}
return '';
});
}
function normalizeSeparators(p) {
p = p || '';
if (exports.IS_WINDOWS) {
// convert slashes on Windows
p = p.replace(/\//g, '\\');
// remove redundant slashes
return p.replace(/\\\\+/g, '\\');
}
// remove redundant slashes
return p.replace(/\/\/+/g, '/');
}
// on Mac/Linux, test the execute bit
// R W X R W X R W X
// 256 128 64 32 16 8 4 2 1
function isUnixExecutable(stats) {
return ((stats.mode & 1) > 0 ||
((stats.mode & 8) > 0 &&
process.getgid !== undefined &&
stats.gid === process.getgid()) ||
((stats.mode & 64) > 0 &&
process.getuid !== undefined &&
stats.uid === process.getuid()));
}
// Get the path of cmd.exe in windows
function getCmdPath() {
var _a;
return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
}
//# sourceMappingURL=io-util.js.map
/***/ }),
/***/ 4994:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"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) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.cp = cp;
exports.mv = mv;
exports.rmRF = rmRF;
exports.mkdirP = mkdirP;
exports.which = which;
exports.findInPath = findInPath;
const assert_1 = __nccwpck_require__(2613);
const path = __importStar(__nccwpck_require__(6928));
const ioUtil = __importStar(__nccwpck_require__(5207));
/**
* Copies a file or folder.
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
*
* @param source source path
* @param dest destination path
* @param options optional. See CopyOptions.
*/
function cp(source_1, dest_1) {
return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) {
const { force, recursive, copySourceDirectory } = readCopyOptions(options);
const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
// Dest is an existing file, but not forcing
if (destStat && destStat.isFile() && !force) {
return;
}
// If dest is an existing directory, should copy inside.
const newDest = destStat && destStat.isDirectory() && copySourceDirectory
? path.join(dest, path.basename(source))
: dest;
if (!(yield ioUtil.exists(source))) {
throw new Error(`no such file or directory: ${source}`);
}
const sourceStat = yield ioUtil.stat(source);
if (sourceStat.isDirectory()) {
if (!recursive) {
throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);
}
else {
yield cpDirRecursive(source, newDest, 0, force);
}
}
else {
if (path.relative(source, newDest) === '') {
// a file cannot be copied to itself
throw new Error(`'${newDest}' and '${source}' are the same file`);
}
yield copyFile(source, newDest, force);
}
});
}
/**
* Moves a path.
*
* @param source source path
* @param dest destination path
* @param options optional. See MoveOptions.
*/
function mv(source_1, dest_1) {
return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) {
if (yield ioUtil.exists(dest)) {
let destExists = true;
if (yield ioUtil.isDirectory(dest)) {
// If dest is directory copy src into dest
dest = path.join(dest, path.basename(source));
destExists = yield ioUtil.exists(dest);
}
if (destExists) {
if (options.force == null || options.force) {
yield rmRF(dest);
}
else {
throw new Error('Destination already exists');
}
}
}
yield mkdirP(path.dirname(dest));
yield ioUtil.rename(source, dest);
});
}
/**
* Remove a path recursively with force
*
* @param inputPath path to remove
*/
function rmRF(inputPath) {
return __awaiter(this, void 0, void 0, function* () {
if (ioUtil.IS_WINDOWS) {
// Check for invalid characters
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
if (/[*"<>|]/.test(inputPath)) {
throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
}
}
try {
// note if path does not exist, error is silent
yield ioUtil.rm(inputPath, {
force: true,
maxRetries: 3,
recursive: true,
retryDelay: 300
});
}
catch (err) {
throw new Error(`File was unable to be removed ${err}`);
}
});
}
/**
* Make a directory. Creates the full path with folders in between
* Will throw if it fails
*
* @param fsPath path to create
* @returns Promise<void>
*/
function mkdirP(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
(0, assert_1.ok)(fsPath, 'a path argument must be provided');
yield ioUtil.mkdir(fsPath, { recursive: true });
});
}
/**
* Returns path of a tool had the tool actually been invoked. Resolves via paths.
* If you check and the tool does not exist, it will throw.
*
* @param tool name of the tool
* @param check whether to check if tool exists
* @returns Promise<string> path to tool
*/
function which(tool, check) {
return __awaiter(this, void 0, void 0, function* () {
if (!tool) {
throw new Error("parameter 'tool' is required");
}
// recursive when check=true
if (check) {
const result = yield which(tool, false);
if (!result) {
if (ioUtil.IS_WINDOWS) {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
}
else {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
}
}
return result;
}
const matches = yield findInPath(tool);
if (matches && matches.length > 0) {
return matches[0];
}
return '';
});
}
/**
* Returns a list of all occurrences of the given tool on the system path.
*
* @returns Promise<string[]> the paths of the tool
*/
function findInPath(tool) {
return __awaiter(this, void 0, void 0, function* () {
if (!tool) {
throw new Error("parameter 'tool' is required");
}
// build the list of extensions to try
const extensions = [];
if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
if (extension) {
extensions.push(extension);
}
}
}
// if it's rooted, return it if exists. otherwise return empty.
if (ioUtil.isRooted(tool)) {
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
if (filePath) {
return [filePath];
}
return [];
}
// if any path separators, return empty
if (tool.includes(path.sep)) {
return [];
}
// build the list of directories
//
// Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
// it feels like we should not do this. Checking the current directory seems like more of a use
// case of a shell, and the which() function exposed by the toolkit should strive for consistency
// across platforms.
const directories = [];
if (process.env.PATH) {
for (const p of process.env.PATH.split(path.delimiter)) {
if (p) {
directories.push(p);
}
}
}
// find all matches
const matches = [];
for (const directory of directories) {
const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
if (filePath) {
matches.push(filePath);
}
}
return matches;
});
}
function readCopyOptions(options) {
const force = options.force == null ? true : options.force;
const recursive = Boolean(options.recursive);
const copySourceDirectory = options.copySourceDirectory == null
? true
: Boolean(options.copySourceDirectory);
return { force, recursive, copySourceDirectory };
}
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
return __awaiter(this, void 0, void 0, function* () {
// Ensure there is not a run away recursive copy
if (currentDepth >= 255)
return;
currentDepth++;
yield mkdirP(destDir);
const files = yield ioUtil.readdir(sourceDir);
for (const fileName of files) {
const srcFile = `${sourceDir}/${fileName}`;
const destFile = `${destDir}/${fileName}`;
const srcFileStat = yield ioUtil.lstat(srcFile);
if (srcFileStat.isDirectory()) {
// Recurse
yield cpDirRecursive(srcFile, destFile, currentDepth, force);
}
else {
yield copyFile(srcFile, destFile, force);
}
}
// Change the mode for the newly created directory
yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
});
}
// Buffered file copy
function copyFile(srcFile, destFile, force) {
return __awaiter(this, void 0, void 0, function* () {
if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
// unlink/re-link it
try {
yield ioUtil.lstat(destFile);
yield ioUtil.unlink(destFile);
}
catch (e) {
// Try to override file permission
if (e.code === 'EPERM') {
yield ioUtil.chmod(destFile, '0666');
yield ioUtil.unlink(destFile);
}
// other errors = it doesn't exist, no work to do
}
// Copy over symlink
const symlinkFull = yield ioUtil.readlink(srcFile);
yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);
}
else if (!(yield ioUtil.exists(destFile)) || force) {
yield ioUtil.copyFile(srcFile, destFile);
}
});
}
//# sourceMappingURL=io.js.map
/***/ }),
/***/ 6656:
/***/ ((module) => {
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
module.exports = {
newInvalidAsn1Error: function (msg) {
var e = new Error();
e.name = 'InvalidAsn1Error';
e.message = msg || '';
return e;
}
};
/***/ }),
/***/ 7703:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
var errors = __nccwpck_require__(6656);
var types = __nccwpck_require__(254);
var Reader = __nccwpck_require__(1996);
var Writer = __nccwpck_require__(9816);
// --- Exports
module.exports = {
Reader: Reader,
Writer: Writer
};
for (var t in types) {
if (types.hasOwnProperty(t))
module.exports[t] = types[t];
}
for (var e in errors) {
if (errors.hasOwnProperty(e))
module.exports[e] = errors[e];
}
/***/ }),
/***/ 1996:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
var assert = __nccwpck_require__(2613);
var Buffer = (__nccwpck_require__(2803).Buffer);
var ASN1 = __nccwpck_require__(254);
var errors = __nccwpck_require__(6656);
// --- Globals
var newInvalidAsn1Error = errors.newInvalidAsn1Error;
// --- API
function Reader(data) {
if (!data || !Buffer.isBuffer(data))
throw new TypeError('data must be a node Buffer');
this._buf = data;
this._size = data.length;
// These hold the "current" state
this._len = 0;
this._offset = 0;
}
Object.defineProperty(Reader.prototype, 'length', {
enumerable: true,
get: function () { return (this._len); }
});
Object.defineProperty(Reader.prototype, 'offset', {
enumerable: true,
get: function () { return (this._offset); }
});
Object.defineProperty(Reader.prototype, 'remain', {
get: function () { return (this._size - this._offset); }
});
Object.defineProperty(Reader.prototype, 'buffer', {
get: function () { return (this._buf.slice(this._offset)); }
});
/**
* Reads a single byte and advances offset; you can pass in `true` to make this
* a "peek" operation (i.e., get the byte, but don't advance the offset).
*
* @param {Boolean} peek true means don't move offset.
* @return {Number} the next byte, null if not enough data.
*/
Reader.prototype.readByte = function (peek) {
if (this._size - this._offset < 1)
return null;
var b = this._buf[this._offset] & 0xff;
if (!peek)
this._offset += 1;
return b;
};
Reader.prototype.peek = function () {
return this.readByte(true);
};
/**
* Reads a (potentially) variable length off the BER buffer. This call is
* not really meant to be called directly, as callers have to manipulate
* the internal buffer afterwards.
*
* As a result of this call, you can call `Reader.length`, until the
* next thing called that does a readLength.
*
* @return {Number} the amount of offset to advance the buffer.
* @throws {InvalidAsn1Error} on bad ASN.1
*/
Reader.prototype.readLength = function (offset) {
if (offset === undefined)
offset = this._offset;
if (offset >= this._size)
return null;
var lenB = this._buf[offset++] & 0xff;
if (lenB === null)
return null;
if ((lenB & 0x80) === 0x80) {
lenB &= 0x7f;
if (lenB === 0)
throw newInvalidAsn1Error('Indefinite length not supported');
if (lenB > 4)
throw newInvalidAsn1Error('encoding too long');
if (this._size - offset < lenB)
return null;
this._len = 0;
for (var i = 0; i < lenB; i++)
this._len = (this._len << 8) + (this._buf[offset++] & 0xff);
} else {
// Wasn't a variable length
this._len = lenB;
}
return offset;
};
/**
* Parses the next sequence in this BER buffer.
*
* To get the length of the sequence, call `Reader.length`.
*
* @return {Number} the sequence's tag.
*/
Reader.prototype.readSequence = function (tag) {
var seq = this.peek();
if (seq === null)
return null;
if (tag !== undefined && tag !== seq)
throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
': got 0x' + seq.toString(16));
var o = this.readLength(this._offset + 1); // stored in `length`
if (o === null)
return null;
this._offset = o;
return seq;
};
Reader.prototype.readInt = function () {
return this._readTag(ASN1.Integer);
};
Reader.prototype.readBoolean = function () {
return (this._readTag(ASN1.Boolean) === 0 ? false : true);
};
Reader.prototype.readEnumeration = function () {
return this._readTag(ASN1.Enumeration);
};
Reader.prototype.readString = function (tag, retbuf) {
if (!tag)
tag = ASN1.OctetString;
var b = this.peek();
if (b === null)
return null;
if (b !== tag)
throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
': got 0x' + b.toString(16));
var o = this.readLength(this._offset + 1); // stored in `length`
if (o === null)
return null;
if (this.length > this._size - o)
return null;
this._offset = o;
if (this.length === 0)
return retbuf ? Buffer.alloc(0) : '';
var str = this._buf.slice(this._offset, this._offset + this.length);
this._offset += this.length;
return retbuf ? str : str.toString('utf8');
};
Reader.prototype.readOID = function (tag) {
if (!tag)
tag = ASN1.OID;
var b = this.readString(tag, true);
if (b === null)
return null;
var values = [];
var value = 0;
for (var i = 0; i < b.length; i++) {
var byte = b[i] & 0xff;
value <<= 7;
value += byte & 0x7f;
if ((byte & 0x80) === 0) {
values.push(value);
value = 0;
}
}
value = values.shift();
values.unshift(value % 40);
values.unshift((value / 40) >> 0);
return values.join('.');
};
Reader.prototype._readTag = function (tag) {
assert.ok(tag !== undefined);
var b = this.peek();
if (b === null)
return null;
if (b !== tag)
throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +
': got 0x' + b.toString(16));
var o = this.readLength(this._offset + 1); // stored in `length`
if (o === null)
return null;
if (this.length > 4)
throw newInvalidAsn1Error('Integer too long: ' + this.length);
if (this.length > this._size - o)
return null;
this._offset = o;
var fb = this._buf[this._offset];
var value = 0;
for (var i = 0; i < this.length; i++) {
value <<= 8;
value |= (this._buf[this._offset++] & 0xff);
}
if ((fb & 0x80) === 0x80 && i !== 4)
value -= (1 << (i * 8));
return value >> 0;
};
// --- Exported API
module.exports = Reader;
/***/ }),
/***/ 254:
/***/ ((module) => {
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
module.exports = {
EOC: 0,
Boolean: 1,
Integer: 2,
BitString: 3,
OctetString: 4,
Null: 5,
OID: 6,
ObjectDescriptor: 7,
External: 8,
Real: 9, // float
Enumeration: 10,
PDV: 11,
Utf8String: 12,
RelativeOID: 13,
Sequence: 16,
Set: 17,
NumericString: 18,
PrintableString: 19,
T61String: 20,
VideotexString: 21,
IA5String: 22,
UTCTime: 23,
GeneralizedTime: 24,
GraphicString: 25,
VisibleString: 26,
GeneralString: 28,
UniversalString: 29,
CharacterString: 30,
BMPString: 31,
Constructor: 32,
Context: 128
};
/***/ }),
/***/ 9816:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
var assert = __nccwpck_require__(2613);
var Buffer = (__nccwpck_require__(2803).Buffer);
var ASN1 = __nccwpck_require__(254);
var errors = __nccwpck_require__(6656);
// --- Globals
var newInvalidAsn1Error = errors.newInvalidAsn1Error;
var DEFAULT_OPTS = {
size: 1024,
growthFactor: 8
};
// --- Helpers
function merge(from, to) {
assert.ok(from);
assert.equal(typeof (from), 'object');
assert.ok(to);
assert.equal(typeof (to), 'object');
var keys = Object.getOwnPropertyNames(from);
keys.forEach(function (key) {
if (to[key])
return;
var value = Object.getOwnPropertyDescriptor(from, key);
Object.defineProperty(to, key, value);
});
return to;
}
// --- API
function Writer(options) {
options = merge(DEFAULT_OPTS, options || {});
this._buf = Buffer.alloc(options.size || 1024);
this._size = this._buf.length;
this._offset = 0;
this._options = options;
// A list of offsets in the buffer where we need to insert
// sequence tag/len pairs.
this._seq = [];
}
Object.defineProperty(Writer.prototype, 'buffer', {
get: function () {
if (this._seq.length)
throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)');
return (this._buf.slice(0, this._offset));
}
});
Writer.prototype.writeByte = function (b) {
if (typeof (b) !== 'number')
throw new TypeError('argument must be a Number');
this._ensure(1);
this._buf[this._offset++] = b;
};
Writer.prototype.writeInt = function (i, tag) {
if (typeof (i) !== 'number')
throw new TypeError('argument must be a Number');
if (typeof (tag) !== 'number')
tag = ASN1.Integer;
var sz = 4;
while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) &&
(sz > 1)) {
sz--;
i <<= 8;
}
if (sz > 4)
throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff');
this._ensure(2 + sz);
this._buf[this._offset++] = tag;
this._buf[this._offset++] = sz;
while (sz-- > 0) {
this._buf[this._offset++] = ((i & 0xff000000) >>> 24);
i <<= 8;
}
};
Writer.prototype.writeNull = function () {
this.writeByte(ASN1.Null);
this.writeByte(0x00);
};
Writer.prototype.writeEnumeration = function (i, tag) {
if (typeof (i) !== 'number')
throw new TypeError('argument must be a Number');
if (typeof (tag) !== 'number')
tag = ASN1.Enumeration;
return this.writeInt(i, tag);
};
Writer.prototype.writeBoolean = function (b, tag) {
if (typeof (b) !== 'boolean')
throw new TypeError('argument must be a Boolean');
if (typeof (tag) !== 'number')
tag = ASN1.Boolean;
this._ensure(3);
this._buf[this._offset++] = tag;
this._buf[this._offset++] = 0x01;
this._buf[this._offset++] = b ? 0xff : 0x00;
};
Writer.prototype.writeString = function (s, tag) {
if (typeof (s) !== 'string')
throw new TypeError('argument must be a string (was: ' + typeof (s) + ')');
if (typeof (tag) !== 'number')
tag = ASN1.OctetString;
var len = Buffer.byteLength(s);
this.writeByte(tag);
this.writeLength(len);
if (len) {
this._ensure(len);
this._buf.write(s, this._offset);
this._offset += len;
}
};
Writer.prototype.writeBuffer = function (buf, tag) {
if (typeof (tag) !== 'number')
throw new TypeError('tag must be a number');
if (!Buffer.isBuffer(buf))
throw new TypeError('argument must be a buffer');
this.writeByte(tag);
this.writeLength(buf.length);
this._ensure(buf.length);
buf.copy(this._buf, this._offset, 0, buf.length);
this._offset += buf.length;
};
Writer.prototype.writeStringArray = function (strings) {
if ((!strings instanceof Array))
throw new TypeError('argument must be an Array[String]');
var self = this;
strings.forEach(function (s) {
self.writeString(s);
});
};
// This is really to solve DER cases, but whatever for now
Writer.prototype.writeOID = function (s, tag) {
if (typeof (s) !== 'string')
throw new TypeError('argument must be a string');
if (typeof (tag) !== 'number')
tag = ASN1.OID;
if (!/^([0-9]+\.){3,}[0-9]+$/.test(s))
throw new Error('argument is not a valid OID string');
function encodeOctet(bytes, octet) {
if (octet < 128) {
bytes.push(octet);
} else if (octet < 16384) {
bytes.push((octet >>> 7) | 0x80);
bytes.push(octet & 0x7F);
} else if (octet < 2097152) {
bytes.push((octet >>> 14) | 0x80);
bytes.push(((octet >>> 7) | 0x80) & 0xFF);
bytes.push(octet & 0x7F);
} else if (octet < 268435456) {
bytes.push((octet >>> 21) | 0x80);
bytes.push(((octet >>> 14) | 0x80) & 0xFF);
bytes.push(((octet >>> 7) | 0x80) & 0xFF);
bytes.push(octet & 0x7F);
} else {
bytes.push(((octet >>> 28) | 0x80) & 0xFF);
bytes.push(((octet >>> 21) | 0x80) & 0xFF);
bytes.push(((octet >>> 14) | 0x80) & 0xFF);
bytes.push(((octet >>> 7) | 0x80) & 0xFF);
bytes.push(octet & 0x7F);
}
}
var tmp = s.split('.');
var bytes = [];
bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10));
tmp.slice(2).forEach(function (b) {
encodeOctet(bytes, parseInt(b, 10));
});
var self = this;
this._ensure(2 + bytes.length);
this.writeByte(tag);
this.writeLength(bytes.length);
bytes.forEach(function (b) {
self.writeByte(b);
});
};
Writer.prototype.writeLength = function (len) {
if (typeof (len) !== 'number')
throw new TypeError('argument must be a Number');
this._ensure(4);
if (len <= 0x7f) {
this._buf[this._offset++] = len;
} else if (len <= 0xff) {
this._buf[this._offset++] = 0x81;
this._buf[this._offset++] = len;
} else if (len <= 0xffff) {
this._buf[this._offset++] = 0x82;
this._buf[this._offset++] = len >> 8;
this._buf[this._offset++] = len;
} else if (len <= 0xffffff) {
this._buf[this._offset++] = 0x83;
this._buf[this._offset++] = len >> 16;
this._buf[this._offset++] = len >> 8;
this._buf[this._offset++] = len;
} else {
throw newInvalidAsn1Error('Length too long (> 4 bytes)');
}
};
Writer.prototype.startSequence = function (tag) {
if (typeof (tag) !== 'number')
tag = ASN1.Sequence | ASN1.Constructor;
this.writeByte(tag);
this._seq.push(this._offset);
this._ensure(3);
this._offset += 3;
};
Writer.prototype.endSequence = function () {
var seq = this._seq.pop();
var start = seq + 3;
var len = this._offset - start;
if (len <= 0x7f) {
this._shift(start, len, -2);
this._buf[seq] = len;
} else if (len <= 0xff) {
this._shift(start, len, -1);
this._buf[seq] = 0x81;
this._buf[seq + 1] = len;
} else if (len <= 0xffff) {
this._buf[seq] = 0x82;
this._buf[seq + 1] = len >> 8;
this._buf[seq + 2] = len;
} else if (len <= 0xffffff) {
this._shift(start, len, 1);
this._buf[seq] = 0x83;
this._buf[seq + 1] = len >> 16;
this._buf[seq + 2] = len >> 8;
this._buf[seq + 3] = len;
} else {
throw newInvalidAsn1Error('Sequence too long');
}
};
Writer.prototype._shift = function (start, len, shift) {
assert.ok(start !== undefined);
assert.ok(len !== undefined);
assert.ok(shift);
this._buf.copy(this._buf, start + shift, start, start + len);
this._offset += shift;
};
Writer.prototype._ensure = function (len) {
assert.ok(len);
if (this._size - this._offset < len) {
var sz = this._size * this._options.growthFactor;
if (sz - this._offset < len)
sz += len;
var buf = Buffer.alloc(sz);
this._buf.copy(buf, 0, 0, this._offset);
this._buf = buf;
this._size = sz;
}
};
// --- Exported API
module.exports = Writer;
/***/ }),
/***/ 9837:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
// If you have no idea what ASN.1 or BER is, see this:
// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
var Ber = __nccwpck_require__(7703);
// --- Exported API
module.exports = {
Ber: Ber,
BerReader: Ber.Reader,
BerWriter: Ber.Writer
};
/***/ }),
/***/ 686:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
var crypto_hash_sha512 = (__nccwpck_require__(668).lowlevel).crypto_hash;
/*
* This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a
* result, it retains the original copyright and license. The two files are
* under slightly different (but compatible) licenses, and are here combined in
* one file.
*
* Credit for the actual porting work goes to:
* Devi Mandiri <me@devi.web.id>
*/
/*
* The Blowfish portions are under the following license:
*
* Blowfish block cipher for OpenBSD
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
* All rights reserved.
*
* Implementation advice by David Mazieres <dm@lcs.mit.edu>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* The bcrypt_pbkdf portions are under the following license:
*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Performance improvements (Javascript-specific):
*
* Copyright 2016, Joyent Inc
* Author: Alex Wilson <alex.wilson@joyent.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// Ported from OpenBSD bcrypt_pbkdf.c v1.9
var BLF_J = 0;
var Blowfish = function() {
this.S = [
new Uint32Array([
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]),
new Uint32Array([
0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]),
new Uint32Array([
0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]),
new Uint32Array([
0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6])
];
this.P = new Uint32Array([
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b]);
};
function F(S, x8, i) {
return (((S[0][x8[i+3]] +
S[1][x8[i+2]]) ^
S[2][x8[i+1]]) +
S[3][x8[i]]);
};
Blowfish.prototype.encipher = function(x, x8) {
if (x8 === undefined) {
x8 = new Uint8Array(x.buffer);
if (x.byteOffset !== 0)
x8 = x8.subarray(x.byteOffset);
}
x[0] ^= this.P[0];
for (var i = 1; i < 16; i += 2) {
x[1] ^= F(this.S, x8, 0) ^ this.P[i];
x[0] ^= F(this.S, x8, 4) ^ this.P[i+1];
}
var t = x[0];
x[0] = x[1] ^ this.P[17];
x[1] = t;
};
Blowfish.prototype.decipher = function(x) {
var x8 = new Uint8Array(x.buffer);
if (x.byteOffset !== 0)
x8 = x8.subarray(x.byteOffset);
x[0] ^= this.P[17];
for (var i = 16; i > 0; i -= 2) {
x[1] ^= F(this.S, x8, 0) ^ this.P[i];
x[0] ^= F(this.S, x8, 4) ^ this.P[i-1];
}
var t = x[0];
x[0] = x[1] ^ this.P[0];
x[1] = t;
};
function stream2word(data, databytes){
var i, temp = 0;
for (i = 0; i < 4; i++, BLF_J++) {
if (BLF_J >= databytes) BLF_J = 0;
temp = (temp << 8) | data[BLF_J];
}
return temp;
};
Blowfish.prototype.expand0state = function(key, keybytes) {
var d = new Uint32Array(2), i, k;
var d8 = new Uint8Array(d.buffer);
for (i = 0, BLF_J = 0; i < 18; i++) {
this.P[i] ^= stream2word(key, keybytes);
}
BLF_J = 0;
for (i = 0; i < 18; i += 2) {
this.encipher(d, d8);
this.P[i] = d[0];
this.P[i+1] = d[1];
}
for (i = 0; i < 4; i++) {
for (k = 0; k < 256; k += 2) {
this.encipher(d, d8);
this.S[i][k] = d[0];
this.S[i][k+1] = d[1];
}
}
};
Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) {
var d = new Uint32Array(2), i, k;
for (i = 0, BLF_J = 0; i < 18; i++) {
this.P[i] ^= stream2word(key, keybytes);
}
for (i = 0, BLF_J = 0; i < 18; i += 2) {
d[0] ^= stream2word(data, databytes);
d[1] ^= stream2word(data, databytes);
this.encipher(d);
this.P[i] = d[0];
this.P[i+1] = d[1];
}
for (i = 0; i < 4; i++) {
for (k = 0; k < 256; k += 2) {
d[0] ^= stream2word(data, databytes);
d[1] ^= stream2word(data, databytes);
this.encipher(d);
this.S[i][k] = d[0];
this.S[i][k+1] = d[1];
}
}
BLF_J = 0;
};
Blowfish.prototype.enc = function(data, blocks) {
for (var i = 0; i < blocks; i++) {
this.encipher(data.subarray(i*2));
}
};
Blowfish.prototype.dec = function(data, blocks) {
for (var i = 0; i < blocks; i++) {
this.decipher(data.subarray(i*2));
}
};
var BCRYPT_BLOCKS = 8,
BCRYPT_HASHSIZE = 32;
function bcrypt_hash(sha2pass, sha2salt, out) {
var state = new Blowfish(),
cdata = new Uint32Array(BCRYPT_BLOCKS), i,
ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,
99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,
105,116,101]); //"OxychromaticBlowfishSwatDynamite"
state.expandstate(sha2salt, 64, sha2pass, 64);
for (i = 0; i < 64; i++) {
state.expand0state(sha2salt, 64);
state.expand0state(sha2pass, 64);
}
for (i = 0; i < BCRYPT_BLOCKS; i++)
cdata[i] = stream2word(ciphertext, ciphertext.byteLength);
for (i = 0; i < 64; i++)
state.enc(cdata, cdata.byteLength / 8);
for (i = 0; i < BCRYPT_BLOCKS; i++) {
out[4*i+3] = cdata[i] >>> 24;
out[4*i+2] = cdata[i] >>> 16;
out[4*i+1] = cdata[i] >>> 8;
out[4*i+0] = cdata[i];
}
};
function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) {
var sha2pass = new Uint8Array(64),
sha2salt = new Uint8Array(64),
out = new Uint8Array(BCRYPT_HASHSIZE),
tmpout = new Uint8Array(BCRYPT_HASHSIZE),
countsalt = new Uint8Array(saltlen+4),
i, j, amt, stride, dest, count,
origkeylen = keylen;
if (rounds < 1)
return -1;
if (passlen === 0 || saltlen === 0 || keylen === 0 ||
keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20))
return -1;
stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength);
amt = Math.floor((keylen + stride - 1) / stride);
for (i = 0; i < saltlen; i++)
countsalt[i] = salt[i];
crypto_hash_sha512(sha2pass, pass, passlen);
for (count = 1; keylen > 0; count++) {
countsalt[saltlen+0] = count >>> 24;
countsalt[saltlen+1] = count >>> 16;
countsalt[saltlen+2] = count >>> 8;
countsalt[saltlen+3] = count;
crypto_hash_sha512(sha2salt, countsalt, saltlen + 4);
bcrypt_hash(sha2pass, sha2salt, tmpout);
for (i = out.byteLength; i--;)
out[i] = tmpout[i];
for (i = 1; i < rounds; i++) {
crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength);
bcrypt_hash(sha2pass, sha2salt, tmpout);
for (j = 0; j < out.byteLength; j++)
out[j] ^= tmpout[j];
}
amt = Math.min(amt, keylen);
for (i = 0; i < amt; i++) {
dest = i * stride + (count - 1);
if (dest >= origkeylen)
break;
key[dest] = out[i];
}
keylen -= i;
}
return 0;
};
module.exports = {
BLOCKS: BCRYPT_BLOCKS,
HASHSIZE: BCRYPT_HASHSIZE,
hash: bcrypt_hash,
pbkdf: bcrypt_pbkdf
};
/***/ }),
/***/ 4982:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const binding = __nccwpck_require__(5243);
module.exports = binding.getCPUInfo;
/***/ }),
/***/ 6543:
/***/ ((module) => {
"use strict";
const isStream = stream =>
stream !== null &&
typeof stream === 'object' &&
typeof stream.pipe === 'function';
isStream.writable = stream =>
isStream(stream) &&
stream.writable !== false &&
typeof stream._write === 'function' &&
typeof stream._writableState === 'object';
isStream.readable = stream =>
isStream(stream) &&
stream.readable !== false &&
typeof stream._read === 'function' &&
typeof stream._readableState === 'object';
isStream.duplex = stream =>
isStream.writable(stream) &&
isStream.readable(stream);
isStream.transform = stream =>
isStream.duplex(stream) &&
typeof stream._transform === 'function';
module.exports = isStream;
/***/ }),
/***/ 6512:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const fs = __nccwpck_require__(9896);
const path = __nccwpck_require__(6928);
const {promisify} = __nccwpck_require__(9023);
const semver = __nccwpck_require__(9318);
const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0');
// https://github.com/nodejs/node/issues/8987
// https://github.com/libuv/libuv/pull/1088
const checkPath = pth => {
if (process.platform === 'win32') {
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''));
if (pathHasInvalidWinCharacters) {
const error = new Error(`Path contains invalid characters: ${pth}`);
error.code = 'EINVAL';
throw error;
}
}
};
const processOptions = options => {
// https://github.com/sindresorhus/make-dir/issues/18
const defaults = {
mode: 0o777,
fs
};
return {
...defaults,
...options
};
};
const permissionError = pth => {
// This replicates the exception of `fs.mkdir` with native the
// `recusive` option when run on an invalid drive under Windows.
const error = new Error(`operation not permitted, mkdir '${pth}'`);
error.code = 'EPERM';
error.errno = -4048;
error.path = pth;
error.syscall = 'mkdir';
return error;
};
const makeDir = async (input, options) => {
checkPath(input);
options = processOptions(options);
const mkdir = promisify(options.fs.mkdir);
const stat = promisify(options.fs.stat);
if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) {
const pth = path.resolve(input);
await mkdir(pth, {
mode: options.mode,
recursive: true
});
return pth;
}
const make = async pth => {
try {
await mkdir(pth, options.mode);
return pth;
} catch (error) {
if (error.code === 'EPERM') {
throw error;
}
if (error.code === 'ENOENT') {
if (path.dirname(pth) === pth) {
throw permissionError(pth);
}
if (error.message.includes('null bytes')) {
throw error;
}
await make(path.dirname(pth));
return make(pth);
}
try {
const stats = await stat(pth);
if (!stats.isDirectory()) {
throw new Error('The path is not a directory');
}
} catch (_) {
throw error;
}
return pth;
}
};
return make(path.resolve(input));
};
module.exports = makeDir;
module.exports.sync = (input, options) => {
checkPath(input);
options = processOptions(options);
if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) {
const pth = path.resolve(input);
fs.mkdirSync(pth, {
mode: options.mode,
recursive: true
});
return pth;
}
const make = pth => {
try {
options.fs.mkdirSync(pth, options.mode);
} catch (error) {
if (error.code === 'EPERM') {
throw error;
}
if (error.code === 'ENOENT') {
if (path.dirname(pth) === pth) {
throw permissionError(pth);
}
if (error.message.includes('null bytes')) {
throw error;
}
make(path.dirname(pth));
return make(pth);
}
try {
if (!options.fs.statSync(pth).isDirectory()) {
throw new Error('The path is not a directory');
}
} catch (_) {
throw error;
}
}
return pth;
};
return make(path.resolve(input));
};
/***/ }),
/***/ 2803:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
/* eslint-disable node/no-deprecated-api */
var buffer = __nccwpck_require__(181)
var Buffer = buffer.Buffer
var safer = {}
var key
for (key in buffer) {
if (!buffer.hasOwnProperty(key)) continue
if (key === 'SlowBuffer' || key === 'Buffer') continue
safer[key] = buffer[key]
}
var Safer = safer.Buffer = {}
for (key in Buffer) {
if (!Buffer.hasOwnProperty(key)) continue
if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
Safer[key] = Buffer[key]
}
safer.Buffer.prototype = Buffer.prototype
if (!Safer.from || Safer.from === Uint8Array.from) {
Safer.from = function (value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
}
if (value && typeof value.length === 'undefined') {
throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
}
return Buffer(value, encodingOrOffset, length)
}
}
if (!Safer.alloc) {
Safer.alloc = function (size, fill, encoding) {
if (typeof size !== 'number') {
throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
}
if (size < 0 || size >= 2 * (1 << 30)) {
throw new RangeError('The value "' + size + '" is invalid for option "size"')
}
var buf = Buffer(size)
if (!fill || fill.length === 0) {
buf.fill(0)
} else if (typeof encoding === 'string') {
buf.fill(fill, encoding)
} else {
buf.fill(fill)
}
return buf
}
}
if (!safer.kStringMaxLength) {
try {
safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
} catch (e) {
// we can't determine kStringMaxLength in environments where process.binding
// is unsupported, so let's not set it
}
}
if (!safer.constants) {
safer.constants = {
MAX_LENGTH: safer.kMaxLength
}
if (safer.kStringMaxLength) {
safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
}
}
module.exports = safer
/***/ }),
/***/ 9318:
/***/ ((module, exports) => {
exports = module.exports = SemVer
var debug
/* istanbul ignore next */
if (typeof process === 'object' &&
process.env &&
process.env.NODE_DEBUG &&
/\bsemver\b/i.test(process.env.NODE_DEBUG)) {
debug = function () {
var args = Array.prototype.slice.call(arguments, 0)
args.unshift('SEMVER')
console.log.apply(console, args)
}
} else {
debug = function () {}
}
// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
exports.SEMVER_SPEC_VERSION = '2.0.0'
var MAX_LENGTH = 256
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
/* istanbul ignore next */ 9007199254740991
// Max safe segment length for coercion.
var MAX_SAFE_COMPONENT_LENGTH = 16
// The actual regexps go on exports.re
var re = exports.re = []
var src = exports.src = []
var t = exports.tokens = {}
var R = 0
function tok (n) {
t[n] = R++
}
// The following Regular Expressions can be used for tokenizing,
// validating, and parsing SemVer version strings.
// ## Numeric
gitextract_06o2uh5w/ ├── .github/ │ └── workflows/ │ └── scp-example-workflow.yml ├── .gitignore ├── .node-version ├── .prettierignore ├── .prettierrc.json ├── LICENSE ├── action.yml ├── dist/ │ ├── build/ │ │ └── Release/ │ │ └── cpufeatures.node │ ├── index.js │ └── lib/ │ └── protocol/ │ └── crypto/ │ └── build/ │ └── Release/ │ └── sshcrypto.node ├── lib/ │ ├── index.js │ └── keyboard.js ├── package.json ├── readme.md ├── src/ │ ├── index.ts │ └── keyboard.ts └── tsconfig.json
SYMBOL INDEX (2029 symbols across 3 files)
FILE: dist/index.js
function adopt (line 43) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 45) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 46) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 47) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function run (line 62) | function run() {
function connect (line 112) | function connect() {
function scp (line 140) | function scp(ssh_1, local_1, remote_1) {
function putDirectory (line 164) | function putDirectory(ssh_1, local_1, remote_1) {
function cleanDirectory (line 197) | function cleanDirectory(ssh_1, remote_1) {
function putFile (line 212) | function putFile(ssh_1, local_1, remote_1) {
function isDirectory (line 227) | function isDirectory(path) {
function putMany (line 230) | function putMany(array, asyncFunction) {
function issueCommand (line 340) | function issueCommand(command, properties, message) {
function issue (line 344) | function issue(name, message = '') {
class Command (line 348) | class Command {
method constructor (line 349) | constructor(command, properties, message) {
method toString (line 357) | toString() {
function escapeData (line 381) | function escapeData(s) {
function escapeProperty (line 387) | function escapeProperty(s) {
function adopt (line 438) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 440) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 441) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 442) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function exportVariable (line 498) | function exportVariable(name, val) {
function setSecret (line 536) | function setSecret(secret) {
function addPath (line 543) | function addPath(inputPath) {
function getInput (line 562) | function getInput(name, options) {
function getMultilineInput (line 580) | function getMultilineInput(name, options) {
function getBooleanInput (line 599) | function getBooleanInput(name, options) {
function setOutput (line 617) | function setOutput(name, value) {
function setCommandEcho (line 630) | function setCommandEcho(enabled) {
function setFailed (line 641) | function setFailed(message) {
function isDebug (line 651) | function isDebug() {
function debug (line 658) | function debug(message) {
function error (line 666) | function error(message, properties = {}) {
function warning (line 674) | function warning(message, properties = {}) {
function notice (line 682) | function notice(message, properties = {}) {
function info (line 689) | function info(message) {
function startGroup (line 699) | function startGroup(name) {
function endGroup (line 705) | function endGroup() {
function group (line 716) | function group(name, fn) {
function saveState (line 739) | function saveState(name, value) {
function getState (line 752) | function getState(name) {
function getIDToken (line 755) | function getIDToken(aud) {
function issueFileCommand (line 833) | function issueFileCommand(command, message) {
function prepareKeyValueMessage (line 845) | function prepareKeyValueMessage(key, value) {
function adopt (line 869) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 871) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 872) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 873) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class OidcClient (line 882) | class OidcClient {
method createHttpClient (line 883) | static createHttpClient(allowRetry = true, maxRetry = 10) {
method getRequestToken (line 890) | static getRequestToken() {
method getIDTokenUrl (line 897) | static getIDTokenUrl() {
method getCall (line 904) | static getCall(id_token_url) {
method getIDToken (line 922) | static getIDToken(audience) {
function toPosixPath (line 997) | function toPosixPath(pth) {
function toWin32Path (line 1007) | function toWin32Path(pth) {
function toPlatformPath (line 1018) | function toPlatformPath(pth) {
function adopt (line 1064) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1066) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1067) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1068) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function getDetails (line 1119) | function getDetails() {
function adopt (line 1142) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1144) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1145) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1146) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class Summary (line 1157) | class Summary {
method constructor (line 1158) | constructor() {
method filePath (line 1167) | filePath() {
method wrap (line 1195) | wrap(tag, content, attrs = {}) {
method write (line 1211) | write(options) {
method clear (line 1225) | clear() {
method stringify (line 1235) | stringify() {
method isEmptyBuffer (line 1243) | isEmptyBuffer() {
method emptyBuffer (line 1251) | emptyBuffer() {
method addRaw (line 1263) | addRaw(text, addEOL = false) {
method addEOL (line 1272) | addEOL() {
method addCodeBlock (line 1283) | addCodeBlock(code, lang) {
method addList (line 1296) | addList(items, ordered = false) {
method addTable (line 1309) | addTable(rows) {
method addDetails (line 1337) | addDetails(label, content) {
method addImage (line 1350) | addImage(src, alt, options) {
method addHeading (line 1364) | addHeading(text, level) {
method addSeparator (line 1377) | addSeparator() {
method addBreak (line 1386) | addBreak() {
method addQuote (line 1398) | addQuote(text, cite) {
method addLink (line 1411) | addLink(text, href) {
function toCommandValue (line 1440) | function toCommandValue(input) {
function toCommandProperties (line 1455) | function toCommandProperties(annotationProperties) {
function adopt (line 1511) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1513) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1514) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1515) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function exec (line 1534) | function exec(commandLine, args, options) {
function getExecOutput (line 1557) | function getExecOutput(commandLine, args, options) {
function adopt (line 1634) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1636) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1637) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1638) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class ToolRunner (line 1657) | class ToolRunner extends events.EventEmitter {
method constructor (line 1658) | constructor(toolPath, args, options) {
method _debug (line 1667) | _debug(message) {
method _getCommandString (line 1672) | _getCommandString(options, noPrefix) {
method _processLineBuffer (line 1710) | _processLineBuffer(data, strBuffer, onLine) {
method _getSpawnFileName (line 1729) | _getSpawnFileName() {
method _getSpawnArgs (line 1737) | _getSpawnArgs(options) {
method _endsWith (line 1753) | _endsWith(str, end) {
method _isCmdFile (line 1756) | _isCmdFile() {
method _windowsQuoteCmdArg (line 1761) | _windowsQuoteCmdArg(arg) {
method _uvQuoteCmdArg (line 1878) | _uvQuoteCmdArg(arg) {
method _cloneExecOptions (line 1954) | _cloneExecOptions(options) {
method _getSpawnOptions (line 1969) | _getSpawnOptions(options, toolPath) {
method exec (line 1990) | exec() {
function argStringToArray (line 2110) | function argStringToArray(argString) {
class ExecState (line 2156) | class ExecState extends events.EventEmitter {
method constructor (line 2157) | constructor(options, toolPath) {
method CheckComplete (line 2176) | CheckComplete() {
method _debug (line 2187) | _debug(message) {
method _setResult (line 2190) | _setResult() {
method HandleTimeout (line 2212) | static HandleTimeout(state) {
function adopt (line 2233) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 2235) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 2236) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 2237) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class BasicCredentialHandler (line 2243) | class BasicCredentialHandler {
method constructor (line 2244) | constructor(username, password) {
method prepareRequest (line 2248) | prepareRequest(options) {
method canHandleAuthentication (line 2255) | canHandleAuthentication() {
method handleAuthentication (line 2258) | handleAuthentication() {
class BearerCredentialHandler (line 2265) | class BearerCredentialHandler {
method constructor (line 2266) | constructor(token) {
method prepareRequest (line 2271) | prepareRequest(options) {
method canHandleAuthentication (line 2278) | canHandleAuthentication() {
method handleAuthentication (line 2281) | handleAuthentication() {
class PersonalAccessTokenCredentialHandler (line 2288) | class PersonalAccessTokenCredentialHandler {
method constructor (line 2289) | constructor(token) {
method prepareRequest (line 2294) | prepareRequest(options) {
method canHandleAuthentication (line 2301) | canHandleAuthentication() {
method handleAuthentication (line 2304) | handleAuthentication() {
function adopt (line 2355) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 2357) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 2358) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 2359) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function getProxyUrl (line 2415) | function getProxyUrl(serverUrl) {
class HttpClientError (line 2434) | class HttpClientError extends Error {
method constructor (line 2435) | constructor(message, statusCode) {
class HttpClientResponse (line 2443) | class HttpClientResponse {
method constructor (line 2444) | constructor(message) {
method readBody (line 2447) | readBody() {
method readBodyBuffer (line 2460) | readBodyBuffer() {
function isHttps (line 2475) | function isHttps(requestUrl) {
class HttpClient (line 2479) | class HttpClient {
method constructor (line 2480) | constructor(userAgent, handlers, requestOptions) {
method options (line 2517) | options(requestUrl, additionalHeaders) {
method get (line 2522) | get(requestUrl, additionalHeaders) {
method del (line 2527) | del(requestUrl, additionalHeaders) {
method post (line 2532) | post(requestUrl, data, additionalHeaders) {
method patch (line 2537) | patch(requestUrl, data, additionalHeaders) {
method put (line 2542) | put(requestUrl, data, additionalHeaders) {
method head (line 2547) | head(requestUrl, additionalHeaders) {
method sendStream (line 2552) | sendStream(verb, requestUrl, stream, additionalHeaders) {
method getJson (line 2561) | getJson(requestUrl_1) {
method postJson (line 2568) | postJson(requestUrl_1, obj_1) {
method putJson (line 2578) | putJson(requestUrl_1, obj_1) {
method patchJson (line 2588) | patchJson(requestUrl_1, obj_1) {
method request (line 2603) | request(verb, requestUrl, data, headers) {
method dispose (line 2688) | dispose() {
method requestRaw (line 2699) | requestRaw(info, data) {
method requestRawWithCallback (line 2724) | requestRawWithCallback(info, data, onResult) {
method getAgent (line 2776) | getAgent(serverUrl) {
method getAgentDispatcher (line 2780) | getAgentDispatcher(serverUrl) {
method _prepareRequest (line 2789) | _prepareRequest(method, requestUrl, headers) {
method _mergeHeaders (line 2816) | _mergeHeaders(headers) {
method _getExistingOrDefaultHeader (line 2829) | _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
method _getExistingOrDefaultContentTypeHeader (line 2856) | _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) {
method _getAgent (line 2890) | _getAgent(parsedUrl) {
method _getProxyAgentDispatcher (line 2945) | _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
method _getUserAgentWithOrchestrationId (line 2969) | _getUserAgentWithOrchestrationId(userAgent) {
method _performExponentialBackoff (line 2980) | _performExponentialBackoff(retryNumber) {
method _processResponse (line 2987) | _processResponse(res, options) {
function getProxyUrl (line 3067) | function getProxyUrl(reqUrl) {
function checkBypass (line 3093) | function checkBypass(reqUrl) {
function isLoopbackAddress (line 3136) | function isLoopbackAddress(host) {
class DecodedURL (line 3143) | class DecodedURL extends URL {
method constructor (line 3144) | constructor(url, base) {
method username (line 3149) | get username() {
method password (line 3152) | get password() {
function adopt (line 3199) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 3201) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 3202) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 3203) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function readlink (line 3234) | function readlink(fsPath) {
function exists (line 3248) | function exists(fsPath) {
function isDirectory (line 3262) | function isDirectory(fsPath_1) {
function isRooted (line 3272) | function isRooted(p) {
function tryGetExecutablePath (line 3289) | function tryGetExecutablePath(filePath, extensions) {
function normalizeSeparators (line 3359) | function normalizeSeparators(p) {
function isUnixExecutable (line 3373) | function isUnixExecutable(stats) {
function getCmdPath (line 3383) | function getCmdPath() {
function adopt (line 3430) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 3432) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 3433) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 3434) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function cp (line 3456) | function cp(source_1, dest_1) {
function mv (line 3496) | function mv(source_1, dest_1) {
function rmRF (line 3523) | function rmRF(inputPath) {
function mkdirP (line 3553) | function mkdirP(fsPath) {
function which (line 3567) | function which(tool, check) {
function findInPath (line 3597) | function findInPath(tool) {
function readCopyOptions (line 3648) | function readCopyOptions(options) {
function cpDirRecursive (line 3656) | function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
function copyFile (line 3681) | function copyFile(srcFile, destFile, force) {
function Reader (line 3784) | function Reader(data) {
function merge (line 4099) | function merge(from, to) {
function Writer (line 4121) | function Writer(options) {
function encodeOctet (line 4261) | function encodeOctet(bytes, octet) {
function F (line 4789) | function F(S, x8, i) {
function stream2word (line 4826) | function stream2word(data, databytes){
function bcrypt_hash (line 4901) | function bcrypt_hash(sha2pass, sha2salt, out) {
function bcrypt_pbkdf (line 4927) | function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) {
function tok (line 5326) | function tok (n) {
function parse (line 5545) | function parse (version, options) {
function valid (line 5578) | function valid (version, options) {
function clean (line 5584) | function clean (version, options) {
function SemVer (line 5591) | function SemVer (version, options) {
function inc (line 5861) | function inc (version, release, loose, identifier) {
function diff (line 5875) | function diff (version1, version2) {
function compareIdentifiers (line 5900) | function compareIdentifiers (a, b) {
function rcompareIdentifiers (line 5917) | function rcompareIdentifiers (a, b) {
function major (line 5922) | function major (a, loose) {
function minor (line 5927) | function minor (a, loose) {
function patch (line 5932) | function patch (a, loose) {
function compare (line 5937) | function compare (a, b, loose) {
function compareLoose (line 5942) | function compareLoose (a, b) {
function compareBuild (line 5947) | function compareBuild (a, b, loose) {
function rcompare (line 5954) | function rcompare (a, b, loose) {
function sort (line 5959) | function sort (list, loose) {
function rsort (line 5966) | function rsort (list, loose) {
function gt (line 5973) | function gt (a, b, loose) {
function lt (line 5978) | function lt (a, b, loose) {
function eq (line 5983) | function eq (a, b, loose) {
function neq (line 5988) | function neq (a, b, loose) {
function gte (line 5993) | function gte (a, b, loose) {
function lte (line 5998) | function lte (a, b, loose) {
function cmp (line 6003) | function cmp (a, op, b, loose) {
function Comparator (line 6045) | function Comparator (comp, options) {
function Range (line 6176) | function Range (range, options) {
function isSatisfiable (line 6296) | function isSatisfiable (comparators, options) {
function toComparators (line 6314) | function toComparators (range, options) {
function parseComparator (line 6325) | function parseComparator (comp, options) {
function isX (line 6338) | function isX (id) {
function replaceTildes (line 6348) | function replaceTildes (comp, options) {
function replaceTilde (line 6354) | function replaceTilde (comp, options) {
function replaceCarets (line 6388) | function replaceCarets (comp, options) {
function replaceCaret (line 6394) | function replaceCaret (comp, options) {
function replaceXRanges (line 6446) | function replaceXRanges (comp, options) {
function replaceXRange (line 6453) | function replaceXRange (comp, options) {
function replaceStars (line 6527) | function replaceStars (comp, options) {
function hyphenReplace (line 6538) | function hyphenReplace ($0,
function testSet (line 6588) | function testSet (set, version, options) {
function satisfies (line 6625) | function satisfies (version, range, options) {
function maxSatisfying (line 6635) | function maxSatisfying (versions, range, options) {
function minSatisfying (line 6657) | function minSatisfying (versions, range, options) {
function minVersion (line 6679) | function minVersion (range, loose) {
function validRange (line 6733) | function validRange (range, options) {
function ltr (line 6745) | function ltr (version, range, options) {
function gtr (line 6751) | function gtr (version, range, options) {
function outside (line 6756) | function outside (version, range, hilo, options) {
function prerelease (line 6826) | function prerelease (version, options) {
function intersects (line 6832) | function intersects (r1, r2, options) {
function coerce (line 6839) | function coerce (version, options) {
function shellescape (line 6898) | function shellescape(a) {
function makeCipherInfo (line 7274) | function makeCipherInfo(blockLen, keyLen, ivLen, authLen, discardLen, st...
function makeHMACInfo (line 7331) | function makeHMACInfo(len, actualLen) {
function BigInteger (line 7454) | function BigInteger(a,b,c) {
function nbi (line 7462) | function nbi() { return new BigInteger(null); }
function am3 (line 7471) | function am3(i,x,w,j,c,n) {
function int2char (line 7506) | function int2char(n) { return BI_RM.charAt(n); }
function intAt (line 7507) | function intAt(s,i) {
function bnpCopyTo (line 7513) | function bnpCopyTo(r) {
function bnpFromInt (line 7520) | function bnpFromInt(x) {
function nbv (line 7529) | function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
function bnpFromString (line 7532) | function bnpFromString(s,b) {
function bnpClamp (line 7571) | function bnpClamp() {
function bnToString (line 7577) | function bnToString(b) {
function bnNegate (line 7607) | function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); retu...
function bnAbs (line 7610) | function bnAbs() { return (this.s<0)?this.negate():this; }
function bnCompareTo (line 7613) | function bnCompareTo(a) {
function nbits (line 7624) | function nbits(x) {
function bnBitLength (line 7635) | function bnBitLength() {
function bnpDLShiftTo (line 7641) | function bnpDLShiftTo(n,r) {
function bnpDRShiftTo (line 7650) | function bnpDRShiftTo(n,r) {
function bnpLShiftTo (line 7657) | function bnpLShiftTo(n,r) {
function bnpRShiftTo (line 7674) | function bnpRShiftTo(n,r) {
function bnpSubTo (line 7692) | function bnpSubTo(a,r) {
function bnpMultiplyTo (line 7726) | function bnpMultiplyTo(a,r) {
function bnpSquareTo (line 7738) | function bnpSquareTo(r) {
function bnpDivRemTo (line 7756) | function bnpDivRemTo(m,q,r) {
function bnMod (line 7804) | function bnMod(a) {
function Classic (line 7812) | function Classic(m) { this.m = m; }
function cConvert (line 7813) | function cConvert(x) {
function cRevert (line 7817) | function cRevert(x) { return x; }
function cReduce (line 7818) | function cReduce(x) { x.divRemTo(this.m,null,x); }
function cMulTo (line 7819) | function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
function cSqrTo (line 7820) | function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
function bnpInvDigit (line 7838) | function bnpInvDigit() {
function Montgomery (line 7854) | function Montgomery(m) {
function montConvert (line 7864) | function montConvert(x) {
function montRevert (line 7873) | function montRevert(x) {
function montReduce (line 7881) | function montReduce(x) {
function montSqrTo (line 7900) | function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
function montMulTo (line 7903) | function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
function bnpIsEven (line 7912) | function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
function bnpExp (line 7915) | function bnpExp(e,z) {
function bnModPowInt (line 7928) | function bnModPowInt(e,m) {
function bnClone (line 7974) | function bnClone() { var r = nbi(); this.copyTo(r); return r; }
function bnIntValue (line 7977) | function bnIntValue() {
function bnByteValue (line 7989) | function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; }
function bnShortValue (line 7992) | function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }
function bnpChunkSize (line 7995) | function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r...
function bnSigNum (line 7998) | function bnSigNum() {
function bnpToRadix (line 8005) | function bnpToRadix(b) {
function bnpFromRadix (line 8020) | function bnpFromRadix(s,b) {
function bnpFromNumber (line 8047) | function bnpFromNumber(a,b,c) {
function bnToByteArray (line 8073) | function bnToByteArray() {
function bnEquals (line 8097) | function bnEquals(a) { return(this.compareTo(a)==0); }
function bnMin (line 8098) | function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
function bnMax (line 8099) | function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
function bnpBitwiseTo (line 8102) | function bnpBitwiseTo(a,op,r) {
function op_and (line 8120) | function op_and(x,y) { return x&y; }
function bnAnd (line 8121) | function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
function op_or (line 8124) | function op_or(x,y) { return x|y; }
function bnOr (line 8125) | function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
function op_xor (line 8128) | function op_xor(x,y) { return x^y; }
function bnXor (line 8129) | function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
function op_andnot (line 8132) | function op_andnot(x,y) { return x&~y; }
function bnAndNot (line 8133) | function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); ret...
function bnNot (line 8136) | function bnNot() {
function bnShiftLeft (line 8145) | function bnShiftLeft(n) {
function bnShiftRight (line 8152) | function bnShiftRight(n) {
function lbit (line 8159) | function lbit(x) {
function bnGetLowestSetBit (line 8171) | function bnGetLowestSetBit() {
function cbit (line 8179) | function cbit(x) {
function bnBitCount (line 8186) | function bnBitCount() {
function bnTestBit (line 8193) | function bnTestBit(n) {
function bnpChangeBit (line 8200) | function bnpChangeBit(n,op) {
function bnSetBit (line 8207) | function bnSetBit(n) { return this.changeBit(n,op_or); }
function bnClearBit (line 8210) | function bnClearBit(n) { return this.changeBit(n,op_andnot); }
function bnFlipBit (line 8213) | function bnFlipBit(n) { return this.changeBit(n,op_xor); }
function bnpAddTo (line 8216) | function bnpAddTo(a,r) {
function bnAdd (line 8249) | function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
function bnSubtract (line 8252) | function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
function bnMultiply (line 8255) | function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
function bnSquare (line 8258) | function bnSquare() { var r = nbi(); this.squareTo(r); return r; }
function bnDivide (line 8261) | function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
function bnRemainder (line 8264) | function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return...
function bnDivideAndRemainder (line 8267) | function bnDivideAndRemainder(a) {
function bnpDMultiply (line 8274) | function bnpDMultiply(n) {
function bnpDAddOffset (line 8281) | function bnpDAddOffset(n,w) {
function NullExp (line 8293) | function NullExp() {}
function nNop (line 8294) | function nNop(x) { return x; }
function nMulTo (line 8295) | function nMulTo(x,y,r) { x.multiplyTo(y,r); }
function nSqrTo (line 8296) | function nSqrTo(x,r) { x.squareTo(r); }
function bnPow (line 8304) | function bnPow(e) { return this.exp(e,new NullExp()); }
function bnpMultiplyLowerTo (line 8308) | function bnpMultiplyLowerTo(a,n,r) {
function bnpMultiplyUpperTo (line 8321) | function bnpMultiplyUpperTo(a,n,r) {
function Barrett (line 8333) | function Barrett(m) {
function barrettConvert (line 8342) | function barrettConvert(x) {
function barrettRevert (line 8348) | function barrettRevert(x) { return x; }
function barrettReduce (line 8351) | function barrettReduce(x) {
function barrettSqrTo (line 8362) | function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
function barrettMulTo (line 8365) | function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
function bnModPow (line 8374) | function bnModPow(e,m) {
function bnGCD (line 8433) | function bnGCD(a) {
function bnpModInt (line 8461) | function bnpModInt(n) {
function bnModInverse (line 8471) | function bnModInverse(m) {
function bnIsProbablePrime (line 8516) | function bnIsProbablePrime(t) {
function bnpMillerRabin (line 8535) | function bnpMillerRabin(t) {
function makePEM (line 8706) | function makePEM(type, data) {
function combineBuffers (line 8714) | function combineBuffers(buf1, buf2) {
function skipFields (line 8721) | function skipFields(buf, nfields) {
function genOpenSSLRSAPub (line 8737) | function genOpenSSLRSAPub(n, e) {
function genOpenSSHRSAPub (line 8759) | function genOpenSSHRSAPub(n, e) {
function genRSAASN1Buf (line 8778) | function genRSAASN1Buf(n, e, d, p, q, dmp1, dmq1, iqmp) {
function bigIntFromBuffer (line 8794) | function bigIntFromBuffer(buf) {
function bigIntToBuffer (line 8798) | function bigIntToBuffer(bn) {
function genOpenSSLDSAPub (line 8845) | function genOpenSSLDSAPub(p, q, g, y) {
function genOpenSSHDSAPub (line 8868) | function genOpenSSHDSAPub(p, q, g, y) {
function genOpenSSLDSAPriv (line 8894) | function genOpenSSLDSAPriv(p, q, g, y, x) {
function genOpenSSLEdPub (line 8907) | function genOpenSSLEdPub(pub) {
function genOpenSSHEdPub (line 8927) | function genOpenSSHEdPub(pub) {
function genOpenSSLEdPriv (line 8940) | function genOpenSSLEdPriv(priv) {
function genOpenSSLECDSAPub (line 8959) | function genOpenSSLECDSAPub(oid, Q) {
function genOpenSSHECDSAPub (line 8982) | function genOpenSSHECDSAPub(oid, Q) {
function genOpenSSLECDSAPriv (line 9017) | function genOpenSSLECDSAPriv(oid, pub, priv) {
function genOpenSSLECDSAPubFromPriv (line 9043) | function genOpenSSLECDSAPubFromPriv(curveName, priv) {
function trySign (line 9062) | function trySign(signature, privKey) {
function tryVerify (line 9094) | function tryVerify(verifier, pubKey, signature) {
function OpenSSH_Private (line 9129) | function OpenSSH_Private(type, comment, privPEM, pubPEM, pubSSH, algo, d...
function parseOpenSSHPrivKeys (line 9278) | function parseOpenSSHPrivKeys(data, nkeys, decrypted) {
function OpenSSH_Old_Private (line 9461) | function OpenSSH_Old_Private(type, comment, privPEM, pubPEM, pubSSH, alg...
function PPK_Private (line 9657) | function PPK_Private(type, comment, privPEM, pubPEM, pubSSH, algo, decry...
function parseDER (line 9847) | function parseDER(data, baseType, comment, fullType) {
function OpenSSH_Public (line 9920) | function OpenSSH_Public(type, comment, pubPEM, pubSSH, algo) {
function RFC4716_Public (line 9964) | function RFC4716_Public(type, comment, pubPEM, pubSSH, algo) {
function assert (line 10100) | function assert(value, message) {
function addNumericalSeparator (line 10109) | function addNumericalSeparator(val) {
function oneOf (line 10118) | function oneOf(expected, thing) {
method constructor (line 10140) | constructor(message) {
method constructor (line 10160) | constructor(str, range, input, replaceDefaultBoolean) {
method constructor (line 10186) | constructor(name, expected, actual) {
function emitErrorAndCloseNT (line 10280) | function emitErrorAndCloseNT(self, err) {
function emitCloseNT (line 10285) | function emitCloseNT(self) {
function DEBUG_NOOP (line 10425) | function DEBUG_NOOP(msg) {}
function SFTPStream (line 10427) | function SFTPStream(cfg, remoteIdentRaw) {
function tryCreateBuffer (line 11284) | function tryCreateBuffer(size) {
function fastXfer (line 11291) | function fastXfer(src, dst, srcPath, dstPath, opts, cb) {
function read (line 11589) | function read() {
function afterRead (line 11598) | function afterRead(er, nbytes) {
function close (line 11629) | function close() {
function writeAll (line 11644) | function writeAll(self, handle, buffer, offset, length, position, callba...
function readAttrs (line 12723) | function readAttrs(buf, p, stream, callback) {
function readUInt64BE (line 12806) | function readUInt64BE(buffer, p, stream, callback) {
function attrsToBytes (line 12824) | function attrsToBytes(attrs) {
function toUnixTimestamp (line 12881) | function toUnixTimestamp(time) {
function modeNum (line 12889) | function modeNum(mode) {
function stringToFlags (line 12919) | function stringToFlags(str) {
function flagsToString (line 12927) | function flagsToString(flags) {
function Stats (line 12937) | function Stats(initial) {
method constructor (line 27926) | constructor(initial) {
method isDirectory (line 27935) | isDirectory() {
method isFile (line 27938) | isFile() {
method isBlockDevice (line 27941) | isBlockDevice() {
method isCharacterDevice (line 27944) | isCharacterDevice() {
method isSymbolicLink (line 27947) | isSymbolicLink() {
method isFIFO (line 27950) | isFIFO() {
method isSocket (line 27953) | isSocket() {
function allocNewPool (line 12990) | function allocNewPool(poolSize) {
function checkPosition (line 12999) | function checkPosition(pos, name) {
function roundUpToMultipleOf8 (line 13010) | function roundUpToMultipleOf8(n) {
function ReadStream (line 13014) | function ReadStream(sftp, path, options) {
function closeStream (line 13192) | function closeStream(stream, cb, err) {
method get (line 13212) | get() { return this.handle === null; }
function WriteStream (line 13216) | function WriteStream(sftp, path, options) {
method get (line 13421) | get() { return this.handle === null; }
function DEBUG_NOOP (line 13528) | function DEBUG_NOOP(msg) {}
function SSH2Stream (line 13530) | function SSH2Stream(cfg) {
function onDISCONNECT (line 15691) | function onDISCONNECT(self, reason, code, desc, lang) { // Client/Server
function onKEXINIT (line 15700) | function onKEXINIT(self, init, firstFollows) { // Client/Server
function check_KEXINIT (line 15727) | function check_KEXINIT(self, init, firstFollows) {
function onKEXDH_GEX_GROUP (line 16005) | function onKEXDH_GEX_GROUP(self, prime, gen) {
function onKEXDH_INIT (line 16016) | function onKEXDH_INIT(self, e) { // Server
function onKEXDH_REPLY (line 16020) | function onKEXDH_REPLY(self, info, verifiedHost) { // Client
function onNEWKEYS (line 16255) | function onNEWKEYS(self) { // Client/Server
function getPacketType (line 16526) | function getPacketType(self, pktType) {
function parsePacket (line 16551) | function parsePacket(self, callback) {
function parse_KEXINIT (line 17215) | function parse_KEXINIT(self, callback) {
function parse_KEX (line 17306) | function parse_KEX(self, type, callback) {
function parse_KEXDH_REPLY (line 17369) | function parse_KEXDH_REPLY(self, callback) {
function parse_USERAUTH (line 17406) | function parse_USERAUTH(self, type, callback) {
function parse_CHANNEL_REQUEST (line 17525) | function parse_CHANNEL_REQUEST(self, callback) {
function hmacVerify (line 17903) | function hmacVerify(self, data) {
function decryptData (line 17943) | function decryptData(self, data) {
function expectData (line 17949) | function expectData(self, type, amount, buffer) {
function readList (line 17960) | function readList(buffer, start, stream, callback) {
function bytesToModes (line 17965) | function bytesToModes(buffer) {
function modesToBytes (line 17980) | function modesToBytes(modes) {
function KEXINIT (line 18008) | function KEXINIT(self, cb) { // Client/Server
function KEXDH_INIT (line 18124) | function KEXDH_INIT(self) { // Client
function KEXDH_REPLY (line 18147) | function KEXDH_REPLY(self, e) { // Server
function KEXDH_GEX_REQ (line 18343) | function KEXDH_GEX_REQ(self) { // Client
function compressPayload (line 18350) | function compressPayload(self, payload, cb) {
function compressFlushCb (line 18356) | function compressFlushCb(cb) {
function send (line 18367) | function send(self, payload, cb, bypass) {
function send_ (line 18398) | function send_(self, payload, cb) {
function randBytes (line 18513) | function randBytes(n, cb) {
function convertSignature (line 18521) | function convertSignature(signature, keyType) {
function KeyExchange (line 18562) | function KeyExchange(algo, options) {
method constructor (line 33441) | constructor(negotiated, protocol, remoteKexinit) {
method finish (line 33464) | finish(scOnly) {
method start (line 33911) | start() {
method getPublicKey (line 33940) | getPublicKey() {
method convertPublicKey (line 33948) | convertPublicKey(key) {
method computeSecret (line 33971) | computeSecret(otherPublicKey) {
method parse (line 33980) | parse(payload) {
function convertToMpint (line 18785) | function convertToMpint(buf) {
function iv_inc (line 18834) | function iv_inc(iv) {
function readInt (line 18849) | function readInt(buffer, start, stream, cb) {
function DSASigBERToBare (line 18859) | function DSASigBERToBare(signature) {
function ECDSASigASN1ToSSH (line 18893) | function ECDSASigASN1ToSSH(signature) {
function sigSSHToASN1 (line 18911) | function sigSSHToASN1(sig, type, self, callback) {
function readString (line 18963) | function readString(buffer, start, encoding, stream, cb, maxLen) {
class ClientStderr (line 19029) | class ClientStderr extends ReadableStream {
method constructor (line 19030) | constructor(channel, streamOpts) {
method _read (line 19035) | _read(n) {
class ServerStderr (line 19044) | class ServerStderr extends WritableStream {
method constructor (line 19045) | constructor(channel) {
method _write (line 19051) | _write(data, encoding, cb) {
class Channel (line 19097) | class Channel extends DuplexStream {
method constructor (line 19098) | constructor(client, info, opts) {
method _read (line 19159) | _read(n) {
method _write (line 19167) | _write(data, encoding, cb) {
method eof (line 19211) | eof() {
method close (line 19218) | close() {
method destroy (line 19225) | destroy() {
method setWindow (line 19232) | setWindow(rows, cols, height, width) {
method signal (line 19248) | signal(signalName) {
method exit (line 19259) | exit(statusOrSignal, coreDumped, msg) {
function onFinish (line 19279) | function onFinish() {
function onEnd (line 19286) | function onEnd() {
function windowAdjust (line 19290) | function windowAdjust(self) {
function once (line 19332) | function once(cb) {
function concat (line 19342) | function concat(buf1, buf2) {
function noop (line 19349) | function noop() {}
class BaseAgent (line 19355) | class BaseAgent {
method getIdentities (line 19356) | getIdentities(cb) {
method sign (line 19359) | sign(pubKey, data, options, cb) {
class OpenSSHAgent (line 19366) | class OpenSSHAgent extends BaseAgent {
method constructor (line 19367) | constructor(socketPath) {
method getStream (line 19372) | getStream(cb) {
method getIdentities (line 19392) | getIdentities(cb) {
method sign (line 19428) | sign(pubKey, data, options, cb) {
function destroy (line 19493) | function destroy(stream) {
class PageantSocket (line 19501) | class PageantSocket extends Duplex {
method constructor (line 19502) | constructor() {
method _read (line 19507) | _read(n) {}
method _write (line 19508) | _write(data, encoding, cb) {
method _final (line 19550) | _final(cb) {
method _destroy (line 19554) | _destroy(err, cb) {
method getStream (line 19561) | getStream(cb) {
method getStream (line 19571) | getStream(cb) {
function createAgent (line 19705) | function createAgent(path) {
function processResponses (line 19747) | function processResponses(protocol) {
class AgentInboundRequest (line 19763) | class AgentInboundRequest {
method constructor (line 19764) | constructor(type, ctx) {
method hasResponded (line 19769) | hasResponded() {
method getType (line 19772) | getType() {
method getContext (line 19775) | getContext() {
function respond (line 19779) | function respond(protocol, req, data) {
function cleanup (line 19784) | function cleanup(protocol) {
function onClose (line 19807) | function onClose() {
function onEnd (line 19811) | function onEnd() {
method constructor (line 19841) | constructor(isClient) {
method _read (line 19851) | _read(n) {}
method _write (line 19853) | _write(data, encoding, cb) {
method _destroy (line 20070) | _destroy(err, cb) {
method _final (line 20075) | _final(cb) {
method sign (line 20081) | sign(pubKey, data, options, cb) {
method getIdentities (line 20141) | getIdentities(cb) {
method failureReply (line 20166) | failureReply(req) {
method getIdentitiesReply (line 20185) | getIdentitiesReply(req, keys) {
method signReply (line 20272) | signReply(req, signature) {
class AgentContext (line 20332) | class AgentContext {
method constructor (line 20333) | constructor(agent) {
method init (line 20343) | init(cb) {
method nextKey (line 20391) | nextKey() {
method currentKey (line 20399) | currentKey() {
method pos (line 20407) | pos() {
method reset (line 20415) | reset() {
method sign (line 20419) | sign(...args) {
function isAgent (line 20424) | function isAgent(val) {
class Client (line 20513) | class Client extends EventEmitter {
method constructor (line 20514) | constructor() {
method connect (line 20558) | connect(cfg) {
method end (line 21624) | end() {
method destroy (line 21632) | destroy() {
method exec (line 21637) | exec(cmd, opts, cb) {
method shell (line 21694) | shell(wndopts, opts, cb) {
method subsys (line 21755) | subsys(name, cb) {
method forwardIn (line 21778) | forwardIn(bindAddr, bindPort, cb) {
method unforwardIn (line 21814) | unforwardIn(bindAddr, bindPort, cb) {
method forwardOut (line 21843) | forwardOut(srcIP, srcPort, dstIP, dstPort, cb) {
method openssh_noMoreSessions (line 21864) | openssh_noMoreSessions(cb) {
method openssh_forwardInStreamLocal (line 21902) | openssh_forwardInStreamLocal(socketPath, cb) {
method openssh_unforwardInStreamLocal (line 21940) | openssh_unforwardInStreamLocal(socketPath, cb) {
method openssh_forwardOutStreamLocal (line 21978) | openssh_forwardOutStreamLocal(socketPath, cb) {
method sftp (line 22000) | sftp(env, cb) {
method setNoDelay (line 22080) | setNoDelay(noDelay) {
method constructor (line 37462) | constructor(socket, hostKeys, ident, offer, debug, server, srvCfg) {
method end (line 38344) | end() {
method x11 (line 38352) | x11(originAddr, originPort, cb) {
method forwardOut (line 38358) | forwardOut(boundAddr, boundPort, remoteAddr, remotePort, cb) {
method openssh_forwardOutStreamLocal (line 38364) | openssh_forwardOutStreamLocal(socketPath, cb) {
method rekey (line 38370) | rekey(cb) {
method setNoDelay (line 38389) | setNoDelay(noDelay) {
method constructor (line 48336) | constructor (url, {
method pipelining (line 48520) | get pipelining () {
method pipelining (line 48524) | set pipelining (value) {
method [kPending] (line 48529) | get [kPending] () {
method [kRunning] (line 48533) | get [kRunning] () {
method [kSize] (line 48537) | get [kSize] () {
method [kConnected] (line 48541) | get [kConnected] () {
method [kBusy] (line 48545) | get [kBusy] () {
method [kConnect] (line 48554) | [kConnect] (cb) {
method [kDispatch] (line 48559) | [kDispatch] (opts, handler) {
method [kClose] (line 48581) | async [kClose] () {
method [kDestroy] (line 48593) | async [kDestroy] (err) {
function openChannel (line 22088) | function openChannel(self, type, opts, cb) {
function reqX11 (line 22129) | function reqX11(chan, screen, cb) {
function reqPty (line 22184) | function reqPty(chan, opts, cb) {
function reqAgentFwd (line 22239) | function reqAgentFwd(chan, cb) {
function reqShell (line 22271) | function reqShell(chan, cb) {
function reqExec (line 22289) | function reqExec(chan, cmd, opts, cb) {
function reqEnv (line 22308) | function reqEnv(chan, env, cb) {
function reqSubsystem (line 22338) | function reqSubsystem(chan, name, cb) {
function onCHANNEL_OPEN (line 22359) | function onCHANNEL_OPEN(self, info) {
function makeSimpleAuthHandler (line 22492) | function makeSimpleAuthHandler(authList) {
function hostKeysProve (line 22504) | function hostKeysProve(client, keys_, cb) {
function getKeyAlgos (line 22600) | function getKeyAlgos(client, key, serverSigAlgs) {
class SSHAgent (line 22639) | class SSHAgent extends ctor {
method constructor (line 22640) | constructor(connectCfg, agentOptions) {
method createConnection (line 22647) | createConnection(options, cb) {
function noop (line 22678) | function noop() {}
function decorateStream (line 22680) | function decorateStream(stream, ctor, options) {
function makeArgs (line 22795) | function makeArgs(type, opts) {
function parseDERs (line 22843) | function parseDERs(keyType, pub, priv) {
function convertKeys (line 23135) | function convertKeys(keyType, pub, priv, opts) {
function noop (line 23327) | function noop() {}
function noop (line 23461) | function noop() {}
class Protocol (line 23476) | class Protocol {
method constructor (line 23477) | constructor(config) {
method _destruct (line 23656) | _destruct(reason) {
method cleanup (line 23671) | cleanup() {
method parse (line 23674) | parse(chunk, i, len) {
method disconnect (line 23687) | disconnect(reason) {
method ping (line 23706) | ping() {
method rekey (line 23717) | rekey() {
method requestSuccess (line 23729) | requestSuccess(data) {
method requestFailure (line 23747) | requestFailure() {
method channelSuccess (line 23756) | channelSuccess(chan) {
method channelFailure (line 23769) | channelFailure(chan) {
method channelEOF (line 23782) | channelEOF(chan) {
method channelClose (line 23795) | channelClose(chan) {
method channelWindowAdjust (line 23808) | channelWindowAdjust(chan, amount) {
method channelData (line 23825) | channelData(chan, data) {
method channelExtData (line 23847) | channelExtData(chan, data, type) {
method channelOpenConfirm (line 23870) | channelOpenConfirm(remote, local, initWindow, maxPacket) {
method channelOpenFail (line 23889) | channelOpenFail(remote, reason, desc) {
method service (line 23924) | service(name) {
method authPassword (line 23943) | authPassword(username, password, newPassword) {
method authPK (line 23994) | authPK(username, pubKey, keyAlgo, cbSign) {
method authHostbased (line 24113) | authHostbased(username, pubKey, hostname, userlocal, keyAlgo, cbSign) {
method authKeyboard (line 24199) | authKeyboard(username) {
method authNone (line 24231) | authNone(username) {
method authInfoRes (line 24255) | authInfoRes(responses) {
method tcpipForward (line 24298) | tcpipForward(bindAddr, bindPort, wantReply) {
method cancelTcpipForward (line 24322) | cancelTcpipForward(bindAddr, bindPort, wantReply) {
method openssh_streamLocalForward (line 24346) | openssh_streamLocalForward(socketPath, wantReply) {
method openssh_cancelStreamLocalForward (line 24371) | openssh_cancelStreamLocalForward(socketPath, wantReply) {
method directTcpip (line 24399) | directTcpip(chan, initWindow, maxPacket, cfg) {
method openssh_directStreamLocal (line 24436) | openssh_directStreamLocal(chan, initWindow, maxPacket, cfg) {
method openssh_noMoreSessions (line 24471) | openssh_noMoreSessions(wantReply) {
method session (line 24490) | session(chan, initWindow, maxPacket) {
method windowChange (line 24514) | windowChange(chan, rows, cols, height, width) {
method pty (line 24547) | pty(chan, rows, cols, height, width, term, modes, wantReply) {
method shell (line 24605) | shell(chan, wantReply) {
method exec (line 24627) | exec(chan, cmd, wantReply) {
method signal (line 24658) | signal(chan, signal) {
method env (line 24696) | env(chan, key, val, wantReply) {
method x11Forward (line 24733) | x11Forward(chan, cfg, wantReply) {
method subsystem (line 24783) | subsystem(chan, name, wantReply) {
method openssh_agentForward (line 24809) | openssh_agentForward(chan, wantReply) {
method openssh_hostKeysProve (line 24835) | openssh_hostKeysProve(keys) {
method serviceAccept (line 24878) | serviceAccept(svcName) {
method forwardedTcpip (line 24913) | forwardedTcpip(chan, initWindow, maxPacket, cfg) {
method x11 (line 24950) | x11(chan, initWindow, maxPacket, cfg) {
method openssh_authAgent (line 24981) | openssh_authAgent(chan, initWindow, maxPacket) {
method openssh_forwardedStreamLocal (line 25004) | openssh_forwardedStreamLocal(chan, initWindow, maxPacket, cfg) {
method exitStatus (line 25038) | exitStatus(chan, status) {
method exitSignal (line 25062) | exitSignal(chan, name, coreDumped, msg) {
method authFailure (line 25117) | authFailure(authMethods, isPartial) {
method authSuccess (line 25159) | authSuccess() {
method authPKOK (line 25182) | authPKOK(keyAlgo, key) {
method authPasswdChg (line 25209) | authPasswdChg(prompt) {
method authInfoReq (line 25227) | authInfoReq(name, instructions, prompts) {
function parseHeader (line 25286) | function parseHeader(chunk, p, len) {
function parsePacket (line 25390) | function parsePacket(chunk, p, len) {
function onPayload (line 25394) | function onPayload(payload) {
function getCompatFlags (line 25425) | function getCompatFlags(header) {
function modesToBytes (line 25442) | function modesToBytes(modes) {
function sendExtInfo (line 25474) | function sendExtInfo(proto) {
function noop (line 25637) | function noop() {}
class SFTP (line 25641) | class SFTP extends EventEmitter {
method constructor (line 25642) | constructor(client, chanInfo, cfg) {
method push (line 25696) | push(data) {
method end (line 25790) | end() {
method destroy (line 25793) | destroy() {
method _init (line 25799) | _init() {
method createReadStream (line 25808) | createReadStream(path, options) {
method createWriteStream (line 25814) | createWriteStream(path, options) {
method open (line 25820) | open(path, flags_, attrs, cb) {
method close (line 25879) | close(handle, cb) {
method read (line 25909) | read(handle, buf, off, len, position, cb) {
method readData (line 25925) | readData(handle, buf, off, len, position, cb) {
method write (line 25929) | write(handle, buf, off, len, position, cb) {
method writeData (line 26005) | writeData(handle, buf, off, len, position, cb) {
method fastGet (line 26009) | fastGet(remotePath, localPath, opts, cb) {
method fastPut (line 26015) | fastPut(localPath, remotePath, opts, cb) {
method readFile (line 26021) | readFile(path, options, callback_) {
method writeFile (line 26146) | writeFile(path, data, options, callback_) {
method appendFile (line 26205) | appendFile(path, data, options, callback_) {
method exists (line 26228) | exists(path, cb) {
method unlink (line 26236) | unlink(filename, cb) {
method rename (line 26263) | rename(oldPath, newPath, cb) {
method mkdir (line 26294) | mkdir(path, attrs, cb) {
method rmdir (line 26346) | rmdir(path, cb) {
method readdir (line 26373) | readdir(where, opts, cb) {
method fstat (line 26459) | fstat(handle, cb) {
method stat (line 26489) | stat(path, cb) {
method lstat (line 26516) | lstat(path, cb) {
method opendir (line 26543) | opendir(path, cb) {
method setstat (line 26570) | setstat(path, attrs, cb) {
method fsetstat (line 26620) | fsetstat(handle, attrs, cb) {
method futimes (line 26673) | futimes(handle, atime, mtime, cb) {
method utimes (line 26679) | utimes(path, atime, mtime, cb) {
method fchown (line 26685) | fchown(handle, uid, gid, cb) {
method chown (line 26691) | chown(path, uid, gid, cb) {
method fchmod (line 26697) | fchmod(handle, mode, cb) {
method chmod (line 26702) | chmod(path, mode, cb) {
method readlink (line 26707) | readlink(path, cb) {
method symlink (line 26744) | symlink(targetPath, linkPath, cb) {
method realpath (line 26783) | realpath(path, cb) {
method ext_openssh_rename (line 26821) | ext_openssh_rename(oldPath, newPath, cb) {
method ext_openssh_statvfs (line 26861) | ext_openssh_statvfs(path, cb) {
method ext_openssh_fstatvfs (line 26896) | ext_openssh_fstatvfs(handle, cb) {
method ext_openssh_hardlink (line 26933) | ext_openssh_hardlink(oldPath, newPath, cb) {
method ext_openssh_fsync (line 26973) | ext_openssh_fsync(handle, cb) {
method ext_openssh_lsetstat (line 27009) | ext_openssh_lsetstat(path, attrs, cb) {
method ext_openssh_expandPath (line 27070) | ext_openssh_expandPath(path, cb) {
method ext_copy_data (line 27116) | ext_copy_data(srcHandle, srcOffset, len, dstHandle, dstOffset, cb) {
method ext_home_dir (line 27201) | ext_home_dir(username, cb) {
method ext_users_groups (line 27264) | ext_users_groups(uids, gids, cb) {
method handle (line 27344) | handle(reqid, handle) {
method status (line 27372) | status(reqid, code, message) {
method data (line 27405) | data(reqid, data, encoding) {
method name (line 27447) | name(reqid, names) {
method attrs (line 27564) | attrs(reqid, attrs) {
function tryCreateBuffer (line 27600) | function tryCreateBuffer(size) {
function read_ (line 27608) | function read_(self, handle, buf, off, len, position, cb, req_) {
function fastXfer (line 27692) | function fastXfer(src, dst, srcPath, dstPath, opts, cb) {
function writeAll (line 27900) | function writeAll(sftp, handle, buffer, offset, length, position, callba...
class Stats (line 27925) | class Stats {
method constructor (line 27926) | constructor(initial) {
method isDirectory (line 27935) | isDirectory() {
method isFile (line 27938) | isFile() {
method isBlockDevice (line 27941) | isBlockDevice() {
method isCharacterDevice (line 27944) | isCharacterDevice() {
method isSymbolicLink (line 27947) | isSymbolicLink() {
method isFIFO (line 27950) | isFIFO() {
method isSocket (line 27953) | isSocket() {
function attrsToBytes (line 27958) | function attrsToBytes(attrs) {
function toUnixTimestamp (line 28021) | function toUnixTimestamp(time) {
function modeNum (line 28030) | function modeNum(mode) {
function stringToFlags (line 28060) | function stringToFlags(str) {
function readAttrs (line 28077) | function readAttrs(biOpt) {
function sendOrBuffer (line 28147) | function sendOrBuffer(sftp, payload) {
function tryWritePayload (line 28156) | function tryWritePayload(sftp, payload) {
function drainBuffer (line 28199) | function drainBuffer() {
function doFatalSFTPError (line 28219) | function doFatalSFTPError(sftp, msg, noDebug) {
function cleanupRequests (line 28230) | function cleanupRequests(sftp) {
function requestLimits (line 28245) | function requestLimits(sftp, cb) {
function allocNewPool (line 29118) | function allocNewPool(poolSize) {
function checkPosition (line 29127) | function checkPosition(pos, name) {
function roundUpToMultipleOf8 (line 29138) | function roundUpToMultipleOf8(n) {
function ReadStream (line 29142) | function ReadStream(sftp, path, options) {
function closeStream (line 29314) | function closeStream(stream, cb, err) {
method get (line 29334) | get() {
function WriteStream (line 29342) | function WriteStream(sftp, path, options) {
method get (line 29545) | get() {
function info (line 29968) | function info(sslName, blockLen, keyLen, ivLen, authLen, discardLen, fla...
function info (line 30024) | function info(sslName, len, actualLen, isETM) {
class NullCipher (line 30051) | class NullCipher {
method constructor (line 30052) | constructor(seqno, onWrite) {
method free (line 30057) | free() {
method allocPacket (line 30060) | allocPacket(payloadLen) {
method encrypt (line 30076) | encrypt(packet) {
class ChaChaPolyCipherNative (line 30094) | class ChaChaPolyCipherNative {
method constructor (line 30095) | constructor(config) {
method free (line 30103) | free() {
method allocPacket (line 30106) | allocPacket(payloadLen) {
method encrypt (line 30122) | encrypt(packet) {
class ChaChaPolyCipherBinding (line 30168) | class ChaChaPolyCipherBinding {
method constructor (line 30169) | constructor(config) {
method free (line 30176) | free() {
method allocPacket (line 30180) | allocPacket(payloadLen) {
method encrypt (line 30196) | encrypt(packet) {
class AESGCMCipherNative (line 30212) | class AESGCMCipherNative {
method constructor (line 30213) | constructor(config) {
method free (line 30222) | free() {
method allocPacket (line 30225) | allocPacket(payloadLen) {
method encrypt (line 30241) | encrypt(packet) {
class AESGCMCipherBinding (line 30273) | class AESGCMCipherBinding {
method constructor (line 30274) | constructor(config) {
method free (line 30283) | free() {
method allocPacket (line 30287) | allocPacket(payloadLen) {
method encrypt (line 30303) | encrypt(packet) {
class GenericCipherNative (line 30319) | class GenericCipherNative {
method constructor (line 30320) | constructor(config) {
method free (line 30345) | free() {
method allocPacket (line 30348) | allocPacket(payloadLen) {
method encrypt (line 30366) | encrypt(packet) {
class GenericCipherBinding (line 30414) | class GenericCipherBinding {
method constructor (line 30415) | constructor(config) {
method free (line 30431) | free() {
method allocPacket (line 30435) | allocPacket(payloadLen) {
method encrypt (line 30453) | encrypt(packet) {
class NullDecipher (line 30475) | class NullDecipher {
method constructor (line 30476) | constructor(seqno, onPayload) {
method free (line 30484) | free() {}
method decrypt (line 30485) | decrypt(data, p, dataLen) {
class ChaChaPolyDecipherNative (line 30551) | class ChaChaPolyDecipherNative {
method constructor (line 30552) | constructor(config) {
method free (line 30567) | free() {}
method decrypt (line 30568) | decrypt(data, p, dataLen) {
class ChaChaPolyDecipherBinding (line 30687) | class ChaChaPolyDecipherBinding {
method constructor (line 30688) | constructor(config) {
method free (line 30701) | free() {
method decrypt (line 30704) | decrypt(data, p, dataLen) {
class AESGCMDecipherNative (line 30790) | class AESGCMDecipherNative {
method constructor (line 30791) | constructor(config) {
method free (line 30807) | free() {}
method decrypt (line 30808) | decrypt(data, p, dataLen) {
class AESGCMDecipherBinding (line 30926) | class AESGCMDecipherBinding {
method constructor (line 30927) | constructor(config) {
method free (line 30941) | free() {}
method decrypt (line 30942) | decrypt(data, p, dataLen) {
class GenericDecipherNative (line 31028) | class GenericDecipherNative {
method constructor (line 31029) | constructor(config) {
method free (line 31064) | free() {}
method decrypt (line 31065) | decrypt(data, p, dataLen) {
class GenericDecipherBinding (line 31208) | class GenericDecipherBinding {
method constructor (line 31209) | constructor(config) {
method free (line 31234) | free() {
method decrypt (line 31237) | decrypt(data, p, dataLen) {
function ivIncrement (line 31358) | function ivIncrement(iv) {
function timingSafeEquals (line 31381) | function timingSafeEquals(a, b) {
function createCipher (line 31389) | function createCipher(config) {
function createDecipher (line 31447) | function createDecipher(config) {
function assert (line 31554) | function assert(a,c){a||K("Assertion failed: "+c)}
function N (line 31554) | function N(a){var c=b["_"+a];assert(c,"Cannot call unknown function "+a+...
function ca (line 31555) | function ca(a,c,d,e){var f={string:function(g){var p=0;if(null!==g&&void...
function ia (line 31558) | function ia(){var a=L.buffer;ha=a;b.HEAP8=Q=new Int8Array(a);b.HEAP16=ne...
function ma (line 31558) | function ma(){var a=b.preRun.shift();ja.unshift(a)}
function K (line 31559) | function K(a){if(b.onAbort)b.onAbort(a);I(a);M=!0;a=new WebAssembly.Runt...
function pa (line 31559) | function pa(){var a=W;try{if(a==W&&J)return new Uint8Array(J);var c=H(a)...
function qa (line 31560) | function qa(){if(!J&&(x||y)){if("function"===typeof fetch&&!W.startsWith...
function X (line 31561) | function X(a){for(;0<a.length;){var c=a.shift();if("function"==typeof c)...
function H (line 31564) | function H(a){if(a.startsWith(V)){a=a.slice(V.length);if("boolean"===typ...
function a (line 31566) | function a(f){b.asm=f.exports;L=b.asm.b;ia();R=b.asm.j;ka.unshift(b.asm....
function c (line 31566) | function c(f){a(f.instance)}
function d (line 31566) | function d(f){return qa().then(function(l){return WebAssembly.instantiat...
function Z (line 31570) | function Z(){function a(){if(!Y&&(Y=!0,b.calledRun=!0,!M)){X(ka);q(b);if...
function kexinit (line 32963) | function kexinit(self) {
function handleKexInit (line 33043) | function handleKexInit(self, payload) {
function convertToMpint (line 33419) | function convertToMpint(buf) {
class KeyExchange (line 33440) | class KeyExchange {
method constructor (line 33441) | constructor(negotiated, protocol, remoteKexinit) {
method finish (line 33464) | finish(scOnly) {
method start (line 33911) | start() {
method getPublicKey (line 33940) | getPublicKey() {
method convertPublicKey (line 33948) | convertPublicKey(key) {
method computeSecret (line 33971) | computeSecret(otherPublicKey) {
method parse (line 33980) | parse(payload) {
class Curve25519Exchange (line 34184) | class Curve25519Exchange extends KeyExchange {
method constructor (line 34185) | constructor(hashName, ...args) {
method generateKeys (line 34192) | generateKeys() {
method getPublicKey (line 34196) | getPublicKey() {
method convertPublicKey (line 34202) | convertPublicKey(key) {
method computeSecret (line 34221) | computeSecret(otherPublicKey) {
class ECDHExchange (line 34259) | class ECDHExchange extends KeyExchange {
method constructor (line 34260) | constructor(curveName, hashName, ...args) {
method generateKeys (line 34267) | generateKeys() {
class DHGroupExchange (line 34275) | class DHGroupExchange extends KeyExchange {
method constructor (line 34276) | constructor(hashName, ...args) {
method start (line 34289) | start() {
method generateKeys (line 34308) | generateKeys() {
method setDHParams (line 34314) | setDHParams(prime, generator) {
method getDHParams (line 34322) | getDHParams() {
method parse (line 34330) | parse(payload) {
class DHExchange (line 34447) | class DHExchange extends KeyExchange {
method constructor (line 34448) | constructor(groupName, hashName, ...args) {
method start (line 34455) | start() {
method generateKeys (line 34472) | generateKeys() {
method getDHParams (line 34478) | getDHParams() {
method constructor (line 34548) | constructor(obj) {
method copyAllTo (line 34624) | copyAllTo(buf, offset) {
function generateKEXVal (line 34645) | function generateKEXVal(len, hashName, secret, exchangeHash, sessionID, ...
function onKEXPayload (line 34675) | function onKEXPayload(state, payload) {
function dhEstimate (line 34734) | function dhEstimate(neg) {
function trySendNEWKEYS (line 34757) | function trySendNEWKEYS(kex) {
function makePEM (line 34874) | function makePEM(type, data) {
function combineBuffers (line 34882) | function combineBuffers(buf1, buf2) {
function skipFields (line 34889) | function skipFields(buf, nfields) {
function genOpenSSLRSAPub (line 34905) | function genOpenSSLRSAPub(n, e) {
function genOpenSSHRSAPub (line 34927) | function genOpenSSHRSAPub(n, e) {
function genRSAASN1Buf (line 34944) | function genRSAASN1Buf(n, e, d, p, q, dmp1, dmq1, iqmp) {
function bigIntFromBuffer (line 34960) | function bigIntFromBuffer(buf) {
function bigIntToBuffer (line 34964) | function bigIntToBuffer(bn) {
function genOpenSSLDSAPub (line 34990) | function genOpenSSLDSAPub(p, q, g, y) {
function genOpenSSHDSAPub (line 35013) | function genOpenSSHDSAPub(p, q, g, y) {
function genOpenSSLDSAPriv (line 35037) | function genOpenSSLDSAPriv(p, q, g, y, x) {
function genOpenSSLEdPub (line 35050) | function genOpenSSLEdPub(pub) {
function genOpenSSHEdPub (line 35070) | function genOpenSSHEdPub(pub) {
function genOpenSSLEdPriv (line 35082) | function genOpenSSLEdPriv(priv) {
function genOpenSSLECDSAPub (line 35101) | function genOpenSSLECDSAPub(oid, Q) {
function genOpenSSHECDSAPub (line 35124) | function genOpenSSHECDSAPub(oid, Q) {
function genOpenSSLECDSAPriv (line 35157) | function genOpenSSLECDSAPriv(oid, pub, priv) {
function genOpenSSLECDSAPubFromPriv (line 35183) | function genOpenSSLECDSAPubFromPriv(curveName, priv) {
function OpenSSH_Private (line 35276) | function OpenSSH_Private(type, comment, privPEM, pubPEM, pubSSH, algo,
function parseOpenSSHPrivKeys (line 35428) | function parseOpenSSHPrivKeys(data, nkeys, decrypted) {
function OpenSSH_Old_Private (line 35619) | function OpenSSH_Old_Private(type, comment, privPEM, pubPEM, pubSSH, algo,
function PPK_Private (line 35816) | function PPK_Private(type, comment, privPEM, pubPEM, pubSSH, algo, decry...
function OpenSSH_Public (line 36000) | function OpenSSH_Public(type, comment, pubPEM, pubSSH, algo) {
function RFC4716_Public (line 36039) | function RFC4716_Public(type, comment, pubPEM, pubSSH, algo) {
function parseDER (line 36133) | function parseDER(data, baseType, comment, fullType) {
function isSupportedKeyType (line 36214) | function isSupportedKeyType(type) {
function isParsedKey (line 36231) | function isParsedKey(val) {
function parseKey (line 36237) | function parseKey(data, passphrase) {
function addNumericalSeparator (line 36320) | function addNumericalSeparator(val) {
function oneOf (line 36329) | function oneOf(expected, thing) {
method constructor (line 36348) | constructor(message) {
method constructor (line 36368) | constructor(str, range, input, replaceDefaultBoolean) {
class ERR_INVALID_ARG_TYPE (line 36393) | class ERR_INVALID_ARG_TYPE extends TypeError {
method constructor (line 36394) | constructor(name, expected, actual) {
function readUInt32BE (line 36446) | function readUInt32BE(buf, offset) {
function bufferCopy (line 36453) | function bufferCopy(src, dest, srcStart, srcEnd, destStart) {
function bufferSlice (line 36467) | function bufferSlice(buf, start, end) {
function makeBufferParser (line 36473) | function makeBufferParser() {
function makeError (line 36577) | function makeError(msg, level, fatal) {
function writeUInt32BE (line 36589) | function writeUInt32BE(buf, value, offset) {
function processCallback (line 36819) | function processCallback() {
function zlibOnError (line 36823) | function zlibOnError(message, errno, code) {
function _close (line 36834) | function _close(engine) {
class Zlib (line 36843) | class Zlib {
method constructor (line 36844) | constructor(mode) {
method writeSync (line 36870) | writeSync(chunk, retChunks) {
class ZlibPacketWriter (line 36971) | class ZlibPacketWriter {
method constructor (line 36972) | constructor(protocol) {
method cleanup (line 36979) | cleanup() {
method alloc (line 36984) | alloc(payloadSize, force) {
method finalize (line 36988) | finalize(payload, force) {
class PacketWriter (line 37007) | class PacketWriter {
method constructor (line 37008) | constructor(protocol) {
method cleanup (line 37014) | cleanup() {}
method alloc (line 37016) | alloc(payloadSize, force) {
method finalize (line 37022) | finalize(packet, force) {
class ZlibPacketReader (line 37027) | class ZlibPacketReader {
method constructor (line 37028) | constructor() {
method cleanup (line 37032) | cleanup() {
method read (line 37037) | read(data) {
class PacketReader (line 37042) | class PacketReader {
method cleanup (line 37043) | cleanup() {}
method read (line 37045) | read(data) {
class AuthContext (line 37115) | class AuthContext extends EventEmitter {
method constructor (line 37116) | constructor(protocol, username, service, method, cb) {
method accept (line 37134) | accept() {
method reject (line 37139) | reject(methodsLeft, isPartial) {
class KeyboardAuthContext (line 37147) | class KeyboardAuthContext extends AuthContext {
method constructor (line 37148) | constructor(protocol, username, service, method, submethods, cb) {
method prompt (line 37167) | prompt(prompts, title, instructions, cb) {
class PKAuthContext (line 37197) | class PKAuthContext extends AuthContext {
method constructor (line 37198) | constructor(protocol, username, service, method, pkInfo, cb) {
method accept (line 37207) | accept() {
class HostbasedAuthContext (line 37217) | class HostbasedAuthContext extends AuthContext {
method constructor (line 37218) | constructor(protocol, username, service, method, pkInfo, cb) {
class PwdAuthContext (line 37230) | class PwdAuthContext extends AuthContext {
method constructor (line 37231) | constructor(protocol, username, service, method, password, cb) {
method requestChange (line 37238) | requestChange(prompt, cb) {
class Session (line 37251) | class Session extends EventEmitter {
method constructor (line 37252) | constructor(client, info, localChan) {
class Server (line 37279) | class Server extends EventEmitter {
method constructor (line 37280) | constructor(cfg, listener) {
method injectSocket (line 37424) | injectSocket(socket) {
method listen (line 37428) | listen(...args) {
method address (line 37433) | address() {
method getConnections (line 37437) | getConnections(cb) {
method close (line 37442) | close(cb) {
method ref (line 37447) | ref() {
method unref (line 37452) | unref() {
class Client (line 37461) | class Client extends EventEmitter {
method constructor (line 20514) | constructor() {
method connect (line 20558) | connect(cfg) {
method end (line 21624) | end() {
method destroy (line 21632) | destroy() {
method exec (line 21637) | exec(cmd, opts, cb) {
method shell (line 21694) | shell(wndopts, opts, cb) {
method subsys (line 21755) | subsys(name, cb) {
method forwardIn (line 21778) | forwardIn(bindAddr, bindPort, cb) {
method unforwardIn (line 21814) | unforwardIn(bindAddr, bindPort, cb) {
method forwardOut (line 21843) | forwardOut(srcIP, srcPort, dstIP, dstPort, cb) {
method openssh_noMoreSessions (line 21864) | openssh_noMoreSessions(cb) {
method openssh_forwardInStreamLocal (line 21902) | openssh_forwardInStreamLocal(socketPath, cb) {
method openssh_unforwardInStreamLocal (line 21940) | openssh_unforwardInStreamLocal(socketPath, cb) {
method openssh_forwardOutStreamLocal (line 21978) | openssh_forwardOutStreamLocal(socketPath, cb) {
method sftp (line 22000) | sftp(env, cb) {
method setNoDelay (line 22080) | setNoDelay(noDelay) {
method constructor (line 37462) | constructor(socket, hostKeys, ident, offer, debug, server, srvCfg) {
method end (line 38344) | end() {
method x11 (line 38352) | x11(originAddr, originPort, cb) {
method forwardOut (line 38358) | forwardOut(boundAddr, boundPort, remoteAddr, remotePort, cb) {
method openssh_forwardOutStreamLocal (line 38364) | openssh_forwardOutStreamLocal(socketPath, cb) {
method rekey (line 38370) | rekey(cb) {
method setNoDelay (line 38389) | setNoDelay(noDelay) {
method constructor (line 48336) | constructor (url, {
method pipelining (line 48520) | get pipelining () {
method pipelining (line 48524) | set pipelining (value) {
method [kPending] (line 48529) | get [kPending] () {
method [kRunning] (line 48533) | get [kRunning] () {
method [kSize] (line 48537) | get [kSize] () {
method [kConnected] (line 48541) | get [kConnected] () {
method [kBusy] (line 48545) | get [kBusy] () {
method [kConnect] (line 48554) | [kConnect] (cb) {
method [kDispatch] (line 48559) | [kDispatch] (opts, handler) {
method [kClose] (line 48581) | async [kClose] () {
method [kDestroy] (line 48593) | async [kDestroy] (err) {
function openChannel (line 38398) | function openChannel(self, type, opts, cb) {
function compareNumbers (line 38438) | function compareNumbers(a, b) {
function onChannelOpenFailure (line 38458) | function onChannelOpenFailure(self, recipient, info, cb) {
function onCHANNEL_CLOSE (line 38479) | function onCHANNEL_CLOSE(self, recipient, channel, err, dead) {
class ChannelManager (line 38575) | class ChannelManager {
method constructor (line 38576) | constructor(client) {
method add (line 38582) | add(val) {
method update (line 38617) | update(id, val) {
method get (line 38624) | get(id) {
method remove (line 38630) | remove(id) {
method cleanup (line 38640) | cleanup(err) {
function generateAlgorithmList (line 38661) | function generateAlgorithmList(algoList, defaultList, supportedList) {
function jsmemcmp (line 38802) | function jsmemcmp(buf1, pos1, buf2, pos2, num) {
function SBMH (line 38809) | function SBMH(needle) {
function httpOverHttp (line 39041) | function httpOverHttp(options) {
function httpsOverHttp (line 39047) | function httpsOverHttp(options) {
function httpOverHttps (line 39055) | function httpOverHttps(options) {
function httpsOverHttps (line 39061) | function httpsOverHttps(options) {
function TunnelingAgent (line 39070) | function TunnelingAgent(options) {
function onFree (line 39113) | function onFree() {
function onCloseOrRemove (line 39117) | function onCloseOrRemove(err) {
function onResponse (line 39157) | function onResponse(res) {
function onUpgrade (line 39162) | function onUpgrade(res, socket, head) {
function onConnect (line 39169) | function onConnect(res, socket, head) {
function onError (line 39198) | function onError(cause) {
function createSecureSocket (line 39228) | function createSecureSocket(options, cb) {
function toOptions (line 39245) | function toOptions(host, port, localAddress) {
function mergeOptions (line 39256) | function mergeOptions(target) {
function ts64 (line 39325) | function ts64(x, i, h, l) {
function vn (line 39336) | function vn(x, xi, y, yi, n) {
function crypto_verify_16 (line 39342) | function crypto_verify_16(x, xi, y, yi) {
function crypto_verify_32 (line 39346) | function crypto_verify_32(x, xi, y, yi) {
function core_salsa20 (line 39350) | function core_salsa20(o, p, k, c) {
function core_hsalsa20 (line 39543) | function core_hsalsa20(o,p,k,c) {
function crypto_core_salsa20 (line 39680) | function crypto_core_salsa20(out,inp,k,c) {
function crypto_core_hsalsa20 (line 39684) | function crypto_core_hsalsa20(out,inp,k,c) {
function crypto_stream_salsa20_xor (line 39691) | function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {
function crypto_stream_salsa20 (line 39716) | function crypto_stream_salsa20(c,cpos,b,n,k) {
function crypto_stream (line 39740) | function crypto_stream(c,cpos,d,n,k) {
function crypto_stream_xor (line 39748) | function crypto_stream_xor(c,cpos,m,mpos,d,n,k) {
function crypto_onetimeauth (line 40113) | function crypto_onetimeauth(out, outpos, m, mpos, n, k) {
function crypto_onetimeauth_verify (line 40120) | function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) {
function crypto_secretbox (line 40126) | function crypto_secretbox(c,m,d,n,k) {
function crypto_secretbox_open (line 40135) | function crypto_secretbox_open(m,c,d,n,k) {
function set25519 (line 40146) | function set25519(r, a) {
function car25519 (line 40151) | function car25519(o) {
function sel25519 (line 40161) | function sel25519(p, q, b) {
function pack25519 (line 40170) | function pack25519(o, n) {
function neq25519 (line 40194) | function neq25519(a, b) {
function par25519 (line 40201) | function par25519(a) {
function unpack25519 (line 40207) | function unpack25519(o, n) {
function A (line 40213) | function A(o, a, b) {
function Z (line 40217) | function Z(o, a, b) {
function M (line 40221) | function M(o, a, b) {
function S (line 40592) | function S(o, a) {
function inv25519 (line 40596) | function inv25519(o, i) {
function pow2523 (line 40607) | function pow2523(o, i) {
function crypto_scalarmult (line 40618) | function crypto_scalarmult(q, n, p) {
function crypto_scalarmult_base (line 40671) | function crypto_scalarmult_base(q, n) {
function crypto_box_keypair (line 40675) | function crypto_box_keypair(y, x) {
function crypto_box_beforenm (line 40680) | function crypto_box_beforenm(k, y, x) {
function crypto_box (line 40689) | function crypto_box(c, m, d, n, y, x) {
function crypto_box_open (line 40695) | function crypto_box_open(m, c, d, n, y, x) {
function crypto_hashblocks_hl (line 40744) | function crypto_hashblocks_hl(hh, hl, m, n) {
function crypto_hash (line 41105) | function crypto_hash(out, m, n) {
function add (line 41145) | function add(p, q) {
function cswap (line 41171) | function cswap(p, q, b) {
function pack (line 41178) | function pack(r, p) {
function scalarmult (line 41187) | function scalarmult(p, q, s) {
function scalarbase (line 41202) | function scalarbase(p, s) {
function crypto_sign_keypair (line 41211) | function crypto_sign_keypair(pk, sk, seeded) {
function modL (line 41231) | function modL(r, x) {
function reduce (line 41256) | function reduce(r) {
function crypto_sign (line 41264) | function crypto_sign(sm, m, n, sk) {
function unpackneg (line 41299) | function unpackneg(r, p) {
function crypto_sign_open (line 41337) | function crypto_sign_open(m, sm, n, pk) {
function checkLengths (line 41432) | function checkLengths(k, n) {
function checkBoxLengths (line 41437) | function checkBoxLengths(pk, sk) {
function checkArrayTypes (line 41442) | function checkArrayTypes() {
function cleanup (line 41450) | function cleanup(arr) {
function makeDispatcher (line 41745) | function makeDispatcher (fn) {
function abort (line 41873) | function abort (self) {
function addSignal (line 41882) | function addSignal (self, signal) {
function removeSignal (line 41905) | function removeSignal (self) {
class ConnectHandler (line 41940) | class ConnectHandler extends AsyncResource {
method constructor (line 41941) | constructor (opts, callback) {
method onConnect (line 41966) | onConnect (abort, context) {
method onHeaders (line 41978) | onHeaders () {
method onUpgrade (line 41982) | onUpgrade (statusCode, rawHeaders, socket) {
method onError (line 42004) | onError (err) {
function connect (line 42018) | function connect (opts, callback) {
class PipelineRequest (line 42067) | class PipelineRequest extends Readable {
method constructor (line 42068) | constructor () {
method _read (line 42074) | _read () {
method _destroy (line 42083) | _destroy (err, callback) {
class PipelineResponse (line 42090) | class PipelineResponse extends Readable {
method constructor (line 42091) | constructor (resume) {
method _read (line 42096) | _read () {
method _destroy (line 42100) | _destroy (err, callback) {
class PipelineHandler (line 42109) | class PipelineHandler extends AsyncResource {
method constructor (line 42110) | constructor (opts, handler) {
method onConnect (line 42194) | onConnect (abort, context) {
method onHeaders (line 42209) | onHeaders (statusCode, rawHeaders, resume) {
method onData (line 42271) | onData (chunk) {
method onComplete (line 42276) | onComplete (trailers) {
method onError (line 42281) | onError (err) {
function pipeline (line 42288) | function pipeline (opts, handler) {
class RequestHandler (line 42316) | class RequestHandler extends AsyncResource {
method constructor (line 42317) | constructor (opts, callback) {
method onConnect (line 42397) | onConnect (abort, context) {
method onHeaders (line 42409) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
method onData (line 42458) | onData (chunk) {
method onComplete (line 42462) | onComplete (trailers) {
method onError (line 42467) | onError (err) {
function request (line 42499) | function request (opts, callback) {
class StreamHandler (line 42539) | class StreamHandler extends AsyncResource {
method constructor (line 42540) | constructor (opts, factory, callback) {
method onConnect (line 42597) | onConnect (abort, context) {
method onHeaders (line 42609) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
method onData (line 42684) | onData (chunk) {
method onComplete (line 42690) | onComplete (trailers) {
method onError (line 42704) | onError (err) {
function stream (line 42728) | function stream (opts, factory, callback) {
class UpgradeHandler (line 42765) | class UpgradeHandler extends AsyncResource {
method constructor (line 42766) | constructor (opts, callback) {
method onConnect (line 42792) | onConnect (abort, context) {
method onHeaders (line 42804) | onHeaders () {
method onUpgrade (line 42808) | onUpgrade (statusCode, rawHeaders, socket) {
method onError (line 42825) | onError (err) {
function upgrade (line 42839) | function upgrade (opts, callback) {
class BodyReadable (line 42907) | class BodyReadable extends Readable {
method constructor (line 42908) | constructor ({
method destroy (line 42936) | destroy (err) {
method _destroy (line 42948) | _destroy (err, callback) {
method on (line 42962) | on (ev, ...args) {
method addListener (line 42969) | addListener (ev, ...args) {
method off (line 42973) | off (ev, ...args) {
method removeListener (line 42984) | removeListener (ev, ...args) {
method push (line 42988) | push (chunk) {
method text (line 42997) | async text () {
method json (line 43002) | async json () {
method blob (line 43007) | async blob () {
method bytes (line 43012) | async bytes () {
method arrayBuffer (line 43017) | async arrayBuffer () {
method formData (line 43022) | async formData () {
method bodyUsed (line 43028) | get bodyUsed () {
method body (line 43033) | get body () {
method dump (line 43045) | async dump (opts) {
function isLocked (line 43091) | function isLocked (self) {
function isUnusable (line 43097) | function isUnusable (self) {
function consume (line 43101) | async function consume (stream, type) {
function consumeStart (line 43145) | function consumeStart (consume) {
function chunksDecode (line 43183) | function chunksDecode (chunks, length) {
function chunksConcat (line 43206) | function chunksConcat (chunks, length) {
function consumeEnd (line 43226) | function consumeEnd (consume) {
function consumePush (line 43248) | function consumePush (consume, chunk) {
function consumeFinish (line 43253) | function consumeFinish (consume, err) {
function getResolveErrorBodyCallback (line 43288) | async function getResolveErrorBodyCallback ({ callback, body, contentTyp...
function noop (line 43389) | function noop () {}
method constructor (line 43403) | constructor (maxCachedSessions) {
method get (line 43418) | get (sessionKey) {
method set (line 43423) | set (sessionKey, session) {
method constructor (line 43434) | constructor (maxCachedSessions) {
method get (line 43439) | get (sessionKey) {
method set (line 43443) | set (sessionKey, session) {
function buildConnector (line 43459) | function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeo...
function onConnectTimeout (line 43602) | function onConnectTimeout (socket, opts) {
class UndiciError (line 43968) | class UndiciError extends Error {
method constructor (line 43969) | constructor (message) {
method [Symbol.hasInstance] (line 43975) | static [Symbol.hasInstance] (instance) {
class ConnectTimeoutError (line 43983) | class ConnectTimeoutError extends UndiciError {
method constructor (line 43984) | constructor (message) {
method [Symbol.hasInstance] (line 43991) | static [Symbol.hasInstance] (instance) {
class HeadersTimeoutError (line 43999) | class HeadersTimeoutError extends UndiciError {
method constructor (line 44000) | constructor (message) {
method [Symbol.hasInstance] (line 44007) | static [Symbol.hasInstance] (instance) {
class HeadersOverflowError (line 44015) | class HeadersOverflowError extends UndiciError {
method constructor (line 44016) | constructor (message) {
method [Symbol.hasInstance] (line 44023) | static [Symbol.hasInstance] (instance) {
class BodyTimeoutError (line 44031) | class BodyTimeoutError extends UndiciError {
method constructor (line 44032) | constructor (message) {
method [Symbol.hasInstance] (line 44039) | static [Symbol.hasInstance] (instance) {
class ResponseStatusCodeError (line 44047) | class ResponseStatusCodeError extends UndiciError {
method constructor (line 44048) | constructor (message, statusCode, headers, body) {
method [Symbol.hasInstance] (line 44059) | static [Symbol.hasInstance] (instance) {
class InvalidArgumentError (line 44067) | class InvalidArgumentError extends UndiciError {
method constructor (line 44068) | constructor (message) {
method [Symbol.hasInstance] (line 44075) | static [Symbol.hasInstance] (instance) {
class InvalidReturnValueError (line 44083) | class InvalidReturnValueError extends UndiciError {
method constructor (line 44084) | constructor (message) {
method [Symbol.hasInstance] (line 44091) | static [Symbol.hasInstance] (instance) {
class AbortError (line 44099) | class AbortError extends UndiciError {
method constructor (line 44100) | constructor (message) {
method [Symbol.hasInstance] (line 44107) | static [Symbol.hasInstance] (instance) {
class RequestAbortedError (line 44115) | class RequestAbortedError extends AbortError {
method constructor (line 44116) | constructor (message) {
method [Symbol.hasInstance] (line 44123) | static [Symbol.hasInstance] (instance) {
class InformationalError (line 44131) | class InformationalError extends UndiciError {
method constructor (line 44132) | constructor (message) {
method [Symbol.hasInstance] (line 44139) | static [Symbol.hasInstance] (instance) {
class RequestContentLengthMismatchError (line 44147) | class RequestContentLengthMismatchError extends UndiciError {
method constructor (line 44148) | constructor (message) {
method [Symbol.hasInstance] (line 44155) | static [Symbol.hasInstance] (instance) {
class ResponseContentLengthMismatchError (line 44163) | class ResponseContentLengthMismatchError extends UndiciError {
method constructor (line 44164) | constructor (message) {
method [Symbol.hasInstance] (line 44171) | static [Symbol.hasInstance] (instance) {
class ClientDestroyedError (line 44179) | class ClientDestroyedError extends UndiciError {
method constructor (line 44180) | constructor (message) {
method [Symbol.hasInstance] (line 44187) | static [Symbol.hasInstance] (instance) {
class ClientClosedError (line 44195) | class ClientClosedError extends UndiciError {
method constructor (line 44196) | constructor (message) {
method [Symbol.hasInstance] (line 44203) | static [Symbol.hasInstance] (instance) {
class SocketError (line 44211) | class SocketError extends UndiciError {
method constructor (line 44212) | constructor (message, socket) {
method [Symbol.hasInstance] (line 44220) | static [Symbol.hasInstance] (instance) {
class NotSupportedError (line 44228) | class NotSupportedError extends UndiciError {
method constructor (line 44229) | constructor (message) {
method [Symbol.hasInstance] (line 44236) | static [Symbol.hasInstance] (instance) {
class BalancedPoolMissingUpstreamError (line 44244) | class BalancedPoolMissingUpstreamError extends UndiciError {
method constructor (line 44245) | constructor (message) {
method [Symbol.hasInstance] (line 44252) | static [Symbol.hasInstance] (instance) {
class HTTPParserError (line 44260) | class HTTPParserError extends Error {
method constructor (line 44261) | constructor (message, code, data) {
method [Symbol.hasInstance] (line 44268) | static [Symbol.hasInstance] (instance) {
class ResponseExceededMaxSizeError (line 44276) | class ResponseExceededMaxSizeError extends UndiciError {
method constructor (line 44277) | constructor (message) {
method [Symbol.hasInstance] (line 44284) | static [Symbol.hasInstance] (instance) {
class RequestRetryError (line 44292) | class RequestRetryError extends UndiciError {
method constructor (line 44293) | constructor (message, code, { headers, data }) {
method [Symbol.hasInstance] (line 44303) | static [Symbol.hasInstance] (instance) {
class ResponseError (line 44311) | class ResponseError extends UndiciError {
method constructor (line 44312) | constructor (message, code, { headers, data }) {
method [Symbol.hasInstance] (line 44322) | static [Symbol.hasInstance] (instance) {
class SecureProxyConnectionError (line 44330) | class SecureProxyConnectionError extends UndiciError {
method constructor (line 44331) | constructor (cause, message, options) {
method [Symbol.hasInstance] (line 44339) | static [Symbol.hasInstance] (instance) {
class MessageSizeExceededError (line 44347) | class MessageSizeExceededError extends UndiciError {
method constructor (line 44348) | constructor (message) {
method [kMessageSizeExceededError] (line 44359) | get [kMessageSizeExceededError] () {
method [Symbol.hasInstance] (line 44355) | static [Symbol.hasInstance] (instance) {
class Request (line 44427) | class Request {
method constructor (line 44428) | constructor (origin, {
method onBodySent (line 44596) | onBodySent (chunk) {
method onRequestSent (line 44606) | onRequestSent () {
method onConnect (line 44620) | onConnect (abort) {
method onResponseStarted (line 44632) | onResponseStarted () {
method onHeaders (line 44636) | onHeaders (statusCode, headers, resume, statusText) {
method onData (line 44651) | onData (chunk) {
method onUpgrade (line 44663) | onUpgrade (statusCode, headers, socket) {
method onComplete (line 44670) | onComplete (trailers) {
method onError (line 44688) | onError (error) {
method onFinally (line 44703) | onFinally () {
method addHeader (line 44715) | addHeader (key, value) {
method constructor (line 61576) | constructor (input, init = {}) {
method method (line 62075) | get method () {
method url (line 62083) | get url () {
method headers (line 62093) | get headers () {
method destination (line 62102) | get destination () {
method referrer (line 62114) | get referrer () {
method referrerPolicy (line 62136) | get referrerPolicy () {
method mode (line 62146) | get mode () {
method credentials (line 62156) | get credentials () {
method cache (line 62164) | get cache () {
method redirect (line 62175) | get redirect () {
method integrity (line 62185) | get integrity () {
method keepalive (line 62195) | get keepalive () {
method isReloadNavigation (line 62204) | get isReloadNavigation () {
method isHistoryNavigation (line 62214) | get isHistoryNavigation () {
method signal (line 62225) | get signal () {
method body (line 62232) | get body () {
method bodyUsed (line 62238) | get bodyUsed () {
method duplex (line 62244) | get duplex () {
method clone (line 62251) | clone () {
function processHeader (line 44721) | function processHeader (request, key, val) {
class TstNode (line 44892) | class TstNode {
method constructor (line 44908) | constructor (key, value, index) {
method add (line 44928) | add (key, value) {
method search (line 44971) | search (key) {
class TernarySearchTree (line 45001) | class TernarySearchTree {
method insert (line 45009) | insert (key, value) {
method lookup (line 45021) | lookup (key) {
class BodyAsyncIterable (line 45062) | class BodyAsyncIterable {
method constructor (line 45063) | constructor (body) {
method constructor (line 50238) | constructor (body) {
method [Symbol.asyncIterator] (line 45068) | async * [Symbol.asyncIterator] () {
function wrapRequestBody (line 45075) | function wrapRequestBody (body) {
function nop (line 45114) | function nop () {}
function isStream (line 45116) | function isStream (obj) {
function isBlobLike (line 45121) | function isBlobLike (object) {
function buildURL (line 45138) | function buildURL (url, queryParams) {
function isValidPort (line 45152) | function isValidPort (port) {
function isHttpOrHttpsPrefixed (line 45161) | function isHttpOrHttpsPrefixed (value) {
function parseURL (line 45178) | function parseURL (url) {
function parseOrigin (line 45249) | function parseOrigin (url) {
function getHostname (line 45259) | function getHostname (host) {
function getServerName (line 45275) | function getServerName (host) {
function deepClone (line 45290) | function deepClone (obj) {
function isAsyncIterable (line 45294) | function isAsyncIterable (obj) {
function isIterable (line 45298) | function isIterable (obj) {
function bodyLength (line 45302) | function bodyLength (body) {
function isDestroyed (line 45319) | function isDestroyed (body) {
function destroy (line 45323) | function destroy (stream, err) {
function parseKeepAliveTimeout (line 45347) | function parseKeepAliveTimeout (val) {
function headerNameToString (line 45357) | function headerNameToString (value) {
function bufferToLowerCasedHeaderName (line 45368) | function bufferToLowerCasedHeaderName (value) {
function parseHeaders (line 45377) | function parseHeaders (headers, obj) {
function parseRawHeaders (line 45407) | function parseRawHeaders (headers) {
function isBuffer (line 45442) | function isBuffer (buffer) {
function validateHandler (line 45447) | function validateHandler (handler, method, upgrade) {
function isDisturbed (line 45485) | function isDisturbed (body) {
function isErrored (line 45490) | function isErrored (body) {
function isReadable (line 45494) | function isReadable (body) {
function getSocketInfo (line 45498) | function getSocketInfo (socket) {
function ReadableStreamFrom (line 45512) | function ReadableStreamFrom (iterable) {
function isFormDataLike (line 45546) | function isFormDataLike (object) {
function addAbortListener (line 45560) | function addAbortListener (signal, listener) {
function toUSVString (line 45575) | function toUSVString (val) {
function isUSVString (line 45583) | function isUSVString (val) {
function isTokenCharCode (line 45591) | function isTokenCharCode (c) {
function isValidHTTPToken (line 45621) | function isValidHTTPToken (characters) {
function isValidHeaderValue (line 45647) | function isValidHeaderValue (characters) {
function parseRangeHeader (line 45653) | function parseRangeHeader (range) {
function addListener (line 45666) | function addListener (obj, name, listener) {
function removeAllListeners (line 45673) | function removeAllListeners (obj) {
function errorRequest (line 45680) | function errorRequest (client, request, err) {
function defaultFactory (line 45790) | function defaultFactory (origin, opts) {
class Agent (line 45796) | class Agent extends DispatcherBase {
method constructor (line 45797) | constructor ({ factory = defaultFactory, maxRedirections = 0, connect,...
method [kRunning] (line 45845) | get [kRunning] () {
method [kDispatch] (line 45853) | [kDispatch] (opts, handler) {
method [kClose] (line 45879) | async [kClose] () {
method [kDestroy] (line 45889) | async [kDestroy] (err) {
function getGreatestCommonDivisor (line 45944) | function getGreatestCommonDivisor (a, b) {
function defaultFactory (line 45955) | function defaultFactory (origin, opts) {
class BalancedPool (line 45959) | class BalancedPool extends PoolBase {
method constructor (line 45960) | constructor (upstreams = [], { factory = defaultFactory, ...opts } = {...
method addUpstream (line 45989) | addUpstream (upstream) {
method _updateBalancedPoolStats (line 46029) | _updateBalancedPoolStats () {
method removeUpstream (line 46038) | removeUpstream (upstream) {
method upstreams (line 46054) | get upstreams () {
method [kGetDispatcher] (line 46060) | [kGetDispatcher] () {
function lazyllhttp (line 46188) | async function lazyllhttp () {
class Parser (line 46271) | class Parser {
method constructor (line 46272) | constructor (client, socket, { exports }) {
method setTimeout (line 46300) | setTimeout (delay, type) {
method resume (line 46335) | resume () {
method readMore (line 46358) | readMore () {
method execute (line 46368) | execute (data) {
method destroy (line 46430) | destroy () {
method onStatus (line 46445) | onStatus (buf) {
method onMessageBegin (line 46449) | onMessageBegin () {
method onHeaderField (line 46464) | onHeaderField (buf) {
method onHeaderValue (line 46476) | onHeaderValue (buf) {
method trackHeader (line 46501) | trackHeader (len) {
method onUpgrade (line 46508) | onUpgrade (head) {
method onHeadersComplete (line 46552) | onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {
method onBody (line 46661) | onBody (buf) {
method onMessageComplete (line 46693) | onMessageComplete () {
function onParserTimeout (line 46760) | function onParserTimeout (parser) {
function connectH1 (line 46779) | async function connectH1 (client, socket) {
function resumeH1 (line 46936) | function resumeH1 (client) {
function shouldSendContentLength (line 46967) | function shouldSendContentLength (method) {
function writeH1 (line 46971) | function writeH1 (client, request) {
function writeStream (line 47149) | function writeStream (abort, body, client, request, socket, contentLengt...
function writeBuffer (line 47252) | function writeBuffer (abort, body, client, request, socket, contentLengt...
function writeBlob (line 47282) | async function writeBlob (abort, body, client, request, socket, contentL...
function writeIterable (line 47310) | async function writeIterable (abort, body, client, request, socket, cont...
class AsyncWriter (line 47359) | class AsyncWriter {
method constructor (line 47360) | constructor ({ abort, socket, request, contentLength, client, expectsP...
method write (line 47373) | write (chunk) {
method end (line 47436) | end () {
method destroy (line 47483) | destroy (err) {
function parseH2Headers (line 47563) | function parseH2Headers (headers) {
function connectH2 (line 47583) | async function connectH2 (client, socket) {
function resumeH2 (line 47692) | function resumeH2 (client) {
function onHttp2SessionError (line 47706) | function onHttp2SessionError (err) {
function onHttp2FrameError (line 47713) | function onHttp2FrameError (type, code, id) {
function onHttp2SessionEnd (line 47721) | function onHttp2SessionEnd () {
function onHTTP2GoAway (line 47732) | function onHTTP2GoAway (code) {
function shouldSendContentLength (line 47763) | function shouldSendContentLength (method) {
function writeH2 (line 47767) | function writeH2 (client, request) {
function writeBuffer (line 48107) | function writeBuffer (abort, h2stream, body, client, request, socket, co...
function writeStream (line 48130) | function writeStream (abort, socket, expectsPayload, h2stream, body, cli...
function writeBlob (line 48161) | async function writeBlob (abort, h2stream, body, client, request, socket...
function writeIterable (line 48189) | async function writeIterable (abort, h2stream, body, client, request, so...
function getPipelining (line 48323) | function getPipelining (client) {
class Client (line 48330) | class Client extends DispatcherBase {
method constructor (line 20514) | constructor() {
method connect (line 20558) | connect(cfg) {
method end (line 21624) | end() {
method destroy (line 21632) | destroy() {
method exec (line 21637) | exec(cmd, opts, cb) {
method shell (line 21694) | shell(wndopts, opts, cb) {
method subsys (line 21755) | subsys(name, cb) {
method forwardIn (line 21778) | forwardIn(bindAddr, bindPort, cb) {
method unforwardIn (line 21814) | unforwardIn(bindAddr, bindPort, cb) {
method forwardOut (line 21843) | forwardOut(srcIP, srcPort, dstIP, dstPort, cb) {
method openssh_noMoreSessions (line 21864) | openssh_noMoreSessions(cb) {
method openssh_forwardInStreamLocal (line 21902) | openssh_forwardInStreamLocal(socketPath, cb) {
method openssh_unforwardInStreamLocal (line 21940) | openssh_unforwardInStreamLocal(socketPath, cb) {
method openssh_forwardOutStreamLocal (line 21978) | openssh_forwardOutStreamLocal(socketPath, cb) {
method sftp (line 22000) | sftp(env, cb) {
method setNoDelay (line 22080) | setNoDelay(noDelay) {
method constructor (line 37462) | constructor(socket, hostKeys, ident, offer, debug, server, srvCfg) {
method end (line 38344) | end() {
method x11 (line 38352) | x11(originAddr, originPort, cb) {
method forwardOut (line 38358) | forwardOut(boundAddr, boundPort, remoteAddr, remotePort, cb) {
method openssh_forwardOutStreamLocal (line 38364) | openssh_forwardOutStreamLocal(socketPath, cb) {
method rekey (line 38370) | rekey(cb) {
method setNoDelay (line 38389) | setNoDelay(noDelay) {
method constructor (line 48336) | constructor (url, {
method pipelining (line 48520) | get pipelining () {
method pipelining (line 48524) | set pipelining (value) {
method [kPending] (line 48529) | get [kPending] () {
method [kRunning] (line 48533) | get [kRunning] () {
method [kSize] (line 48537) | get [kSize] () {
method [kConnected] (line 48541) | get [kConnected] () {
method [kBusy] (line 48545) | get [kBusy] () {
method [kConnect] (line 48554) | [kConnect] (cb) {
method [kDispatch] (line 48559) | [kDispatch] (opts, handler) {
method [kClose] (line 48581) | async [kClose] () {
method [kDestroy] (line 48593) | async [kDestroy] (err) {
function onError (line 48624) | function onError (client, err) {
function connect (line 48649) | async function connect (client) {
function emitDrain (line 48779) | function emitDrain (client) {
function resume (line 48784) | function resume (client, sync) {
function _resume (line 48801) | function _resume (client, sync) {
class DispatcherBase (line 48900) | class DispatcherBase extends Dispatcher {
method constructor (line 48901) | constructor () {
method destroyed (line 48910) | get destroyed () {
method closed (line 48914) | get closed () {
method interceptors (line 48918) | get interceptors () {
method interceptors (line 48922) | set interceptors (newInterceptors) {
method close (line 48935) | close (callback) {
method destroy (line 48981) | destroy (err, callback) {
method [kInterceptedDispatch] (line 49030) | [kInterceptedDispatch] (opts, handler) {
method dispatch (line 49044) | dispatch (opts, handler) {
class Dispatcher (line 49087) | class Dispatcher extends EventEmitter {
method dispatch (line 49088) | dispatch () {
method close (line 49092) | close () {
method destroy (line 49096) | destroy () {
method compose (line 49100) | compose (...args) {
class ComposedDispatcher (line 49125) | class ComposedDispatcher extends Dispatcher {
method constructor (line 49129) | constructor (dispatcher, dispatch) {
method dispatch (line 49135) | dispatch (...args) {
method close (line 49139) | close (...args) {
method destroy (line 49143) | destroy (...args) {
class EnvHttpProxyAgent (line 49171) | class EnvHttpProxyAgent extends DispatcherBase {
method constructor (line 49176) | constructor (opts = {}) {
method [kDispatch] (line 49208) | [kDispatch] (opts, handler) {
method [kClose] (line 49214) | async [kClose] () {
method [kDestroy] (line 49224) | async [kDestroy] (err) {
method #getProxyAgentForUrl (line 49234) | #getProxyAgentForUrl (url) {
method #shouldProxy (line 49250) | #shouldProxy (hostname, port) {
method #parseNoProxy (line 49283) | #parseNoProxy () {
method #noProxyChanged (line 49304) | get #noProxyChanged () {
method #noProxyEnv (line 49311) | get #noProxyEnv () {
class FixedCircularBuffer (line 49383) | class FixedCircularBuffer {
method constructor (line 49384) | constructor() {
method isEmpty (line 49391) | isEmpty() {
method isFull (line 49395) | isFull() {
method push (line 49399) | push(data) {
method shift (line 49404) | shift() {
method constructor (line 49415) | constructor() {
method isEmpty (line 49419) | isEmpty() {
method push (line 49423) | push(data) {
method shift (line 49432) | shift() {
class PoolBase (line 49470) | class PoolBase extends DispatcherBase {
method constructor (line 49471) | constructor () {
method [kBusy] (line 49523) | get [kBusy] () {
method [kConnected] (line 49527) | get [kConnected] () {
method [kFree] (line 49531) | get [kFree] () {
method [kPending] (line 49535) | get [kPending] () {
method [kRunning] (line 49543) | get [kRunning] () {
method [kSize] (line 49551) | get [kSize] () {
method stats (line 49559) | get stats () {
method [kClose] (line 49563) | async [kClose] () {
method [kDestroy] (line 49573) | async [kDestroy] (err) {
method [kDispatch] (line 49585) | [kDispatch] (opts, handler) {
method [kAddClient] (line 49600) | [kAddClient] (client) {
method [kRemoveClient] (line 49620) | [kRemoveClient] (client) {
class PoolStats (line 49654) | class PoolStats {
method constructor (line 49655) | constructor (pool) {
method connected (line 49659) | get connected () {
method free (line 49663) | get free () {
method pending (line 49667) | get pending () {
method queued (line 49671) | get queued () {
method running (line 49675) | get running () {
method size (line 49679) | get size () {
function defaultFactory (line 49714) | function defaultFactory (origin, opts) {
class Pool (line 49718) | class Pool extends PoolBase {
method constructor (line 49719) | constructor (origin, {
method [kGetDispatcher] (line 49784) | [kGetDispatcher] () {
function defaultProtocolPort (line 49827) | function defaultProtocolPort (protocol) {
function defaultFactory (line 49831) | function defaultFactory (origin, opts) {
function defaultAgentFactory (line 49837) | function defaultAgentFactory (origin, opts) {
class Http1ProxyWrapper (line 49844) | class Http1ProxyWrapper extends DispatcherBase {
method constructor (line 49847) | constructor (proxyUrl, { headers = {}, connect, factory }) {
method [kDispatch] (line 49861) | [kDispatch] (opts, handler) {
method [kClose] (line 49891) | async [kClose] () {
method [kDestroy] (line 49895) | async [kDestroy] (err) {
class ProxyAgent (line 49900) | class ProxyAgent extends DispatcherBase {
method constructor (line 49901) | constructor (opts) {
method dispatch (line 50001) | dispatch (opts, handler) {
method #getUrl (line 50023) | #getUrl (opts) {
method [kClose] (line 50033) | async [kClose] () {
method [kDestroy] (line 50038) | async [kDestroy] () {
function buildHeaders (line 50048) | function buildHeaders (headers) {
function throwIfProxyAuthIsSent (line 50073) | function throwIfProxyAuthIsSent (headers) {
class RetryAgent (line 50095) | class RetryAgent extends Dispatcher {
method constructor (line 50098) | constructor (agent, options = {}) {
method dispatch (line 50104) | dispatch (opts, handler) {
method close (line 50115) | close () {
method destroy (line 50119) | destroy () {
function setGlobalDispatcher (line 50145) | function setGlobalDispatcher (agent) {
function getGlobalDispatcher (line 50157) | function getGlobalDispatcher () {
method constructor (line 50178) | constructor (handler) {
method onConnect (line 50185) | onConnect (...args) {
method onError (line 50189) | onError (...args) {
method onUpgrade (line 50193) | onUpgrade (...args) {
method onResponseStarted (line 50197) | onResponseStarted (...args) {
method onHeaders (line 50201) | onHeaders (...args) {
method onData (line 50205) | onData (...args) {
method onComplete (line 50209) | onComplete (...args) {
method onBodySent (line 50213) | onBodySent (...args) {
class BodyAsyncIterable (line 50237) | class BodyAsyncIterable {
method constructor (line 45063) | constructor (body) {
method constructor (line 50238) | constructor (body) {
method [Symbol.asyncIterator] (line 50243) | async * [Symbol.asyncIterator] () {
class RedirectHandler (line 50250) | class RedirectHandler {
method constructor (line 50251) | constructor (dispatch, maxRedirections, opts, handler) {
method onConnect (line 50301) | onConnect (abort) {
method onUpgrade (line 50306) | onUpgrade (statusCode, headers, socket) {
method onError (line 50310) | onError (error) {
method onHeaders (line 50314) | onHeaders (statusCode, headers, resume, statusText) {
method onData (line 50357) | onData (chunk) {
method onComplete (line 50381) | onComplete (trailers) {
method onBodySent (line 50401) | onBodySent (chunk) {
function parseLocation (line 50408) | function parseLocation (statusCode, headers) {
function shouldRemoveHeader (line 50421) | function shouldRemoveHeader (header, removeContent, unknownOrigin) {
function cleanRequestHeaders (line 50436) | function cleanRequestHeaders (headers, removeContent, unknownOrigin) {
function calculateRetryAfterHeader (line 50477) | function calculateRetryAfterHeader (retryAfter) {
class RetryHandler (line 50482) | class RetryHandler {
method constructor (line 50483) | constructor (opts, handlers) {
method onRequestSent (line 50547) | onRequestSent () {
method onUpgrade (line 50553) | onUpgrade (statusCode, headers, socket) {
method onConnect (line 50559) | onConnect (abort) {
method onBodySent (line 50567) | onBodySent (chunk) {
method [kRetryHandlerDefaultRetry] (line 50571) | static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {
method onHeaders (line 50629) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
method onData (line 50770) | onData (chunk) {
method onComplete (line 50776) | onComplete (rawTrailers) {
method onError (line 50781) | onError (err) {
class DNSInstance (line 50854) | class DNSInstance {
method constructor (line 50863) | constructor (opts) {
method full (line 50872) | get full () {
method runLookup (line 50876) | runLookup (origin, opts, cb) {
method #defaultLookup (line 50961) | #defaultLookup (origin, opts, cb) {
method #defaultPick (line 50987) | #defaultPick (origin, hostnameRecords, affinity) {
method setRecords (line 51041) | setRecords (origin, addresses) {
method getHandler (line 51062) | getHandler (meta, opts) {
class DNSDispatchHandler (line 51067) | class DNSDispatchHandler extends DecoratorHandler {
method constructor (line 51074) | constructor (state, { origin, handler, dispatch }, opts) {
method onError (line 51083) | onError (err) {
class DumpHandler (line 51236) | class DumpHandler extends DecoratorHandler {
method constructor (line 51245) | constructor ({ maxSize }, handler) {
method onConnect (line 51256) | onConnect (abort) {
method #customAbort (line 51262) | #customAbort (reason) {
method onHeaders (line 51268) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
method onError (line 51292) | onError (err) {
method onData (line 51302) | onData (chunk) {
method onComplete (line 51318) | onComplete (trailers) {
function createDumpInterceptor (line 51332) | function createDumpInterceptor (
function createRedirectInterceptor (line 51365) | function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirec...
function enumToMap (line 51763) | function enumToMap(obj) {
class MockAgent (line 51805) | class MockAgent extends Dispatcher {
method constructor (line 51806) | constructor (opts) {
method get (line 51823) | get (origin) {
method dispatch (line 51833) | dispatch (opts, handler) {
method close (line 51839) | async close () {
method deactivate (line 51844) | deactivate () {
method activate (line 51848) | activate () {
method enableNetConnect (line 51852) | enableNetConnect (matcher) {
method disableNetConnect (line 51866) | disableNetConnect () {
method isMockActive (line 51872) | get isMockActive () {
method [kMockAgentSet] (line 51876) | [kMockAgentSet] (origin, dispatcher) {
method [kFactory] (line 51880) | [kFactory] (origin) {
method [kMockAgentGet] (line 51887) | [kMockAgentGet] (origin) {
method [kGetNetConnect] (line 51912) | [kGetNetConnect] () {
method pendingInterceptors (line 51916) | pendingInterceptors () {
method assertNoPendingInterceptors (line 51924) | assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new Pend...
class MockClient (line 51971) | class MockClient extends Client {
method constructor (line 51972) | constructor (origin, opts) {
method intercept (line 51997) | intercept (opts) {
method [kClose] (line 52001) | async [kClose] () {
method [Symbols.kConnected] (line 51990) | get [Symbols.kConnected] () {
class MockNotMatchedError (line 52026) | class MockNotMatchedError extends UndiciError {
method constructor (line 52027) | constructor (message) {
method [Symbol.hasInstance] (line 52035) | static [Symbol.hasInstance] (instance) {
class MockScope (line 52070) | class MockScope {
method constructor (line 52071) | constructor (mockDispatch) {
method delay (line 52078) | delay (waitInMs) {
method persist (line 52090) | persist () {
method times (line 52098) | times (repeatTimes) {
class MockInterceptor (line 52111) | class MockInterceptor {
method constructor (line 52112) | constructor (opts, mockDispatches) {
method createMockScopeDispatchData (line 52145) | createMockScopeDispatchData ({ statusCode, data, responseOptions }) {
method validateReplyParameters (line 52154) | validateReplyParameters (replyParameters) {
method reply (line 52166) | reply (replyOptionsCallbackOrStatusCode) {
method replyWithError (line 52216) | replyWithError (error) {
method defaultReplyHeaders (line 52228) | defaultReplyHeaders (headers) {
method defaultReplyTrailers (line 52240) | defaultReplyTrailers (trailers) {
method replyContentLength (line 52252) | replyContentLength () {
class MockPool (line 52289) | class MockPool extends Pool {
method constructor (line 52290) | constructor (origin, opts) {
method intercept (line 52315) | intercept (opts) {
method [kClose] (line 52319) | async [kClose] () {
method [Symbols.kConnected] (line 52308) | get [Symbols.kConnected] () {
function matchValue (line 52384) | function matchValue (match, value) {
function lowerCaseEntries (line 52397) | function lowerCaseEntries (headers) {
function getHeaderByName (line 52409) | function getHeaderByName (headers, key) {
function buildHeadersFromArray (line 52426) | function buildHeadersFromArray (headers) { // fetch HeadersList
function matchHeaders (line 52435) | function matchHeaders (mockDispatch, headers) {
function safeUrl (line 52459) | function safeUrl (path) {
function matchKey (line 52475) | function matchKey (mockDispatch, { path, method, body, headers }) {
function getResponseData (line 52483) | function getResponseData (data) {
function getMockDispatch (line 52497) | function getMockDispatch (mockDispatches, key) {
function addMockDispatch (line 52529) | function addMockDispatch (mockDispatches, key, data) {
function deleteMockDispatch (line 52537) | function deleteMockDispatch (mockDispatches, key) {
function buildKey (line 52549) | function buildKey (opts) {
function generateKeyValues (line 52560) | function generateKeyValues (data) {
function getStatusText (line 52582) | function getStatusText (statusCode) {
function getResponse (line 52586) | async function getResponse (body) {
function mockDispatch (line 52597) | function mockDispatch (opts, handler) {
function buildMockDispatch (line 52669) | function buildMockDispatch () {
function checkNetConnect (line 52699) | function checkNetConnect (netConnect, origin) {
function buildMockOptions (line 52709) | function buildMockOptions (opts) {
method constructor (line 52753) | constructor ({ disableColors } = {}) {
method format (line 52768) | format (pendingInterceptors) {
method constructor (line 52809) | constructor (singular, plural) {
method pluralize (line 52814) | pluralize (count) {
function onTick (line 52943) | function onTick () {
function refreshTimeout (line 53018) | function refreshTimeout () {
class FastTimer (line 53039) | class FastTimer {
method constructor (line 53095) | constructor (callback, delay, arg) {
method refresh (line 53112) | refresh () {
method clear (line 53137) | clear () {
method setTimeout (line 53164) | setTimeout (callback, delay, arg) {
method clearTimeout (line 53177) | clearTimeout (timeout) {
method setFastTimeout (line 53201) | setFastTimeout (callback, delay, arg) {
method clearFastTimeout (line 53210) | clearFastTimeout (timeout) {
method now (line 53218) | now () {
method tick (line 53228) | tick (delay = 0) {
method reset (line 53239) | reset () {
class Cache (line 53287) | class Cache {
method constructor (line 53294) | constructor () {
method match (line 53303) | async match (request, options = {}) {
method matchAll (line 53321) | async matchAll (request = undefined, options = {}) {
method add (line 53331) | async add (request) {
method addAll (line 53349) | async addAll (requests) {
method put (line 53519) | async put (request, response) {
method delete (line 53650) | async delete (request, options = {}) {
method keys (line 53716) | async keys (request = undefined, options = {}) {
method #batchCacheOperations (line 53796) | #batchCacheOperations (operations) {
method #queryCache (line 53934) | #queryCache (requestQuery, options, targetStorage) {
method #requestMatchesCachedItem (line 53958) | #requestMatchesCachedItem (requestQuery, request, response = null, opt...
method #internalMatchAll (line 54005) | #internalMatchAll (request, options, maxResponses = Infinity) {
class CacheStorage (line 54134) | class CacheStorage {
method constructor (line 54141) | constructor () {
method match (line 54149) | async match (request, options = {}) {
method has (line 54186) | async has (cacheName) {
method open (line 54204) | async open (cacheName) {
method delete (line 54238) | async delete (cacheName) {
method keys (line 54253) | async keys () {
function urlEquals (line 54313) | function urlEquals (A, B, excludeFragment = false) {
function getFieldValues (line 54325) | function getFieldValues (header) {
function getCookies (line 54398) | function getCookies (headers) {
function deleteCookie (line 54425) | function deleteCookie (headers, name, attributes) {
function getSetCookies (line 54448) | function getSetCookies (headers) {
function setCookie (line 54467) | function setCookie (headers, cookie) {
function parseSetCookie (line 54578) | function parseSetCookie (header) {
function parseUnparsedAttributes (line 54654) | function parseUnparsedAttributes (unparsedAttributes, cookieAttributeLis...
function isCTLExcludingHtab (line 54896) | function isCTLExcludingHtab (value) {
function validateCookieName (line 54920) | function validateCookieName (name) {
function validateCookieValue (line 54958) | function validateCookieValue (value) {
function validateCookiePath (line 54991) | function validateCookiePath (path) {
function validateCookieDomain (line 55010) | function validateCookieDomain (domain) {
function toIMFDate (line 55073) | function toIMFDate (date) {
function validateCookieMaxAge (line 55088) | function validateCookieMaxAge (maxAge) {
function stringify (line 55098) | function stringify (cookie) {
class EventSourceStream (line 55222) | class EventSourceStream extends Transform {
method constructor (line 55263) | constructor (options = {}) {
method _transform (line 55282) | _transform (chunk, _encoding, callback) {
method parseLine (line 55464) | parseLine (line, event) {
method processEvent (line 55543) | processEvent (event) {
method clearEvent (line 55565) | clearEvent () {
class EventSource (line 55661) | class EventSource extends EventTarget {
method constructor (line 55689) | constructor (url, eventSourceInitDict = {}) {
method readyState (line 55782) | get readyState () {
method url (line 55791) | get url () {
method withCredentials (line 55799) | get withCredentials () {
method #connect (line 55803) | #connect () {
method #reconnect (line 55907) | async #reconnect () {
method close (line 55952) | close () {
method onopen (line 55961) | get onopen () {
method onopen (line 55965) | set onopen (fn) {
method onmessage (line 55978) | get onmessage () {
method onmessage (line 55982) | set onmessage (fn) {
method onerror (line 55995) | get onerror () {
method onerror (line 55999) | set onerror (fn) {
function isValidLastEventId (line 56081) | function isValidLastEventId (value) {
function isASCIINumber (line 56091) | function isASCIINumber (value) {
function delay (line 56100) | function delay (ms) {
function noop (line 56151) | function noop () {}
function extractBody (line 56166) | function extractBody (object, keepalive = false) {
function safelyExtractBody (line 56392) | function safelyExtractBody (object, keepalive = false) {
function cloneBody (line 56409) | function cloneBody (instance, body) {
function throwIfAborted (line 56428) | function throwIfAborted (state) {
function bodyMixinMethods (line 56434) | function bodyMixinMethods (instance) {
function mixinBody (line 56544) | function mixinBody (prototype) {
function consumeBody (line 56554) | async function consumeBody (object, convertBytesToJSValue, instance) {
function bodyUnusable (line 56599) | function bodyUnusable (object) {
function parseJSONFromBytes (line 56612) | function parseJSONFromBytes (bytes) {
function bodyMimeType (line 56620) | function bodyMimeType (requestOrResponse) {
function dataURLProcessor (line 56807) | function dataURLProcessor (dataURL) {
function URLSerializer (line 56909) | function URLSerializer (url, excludeFragment = false) {
function collectASequenceOfCodePoints (line 56932) | function collectASequenceOfCodePoints (condition, input, position) {
function collectASequenceOfCodePointsFast (line 56956) | function collectASequenceOfCodePointsFast (char, input, position) {
function stringPercentDecode (line 56971) | function stringPercentDecode (input) {
function isHexCharByte (line 56982) | function isHexCharByte (byte) {
function hexByteToNumber (line 56990) | function hexByteToNumber (byte) {
function percentDecode (line 57003) | function percentDecode (input) {
function parseMIMEType (line 57046) | function parseMIMEType (input) {
function forgivingBase64 (line 57219) | function forgivingBase64 (data) {
function collectAnHTTPQuotedString (line 57263) | function collectAnHTTPQuotedString (input, position, extractValue) {
function serializeAMimeType (line 57338) | function serializeAMimeType (mimeType) {
function isHTTPWhiteSpace (line 57383) | function isHTTPWhiteSpace (char) {
function removeHTTPWhitespace (line 57394) | function removeHTTPWhitespace (str, leading = true, trailing = true) {
function isASCIIWhitespace (line 57402) | function isASCIIWhitespace (char) {
function removeASCIIWhitespace (line 57413) | function removeASCIIWhitespace (str, leading = true, trailing = true) {
function removeChars (line 57424) | function removeChars (str, leading, trailing, predicate) {
function isomorphicDecode (line 57444) | function isomorphicDecode (input) {
function minimizeSupportedMimeType (line 57467) | function minimizeSupportedMimeType (mimeType) {
class CompatWeakRef (line 57544) | class CompatWeakRef {
method constructor (line 57545) | constructor (value) {
method deref (line 57549) | deref () {
class CompatFinalizer (line 57556) | class CompatFinalizer {
method constructor (line 57557) | constructor (finalizer) {
method register (line 57561) | register (dispatcher, key) {
method unregister (line 57571) | unregister (key) {}
class FileLike (line 57601) | class FileLike {
method constructor (line 57602) | constructor (blobLike, fileName, options = {}) {
method stream (line 57649) | stream (...args) {
method arrayBuffer (line 57655) | arrayBuffer (...args) {
method slice (line 57661) | slice (...args) {
method text (line 57667) | text (...args) {
method size (line 57673) | get size () {
method type (line 57679) | get type () {
method name (line 57685) | get name () {
method lastModified (line 57691) | get lastModified () {
method [Symbol.toStringTag] (line 57697) | get [Symbol.toStringTag] () {
function isFileLike (line 57707) | function isFileLike (object) {
function isAsciiString (line 57748) | function isAsciiString (chars) {
function validateBoundary (line 57761) | function validateBoundary (boundary) {
function multipartFormDataParser (line 57795) | function multipartFormDataParser (input, mimeType) {
function parseMultipartFormDataHeaders (line 57947) | function parseMultipartFormDataHeaders (input, position) {
function parseMultipartFormDataName (line 58109) | function parseMultipartFormDataName (input, position) {
function collectASequenceOfBytes (line 58146) | function collectASequenceOfBytes (condition, input, position) {
function removeChars (line 58163) | function removeChars (buf, leading, trailing, predicate) {
function bufferStartsWith (line 58184) | function bufferStartsWith (buffer, start, position) {
class FormData (line 58224) | class FormData {
method constructor (line 58225) | constructor (form) {
method append (line 58239) | append (name, value, filename = undefined) {
method delete (line 58269) | delete (name) {
method get (line 58282) | get (name) {
method getAll (line 58302) | getAll (name) {
method has (line 58319) | has (name) {
method set (line 58332) | set (name, value, filename = undefined) {
method [nodeUtil.inspect.custom] (line 58376) | [nodeUtil.inspect.custom] (depth, options) {
function makeEntry (line 58423) | function makeEntry (name, value, filename) {
function getGlobalOrigin (line 58476) | function getGlobalOrigin () {
function setGlobalOrigin (line 58480) | function setGlobalOrigin (newOrigin) {
function isHTTPWhiteSpaceCharCode (line 58539) | function isHTTPWhiteSpaceCharCode (code) {
function headerValueNormalize (line 58547) | function headerValueNormalize (potentialValue) {
function fill (line 58559) | function fill (headers, object) {
function appendHeader (line 58599) | function appendHeader (headers, name, value) {
function compareHeaderName (line 58639) | function compareHeaderName (a, b) {
class HeadersList (line 58643) | class HeadersList {
method constructor (line 58647) | constructor (init) {
method contains (line 58663) | contains (name, isLowerCase) {
method clear (line 58671) | clear () {
method append (line 58683) | append (name, value, isLowerCase) {
method set (line 58713) | set (name, value, isLowerCase) {
method delete (line 58733) | delete (name, isLowerCase) {
method get (line 58750) | get (name, isLowerCase) {
method entries (line 58765) | get entries () {
method rawValues (line 58777) | rawValues () {
method entriesList (line 58781) | get entriesList () {
method toSortedArray (line 58800) | toSortedArray () {
method [Symbol.iterator] (line 58758) | * [Symbol.iterator] () {
class Headers (line 58874) | class Headers {
method constructor (line 58878) | constructor (init = undefined) {
method append (line 58900) | append (name, value) {
method delete (line 58913) | delete (name) {
method get (line 58957) | get (name) {
method has (line 58980) | has (name) {
method set (line 59003) | set (name, value) {
method getSetCookie (line 59051) | getSetCookie () {
method [kHeadersSortedMap] (line 59068) | get [kHeadersSortedMap] () {
method getHeadersGuard (line 59125) | static getHeadersGuard (o) {
method setHeadersGuard (line 59129) | static setHeadersGuard (o, guard) {
method getHeadersList (line 59133) | static getHeadersList (o) {
method setHeadersList (line 59137) | static setHeadersList (o, list) {
method [util.inspect.custom] (line 59119) | [util.inspect.custom] (depth, options) {
class Fetch (line 59288) | class Fetch extends EE {
method constructor (line 59289) | constructor (dispatcher) {
method terminate (line 59298) | terminate (reason) {
method abort (line 59309) | abort (error) {
function handleFetchDone (line 59335) | function handleFetchDone (response) {
function fetch (line 59340) | function fetch (input, init = undefined) {
function finalizeAndReportTiming (line 59467) | function finalizeAndReportTiming (response, initiatorType = 'other') {
function abortFetch (line 59533) | function abortFetch (p, request, responseObject, error) {
function fetching (line 59574) | function fetching ({
function mainFetch (line 59731) | async function mainFetch (fetchParams, recursive = false) {
function schemeFetch (line 59983) | function schemeFetch (fetchParams) {
function finalizeResponse (line 60180) | function finalizeResponse (fetchParams, response) {
function fetchFinale (line 60193) | function fetchFinale (fetchParams, response) {
function httpFetch (line 60320) | async function httpFetch (fetchParams) {
function httpRedirectFetch (line 60423) | function httpRedirectFetch (fetchParams, response) {
function httpNetworkOrCacheFetch (line 60567) | async function httpNetworkOrCacheFetch (
function httpNetworkFetch (line 60897) | async function httpNetworkFetch (
function buildAbort (line 61533) | function buildAbort (acRef) {
class Request (line 61574) | class Request {
method constructor (line 44428) | constructor (origin, {
method onBodySent (line 44596) | onBodySent (chunk) {
method onRequestSent (line 44606) | onRequestSent () {
method onConnect (line 44620) | onConnect (abort) {
method onResponseStarted (line 44632) | onResponseStarted () {
method onHeaders (line 44636) | onHeaders (statusCode, headers, resume, statusText) {
method onData (line 44651) | onData (chunk) {
method onUpgrade (line 44663) | onUpgrade (statusCode, headers, socket) {
method onComplete (line 44670) | onComplete (trailers) {
method onError (line 44688) | onError (error) {
method onFinally (line 44703) | onFinally () {
method addHeader (line 44715) | addHeader (key, value) {
method constructor (line 61576) | constructor (input, init = {}) {
method method (line 62075) | get method () {
method url (line 62083) | get url () {
method headers (line 62093) | get headers () {
method destination (line 62102) | get destination () {
method referrer (line 62114) | get referrer () {
method referrerPolicy (line 62136) | get referrerPolicy () {
method mode (line 62146) | get mode () {
method credentials (line 62156) | get credentials () {
method cache (line 62164) | get cache () {
method redirect (line 62175) | get redirect () {
method integrity (line 62185) | get integrity () {
method keepalive (line 62195) | get keepalive () {
method isReloadNavigation (line 62204) | get isReloadNavigation () {
method isHistoryNavigation (line 62214) | get isHistoryNavigation () {
method signal (line 62225) | get signal () {
method body (line 62232) | get body () {
method bodyUsed (line 62238) | get bodyUsed () {
method duplex (line 62244) | get duplex () {
method clone (line 62251) | clone () {
method [nodeUtil.inspect.custom] (line 62286) | [nodeUtil.inspect.custom] (depth, options) {
function makeRequest (line 62318) | function makeRequest (init) {
function cloneRequest (line 62364) | function cloneRequest (request) {
function fromInnerRequest (line 62387) | function fromInnerRequest (innerRequest, signal, guard) {
class Response (line 62570) | class Response {
method error (line 62572) | static error () {
method json (line 62582) | static json (data, init = {}) {
method redirect (line 62609) | static redirect (url, status = 302) {
method constructor (line 62649) | constructor (body = null, init = {}) {
method type (line 62685) | get type () {
method url (line 62693) | get url () {
method redirected (line 62711) | get redirected () {
method status (line 62720) | get status () {
method ok (line 62728) | get ok () {
method statusText (line 62737) | get statusText () {
method headers (line 62746) | get headers () {
method body (line 62753) | get body () {
method bodyUsed (line 62759) | get bodyUsed () {
method clone (line 62766) | clone () {
method [nodeUtil.inspect.custom] (line 62790) | [nodeUtil.inspect.custom] (depth, options) {
function cloneResponse (line 62839) | function cloneResponse (response) {
function makeResponse (line 62865) | function makeResponse (init) {
function makeNetworkError (line 62884) | function makeNetworkError (reason) {
function isNetworkError (line 62897) | function isNetworkError (response) {
function makeFilteredResponse (line 62906) | function makeFilteredResponse (response, state) {
function filterResponse (line 62925) | function filterResponse (response, type) {
function makeAppropriateNetworkError (line 62979) | function makeAppropriateNetworkError (fetchParams, err = null) {
function initializeResponse (line 62991) | function initializeResponse (response, init, body) {
function fromInnerResponse (line 63050) | function fromInnerResponse (innerResponse, guard) {
function responseURL (line 63200) | function responseURL (response) {
function responseLocationURL (line 63210) | function responseLocationURL (response, requestFragment) {
function isValidEncodedURL (line 63247) | function isValidEncodedURL (url) {
function normalizeBinaryStringToUtf8 (line 63267) | function normalizeBinaryStringToUtf8 (value) {
function requestCurrentURL (line 63272) | function requestCurrentURL (request) {
function requestBadPort (line 63276) | function requestBadPort (request) {
function isErrorLike (line 63290) | function isErrorLike (object) {
function isValidReasonPhrase (line 63303) | function isValidReasonPhrase (statusText) {
function isValidHeaderValue (line 63331) | function isValidHeaderValue (potentialValue) {
function setRequestReferrerPolicyOnRedirect (line 63346) | function setRequestReferrerPolicyOnRedirect (request, actualResponse) {
function crossOriginResourcePolicyCheck (line 63386) | function crossOriginResourcePolicyCheck () {
function corsCheck (line 63392) | function corsCheck () {
function TAOCheck (line 63398) | function TAOCheck () {
function appendFetchMetadata (line 63403) | function appendFetchMetadata (httpRequest) {
function appendRequestOriginHeader (line 63429) | function appendRequestOriginHeader (request) {
function coarsenTime (line 63484) | function coarsenTime (timestamp, crossOriginIsolatedCapability) {
function clampAndCoarsenConnectionTimingInfo (line 63490) | function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defa...
function coarsenedSharedCurrentTime (line 63513) | function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {
function createOpaqueTimingInfo (line 63518) | function createOpaqueTimingInfo (timingInfo) {
function makePolicyContainer (line 63535) | function makePolicyContainer () {
function clonePolicyContainer (line 63543) | function clonePolicyContainer (policyContainer) {
function determineRequestsReferrer (line 63550) | function determineRequestsReferrer (request) {
function stripURLForReferrer (line 63649) | function stripURLForReferrer (url, originOnly) {
function isURLPotentiallyTrustworthy (line 63682) | function isURLPotentiallyTrustworthy (url) {
function bytesMatch (line 63728) | function bytesMatch (bytes, metadataList) {
function parseMetadata (line 63800) | function parseMetadata (metadata) {
function getStrongestMetadata (line 63850) | function getStrongestMetadata (metadataList) {
function filterMetadataListByAlgorithm (line 63879) | function filterMetadataListByAlgorithm (metadataList, algorithm) {
function compareBase64Mixed (line 63904) | function compareBase64Mixed (actualValue, expectedValue) {
function tryUpgradeRequestToAPotentiallyTrustworthyURL (line 63924) | function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
function sameOrigin (line 63933) | function sameOrigin (A, B) {
function createDeferredPromise (line 63949) | function createDeferredPromise () {
function isAborted (line 63960) | function isAborted (fetchParams) {
function isCancelled (line 63964) | function isCancelled (fetchParams) {
function normalizeMethod (line 63973) | function normalizeMethod (method) {
function serializeJavascriptValueToJSONString (line 63978) | function serializeJavascriptValueToJSONString (value) {
function createIterator (line 64004) | function createIterator (name, kInternalIterator, keyIndex = 0, valueInd...
function iteratorMixin (line 64140) | function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, v...
function fullyReadBody (line 64204) | async function fullyReadBody (body, processBody, processBodyError) {
function isReadableStreamLike (line 64236) | function isReadableStreamLike (stream) {
function readableStreamClose (line 64246) | function readableStreamClose (controller) {
function isomorphicEncode (line 64264) | function isomorphicEncode (input) {
function readAllBytes (line 64279) | async function readAllBytes (reader) {
function urlIsLocal (line 64309) | function urlIsLocal (url) {
function urlHasHttpsScheme (line 64321) | function urlHasHttpsScheme (url) {
function urlIsHttpHttpsScheme (line 64340) | function urlIsHttpHttpsScheme (url) {
function simpleRangeHeaderValue (line 64353) | function simpleRangeHeaderValue (value, allowWhitespace) {
function buildContentRange (line 64486) | function buildContentRange (rangeStart, rangeEnd, fullLength) {
class InflateStream (line 64514) | class InflateStream extends Transform {
method constructor (line 64518) | constructor (zlibOptions) {
method _transform (line 64523) | _transform (chunk, encoding, callback) {
method _final (line 64541) | _final (callback) {
function createInflate (line 64554) | function createInflate (zlibOptions) {
function extractMimeType (line 64562) | function extractMimeType (headers) {
function gettingDecodingSplitting (line 64626) | function gettingDecodingSplitting (value) {
function getDecodeSplit (line 64693) | function getDecodeSplit (name, list) {
function utf8DecodeBytes (line 64712) | function utf8DecodeBytes (buffer) {
class EnvironmentSettingsObjectBase (line 64734) | class EnvironmentSettingsObjectBase {
method baseUrl (line 64735) | get baseUrl () {
method origin (line 64739) | get origin () {
class EnvironmentSettingsObject (line 64746) | class EnvironmentSettingsObject {
function getEncoding (line 65522) | function getEncoding (label) {
class FileReader (line 65831) | class FileReader extends EventTarget {
method constructor (line 65832) | constructor () {
method readAsArrayBuffer (line 65852) | readAsArrayBuffer (blob) {
method readAsBinaryString (line 65868) | readAsBinaryString (blob) {
method readAsText (line 65885) | readAsText (blob, encoding = undefined) {
method readAsDataURL (line 65905) | readAsDataURL (blob) {
method abort (line 65920) | abort () {
method readyState (line 65957) | get readyState () {
method result (line 65970) | get result () {
method error (line 65981) | get error () {
method onloadend (line 65989) | get onloadend () {
method onloadend (line 65995) | set onloadend (fn) {
method onerror (line 66010) | get onerror () {
method onerror (line 66016) | set onerror (fn) {
method onloadstart (line 66031) | get onloadstart () {
method onloadstart (line 66037) | set onloadstart (fn) {
method onprogress (line 66052) | get onprogress () {
method onprogress (line 66058) | set onprogress (fn) {
method onload (line 66073) | get onload () {
method onload (line 66079) | set onload (fn) {
method onabort (line 66094) | get onabort () {
method onabort (line 66100) | set onabort (fn) {
class ProgressEvent (line 66175) | class ProgressEvent extends Event {
method constructor (line 66176) | constructor (type, eventInitDict = {}) {
method lengthComputable (line 66189) | get lengthComputable () {
method loaded (line 66195) | get loaded () {
method total (line 66201) | get total () {
function readOperation (line 66300) | function readOperation (fr, blob, type, encodingName) {
function fireAProgressEvent (line 66466) | function fireAProgressEvent (e, reader) {
function packageData (line 66484) | function packageData (bytes, type, mimeType, encodingName) {
function decode (line 66586) | function decode (ioQueue, encoding) {
function BOMSniffing (line 66618) | function BOMSniffing (ioQueue) {
function combineByteSequences (line 66642) | function combineByteSequences (sequences) {
function establishWebSocketConnection (line 66705) | function establishWebSocketConnection (url, protocols, client, ws, onEst...
function closeWebSocketConnection (line 66888) | function closeWebSocketConnection (ws, code, reason, reasonByteLength) {
function onSocketData (line 66953) | function onSocketData (chunk) {
function onSocketClose (line 66963) | function onSocketClose () {
function onSocketError (line 67024) | function onSocketError (error) {
class MessageEvent (line 67132) | class MessageEvent extends Event {
method constructor (line 67135) | constructor (type, eventInitDict = {}) {
method data (line 67154) | get data () {
method origin (line 67160) | get origin () {
method lastEventId (line 67166) | get lastEventId () {
method source (line 67172) | get source () {
method ports (line 67178) | get ports () {
method initMessageEvent (line 67188) | initMessageEvent (
method createFastMessageEvent (line 67207) | static createFastMessageEvent (type, init) {
class CloseEvent (line 67225) | class CloseEvent extends Event {
method constructor (line 67228) | constructor (type, eventInitDict = {}) {
method wasClean (line 67241) | get wasClean () {
method code (line 67247) | get code () {
method reason (line 67253) | get reason () {
class ErrorEvent (line 67261) | class ErrorEvent extends Event {
method constructor (line 67264) | constructor (type, eventInitDict) {
method message (line 67277) | get message () {
method filename (line 67283) | get filename () {
method lineno (line 67289) | get lineno () {
method colno (line 67295) | get colno () {
method error (line 67301) | get error () {
function generateMask (line 67485) | function generateMask () {
class WebsocketFrameSend (line 67493) | class WebsocketFrameSend {
method constructor (line 67497) | constructor (data) {
method createFrame (line 67501) | createFrame (opcode) {
class PerMessageDeflate (line 67576) | class PerMessageDeflate {
method constructor (line 67591) | constructor (extensions) {
method decompress (line 67596) | decompress (chunk, fin, callback) {
class ByteParser (line 67715) | class ByteParser extends Writable {
method constructor (line 67732) | constructor (ws, extensions) {
method _write (line 67747) | _write (chunk, _, callback) {
method run (line 67760) | run (callback) {
method consume (line 67951) | consume (n) {
method parseCloseBody (line 67988) | parseCloseBody (data) {
method parseControlFrame (line 68028) | parseControlFrame (body) {
method closingInfo (line 68108) | get closingInfo () {
class SendQueue (line 68140) | class SendQueue {
method constructor (line 68154) | constructor (socket) {
method add (line 68158) | add (item, cb, hint) {
method #run (line 68193) | async #run () {
function createFrame (line 68211) | function createFrame (data, hint) {
function toBuffer (line 68215) | function toBuffer (data, hint) {
function isConnecting (line 68270) | function isConnecting (ws) {
function isEstablished (line 68280) | function isEstablished (ws) {
function isClosing (line 68291) | function isClosing (ws) {
function isClosed (line 68302) | function isClosed (ws) {
function fireEvent (line 68313) | function fireEvent (e, target, eventFactory = (type, init) => new Event(...
function websocketMessageReceived (line 68335) | function websocketMessageReceived (ws, type, data) {
function toArrayBuffer (line 68376) | function toArrayBuffer (buffer) {
function isValidSubprotocol (line 68389) | function isValidSubprotocol (protocol) {
function isValidStatusCode (line 68435) | function isValidStatusCode (code) {
function failWebsocketConnection (line 68451) | function failWebsocketConnection (ws, reason) {
function isControlFrame (line 68473) | function isControlFrame (opcode) {
function isContinuationFrame (line 68481) | function isContinuationFrame (opcode) {
function isTextBinaryFrame (line 68485) | function isTextBinaryFrame (opcode) {
function isValidOpcode (line 68489) | function isValidOpcode (opcode) {
function parseExtensions (line 68499) | function parseExtensions (extensions) {
function isValidClientWindowBits (line 68523) | function isValidClientWindowBits (value) {
class WebSocket (line 68617) | class WebSocket extends EventTarget {
method constructor (line 68636) | constructor (url, protocols = []) {
method close (line 68742) | close (code = undefined, reason = undefined) {
method send (line 68789) | send (data) {
method readyState (line 68883) | get readyState () {
method bufferedAmount (line 68890) | get bufferedAmount () {
method url (line 68896) | get url () {
method extensions (line 68903) | get extensions () {
method protocol (line 68909) | get protocol () {
method onopen (line 68915) | get onopen () {
method onopen (line 68921) | set onopen (fn) {
method onerror (line 68936) | get onerror () {
method onerror (line 68942) | set onerror (fn) {
method onclose (line 68957) | get onclose () {
method onclose (line 68963) | set onclose (fn) {
method onmessage (line 68978) | get onmessage () {
method onmessage (line 68984) | set onmessage (fn) {
method binaryType (line 68999) | get binaryType () {
method binaryType (line 69005) | set binaryType (type) {
method #onConnectionEstablished (line 69018) | #onConnectionEstablished (response, parsedExtensions) {
function onParserDrain (line 69151) | function onParserDrain () {
function onParserError (line 69155) | function onParserError (err) {
class SSHError (line 69543) | class SSHError extends Error {
method constructor (line 69544) | constructor(message, code = null) {
function unixifyPath (line 69550) | function unixifyPath(path) {
function readFile (line 69556) | async function readFile(filePath) {
function makeDirectoryWithSftp (line 69569) | async function makeDirectoryWithSftp(path, sftp) {
class NodeSSH (line 69615) | class NodeSSH {
method constructor (line 69616) | constructor() {
method getConnection (line 69619) | getConnection() {
method connect (line 69626) | async connect(givenConfig) {
method isConnected (line 69707) | isConnected() {
method requestShell (line 69710) | async requestShell(options) {
method withShell (line 69731) | async withShell(callback, options) {
method requestSFTP (line 69741) | async requestSFTP() {
method withSFTP (line 69756) | async withSFTP(callback) {
method execCommand (line 69766) | async execCommand(givenCommand, options = {}) {
method exec (line 69841) | async exec(command, parameters, options = {}) {
method mkdir (line 69862) | async mkdir(path, method = 'sftp', givenSftp = null) {
method getFile (line 69887) | async getFile(localFile, remoteFile, givenSftp = null, transferOptions...
method putFile (line 69911) | async putFile(localFile, remoteFile, givenSftp = null, transferOptions...
method putFiles (line 69947) | async putFiles(files, { concurrency = DEFAULT_CONCURRENCY, sftp: given...
method putDirectory (line 69983) | async putDirectory(localDirectory, remoteDirectory, { concurrency = DE...
method getDirectory (line 70045) | async getDirectory(localDirectory, remoteDirectory, { concurrency = DE...
method forwardIn (line 70141) | forwardIn(remoteAddr, remotePort, onConnection) {
method forwardOut (line 70172) | forwardOut(srcIP, srcPort, dstIP, dstPort) {
method forwardInStreamLocal (line 70184) | forwardInStreamLocal(socketPath, onConnection) {
method forwardOutStreamLocal (line 70215) | forwardOutStreamLocal(socketPath) {
method dispose (line 70227) | dispose() {
function PromiseQueue (line 70246) | function PromiseQueue(_a) {
function adopt (line 70342) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 70344) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 70345) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 70346) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function verb (line 70353) | function verb(n) { return function (v) { return step([n, v]); }; }
function step (line 70354) | function step(op) {
function scanDirectoryInternal (line 70418) | function scanDirectoryInternal(_a) {
function scanDirectory (line 70463) | function scanDirectory(path, _a) {
function __nccwpck_require__ (line 70527) | function __nccwpck_require__(moduleId) {
FILE: lib/index.js
function adopt (line 36) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 38) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 39) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 40) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
function run (line 55) | function run() {
function connect (line 105) | function connect() {
function scp (line 133) | function scp(ssh_1, local_1, remote_1) {
function putDirectory (line 157) | function putDirectory(ssh_1, local_1, remote_1) {
function cleanDirectory (line 190) | function cleanDirectory(ssh_1, remote_1) {
function putFile (line 205) | function putFile(ssh_1, local_1, remote_1) {
function isDirectory (line 220) | function isDirectory(path) {
function putMany (line 223) | function putMany(array, asyncFunction) {
FILE: src/index.ts
function run (line 9) | async function run() {
function connect (line 77) | async function connect(
function scp (line 113) | async function scp(
function putDirectory (line 151) | async function putDirectory(
function cleanDirectory (line 197) | async function cleanDirectory(ssh: NodeSSH, remote: string, verbose = tr...
function putFile (line 211) | async function putFile(
function isDirectory (line 229) | function isDirectory(path: string) {
function putMany (line 233) | async function putMany<T>(
Condensed preview — 17 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,356K chars).
[
{
"path": ".github/workflows/scp-example-workflow.yml",
"chars": 2473,
"preview": "name: scp copy folder to remote via SSH\n\non:\n push:\n branches: ['master']\n workflow_dispatch:\n\njobs:\n build:\n r"
},
{
"path": ".gitignore",
"chars": 17,
"preview": "node_modules\n.env"
},
{
"path": ".node-version",
"chars": 8,
"preview": "24.14.0\n"
},
{
"path": ".prettierignore",
"chars": 24,
"preview": "dist/\nlib/\nnode_modules/"
},
{
"path": ".prettierrc.json",
"chars": 224,
"preview": "{\n \"printWidth\": 80,\n \"tabWidth\": 2,\n \"useTabs\": false,\n \"semi\": true,\n \"singleQuote\": true,\n \"trailin"
},
{
"path": "LICENSE",
"chars": 1066,
"preview": "MIT License\n\nCopyright (c) 2018 fivethree\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n"
},
{
"path": "action.yml",
"chars": 1956,
"preview": "name: Copy via ssh\nauthor: garygrossgarten\ndescription: Github Action to copy a folder to a remote server using SSH\ninpu"
},
{
"path": "dist/index.js",
"chars": 2251059,
"preview": "/******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 1188:\n/***/ (function(__unused_webpa"
},
{
"path": "lib/index.js",
"chars": 9923,
"preview": "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if ("
},
{
"path": "lib/keyboard.js",
"chars": 386,
"preview": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.keyboardFunction = void 0;\nconst ke"
},
{
"path": "package.json",
"chars": 912,
"preview": "{\n \"name\": \"@garygrossgarten/github-action-scp\",\n \"version\": \"0.9.0\",\n \"description\": \"Copy a folder to a remote serv"
},
{
"path": "readme.md",
"chars": 2791,
"preview": "# GitHub Action SCP\n\nSimple GitHub Action to copy a folder or single file to a remote server using SSH. This is working "
},
{
"path": "src/index.ts",
"chars": 6299,
"preview": "import * as core from '@actions/core';\nimport {Config, NodeSSH} from 'node-ssh';\nimport fsPath from 'path';\nimport {SFTP"
},
{
"path": "src/keyboard.ts",
"chars": 244,
"preview": "export const keyboardFunction = password => (\n name,\n instructions,\n instructionsLang,\n prompts,\n finish\n) => {\n i"
},
{
"path": "tsconfig.json",
"chars": 858,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"es6\", /* Specify ECMAScript target version: 'ES3' (defa"
}
]
// ... and 2 more files (download for full content)
About this extraction
This page contains the full source code of the garygrossgarten/github-action-scp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 17 files (2.2 MB), approximately 570.3k tokens, and a symbol index with 2029 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.