iconFont priject upload

master
unknown 2 years ago
commit 9098be3295
  1. 125
      api/crud.js
  2. 18
      api/renameByUnicode.js
  3. 1
      api/svgtofont.js
  4. 11
      app.js
  5. 55
      db/fontDb.js
  6. 17
      iconFont/iconFontsOfcharacters/characters.css
  7. BIN
      iconFont/iconFontsOfcharacters/characters.eot
  8. 16
      iconFont/iconFontsOfcharacters/characters.less
  9. 16
      iconFont/iconFontsOfcharacters/characters.module.less
  10. 16
      iconFont/iconFontsOfcharacters/characters.scss
  11. 16
      iconFont/iconFontsOfcharacters/characters.styl
  12. 18
      iconFont/iconFontsOfcharacters/characters.svg
  13. 1
      iconFont/iconFontsOfcharacters/characters.symbol.svg
  14. BIN
      iconFont/iconFontsOfcharacters/characters.ttf
  15. BIN
      iconFont/iconFontsOfcharacters/characters.woff
  16. BIN
      iconFont/iconFontsOfcharacters/characters.woff2
  17. 1
      iconFont/svg/characters/Home.svg
  18. 1
      iconFont/svg/characters/Return.svg
  19. BIN
      iconFont/test/testFont.eot
  20. 201
      iconFont/test/testFont.svg
  21. BIN
      iconFont/test/testFont.ttf
  22. BIN
      iconFont/test/testFont.woff
  23. BIN
      iconFont/test/testFont.woff2
  24. 65
      models/fontDb.js
  25. 0
      models/relations.js
  26. 12
      node_modules/.bin/atob
  27. 17
      node_modules/.bin/atob.cmd
  28. 28
      node_modules/.bin/atob.ps1
  29. 12
      node_modules/.bin/color-support
  30. 17
      node_modules/.bin/color-support.cmd
  31. 28
      node_modules/.bin/color-support.ps1
  32. 12
      node_modules/.bin/colors
  33. 17
      node_modules/.bin/colors.cmd
  34. 28
      node_modules/.bin/colors.ps1
  35. 12
      node_modules/.bin/ejs
  36. 17
      node_modules/.bin/ejs.cmd
  37. 28
      node_modules/.bin/ejs.ps1
  38. 12
      node_modules/.bin/jake
  39. 17
      node_modules/.bin/jake.cmd
  40. 28
      node_modules/.bin/jake.ps1
  41. 12
      node_modules/.bin/mime
  42. 17
      node_modules/.bin/mime.cmd
  43. 28
      node_modules/.bin/mime.ps1
  44. 12
      node_modules/.bin/mkdirp
  45. 17
      node_modules/.bin/mkdirp.cmd
  46. 28
      node_modules/.bin/mkdirp.ps1
  47. 12
      node_modules/.bin/node-gyp
  48. 17
      node_modules/.bin/node-gyp.cmd
  49. 28
      node_modules/.bin/node-gyp.ps1
  50. 12
      node_modules/.bin/node-which
  51. 17
      node_modules/.bin/node-which.cmd
  52. 28
      node_modules/.bin/node-which.ps1
  53. 12
      node_modules/.bin/nopt
  54. 17
      node_modules/.bin/nopt.cmd
  55. 28
      node_modules/.bin/nopt.ps1
  56. 12
      node_modules/.bin/rimraf
  57. 17
      node_modules/.bin/rimraf.cmd
  58. 28
      node_modules/.bin/rimraf.ps1
  59. 12
      node_modules/.bin/semver
  60. 17
      node_modules/.bin/semver.cmd
  61. 28
      node_modules/.bin/semver.ps1
  62. 12
      node_modules/.bin/svg2ttf
  63. 17
      node_modules/.bin/svg2ttf.cmd
  64. 28
      node_modules/.bin/svg2ttf.ps1
  65. 12
      node_modules/.bin/svgicons2svgfont
  66. 17
      node_modules/.bin/svgicons2svgfont.cmd
  67. 28
      node_modules/.bin/svgicons2svgfont.ps1
  68. 12
      node_modules/.bin/svgo
  69. 17
      node_modules/.bin/svgo.cmd
  70. 28
      node_modules/.bin/svgo.ps1
  71. 12
      node_modules/.bin/svgtofont
  72. 17
      node_modules/.bin/svgtofont.cmd
  73. 28
      node_modules/.bin/svgtofont.ps1
  74. 12
      node_modules/.bin/ttf2eot
  75. 17
      node_modules/.bin/ttf2eot.cmd
  76. 28
      node_modules/.bin/ttf2eot.ps1
  77. 12
      node_modules/.bin/ttf2woff
  78. 17
      node_modules/.bin/ttf2woff.cmd
  79. 28
      node_modules/.bin/ttf2woff.ps1
  80. 12
      node_modules/.bin/ttf2woff2
  81. 17
      node_modules/.bin/ttf2woff2.cmd
  82. 28
      node_modules/.bin/ttf2woff2.ps1
  83. 12
      node_modules/.bin/uuid
  84. 17
      node_modules/.bin/uuid.cmd
  85. 28
      node_modules/.bin/uuid.ps1
  86. 4459
      node_modules/.package-lock.json
  87. 10
      node_modules/@gar/promisify/LICENSE.md
  88. 65
      node_modules/@gar/promisify/README.md
  89. 36
      node_modules/@gar/promisify/index.js
  90. 32
      node_modules/@gar/promisify/package.json
  91. 21
      node_modules/@nodelib/fs.scandir/LICENSE
  92. 171
      node_modules/@nodelib/fs.scandir/README.md
  93. 20
      node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
  94. 19
      node_modules/@nodelib/fs.scandir/out/adapters/fs.js
  95. 4
      node_modules/@nodelib/fs.scandir/out/constants.d.ts
  96. 17
      node_modules/@nodelib/fs.scandir/out/constants.js
  97. 12
      node_modules/@nodelib/fs.scandir/out/index.d.ts
  98. 26
      node_modules/@nodelib/fs.scandir/out/index.js
  99. 7
      node_modules/@nodelib/fs.scandir/out/providers/async.d.ts
  100. 104
      node_modules/@nodelib/fs.scandir/out/providers/async.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,125 @@
const path = require('path');
const express = require('express');
const app = express();
app.use(express.json())
const port = 5000
const fontDb = require('../db/fontDb');
const { append } = require('express/lib/response');
const { listen } = require('express/lib/application');
const { listeners } = require('process');
const { where } = require('sequelize');
const svgtofont = require('svgtofont');
const fs = require('fs');
const { resolve } = require('path/posix');
app.use(express.json())
const font = fontDb.font
const iconFont = fontDb.iconfont
function createIcon (){
iconFont.belongsTo(font , {foreignKey: { name: 'iconfontID'} });
font.hasMany(iconFont , {foreignKey: { name: 'iconfontID'}});
app.listen(port , ()=>{
console.log('listening on port ')
})
app.post('/addIcon', async (req, res) => {
let fontId = await font.findOne({
where : {
name : req.body.fontName,
}
})
// iconFont.destroy({
// where:{
// iconfontID:null,
// }}
// )
const svgsFolder = "svgs/iconsax2"
fs.readdirSync(svgsFolder).forEach(file => {
const iconCreate = iconFont.create(
{
name : req.body.fontName,
iconfontID : fontId.id,
char : String.fromCharCode(file.substring(0,4)) ,
svgFile : svgsFolder + '/' + file,
varient : req.body.varient,
description : file,
}
)
res.send(iconFont.char)
} )
});
}
function createfont (){
app.listen(port , ()=>{
console.log('listening on port ')
})
app.post('/createfont', async (req, res) => {
const fontCreaet = font.create(
{
name : req.body.fontName,
})
res.send(font.id);
});
}
function createIconFont (){
iconFont.belongsTo(font , {foreignKey: { name: 'iconfontID'} });
font.hasMany(iconFont , {foreignKey: { name: 'iconfontID'}});
app.listen(port , ()=>{
console.log('listening on port ')
})
app.post('/createIconFont', async (req, res) => {
svgFiles = []
let fontId = await font.findOne( {
where : {
name : req.body.fontName,
}
})
let svgList = await font.findAll({
include : [{model: iconFont , where : {
varient : "Bulks",
iconfontID :fontId.dataValues.id,
}}, ],
})
svgList = svgList[0].dataValues.iconfonts
res.send(svgList)
for (let i = 0; i < svgList.length; i++){
if (!fs.existsSync("iconFont/svg/"+req.body.fontName)){
fs.mkdirSync("iconFont/svg/"+req.body.fontName);
}
fs.copyFile("svgs/"+req.body.fontName +"/"+svgList[i].name +".svg" , "iconFont/svg/"+req.body.fontName+"/"+svgList[i].name +".svg" ,function(err) {
if ( err ) console.log('ERROR: ' + err);
})
}
for (let i = 0; i < svgList.length; i++){
fs.rename( svgList[i].svgFile, "iconFont/svg/"+req.body.fontName+"/"+svgList[i].char+".svg" , function(err) {
if ( err ) console.log('ERROR: ' + err);
})
}
svgtofont({
src: path.resolve('iconFont/svg/'+req.body.fontName),
dist: path.resolve('iconFont/iconFontsOf'+req.body.fontName),
fontName: req.body.fontName,
css: true,
emptyDist: true,
useNameAsUnicode : true,
});
});
}
module.exports = {createIcon , createfont ,createIconFont}

@ -0,0 +1,18 @@
const fs = require('fs');
const unidecode = require('unidecode')
const path = require('path')
function renameSvgsToUnicode(){
testFolder = "../svgs/iconsax2"
fs.readdirSync(testFolder).forEach(file => {
// fs.rename("../svgs/iconsax2/"+file ,"../svgs/iconsax2/" +file.substring(3,7)+ ".svg",function(err) {
// if ( err ) console.log('ERROR: ' + err);
// } )
console.log(file)
});
}
renameSvgsToUnicode()
module.exports = {renameSvgsToUnicode}

@ -0,0 +1,11 @@
// import {createIcon} from './api/crud'
const createIcon = require('./api/crud')
const express = require('express');
const path = require('path')
const { iconfont , font , relations } = require('./db/fontDb');
const { resolve } = require('path/posix');
const punycode = require('punycode')
console.log(punycode.decode('0080'))
createIcon.createIcon()

@ -0,0 +1,55 @@
const { Sequelize, DataTypes, where, BIGINT } = require('sequelize');
const sequelize = new Sequelize('iconFont', 'postgres', '2783Rtda', {
host: 'localhost',
dialect:'postgres',
port:3000,
});
const font = sequelize.define('font', {
id :{
type : DataTypes.BIGINT,
primaryKey: true,
autoIncrement:true,
},
name :{
type : DataTypes.STRING,
allowNull: false,
}
})
const iconfont = sequelize.define('iconfont', {
id :{
type : DataTypes.BIGINT,
primaryKey: true,
autoIncrement:true,
},
char :{
type: DataTypes.STRING,
},
svgFile:{
type: DataTypes.STRING,
},
varient:{
type: DataTypes.STRING,
},
name:{
type: DataTypes.STRING,
},
description:{
type: DataTypes.STRING,
},
});
// sequelize.sync()
module.exports = {iconfont , font}

@ -0,0 +1,17 @@
@font-face {
font-family: "characters";
src: url('characters.eot?t=1670229879389'); /* IE9*/
src: url('characters.eot?t=1670229879389#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("characters.woff2?t=1670229879389") format("woff2"),
url("characters.woff?t=1670229879389") format("woff"),
url('characters.ttf?t=1670229879389') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('characters.svg?t=1670229879389#characters') format('svg'); /* iOS 4.1- */
}
.characters {
font-family: 'characters' !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

@ -0,0 +1,16 @@
@font-face {font-family: "characters";
src: url('characters.eot?t=1670229879389'); /* IE9*/
src: url('characters.eot?t=1670229879389#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("characters.woff2?t=1670229879389") format("woff2"),
url("characters.woff?t=1670229879389") format("woff"),
url('characters.ttf?t=1670229879389') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('characters.svg?t=1670229879389#characters') format('svg'); /* iOS 4.1- */
}
.characters {
font-family: 'characters' !important;
font-size: 16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

@ -0,0 +1,16 @@
@font-face {font-family: "characters";
src: url('characters.eot?t=1670229879389'); /* IE9*/
src: url('characters.eot?t=1670229879389#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("characters.woff2?t=1670229879389") format("woff2"),
url("characters.woff?t=1670229879389") format("woff"),
url('characters.ttf?t=1670229879389') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('characters.svg?t=1670229879389#characters') format('svg'); /* iOS 4.1- */
}
.characters {
font-family: 'characters' !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

@ -0,0 +1,16 @@
@font-face {font-family: "characters";
src: url('characters.eot?t=1670229879389'); /* IE9*/
src: url('characters.eot?t=1670229879389#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("characters.woff2?t=1670229879389") format("woff2"),
url("characters.woff?t=1670229879389") format("woff"),
url('characters.ttf?t=1670229879389') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('characters.svg?t=1670229879389#characters') format('svg'); /* iOS 4.1- */
}
.characters {
font-family: 'characters' !important;
font-size: 16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

@ -0,0 +1,16 @@
@font-face {font-family: "characters";
src: url('characters.eot?t=1670229879389'); /* IE9*/
src: url('characters.eot?t=1670229879389#iefix') format('embedded-opentype'), /* IE6-IE8 */
url("characters.woff2?t=1670229879389") format("woff2"),
url("characters.woff?t=1670229879389") format("woff"),
url('characters.ttf?t=1670229879389') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('characters.svg?t=1670229879389#characters') format('svg'); /* iOS 4.1- */
}
.characters {
font-family: 'characters' !important;
font-size: 16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

@ -0,0 +1 @@
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px"><path d="M 25 4 C 21.079241 4 17.954771 5.2898551 15.732422 7.2128906 A 1.0001 1.0001 0 0 0 15.326172 7.625 C 13.769589 9.141988 12.370954 11.251479 11.671875 13.322266 C 10.684374 13.813246 10 14.822225 10 16 C 10 16.67977 10.234231 17.299701 10.615234 17.802734 C 10.535734 18.257546 10.456003 18.711803 10.394531 19.169922 C 9.11977 19.408651 7.9639469 19.631403 7.3769531 19.771484 C 6.9239531 19.879484 6.8333281 19.994891 7.3613281 20.087891 C 7.9303213 20.188406 9.0307098 20.307111 10.255859 20.427734 C 10.077604 22.185205 10 23.939008 10 25.609375 L 10 25.703125 C 7.998366 27.848853 6.91215 30.431705 6.3964844 32.726562 C 5.8556292 35.133522 5.8582993 37.128179 6.2871094 38.394531 C 6.401721 38.733011 6.5766603 39.106976 6.9140625 39.447266 C 7.2514647 39.787555 7.8240603 40.068114 8.4277344 40.019531 C 8.987444 39.974485 9.4936066 39.742882 10 39.326172 L 10 43 A 1.0001 1.0001 0 0 0 11 44 L 26.832031 44 A 1.0001 1.0001 0 0 0 27.158203 44 L 38 44 A 1.0001 1.0001 0 0 0 39 43 L 39 25.541016 C 39 20.810837 38.252516 15.553982 36.142578 11.355469 C 34.03264 7.1569551 30.376567 4 25 4 z M 25 6 C 29.623433 6 32.46736 8.49292 34.357422 12.253906 C 36.247484 16.014893 37 21.027194 37 25.541016 L 37 42 L 28.023438 42 C 28.043991 41.121476 28.079347 40.214471 28.125 39.369141 C 28.654367 39.178463 29.205323 38.936311 29.757812 38.611328 C 32.133933 37.21361 34.469511 34.345906 34.994141 29.099609 A 1.0001 1.0001 0 1 0 33.005859 28.900391 C 32.530489 33.654094 30.616067 35.78639 28.742188 36.888672 C 28.148508 37.237895 27.560944 37.468576 27.011719 37.632812 A 1.0001 1.0001 0 0 0 26.738281 37.714844 C 25.676291 37.994014 24.815339 38 24.5 38 C 24.08096 38 23.920339 37.936217 23.931641 37.960938 C 23.920961 37.893237 23.905649 37.755807 23.949219 37.480469 L 23.949219 37.478516 C 23.980319 37.285489 24.28566 36.516532 24.796875 35.621094 C 25.308535 34.724876 26.010199 33.638119 26.798828 32.484375 C 27.494096 31.467216 28.26694 30.397316 29.03125 29.347656 A 1.0001 1.0001 0 0 0 29.208984 29.097656 C 30.11741 27.854109 31.015298 26.646921 31.800781 25.599609 A 1.0001 1.0001 0 0 0 31.037109 23.988281 A 1.0001 1.0001 0 0 0 30.199219 24.400391 C 30.053308 24.594938 29.870237 24.845804 29.716797 25.050781 C 29.893649 23.207323 30 21.50765 30 19.523438 C 30 14.071396 28.406664 10.466478 25.748047 8.5097656 C 24.418738 7.5314093 22.878717 6.9908586 21.226562 6.7890625 C 20.983489 6.7593732 20.73388 6.7516128 20.486328 6.7363281 C 21.791172 6.2734368 23.287759 6 25 6 z M 19.894531 8.7011719 C 21.696855 8.739515 23.293979 9.1874765 24.5625 10.121094 C 26.592133 11.614881 28 14.451479 28 19.523438 C 28 22.549025 27.768594 24.816155 27.355469 28.248047 C 26.602298 29.283928 25.842264 30.340418 25.148438 31.355469 C 24.341942 32.53535 23.616793 33.656546 23.060547 34.630859 C 22.504301 35.605173 22.101456 36.368753 21.974609 37.164062 C 21.898979 37.638706 21.885162 38.061365 21.982422 38.474609 C 22.079702 38.887854 22.326217 39.292415 22.652344 39.542969 C 23.304609 40.044076 23.963667 40 24.5 40 C 24.716551 40 25.328502 39.982727 26.097656 39.871094 C 26.062027 40.623988 26.039446 41.28873 26.023438 42 L 12 42 L 12 36.716797 A 1.0001 1.0001 0 0 0 12 36.332031 L 12 26.205078 A 1.0001 1.0001 0 0 0 12 25.966797 L 12 25.609375 C 12 23.985598 12.07728 22.29347 12.248047 20.615234 C 14.631972 20.826276 16.908203 21 16.908203 21 C 17.504203 20.689 18 20.341453 18 19.564453 C 18 18.729453 17.479203 18.333 16.908203 18 C 16.908203 18 15.606098 18.231639 14.822266 18.369141 C 15.534074 17.820631 16 16.968232 16 16 C 16 14.654343 15.109 13.528794 13.888672 13.148438 C 14.550183 11.659354 15.642941 10.076457 16.738281 9.0078125 C 17.83852 8.7910828 18.899241 8.6799978 19.894531 8.7011719 z M 23 13 C 21.343 13 20 14.343 20 16 C 20 17.657 21.343 19 23 19 C 24.657 19 26 17.657 26 16 C 26 14.343 24.657 13 23 13 z M 22.435547 14.363281 C 22.655547 14.356781 22.845578 14.427578 22.955078 14.580078 C 23.173078 14.885078 22.98425 15.395703 22.53125 15.720703 C 22.07825 16.045703 21.533453 16.062812 21.314453 15.757812 C 21.095453 15.452813 21.285281 14.942188 21.738281 14.617188 C 21.964781 14.454687 22.215547 14.369781 22.435547 14.363281 z M 11.900391 14.53125 A 1.0001 1.0001 0 0 0 12.994141 14.691406 C 13.112838 14.998981 12.935964 15.430345 12.53125 15.720703 C 12.07825 16.045703 11.533453 16.062812 11.314453 15.757812 C 11.095453 15.452813 11.285281 14.942188 11.738281 14.617188 C 11.790553 14.579686 11.846335 14.560505 11.900391 14.53125 z M 10 29 L 10 36.224609 C 9.0219259 37.632467 8.370462 37.968648 8.3105469 37.994141 C 8.2753341 37.947017 8.2203755 37.866348 8.1816406 37.751953 C 8.0124507 37.252305 7.8702615 35.290558 8.3476562 33.166016 C 8.6514841 31.813896 9.1792885 30.359774 10 29 z"/></svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

@ -0,0 +1,201 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<font id="testFont" horiz-adv-x="1034">
<font-face font-family="testFont"
units-per-em="1024" ascent="1024"
descent="0" />
<missing-glyph horiz-adv-x="0" />
<glyph glyph-name="F058"
unicode="&#x46;&#x30;&#x35;&#x38;"
horiz-adv-x="1034" d="M501 267H330Q317 267 307.5 276.5T298 299T307.5 321.5T330 331H501Q514 331 523.5 321.5T533 299T523.5 276.5T501 267V267z" />
<glyph glyph-name="F059"
unicode="&#x46;&#x30;&#x35;&#x39;"
horiz-adv-x="1034" d="M906 725V299Q906 203 855.5 144T693 85H351Q239 85 188.5 144T138 299V725Q138 821 188.5 880T351 939H693Q805 939 855.5 880T906 725z" />
<glyph glyph-name="F060"
unicode="&#x46;&#x30;&#x36;&#x30;"
horiz-adv-x="1034" d="M522 90Q610 90 688 123Q766 157 824 214.5T915 350Q949 428 949 516Q949 605 915 682Q882 760 824 818T688 909Q610 943 522 943T356 909Q278 876 220 818T129 682Q95 605 95 516Q95 428 129 350Q162 272 220 214.5T356 123Q434 90 522 90V90z" />
<glyph glyph-name="F061"
unicode="&#x46;&#x30;&#x36;&#x31;"
horiz-adv-x="1034" d="M618 512L554 535V679H569Q595 679 613.5 659.5T632 612Q632 599 641.5 589.5T664 580T686.5 589.5T696 612Q696 666 659 704.5T569 743H554V768Q554 781 544.5 790.5T522 800T499.5 790.5T490 768V743H462Q415 743 381 708.5T347 625Q347 567 373.5 544T426 512L490 489V345H475Q449 345 430.5 365T412 413Q412 426 402.5 435.5T380 445T357.5 435.5T348 413Q348 358 385 319.5T475 281H490V256Q490 243 499.5 233.5T522 224T544.5 233.5T554 256V281H582Q629 281 663 315.5T697 399Q696 457 669.5 480T618 512V512zM447 572Q431 578 421.5 587T412 624Q412 647 427 663T463 679H490V557L447 572V572zM582 345H554V467L597 452Q613 446 622.5 437T632 400Q632 377 617.5 361T582 345V345z" />
<glyph glyph-name="F062"
unicode="&#x46;&#x30;&#x36;&#x32;"
horiz-adv-x="1034" d="M701 939H343Q285 939 239 922T161 873T112 795T95 691V334Q95 275 112 229T161 151T239 102T343 85H700Q759 85 805 102T882.5 151T931 229T948 333V691Q948 749 932 795Q915 841 883 873T805 922T701 939V939z" />
<glyph glyph-name="F063"
unicode="&#x46;&#x30;&#x36;&#x33;"
horiz-adv-x="1034" d="M618 512L554 535V679H569Q595 679 613.5 659.5T632 612Q632 599 641.5 589.5T664 580T686.5 589.5T696 612Q696 666 659 704.5T569 743H554V768Q554 781 544.5 790.5T522 800T499.5 790.5T490 768V743H462Q415 743 381 708.5T347 625Q347 567 373.5 544T426 512L490 489V345H475Q449 345 430.5 365T412 413Q412 426 402.5 435.5T380 445T357.5 435.5T348 413Q348 358 385 319.5T475 281H490V256Q490 243 499.5 233.5T522 224T544.5 233.5T554 256V281H582Q629 281 663 315.5T697 399Q696 457 669.5 480T618 512V512zM447 572Q431 578 421.5 587T412 624Q412 647 427 663T463 679H490V557L447 572V572zM582 345H554V467L597 452Q613 446 622.5 437T632 400Q632 377 617.5 361T582 345V345z" />
<glyph glyph-name="F064"
unicode="&#x46;&#x30;&#x36;&#x34;"
horiz-adv-x="1034" d="M834 597H210Q163 597 129.5 631T96 712V824Q96 871 129.5 904.5T210 938H834Q882 938 915.5 904.5T949 824V712Q949 665 915 631T834 597z" />
<glyph glyph-name="F065"
unicode="&#x46;&#x30;&#x36;&#x35;"
horiz-adv-x="1034" d="M834 85H210Q163 85 129.5 119T96 200V312Q96 359 129.5 392.5T210 426H834Q882 426 915.5 392.5T949 312V200Q949 153 915 119T834 85z" />
<glyph glyph-name="F066"
unicode="&#x46;&#x30;&#x36;&#x36;"
horiz-adv-x="1034" d="M266 693Q253 693 243.5 702.5T234 725V811Q234 824 243.5 833.5T266 843T288.5 833.5T298 811V725Q298 712 288.5 702.5T266 693z" />
<glyph glyph-name="F067"
unicode="&#x46;&#x30;&#x36;&#x37;"
horiz-adv-x="1034" d="M437 693Q424 693 414.5 702.5T405 725V811Q405 824 414.5 833.5T437 843T459.5 833.5T469 811V725Q469 712 459.5 702.5T437 693z" />
<glyph glyph-name="F068"
unicode="&#x46;&#x30;&#x36;&#x38;"
horiz-adv-x="1034" d="M266 181Q253 181 243.5 190.5T234 213V299Q234 312 243.5 321.5T266 331T288.5 321.5T298 299V213Q298 200 288.5 190.5T266 181z" />
<glyph glyph-name="F069"
unicode="&#x46;&#x30;&#x36;&#x39;"
horiz-adv-x="1034" d="M437 181Q424 181 414.5 190.5T405 213V299Q405 312 414.5 321.5T437 331T459.5 321.5T469 299V213Q469 200 459.5 190.5T437 181z" />
<glyph glyph-name="F070"
unicode="&#x46;&#x30;&#x37;&#x30;"
horiz-adv-x="1034" d="M437 224Q424 224 414.5 233.5T405 256V341Q405 354 414.5 363.5T437 373T459.5 363.5T469 341V256Q469 243 459.5 233.5T437 224z" />
<glyph glyph-name="F071"
unicode="&#x46;&#x30;&#x37;&#x31;"
horiz-adv-x="1034" d="M778 683H607Q594 683 584.5 692.5T575 715T584.5 737.5T607 747H778Q791 747 800.5 737.5T810 715T800.5 692.5T778 683z" />
<glyph glyph-name="F57F"
unicode="&#x46;&#x35;&#x37;&#x46;"
horiz-adv-x="1034" d="M701 939H344Q285 939 239 922T161 873T112 795T95 691V334Q95 275 112 229T161 151.5T239 103T343 86H700Q759 86 805 103T882.5 151.5T931 229T948 334V691Q948 749 932 795Q915 841 883 873T805 922T701 939V939z" />
<glyph glyph-name="F58A"
unicode="&#x46;&#x35;&#x38;&#x41;"
horiz-adv-x="1034" d="M426 107Q420 107 414.5 109T404 116L300 215Q293 222 291 231.5T292 250Q296 259 304 264.5T322 270H661Q712 270 756 289Q801 308 834.5 341.5T887 420T906 516Q906 565 887.5 610T834 689Q825 699 825 712T834 735Q844 744 857 744T880 735Q923 690 946.5 634T970 516Q970 452 946 395Q922 339 880 296.5T781 230Q725 206 661 206H402L449 162Q458 153 458.5 139.5T449 117Q444 112 438 109.5T426 107V107z" />
<glyph glyph-name="F58B"
unicode="&#x46;&#x35;&#x38;&#x42;"
horiz-adv-x="1034" d="M394 363H650Q712 363 755.5 407T799 512T755.5 617T650 661H394Q332 661 288.5 617T245 512T288.5 407T394 363z" />
<glyph glyph-name="F58C"
unicode="&#x46;&#x35;&#x38;&#x43;"
horiz-adv-x="1034" d="M177 291Q171 291 165 293.5T154 300Q110 345 86.5 401T63 519Q63 583 88 640Q112 696 154 738.5T252 805Q309 829 373 829H632L585 873Q576 882 575.5 895.5T584 918Q594 928 607 928T630 919L734 819Q741 812 743 802.5T741 784Q738 775 729.5 769.5T711 764L372 765Q322 765 277 746Q232 726 199 692.5T146 615Q127 570 127 519Q127 470 145.5 425T199 345Q208 336 208 322.5T199 300Q195 295 189 293T177 291V291z" />
<glyph glyph-name="F58D"
unicode="&#x46;&#x35;&#x38;&#x44;"
horiz-adv-x="1034" d="M437 96Q431 96 425 98T414 105L310 205Q303 212 301 221.5T303 240T315 254T333 260L672 259Q722 259 767 278Q812 298 845 331.5T898 409Q917 454 917 505Q917 554 898.5 599T845 679Q836 688 836 701.5T845 724T867.5 733T890 724Q934 680 957.5 623.5T981 505Q981 441 957 385Q932 328 890 286T792 219Q736 195 672 195L413 196L459 151Q469 142 469 129T460 106Q455 101 449 98.5T437 96V96z" />
<glyph glyph-name="F58E"
unicode="&#x46;&#x35;&#x38;&#x45;"
horiz-adv-x="1034" d="M533 366Q520 366 510.5 375.5T501 398V543L493 534Q484 524 470.5 523.5T447 531Q437 540 436.5 553.5T445 576L509 648Q516 655 525.5 657.5T544 656Q553 653 559 644.5T565 626V398Q565 385 555.5 375.5T533 366V366z" />
<glyph glyph-name="F58F"
unicode="&#x46;&#x35;&#x38;&#x46;"
horiz-adv-x="1034" d="M947 256V213Q947 161 931 123T819 85H222Q126 85 110 123T94 213V256Q94 274 106.5 286.5T137 299H905Q922 299 934.5 286.5T947 256V256z" />
<glyph glyph-name="F59A"
unicode="&#x46;&#x35;&#x39;&#x41;"
horiz-adv-x="1034" d="M522 231Q471 231 427 251Q382 270 348.5 303.5T296 381Q277 426 277 477Q277 526 295 570Q314 614 346 647T421 700Q465 720 514 722L498 740Q489 750 490 763.5T501 785Q511 794 524.5 793T546 783L617 701Q618 701 618.5 700.5T619 699Q621 697 622 695T624 690Q624 689 624.5 688T625 685V679T624 673Q624 671 623 668.5T621 663L619.5 661.5T619 660L616 657T612 654V654V654L529 593Q518 585 505 587T484 600Q476 610 478 623.5T491 645L508 657Q438 652 389 600T340 477Q340 402 393.5 348.5T522 295Q596 295 649.5 348.5T703 477Q703 503 695 529T673 577Q665 588 667.5 601T682 622Q693 629 706 626.5T726 613Q746 582 756.5 547.5T767 477Q767 426 748 381Q729 337 695.5 303.5T617 251Q573 231 522 231V231z" />
<glyph glyph-name="F59B"
unicode="&#x46;&#x35;&#x39;&#x42;"
horiz-adv-x="1034" d="M701 939H344Q285 939 239 922T161 873T112 795T95 691V334Q95 275 112 229T161 151.5T239 103T343 86H700Q759 86 805 103T882.5 151.5T931 229T948 334V691Q948 749 932 795Q915 841 883 873T805 922T701 939V939z" />
<glyph glyph-name="F59C"
unicode="&#x46;&#x35;&#x39;&#x43;"
horiz-adv-x="1034" d="M750 638L650 316Q633 259 573 258.5T494 314L464 403Q458 421 444.5 435T413 454L324 484Q267 503 268 563T326 640L648 741Q695 755 730 720T750 638V638z" />
<glyph glyph-name="F59D"
unicode="&#x46;&#x35;&#x39;&#x44;"
horiz-adv-x="1034" d="M389 828Q376 883 334 911T244 939T153 911Q111 883 98 828Q83 763 114 709.5T181 622Q207 597 243.5 597T306 622Q342 656 373 709.5T389 828V828zM245 759Q227 759 214.5 772T202 802Q202 820 214.5 832.5T245 845V845Q263 845 275.5 832.5T288 802Q288 785 275.5 772T245 759z" />
<glyph glyph-name="F59E"
unicode="&#x46;&#x35;&#x39;&#x45;"
horiz-adv-x="1034" d="M288 802Q288 785 275.5 772T245 759T214.5 772T202 802Q202 820 214.5 832.5T245 845V845Q263 845 275.5 832.5T288 802z" />
<glyph glyph-name="F59F"
unicode="&#x46;&#x35;&#x39;&#x46;"
horiz-adv-x="1034" d="M945 316Q932 371 890 399Q847 427 799 427T708 399Q666 371 653 316Q638 251 669 197.5T736 110Q762 85 798.5 85T862 110Q898 144 929 197.5T945 316V316zM801 247Q783 247 770.5 260T758 290Q758 308 770.5 320.5T800 333H801Q818 333 830.5 320.5T843 290Q843 273 830.5 260T801 247z" />
<glyph glyph-name="F60A"
unicode="&#x46;&#x36;&#x30;&#x41;"
horiz-adv-x="1034" d="M792 782L291 281Q277 267 257 269T225 287Q186 345 163.5 412T141 550V737Q141 763 158.5 789T200 825L438 922Q478 939 521.5 939T605 922L778 852Q799 843 803.5 820.5T792 782V782z" />
<glyph glyph-name="F60B"
unicode="&#x46;&#x36;&#x30;&#x42;"
horiz-adv-x="1034" d="M832 724Q853 741 877.5 729.5T902 691V550Q902 471 875 397Q848 324 800.5 262.5T687 155Q621 110 544 88Q533 85 522 85T500 88Q454 101 412.5 122T335 172Q319 183 318 202.5T330 236Q365 271 428 336Q492 400 564.5 472T709 612T832 724V724z" />
<glyph glyph-name="F60C"
unicode="&#x46;&#x36;&#x30;&#x43;"
horiz-adv-x="1034" d="M412 932L177 844Q144 831 120 796.5T96 726V381Q96 355 110.5 325T146 280L381 105Q412 81 456 81T531 105L766 280Q787 296 801.5 325.5T816 381V726Q816 762 792.5 796.5T735 844L500 932Q482 939 456 939T412 932V932z" />
<glyph glyph-name="F60D"
unicode="&#x46;&#x36;&#x30;&#x44;"
horiz-adv-x="1034" d="M832 736H540Q533 736 527 735.5T515 735Q460 732 441 707.5T422 620V604Q422 590 431.5 581T454 572H917Q930 572 939.5 581T949 604V620Q949 690 925.5 713T832 736V736z" />
<glyph glyph-name="F60E"
unicode="&#x46;&#x36;&#x30;&#x45;"
horiz-adv-x="1034" d="M455 525Q441 525 432 515.5T423 493V404Q423 334 446 311T539 288H832Q901 288 924.5 310T949 398V493Q949 506 939.5 515.5T917 525H455V525zM576 364H523Q513 364 506.5 370.5T500 387T506.5 403.5T523 410H576Q586 410 592.5 403.5T599 387T592.5 370.5T576 364zM749 364H643Q633 364 626.5 370.5T620 387T626.5 403.5T643 410H749Q759 410 765.5 403.5T772 387T765.5 370.5T749 364z" />
<glyph glyph-name="F60F"
unicode="&#x46;&#x36;&#x30;&#x46;"
horiz-adv-x="1034" d="M902 550Q902 471 875 398Q848 324 800.5 262.5T687 155Q621 110 544 88Q533 85 522 85T500 88Q423 110 357 155Q291 201 243.5 262.5T169 398Q142 471 142 550V737Q142 763 159.5 789T201 825L439 922Q479 938 522.5 938T606 922L843 825Q868 815 885.5 789T903 737L902 550V550z" />
<glyph glyph-name="F61A"
unicode="&#x46;&#x36;&#x31;&#x41;"
horiz-adv-x="1034" d="M821 247Q814 247 808 250T799 256L202 853Q192 863 192 874.5T202 896T225.5 906T249 896L846 299Q856 289 856 275T846 252Q840 249 833.5 248T821 247z" />
<glyph glyph-name="F61B"
unicode="&#x46;&#x36;&#x31;&#x42;"
horiz-adv-x="1034" d="M223 405Q210 405 199.5 414T189 439V875Q189 887 198 898T223 909H663Q676 909 686.5 900T697 875T688 850T663 841H257V435Q257 422 246.5 413.5T223 405V405z" />
<glyph glyph-name="F61C"
unicode="&#x46;&#x36;&#x31;&#x43;"
horiz-adv-x="1034" d="M313 770L698 898Q763 920 812 914T889.5 879.5T923 802Q929 753 908 689L779 304Q747 207 706 158Q665 110 622.5 110T539 158Q498 207 465 304L427 418L313 456Q216 488 168 529Q119 570 119 612.5T168 696Q216 737 313 770V770z" />
<glyph glyph-name="F61D"
unicode="&#x46;&#x36;&#x31;&#x44;"
horiz-adv-x="1034" d="M10 64V64V64V64z" />
<glyph glyph-name="F61E"
unicode="&#x46;&#x36;&#x31;&#x45;"
horiz-adv-x="1034" d="M527 496Q521 496 515 498T505 505Q495 514 495 527.5T505 550L667 713Q676 723 689.5 723T712 713Q721 704 721 690.5T712 668L550 505Q545 501 539 498.5T527 496V496z" />
<glyph glyph-name="F61F"
unicode="&#x46;&#x36;&#x31;&#x46;"
horiz-adv-x="1034" d="M701 939H344Q285 939 239 922T161.5 873T113 795T96 691V334Q96 275 113 229T161.5 151.5T239 103T344 86H701Q759 86 805 103T883 151.5T932 229T949 334V691Q949 749 932 795T883 873T805 922T701 939z" />
<glyph glyph-name="F62A"
unicode="&#x46;&#x36;&#x32;&#x41;"
horiz-adv-x="1034" d="M701 939H343Q285 939 239 922T161 873T112 795T95 691V334Q95 275 112 229T161 151T239 102T343 85H700Q759 85 805 102T882.5 151T931 229T948 333V691Q948 749 932 795Q915 841 883 873T805 922T701 939V939z" />
<glyph glyph-name="F62B"
unicode="&#x46;&#x36;&#x32;&#x42;"
horiz-adv-x="1034" d="M675 203Q662 203 652.5 212.5T643 235V401Q643 414 652.5 423.5T675 433T697.5 423.5T707 401V235Q707 222 697.5 212.5T675 203z" />
<glyph glyph-name="F62C"
unicode="&#x46;&#x36;&#x32;&#x43;"
horiz-adv-x="1034" d="M675 674Q662 674 652.5 683.5T643 706V789Q643 802 652.5 811.5T675 821T697.5 811.5T707 789V706Q707 693 697.5 683.5T675 674z" />
<glyph glyph-name="F62D"
unicode="&#x46;&#x36;&#x32;&#x44;"
horiz-adv-x="1034" d="M369 203Q356 203 346.5 212.5T337 235V318Q337 331 346.5 340.5T369 350T391.5 340.5T401 318V235Q401 222 392 212.5T369 203z" />
<glyph glyph-name="F62E"
unicode="&#x46;&#x36;&#x32;&#x45;"
horiz-adv-x="1034" d="M369 591Q356 591 346.5 600.5T337 623V789Q337 802 346.5 811.5T369 821T391.5 811.5T401 789V623Q401 610 392 600.5T369 591z" />
<glyph glyph-name="F62F"
unicode="&#x46;&#x36;&#x32;&#x46;"
horiz-adv-x="1034" d="M675 711Q627 711 592.5 677T558 595T592 513T675 479Q723 479 757 513T791 595Q791 644 757 677.5T675 711z" />
<glyph glyph-name="F63A"
unicode="&#x46;&#x36;&#x33;&#x41;"
horiz-adv-x="1034" d="M324 590H165Q149 590 138 579T127 552T138 524.5T165 513H206V115Q206 99 217 88T244 77T271.5 88T283 115V513H324Q340 513 351 524.5T362 552T350.5 579T324 590z" />
<glyph glyph-name="F63B"
unicode="&#x46;&#x36;&#x33;&#x42;"
horiz-adv-x="1034" d="M879 590H720Q704 590 693 579T682 552T693 524.5T720 513H761V115Q761 99 772.5 88T800 77T827 88T838 115V513H879Q895 513 906.5 524.5T918 552T906.5 579T879 590z" />
<glyph glyph-name="F63C"
unicode="&#x46;&#x36;&#x33;&#x43;"
horiz-adv-x="1034" d="M601 511H560V909Q560 925 549 936T522 947T495 936T484 909V511H443Q427 511 415.5 499.5T404 472T415.5 445T443 434H601Q617 434 628.5 445T640 472T628.5 499.5T601 511z" />
<glyph glyph-name="F63D"
unicode="&#x46;&#x36;&#x33;&#x44;"
horiz-adv-x="1034" d="M522 320Q602 320 658 376T714 512T658 648T522 704T386 648T330 512T386 376T522 320z" />
<glyph glyph-name="F63E"
unicode="&#x46;&#x36;&#x33;&#x45;"
horiz-adv-x="1034" d="M437 480H95Q82 480 72.5 489.5T63 512T72.5 534.5T95 544H437Q450 544 459.5 534.5T469 512T459.5 489.5T437 480z" />
<glyph glyph-name="F63F"
unicode="&#x46;&#x36;&#x33;&#x46;"
horiz-adv-x="1034" d="M949 480H607Q594 480 584.5 489.5T575 512T584.5 534.5T607 544H949Q962 544 971.5 534.5T981 512T971.5 489.5T949 480V480z" />
<glyph glyph-name="F64A"
unicode="&#x46;&#x36;&#x34;&#x41;"
horiz-adv-x="1034" d="M881 727V606L326 199L214 283Q193 299 178 328T163 383V727Q163 763 187 797.5T245 844L478 932Q496 939 522 939T566 932L799 844Q833 832 857 797.5T881 727V727z" />
<glyph glyph-name="F64B"
unicode="&#x46;&#x36;&#x34;&#x42;"
horiz-adv-x="1034" d="M881 547V383Q881 357 866 328T830 283L597 108Q582 97 562 91T522 85T482 91T447 108L365 169L881 547V547z" />
<glyph glyph-name="F64C"
unicode="&#x46;&#x36;&#x34;&#x43;"
horiz-adv-x="1034" d="M478 936L243 848Q209 835 185.5 800.5T162 730V384Q162 359 176.5 329T212 284L447 108Q478 85 522 85T597 108L832 284Q853 299 867.5 329T882 384V730Q882 766 858 800.5T801 848L566 936Q548 943 522 943T478 936V936z" />
<glyph glyph-name="F64D"
unicode="&#x46;&#x36;&#x34;&#x44;"
horiz-adv-x="1034" d="M636 473L569 541L635 607Q644 616 644 629.5T635 652Q625 662 612 662T589 652L523 586L455 654Q446 663 433 663T410 654Q401 645 401 631.5T410 609L478 541L408 471Q399 462 399 448.5T408 426Q413 421 419 418.5T431 416T443 418.5T453 426L523 496L591 428Q596 423 602 421T614 419T626 421T636 428Q646 438 646 451T636 473V473z" />
<glyph glyph-name="F64E"
unicode="&#x46;&#x36;&#x34;&#x45;"
horiz-adv-x="1034" d="M435 934L200 846Q167 833 143 798.5T119 728V382Q119 356 133.5 326.5T169 282L404 106Q435 83 479 83T554 106L789 282Q810 297 824.5 326.5T839 382V728Q839 764 815.5 798.5T758 846L523 934Q505 941 479 941T435 934V934z" />
<glyph glyph-name="F64F"
unicode="&#x46;&#x36;&#x34;&#x46;"
horiz-adv-x="1034" d="M693 533Q613 533 557 476.5T501 341T557 205.5T693 149Q772 149 828.5 205.5T885 341Q885 421 828.5 477T693 533V533z" />
<glyph glyph-name="F65A"
unicode="&#x46;&#x36;&#x35;&#x41;"
horiz-adv-x="1034" d="M629 811H415V896Q415 914 427.5 926.5T458 939H586Q604 939 616.5 926.5T629 896V811V811z" />
<glyph glyph-name="F65B"
unicode="&#x46;&#x36;&#x35;&#x42;"
horiz-adv-x="1034" d="M922 538V282Q922 238 905 199Q888 161 859 132T792 86Q753 69 708 69H336Q291 69 253 86Q214 103 185 132T139 199Q122 238 122 282V535Q147 509 180 494.5T251 480Q291 480 327.5 499T388 550Q410 518 445.5 499T522 480T598 498T655 548Q679 517 715.5 498.5T791 480T864 495T922 538V538z" />
<glyph glyph-name="F65C"
unicode="&#x46;&#x36;&#x35;&#x43;"
horiz-adv-x="1034" d="M650 971H394L362 657Q360 635 363 614.5T374 576Q393 532 433 506T522 480T611 505.5T670 575Q676 589 679.5 604.5T683 637V645L650 971V971z" />
<glyph glyph-name="F65D"
unicode="&#x46;&#x36;&#x35;&#x44;"
horiz-adv-x="1034" d="M964 671L952 789Q938 886 891 928.5T750 971H586L618 651Q618 647 618.5 643.5T619 634Q621 617 626 601.5T638 573Q662 530 703 505T791 480Q834 480 870.5 498T931 550Q950 575 958.5 606.5T964 671V671z" />
<glyph glyph-name="F65E"
unicode="&#x46;&#x36;&#x35;&#x45;"
horiz-adv-x="1034" d="M291 971Q197 971 150 928.5T89 788L78 671Q75 636 84 604T113 546Q137 514 173 497T251 480Q297 480 338.5 505T403 572Q411 586 416.5 602.5T423 636L457 970H291V971V971z" />
<glyph glyph-name="F65F"
unicode="&#x46;&#x36;&#x35;&#x46;"
horiz-adv-x="1034" d="M494 313Q454 309 426.5 278.5T399 207V69H644V192Q645 259 606.5 290T494 313V313z" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,65 @@
const { Sequelize, DataTypes, where, BIGINT } = require('sequelize');
const sequelize = new Sequelize('iconFont', 'postgres', '2783Rtda', {
host: 'localhost',
dialect:'postgres',
port:3000,
});
const font = sequelize.define('font', {
id :{
type : DataTypes.BIGINT,
primaryKey: true,
autoIncrement:true,
},
name :{
type : DataTypes.STRING,
allowNull: false,
}
})
const iconfont = sequelize.define('iconfont', {
id :{
type : DataTypes.BIGINT,
primaryKey: true,
autoIncrement:true,
},
char :{
type: DataTypes.STRING,
},
svgFile:{
type: DataTypes.STRING,
},
varient:{
type: DataTypes.STRING,
},
name:{
type: DataTypes.STRING,
},
description:{
type: DataTypes.STRING,
},
});
const relations = ()=>{
iconfont.belongsTo(font , {foreignKey: { name: 'iconfontID'} });
font.hasMany(iconfont , {foreignKey: { name: 'iconfontID'}});
sequelize.sync({alter : true});
}
module.exports = {iconfont , font , relations}

12
node_modules/.bin/atob generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../atob/bin/atob.js" "$@"
else
exec node "$basedir/../atob/bin/atob.js" "$@"
fi

17
node_modules/.bin/atob.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\atob\bin\atob.js" %*

28
node_modules/.bin/atob.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args
} else {
& "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../atob/bin/atob.js" $args
} else {
& "node$exe" "$basedir/../atob/bin/atob.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/color-support generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../color-support/bin.js" "$@"
else
exec node "$basedir/../color-support/bin.js" "$@"
fi

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\color-support\bin.js" %*

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../color-support/bin.js" $args
} else {
& "$basedir/node$exe" "$basedir/../color-support/bin.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../color-support/bin.js" $args
} else {
& "node$exe" "$basedir/../color-support/bin.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/colors generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../colors-cli/bin/colors" "$@"
else
exec node "$basedir/../colors-cli/bin/colors" "$@"
fi

17
node_modules/.bin/colors.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\colors-cli\bin\colors" %*

28
node_modules/.bin/colors.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../colors-cli/bin/colors" $args
} else {
& "$basedir/node$exe" "$basedir/../colors-cli/bin/colors" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../colors-cli/bin/colors" $args
} else {
& "node$exe" "$basedir/../colors-cli/bin/colors" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/ejs generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ejs/bin/cli.js" "$@"
else
exec node "$basedir/../ejs/bin/cli.js" "$@"
fi

17
node_modules/.bin/ejs.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ejs\bin\cli.js" %*

28
node_modules/.bin/ejs.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../ejs/bin/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../ejs/bin/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../ejs/bin/cli.js" $args
} else {
& "node$exe" "$basedir/../ejs/bin/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/jake generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../jake/bin/cli.js" "$@"
else
exec node "$basedir/../jake/bin/cli.js" "$@"
fi

17
node_modules/.bin/jake.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jake\bin\cli.js" %*

28
node_modules/.bin/jake.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../jake/bin/cli.js" $args
} else {
& "node$exe" "$basedir/../jake/bin/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/mime generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
else
exec node "$basedir/../mime/cli.js" "$@"
fi

17
node_modules/.bin/mime.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*

28
node_modules/.bin/mime.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../mime/cli.js" $args
} else {
& "node$exe" "$basedir/../mime/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/mkdirp generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
else
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
fi

17
node_modules/.bin/mkdirp.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*

28
node_modules/.bin/mkdirp.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
} else {
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
} else {
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/node-gyp generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../node-gyp/bin/node-gyp.js" "$@"
else
exec node "$basedir/../node-gyp/bin/node-gyp.js" "$@"
fi

17
node_modules/.bin/node-gyp.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\node-gyp\bin\node-gyp.js" %*

28
node_modules/.bin/node-gyp.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
} else {
& "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
} else {
& "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/node-which generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../which/bin/node-which" "$@"
else
exec node "$basedir/../which/bin/node-which" "$@"
fi

17
node_modules/.bin/node-which.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %*

28
node_modules/.bin/node-which.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
} else {
& "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../which/bin/node-which" $args
} else {
& "node$exe" "$basedir/../which/bin/node-which" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/nopt generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
else
exec node "$basedir/../nopt/bin/nopt.js" "$@"
fi

17
node_modules/.bin/nopt.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nopt\bin\nopt.js" %*

28
node_modules/.bin/nopt.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
} else {
& "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
} else {
& "node$exe" "$basedir/../nopt/bin/nopt.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/rimraf generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
else
exec node "$basedir/../rimraf/bin.js" "$@"
fi

17
node_modules/.bin/rimraf.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*

28
node_modules/.bin/rimraf.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
} else {
& "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../rimraf/bin.js" $args
} else {
& "node$exe" "$basedir/../rimraf/bin.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/semver generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
else
exec node "$basedir/../semver/bin/semver.js" "$@"
fi

17
node_modules/.bin/semver.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*

28
node_modules/.bin/semver.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
} else {
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
} else {
& "node$exe" "$basedir/../semver/bin/semver.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/svg2ttf generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../svg2ttf/svg2ttf.js" "$@"
else
exec node "$basedir/../svg2ttf/svg2ttf.js" "$@"
fi

17
node_modules/.bin/svg2ttf.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svg2ttf\svg2ttf.js" %*

28
node_modules/.bin/svg2ttf.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../svg2ttf/svg2ttf.js" $args
} else {
& "$basedir/node$exe" "$basedir/../svg2ttf/svg2ttf.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../svg2ttf/svg2ttf.js" $args
} else {
& "node$exe" "$basedir/../svg2ttf/svg2ttf.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../svgicons2svgfont/bin/svgicons2svgfont.js" "$@"
else
exec node "$basedir/../svgicons2svgfont/bin/svgicons2svgfont.js" "$@"
fi

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svgicons2svgfont\bin\svgicons2svgfont.js" %*

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../svgicons2svgfont/bin/svgicons2svgfont.js" $args
} else {
& "$basedir/node$exe" "$basedir/../svgicons2svgfont/bin/svgicons2svgfont.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../svgicons2svgfont/bin/svgicons2svgfont.js" $args
} else {
& "node$exe" "$basedir/../svgicons2svgfont/bin/svgicons2svgfont.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/svgo generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../svgo/bin/svgo" "$@"
else
exec node "$basedir/../svgo/bin/svgo" "$@"
fi

17
node_modules/.bin/svgo.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svgo\bin\svgo" %*

28
node_modules/.bin/svgo.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../svgo/bin/svgo" $args
} else {
& "$basedir/node$exe" "$basedir/../svgo/bin/svgo" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../svgo/bin/svgo" $args
} else {
& "node$exe" "$basedir/../svgo/bin/svgo" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/svgtofont generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../svgtofont/lib/cli.js" "$@"
else
exec node "$basedir/../svgtofont/lib/cli.js" "$@"
fi

17
node_modules/.bin/svgtofont.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\svgtofont\lib\cli.js" %*

28
node_modules/.bin/svgtofont.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../svgtofont/lib/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../svgtofont/lib/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../svgtofont/lib/cli.js" $args
} else {
& "node$exe" "$basedir/../svgtofont/lib/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/ttf2eot generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ttf2eot/ttf2eot.js" "$@"
else
exec node "$basedir/../ttf2eot/ttf2eot.js" "$@"
fi

17
node_modules/.bin/ttf2eot.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ttf2eot\ttf2eot.js" %*

28
node_modules/.bin/ttf2eot.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../ttf2eot/ttf2eot.js" $args
} else {
& "$basedir/node$exe" "$basedir/../ttf2eot/ttf2eot.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../ttf2eot/ttf2eot.js" $args
} else {
& "node$exe" "$basedir/../ttf2eot/ttf2eot.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/ttf2woff generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ttf2woff/ttf2woff.js" "$@"
else
exec node "$basedir/../ttf2woff/ttf2woff.js" "$@"
fi

17
node_modules/.bin/ttf2woff.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ttf2woff\ttf2woff.js" %*

28
node_modules/.bin/ttf2woff.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../ttf2woff/ttf2woff.js" $args
} else {
& "$basedir/node$exe" "$basedir/../ttf2woff/ttf2woff.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../ttf2woff/ttf2woff.js" $args
} else {
& "node$exe" "$basedir/../ttf2woff/ttf2woff.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/ttf2woff2 generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ttf2woff2/bin/ttf2woff2.js" "$@"
else
exec node "$basedir/../ttf2woff2/bin/ttf2woff2.js" "$@"
fi

17
node_modules/.bin/ttf2woff2.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ttf2woff2\bin\ttf2woff2.js" %*

28
node_modules/.bin/ttf2woff2.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args
} else {
& "$basedir/node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args
} else {
& "node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/uuid generated vendored

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@"
else
exec node "$basedir/../uuid/dist/bin/uuid" "$@"
fi

17
node_modules/.bin/uuid.cmd generated vendored

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %*

28
node_modules/.bin/uuid.ps1 generated vendored

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
} else {
& "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
} else {
& "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
}
$ret=$LASTEXITCODE
}
exit $ret

4459
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,10 @@
The MIT License (MIT)
Copyright © 2020-2022 Michael Garvin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -0,0 +1,65 @@
# @gar/promisify
### Promisify an entire object or class instance
This module leverages es6 Proxy and Reflect to promisify every function in an
object or class instance.
It assumes the callback that the function is expecting is the last
parameter, and that it is an error-first callback with only one value,
i.e. `(err, value) => ...`. This mirrors node's `util.promisify` method.
In order that you can use it as a one-stop-shop for all your promisify
needs, you can also pass it a function. That function will be
promisified as normal using node's built-in `util.promisify` method.
[node's custom promisified
functions](https://nodejs.org/api/util.html#util_custom_promisified_functions)
will also be mirrored, further allowing this to be a drop-in replacement
for the built-in `util.promisify`.
### Examples
Promisify an entire object
```javascript
const promisify = require('@gar/promisify')
class Foo {
constructor (attr) {
this.attr = attr
}
double (input, cb) {
cb(null, input * 2)
}
const foo = new Foo('baz')
const promisified = promisify(foo)
console.log(promisified.attr)
console.log(await promisified.double(1024))
```
Promisify a function
```javascript
const promisify = require('@gar/promisify')
function foo (a, cb) {
if (a !== 'bad') {
return cb(null, 'ok')
}
return cb('not ok')
}
const promisified = promisify(foo)
// This will resolve to 'ok'
promisified('good')
// this will reject
promisified('bad')
```

@ -0,0 +1,36 @@
'use strict'
const { promisify } = require('util')
const handler = {
get: function (target, prop, receiver) {
if (typeof target[prop] !== 'function') {
return target[prop]
}
if (target[prop][promisify.custom]) {
return function () {
return Reflect.get(target, prop, receiver)[promisify.custom].apply(target, arguments)
}
}
return function () {
return new Promise((resolve, reject) => {
Reflect.get(target, prop, receiver).apply(target, [...arguments, function (err, result) {
if (err) {
return reject(err)
}
resolve(result)
}])
})
}
}
}
module.exports = function (thingToPromisify) {
if (typeof thingToPromisify === 'function') {
return promisify(thingToPromisify)
}
if (typeof thingToPromisify === 'object') {
return new Proxy(thingToPromisify, handler)
}
throw new TypeError('Can only promisify functions or objects')
}

@ -0,0 +1,32 @@
{
"name": "@gar/promisify",
"version": "1.1.3",
"description": "Promisify an entire class or object",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/wraithgar/gar-promisify.git"
},
"scripts": {
"lint": "standard",
"lint:fix": "standard --fix",
"test": "lab -a @hapi/code -t 100",
"posttest": "npm run lint"
},
"files": [
"index.js"
],
"keywords": [
"promisify",
"all",
"class",
"object"
],
"author": "Gar <gar+npm@danger.computer>",
"license": "MIT",
"devDependencies": {
"@hapi/code": "^8.0.1",
"@hapi/lab": "^24.1.0",
"standard": "^16.0.3"
}
}

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Denis Malinochkin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,171 @@
# @nodelib/fs.scandir
> List files and directories inside the specified directory.
## :bulb: Highlights
The package is aimed at obtaining information about entries in the directory.
* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
* :link: Can safely work with broken symbolic links.
## Install
```console
npm install @nodelib/fs.scandir
```
## Usage
```ts
import * as fsScandir from '@nodelib/fs.scandir';
fsScandir.scandir('path', (error, stats) => { /* … */ });
```
## API
### .scandir(path, [optionsOrSettings], callback)
Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
```ts
fsScandir.scandir('path', (error, entries) => { /* … */ });
fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
```
### .scandirSync(path, [optionsOrSettings])
Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
```ts
const entries = fsScandir.scandirSync('path');
const entries = fsScandir.scandirSync('path', {});
const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
```
#### path
* Required: `true`
* Type: `string | Buffer | URL`
A path to a file. If a URL is provided, it must use the `file:` protocol.
#### optionsOrSettings
* Required: `false`
* Type: `Options | Settings`
* Default: An instance of `Settings` class
An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
### Settings([options])
A class of full settings of the package.
```ts
const settings = new fsScandir.Settings({ followSymbolicLinks: false });
const entries = fsScandir.scandirSync('path', settings);
```
## Entry
* `name` — The name of the entry (`unknown.txt`).
* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
* `stats` (optional) — An instance of `fs.Stats` class.
For example, the `scandir` call for `tools` directory with one directory inside:
```ts
{
dirent: Dirent { name: 'typedoc', /* … */ },
name: 'typedoc',
path: 'tools/typedoc'
}
```
## Options
### stats
* Type: `boolean`
* Default: `false`
Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
### followSymbolicLinks
* Type: `boolean`
* Default: `false`
Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
### `throwErrorOnBrokenSymbolicLink`
* Type: `boolean`
* Default: `true`
Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
### `pathSegmentSeparator`
* Type: `string`
* Default: `path.sep`
By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
### `fs`
* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
* Default: A default FS methods
By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
```ts
interface FileSystemAdapter {
lstat?: typeof fs.lstat;
stat?: typeof fs.stat;
lstatSync?: typeof fs.lstatSync;
statSync?: typeof fs.statSync;
readdir?: typeof fs.readdir;
readdirSync?: typeof fs.readdirSync;
}
const settings = new fsScandir.Settings({
fs: { lstat: fakeLstat }
});
```
## `old` and `modern` mode
This package has two modes that are used depending on the environment and parameters of use.
### old
* Node.js below `10.10` or when the `stats` option is enabled
When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
### modern
* Node.js 10.10+ and the `stats` option is disabled
In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
This mode makes fewer calls to the file system. It's faster.
## Changelog
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
## License
This software is released under the terms of the MIT license.

@ -0,0 +1,20 @@
import type * as fsStat from '@nodelib/fs.stat';
import type { Dirent, ErrnoException } from '../types';
export interface ReaddirAsynchronousMethod {
(filepath: string, options: {
withFileTypes: true;
}, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
(filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
}
export interface ReaddirSynchronousMethod {
(filepath: string, options: {
withFileTypes: true;
}): Dirent[];
(filepath: string): string[];
}
export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
readdir: ReaddirAsynchronousMethod;
readdirSync: ReaddirSynchronousMethod;
};
export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;

@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
const fs = require("fs");
exports.FILE_SYSTEM_ADAPTER = {
lstat: fs.lstat,
stat: fs.stat,
lstatSync: fs.lstatSync,
statSync: fs.statSync,
readdir: fs.readdir,
readdirSync: fs.readdirSync
};
function createFileSystemAdapter(fsMethods) {
if (fsMethods === undefined) {
return exports.FILE_SYSTEM_ADAPTER;
}
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
}
exports.createFileSystemAdapter = createFileSystemAdapter;

@ -0,0 +1,4 @@
/**
* IS `true` for Node.js 10.10 and greater.
*/
export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean;

@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
}
const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
const SUPPORTED_MAJOR_VERSION = 10;
const SUPPORTED_MINOR_VERSION = 10;
const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
/**
* IS `true` for Node.js 10.10 and greater.
*/
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;

@ -0,0 +1,12 @@
import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs';
import * as async from './providers/async';
import Settings, { Options } from './settings';
import type { Dirent, Entry } from './types';
declare type AsyncCallback = async.AsyncCallback;
declare function scandir(path: string, callback: AsyncCallback): void;
declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
declare namespace scandir {
function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise<Entry[]>;
}
declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[];
export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options };

@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Settings = exports.scandirSync = exports.scandir = void 0;
const async = require("./providers/async");
const sync = require("./providers/sync");
const settings_1 = require("./settings");
exports.Settings = settings_1.default;
function scandir(path, optionsOrSettingsOrCallback, callback) {
if (typeof optionsOrSettingsOrCallback === 'function') {
async.read(path, getSettings(), optionsOrSettingsOrCallback);
return;
}
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
}
exports.scandir = scandir;
function scandirSync(path, optionsOrSettings) {
const settings = getSettings(optionsOrSettings);
return sync.read(path, settings);
}
exports.scandirSync = scandirSync;
function getSettings(settingsOrOptions = {}) {
if (settingsOrOptions instanceof settings_1.default) {
return settingsOrOptions;
}
return new settings_1.default(settingsOrOptions);
}

@ -0,0 +1,7 @@
/// <reference types="node" />
import type Settings from '../settings';
import type { Entry } from '../types';
export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void;
export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void;
export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void;
export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void;

@ -0,0 +1,104 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
const fsStat = require("@nodelib/fs.stat");
const rpl = require("run-parallel");
const constants_1 = require("../constants");
const utils = require("../utils");
const common = require("./common");
function read(directory, settings, callback) {
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
readdirWithFileTypes(directory, settings, callback);
return;
}
readdir(directory, settings, callback);
}
exports.read = read;
function readdirWithFileTypes(directory, settings, callback) {
settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
if (readdirError !== null) {
callFailureCallback(callback, readdirError);
return;
}
const entries = dirents.map((dirent) => ({
dirent,
name: dirent.name,
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
}));
if (!settings.followSymbolicLinks) {
callSuccessCallback(callback, entries);
return;
}
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
rpl(tasks, (rplError, rplEntries) => {
if (rplError !== null) {
callFailureCallback(callback, rplError);
return;
}
callSuccessCallback(callback, rplEntries);
});
});
}
exports.readdirWithFileTypes = readdirWithFileTypes;
function makeRplTaskEntry(entry, settings) {
return (done) => {
if (!entry.dirent.isSymbolicLink()) {
done(null, entry);
return;
}
settings.fs.stat(entry.path, (statError, stats) => {
if (statError !== null) {
if (settings.throwErrorOnBrokenSymbolicLink) {
done(statError);
return;
}
done(null, entry);
return;
}
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
done(null, entry);
});
};
}
function readdir(directory, settings, callback) {
settings.fs.readdir(directory, (readdirError, names) => {
if (readdirError !== null) {
callFailureCallback(callback, readdirError);
return;
}
const tasks = names.map((name) => {
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
return (done) => {
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
if (error !== null) {
done(error);
return;
}
const entry = {
name,
path,
dirent: utils.fs.createDirentFromStats(name, stats)
};
if (settings.stats) {
entry.stats = stats;
}
done(null, entry);
});
};
});
rpl(tasks, (rplError, entries) => {
if (rplError !== null) {
callFailureCallback(callback, rplError);
return;
}
callSuccessCallback(callback, entries);
});
});
}
exports.readdir = readdir;
function callFailureCallback(callback, error) {
callback(error);
}
function callSuccessCallback(callback, result) {
callback(null, result);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save