🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@paparats/shared

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paparats/shared

Shared utilities for Paparats MCP - path validation, gitignore filtering, language-aware exclude patterns

latest
Source
npmnpm
Version
2.6.0
Version published
Weekly downloads
755
-24.42%
Maintainers
1
Weekly downloads
 
Created
Source

@paparats/shared

Shared utilities for Paparats MCP - path validation, gitignore filtering, and language-aware exclude patterns used by the server and CLI packages.

Install

npm install @paparats/shared

API

Path Validation

import { validateIndexingPaths } from '@paparats/shared';

// Rejects absolute paths and path traversal in indexing config
const errors = validateIndexingPaths(['src', '../etc/passwd']);
// errors: ['Path traversal not allowed: ../etc/passwd']

Gitignore Filtering

import { createGitignoreFilter, filterFilesByGitignore } from '@paparats/shared';

// Per-file check
const filter = createGitignoreFilter('/path/to/repo');
if (filter('node_modules/foo.js')) {
  // file is gitignored
}

// Bulk filter
const included = filterFilesByGitignore('/path/to/repo', allFiles);

Exclude Patterns

import {
  normalizeExcludePatterns,
  getDefaultExcludeForLanguages,
  LANGUAGE_EXCLUDE_DEFAULTS,
  COMMON_EXCLUDE,
  DEFAULT_EXCLUDE_BARE,
} from '@paparats/shared';

// Bare dir names become glob patterns: 'node_modules' -> '**/node_modules/**'
const patterns = normalizeExcludePatterns(['node_modules', 'dist']);

// Get default excludes for specific languages
const excludes = getDefaultExcludeForLanguages(['typescript', 'python']);

Part of Paparats MCP

This package provides shared utilities used by:

  • @paparats/cli - CLI tool for project indexing and setup
  • @paparats/server - MCP server with semantic code search (Docker image)

License

MIT

Keywords

mcp

FAQs

Package last updated on 03 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts