
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@copass/datasource-fs
Advanced tools
Filesystem data source driver for Copass — scans, watches, and pushes file events through the copass-id storage layer
Filesystem data source driver for Copass.
Implements BaseDataSource (from @copass/core) over the local
filesystem: register once, then scan, watch, and push file events through
the copass-id storage layer. Every byte is attributed to the underlying
DataSource record.
npm install @copass/datasource-fs @copass/core
FileSystemDataSourceOne call registers (or reuses) the data source and hands back a bound driver.
import { CopassClient } from '@copass/core';
import { FileSystemDataSource } from '@copass/datasource-fs';
const client = new CopassClient({
auth: { type: 'api-key', key: 'olk_...' },
});
const sandbox = await client.sandboxes.create({
name: 'repo-index',
owner_id: 'owner-uuid',
});
const fs = await FileSystemDataSource.create({
client,
sandboxId: sandbox.sandbox_id,
projectPath: '/path/to/project',
name: 'my-repo', // optional; defaults to basename(projectPath)
});
// One-shot full index
const summary = await fs.fullIndex({
onProgress: (msg) => console.log(msg),
});
console.log(`Indexed ${summary.indexed_count} files in ${summary.duration_ms}ms`);
// Continuous watching
await fs.start();
// Every file event is pushed via client.sources.ingest(sandboxId, sourceId, …)
// …
await fs.stop();
// Lifecycle pass-throughs inherited from BaseDataSource
await fs.pause();
await fs.resume();
await fs.disconnect();
If you need to orchestrate full index / watching yourself, the underlying primitives are exported directly:
import {
runFullIndex,
ProjectWatchRuntime,
scanProjectFiles,
diffFiles,
} from '@copass/datasource-fs';
const summary = await runFullIndex(client, {
projectPath: '/path/to/project',
sandboxId,
dataSourceId,
});
const watcher = new ProjectWatchRuntime(client, {
projectPath: '/path/to/project',
sandboxId,
dataSourceId,
});
await watcher.start();
const files = await scanProjectFiles('/path/to/project');
// Returns Record<relativePath, { mtimeMs, size, sha256 }>
MIT
FAQs
Filesystem data source driver for Copass — scans, watches, and pushes file events through the copass-id storage layer
The npm package @copass/datasource-fs receives a total of 95 weekly downloads. As such, @copass/datasource-fs popularity was classified as not popular.
We found that @copass/datasource-fs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.