Lines 1-26javascript
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
5Object.defineProperty(exports, "__esModule", { value: true });
6exports.SherpaOnnxHelper = void 0;
7const node_child_process_1 = require("node:child_process");
8const node_fs_1 = __importDefault(require("node:fs"));
9const node_path_1 = __importDefault(require("node:path"));
10class SherpaOnnxHelper {
11 static async fetchDownloadableTtsModels(commandFullName) {
12 const httpRequestOptions = process.env.GITHUB_ACCESS_TOKEN
13 ? { headers: { "Authorization": `Bearer ${process.env.GITHUB_ACCESS_TOKEN}` } }
15 const httpResponse = await fetch(`https://api.github.com/repos/k2-fsa/sherpa-onnx/releases/tags/tts-models`, httpRequestOptions);
16 if (httpResponse.status !== 200) {
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
lib/cli/actionify/helpers/sherpa-onnx/sherpa-onnx.helper.jsView on unpkg · L6 17 if ([403, 429].includes(httpResponse.status)) {
18 const isGithubRateLimitExceed = httpResponse.headers.get("x-ratelimit-remaining") === "0";
19 if (isGithubRateLimitExceed) {
20 const xRateLimitResetHeader = httpResponse.headers.get("x-ratelimit-reset");
21 const isUsingWindows = process.platform === "win32";
22 if (xRateLimitResetHeader) {
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
lib/cli/actionify/helpers/sherpa-onnx/sherpa-onnx.helper.jsView on unpkg · L6 23 const rateLimitResetUnixTimestamp = parseInt(xRateLimitResetHeader);
24 if (!isNaN(rateLimitResetUnixTimestamp)) {
25 const minutesToWait = Math.ceil((rateLimitResetUnixTimestamp - Date.now() / 1000) / 60);