Commit 8c96c6d7 authored by antoine masson's avatar antoine masson
Browse files

v0.3

- Add template files func : template variable and translation can be saved in public/template
- Templates files are automatically loaded if database is empty
- Possibility to upload and download templates
parent 76a2d988
......@@ -2,5 +2,6 @@ module.exports = {
port: process.env.PORT || 3000,
token:process.env.TOKEN ||"2fe#AYOIdcXyz!7QLUO2@QxJkSNoYK0*AO65lrE4b*nR3JdnRD4Yf2PIthXipcLAZ892a59sj*Q4UDBRtoe5U&C2m2FboDIQ5X3$",
uploads_dir:'./public/uploads/',
template_dir:'./public/template/',
bcrypt_salt:10,
};
const mongoose = require('mongoose');
const crypto = require('crypto')
const fs = require("fs");
const API = require("../config/API");
const Survey = mongoose.model('Survey');
const Token = mongoose.model('Token');
......@@ -14,6 +16,36 @@ function randomValueHex(len) {
.slice(0, len) // return required number of characters
}
async function json2mango(datajson,mongo){
for (let i in datajson){
datajson[i]['_id'] = new mongoose.Types.ObjectId();
}
await mongo.create(datajson);
}
exports.initSurveyTemplate = async()=>{
if(await LanguageTrans.countDocuments() === 0){
fs.readFile(API.template_dir+'LanguageTrans.json', 'utf-8', async (err, data) => {
if (err) {
throw err;
}
await json2mango(JSON.parse(data.toString()), LanguageTrans)
})
console.log("LanguageTrans initialized")
}
if(await LanguageDef.countDocuments() === 0){
fs.readFile(API.template_dir+'LanguageDef.json', 'utf-8', async (err, data) => {
if (err) {
throw err;
}
await json2mango(JSON.parse(data.toString()), LanguageDef)
})
console.log("LanguageDef initialized")
}
};
exports.createNewSurvey = async (req, res) => {
try {
req.body.general.short_name=req.body.general.short_name.toUpperCase().replace(/ /g, '');
......@@ -155,6 +187,62 @@ exports.list_all_langdef = async (req, res) => {
}
};
exports.save_langdef = async (req,res) =>{
try{
LanguageDef.find().
exec(async function (err, langdefs) {
fs.writeFileSync(API.template_dir+'LanguageDef.json', JSON.stringify(langdefs,null,4));
await res.status(201).json({message:"Configuration file saved",status:"OK"});
});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.download_langdef = async (req,res) =>{
try{
LanguageDef.find().
exec(async function (err, langdefs) {
res.set("Content-Type", "application/octet-stream");
res.set("Content-Disposition", "attachment;filename=LanguageDef.json");
res.send(JSON.stringify(langdefs,null,4));
});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.upload_langdef = async (req,res) => {
try{
if (!req.files || Object.keys(req.files).length === 0) {
return res.status(400).json({ message: "No file provided",status:"Error"});
}
await LanguageDef.deleteMany();
await json2mango(JSON.parse(req.files.templatefile.data.toString()), LanguageDef)
await res.status(201).json({message:"Configuration file uploaded",status:"OK"});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.load_langdef= async (req,res) =>{
try{
await LanguageDef.deleteMany();
fs.readFile(API.template_dir+'LanguageDef.json', 'utf-8', async (err, data) => {
if (err) {
throw err;
}
await json2mango(JSON.parse(data.toString()), LanguageDef)
})
await res.status(201).json({message:"Configuration file loaded",status:"OK"});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.delete_a_langdef = async (req, res) => {
try {
await LanguageDef.deleteOne({ _id: req.params.id});
......@@ -205,6 +293,56 @@ exports.list_all_langtrans = async (req, res) => {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.save_langtrans = async (req,res) =>{
try{
LanguageTrans.find().
exec(async function (err, langtrans) {
fs.writeFileSync(API.template_dir+'LanguageTrans.json', JSON.stringify(langtrans,null,4));
await res.status(201).json({message:"Translation file saved",status:"OK"});
});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.load_langtrans = async (req,res) =>{
try{
await LanguageTrans.deleteMany({});
fs.readFile(API.template_dir+'LanguageTrans.json', 'utf-8', async (err, data) => {
if (err) {
throw err;
}
await json2mango(JSON.parse(data.toString()), LanguageTrans)
})
await res.status(201).json({message:"Translation file loaded",status:"OK"});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.download_langtrans = async (req,res) =>{
try{
LanguageTrans.find().
exec(async function (err, langtrans) {
res.set("Content-Type", "application/octet-stream");
res.set("Content-Disposition", "attachment;filename=LanguageTrans.json");
await res.send(langtrans);
});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.upload_langtrans = async (req,res) => {
try{
if (!req.files || Object.keys(req.files).length === 0) {
return res.status(400).json({ message: "No file provided",status:"Error"});
}
await LanguageTrans.deleteMany();
await json2mango(JSON.parse(req.files.templatefile.data.toString()), LanguageTrans)
await res.status(201).json({message:"Translation file uploaded",status:"OK"});
} catch (err) {
res.status(400).json({ message: err,status:"Error"});
}
};
exports.delete_a_langtrans = async (req, res) => {
try {
......
const express = require('express');
const cors = require('cors');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const morgan = require("morgan");
const DEBUG = require('debug')('API:index');
const fileUpload = require('express-fileupload');
// const zip = require('express-zip');
mongo_config = require('./config/DB');
api_config = require('./config/API');
const mongo_config = require('./config/DB');
const api_config = require('./config/API');
global.AdminUser = require('./models/AdminUserModel');
global.Token=require('./models/TokenModel');
global.Survey=require('./models/SurveyModel');
global.Language=require('./models/SurveyLanguageModel');
const SurveyController = require( "./controllers/SurveyController.js");
const routes = require('./routes/Route');
const routesAdminUsers = require('./routes/AdminUserRoute');
......@@ -29,11 +33,15 @@ mongoose.connect(
err => { console.log('Can not connect to the database'+ err)}
);
const index = express();
SurveyController.initSurveyTemplate();
const index = express();
index.use(morgan("dev"));
index.use(cors());
index.use(bodyParser.urlencoded({ extended: true }));
index.use(bodyParser.json());
index.use(fileUpload());
routes(index);
routesAdminUsers(index);
......
{
"name": "api",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.0.0",
"dependencies": {
"bcrypt": "^5.0.0",
"body-parser": "^1.19.0",
"cookie-parser": "~1.4.4",
"cors": "^2.8.5",
"debug": "~2.6.9",
"express": "^4.16.4",
"express-fileupload": "^1.2.1",
"express-zip": "^3.0.0",
"jsonwebtoken": "^8.5.1",
"mime-types": "^2.1.27",
"mongoose": "^5.11.9",
"morgan": "~1.9.1",
"multer": "^1.4.2",
"nodemon": "^2.0.6",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0",
"validator": "^13.5.2"
}
},
"node_modules/@sindresorhus/is": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
"integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/@szmarczak/http-timer": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
"integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
"dependencies": {
"defer-to-connect": "^1.0.1"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@types/bson": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz",
"integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/mongodb": {
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.3.tgz",
"integrity": "sha512-6YNqGP1hk5bjUFaim+QoFFuI61WjHiHE1BNeB41TA00Xd2K7zG4lcWyLLq/XtIp36uMavvS5hoAUJ+1u/GcX2Q==",
"dependencies": {
"@types/bson": "*",
"@types/node": "*"
}
},
"node_modules/@types/node": {
"version": "14.14.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.17.tgz",
"integrity": "sha512-G0lD1/7qD60TJ/mZmhog76k7NcpLWkPVGgzkRy3CTlnFu4LUQh5v2Wa661z6vnXmD8EQrnALUyf0VRtrACYztw=="
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"node_modules/accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"dependencies": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ansi-align": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
"integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==",
"dependencies": {
"string-width": "^3.0.0"
}
},
"node_modules/ansi-align/node_modules/ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"engines": {
"node": ">=6"
}
},
"node_modules/ansi-align/node_modules/is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"engines": {
"node": ">=4"
}
},
"node_modules/ansi-align/node_modules/string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dependencies": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/ansi-align/node_modules/strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dependencies": {
"ansi-regex": "^4.1.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/anymatch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/append-field": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
},
"node_modules/aproba": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"node_modules/archiver-utils": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz",
"integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==",
"dependencies": {
"glob": "^7.1.4",
"graceful-fs": "^4.2.0",
"lazystream": "^1.0.0",
"lodash.defaults": "^4.2.0",
"lodash.difference": "^4.5.0",
"lodash.flatten": "^4.4.0",
"lodash.isplainobject": "^4.0.6",
"lodash.union": "^4.6.0",
"normalize-path": "^3.0.0",
"readable-stream": "^2.0.0"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"dependencies": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"node_modules/async": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
"integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
},
"node_modules/balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"node_modules/basic-auth": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
"dependencies": {
"safe-buffer": "5.1.2"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/bcrypt": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.0.tgz",
"integrity": "sha512-jB0yCBl4W/kVHM2whjfyqnxTmOHkCX4kHEa5nYKSoGeYe8YrjTYTc87/6bwt1g8cmV0QrbhKriETg9jWtcREhg==",
"dependencies": {
"node-addon-api": "^3.0.0",
"node-pre-gyp": "0.15.0"
},
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/binary-extensions": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/bl": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
"integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==",
"dependencies": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
}
},
"node_modules/bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"node_modules/body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
"integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
"dependencies": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/body-parser/node_modules/http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
"integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
"dependencies": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.1",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/body-parser/node_modules/qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
"engines": {
"node": ">=0.6"
}
},
"node_modules/body-parser/node_modules/setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
},
"node_modules/body-parser/node_modules/statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/boxen": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
"integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==",
"dependencies": {
"ansi-align": "^3.0.0",
"camelcase": "^5.3.1",
"chalk": "^3.0.0",
"cli-boxes": "^2.2.0",
"string-width": "^4.1.0",
"term-size": "^2.1.0",
"type-fest": "^0.8.1",
"widest-line": "^3.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/boxen/node_modules/ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"engines": {
"node": ">=8"
}
},
"node_modules/boxen/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"node_modules/boxen/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"engines": {
"node": ">=8"
}
},
"node_modules/boxen/node_modules/string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/boxen/node_modules/strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dependencies": {
"ansi-regex": "^5.0.0"
},
"engines": {
"node": ">=8"