kopia lustrzana https://github.com/robinmoisson/staticrypt
display an error when node version is < 16
rodzic
f2f3e9e1b5
commit
5a8425387a
|
@ -2,7 +2,12 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const fs = require("fs");
|
// check node version before anything else
|
||||||
|
const nodeVersion = process.versions.node.split(".");
|
||||||
|
if (nodeVersion[0] < 16) {
|
||||||
|
console.log("ERROR: Node version 16 or higher is required.");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// parse .env file into process.env
|
// parse .env file into process.env
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
|
@ -11,7 +16,7 @@ const cryptoEngine = require("../lib/cryptoEngine.js");
|
||||||
const codec = require("../lib/codec.js");
|
const codec = require("../lib/codec.js");
|
||||||
const { generateRandomSalt } = cryptoEngine;
|
const { generateRandomSalt } = cryptoEngine;
|
||||||
const { encode } = codec.init(cryptoEngine);
|
const { encode } = codec.init(cryptoEngine);
|
||||||
const { parseCommandLineArguments, buildStaticryptJS, isOptionSetByUser, genFile, getPassword, getFileContent, getSalt,
|
const { parseCommandLineArguments, buildStaticryptJS, isOptionSetByUser, genFile, getFileContent,
|
||||||
getValidatedSalt,
|
getValidatedSalt,
|
||||||
getValidatedPassword, getConfig, writeConfig
|
getValidatedPassword, getConfig, writeConfig
|
||||||
} = require("./helpers.js");
|
} = require("./helpers.js");
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "staticrypt",
|
"name": "staticrypt",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "staticrypt",
|
"name": "staticrypt",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "staticrypt",
|
"name": "staticrypt",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"description": "Based on the [crypto-js](https://github.com/brix/crypto-js) library, StatiCrypt uses AES-256 to encrypt your input with your passphrase and put it in a HTML file with a password prompt that can decrypted in-browser (client side).",
|
"description": "Based on the [crypto-js](https://github.com/brix/crypto-js) library, StatiCrypt uses AES-256 to encrypt your input with your passphrase and put it in a HTML file with a password prompt that can decrypted in-browser (client side).",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
Ładowanie…
Reference in New Issue