
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
ck-node24-wrapper
Advanced tools
A wrapper NPM module to abstract os-specific dependencies on @chilkat/ck-node24-* modules
A Wrapper NPM module to abstract os-specific dependencies on the NodeJS Chilkat libraries (@chilkat/ck-node24*).
This is a wrapper NPM module to abstract os-specific dependencies on the NodeJS Chilkat libraries (@chilkat/ck-node24-*).
NOTE: Chilkat libraries are not open source. Some are free to use, while others require a paid license. See the Chilkat website for details.
Freeware classes include: Cert, CertChain, CertStore, Csv, Pfx, PrivateKey, PublicKey, Spider, TrustedRoots, Upload, Xml, JsonObject, ...
Commercial classes include: Ssh, SFtp, Imap, Ftp2, Socket, Rest, OAuth2, Http, ...
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.
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");
}
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:
dependencies section of your package.json.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.prepare scriptIf you've added a "prepare" script as per the Getting Started section, then you can rerun the ck-install script manually:
npm run prepare
--save-optional flagYou 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.
See the open issues for a full list of proposed features (and known issues).
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!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Distributed under the MIT. See LICENSE.txt for more information.
Project Link: https://github.com/cunneen/ck-node24-wrapper
FAQs
A wrapper NPM module to abstract os-specific dependencies on @chilkat/ck-node24-* modules
The npm package ck-node24-wrapper receives a total of 1 weekly downloads. As such, ck-node24-wrapper popularity was classified as not popular.
We found that ck-node24-wrapper 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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.