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 🙏

© 2024 – Pkg Stats / Ryan Hefner

system-restore

v1.0.4

Published

Create Windows System Restore Points using NodeJS.

Downloads

3

Readme

node-system-restore

Create a restore point on your Windows machine using NodeJS.

About the Project

This project uses a C# executable (WinRestorator.exe) to create System Restore points on Windows machines. The inspiration for this project is to provide a scriptable alternative to PowerShell for creating restore points on Windows machines.

Getting Started

If you decide that you are interested in contributing, please clone the repository and have a look around. Get to know the code, and how it was implemented. Constructive criticism is always desired, and meaningful contributions are greatly appreciated.

Brief Overview of npm Scripts

{
    "clean": "rimraf coverage bin tmp",
    "build": "tsc -p tsconfig.release.json",
    "watch": "tsc -w -p tsconfig.release.json",
    "lint": "tslint -t stylish --project \"tsconfig.json\"",
    "pretest": "npm run lint",
    "test": "npm run test-only",
    "test-only": "jest --coverage",
    "test:watch": "jest --watch",
    "package": "node ./build-scripts/package.js",
    "build-n-package": "npm run build && npm run package"
}
  1. clean - Clear directories that have artifacts.
  2. build - Compile the TypeScript code.
  3. watch - Watch *.tsc files for changes, and recompile.
  4. lint - Lint the TypeScript source.
  5. pretest - Lints the TypeScrpt source.
  6. test - Runs all unit tests.
  7. test-only - Runs all unit tests.
  8. test:watch - Watches all unit tests in spec folder.
  9. package - Calls nexe on the source by utilizing the package.js file. Generates SystemResore.exe.
  10. build-n-package - Builds and packages the source.

How to Use system-restore as a Module

The system-restore module export a single function called createRestorePoint. You can imoprt it using the following example as a baseline.

const { createRestorePoint } = require('system-restore');

createRestorePoint Information

/**
 * Creates a system restore point.
 * 
 * @param restorePointName The name of the restore point.
 * @param restorePointType The type of restore point to create
 */
createRestorePoint(restorePointName: string, restorePointType: string): boolean

Values for Restore Point Type

  • APPLICATION_INSTALL
  • APPLICATION_UNINSTALL
  • DEVICE_DRIVER_INSTALL
  • MODIFY_SETTINGS
  • CANCELLED_OPERATION

How to Use SystemRestore.exe

SystemRestore.exe is the EXE that is published when the package script is called. This is achieved using the nexe package, and includes the NodeJS runtime in the EXE.

Overall, the parameters for SystemRestore.exe are the same as the system-restore module. The parameters can be passed into SystemRestore.exe using the following command line arguments.

--restorePointName {String} The name of the restore point.

--restorePointType {String} The type of restore point to create.

SystemRestore.exe --restorePointName="Hello, world!" --restorePointType=APPLICATION_INSTALL

Values for Restore Point Type

  • APPLICATION_INSTALL
  • APPLICATION_UNINSTALL
  • DEVICE_DRIVER_INSTALL
  • MODIFY_SETTINGS
  • CANCELLED_OPERATION

Where to Find SystemRestore.exe

You can find the SystemRestore.exe artifact attached to the tags that correlate to the version numbers when the artifacts were generated. Go to the repository tags and find the SystemRestore.exe artifact attached to a tag.

A Note about Pull Requests

All pull requests will be thoughtfully considered, but not all pull requests will be accepted. This does not mean your idea/code/content was not good. It just means it is not right for the project.

A Note about Respect

All contributors in this repository are expected to demonstrate basic human kindness/respect/decency. It is NEVER ok to show disrespect to another individual in this workspace. Disrespect is a very broad term. In the simplest sense, if what you are going to say to someone, or contribute to the code does not add value, or is not conducive to the health of the project, or it is demeaning to an individual, you will be asked to refrain from contributing to the project going forward.

Questions/Comments/Concerns

Please use the issue trakcer to ask any questions, or to opine about something regarding the project.

Thank You

Thank you for checking out this repository. Your time and energy is greatly valued.