{"_id":"@aviruk/jshp","_rev":"6-c5e5d0910abd335cb118c0cfcfc81b05","name":"@aviruk/jshp","dist-tags":{"latest":"1.1.1"},"versions":{"0.0.1":{"name":"@aviruk/jshp","version":"0.0.1","description":"JavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript","main":"./prod/index.js","bin":{"jshp":"prod/index.js"},"engines":{"node":">=11.7.0","npm":">=6.5.0"},"scripts":{"build":"tsc && echo Exited with code $?","start":"node ./prod/index.js","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AvirukBasak/JSHP.git"},"keywords":["JSHP","JHP","JavaScript","Hypertext","Preprocessor"],"author":{"name":"AvirukBasak"},"license":"MIT","bugs":{"url":"https://github.com/AvirukBasak/JSHP/issues"},"homepage":"https://github.com/AvirukBasak/JSHP#readme","dependencies":{"node-static":"^0.7.11","nodejs-info":"^1.2.1","source-map-support":"^0.5.21"},"devDependencies":{"@types/node":"^16.11.26","@types/node-static":"^0.7.7","@types/source-map-support":"^0.5.4","ts-node":"^10.4.0"},"gitHead":"0b8c41a58299ee5b84b2e806a2923d5cef8d89bc","_id":"@aviruk/jshp@0.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-7d4tlixxosip6faNMI64eShcv1P4psAc6EjysLp4WHYoSMVxevBL98DvG5zSXMZMNoq9iPr3hF0G2JOPAqTHLA==","shasum":"c5d35525a5ee83de365374c493f113baad812d2a","tarball":"https://registry.npmjs.org/@aviruk/jshp/-/jshp-0.0.1.tgz","fileCount":46,"unpackedSize":239710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLN/GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvYw/+ODVASTO4ba2DBTfwUbCKDZhKo3JYrtrMRRScWUZBLWCDUZMv\r\nhoMuq1PxhdNyCZCyuz+xfDfW7JQv8H6E2otdnnL5g1zyAKdRl1QTiBag+To9\r\nF53creRS7+UJNrQvUI75zKaW8gEEFIsRlwK8dYKrGVdmxjIDxy6Rc5ZmD0TW\r\nZwXTrDOxwoGp32MvZRy+S5CAnvUnySl6ueFpNf6JIJnGkngxr5IfVYeBIzIW\r\nSTcMbu+RZ2he38tmwbLPxXScdPYaPoiLpLq4nvvAfBRxGUpJ7y1aD7kLZ18X\r\npdD7CD10h/aWzTW/BcmEi6MuVIRc2OcdQiwUgwr/q2nhrLLKwXRkKAwtnumQ\r\nGnT6tfJm8D/WGnr9aSgc3OYYfTvRzk6ic4seZrLdA7VEc1d6kzy3rkOpuTX2\r\n+b4kGikfTeNe/WSEWPKza4m3JtjWQuMvGNIn8Xux4hZgw6193LndTkNjcjf/\r\njrncU6VeUPP3oTkoulrK+wP53cXJNBOwTFqVAczZLCIFAwip4zTiF1axY7SL\r\nrR+y0xhYbLmAFiLOoYkjSiRMGlVMsCd9LtG1r2I+qVpkXiqJJmPvfMpu+rj7\r\njDUR6erO3TolyRC9rxK2DXleeXGH7tu8W3HfnTH1Zk2nH06qvqaT8onjU98Q\r\no/vEZbzwIeoH4a3EJLytXBA7nRWSfYCus2Y=\r\n=n0gL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIArTLHLc6P+TQh9/TNG0dLT/B27Rrs9/Xe2qWLagxU/aAiEAx+OsFCzg30wJM1e+Hf1n2ZcnrqDGHPxZ6q6oQ7GFWhY="}]},"_npmUser":{"name":"aviruk","email":"avirukbasak@gmail.com"},"directories":{},"maintainers":[{"name":"aviruk","email":"avirukbasak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jshp_0.0.1_1647108038803_0.2918136358271144"},"_hasShrinkwrap":false,"deprecated":"deprecated due to incorrect package.json file: more precisely, incorrect main and bin path fields"},"0.0.2":{"name":"@aviruk/jshp","version":"0.0.2","description":"JavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript","main":"./build/index.js","bin":{"jshp":"build/index.js"},"engines":{"node":">=11.7.0","npm":">=6.5.0"},"scripts":{"build":"tsc && echo Exited with code $?","start":"node ./prod/index.js","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AvirukBasak/JSHP.git"},"keywords":["JSHP","JHP","JavaScript","Hypertext","Preprocessor"],"author":{"name":"AvirukBasak"},"license":"MIT","bugs":{"url":"https://github.com/AvirukBasak/JSHP/issues"},"homepage":"https://github.com/AvirukBasak/JSHP#readme","dependencies":{"node-static":"^0.7.11","nodejs-info":"^1.2.1","source-map-support":"^0.5.21"},"devDependencies":{"@types/node":"^16.11.26","@types/node-static":"^0.7.7","@types/source-map-support":"^0.5.4","ts-node":"^10.4.0"},"gitHead":"cfb290866333100d0f8bd05586c4f67bec0af820","_id":"@aviruk/jshp@0.0.2","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-1z8qBywubt7YQ3Ur694vHTCG2ympZKYp1DqodpqCjM/BDm5xOW+cX2xYyVUHFNc1cE+TGJbElzug6m7AsIeIPQ==","shasum":"cb160a5a4b51a352d188fd847b5266d29de0a5db","tarball":"https://registry.npmjs.org/@aviruk/jshp/-/jshp-0.0.2.tgz","fileCount":46,"unpackedSize":239712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLOQeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBAg//cuP8SB7TNqexu7gbUYLw4+GGrovVg437BE6F/09ZGwy5TMrg\r\nXh4LgnujmYLRUii+v1vqRBUgOjh1MzRGq8t5/FJ5vcf7DQ2KF6tPn8LCUs9k\r\npxbesw0Sl17r9EaRKqouUmXxYNpWjOEknbDqkeo2/mPIC3QWEhQNvHttUwTl\r\ny+eb8pKwk51Vl2P5SCOK9zstZBChhIMnZ0nFjPTjJNRehMB5KVTehPRkSHBG\r\n23Iw94liQSEzvSHHlaey/F7SSUrhrf5kCxsIz3+IUD+BqIX1w9lfdV/jpH+n\r\nCZtldYMivQDTlQqO6Q/tm/p8K4+wOJsafYO2MZgrb0+UJ73oJqQWOLFNue0i\r\nnzuCUt1zd9yOjfv6afpw9tw3fbDlmrpCAEC3T7BQh9eLC6OhunwlNY7douOm\r\n+u1uz4vJsBjzP+qCqRGGcONJE51HTdwB8dD0dC6/wWiBGhjUwNFMkvsvTD9w\r\nX4gENaxdwkm3M6k/wOQfIuSgFxVwFWNGnrl9AE0Ya5XqGHIINinGhK4WrLRo\r\nR/KM82law9E5SI67cxKeYNiUgpvlWbuG8aK2DliJcxRgAf3g6t+GArWLnUWk\r\nJxkYu33gKEAZkTnrYO9/FA6Jrfq2SaPSbpcmE5jFMtYuSunVcLLJ6tYapvZ3\r\n9u3ZPXkIuGLl11REvlKucv2IpEjocwWNQAo=\r\n=NKXm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBETiGnuh4NOyKMRPbfmFn74K3JYSTd5lypskUNWzvvTAiEAqjZowbNZtqGUE5A9DtXaBLuV/Dlgt+8K3w/idMejxhs="}]},"_npmUser":{"name":"aviruk","email":"avirukbasak@gmail.com"},"directories":{},"maintainers":[{"name":"aviruk","email":"avirukbasak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jshp_0.0.2_1647109150404_0.6538328075704067"},"_hasShrinkwrap":false},"1.0.0":{"name":"@aviruk/jshp","version":"1.0.0","description":"JavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript","main":"./build/index.js","bin":{"jshp":"build/index.js"},"engines":{"node":">=11.7.0","npm":">=6.5.0"},"scripts":{"build":"tsc && echo Exited with code $?","start":"node ./build/index.js","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AvirukBasak/JSHP.git"},"keywords":["JSHP","JHP","JavaScript","Hypertext","Preprocessor"],"author":{"name":"AvirukBasak"},"license":"MIT","bugs":{"url":"https://github.com/AvirukBasak/JSHP/issues"},"homepage":"https://github.com/AvirukBasak/JSHP#readme","dependencies":{"node-static":"^0.7.11","nodejs-info":"^1.2.1","source-map-support":"^0.5.21"},"devDependencies":{"@types/node":"^16.11.26","@types/node-static":"^0.7.7","@types/source-map-support":"^0.5.4","ts-node":"^10.4.0"},"directories":{"doc":"docs"},"gitHead":"b9e31f024205d79877ec1a1e6d31528666d676b9","_id":"@aviruk/jshp@1.0.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-/ejhXMeGtqhnZMGwMLoUxS6Q5XdV5+IFc+4aRZ/82Cvx//PtV6dOzmb8/+SYOeFeEruwnbasg1nqs3JfjGe/Lg==","shasum":"a3d6c7c2ad75ba38fef505721e019ecdf2170a25","tarball":"https://registry.npmjs.org/@aviruk/jshp/-/jshp-1.0.0.tgz","fileCount":46,"unpackedSize":244746,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgnuK5FT2kbzlK0OUWQ0dmVTO6cDGOUh+nhJc/ma8+gAiBiIOIF3dhmQOTutPiUkewIKjBbYgxX8JClrfArYjlOZQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPY9eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpq+Q//YTJ6/2zlgZPMUJbw2VIYODOBkvHxahmyQLzVXFwaFa9eBY0m\r\nYOUjxiAbOxApNpiw1cj1ZZEsrWFGjl/xZwcJYy6oY7OFDMKjRMODDoLt6U9t\r\nUdKhI1Hy83WCNRrXENVIjp7ZJSbNsYH2qD8xW3jawuE7RBnsqnleT1YBEeH1\r\nO7tUxMV2YoONFFEx3V7Djj/Rvsc1sn67BdgcLM45WAaes9aNMl3cmNSEd9or\r\nZ7bAz7RcWytoryuewKb7mLqVCsJv02ArNdmgc0P/AAHOudUNW5Zmqmb3VyjH\r\nARzFFY/ZPUNxh9kSqdymfvJrwYK7cP5ZCVz/dRM4u10TLtblSO8plR1qVEos\r\nJcSgzRIFqRsJhIS0h4kk+/5AF2hHAX67RwAIWHs+fEQT+OWPoJBT9wjJWNyT\r\n9d+EN+Ao7NgCwmHcORLfjCLrwcDfIU1UlL885K5k5RrrgTjYtO+TCD/L/5wq\r\nnh7pXj3UcDT7dWjTD9X248ANq1BLZu0A5i1/52d96yQddWauDBHTPRPTzvJT\r\nAWvkGrExDjXqOMHPGsnVxzNNlqZjoSEbsa8kUtkIzrF2qoiMijdBsV1yI6Rx\r\nOZdCIjyW2J8EDOdvKfk96rcmWUV3GB6t+ac2znA6rVn+7FwoTyR04BDpaQdd\r\n3Jdrhke2/ezT9T5/XfIpjKhr6NJUsi8isNQ=\r\n=oeKf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aviruk","email":"avirukbasak@gmail.com"},"maintainers":[{"name":"aviruk","email":"avirukbasak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jshp_1.0.0_1664978782203_0.04982864177679058"},"_hasShrinkwrap":false},"1.1.0":{"name":"@aviruk/jshp","version":"1.1.0","description":"JavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript","main":"./build/index.js","bin":{"jshp":"build/index.js"},"engines":{"node":">=11.7.0","npm":">=6.5.0"},"scripts":{"build":"tsc && echo Exited with code $?","start":"node ./build/index.js","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AvirukBasak/JSHP.git"},"keywords":["JSHP","JHP","JavaScript","Hypertext","Preprocessor"],"author":{"name":"AvirukBasak"},"license":"MIT","bugs":{"url":"https://github.com/AvirukBasak/JSHP/issues"},"homepage":"https://github.com/AvirukBasak/JSHP#readme","dependencies":{"node-static":"^0.7.11","nodejs-info":"^1.2.1","source-map-support":"^0.5.21"},"devDependencies":{"@types/node":"^16.11.26","@types/node-static":"^0.7.7","@types/source-map-support":"^0.5.4","ts-node":"^10.4.0"},"directories":{"doc":"docs"},"gitHead":"0168c0e9f9613a32c710554b6b4d7465406a26f9","_id":"@aviruk/jshp@1.1.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-YHYX8kvxx9H2A+bpx4nV/wYK3EGKfnRRLkvxmu8nBnNanlt+vUg5ZtNQMcjHyobhi9LXNgFDTIxyaLKZaBFwOw==","shasum":"ef3be13a4c259f6029431802a51381ddecf8b5c1","tarball":"https://registry.npmjs.org/@aviruk/jshp/-/jshp-1.1.0.tgz","fileCount":46,"unpackedSize":248985,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXku+sNhvln1nXdLQT7Ui+f1Er73c9ZwlBIqFQleXpWAIhAKwtCpz/GI8bxHN3tswrZza9KbVvz28rDp6Ju+82el+e"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPoOSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4HBAAnCg4h+/QnnKscj0PYq08hhAIDpgkKMAHEnrKnbJoP7OYFEEV\r\nVjEAA5YfMvWRsNq/qwg/91rbm2rd/Tz1gh90Yf8708FVAcP2azcNwwGzGoTF\r\nAToNuMMhLr9kiuC44QP4ifhI+Vh56sXHE+KqNsUGqtsX1IMIR9yvepmbS2pB\r\nEpKCN8t/XQ3Y85uLYLnMwXdAsBLROIcpN7A87T+Pnt5ujFIpCXFARQ57Vg0Y\r\nG2CI+sQweav3F/yJsQbB0Hh0QKSENDHscIx72wVlXmCzp2wDK8bIjjiD8aKS\r\nYoMf90R/idyXcxgxXZ4BdRetxvZCyqEypz/HQV5CcGFAz2Owz7OPfePLOfBZ\r\nxZacEraPcV5QY4wfoGPBNSw7odBTQTBjLHiD1CFVZQQT7Kng8HeHaTiGa8W0\r\ny7CS5u7N2Xn2vZJTKjuPqDxt6U8DiLwn59pJER8/mW+hf8VMv1+wFOHMRFni\r\npS/xcKyHs2KpKo3uR3qBP3bsvRhpLhvCZkz6Yzbv0l3zGVREw5KmgBdg4a3x\r\ndZPTOPxmPRl3zB8ouYHqj9PI1vK0+jMOtfNwwyqLDViWssnqXVE3zxkmyGjd\r\ngt9/35HO3R7KSdDOG/B/cmhItWrwzssOLkTMdgwXBF+YmTmSByt2vqysGanh\r\n4prOSvObGyeBceZYX974IeiaEZm91YXkLok=\r\n=fDjf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aviruk","email":"avirukbasak@gmail.com"},"maintainers":[{"name":"aviruk","email":"avirukbasak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jshp_1.1.0_1665041298344_0.4682268515996115"},"_hasShrinkwrap":false},"1.1.1":{"name":"@aviruk/jshp","version":"1.1.1","description":"JavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript","main":"./build/index.js","bin":{"jshp":"build/index.js"},"engines":{"node":">=11.7.0","npm":">=6.5.0"},"scripts":{"build":"tsc && echo Exited with code $?","start":"node ./build/index.js","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AvirukBasak/JSHP.git"},"keywords":["JSHP","JHP","JavaScript","Hypertext","Preprocessor"],"author":{"name":"AvirukBasak"},"license":"MIT","bugs":{"url":"https://github.com/AvirukBasak/JSHP/issues"},"homepage":"https://github.com/AvirukBasak/JSHP#readme","dependencies":{"node-static":"^0.7.11","nodejs-info":"^1.2.1","source-map-support":"^0.5.21"},"devDependencies":{"@types/node":"^16.11.26","@types/node-static":"^0.7.7","@types/source-map-support":"^0.5.4","ts-node":"^10.4.0"},"directories":{"doc":"docs"},"gitHead":"54c8b6596d4be44299687130fbeb36d422bcf624","_id":"@aviruk/jshp@1.1.1","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-WlTFbba+ZDGljRriSibS+uRmz8KsGtV0NUQq6asz3sgTEIMplwfa/AnIn2sUfIDkWvAocyLTHEq/G8wqLC6/GQ==","shasum":"d7a030520ae79091106c4d9f7f09a3398ef7d24e","tarball":"https://registry.npmjs.org/@aviruk/jshp/-/jshp-1.1.1.tgz","fileCount":46,"unpackedSize":249069,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFkPR1OL1hqNHy23LslmVUNCt/eQjb0QgMnYm16WqG2gIhAON10dOccxU35DQYL7NfaDkmkNeQI80zY1zw8MAyTDQz"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPpPvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8kQ/+MkNJRsd1PIBPuBu0KVA6Ih1bDKXgzs5HPP1/a65STTciEkPU\r\nfb2EG0BTAq9J1kpLJ7UIKh7cptjn3aZ1PsdGV7gtA7AjiUF4R/TnueHo86qs\r\nagMxZ0WJKuLhxL7Ypw80rta2jP5iow/bJzByJQrb380qvgS/3esCPpnKbOL7\r\nCNo4m8TBECF7eMVWE9vFu1zRkWTh5h39ZgVCHRdefoMGtvTSgUdiJGxBhrDN\r\ntIYeE2BzWM0KNotUiHyuDVa6EmcT901q5ndEp23rUoD0dmz4xtnw0Hmfy3cE\r\ne2U8pV8CWFnDSEPXQydJZqmbH6ovlWTWAAJ+5IE2nwH1vJKtgIjcq30DmlPB\r\n2hFC5l965QjxZ8uTCPm9sfgD7ksj9C4VhNTtaGECkCdbEqhKJEp03z3M/aMv\r\nADPLB0PD+anLt5QHpP7aTdSM9qXyzivHOQCrEqTESaBcsHx7dF3pKYOfkKJe\r\n1de6jwIJhgamBCW4bDsB2QEetr9mgDyij2E0JH1+L4/3SWPVnVqiTJrdrLtN\r\nKZAK2Y2UzuHJvQGcD6jZMCPBcvE9vIF1JEQu2pe113X0AyeVxyl3eQW9TxhN\r\nJpNGM/O5OE0Py4ypYeYB3F3xJrFcOJGQQ171opH3nzt2kvrsWeTEURNlRKi/\r\ndbmov8MBgDRy1f/OGH8qMZ8rhbFlADv3N34=\r\n=YX6y\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aviruk","email":"avirukbasak@gmail.com"},"maintainers":[{"name":"aviruk","email":"avirukbasak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jshp_1.1.1_1665045487451_0.9804649608081955"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-12T18:00:38.737Z","0.0.1":"2022-03-12T18:00:38.960Z","modified":"2022-10-06T08:38:07.730Z","0.0.2":"2022-03-12T18:19:10.555Z","1.0.0":"2022-10-05T14:06:22.350Z","1.1.0":"2022-10-06T07:28:18.513Z","1.1.1":"2022-10-06T08:38:07.641Z"},"maintainers":[{"name":"aviruk","email":"avirukbasak@gmail.com"}],"description":"JavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript","homepage":"https://github.com/AvirukBasak/JSHP#readme","keywords":["JSHP","JHP","JavaScript","Hypertext","Preprocessor"],"repository":{"type":"git","url":"git+https://github.com/AvirukBasak/JSHP.git"},"author":{"name":"AvirukBasak"},"bugs":{"url":"https://github.com/AvirukBasak/JSHP/issues"},"license":"MIT","readme":"# JSHP\nJavaScript Hypertext Preprocessor - Inspired by PHP, in JavaScript.\n\nVisit [JSHP-App](https://github.com/AvirukBasak/JSHP-App) to view the demo project.\n\n## Index\n1. [Requirements](#requirements)\n    - [Why not older NodeJS versions?](#why-not-older-nodejs-versions)\n2. [CLI use](#cli-use)\n3. [Script use](#script-use)\n4. [Coding](#coding)\n    - [JSHP HTML file](#jshp-html-file-jshphtml)\n    - [Syntax](#syntax)\n    - [HTML template tags](#html-template-tags)\n5. [The configuration file](#the-configuration-file)\n6. [Config properties](#config-properties)\n    - [defaultHeaders](#1-defaultheaders)\n    - [logPath](#2-logpath)\n    - [inlineLogLength](#3-inlineloglength)\n    - [indexFile](#4-indexfile)\n    - [timeoutSec](#5-timeoutsec)\n    - [execExtensions](#6-execextensions)\n    - [trailingSlashes](#7-trailingslashes)\n    - [noExtension](#8-noextension)\n    - [matchConfig](#9-matchconfig)\n    - [buildDir](#10-builddir)\n    - [hotCompile](#11-hotcompile)\n    - [compileOnStart](#12-compileonstart)\n    - [forbidden](#13-forbidden)\n    - [rewrites](#14-rewrites)\n    - [redirects](#15-redirects)\n    - [errFiles](#16-errfiles)\n    - [respondInChunks](#17-respondinchunks)\n    - [chunkLimit](#18-chunklimit)\n    - [chunksPerEcho](#19-chunksperecho)\n7. [Hidden config](#hidden-config)\n8. [Global variables](#global-variables)\n9. [Functions](#functions)\n10. [Special functions](#special-functions)\n11. [Importing modules](#importing-modules)\n12. [Async and await](#async-and-await)\n13. [Module variables](#module-variables)\n14. [Security bug 1](#security-bug-1)\n\n## Requirements\n- NodeJS `>= 11.7.0`\n- NPM `>= 6.5.0`\n\n### Why not older NodeJS versions?\n- Because `worker_threads` is used to execute`JSHP` codes.\n- This ensures lengthy or buggy codes do not block server operations.\n- This also prevents server from crashing due to errors in async JSHP codes.\n\n## CLI use\nTo run as a CLI executable, run `npm i -g @aviruk/jshp`.\nThen run `jshp` from the CLI.\n```\nUSAGE: jshp [option] [args]\n  help                      Display this message\n  compile [path]            Parse JSHP codes to JS from [path]\n  compile --verbose [path]  List source files\n  serve [host:port] [path]  Serve files from [path]\n  serve [:port] [path]      [host] defauts to 0.0.0.0\n  version                   Display version information\n```\n\nUse the `--debug` flag with `compile` or `server` to view stack traces of crashes that occurred during execution.\n\nNote that the debug flag is meant for debugging this package.\nIt isn't meant for debugging your JSHP code.\n\n#### Example\n```bash\njshp serve :8080 ~/Public\n```\n\n## Script use\nTo use as a dependency run `npm i @aviruk/jshp`.\n\nOnce that is done, you can use a JavaScript file to spin up the server using a function from the module as shown.\n\nThis function can be imported by another script.\nIt basically wraps around the actual CLI function, allowing arguments to be sent.\n\nAs a result, this function behaves exactly like the CLI.\n\n#### Example\n```JavaScript\nconst jshp = require('@aviruk/jshp').jshp;\n\n/**\n * @param {string} option   The corresponding CLI option, used 'serve' in this example\n * @param {string} hostname Use format 'host:port' or ':port'. Example: localhost:8080.\n * @param {string} path     The path to server resources\n */\njshp('serve', ':8080', '~/Public');\n```\n\n## Coding\n- Create an `index.jshp.html` file in your server directory.\n- Write normal HTML code.\n- For JSHP tags, strictly use the given syntax.\n- Note that all JSHP code will be executed in `use strict` mode.\n- Use `jshp` to `serve` the directory.\n\n### JSHP HTML file (.jshp.html)\nUses standard HTML/CSS/JS syntax highlighting and is supported in all text editors.\nThe only caveat is a lengthy tag declaration.\n\nIf you want your change executable file extension, you'll need to specify it in [execExtensions](#5-execextensions).\n\n#### Examples\n```HTML\n<!-- html code -->\n    <script jshp>\n        // JS code\n    </script>\n<!-- more html code -->\n```\n\nAlternatively, you can use the following\n```HTML\n<!-- html code -->\n    <?jshp\n        // JS code\n    ?>\n<!-- more html code -->\n```\n\nOr, you can use the following\n```HTML\n<!-- html code -->\n    <?\n        // JS code\n    ?>\n<!-- more html code -->\n```\n\n### Syntax\n- Starting tag should exactly be as shown above.\n- Ending tag should exactly be as shown above.\n- Tag declarations are `case-sensitive`.\n- Excess spaces and newlines within the tag declaration isn't valid.\n\n#### Example:\n```HTML\n<body>\n    <script jshp>\n        const number = Number($_GET['num']);\n    </script>\n    <p>\n        <b>Series: </b>\n        <?\n            const arr = [];\n            for (let i = 0; i < number; i++) {\n                arr.push(i);\n            }\n            echo(String(arr));\n        ?>\n    </p>\n</body>\n```\n\nThe returned value of the code inside a scoped code block will show up in the page.\n\n### HTML template tags\nDuring parsing, code within `<?( )?>` will be evaluated.\nThe value of the code will be displayed on the page.\n\nThese tags should be preferred only for displaying values from variables.\n\n#### Example:\n```HTML\n<body>\n    <script jshp>\n        const NAME = $_GET['name'];\n        const UID = $_GET['id'];\n    </script>\n    <p><b>Names: </b><?( NAME )?></p>\n    <p><b>UID: </b><?( UID.toUpperCase() )?></p>\n</body>\n```\n\nIn the above code, `NAME` and `UID.toUpperCase()` are used inside the template tags.\n\n## The configuration file\nA file named `config.json` placed at the root of server resources will contain configurations for the server.\n\nAny property specified in `config.json` fully overwrites default config values.\nTherefore, if the property to be specified is an array (or object like [matchConfig](#8-matchconfig)), then all its properties must be specified in the config.json file.\nOtherwise, the server might crash.\n\n#### Bad\nIf you don't want to expose `/config.json`, `/server.log` and `/.builds` directories, you shouldn't do this.\n\nThey contain information about your server, your server code, etc, and you don't want to expose them.\n\n```JSON5\n\"forbidden\": [\n    \"/private/.*\",\n    \"/data/.*\",\n    \"/assets/.*\"\n]\n```\n\n#### Good\n```JSON5\n\"forbidden\": [\n    \"/config\\\\.json\",        // default\n    \"/server\\\\.log\",         // default\n    \"/\\\\.builds/.*\",         // default\n    \"/private/.*\",\n    \"/data/.*\",\n    \"/assets/.*\"\n]\n```\n\n## Config properties\nThe server can understand only the following properties.\n\nIf you declare a property the server doesn't understand, it won't cause any errors.\nYou will be able to access those properties from the `$_CONFIG` object in your JSHP code.\n\n### 1. defaultHeaders\nHeaders specified here are written to every response.\n\n**Default:** `\"defaultHeaders\": {}` i.e. an empty object.\n\n### 2. logPath\nPath to server log file. Logging can be turned off by setting property value to empty string.\n\n#### Format:\n```\n[date time] <type> <client-address> <method/response-code> <path>\n```\n\n#### Example:\n```\n[2021-12-30@11:26:26] INFO ::1 GET /favicon.ico\n[2021-12-30@11:26:26] INFO ::1 200 /favicon.ico\n[2021-12-30@11:26:46] INFO ::1 GET /config/\n[2021-12-30@11:26:46] INFO ::1 200 /config/index.jshp.html\n[2021-12-30@11:27:10] INFO ::1 GET /favicon.ico\n[2021-12-30@11:27:10] INFO ::1 200 /favicon.ico\n[2021-12-30@11:27:35] INFO ::1 GET /config.json\n[2021-12-30@11:27:35] ERROR ::1 403 /config.json\n```\n\n**Default:** `\"logPath\": \"/server.log\"`.\n\n### 3. inlineLogLength\nThe maximum number of characters from a passed string that can be printed by `Logger` functions in 1 line (see <code>[Functions -> Logger.info(any)](#functions)</code>).\n\nBeyond this length, the message is printed below.\n\n**Default:** `\"inlineLogLength\": \"96\"`\n\n### 4. indexFile\nPath to the index file if requested path is a directory.\n\nDirectories must end with a `/` in the get request.\nOtherwise they are considered files, unless [trailingSlashes](#7-trailingSlashes) is disabled.\n\n#### Example\nIf `\"indexFile\": \"main.jshp.html\"` then for request\n```\nGET /msg/ HTTP/1.1\nHost: xyz.net\nConnection: close\n\n```\nthe server serves the file `/msg/main.jshp.html`.\nBut as the file has a `.jshp.html` extension, it gets executed.\n\n**Default:** `\"indexFile\": \"index.jshp.html\"`.\n\n### 5. timeoutSec\nRequest times out with `500` after a specified number of seconds.\nThis timeout dictates how long a JSHP code is allowed to be parsed.\nIf JSHP code contains an infinite loop (or similar), it'll be killed after specified seconds.\n\n**Default:** `\"timeoutSec\": 10`\n\n### 6. execExtensions\nExtensions of files that needs to be parsed for executing JSHP codes.\n\n#### Example\nIf `\"execExtensions\": [ \".jshp.html\" ]` then only files ending with those extensions will get parsed.\n\nOn parsing, if the parser finds any executable JavaScript, it'll get executed, and any non-executable part will be copy-pasted.\n\n**Default:** `\"execExtensions\": [ \".jshp.html\" ]`\n\n### 7. trailingSlashes\nTrailing slashes after a directory isn't required if set to false. This property is a syntactic sugar for [noExtension](#8-noExtension).\n\n**Default:** `\"trailingSlashes\": true`\n\n### 8. noExtension\nIf requested path is a file and has no extension, server will look for a file having requested name and one of these extensions.\n\n#### Example\nIf `\"noExtension\": [ \".jshp.html\" ]` then for request\n```\nGET /msg/main HTTP/1.1\nHost: xyz.net\nConnection: close\n\n```\nthe server serves the file `/msg/main.jshp.html`.\nThat is because `main.jshp.html` is a file having name `main` and ending with and extension specified in `noExtension`.\nBut as the file has a `.jshp.html` extension, it gets executed.\n\nIf specified extension is a `'/'`, then for the directory `/msg/`, trailing slash will not be required.\n\n#### Example\nIf `\"noExtension\": [ \"/\", \".jshp.html\" ]` and `\"indexFile\": \"main.jshp.html\"` then for request\n```\nGET /msg HTTP/1.1\nHost: xyz.net\nConnection: close\n\n```\nthe server serves the file `/msg/main.jshp.html`.\n\nThis is because a `'/'` is also treated as an extension, but the path is a directory.\nFor it to work, the index file of the directory must be specified in [indexFile](#4-indexFile).\n\n**Default:** `\"noExtension\": [ \".jshp.html\" ]`\n\n### 9. matchConfig\nThis property specifies how regexes in the config file are handled.\nNot all config properties support regexes.\nIf a property supports regex, it'll have the word `REGEXSUP` in its section of description.\n\n#### Default\n```JSON5\n\"matchConfig\": {\n    \"matchFromStart\": true,\n    \"matchTillEnd\": true\n}\n```\nIf the default is kept then for properties that support regex, `matchFromStart` adds `^` to the beginning of the regex and `matchTillEnd` adds `$` to its end.\n\n#### Example\nIf config is\n```JSON5\n\"rewrites\": [\n    {\n        \"req\": \"/chat.*\",\n        \"src\": \"/messaging/chat/index.jshp.html\"\n    }\n]\n```\nthen, `/chat.*` is turned into the regex `/^\\/chat.*\\/$/`.\nThis means any path starting with `/chat` is rewritten to the `src`.\n\nLearn more about rewriting paths in [rewrites](#14-rewrites) section.\n\nIf `matchTillEnd` is disabled, `/chat.*` would be turned into the regex `/^\\/chat.*\\//`.\n\n### 10. buildDir\nPath to directory under resource root where compiled codes are kept.\n\n#### Caution\nMake sure your build directory is listed in [forbidden](#13-forbidden) to prevent clients from reading your code.\n\nOtherwise, quite understandably, your source code will get leaked.\n\n**Default:** `\"buildDir\": \"/.builds/\",`\n\n### 11. hotCompile\nIf `true`, JSHP files will be compiled every time that file is requested. Suitable for testing and debugging.\n\n**Default:** `\"hotCompile\": false`\n\n### 12. compileOnStart\nIf `true`, JSHP code will be compiled to executable JS during server startup.\n\n**Default:** `\"compileOnStart\": false`\n\n### 13. forbidden\nIf any of these files are requested, response is `403`.\n\n**Note:** This property supports regexes (`REGEXSUP`).\n\n#### Default\n```JSON5\n\"forbidden\": [\n    \"/config\\\\.json\",\n    \"/server\\\\.log\",\n    \"/\\\\.builds/.*\"\n]\n```\n\n### 14. rewrites\nFor a specified path, server sends response from another specified path.\n\n#### Example\nIf config is\n```JSON5\n\"rewrites\": [\n    {\n        \"req\": \"/chat\",\n        \"src\": \"/messaging/chat/index.jshp.html\"\n    }\n]\n```\nthen for request\n```\nGET /chat HTTP/1.1\nHost: xyz.net\nConnection: close\n\n```\nthe server serves the file `/messaging/chat/index.jshp.html`.\n\nIt is not a redirection, so it'll result in `200` if `/messaging/chat/index.jshp.html` is a valid request path.\n\n**Note:** Property `req` of this property supports regexes (`REGEXSUP`).\n\n**Default:** `\"rewrites\": []` i.e. an empty array.\n\n### 15. redirects\nFor a specified path, server sends response `3xx` with a `Location` header.\n\n#### Example\nIf config is\n```JSON5\n\"redirects\": [\n    {\n        \"req\": \"/chat\",\n        \"src\": \"/messaging/chat/index.jshp.html\",\n        \"status\": 301\n    }\n]\n```\nthen for request\n```\nGET /chat HTTP/1.1\nHost: xyz.net\nConnection: close\n\n```\nthe server responds with\n```\nHTTP/1.1 301 Moved Parmanently\nLocation: /messaging/chat/index.jshp.html\n.\n.\n.\n\n```\nThis request is a redirection, so it'll result in `3xx`.\n\n**Default:** `\"redirects\": []` i.e. an empty array.\n\n**Note:** Property `req` of this property supports regexes (`REGEXSUP`).\n\n**Note:** Redirects work for external domains as well.\nBut redirects are not open to the client.\nThe server redirects only if you specify it in `config.json`.\n\n**Note:** If a path is present in both `rewrites` and `redirects`, the server will\ndo a rewrite.\n\nThis is because a request is first checked for rewrites and then for redirects.\n\n### 16. errFiles\nFor a specified HTTP error, a specified file is sent as a response.\n\n#### Example\nIf config is\n```JSON5\n\"errFiles\": {\n    \"404\": \"/404.jshp.html\",\n    \"403\": \"/403.jshp.html\"\n}\n```\nthen for a `404` error, server serves the file `/404.jshp.html`.\n\nIf the specified file doesn't exist, an empty response is sent.\n\n**Default:** `\"errFiles\": {}` i.e. an empty object.\n\n### 17. respondInChunks\nIf `true`, server will use `response.write` to send responses.\nFor every `echo`, server does this depending on the next 2 properties.\n\nBy default, it's kept off.\nAs a result, the server waits for the entire page to be generated server side, and then it uses `response.end` to serve the page.\n\n#### Drawbacks\n- You have to use `setStatusCode()`, `setHeader()` and `setCookie()` before you've written any HTML or echoed something.\n- Content-Length header won't be set.\n- Has no practical improvements.\n\n**Default:** `\"respondInChunks\": false`\n\n### 18. chunkLimit\nCharacter / byte limit beyond which echoed data gets broken into pieces.\n\n**Default:** `\"chunkLimit\": 200`\n\n### 19. chunksPerEcho\nNumber of chunks in which echoed data is to be split.\n\n**Default:** `\"chunksPerEcho\": 2`\n\n## Hidden config\nThese config properties are auto generated by the server during startup and on calling `Server.reloadConfig()`.\n\nSpecifying these properties in `config.json` has no effect as the server will just overwrite any of these properties.\n\n### 1. host\nServer host, collected from the `host:port` argument.\n\n### 2. port\nServer port, collected from the `host:port` argument.\n\n### 3. resRoot\nA string containing the path to server resources, collected from the `path` argument.\n\n### 4. rewriteList\nIt's an array of all those paths that are to be rewritten.\n\n### 5. redirectList\nIt's an array of all those paths that are to be redirected.\n\n### 6. srcMapping\nIt's an object mapping sources (jshp files) to their respective JavaScript compiled files.\nIt is generated when JSHP code is compiled.\n\n## Global variables\n- `$_ENV` - Object, Stores system environment variables\n- `$_CONFIG` - Object, Stores server configuration data\n- `$_RES_ROOT` - String, Stores the path to server resources\n- `$_REQUEST` - Object, Some request data\n- `$_HEADERS` - Object, Stores headers of request\n- `$_COOKIES` - Object, Not yet implemented\n- `$_GET` - Object, Stores url parameters\n- `$_POST` - Object, Not yet implemented\n- `$_SERVER` - Object, Stores some server variables, work in progress\n- `$_SESSION` - Object, Not yet implemented\n\n## Functions\n- **setHeader(name, value)** - Sets header of current response\n- **setStatusCode(code)** - Sets response code\n- **setCookie(name, value)** - Not yet implemented\n- **writeToResponse(string or Buffer)** - Writes some data directly to response\n- **endResponse(string or Buffer, encoding)** - Similar to http module's `response.end()`;\n- **Logger.info(any)** - Write an info to the console\n- **Logger.error(any)** - Write an error to the console\n- **Logger.warn(any)** - Write a warning to the console\n- **echo(str)** - Displays text/HTML\n- **Message.echo(str, color?)** - Displays text/HTML within a color bordered box\n- **Message.warn(str)** - Displays text/HTML within a tangerine bordered box\n- **Message.error(str)** - Displays text/HTML within a red bordered box\n- **File.read(path, callback)** - Synchronously reads file, optional callback, returns a Buffer\n- **File.write(path, data, callback)** - Asynchronously writes file, optional callback, data is a Buffer\n- **ResponseCode.list()** - Get a list of response codes with their status messages.\n- **ResponseCode.getMessage(number)** - Get status messages of a response code.\n\n## Special functions\n- **prequire(path)** - Loads a module for the `jshp` file.\n- **nodejsinfo()** - Displays some server information.\n- **jshpinfo()** - Same as `nodejsinfo`.\n- **getStatusCode()** - Get status code of current page.\n- **Server.reloadConfig()** - Reload config data from config.json\n- **Server.fileCompile(path)** - Selectively recompile a file.\n- **Server.recompile()** - Re-run compilation to include source code changes\n- **Server.putResHash(algorithm)** - Writes hash of response to header `x-response-hash`, algorithm is `md5` by default.\n\n## Importing modules\nFor `jshp` files, `require` will not work. `require` will attempt to load modules relative to directory of the executable.\nTo load modules relative to the server resources root, a specialised function `prequire` is provided.\n\nSyntax\n```HTML\n<script jshp>\n    const mod = prequire('prebuilt-node-module');\n    const mod1 = prequire('js:my-dir/my-module');\n    const mod2 = prequire('/my-dir/my-module.js');\n    const mod3 = prequire('jshp:my-dir/my-jshp-file.jshp.html');\n    m1.foo();\n    m2.foo();\n    m3.loadMyContents();\n</script>\n```\n\nNote that paths to prequire (starting with `js:`, `jshp:` and `/`) are evaluated relative to `$_RES_ROOT`.\n\nNote that the `js:` prefix is optional for loading JavaScript files.\n\nBut the `jshp:` prefix is absolutely necessary if another `jshp` file is to be loaded.\n\nOtherwise the server will attempt to run that `jshp` file as JavaScript, and crash and burn.\n\n## Async and await\nNote that certain functions return promises. They are\n- `getStatusCode()`\n- `Server.reloadConfig()`\n- `Server.fileCompile(path)`\n- `Server.recompile()`\n\nWithout proper promise handling, you might get errors.\nIt is recommended that you use `await` keyword for a clean looking code.\n\n#### Example\n```HTML\n<script jshp>\n    echo(await getStatusCode());            // echoes status code\n    Message.echo(JSON.stringify(            // Message.echo doesn't accept Objects\n        await Server.recompile(), null, 4)  // echoes the source map data (used by server)\n    );\n</script>\n```\n\nIf you're wondering why you can use await without creating another async function to containing it,\nthat's because behind the scenes, the whole JSHP code runs in an async function.\n\n## Module variables\n- `HTTP` - NodeJS `http` module\n- `URL` - NodeJS `url` module\n- `PATH` - NodeJS `path` module\n- `FS` - NodeJS `fs` module\n\n## Security bug 1\nRefer to [GHSA-8r4g-cg4m-x23c](https://github.com/advisories/GHSA-8r4g-cg4m-x23c).\n- `node-static` v <= 0.7.11 is affected.\n- as of 25th Dec, 2021, no fixed npm package is available.\n- The issue was fixed in `node-static PR #227`.\n- As a workaround for JSHP, a request is first checked for `%00`.\n","readmeFilename":"README.md"}