├── .gitignore ├── CODE_OF_CONDUCT.md ├── Contributing.md ├── LICENSE ├── README.md ├── html files ├── education.html ├── experience.html ├── hobbies.html ├── home.html ├── logo 1.jpeg ├── personal_info.html ├── skills.html └── toggle.js ├── node_modules ├── har-schema │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── afterRequest.json │ │ ├── beforeRequest.json │ │ ├── browser.json │ │ ├── cache.json │ │ ├── content.json │ │ ├── cookie.json │ │ ├── creator.json │ │ ├── entry.json │ │ ├── har.json │ │ ├── header.json │ │ ├── index.js │ │ ├── log.json │ │ ├── page.json │ │ ├── pageTimings.json │ │ ├── postData.json │ │ ├── query.json │ │ ├── request.json │ │ ├── response.json │ │ └── timings.json │ └── package.json ├── har-validator │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── async.js │ │ ├── error.js │ │ └── promise.js │ └── package.json ├── hasha │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── hbs │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── async.js │ │ └── hbs.js │ └── package.json ├── html-pdf │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── index.js │ ├── examples │ │ ├── businesscard │ │ │ ├── businesscard.html │ │ │ ├── businesscard.png │ │ │ ├── image.png │ │ │ └── test.js │ │ └── serve-http │ │ │ └── index.js │ ├── lib │ │ ├── index.js │ │ ├── pdf.js │ │ └── scripts │ │ │ └── pdf_a4_portrait.js │ └── package.json └── http-errors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── package-lock.json ├── package.json ├── public └── Resources │ └── Images │ ├── Untitled design.jpg │ ├── education.png │ ├── experience.png │ ├── personal.png │ └── skills.png ├── server.js ├── vercel.json └── views ├── final.hbs └── preview.hbs /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /Contributing.md: -------------------------------------------------------------------------------- 1 | ## 📌How to Contribute📝: 2 | 3 | To contribute, look out for the issues raised by the maintainers as well as the other participants for contributions. 4 | Comment down your github ID and tell that you're working on the issue. 5 | 6 | ### To start contributing, follow the below guidelines: 7 | 8 | **1.** Fork [this](https://github.com/killerraj369/Resume-Maker) repository. 9 | 10 | **2.** Clone your forked copy of the project. 11 | 12 | ``` 13 | git clone https://github.com//Resume-Maker.git 14 | ``` 15 | 16 | **3.** Navigate to the project directory :file_folder: . 17 | 18 | ``` 19 | cd Resume-Maker 20 | ``` 21 | 22 | **4.** Add a reference(remote) to the original repository. 23 | 24 | ``` 25 | git remote add upstream https://github.com/killerraj369/Resume-Maker.git 26 | ``` 27 | 28 | **5.** Check the remotes for this repository. 29 | 30 | ``` 31 | git remote -v 32 | ``` 33 | 34 | **6.** Always take a pull from the upstream repository to your master branch to keep it at par with the main project(updated repository). 35 | 36 | ``` 37 | git pull upstream main 38 | ``` 39 | 40 | **7.** Create a new branch. 41 | 42 | ``` 43 | git checkout -b 44 | ``` 45 | 46 | **8.** Perfom your desired changes to the code base. 47 | 48 | **9.** Track your changes:heavy_check_mark: . 49 | 50 | ``` 51 | git add . 52 | ``` 53 | 54 | **10.** Commit your changes . 55 | 56 | ``` 57 | git commit -m "Relevant message" 58 | ``` 59 | 60 | **11.** Push the committed changes in your feature branch to your remote repo. 61 | 62 | ``` 63 | git push -u origin 64 | ``` 65 | 66 | **12.** To create a pull request, click on `compare and pull requests`. 67 | 68 | **13.** Add appropriate title and description to your pull request explaining your changes and efforts done. 69 | 70 | **14.** Click on `Create Pull Request`. 71 | 72 | 73 | **15.** Woohoo! You have made a PR to the Resume-Maker :boom: . Wait for your submission to be accepted and your PR to be merged. 74 | 75 | **Thank you for your interest in contributing to our Repo!🏼** 76 | 77 | **Kudos to you🎈** 78 | 79 | **Best of luck 👍😊** 80 | 81 | 82 | LOOKING FORWARD TO YOUR CONTRIBUTIONS! 83 | 84 |
85 | 86 |
87 | 88 | ### Show some ❤️ by starring⭐ this awesome Repository! 89 | 90 |
91 | 92 |
93 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Vaibhav Raj 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Resume-Maker 2 | A Web App to Make your Resume built using Bootstrap and Handelbars 3 | 4 | Site link: [https://resume-maker-killerraj369.vercel.app](https://resume-maker-killerraj369.vercel.app/) 5 | 6 | # Contributing for Resume-Maker 7 | Do check [this](https://github.com/killerraj369/Resume-Maker/blob/main/Contributing.md) before contributing. 8 | 9 | ## Table of Contents 10 | * [Hacktoberfest 2022](#hacktoberfest-2022) 11 | * [General info](#general-information) 12 | * [Technologies Used](#technologies-used) 13 | * [Steps for Contribution](#steps-for-contribution) 14 | * [License](#license) 15 | * [Credits](#credits) 16 | * [Contributors](#contributors) 17 | 18 | # Hacktoberfest-2022 19 | 20 |

Hacktobefest PRs are welcome. Hacktoberfest is digitalocean’s annual event that encourages people to contribute to open source throughout october. Much of modern tech infrastructure—including some of digitalocean’s own products—relies on open-source projects built and maintained by passionate people who often don’t have the staff or budgets to do much more than keep the project alive. Hacktoberfest is all about giving back to those projects, sharpening skills, and celebrating all things open source, especially the people that make open source so special.

21 | 22 | ## General Information 23 | - Resume-Maker is a Web application where you get your resume build. 24 | - You just need to fill out your basic information such as Education, Experience, Hobbies, Skills, etc. 25 | 26 | ## Technologies Used 27 | - HTML 28 | - CSS 29 | - JavaScript 30 | - Bootstrap 31 | - Handlebars 32 | 33 | ## Steps For Contribution 34 | - Fork the project 35 | - Clone the project. You can use following command: 36 | ``` 37 | git clone https://github.com//Resume-Maker 38 | ``` 39 | - Navigate to the project directory 40 | ``` 41 | cd Resume-Maker 42 | ``` 43 | - Create new branch 44 | ``` 45 | git checkout -b 46 | ``` 47 | ## After making any changes 48 | - Stage your changes 49 | ``` 50 | git add 51 | ``` 52 | - Commit your changes 53 | ``` 54 | git commit -m '' 55 | ``` 56 | - Push your changes 57 | ``` 58 | git push origin 59 | ``` 60 | - Create a Pull Request 61 | 62 | 66 | 67 | 71 | 72 | ## License 73 | [MIT LICENSE](LICENSE) 74 | 75 | ## Credits 76 | Reference:
77 | [Hacktoberfest-2022-img](https://github.com/shubham9672/Hacktoberfest2022) 78 | 79 | ### Contributors 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /html files/experience.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Personal Resume 8 | 9 | 10 | 11 | 12 | 13 | 72 | 165 |
166 |
167 |
168 | 169 | 170 | 171 | 172 | 190 | 191 |
192 | 193 |
194 | 195 |
196 | 197 | 198 |
199 |
200 |
201 |
202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 |
210 |
212 |

EXPERIENCE DETAILS

213 |
214 |

List your work experience, from the most recent to the oldest.

215 |
216 |
217 | 218 | 219 | 220 |
221 |
222 |
223 | 224 | 225 | 226 | 227 |
228 |
229 | 239 | 240 | 241 |
242 | 243 | 244 |
245 |
246 |

Employer:

247 |
248 |
249 |

Job Title:

250 |
251 |
252 | 253 |
254 | 255 | 256 |
257 |
258 |

City:

259 |
260 | 261 |
262 |

State:

263 |
264 |
265 | 266 |
267 | 268 |
269 |
270 |

Start Date:

271 |
272 |
273 |

Last Date:

274 |
275 |
276 | 277 |
278 | 279 |
280 |
281 |

Job Description:

282 | 283 |
284 |
285 | 286 |
287 | 288 |
289 |
290 | 291 | 292 | 293 |
294 | 295 |
296 | 297 |
298 | 299 |
300 |
301 | 302 | 303 | 304 |
305 |
306 |
307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 |
326 |
327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 |
344 | 345 | 346 |
347 | 348 |
349 | 350 |
351 | 352 |
353 | 354 |
355 |
OUR WORLD
356 | 357 | 371 |
372 | 373 | 374 | 375 |
376 |
Assistance
377 | 378 | 392 |
393 | 394 | 395 | 396 |
397 |
Pages
398 | 399 | 416 |
417 | 418 | 419 | 420 |
421 |
Sign up to our newsletter
422 | 423 |
424 | 425 |
426 | 427 | 428 |
429 | 430 |
431 | 432 |
433 | 434 | 435 |
436 | 437 | 438 |
439 | © 2020 Copyright: 440 |
441 | 442 |
443 | 444 |
445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 188 | 189 | 190 |
191 | 192 |
193 | 194 |
195 | 196 | 197 |
198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 |
209 |
211 |

HOBBIES DETAILS

212 |
213 |

List your favourite Hobbies, for the Resume.

214 |
215 |
216 | 217 | 218 | 219 |
220 |
221 |
222 | 223 | 224 | 225 | 226 |
227 |
228 | 238 | 239 | 240 |
241 | 242 | 243 |
244 |
245 |

Hobby 1

246 |
247 |
248 |

Job Title

249 |
250 |
251 | 252 |
253 | 254 |
255 |
256 |

City

257 |
258 | 259 |
260 |

State

261 |
262 |
263 | 264 |
265 | 266 |
267 |
268 |

Start Date

269 |
270 |
271 |

Last Date

272 |
273 |
274 | 275 |
276 | 277 |
278 |
279 |

Job Description

280 |
281 |
282 | 283 |
284 | 285 |
286 |
287 | 288 | 289 | 290 |
291 |
292 | 293 |
294 | 295 |
296 |
297 | 298 | 299 | 300 |
301 |
302 |
303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 |
320 |
321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 |
338 | 339 | 340 | 341 |
342 | 343 |
344 | 345 |
346 | 347 |
348 | 349 |
350 |
OUR WORLD
351 | 352 | 366 |
367 | 368 | 369 | 370 |
371 |
Assistance
372 | 373 | 387 |
388 | 389 | 390 | 391 |
392 |
Pages
393 | 394 | 411 |
412 | 413 | 414 | 415 |
416 |
Sign up to our newsletter
417 | 418 |
419 | 420 |
421 | 422 | 423 |
424 | 425 |
426 | 427 |
428 | 429 | 430 |
431 | 432 | 433 |
434 | © 2020 Copyright: 435 |
436 | 437 |
438 | 439 |
440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 190 | 191 | 192 |
193 | 194 |
195 | 196 |
197 | 198 | 199 |
200 | 201 | 202 | 203 | 204 |
205 |
206 |
207 |

PERSONAL INFO

208 |
209 |

Kindly Enter your personal details that will be displayed in your Resume

210 |
211 |
212 |
213 | 214 | 215 |
216 |
217 |
218 | 219 | 220 | 221 | 222 |
223 |
224 | 234 | 235 | 236 |
237 | 238 | 239 |
240 |
241 |

First Name

242 |
243 |
244 |

Second Name

245 |
246 |
247 | 248 |
249 | 250 |

Address

251 | 252 |
253 |
254 |
255 |
256 |

City

257 |
258 | 259 |
260 |

Zip Code

261 |
262 |
263 | 264 |
265 | 266 |
267 |
268 |

Email Address

269 |
270 |
271 |

Country

272 |
273 |
274 | 275 |
276 | 277 |
278 |
279 |
280 |

Phone

281 | 282 |
283 |
284 |
285 | 286 |
287 | 288 |
289 | 290 |
291 |

Professional Summary

292 | 293 |
294 |
295 | 296 |
297 | 298 |
299 |
300 | 301 | 302 | 303 |
304 | 305 | 306 | 307 |
308 | 309 | 310 |
311 | 312 | 313 | 314 | 315 |
316 |
317 |
318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 |
356 | 357 | 358 | 359 |
360 | 361 |
362 | 363 |
364 | 365 |
366 | 367 |
368 |
OUR WORLD
369 | 370 | 384 |
385 | 386 | 387 | 388 |
389 |
Assistance
390 | 391 | 405 |
406 | 407 | 408 | 409 |
410 |
Pages
411 | 412 | 429 |
430 | 431 | 432 | 433 |
434 |
Sign up to our newsletter
435 | 436 |
437 | 438 |
439 | 440 | 441 |
442 | 443 |
444 | 445 |
446 | 447 | 448 |
449 | 450 | 451 |
452 | © 2020 Copyright: 453 |
454 | 455 |
456 | 457 |
458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 485 | 486 | -------------------------------------------------------------------------------- /html files/toggle.js: -------------------------------------------------------------------------------- 1 | function myFunction() { 2 | var element = document.body; 3 | element.classList.toggle("dark-mode"); 4 | } -------------------------------------------------------------------------------- /node_modules/har-schema/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Ahmad Nassri 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/har-schema/README.md: -------------------------------------------------------------------------------- 1 | # HAR Schema [![version][npm-version]][npm-url] [![License][npm-license]][license-url] 2 | 3 | > JSON Schema for HTTP Archive ([HAR][spec]). 4 | 5 | [![Build Status][travis-image]][travis-url] 6 | [![Downloads][npm-downloads]][npm-url] 7 | [![Code Climate][codeclimate-quality]][codeclimate-url] 8 | [![Coverage Status][codeclimate-coverage]][codeclimate-url] 9 | [![Dependency Status][dependencyci-image]][dependencyci-url] 10 | [![Dependencies][david-image]][david-url] 11 | 12 | ## Install 13 | 14 | ```bash 15 | npm install --only=production --save har-schema 16 | ``` 17 | 18 | ## Usage 19 | 20 | Compatible with any [JSON Schema validation tool][validator]. 21 | 22 | ---- 23 | > :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/)  ·  24 | > License: [ISC][license-url]  ·  25 | > Github: [@ahmadnassri](https://github.com/ahmadnassri)  ·  26 | > Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri) 27 | 28 | [license-url]: http://choosealicense.com/licenses/isc/ 29 | 30 | [travis-url]: https://travis-ci.org/ahmadnassri/har-schema 31 | [travis-image]: https://img.shields.io/travis/ahmadnassri/har-schema.svg?style=flat-square 32 | 33 | [npm-url]: https://www.npmjs.com/package/har-schema 34 | [npm-license]: https://img.shields.io/npm/l/har-schema.svg?style=flat-square 35 | [npm-version]: https://img.shields.io/npm/v/har-schema.svg?style=flat-square 36 | [npm-downloads]: https://img.shields.io/npm/dm/har-schema.svg?style=flat-square 37 | 38 | [codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-schema 39 | [codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-schema.svg?style=flat-square 40 | [codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-schema.svg?style=flat-square 41 | 42 | [david-url]: https://david-dm.org/ahmadnassri/har-schema 43 | [david-image]: https://img.shields.io/david/ahmadnassri/har-schema.svg?style=flat-square 44 | 45 | [dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-schema 46 | [dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-schema/badge?style=flat-square 47 | 48 | [spec]: https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md 49 | [validator]: https://github.com/ahmadnassri/har-validator 50 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/afterRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "afterRequest.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "lastAccess", 8 | "eTag", 9 | "hitCount" 10 | ], 11 | "properties": { 12 | "expires": { 13 | "type": "string", 14 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 15 | }, 16 | "lastAccess": { 17 | "type": "string", 18 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 19 | }, 20 | "eTag": { 21 | "type": "string" 22 | }, 23 | "hitCount": { 24 | "type": "integer" 25 | }, 26 | "comment": { 27 | "type": "string" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/beforeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "beforeRequest.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "lastAccess", 8 | "eTag", 9 | "hitCount" 10 | ], 11 | "properties": { 12 | "expires": { 13 | "type": "string", 14 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 15 | }, 16 | "lastAccess": { 17 | "type": "string", 18 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 19 | }, 20 | "eTag": { 21 | "type": "string" 22 | }, 23 | "hitCount": { 24 | "type": "integer" 25 | }, 26 | "comment": { 27 | "type": "string" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "browser.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "version" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "version": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/cache.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "cache.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "properties": { 5 | "beforeRequest": { 6 | "oneOf": [ 7 | { "type": "null" }, 8 | { "$ref": "beforeRequest.json#" } 9 | ] 10 | }, 11 | "afterRequest": { 12 | "oneOf": [ 13 | { "type": "null" }, 14 | { "$ref": "afterRequest.json#" } 15 | ] 16 | }, 17 | "comment": { 18 | "type": "string" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/content.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "content.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "size", 7 | "mimeType" 8 | ], 9 | "properties": { 10 | "size": { 11 | "type": "integer" 12 | }, 13 | "compression": { 14 | "type": "integer" 15 | }, 16 | "mimeType": { 17 | "type": "string" 18 | }, 19 | "text": { 20 | "type": "string" 21 | }, 22 | "encoding": { 23 | "type": "string" 24 | }, 25 | "comment": { 26 | "type": "string" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/cookie.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "cookie.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "path": { 17 | "type": "string" 18 | }, 19 | "domain": { 20 | "type": "string" 21 | }, 22 | "expires": { 23 | "type": ["string", "null"], 24 | "format": "date-time" 25 | }, 26 | "httpOnly": { 27 | "type": "boolean" 28 | }, 29 | "secure": { 30 | "type": "boolean" 31 | }, 32 | "comment": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/creator.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "creator.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "version" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "version": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/entry.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "entry.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "startedDateTime", 8 | "time", 9 | "request", 10 | "response", 11 | "cache", 12 | "timings" 13 | ], 14 | "properties": { 15 | "pageref": { 16 | "type": "string" 17 | }, 18 | "startedDateTime": { 19 | "type": "string", 20 | "format": "date-time", 21 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))" 22 | }, 23 | "time": { 24 | "type": "number", 25 | "min": 0 26 | }, 27 | "request": { 28 | "$ref": "request.json#" 29 | }, 30 | "response": { 31 | "$ref": "response.json#" 32 | }, 33 | "cache": { 34 | "$ref": "cache.json#" 35 | }, 36 | "timings": { 37 | "$ref": "timings.json#" 38 | }, 39 | "serverIPAddress": { 40 | "type": "string", 41 | "oneOf": [ 42 | { "format": "ipv4" }, 43 | { "format": "ipv6" } 44 | ] 45 | }, 46 | "connection": { 47 | "type": "string" 48 | }, 49 | "comment": { 50 | "type": "string" 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/har.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "har.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "log" 7 | ], 8 | "properties": { 9 | "log": { 10 | "$ref": "log.json#" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/header.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "header.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | afterRequest: require('./afterRequest.json'), 5 | beforeRequest: require('./beforeRequest.json'), 6 | browser: require('./browser.json'), 7 | cache: require('./cache.json'), 8 | content: require('./content.json'), 9 | cookie: require('./cookie.json'), 10 | creator: require('./creator.json'), 11 | entry: require('./entry.json'), 12 | har: require('./har.json'), 13 | header: require('./header.json'), 14 | log: require('./log.json'), 15 | page: require('./page.json'), 16 | pageTimings: require('./pageTimings.json'), 17 | postData: require('./postData.json'), 18 | query: require('./query.json'), 19 | request: require('./request.json'), 20 | response: require('./response.json'), 21 | timings: require('./timings.json') 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/log.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "log.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "version", 7 | "creator", 8 | "entries" 9 | ], 10 | "properties": { 11 | "version": { 12 | "type": "string" 13 | }, 14 | "creator": { 15 | "$ref": "creator.json#" 16 | }, 17 | "browser": { 18 | "$ref": "browser.json#" 19 | }, 20 | "pages": { 21 | "type": "array", 22 | "items": { 23 | "$ref": "page.json#" 24 | } 25 | }, 26 | "entries": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "entry.json#" 30 | } 31 | }, 32 | "comment": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "page.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "startedDateTime", 8 | "id", 9 | "title", 10 | "pageTimings" 11 | ], 12 | "properties": { 13 | "startedDateTime": { 14 | "type": "string", 15 | "format": "date-time", 16 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))" 17 | }, 18 | "id": { 19 | "type": "string", 20 | "unique": true 21 | }, 22 | "title": { 23 | "type": "string" 24 | }, 25 | "pageTimings": { 26 | "$ref": "pageTimings.json#" 27 | }, 28 | "comment": { 29 | "type": "string" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/pageTimings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "pageTimings.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "properties": { 6 | "onContentLoad": { 7 | "type": "number", 8 | "min": -1 9 | }, 10 | "onLoad": { 11 | "type": "number", 12 | "min": -1 13 | }, 14 | "comment": { 15 | "type": "string" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/postData.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "postData.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "mimeType" 8 | ], 9 | "properties": { 10 | "mimeType": { 11 | "type": "string" 12 | }, 13 | "text": { 14 | "type": "string" 15 | }, 16 | "params": { 17 | "type": "array", 18 | "required": [ 19 | "name" 20 | ], 21 | "properties": { 22 | "name": { 23 | "type": "string" 24 | }, 25 | "value": { 26 | "type": "string" 27 | }, 28 | "fileName": { 29 | "type": "string" 30 | }, 31 | "contentType": { 32 | "type": "string" 33 | }, 34 | "comment": { 35 | "type": "string" 36 | } 37 | } 38 | }, 39 | "comment": { 40 | "type": "string" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/query.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "query.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/request.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "request.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "method", 7 | "url", 8 | "httpVersion", 9 | "cookies", 10 | "headers", 11 | "queryString", 12 | "headersSize", 13 | "bodySize" 14 | ], 15 | "properties": { 16 | "method": { 17 | "type": "string" 18 | }, 19 | "url": { 20 | "type": "string", 21 | "format": "uri" 22 | }, 23 | "httpVersion": { 24 | "type": "string" 25 | }, 26 | "cookies": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "cookie.json#" 30 | } 31 | }, 32 | "headers": { 33 | "type": "array", 34 | "items": { 35 | "$ref": "header.json#" 36 | } 37 | }, 38 | "queryString": { 39 | "type": "array", 40 | "items": { 41 | "$ref": "query.json#" 42 | } 43 | }, 44 | "postData": { 45 | "$ref": "postData.json#" 46 | }, 47 | "headersSize": { 48 | "type": "integer" 49 | }, 50 | "bodySize": { 51 | "type": "integer" 52 | }, 53 | "comment": { 54 | "type": "string" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/response.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "response.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "status", 7 | "statusText", 8 | "httpVersion", 9 | "cookies", 10 | "headers", 11 | "content", 12 | "redirectURL", 13 | "headersSize", 14 | "bodySize" 15 | ], 16 | "properties": { 17 | "status": { 18 | "type": "integer" 19 | }, 20 | "statusText": { 21 | "type": "string" 22 | }, 23 | "httpVersion": { 24 | "type": "string" 25 | }, 26 | "cookies": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "cookie.json#" 30 | } 31 | }, 32 | "headers": { 33 | "type": "array", 34 | "items": { 35 | "$ref": "header.json#" 36 | } 37 | }, 38 | "content": { 39 | "$ref": "content.json#" 40 | }, 41 | "redirectURL": { 42 | "type": "string" 43 | }, 44 | "headersSize": { 45 | "type": "integer" 46 | }, 47 | "bodySize": { 48 | "type": "integer" 49 | }, 50 | "comment": { 51 | "type": "string" 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /node_modules/har-schema/lib/timings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "timings.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "required": [ 5 | "send", 6 | "wait", 7 | "receive" 8 | ], 9 | "properties": { 10 | "dns": { 11 | "type": "number", 12 | "min": -1 13 | }, 14 | "connect": { 15 | "type": "number", 16 | "min": -1 17 | }, 18 | "blocked": { 19 | "type": "number", 20 | "min": -1 21 | }, 22 | "send": { 23 | "type": "number", 24 | "min": -1 25 | }, 26 | "wait": { 27 | "type": "number", 28 | "min": -1 29 | }, 30 | "receive": { 31 | "type": "number", 32 | "min": -1 33 | }, 34 | "ssl": { 35 | "type": "number", 36 | "min": -1 37 | }, 38 | "comment": { 39 | "type": "string" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /node_modules/har-schema/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "har-schema@^2.0.0", 3 | "_id": "har-schema@2.0.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", 6 | "_location": "/har-schema", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "har-schema@^2.0.0", 12 | "name": "har-schema", 13 | "escapedName": "har-schema", 14 | "rawSpec": "^2.0.0", 15 | "saveSpec": null, 16 | "fetchSpec": "^2.0.0" 17 | }, 18 | "_requiredBy": [ 19 | "/har-validator" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 22 | "_shasum": "a94c2224ebcac04782a0d9035521f24735b7ec92", 23 | "_spec": "har-schema@^2.0.0", 24 | "_where": "C:\\Users\\rajku\\OneDrive\\Desktop\\WebDev Projcts\\Resume Maker new\\node_modules\\har-validator", 25 | "author": { 26 | "name": "Ahmad Nassri", 27 | "email": "ahmad@ahmadnassri.com", 28 | "url": "https://www.ahmadnassri.com/" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/ahmadnassri/har-schema/issues" 32 | }, 33 | "bundleDependencies": false, 34 | "config": { 35 | "commitizen": { 36 | "path": "./node_modules/cz-conventional-changelog" 37 | } 38 | }, 39 | "contributors": [ 40 | { 41 | "name": "Evgeny Poberezkin", 42 | "email": "e.poberezkin@me.com" 43 | } 44 | ], 45 | "deprecated": false, 46 | "description": "JSON Schema for HTTP Archive (HAR)", 47 | "devDependencies": { 48 | "ajv": "^5.0.0", 49 | "codeclimate-test-reporter": "^0.4.0", 50 | "cz-conventional-changelog": "^1.2.0", 51 | "echint": "^2.1.0", 52 | "semantic-release": "^6.3.2", 53 | "snazzy": "^5.0.0", 54 | "tap": "^8.0.1" 55 | }, 56 | "engines": { 57 | "node": ">=4" 58 | }, 59 | "files": [ 60 | "lib" 61 | ], 62 | "homepage": "https://github.com/ahmadnassri/har-schema", 63 | "keywords": [ 64 | "har", 65 | "http", 66 | "archive", 67 | "JSON", 68 | "schema", 69 | "JSON-schema" 70 | ], 71 | "license": "ISC", 72 | "main": "lib/index.js", 73 | "name": "har-schema", 74 | "repository": { 75 | "type": "git", 76 | "url": "git+https://github.com/ahmadnassri/har-schema.git" 77 | }, 78 | "scripts": { 79 | "codeclimate": "tap --coverage-report=text-lcov | codeclimate-test-reporter", 80 | "coverage": "tap test --reporter silent --coverage", 81 | "pretest": "snazzy && echint", 82 | "semantic-release": "semantic-release pre && npm publish && semantic-release post", 83 | "test": "tap test --reporter spec" 84 | }, 85 | "version": "2.0.0" 86 | } 87 | -------------------------------------------------------------------------------- /node_modules/har-validator/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Ahmad Nassri 4 | 5 | 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: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. 10 | -------------------------------------------------------------------------------- /node_modules/har-validator/README.md: -------------------------------------------------------------------------------- 1 | # HAR Validator 2 | 3 | [![license][license-img]][license-url] 4 | [![version][npm-img]][npm-url] 5 | [![super linter][super-linter-img]][super-linter-url] 6 | [![test][test-img]][test-url] 7 | [![release][release-img]][release-url] 8 | 9 | [license-url]: LICENSE 10 | [license-img]: https://badgen.net/github/license/ahmadnassri/node-har-validator 11 | 12 | [npm-url]: https://www.npmjs.com/package/har-validator 13 | [npm-img]: https://badgen.net/npm/v/har-validator 14 | 15 | [super-linter-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Asuper-linter 16 | [super-linter-img]: https://github.com/ahmadnassri/node-har-validator/workflows/super-linter/badge.svg 17 | 18 | [test-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Atest 19 | [test-img]: https://github.com/ahmadnassri/node-har-validator/workflows/test/badge.svg 20 | 21 | [release-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Arelease 22 | [release-img]: https://github.com/ahmadnassri/node-har-validator/workflows/release/badge.svg 23 | 24 | > Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema. 25 | 26 | ## Install 27 | 28 | ```bash 29 | npm install har-validator 30 | ``` 31 | 32 | ## CLI Usage 33 | 34 | Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info. 35 | 36 | ## API 37 | 38 | **Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/node-har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. 39 | _For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided_ 40 | 41 | - [async API](docs/async.md) 42 | - [callback API](docs/async.md) 43 | - [Promise API](docs/promise.md) _(default)_ 44 | -------------------------------------------------------------------------------- /node_modules/har-validator/lib/async.js: -------------------------------------------------------------------------------- 1 | var Ajv = require('ajv') 2 | var HARError = require('./error') 3 | var schemas = require('har-schema') 4 | 5 | var ajv 6 | 7 | function createAjvInstance () { 8 | var ajv = new Ajv({ 9 | allErrors: true 10 | }) 11 | ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')) 12 | ajv.addSchema(schemas) 13 | 14 | return ajv 15 | } 16 | 17 | function validate (name, data, next) { 18 | data = data || {} 19 | 20 | // validator config 21 | ajv = ajv || createAjvInstance() 22 | 23 | var validate = ajv.getSchema(name + '.json') 24 | 25 | var valid = validate(data) 26 | 27 | // callback? 28 | if (typeof next === 'function') { 29 | return next(!valid ? new HARError(validate.errors) : null, valid) 30 | } 31 | 32 | return valid 33 | } 34 | 35 | exports.afterRequest = function (data, next) { 36 | return validate('afterRequest', data, next) 37 | } 38 | 39 | exports.beforeRequest = function (data, next) { 40 | return validate('beforeRequest', data, next) 41 | } 42 | 43 | exports.browser = function (data, next) { 44 | return validate('browser', data, next) 45 | } 46 | 47 | exports.cache = function (data, next) { 48 | return validate('cache', data, next) 49 | } 50 | 51 | exports.content = function (data, next) { 52 | return validate('content', data, next) 53 | } 54 | 55 | exports.cookie = function (data, next) { 56 | return validate('cookie', data, next) 57 | } 58 | 59 | exports.creator = function (data, next) { 60 | return validate('creator', data, next) 61 | } 62 | 63 | exports.entry = function (data, next) { 64 | return validate('entry', data, next) 65 | } 66 | 67 | exports.har = function (data, next) { 68 | return validate('har', data, next) 69 | } 70 | 71 | exports.header = function (data, next) { 72 | return validate('header', data, next) 73 | } 74 | 75 | exports.log = function (data, next) { 76 | return validate('log', data, next) 77 | } 78 | 79 | exports.page = function (data, next) { 80 | return validate('page', data, next) 81 | } 82 | 83 | exports.pageTimings = function (data, next) { 84 | return validate('pageTimings', data, next) 85 | } 86 | 87 | exports.postData = function (data, next) { 88 | return validate('postData', data, next) 89 | } 90 | 91 | exports.query = function (data, next) { 92 | return validate('query', data, next) 93 | } 94 | 95 | exports.request = function (data, next) { 96 | return validate('request', data, next) 97 | } 98 | 99 | exports.response = function (data, next) { 100 | return validate('response', data, next) 101 | } 102 | 103 | exports.timings = function (data, next) { 104 | return validate('timings', data, next) 105 | } 106 | -------------------------------------------------------------------------------- /node_modules/har-validator/lib/error.js: -------------------------------------------------------------------------------- 1 | function HARError (errors) { 2 | var message = 'validation failed' 3 | 4 | this.name = 'HARError' 5 | this.message = message 6 | this.errors = errors 7 | 8 | if (typeof Error.captureStackTrace === 'function') { 9 | Error.captureStackTrace(this, this.constructor) 10 | } else { 11 | this.stack = (new Error(message)).stack 12 | } 13 | } 14 | 15 | HARError.prototype = Error.prototype 16 | 17 | module.exports = HARError 18 | -------------------------------------------------------------------------------- /node_modules/har-validator/lib/promise.js: -------------------------------------------------------------------------------- 1 | var Ajv = require('ajv') 2 | var HARError = require('./error') 3 | var schemas = require('har-schema') 4 | 5 | var ajv 6 | 7 | function createAjvInstance () { 8 | var ajv = new Ajv({ 9 | allErrors: true 10 | }) 11 | ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')) 12 | ajv.addSchema(schemas) 13 | 14 | return ajv 15 | } 16 | 17 | function validate (name, data) { 18 | data = data || {} 19 | 20 | // validator config 21 | ajv = ajv || createAjvInstance() 22 | 23 | var validate = ajv.getSchema(name + '.json') 24 | 25 | return new Promise(function (resolve, reject) { 26 | var valid = validate(data) 27 | 28 | !valid ? reject(new HARError(validate.errors)) : resolve(data) 29 | }) 30 | } 31 | 32 | exports.afterRequest = function (data) { 33 | return validate('afterRequest', data) 34 | } 35 | 36 | exports.beforeRequest = function (data) { 37 | return validate('beforeRequest', data) 38 | } 39 | 40 | exports.browser = function (data) { 41 | return validate('browser', data) 42 | } 43 | 44 | exports.cache = function (data) { 45 | return validate('cache', data) 46 | } 47 | 48 | exports.content = function (data) { 49 | return validate('content', data) 50 | } 51 | 52 | exports.cookie = function (data) { 53 | return validate('cookie', data) 54 | } 55 | 56 | exports.creator = function (data) { 57 | return validate('creator', data) 58 | } 59 | 60 | exports.entry = function (data) { 61 | return validate('entry', data) 62 | } 63 | 64 | exports.har = function (data) { 65 | return validate('har', data) 66 | } 67 | 68 | exports.header = function (data) { 69 | return validate('header', data) 70 | } 71 | 72 | exports.log = function (data) { 73 | return validate('log', data) 74 | } 75 | 76 | exports.page = function (data) { 77 | return validate('page', data) 78 | } 79 | 80 | exports.pageTimings = function (data) { 81 | return validate('pageTimings', data) 82 | } 83 | 84 | exports.postData = function (data) { 85 | return validate('postData', data) 86 | } 87 | 88 | exports.query = function (data) { 89 | return validate('query', data) 90 | } 91 | 92 | exports.request = function (data) { 93 | return validate('request', data) 94 | } 95 | 96 | exports.response = function (data) { 97 | return validate('response', data) 98 | } 99 | 100 | exports.timings = function (data) { 101 | return validate('timings', data) 102 | } 103 | -------------------------------------------------------------------------------- /node_modules/har-validator/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "har-validator@~5.1.3", 3 | "_id": "har-validator@5.1.5", 4 | "_inBundle": false, 5 | "_integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 6 | "_location": "/har-validator", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "har-validator@~5.1.3", 12 | "name": "har-validator", 13 | "escapedName": "har-validator", 14 | "rawSpec": "~5.1.3", 15 | "saveSpec": null, 16 | "fetchSpec": "~5.1.3" 17 | }, 18 | "_requiredBy": [ 19 | "/request" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", 22 | "_shasum": "1f0803b9f8cb20c0fa13822df1ecddb36bde1efd", 23 | "_spec": "har-validator@~5.1.3", 24 | "_where": "C:\\Users\\rajku\\OneDrive\\Desktop\\WebDev Projcts\\Resume Maker new\\node_modules\\request", 25 | "author": { 26 | "name": "Ahmad Nassri", 27 | "email": "ahmad@ahmadnassri.com", 28 | "url": "https://www.ahmadnassri.com/" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/ahmadnassri/node-har-validator/issues" 32 | }, 33 | "bundleDependencies": false, 34 | "dependencies": { 35 | "ajv": "^6.12.3", 36 | "har-schema": "^2.0.0" 37 | }, 38 | "deprecated": "this library is no longer supported", 39 | "description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema", 40 | "devDependencies": { 41 | "tap": "^14.10.8" 42 | }, 43 | "engines": { 44 | "node": ">=6" 45 | }, 46 | "files": [ 47 | "lib" 48 | ], 49 | "homepage": "https://github.com/ahmadnassri/node-har-validator", 50 | "keywords": [ 51 | "har", 52 | "cli", 53 | "ajv", 54 | "http", 55 | "archive", 56 | "validate", 57 | "validator" 58 | ], 59 | "license": "MIT", 60 | "main": "lib/promise.js", 61 | "name": "har-validator", 62 | "repository": { 63 | "type": "git", 64 | "url": "git+https://github.com/ahmadnassri/node-har-validator.git" 65 | }, 66 | "scripts": { 67 | "lint": "npx run-p lint:*", 68 | "test": "tap test --no-coverage", 69 | "test:coverage": "tap test --coverage-report=lcov --no-browser" 70 | }, 71 | "version": "5.1.5" 72 | } 73 | -------------------------------------------------------------------------------- /node_modules/hasha/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var fs = require('fs'); 3 | var crypto = require('crypto'); 4 | var isStream = require('is-stream'); 5 | var Promise = require('pinkie-promise'); 6 | 7 | var hasha = module.exports = function (input, opts) { 8 | opts = opts || {}; 9 | 10 | var outputEncoding = opts.encoding || 'hex'; 11 | 12 | if (outputEncoding === 'buffer') { 13 | outputEncoding = undefined; 14 | } 15 | 16 | var hash = crypto.createHash(opts.algorithm || 'sha512'); 17 | 18 | var update = function (buf) { 19 | var inputEncoding = typeof buf === 'string' ? 'utf8' : undefined; 20 | hash.update(buf, inputEncoding); 21 | }; 22 | 23 | if (Array.isArray(input)) { 24 | input.forEach(update); 25 | } else { 26 | update(input); 27 | } 28 | 29 | return hash.digest(outputEncoding); 30 | }; 31 | 32 | hasha.stream = function (opts) { 33 | opts = opts || {}; 34 | 35 | var outputEncoding = opts.encoding || 'hex'; 36 | 37 | if (outputEncoding === 'buffer') { 38 | outputEncoding = undefined; 39 | } 40 | 41 | var stream = crypto.createHash(opts.algorithm || 'sha512'); 42 | stream.setEncoding(outputEncoding); 43 | return stream; 44 | }; 45 | 46 | hasha.fromStream = function (stream, opts) { 47 | if (!isStream(stream)) { 48 | return Promise.reject(new TypeError('Expected a stream')); 49 | } 50 | 51 | opts = opts || {}; 52 | 53 | return new Promise(function (resolve, reject) { 54 | stream 55 | .on('error', reject) 56 | .pipe(hasha.stream(opts)) 57 | .on('error', reject) 58 | .on('finish', function () { 59 | resolve(this.read()); 60 | }); 61 | }); 62 | }; 63 | 64 | hasha.fromFile = function (fp, opts) { 65 | return hasha.fromStream(fs.createReadStream(fp), opts); 66 | }; 67 | 68 | hasha.fromFileSync = function (fp, opts) { 69 | return hasha(fs.readFileSync(fp), opts); 70 | }; 71 | -------------------------------------------------------------------------------- /node_modules/hasha/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/hasha/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "hasha@^2.2.0", 3 | "_id": "hasha@2.2.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=", 6 | "_location": "/hasha", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "hasha@^2.2.0", 12 | "name": "hasha", 13 | "escapedName": "hasha", 14 | "rawSpec": "^2.2.0", 15 | "saveSpec": null, 16 | "fetchSpec": "^2.2.0" 17 | }, 18 | "_requiredBy": [ 19 | "/phantomjs-prebuilt" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", 22 | "_shasum": "78d7cbfc1e6d66303fe79837365984517b2f6ee1", 23 | "_spec": "hasha@^2.2.0", 24 | "_where": "C:\\Users\\rajku\\OneDrive\\Desktop\\WebDev Projcts\\Resume Maker new\\node_modules\\phantomjs-prebuilt", 25 | "author": { 26 | "name": "Sindre Sorhus", 27 | "email": "sindresorhus@gmail.com", 28 | "url": "sindresorhus.com" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/sindresorhus/hasha/issues" 32 | }, 33 | "bundleDependencies": false, 34 | "dependencies": { 35 | "is-stream": "^1.0.1", 36 | "pinkie-promise": "^2.0.0" 37 | }, 38 | "deprecated": false, 39 | "description": "Hashing made simple. Get the hash of a buffer/string/stream/file.", 40 | "devDependencies": { 41 | "ava": "*", 42 | "proxyquire": "^1.7.2", 43 | "xo": "*" 44 | }, 45 | "engines": { 46 | "node": ">=0.10.0" 47 | }, 48 | "files": [ 49 | "index.js" 50 | ], 51 | "homepage": "https://github.com/sindresorhus/hasha#readme", 52 | "keywords": [ 53 | "hash", 54 | "hashing", 55 | "crypto", 56 | "hex", 57 | "base64", 58 | "md5", 59 | "sha1", 60 | "sha256", 61 | "sha512", 62 | "sum", 63 | "stream", 64 | "file", 65 | "fs", 66 | "buffer", 67 | "string", 68 | "text", 69 | "rev", 70 | "revving", 71 | "simple", 72 | "easy" 73 | ], 74 | "license": "MIT", 75 | "name": "hasha", 76 | "repository": { 77 | "type": "git", 78 | "url": "git+https://github.com/sindresorhus/hasha.git" 79 | }, 80 | "scripts": { 81 | "test": "xo && ava" 82 | }, 83 | "version": "2.2.0" 84 | } 85 | -------------------------------------------------------------------------------- /node_modules/hasha/readme.md: -------------------------------------------------------------------------------- 1 |

2 |
3 |
4 |
5 | hasha 6 |
7 |
8 |
9 |
10 |
11 |

12 | 13 | > Hashing made simple. Get the hash of a buffer/string/stream/file. 14 | 15 | [![Build Status](https://travis-ci.org/sindresorhus/hasha.svg?branch=master)](https://travis-ci.org/sindresorhus/hasha) 16 | 17 | Convenience wrapper around the core [`crypto` Hash class](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) with simpler API and better defaults. 18 | 19 | 20 | ## Install 21 | 22 | ``` 23 | $ npm install --save hasha 24 | ``` 25 | 26 | 27 | ## Usage 28 | 29 | ```js 30 | var hasha = require('hasha'); 31 | 32 | hasha('unicorn'); 33 | //=> 'e233b19aabc7d5e53826fb734d1222f1f0444c3a3fc67ff4af370a66e7cadd2cb24009f1bc86f0bed12ca5fcb226145ad10fc5f650f6ef0959f8aadc5a594b27' 34 | ``` 35 | 36 | ```js 37 | var hasha = require('hasha'); 38 | 39 | // hash the process input and output the hash sum 40 | process.stdin.pipe(hasha.stream()).pipe(process.stdout); 41 | ``` 42 | 43 | ```js 44 | var hasha = require('hasha'); 45 | 46 | // get the MD5 hash of an image 47 | hasha.fromFile('unicorn.png', {algorithm: 'md5'}).then(function (hash) { 48 | console.log(hash); 49 | //=> '1abcb33beeb811dca15f0ac3e47b88d9' 50 | }); 51 | ``` 52 | 53 | 54 | ## API 55 | 56 | See the Node.js [`crypto` docs](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) for more about hashing. 57 | 58 | ### hasha(input, [options]) 59 | 60 | Returns a hash. 61 | 62 | #### input 63 | 64 | Type: `buffer`, `string`, `array` of `string`|`buffer` 65 | 66 | Buffer you want to hash. 67 | 68 | While strings are supported you should prefer buffers as they're faster to hash. Though if you already have a string you should not convert it to a buffer. 69 | 70 | Pass an array instead of concatenating strings and/or buffers. The output is the same, but arrays do not incur the overhead of concatenation. 71 | 72 | #### options 73 | 74 | ##### encoding 75 | 76 | Type: `string` 77 | Default: `hex` 78 | Values: `hex`, `base64`, `buffer`, `binary` 79 | 80 | Encoding of the returned hash. 81 | 82 | ##### algorithm 83 | 84 | Type: `string` 85 | Default: `sha512` 86 | Values: `md5`, `sha1`, `sha256`, `sha512`, etc *([platform dependent](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm))* 87 | 88 | *The `md5` algorithm is good for [file revving](https://github.com/sindresorhus/rev-hash), but you should never use `md5` or `sha1` for anything sensitive. [They're insecure.](http://googleonlinesecurity.blogspot.no/2014/09/gradually-sunsetting-sha-1.html)* 89 | 90 | ### hasha.stream([options]) 91 | 92 | Returns a [hash transform stream](https://nodejs.org/api/crypto.html#crypto_class_hash). 93 | 94 | ### hasha.fromStream(stream, [options]) 95 | 96 | Returns a promise that resolves to a hash. 97 | 98 | ### hasha.fromFile(filepath, [options]) 99 | 100 | Returns a promise that resolves to a hash. 101 | 102 | ### hasha.fromFileSync(filepath, [options]) 103 | 104 | Returns a hash. 105 | 106 | 107 | ## Resources 108 | 109 | - [Hasha: A Friendly Crypto API • DailyJS](http://dailyjs.com/2015/06/12/hasha-a-friendly-crypto-api/) 110 | 111 | 112 | ## Related 113 | 114 | - [hasha-cli](https://github.com/sindresorhus/hasha-cli) - CLI for this module 115 | - [hash-obj](https://github.com/sindresorhus/hash-obj) - Get the hash of an object 116 | 117 | 118 | ## License 119 | 120 | MIT © [Sindre Sorhus](http://sindresorhus.com) 121 | -------------------------------------------------------------------------------- /node_modules/hbs/HISTORY.md: -------------------------------------------------------------------------------- 1 | 4.2.0 / 2021-11-16 2 | ================== 3 | 4 | * Add `rename` option to `registerPartials` 5 | * Ensure all partials are registered before rendering 6 | * Fix function context in async helpers 7 | * deps: walk@2.3.15 8 | 9 | 4.1.2 / 2021-04-15 10 | ================== 11 | 12 | * deps: handlebars@4.7.7 13 | 14 | 4.1.1 / 2020-04-03 15 | ================== 16 | 17 | * deps: handlebars@4.7.6 18 | 19 | 4.1.0 / 2020-01-14 20 | ================== 21 | 22 | * deps: handlebars@4.5.3 23 | - Add `handlebars.parseWithoutProcessing` 24 | - Add support for iterable objects in `#each` helper 25 | - Block access to non-enumerable special properties on objects 26 | - Fix error when helper defined with array properties 27 | - Fix parsing of empty raw blocks 28 | - Fix work-around for `constructor` blocking 29 | - Validate arguments to `#if`, `#unless` and `#with` helpers 30 | 31 | 4.0.6 / 2019-10-09 32 | ================== 33 | 34 | * deps: handlebars@4.3.5 35 | - Fix error object inheritance 36 | - Fix work-around for `constructor` blocking 37 | 38 | 4.0.5 / 2019-09-27 39 | ================== 40 | 41 | * Fix async helpers not working when cache enabled 42 | * Fix handling of exceptions from layout 43 | * Fix handling of exceptions when cache enabled 44 | * deps: handlebars@4.3.3 45 | - Block calling `helperMissing` and `blockHelperMissing` from templates 46 | - Fix work-around for `constructor` blocking 47 | * deps: walk@2.3.14 48 | 49 | 4.0.4 / 2019-04-14 50 | ================== 51 | 52 | * deps: handlebars@4.0.14 53 | - Block `constructor` property using `lookup` 54 | 55 | 4.0.3 / 2019-03-01 56 | ================== 57 | 58 | * Fix path for partials multiple dirs deep on Windows 59 | 60 | 4.0.2 / 2019-02-18 61 | ================== 62 | 63 | * deps: handlebars@4.0.13 64 | 65 | 4.0.1 / 2016-09-18 66 | ================== 67 | 68 | * Support params for async helper 69 | * deps: handlebars@4.0.5 70 | * deps: walk@2.3.9 71 | 72 | 4.0.0 / 2015-11-02 73 | ================== 74 | 75 | * Fix caching of non default filename layouts 76 | * deps: handlebars@4.0.3 77 | 78 | 3.1.1 / 2015-09-11 79 | ================== 80 | 81 | * Fix `localsAsTemplateData` when cache is enabled 82 | 83 | 3.1.0 / 2015-06-10 84 | ================== 85 | 86 | * Make `@data` available to layouts 87 | 88 | 3.0.1 / 2015-03-12 89 | ================== 90 | 91 | * Fix using custom extensions when using view engine layouts 92 | 93 | 3.0.0 / 2015-03-09 94 | ================== 95 | 96 | * deps: handlebars@3.0.0 97 | 98 | 2.9.0 / 2015-03-06 99 | ================== 100 | 101 | * Scope internal async tracker to per middleware 102 | * Support multiple view folders from Express 103 | 104 | 2.8.0 / 2014-12-26 105 | ================== 106 | 107 | * Scope internal async tracker to per hbs instance 108 | * deps: handlebars@2.0.0 109 | 110 | 2.7.0 / 2014-06-02 111 | ================== 112 | 113 | * Fix registering directories of partials on Windows 114 | * Add API to expose locals as template data 115 | 116 | 2.6.0 / 2014-04-06 117 | ================== 118 | 119 | * Fix support for custom handlebars instance 120 | 121 | 2.5.0 / 2014-02-19 122 | ================== 123 | 124 | * deps: handlebars@1.3.0 125 | 126 | 2.4.0 / 2013-09-13 127 | ================== 128 | 129 | * Add support for multi-level partial paths 130 | 131 | 2.3.1 / 2013-08-01 132 | ================== 133 | 134 | * deps: after@0.8.1 135 | * deps: handlebars@1.0.12 136 | 137 | 2.3.0 / 2013-05-30 138 | ================== 139 | 140 | * Add `registerPartials` 141 | 142 | 2.1.0 / 2013-03-19 143 | ================== 144 | 145 | * Add `create` for multiple instances 146 | 147 | 2.0.2 / 2013-02-21 148 | ================== 149 | 150 | * deps: handlebars@1.0.9 151 | 152 | 2.0.1 / 2012-11-30 153 | ================== 154 | 155 | * Ignore layout error when not using layout 156 | 157 | 2.0.0 / 2012-11-21 158 | ================== 159 | 160 | * deps: handlebars@1.0.7 161 | -------------------------------------------------------------------------------- /node_modules/hbs/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2011 Don Park 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/hbs/README.md: -------------------------------------------------------------------------------- 1 | # hbs 2 | 3 | [![NPM Version][npm-version-image]][npm-url] 4 | [![NPM Downloads][npm-downloads-image]][npm-url] 5 | [![Linux Build][github-actions-ci-image]][github-actions-ci-url] 6 | [![Windows Build][appveyor-image]][appveyor-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | [Express.js](https://expressjs.com/) view engine for 10 | [handlebars.js](https://handlebarsjs.com/) 11 | 12 | ## Installation 13 | 14 | This is a [Node.js](https://nodejs.org/en/) module available through the 15 | [npm registry](https://www.npmjs.com/). Installation is done using the 16 | [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): 17 | 18 | ```bash 19 | $ npm install hbs 20 | ``` 21 | 22 | ## Use ## 23 | 24 | Using *hbs* as the default view engine requires just one line of code in your app setup. This will render `.hbs` files when `res.render` is called. 25 | 26 | ```javascript 27 | app.set('view engine', 'hbs'); 28 | ``` 29 | 30 | To use a different extension (i.e. html) for your template files: 31 | 32 | ```javascript 33 | app.set('view engine', 'html'); 34 | app.engine('html', require('hbs').__express); 35 | ``` 36 | 37 | ## Helpers and Partials ## 38 | 39 | hbs exposes the `registerHelper` and `registerPartial` method from handlebars. 40 | 41 | ```javascript 42 | var hbs = require('hbs'); 43 | 44 | hbs.registerHelper('helper_name', function (options) { return 'helper value'; }); 45 | hbs.registerPartial('partial_name', 'partial value'); 46 | ``` 47 | 48 | For convenience, `registerPartials` provides a quick way to load all partials from a specific directory: 49 | 50 | ```javascript 51 | var hbs = require('hbs'); 52 | 53 | hbs.registerPartials(__dirname + '/views/partials', function (err) {}); 54 | ``` 55 | 56 | Partials that are loaded from a directory are named based on their filename, where spaces and hyphens are replaced with an underscore character: 57 | 58 | ``` 59 | template.html -> {{> template}} 60 | template 2.html -> {{> template_2}} 61 | login view.hbs -> {{> login_view}} 62 | template-file.html -> {{> template_file}} 63 | ``` 64 | 65 | See the [handlebars.js documentation](https://handlebarsjs.com/) for more 66 | information. 67 | 68 | The way the file is renamed to a partial name can be adjusted by providing a `rename` option. The function will recieve the file path relative to the registered directory and without the file extension. If the returned value contains any whitespace, those characters are replaced with a corresponding underscore character. 69 | 70 | ```js 71 | var hbs = require('hbs') 72 | 73 | hbs.registerPartials(path.join(__dirname, '/views/partials'), { 74 | rename: function (name) { 75 | // all non-word characters replaced with underscores 76 | return name.replace(/\W/g, '_') 77 | } 78 | }) 79 | ``` 80 | 81 | **Note:** This method is async; meaning that the directory is walked in a non-blocking manner to app startup. 82 | 83 | ## Exposing locals as template data ## 84 | 85 | hbs has the ability to expose the application and request locals within any context inside a view. To enable this functionality, simply call the `localsAsTemplateData` method and pass in your Express application instance. 86 | 87 | ```javascript 88 | var hbs = require('hbs'); 89 | var express = require('express'); 90 | 91 | var app = express(); 92 | hbs.localsAsTemplateData(app); 93 | 94 | app.locals.foo = "bar"; 95 | ``` 96 | 97 | The local data can then be accessed using the `@property` syntax: 98 | 99 | ``` 100 | top level: {{@foo}} 101 | {{#each items}} 102 | {{label}}: {{@foo}} 103 | {{/each}} 104 | ``` 105 | Note: In partials and templates, local data can be accessed without using `@` prefix. 106 | 107 | ## handlebars ## 108 | 109 | The handlebars require used by hbs can be accessed via the `handlebars` property on the `hbs` module. 110 | 111 | If you wish to use handlebars methods like `SafeString` please do so on this property. Do not register helpers or partials in this way. 112 | 113 | ``` 114 | // hbs.handlebars is the handlebars module 115 | hbs.handlebars === require('handlebars'); 116 | ``` 117 | 118 | ## Recipes ## 119 | 120 | ### more than one instance ### 121 | You can create isolated instances of hbs using the `create()` function on the module object. 122 | 123 | ``` 124 | var hbs = require('hbs'); 125 | 126 | var instance1 = hbs.create(); 127 | var instance2 = hbs.create(); 128 | 129 | app.engine('html', instance1.__express); 130 | app.engine('hbs', instance2.__express); 131 | ``` 132 | 133 | Each instance has the same methods/properties as the `hbs` module object. The module object is actually just an instance created for you automatically. 134 | 135 | ### extra scripts or styles ## 136 | Sometimes it is useful to have custom scripts or stylesheets on your pages. Handlebars does not provide a way to import or extend a template, but through the use of helpers you can create a similar result. 137 | 138 | We can take advantage of the fact that our body template is processed before the layout template. Knowing this, we can create two helpers `block` and `extend` which can be used to 'inject' custom stylesheets or scripts into the layout template. The `block` helper will act as a placeholder for values specified in earlier `extend` helpers. 139 | 140 | See examples/extend for a working example. Note how the index.hbs file defines extra stylesheets and scripts to be injected into the layout. They are put into the head section and at the end of the body respectively. If this was not done, the stylesheet would be in the body and the script would print `foo bar` too soon. 141 | 142 | ## Helpful Modules ## 143 | 144 | - **[hbs-utils](https://www.npmjs.com/package/hbs-utils)**: A small utility 145 | library that provides helpers for registering and compiling partials 146 | including automatic updates when partials are changed. 147 | 148 | [appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/nodejs-hbs/master?label=windows 149 | [appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-hbs 150 | [coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/hbs/master 151 | [coveralls-url]: https://coveralls.io/r/pillarjs/hbs?branch=master 152 | [github-actions-ci-image]: https://badgen.net/github/checks/pillarjs/hbs/master?label=linux 153 | [github-actions-ci-url]: https://github.com/pillarjs/hbs/actions?query=workflow%3Aci 154 | [node-image]: https://badgen.net/npm/node/hbs 155 | [node-url]: https://nodejs.org/en/download/ 156 | [npm-downloads-image]: https://badgen.net/npm/dm/hbs 157 | [npm-url]: https://npmjs.org/package/hbs 158 | [npm-version-image]: https://badgen.net/npm/v/hbs 159 | -------------------------------------------------------------------------------- /node_modules/hbs/lib/async.js: -------------------------------------------------------------------------------- 1 | /// provides the async helper functionality 2 | 3 | function Waiter() { 4 | if (!(this instanceof Waiter)) { 5 | return new Waiter(); 6 | } 7 | 8 | var self = this; 9 | 10 | // found values 11 | self.values = {}; 12 | 13 | // callback when done 14 | self.callback = null; 15 | 16 | self.resolved = false; 17 | 18 | self.count = 0; 19 | }; 20 | 21 | Waiter.prototype.wait = function() { 22 | var self = this; 23 | ++self.count; 24 | }; 25 | 26 | // resolve the promise 27 | Waiter.prototype.resolve = function(name, val) { 28 | var self = this; 29 | 30 | self.values[name] = val; 31 | 32 | // done with all items 33 | if (--self.count === 0) { 34 | self.resolved = true; 35 | 36 | // we may not have a done callback yet 37 | if (self.callback) { 38 | self.callback(self.values); 39 | } 40 | } 41 | }; 42 | 43 | // sets the done callback for the waiter 44 | // notifies when the promise is complete 45 | Waiter.prototype.done = function(fn) { 46 | var self = this; 47 | 48 | self.callback = fn; 49 | if (self.resolved) { 50 | fn(self.values); 51 | } 52 | }; 53 | 54 | var alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_'; 55 | 56 | var gen_id = function() { 57 | var res = ''; 58 | for (var i=0 ; i<8 ; ++i) { 59 | res += alphabet[Math.floor(Math.random() * alphabet.length)]; 60 | } 61 | 62 | return res; 63 | }; 64 | 65 | module.exports = function() { 66 | // baton which contains the current 67 | // set of deferreds 68 | var waiter; 69 | 70 | var obj = Object.create(null); 71 | obj.done = function done(fn) { 72 | // no async things called 73 | if (!waiter) { 74 | return fn({}); 75 | } 76 | 77 | waiter.done(fn); 78 | 79 | // clear the waiter for the next template 80 | waiter = undefined; 81 | }; 82 | 83 | obj.resolve = function resolve(fn, args) { 84 | // we want to do async things, need a waiter for that 85 | if (!waiter) { 86 | waiter = new Waiter(); 87 | } 88 | 89 | var id = '__' + gen_id() + '__'; 90 | 91 | var cur_waiter = waiter; 92 | waiter.wait(); 93 | 94 | args = [].slice.call(args); 95 | args.push(function(res) { 96 | cur_waiter.resolve(id, res); 97 | }) 98 | 99 | fn.apply(null, args); 100 | 101 | // return the id placeholder 102 | // this will be replaced later 103 | return id; 104 | }; 105 | 106 | return obj; 107 | }; 108 | -------------------------------------------------------------------------------- /node_modules/hbs/lib/hbs.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var walk = require('walk').walk; 4 | 5 | var async = require('./async'); 6 | 7 | function Instance(handlebars) { 8 | if (!(this instanceof Instance)) { 9 | return new Instance(handlebars); 10 | } 11 | 12 | // expose handlebars, allows users to use their versions 13 | // by overriding this early in their apps 14 | var self = this; 15 | 16 | self.handlebars = handlebars || require('handlebars').create(); 17 | 18 | // cache for templates, express 3.x doesn't do this for us 19 | self.cache = {}; 20 | 21 | self.__express = middleware.bind(this); 22 | 23 | // queue for partials registration 24 | self._queue = null 25 | 26 | // DEPRECATED, kept for backwards compatibility 27 | self.SafeString = this.handlebars.SafeString; 28 | self.Utils = this.handlebars.Utils; 29 | }; 30 | 31 | // express 3.x template engine compliance 32 | function middleware(filename, options, cb) { 33 | var self = this; 34 | 35 | if (self._queue) { 36 | self._queue.push(middleware.bind.apply(middleware, [this].concat(Array.prototype.slice.call(arguments)))) 37 | return 38 | } 39 | 40 | var cache = self.cache; 41 | var handlebars = self.handlebars; 42 | 43 | self.async = async(); 44 | 45 | // grab extension from filename 46 | // if we need a layout, we will look for one matching out extension 47 | var extension = path.extname(filename); 48 | 49 | // Default handlebars runtime options 50 | var handlebarsOpts = { 51 | allowProtoMethodsByDefault: true, 52 | allowProtoPropertiesByDefault: true 53 | } 54 | 55 | // If passing the locals as data, create the handlebars options object now 56 | if (self.__localsAsData) { 57 | handlebarsOpts.data = options._locals 58 | } 59 | 60 | // render the original file 61 | // cb(err, str) 62 | function render_file(locals, cb) { 63 | // cached? 64 | var template = cache[filename]; 65 | if (template) { 66 | try { 67 | var res = template(locals, handlebarsOpts) 68 | self.async.done(function (values) { 69 | Object.keys(values).forEach(function (id) { 70 | res = res.replace(id, values[id]) 71 | }) 72 | 73 | cb(null, res) 74 | }) 75 | } catch (err) { 76 | cb(prependFilenameToError(filename, err)) 77 | } 78 | 79 | return 80 | } 81 | 82 | fs.readFile(filename, 'utf8', function(err, str){ 83 | if (err) { 84 | return cb(err); 85 | } 86 | 87 | var template = handlebars.compile(str); 88 | if (locals.cache) { 89 | cache[filename] = template; 90 | } 91 | 92 | try { 93 | var res = template(locals, handlebarsOpts); 94 | self.async.done(function(values) { 95 | Object.keys(values).forEach(function(id) { 96 | res = res.replace(id, values[id]); 97 | }); 98 | 99 | cb(null, res); 100 | }); 101 | } catch (err) { 102 | cb(prependFilenameToError(filename, err)) 103 | } 104 | }); 105 | } 106 | 107 | // render with a layout 108 | function render_with_layout (filename, template, locals, cb) { 109 | render_file(locals, function(err, str) { 110 | if (err) { 111 | return cb(err); 112 | } 113 | 114 | locals.body = str; 115 | 116 | try { 117 | var res = template(locals, handlebarsOpts) 118 | self.async.done(function (values) { 119 | Object.keys(values).forEach(function (id) { 120 | res = res.replace(id, values[id]) 121 | }) 122 | 123 | cb(null, res) 124 | }) 125 | } catch (err) { 126 | cb(prependFilenameToError(filename, err)) 127 | } 128 | }); 129 | } 130 | 131 | var layout = options.layout; 132 | 133 | // user did not specify a layout in the locals 134 | // check global layout state 135 | if (layout === undefined && options.settings && options.settings['view options']) { 136 | layout = options.settings['view options'].layout; 137 | } 138 | 139 | // user explicitly request no layout 140 | // either by specifying false for layout: false in locals 141 | // or by settings the false view options 142 | if (layout !== undefined && !layout) { 143 | return render_file(options, cb); 144 | } 145 | 146 | var view_dirs = options.settings.views; 147 | 148 | var layout_filename = [].concat(view_dirs).map(function (view_dir) { 149 | var view_path = path.join(view_dir, layout || 'layout'); 150 | 151 | if (!path.extname(view_path)) { 152 | view_path += extension; 153 | } 154 | 155 | return view_path; 156 | }); 157 | 158 | for (var i = 0; i < layout_filename.length; i++) { 159 | var layout_template = cache[layout_filename[i]] 160 | 161 | if (layout_template) { 162 | return render_with_layout(layout_filename[i], layout_template, options, cb) 163 | } 164 | } 165 | 166 | // TODO check if layout path has .hbs extension 167 | 168 | function prependFilenameToError (filename, err) { 169 | // prepend to the message 170 | if (typeof err.message === 'string') { 171 | err.message = filename + ': ' + err.message 172 | } 173 | 174 | return err 175 | } 176 | 177 | function cacheAndCompile(filename, str) { 178 | var layout_template = handlebars.compile(str); 179 | if (options.cache) { 180 | cache[filename] = layout_template; 181 | } 182 | 183 | render_with_layout(filename, layout_template, options, cb) 184 | } 185 | 186 | function tryReadFileAndCache(templates) { 187 | var template = templates.shift(); 188 | 189 | fs.readFile(template, 'utf8', function(err, str) { 190 | if (err) { 191 | if (layout && templates.length === 0) { 192 | // Only return error if user explicitly asked for layout. 193 | return cb(err); 194 | } 195 | 196 | if (templates.length > 0) { 197 | return tryReadFileAndCache(templates); 198 | } 199 | 200 | return render_file(options, cb); 201 | } 202 | 203 | cacheAndCompile(template, str); 204 | }); 205 | } 206 | 207 | tryReadFileAndCache(layout_filename); 208 | } 209 | 210 | // express 2.x template engine compliance 211 | Instance.prototype.compile = function (str) { 212 | if (typeof str !== 'string') { 213 | return str; 214 | } 215 | 216 | var template = this.handlebars.compile(str); 217 | return function (locals) { 218 | return template(locals, { 219 | helpers: locals.blockHelpers, 220 | partials: null, 221 | data: null 222 | }); 223 | }; 224 | }; 225 | 226 | Instance.prototype.registerHelper = function () { 227 | this.handlebars.registerHelper.apply(this.handlebars, arguments); 228 | }; 229 | 230 | Instance.prototype.registerPartial = function () { 231 | this.handlebars.registerPartial.apply(this.handlebars, arguments); 232 | }; 233 | 234 | Instance.prototype.registerPartials = function (directory, options, done) { 235 | var self = this 236 | 237 | if (this._queue) { 238 | self._queue.unshift(self.registerPartials.bind.apply(self.registerPartials, 239 | [this].concat(Array.prototype.slice.call(arguments)))) 240 | return 241 | } else { 242 | self._queue = [] 243 | } 244 | 245 | var callback 246 | var handlebars = self.handlebars 247 | var opts = options || {} 248 | 249 | if (done || typeof options !== 'function') { 250 | callback = done 251 | } else { 252 | callback = options 253 | opts = {} 254 | } 255 | 256 | var rename = opts.rename !== undefined ? opts.rename : function (name) { 257 | return name.replace(/\-/g, '_') 258 | } 259 | 260 | var w = walk(directory) 261 | w.on('file', function (root, stat, done) { 262 | var filepath = path.join(root, stat.name) 263 | var isValidTemplate = /\.(html|hbs)$/.test(filepath); 264 | 265 | if (!isValidTemplate) { 266 | return done(null); 267 | } 268 | 269 | fs.readFile(filepath, 'utf8', function(err, data) { 270 | if (!err) { 271 | var extname = path.extname(filepath) 272 | var name = path.relative(directory, filepath) 273 | .slice(0, -(extname.length)) 274 | .replace(/\\/g, '/') 275 | 276 | handlebars.registerPartial(rename(name).replace(/ /g, '_'), data) 277 | } 278 | 279 | done(err); 280 | }); 281 | }) 282 | w.on('end', function () { 283 | if (self._queue) { 284 | var q = self._queue 285 | 286 | self._queue = null 287 | 288 | for (var i = 0; i < q.length; i++) { 289 | q[i]() 290 | } 291 | } 292 | }) 293 | 294 | if (callback) { 295 | w.on('end', callback) 296 | } 297 | }; 298 | 299 | Instance.prototype.registerAsyncHelper = function(name, fn) { 300 | var self = this; 301 | self.handlebars.registerHelper(name, function() { 302 | return self.async.resolve(fn.bind(this), arguments) 303 | }); 304 | }; 305 | 306 | Instance.prototype.localsAsTemplateData = function(app) { 307 | // Set a flag to indicate we should pass locals as data 308 | this.__localsAsData = true; 309 | 310 | app.render = (function(render) { 311 | return function(view, options, callback) { 312 | if (typeof options === "function") { 313 | callback = options; 314 | options = {}; 315 | } 316 | 317 | // Mix response.locals (options._locals) with app.locals (this.locals) 318 | options._locals = options._locals || {}; 319 | for (var key in this.locals) { 320 | options._locals[key] = this.locals[key]; 321 | } 322 | 323 | return render.call(this, view, options, callback); 324 | }; 325 | })(app.render); 326 | }; 327 | 328 | module.exports = new Instance(); 329 | module.exports.create = function(handlebars) { 330 | return new Instance(handlebars); 331 | }; 332 | -------------------------------------------------------------------------------- /node_modules/hbs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "hbs@^4.2.0", 3 | "_id": "hbs@4.2.0", 4 | "_inBundle": false, 5 | "_integrity": "sha512-dQwHnrfWlTk5PvG9+a45GYpg0VpX47ryKF8dULVd6DtwOE6TEcYQXQ5QM6nyOx/h7v3bvEQbdn19EDAcfUAgZg==", 6 | "_location": "/hbs", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "hbs@^4.2.0", 12 | "name": "hbs", 13 | "escapedName": "hbs", 14 | "rawSpec": "^4.2.0", 15 | "saveSpec": null, 16 | "fetchSpec": "^4.2.0" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/hbs/-/hbs-4.2.0.tgz", 23 | "_shasum": "10e40dcc24d5be7342df9636316896617542a32b", 24 | "_spec": "hbs@^4.2.0", 25 | "_where": "C:\\Users\\rajku\\OneDrive\\Desktop\\WebDev Projcts\\Resume Maker new", 26 | "author": { 27 | "name": "Don Park", 28 | "email": "donpark@docuverse.com", 29 | "url": "http://blog.docuverse.com" 30 | }, 31 | "bugs": { 32 | "url": "https://github.com/pillarjs/hbs/issues" 33 | }, 34 | "bundleDependencies": false, 35 | "contributors": [ 36 | { 37 | "name": "Roman Shtylman", 38 | "email": "shtylman@gmail.com" 39 | } 40 | ], 41 | "dependencies": { 42 | "handlebars": "4.7.7", 43 | "walk": "2.3.15" 44 | }, 45 | "deprecated": false, 46 | "description": "Express.js template engine plugin for Handlebars", 47 | "devDependencies": { 48 | "eslint": "7.32.0", 49 | "eslint-plugin-markdown": "2.2.1", 50 | "mocha": "9.1.3", 51 | "nyc": "15.1.0", 52 | "rimraf": "2.7.1", 53 | "supertest": "6.1.6" 54 | }, 55 | "engines": { 56 | "node": ">= 0.8", 57 | "npm": "1.2.8000 || >= 1.4.16" 58 | }, 59 | "files": [ 60 | "lib/", 61 | "HISTORY.md", 62 | "LICENSE", 63 | "README.md" 64 | ], 65 | "homepage": "https://github.com/pillarjs/hbs#readme", 66 | "license": "MIT", 67 | "main": "lib/hbs.js", 68 | "name": "hbs", 69 | "repository": { 70 | "type": "git", 71 | "url": "git+https://github.com/pillarjs/hbs.git" 72 | }, 73 | "scripts": { 74 | "lint": "eslint .", 75 | "test": "mocha --reporter spec --ui qunit --bail test/*/index.js", 76 | "test-ci": "nyc --reporter=lcov --reporter=text npm test", 77 | "test-cov": "nyc --reporter=html --reporter=text npm test" 78 | }, 79 | "version": "4.2.0" 80 | } 81 | -------------------------------------------------------------------------------- /node_modules/html-pdf/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2016 Contributors https://github.com/marcbachmann/node-html-pdf/graphs/contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/html-pdf/README.md: -------------------------------------------------------------------------------- 1 | # node-html-pdf 2 | ## HTML to PDF converter that uses phantomjs 3 | ![image](examples/businesscard/businesscard.png) 4 | [Example Business Card](examples/businesscard/businesscard.pdf) 5 | -> [and its Source file](examples/businesscard/businesscard.html) 6 | 7 | [Example Receipt](http://imgr-static.s3-eu-west-1.amazonaws.com/order.pdf) 8 | 9 | ## Changelog 10 | 11 | Have a look at the releases page: https://github.com/marcbachmann/node-html-pdf/releases 12 | 13 | ## Installation 14 | 15 | Install the html-pdf utility via [npm](http://npmjs.org/): 16 | 17 | ``` 18 | $ npm install -g html-pdf 19 | ``` 20 | 21 | ## Command-line example 22 | 23 | ``` 24 | $ html-pdf test/businesscard.html businesscard.pdf 25 | ``` 26 | 27 | ## Code example 28 | ```javascript 29 | var fs = require('fs'); 30 | var pdf = require('html-pdf'); 31 | var html = fs.readFileSync('./test/businesscard.html', 'utf8'); 32 | var options = { format: 'Letter' }; 33 | 34 | pdf.create(html, options).toFile('./businesscard.pdf', function(err, res) { 35 | if (err) return console.log(err); 36 | console.log(res); // { filename: '/app/businesscard.pdf' } 37 | }); 38 | ``` 39 | 40 | ## API 41 | 42 | ```js 43 | var pdf = require('html-pdf'); 44 | pdf.create(html).toFile([filepath, ]function(err, res){ 45 | console.log(res.filename); 46 | }); 47 | 48 | pdf.create(html).toStream(function(err, stream){ 49 | stream.pipe(fs.createWriteStream('./foo.pdf')); 50 | }); 51 | 52 | pdf.create(html).toBuffer(function(err, buffer){ 53 | console.log('This is a buffer:', Buffer.isBuffer(buffer)); 54 | }); 55 | 56 | 57 | // for backwards compatibility 58 | // alias to pdf.create(html[, options]).toBuffer(callback) 59 | pdf.create(html [, options], function(err, buffer){}); 60 | ``` 61 | 62 | ### Footers and Headers 63 | 64 | `html-pdf` can read the header or footer either out of the `footer` and `header` config object or out of the html source. You can either set a default header & footer or overwrite that by appending a page number (1 based index) to the `id="pageHeader"` attribute of a html tag. 65 | 66 | You can use any combination of those tags. The library tries to find any element, that contains the `pageHeader` or `pageFooter` id prefix. 67 | ```html 68 | 69 |
Header on first page
70 |
Header on second page
71 |
Header on third page
72 |
Header on last page
73 | ... 74 | 75 | 76 | 77 | 78 | ``` 79 | 80 | 81 | ## Options 82 | ```javascript 83 | config = { 84 | 85 | // Export options 86 | "directory": "/tmp", // The directory the file gets written into if not using .toFile(filename, callback). default: '/tmp' 87 | 88 | // Papersize Options: http://phantomjs.org/api/webpage/property/paper-size.html 89 | "height": "10.5in", // allowed units: mm, cm, in, px 90 | "width": "8in", // allowed units: mm, cm, in, px 91 | - or - 92 | "format": "Letter", // allowed units: A3, A4, A5, Legal, Letter, Tabloid 93 | "orientation": "portrait", // portrait or landscape 94 | 95 | // Page options 96 | "border": "0", // default is 0, units: mm, cm, in, px 97 | - or - 98 | "border": { 99 | "top": "2in", // default is 0, units: mm, cm, in, px 100 | "right": "1in", 101 | "bottom": "2in", 102 | "left": "1.5in" 103 | }, 104 | 105 | paginationOffset: 1, // Override the initial pagination number 106 | "header": { 107 | "height": "45mm", 108 | "contents": '
Author: Marc Bachmann
' 109 | }, 110 | "footer": { 111 | "height": "28mm", 112 | "contents": { 113 | first: 'Cover page', 114 | 2: 'Second page', // Any page number is working. 1-based index 115 | default: '{{page}}/{{pages}}', // fallback value 116 | last: 'Last Page' 117 | } 118 | }, 119 | 120 | 121 | // Rendering options 122 | "base": "file:///home/www/your-asset-path/", // Base path that's used to load files (images, css, js) when they aren't referenced using a host 123 | 124 | // Zooming option, can be used to scale images if `options.type` is not pdf 125 | "zoomFactor": "1", // default is 1 126 | 127 | // File options 128 | "type": "pdf", // allowed file types: png, jpeg, pdf 129 | "quality": "75", // only used for types png & jpeg 130 | 131 | // Script options 132 | "phantomPath": "./node_modules/phantomjs/bin/phantomjs", // PhantomJS binary which should get downloaded automatically 133 | "phantomArgs": [], // array of strings used as phantomjs args e.g. ["--ignore-ssl-errors=yes"] 134 | "localUrlAccess": false, // Prevent local file:// access by passing '--local-url-access=false' to phantomjs 135 | // For security reasons you should keep the default value if you render arbritary html/js. 136 | "script": '/url', // Absolute path to a custom phantomjs script, use the file in lib/scripts as example 137 | "timeout": 30000, // Timeout that will cancel phantomjs, in milliseconds 138 | 139 | // Time we should wait after window load 140 | // accepted values are 'manual', some delay in milliseconds or undefined to wait for a render event 141 | "renderDelay": 1000, 142 | 143 | // HTTP Headers that are used for requests 144 | "httpHeaders": { 145 | // e.g. 146 | "Authorization": "Bearer ACEFAD8C-4B4D-4042-AB30-6C735F5BAC8B" 147 | }, 148 | 149 | // To run Node application as Windows service 150 | "childProcessOptions": { 151 | "detached": true 152 | } 153 | 154 | // HTTP Cookies that are used for requests 155 | "httpCookies": [ 156 | // e.g. 157 | { 158 | "name": "Valid-Cookie-Name", // required 159 | "value": "Valid-Cookie-Value", // required 160 | "domain": "localhost", 161 | "path": "/foo", // required 162 | "httponly": true, 163 | "secure": false, 164 | "expires": (new Date()).getTime() + (1000 * 60 * 60) // e.g. expires in 1 hour 165 | } 166 | ] 167 | 168 | } 169 | ``` 170 | 171 | The full options object gets converted to JSON and will get passed to the phantomjs script as third argument. 172 | There are more options concerning the paperSize, header & footer options inside the phantomjs script. 173 | -------------------------------------------------------------------------------- /node_modules/html-pdf/bin/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var fs = require('fs') 4 | var pdf = require('../') 5 | var path = require('path') 6 | 7 | var args = process.argv.slice(2) 8 | 9 | if (args.length >= 2) { 10 | htmlpdf(args[0], args[1]) 11 | } else { 12 | help() 13 | } 14 | 15 | function help () { 16 | var help = [ 17 | 'Usage: html-pdf ', 18 | 'e.g.: html-pdf source.html destination.pdf' 19 | ].join('\n') 20 | 21 | console.log(help) 22 | } 23 | 24 | function htmlpdf (source, destination) { 25 | var html = fs.readFileSync(source, 'utf8') 26 | var options = { 27 | base: 'file://' + path.resolve(source) 28 | } 29 | pdf.create(html, options).toFile(destination, function (err, res) { 30 | if (err) throw err 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /node_modules/html-pdf/examples/businesscard/businesscard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SuitArt Business Card 5 | 72 | 73 | 74 |
75 |
76 |
Marc Bachmann
77 |
cto
78 | 79 |
80 |
p: +41 00 000 00 00
81 |
github: marcbachmann
82 |
83 |
84 |
suitart ag
85 |
räffelstrasse 25
86 |
8045 zürich
87 |
88 |
89 |
90 |
91 | 92 |
93 |
8045 zürich
94 |
95 |
96 | 97 | 98 | -------------------------------------------------------------------------------- /node_modules/html-pdf/examples/businesscard/businesscard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/killerraj369/Resume-Maker/e0314d220008469676b3f34c66abc200a06a4c03/node_modules/html-pdf/examples/businesscard/businesscard.png -------------------------------------------------------------------------------- /node_modules/html-pdf/examples/businesscard/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/killerraj369/Resume-Maker/e0314d220008469676b3f34c66abc200a06a4c03/node_modules/html-pdf/examples/businesscard/image.png -------------------------------------------------------------------------------- /node_modules/html-pdf/examples/businesscard/test.js: -------------------------------------------------------------------------------- 1 | var test = require('tape') 2 | var pdf = require('../../') 3 | var path = require('path') 4 | var fs = require('fs') 5 | 6 | test('allows custom html and css', function (t) { 7 | t.plan(3) 8 | 9 | var template = path.join(__dirname, 'businesscard.html') 10 | var filename = template.replace('.html', '.pdf') 11 | var templateHtml = fs.readFileSync(template, 'utf8') 12 | 13 | var image = path.join('file://', __dirname, 'image.png') 14 | templateHtml = templateHtml.replace('{{image}}', image) 15 | 16 | var options = { 17 | width: '50mm', 18 | height: '90mm' 19 | } 20 | 21 | pdf 22 | .create(templateHtml, options) 23 | .toFile(filename, function (err, pdf) { 24 | t.error(err) 25 | t.assert(pdf.filename, 'Returns the filename') 26 | t.assert(fs.existsSync(pdf.filename), 'Saves the file to the desired destination') 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /node_modules/html-pdf/examples/serve-http/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const http = require('http') 3 | const pdf = require('../../') 4 | const tmpl = fs.readFileSync(require.resolve('../businesscard/businesscard.html'), 'utf8') 5 | 6 | const server = http.createServer(function (req, res) { 7 | if (req.url === '/favicon.ico') return res.end('404') 8 | const html = tmpl.replace('{{image}}', `file://${require.resolve('../businesscard/image.png')}`) 9 | pdf.create(html, {width: '50mm', height: '90mm'}).toStream((err, stream) => { 10 | if (err) return res.end(err.stack) 11 | res.setHeader('Content-type', 'application/pdf') 12 | stream.pipe(res) 13 | }) 14 | }) 15 | 16 | server.listen(8080, function (err) { 17 | if (err) throw err 18 | console.log('Listening on http://localhost:%s', server.address().port) 19 | }) 20 | -------------------------------------------------------------------------------- /node_modules/html-pdf/lib/index.js: -------------------------------------------------------------------------------- 1 | var PDF = require('./pdf') 2 | 3 | module.exports = { 4 | create: function createPdf (html, options, callback) { 5 | if (arguments.length === 1) { 6 | return new PDF(html) 7 | } 8 | 9 | if (arguments.length === 2 && typeof options !== 'function') { 10 | return new PDF(html, options) 11 | } 12 | 13 | if (arguments.length === 2) { 14 | callback = options 15 | options = {} 16 | } 17 | 18 | try { 19 | var pdf = new PDF(html, options) 20 | } catch (err) { 21 | return callback(err) 22 | } 23 | 24 | pdf.exec(callback) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/html-pdf/lib/pdf.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var childprocess = require('child_process') 3 | var path = require('path') 4 | var assert = require('assert') 5 | 6 | try { 7 | var phantomjs = require('phantomjs-prebuilt') 8 | } catch (err) { 9 | console.log('html-pdf: Failed to load PhantomJS module.', err) 10 | } 11 | 12 | /* 13 | * phantomjs version 1.8.1 and later should work. 14 | * 15 | * Create a PDF file out of an html string. 16 | * 17 | * Regions for the PDF page are: 18 | * 19 | * - Page Header -> document.getElementById('pageHeader') 20 | * - Page Content -> document.getElementById('pageContent') 21 | * - Page Footer -> document.getElementById('pageFooter') 22 | * 23 | * When no #pageContent is available, phantomjs will use document.body as pdf content 24 | */ 25 | module.exports = PDF 26 | function PDF (html, options) { 27 | this.html = html 28 | this.options = options || {} 29 | if (this.options.script) { 30 | this.script = path.normalize(this.options.script) 31 | } else { 32 | this.script = path.join(__dirname, 'scripts', 'pdf_a4_portrait.js') 33 | } 34 | 35 | if (this.options.filename) this.options.filename = path.resolve(this.options.filename) 36 | if (!this.options.phantomPath) this.options.phantomPath = phantomjs && phantomjs.path 37 | this.options.phantomArgs = this.options.phantomArgs || [] 38 | 39 | if (!this.options.localUrlAccess) this.options.phantomArgs.push('--local-url-access=false') 40 | assert(this.options.phantomPath, "html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath'") 41 | assert(typeof this.html === 'string' && this.html.length, "html-pdf: Can't create a pdf without an html string") 42 | this.options.timeout = parseInt(this.options.timeout, 10) || 30000 43 | } 44 | 45 | PDF.prototype.toBuffer = function PdfToBuffer (callback) { 46 | this.exec(function execPdfToBuffer (err, res) { 47 | if (err) return callback(err) 48 | fs.readFile(res.filename, function readCallback (err, buffer) { 49 | if (err) return callback(err) 50 | fs.unlink(res.filename, function unlinkPdfFile (err) { 51 | if (err) return callback(err) 52 | callback(null, buffer) 53 | }) 54 | }) 55 | }) 56 | } 57 | 58 | PDF.prototype.toStream = function PdfToStream (callback) { 59 | this.exec(function (err, res) { 60 | if (err) return callback(err) 61 | try { 62 | var stream = fs.createReadStream(res.filename) 63 | } catch (err) { 64 | return callback(err) 65 | } 66 | 67 | stream.on('end', function () { 68 | fs.unlink(res.filename, function unlinkPdfFile (err) { 69 | if (err) console.log('html-pdf:', err) 70 | }) 71 | }) 72 | 73 | callback(null, stream) 74 | }) 75 | } 76 | 77 | PDF.prototype.toFile = function PdfToFile (filename, callback) { 78 | assert(arguments.length > 0, 'html-pdf: The method .toFile([filename, ]callback) requires a callback.') 79 | if (filename instanceof Function) { 80 | callback = filename 81 | filename = undefined 82 | } else { 83 | this.options.filename = path.resolve(filename) 84 | } 85 | this.exec(callback) 86 | } 87 | 88 | PDF.prototype.exec = function PdfExec (callback) { 89 | var child = childprocess.spawn(this.options.phantomPath, [].concat(this.options.phantomArgs, [this.script]), this.options.childProcessOptions) 90 | var stderr = [] 91 | 92 | var timeout = setTimeout(function execTimeout () { 93 | respond(null, new Error('html-pdf: PDF generation timeout. Phantom.js script did not exit.')) 94 | }, this.options.timeout) 95 | 96 | function onError (buffer) { 97 | stderr.push(buffer) 98 | } 99 | 100 | function onData (buffer) { 101 | var result 102 | try { 103 | var json = buffer.toString().trim() 104 | if (json) result = JSON.parse(json) 105 | } catch (err) { 106 | // Proxy for debugging purposes 107 | process.stdout.write(buffer) 108 | } 109 | 110 | if (result) respond(null, null, result) 111 | } 112 | 113 | var callbacked = false 114 | function respond (code, err, data) { 115 | if (callbacked) return 116 | callbacked = true 117 | clearTimeout(timeout) 118 | 119 | // If we don't have an exit code, we kill the process, ignore stderr after this point 120 | if (code === null) kill(child, onData, onError) 121 | 122 | // Since code has a truthy/falsy value of either 0 or 1, check for existence first. 123 | // Ignore if code has a value of 0 since that means PhantomJS has executed and exited successfully. 124 | // Also, as per your script and standards, having a code value of 1 means one can always assume that 125 | // an error occured. 126 | if (((typeof code !== 'undefined' && code !== null) && code !== 0) || err) { 127 | var error = null 128 | 129 | if (err) { 130 | // Rudimentary checking if err is an instance of the Error class 131 | error = err instanceof Error ? err : new Error(err) 132 | } else { 133 | // This is to catch the edge case of having a exit code value of 1 but having no error 134 | error = new Error('html-pdf: Unknown Error') 135 | } 136 | 137 | // Append anything caught from the stderr 138 | var postfix = stderr.length ? '\n' + Buffer.concat(stderr).toString() : '' 139 | if (postfix) error.message += postfix 140 | 141 | return callback(error) 142 | } 143 | 144 | callback(null, data) 145 | } 146 | 147 | child.stdout.on('data', onData) 148 | child.stderr.on('data', onError) 149 | child.on('error', function onError (err) { respond(null, err) }) 150 | 151 | // An exit event is most likely an error because we didn't get any data at this point 152 | child.on('close', respond) 153 | child.on('exit', respond) 154 | 155 | var config = JSON.stringify({html: this.html, options: this.options}) 156 | child.stdin.write(config + '\n', 'utf8') 157 | child.stdin.end() 158 | } 159 | 160 | function kill (child, onData, onError) { 161 | child.stdin.end() 162 | child.kill() 163 | } 164 | -------------------------------------------------------------------------------- /node_modules/html-pdf/lib/scripts/pdf_a4_portrait.js: -------------------------------------------------------------------------------- 1 | /* global phantom */ 2 | var system = require('system') 3 | var webpage = require('webpage') 4 | 5 | // Error handler 6 | function exit (error) { 7 | var message 8 | if (typeof error === 'string') message = error 9 | if (error) system.stderr.write('html-pdf: ' + (message || 'Unknown Error ' + error) + '\n') 10 | phantom.exit(error ? 1 : 0) 11 | } 12 | 13 | // Build stack to print 14 | function buildStack (msg, trace) { 15 | var msgStack = [msg] 16 | if (trace && trace.length) { 17 | msgStack.push('Stack:') 18 | trace.forEach(function (t) { 19 | msgStack.push(' at ' + t.file || t.sourceURL + ': ' + t.line + ' (in function ' + t.function + ')') 20 | }) 21 | } 22 | return msgStack.join('\n') 23 | } 24 | 25 | phantom.onError = function (msg, trace) { 26 | exit(buildStack('Script - ' + msg, trace)) 27 | } 28 | 29 | // Load configurations from stdin 30 | var json = JSON.parse(system.stdin.readLine()) 31 | if (!json.html || !json.html.trim()) exit('Did not receive any html') 32 | 33 | var options = json.options 34 | var page = webpage.create() 35 | 36 | // Completely load page & end process 37 | // ---------------------------------- 38 | var rendered = false 39 | var renderTimeout 40 | 41 | // If renderDelay is manual, then listen for an event and don't automatically render 42 | if (options.renderDelay === 'manual') { 43 | page.onCallback = function (message) { 44 | setTimeout(renderNow, 0) 45 | return message 46 | } 47 | } 48 | 49 | page.onLoadFinished = function () { 50 | if (options.renderDelay === 'manual') return 51 | renderTimeout = setTimeout(renderNow, Math.floor(options.renderDelay) || 0) 52 | } 53 | 54 | function renderNow () { 55 | if (rendered) return 56 | rendered = true 57 | clearTimeout(renderTimeout) 58 | page.paperSize = definePaperSize(getContent(page), options) 59 | 60 | var fileOptions = { 61 | type: options.type || 'pdf', 62 | quality: options.quality || 75 63 | } 64 | 65 | var filename = options.filename || (options.directory || '/tmp') + '/html-pdf-' + system.pid + '.' + fileOptions.type 66 | page.render(filename, fileOptions) 67 | 68 | // Output to parent process 69 | system.stdout.write(JSON.stringify({filename: filename})) 70 | exit(null) 71 | } 72 | 73 | // Set Content and begin loading 74 | // ----------------------------- 75 | if (options.httpCookies) page.cookies = options.httpCookies 76 | if (options.httpHeaders) page.customHeaders = options.httpHeaders 77 | if (options.viewportSize) page.viewportSize = options.viewportSize 78 | if (options.zoomFactor) page.zoomFactor = options.zoomFactor 79 | if (options.base) page.setContent(json.html, options.base) 80 | else page.setContent(json.html, null) 81 | 82 | page.onError = function (msg, trace) { 83 | exit(buildStack('Evaluation - ' + msg, trace)) 84 | } 85 | 86 | // Force cleanup after 2 minutes 87 | // Add 2 seconds to make sure master process triggers kill 88 | // before to the phantom process 89 | var timeout = (options.timeout || 120000) + 2000 90 | setTimeout(function () { 91 | exit('Force timeout') 92 | }, timeout) 93 | 94 | // Returns a hash of HTML content 95 | // ------------------------------ 96 | function getContent (page) { 97 | return page.evaluate(function () { 98 | function getElements (doc, wildcard) { 99 | var wildcardMatcher = new RegExp(wildcard + '(.*)') 100 | var hasElements = false 101 | var elements = {} 102 | var $elements = document.querySelectorAll("[id*='" + wildcard + "']") 103 | 104 | var $elem, match, i 105 | var len = $elements.length 106 | for (i = 0; i < len; i++) { 107 | $elem = $elements[i] 108 | match = $elem.attributes.id.value.match(wildcardMatcher) 109 | if (match) { 110 | hasElements = true 111 | elements[match[1]] = $elem.outerHTML 112 | $elem.parentNode.removeChild($elem) 113 | } 114 | } 115 | 116 | if (hasElements) return elements 117 | } 118 | 119 | function getElement (doc, id) { 120 | var $elem = doc.getElementById(id) 121 | if ($elem) { 122 | var html = $elem.outerHTML 123 | $elem.parentNode.removeChild($elem) 124 | return html 125 | } 126 | } 127 | 128 | var styles = document.querySelectorAll('link,style') 129 | styles = Array.prototype.reduce.call(styles, function (string, node) { 130 | return string + (node.outerHTML || '') 131 | }, '') 132 | 133 | // Wildcard headers e.g.
or
134 | var header = getElements(document, 'pageHeader-') 135 | var footer = getElements(document, 'pageFooter-') 136 | 137 | // Default header and footer e.g. 92 | // // } 93 | // } 94 | }; 95 | 96 | Html_Pdf.create(html,pdf_options).toStream(function(err,stream){ 97 | if(err) 98 | { 99 | return reject(err); 100 | console.log(err) 101 | } 102 | return resolve(stream); 103 | }); 104 | }); 105 | 106 | } 107 | 108 | function _streamToBuffer(Stream,cb) 109 | { 110 | const chunks =[]; 111 | Stream.on('data',(chunk) => { 112 | chunks.push(chunk); 113 | }); 114 | 115 | Stream.on('end' ,() => { 116 | return cb(null,Buffer.concat(chunks)); 117 | } 118 | ); 119 | 120 | Stream.on('error',(e) => { 121 | return cb(e); 122 | }); 123 | } 124 | 125 | 126 | app.get("/", function (req, res) { 127 | res.sendFile(__dirname + "/html files/home.html"); 128 | }) 129 | 130 | app.post("/", function (req, res) { 131 | 132 | }) 133 | 134 | 135 | 136 | 137 | app.get("/personal_info", function (req, res) { 138 | res.sendFile(__dirname + "/html files/personal_info.html"); 139 | }) 140 | 141 | app.post("/personal_info", function (req, res) { 142 | first = req.body.first; 143 | second = req.body.second; 144 | add = req.body.add; 145 | ctiy = req.body.city; 146 | zip = req.body.zip; 147 | email = req.body.email; 148 | country = req.body.Country; 149 | phone = req.body.phone; 150 | professional=req.body.professional_summary; 151 | 152 | // console.log(first); 153 | // console.log(b); 154 | // console.log(c); 155 | // console.log(d); 156 | // console.log(e); 157 | // console.log(f); 158 | // console.log(g); 159 | // console.log(h); 160 | 161 | res.redirect("/education"); 162 | 163 | 164 | }) 165 | 166 | 167 | 168 | app.get("/education", function (req, res) { 169 | res.sendFile(__dirname + "/html files/education.html") 170 | }) 171 | 172 | app.post("/education", function (req, res) { 173 | college = req.body.college; 174 | college_city = req.body.college_city; 175 | college_add = req.body.college_add; 176 | degree = req.body.degree; 177 | field = req.body.field; 178 | graduation_date = req.body.graduation_date; 179 | school_12=req.body.school_12; 180 | marks_12=req.body.marks_12; 181 | school_10=req.body.school_10; 182 | marks_10=req.body.marks_10; 183 | board_10=req.body.board_10; 184 | board_12=req.body.board_12; 185 | 186 | res.redirect("/exp"); 187 | }) 188 | 189 | 190 | app.get("/exp", function (req, res) { 191 | res.sendFile(__dirname + "/html files/experience.html"); 192 | }) 193 | app.post("/exp", function (req, res) { 194 | employer = req.body.employer; 195 | job = req.body.job; 196 | company_city = req.body.company_city; 197 | company_state = req.body.company_state; 198 | start_date = req.body.start_date; 199 | end_date = req.body.end_date; 200 | job_desc = req.body.job_description; 201 | 202 | 203 | 204 | res.redirect("/skills"); 205 | }) 206 | 207 | 208 | app.get("/skills", function (req, res) { 209 | res.sendFile(__dirname + "/html files/skills.html") 210 | }) 211 | 212 | app.post("/skills", function (req, res) { 213 | // res.send("Wait bitch we are working on this") 214 | skill1 = req.body.skill1; 215 | skill2 = req.body.skill2; 216 | skill3 = req.body.skill3; 217 | skill4 = req.body.skill4; 218 | skill5 = req.body.skill5; 219 | skill6 = req.body.skill6; 220 | 221 | level1 = req.body.level1; 222 | level2 = req.body.level2 223 | level3 = req.body.level3 224 | level4 = req.body.level4 225 | level5 = req.body.level5; 226 | level6 = req.body.level6; 227 | hobb= req.body.hobby; 228 | 229 | 230 | res.redirect("/preview") 231 | }) 232 | 233 | 234 | 235 | 236 | 237 | app.get("/preview", function (req, res) { 238 | res.render('preview', { 239 | first_name: first, 240 | second_name: second, 241 | em: email, 242 | ph: phone, 243 | pro:professional, 244 | co: country, 245 | deg: degree, 246 | col: college, 247 | 248 | jo: job, 249 | emp: employer, 250 | ct: company_city, 251 | sd: start_date, 252 | ld: end_date, 253 | des: job_desc, 254 | sk1: skill1, 255 | lvl1: level1, 256 | sk2: skill2, 257 | lvl2: level2, 258 | sk3: skill3, 259 | lvl3: level3, 260 | sk4: skill4, 261 | lvl4: level4, 262 | sk5: skill5, 263 | lvl5: level5, 264 | sk6: skill6, 265 | lvl6: level6, 266 | ho:hobb 267 | }); 268 | }) 269 | app.post("/preview", function (req, res) { 270 | 271 | }) 272 | 273 | app.get("/final", function (req, res) 274 | { 275 | 276 | // { 277 | // var config = { 278 | // format: "A4", 279 | // orientation: "landscape", 280 | // base: "http://127.0.0.1:3002/uploads/theme/", 281 | // timeout: 100000, 282 | // phantomArgs: ["--web-security=false","--local-to-remote-url-access=true"] 283 | // } 284 | 285 | // var html = await hbs.render('./views/preview.hbs', data) 286 | // await fs.writeFile("pdf.html", html, function(err) { 287 | // if(err) { 288 | // return console.log(err); 289 | // } 290 | // }) 291 | // var fileName = uuid.v4() 292 | // await pdf.create(html, config).toFile(`./downloads/${fileName}.pdf`, function (err, res) { 293 | // if (err) return console.log(err); 294 | // response.send({ success: true, data: { downloadURL: fileName } }) 295 | 296 | 297 | try{ 298 | 299 | let html = DOC({ 300 | first_name: first, 301 | second_name: second, 302 | em: email, 303 | ph: phone, 304 | co: country, 305 | pro:professional, 306 | deg: degree, 307 | col: college, 308 | jo: job, 309 | emp: employer, 310 | ct: company_city, 311 | sd: start_date, 312 | ld: end_date, 313 | des: job_desc, 314 | sk1: skill1, 315 | lvl1: level1, 316 | sk2: skill2, 317 | lvl2: level2, 318 | sk3: skill3, 319 | lvl3: level3, 320 | sk4: skill4, 321 | lvl4: level4, 322 | sk5: skill5, 323 | lvl5: level5, 324 | sk6: skill6, 325 | lvl6: level6, 326 | ho:hobb 327 | }); 328 | 329 | _createPdfStream(html) 330 | .then((stream) => { 331 | _streamToBuffer(stream,function(err,buffer) 332 | { 333 | if(err) 334 | { 335 | throw new Error(err); 336 | 337 | } 338 | 339 | let namePDF ="Resume"+first+second; 340 | res.setHeader('Content-disposition',"inline; filename*=UTF-8''" +namePDF); 341 | res.setHeader('Content-type','application/pdf'); 342 | return res.send(buffer); 343 | }) 344 | }) 345 | } 346 | 347 | catch(err) 348 | { 349 | console.error("Error",err); 350 | res.statusCode=400; 351 | res.json({error:400,details:err}); 352 | } 353 | 354 | 355 | 356 | // res.download(__dirname + "/views/preview.hbs"); 357 | 358 | }); 359 | 360 | 361 | 362 | // console.log(first); 363 | // console.log(second); 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | app.listen(port,'0.0.0.0', function (req, res) { 380 | console.log("Server has started on the port 3000"); 381 | }) 382 | 383 | 384 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "resume-maker", 4 | "builds": [ 5 | { "src": "server.js", "use": "@vercel/node" } 6 | ], 7 | "routes": [ 8 | { "src": "/(.*)", "dest": "/server.js" } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /views/final.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 13 | 14 | 15 | 16 | 57 | 58 | {{!--
59 |
60 |
61 | 62 | 64 | 65 | 66 | 73 | 74 |
75 | 77 |
78 | 79 |
80 | 81 | 82 |
83 |
84 |
85 |
86 | --}} 87 | 88 | 89 |
90 | 91 | 92 | 93 | 123 | 124 |
125 | 126 |
127 |
128 |
129 |

PROFESSIONAL SUMMARY

130 |
131 |
132 |
133 |
134 |

{{pro}}

135 |
136 |
137 | 138 |
139 |
140 |
141 |

EDUCATION

142 |
143 |
144 |
145 |
146 |

{{deg}}

147 |

from {{col}}

148 |
149 |
150 | 151 | 152 | 153 |
154 | 155 | 156 |
157 |
158 |
159 |

WORK EXPERIENCE

160 |
161 |
162 | 163 |
164 |
165 |

{{jo}} ( {{sd}} to {{ld}} )

166 |

At {{emp}} ,{{ct}}

167 |
168 |
169 | 170 | {{!--
171 |
--}} 172 | 173 | {{!--
174 |
--}} 175 |
176 |
177 |

{{des}}

178 |
179 |
180 |
181 | 182 | 183 | 184 | 185 | 186 | 187 |
188 | 189 |
190 |
191 |

SKILLS SECTION

192 |
193 |
194 |
195 |
196 |

{{sk1}} {{lvl1}} 197 |

198 |
199 |
200 |

{{sk2}} {{lvl2}} 201 |

202 |
203 |
204 |

{{sk3}} {{lvl3}} 205 |

206 |
207 |
208 |

{{sk4}} {{lvl4}} 209 |

210 |
211 |
212 | 213 |
214 |
215 |

{{sk5}} {{lvl5}} 216 |

217 |
218 |
219 |

{{sk6}} {{lvl6}} 220 |

221 |
222 |
223 |
224 | 225 | 226 | 227 |
228 |
229 |
230 |

HOBBIES

231 |
232 |
233 | 234 |
235 |
236 |

{{ho}}

237 |
238 |
239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 |
251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 |
263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 295 | 298 | 299 | 300 | -------------------------------------------------------------------------------- /views/preview.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 13 | 14 | 15 | 16 | 77 | 78 |
79 |
80 |
81 | 82 | 84 | 85 | 86 | 93 | 94 |
95 | 97 |
98 | 99 |
100 | 101 | 102 |
103 |
104 |
105 |
106 | 107 | 108 | 109 |
110 | 111 | 112 | 113 | 143 | 144 |
145 | 146 |
147 |
148 |
149 |

PROFESSIONAL SUMMARY

150 |
151 |
152 |
153 |
154 |

{{pro}}

155 |
156 |
157 | 158 |
159 |
160 |
161 |
162 |

EDUCATION

163 |
164 |
165 |
166 |
167 |

{{deg}} from {{col}}

168 |
169 |
170 | 171 | 172 | 173 |
174 | 175 | 176 |
177 |
178 |
179 |

WORK EXPERIENCE

180 |
181 |
182 | 183 |
184 |
185 |

{{jo}} , {{emp}} ,{{ct}}

186 |

( {{sd}} to {{ld}} )

187 |

{{des}}

188 |
189 |
190 | 191 | 192 |

193 | 194 | 195 | 196 | 197 |
198 | 199 | 200 | 201 | 202 | 203 | 204 |
205 | 206 |
207 |
208 |

SKILLS SECTION

209 |
210 |
211 |
212 |
213 |

{{sk1}} {{lvl1}} {{sk2}} {{lvl2}} 214 |

215 |
216 |
217 | {{!--

{{sk2}} {{lvl2}} 218 |

--}} 219 |
220 |
221 |

{{sk3}} {{lvl3}} {{sk4}} {{lvl4}} 222 |

223 |
224 |
225 | {{!--

{{sk4}} {{lvl4}} --}} 226 | {{!--

--}} 227 |
228 |
229 | 230 |
231 |
232 |

{{sk5}} {{lvl5}} {{sk6}} {{lvl6}} 233 |

234 |
235 |
236 | {{!--

{{sk6}} {{lvl6}} --}} 237 | {{!--

--}} 238 |
239 |
240 |
241 | 242 | 243 | 244 |
245 |
246 |
247 |

HOBBIES

248 |
249 |
250 | 251 |
252 |
253 |

{{ho}}

254 |
255 |
256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 |
264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 |
274 | {{!-- FUll BOX DIV --}} 275 |
276 |
277 | 283 | 284 |
285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 |
295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 327 | 330 | 331 | 332 | --------------------------------------------------------------------------------