npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nestjs-svn

v1.0.3

Published

Nestjs SVN Module

Readme

NestJS SVN Module

A NestJS module for SVN (Subversion) that provides read/write operations to interact with SVN repositories.

⚠️ Warning

This module requires SVN (Subversion) to be installed on your system. Make sure SVN is installed and available in your PATH before using this module.

You can verify SVN installation by running:

svn --version

Platform Support

This module supports Windows, macOS, and Linux. The module automatically handles platform-specific differences in shell command execution and environment variables.

  • Windows: Uses double quotes for argument escaping (compatible with cmd.exe)
  • Unix/Linux/macOS: Uses single quotes for argument escaping (compatible with sh/bash)

⚠️ Windows Compatibility Notice

Windows environment has not been fully tested in real-world scenarios.

Current Windows compatibility implementation status:

  • Windows platform detection and path handling logic implemented
  • Windows shell escaping (double quotes) implemented
  • Logic validation completed through unit tests

However, the following have not been verified in actual Windows environments:

  • Actual SVN command execution on Windows
  • Various Windows shell environments (PowerShell, Git Bash, etc.)
  • Real Windows path handling and UNC paths
  • Windows environment variable configuration behavior

Recommendations:

  • Please report issues if you encounter problems when using this module on Windows
  • We welcome feedback from testing in actual Windows environments

Installation

npm install nestjs-svn
# or
pnpm add nestjs-svn
# or
yarn add nestjs-svn

Module Configuration

Basic Configuration (forRoot)

import { Module } from '@nestjs/common';
import { SvnModule } from 'nestjs-svn';

@Module({
  imports: [
    SvnModule.forRoot({
      username: 'your-username',
      password: 'your-password',
      repositoryUrl: 'https://svn.example.com/repo',
      trustServerCert: true,
      nonInteractive: true,
    }),
  ],
})
export class AppModule {}

Async Configuration (forRootAsync)

import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { SvnModule } from 'nestjs-svn';

@Module({
  imports: [
    SvnModule.forRootAsync({
      imports: [ConfigModule],
      useFactory: (configService: ConfigService) => ({
        username: configService.get('SVN_USERNAME'),
        password: configService.get('SVN_PASSWORD'),
        repositoryUrl: configService.get('SVN_REPO_URL'),
        trustServerCert: true,
      }),
      inject: [ConfigService],
    }),
  ],
})
export class AppModule {}

Usage

Service Injection

import { Injectable } from '@nestjs/common';
import { SvnService } from 'nestjs-svn';

@Injectable()
export class MyService {
  constructor(private readonly svnService: SvnService) {}

  async doSomething() {
    // Perform SVN operations
  }
}

Available Features

Read Operations

Operations that only query information or read files from the repository. These operations do not modify the repository or working copy.

  • info - Get repository information (returns SvnInfoResult | null)
  • status - Get working copy status (returns SvnStatusResult[])
  • log - Get commit logs (returns SvnLogEntry[])
  • list - List directory contents (returns string[])
  • cat - Read file contents (returns string)
  • diff - Get differences (returns string)
  • export - Export from repository (without creating working copy) (returns SvnCommandResult)

Write Operations

Operations that modify the repository or working copy, or create a local working copy.

  • checkout - Checkout repository (creates working copy) (returns SvnCommandResult)
  • update - Update working copy (returns SvnCommandResult)
  • add - Add files/directories (returns SvnCommandResult)
  • remove - Remove files/directories (returns SvnCommandResult)
  • commit - Commit changes (returns SvnCommandResult)
  • copy - Copy files/directories (returns SvnCommandResult)
  • move - Move/rename files/directories (returns SvnCommandResult)
  • mkdir - Create directory (returns SvnCommandResult)

Options

Common Options (SvnOptions)

interface SvnOptions {
  username?: string; // SVN username
  password?: string; // SVN password
  repositoryUrl?: string; // Repository URL (used for resolving relative paths)
  nonInteractive?: boolean; // Non-interactive mode (default: true)
  trustServerCert?: boolean; // Trust server certificate
  noAuthCache?: boolean; // Disable authentication cache
}

Using repositoryUrl Option

When using the repositoryUrl option, all paths are interpreted as relative paths within that repository URL. This allows you to use relative paths instead of absolute URLs.

License

MIT