Spamworldpro Mini Shell
Spamworldpro


Server : nginx/1.20.1
System : Linux ccpf-production-2021 5.4.0-148-generic #165-Ubuntu SMP Tue Apr 18 08:53:12 UTC 2023 x86_64
User : forge ( 1000)
PHP Version : 7.4.21
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/lib/node_modules/pm2/node_modules/get-uri/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/node_modules/pm2/node_modules/get-uri/dist/data.js
"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());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const debug_1 = __importDefault(require("debug"));
const stream_1 = require("stream");
const crypto_1 = require("crypto");
const data_uri_to_buffer_1 = __importDefault(require("data-uri-to-buffer"));
const notmodified_1 = __importDefault(require("./notmodified"));
const debug = debug_1.default('get-uri:data');
class DataReadable extends stream_1.Readable {
    constructor(hash, buf) {
        super();
        this.push(buf);
        this.push(null);
        this.hash = hash;
    }
}
/**
 * Returns a Readable stream from a "data:" URI.
 */
function get({ href: uri }, { cache }) {
    return __awaiter(this, void 0, void 0, function* () {
        // need to create a SHA1 hash of the URI string, for cacheability checks
        // in future `getUri()` calls with the same data URI passed in.
        const shasum = crypto_1.createHash('sha1');
        shasum.update(uri);
        const hash = shasum.digest('hex');
        debug('generated SHA1 hash for "data:" URI: %o', hash);
        // check if the cache is the same "data:" URI that was previously passed in.
        if (cache && cache.hash === hash) {
            debug('got matching cache SHA1 hash: %o', hash);
            throw new notmodified_1.default();
        }
        else {
            debug('creating Readable stream from "data:" URI buffer');
            const buf = data_uri_to_buffer_1.default(uri);
            return new DataReadable(hash, buf);
        }
    });
}
exports.default = get;
//# sourceMappingURL=data.js.map

Spamworldpro Mini