
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@paparats/shared
Advanced tools
Shared utilities for Paparats MCP - path validation, gitignore filtering, language-aware exclude patterns
Shared utilities for Paparats MCP - path validation, gitignore filtering, and language-aware exclude patterns used by the server and CLI packages.
npm install @paparats/shared
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']
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);
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']);
This package provides shared utilities used by:
MIT
FAQs
Did you know?

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.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.