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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ck-node24-wrapper

v1.0.3

Published

A wrapper NPM module to abstract os-specific dependencies on @chilkat/ck-node24-* modules

Readme

A Wrapper NPM module to abstract os-specific dependencies on the NodeJS Chilkat libraries (@chilkat/ck-node24*).

Contributors Forks Stargazers Issues MIT

About The Project

This is a node module to provide an os-independent wrapper for the os-specific @chilkat/ck-node24-* modules.

So you can have this:

  • With Wrapper:

    import chilkat from "ck-node24-wrapper";

Instead of this:

  • Without Wrapper:

    const os = require('os');
    let chilkat;
    if (os.platform() == 'win32') {  
        if (os.arch() == 'ia32') {
            chilkat = require('@chilkat/ck-node11-win-ia32');
        } else {
            chilkat = require('@chilkat/ck-node11-win64'); 
        }
    } else if (os.platform() == 'linux') {
        if (os.arch() == 'arm') {
            chilkat = require('@chilkat/ck-node11-arm');
        } else if (os.arch() == 'x86') {
            chilkat = require('@chilkat/ck-node11-linux32');
        } else {
            chilkat = require('@chilkat/ck-node11-linux64');
        }
    } else if (os.platform() == 'darwin') {
        chilkat = require('@chilkat/ck-node11-macosx');
    }

It requires nodejs 24 or later.

NOTE : This is an ESM-only module.

Built With

  • Typescript
  • Mocha
  • NodeJS
  • NPM
  • GitHub
  • VSCode
  • Shields.io

Getting Started

Install this module into your project directory:

npm install ck-node24-wrapper --save

Add ck-install as a "prepare" script in your package.json:

"scripts": {
  "prepare": "ck-install"
}

Then import the module in your code:

import chilkat from "ck-node24-wrapper";

and use the chilkat object as you would normally; e.g.:

import chilkat from "ck-node24-wrapper";

const cert = new chilkat.Cert();
// Load any type of certificate (.cer, .p7b, .pem, etc.) by calling LoadFromFile.
const success = cert.LoadFromFile("qa_data/certs/sample_cert_a.cer");
if (success) {
  console.log("SubjectDN:" + cert.SubjectDN);

  console.log("Common Name:" + cert.SubjectCN);
  console.log("Issuer Common Name:" + cert.IssuerCN);

  console.log("Serial Number:" + cert.SerialNumber);

  console.log(cert.ExportCertPem());
} else {
  console.error("failed to load cert");
}

Issues When Updating Other Packages

When you use NPM (and probably yarn, pnpm etc) to add or update your dependencies, the package manager unfortunately will automatically remove your os-dependent installation of the chilkat library.

If that has happened, then when you run your program you'll see an error like this:

Error: Cannot find module '@chilkat/ck-node24-mac-universal'

This happens because this wrapper installs the appropriate library using the --no-save flag, which means that the package manager (NPM) will not add the library to your package.json file. Then, when the package manager performs another update, it notices the installed library that isn't in the package.json file, and removes it.

This wrapper avoids updating your package.json file, and does not make the assumption that your deployment OS environment is the same as your development OS environment (or even that you are using NPM to manage your other packages).

For example, you might be:

  • Authoring a NodeJS package that uses this wrapper. In that case, you want the consumers of your package to download the appropriate chilkat library for their environment. So you don't want the os-specific chilkat library in the dependencies section of your package.json.
  • Bundling a server application using webpack, parcel, tar, zip or some other packaging tool. The target environment might be different from your development environment, so we want the chilkat installer to run (via npm ci) in the target environment. For example, if your development machine is MacOS and your target machine is Linux, we don't want to include the @chilkat/ck-node24-mac-universal library and omit the appropriate linux one.

Solutions

Solution 1: Manually use the prepare script

If you've added a "prepare" script as per the Getting Started section, then you can rerun the ck-install script manually:

npm run prepare
Solution 2: Use the --save-optional flag

You can explicitly add the os-specific dependency for use on your own machine via the --save-optional flag:

npm install @chilkat/ck-node24-mac-universal --save-optional

That will add it to the optionalDependencies section of your package.json file, which will prevent the package manager from removing it. This will allow NPM to proceed if installation fails. You should note, however, that consumers of your package will be attempting to install that os-specific chilkat library without necessarily using it.

See the optionalDependencies section of the NPM website for more information.

Roadmap

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

License

Distributed under the MIT. See LICENSE.txt for more information.

Contact

Project Link: https://github.com/cunneen/ck-node24-wrapper

Acknowledgments