display an error when node version is < 16

pull/177/head
robinmoisson 2023-04-18 23:14:06 +02:00
rodzic f2f3e9e1b5
commit 5a8425387a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 9419716500078583
3 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -2,7 +2,12 @@
"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
require('dotenv').config();
@ -11,7 +16,7 @@ const cryptoEngine = require("../lib/cryptoEngine.js");
const codec = require("../lib/codec.js");
const { generateRandomSalt } = cryptoEngine;
const { encode } = codec.init(cryptoEngine);
const { parseCommandLineArguments, buildStaticryptJS, isOptionSetByUser, genFile, getPassword, getFileContent, getSalt,
const { parseCommandLineArguments, buildStaticryptJS, isOptionSetByUser, genFile, getFileContent,
getValidatedSalt,
getValidatedPassword, getConfig, writeConfig
} = require("./helpers.js");

4
package-lock.json wygenerowano
Wyświetl plik

@ -1,12 +1,12 @@
{
"name": "staticrypt",
"version": "3.1.0",
"version": "3.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "staticrypt",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",
"dependencies": {
"dotenv": "^16.0.3",

Wyświetl plik

@ -1,6 +1,6 @@
{
"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).",
"main": "index.js",
"files": [