From 613eb35f483c5ec0c71d692b3993227ccc1f3c0e Mon Sep 17 00:00:00 2001 From: Levin Keller Date: Thu, 23 Nov 2023 09:03:52 +0000 Subject: [PATCH 1/2] feat: run prettier check in ci fix: apply prettier formatting to offensive files --- .github/workflows/ci.yml | 2 +- .prettierignore | 3 + README.md | 13 +- apps/homepage/_data/broken.yml | 6 +- apps/homepage/_data/themes.yaml | 109 +++-- apps/homepage/_layouts/compress.html | 2 +- apps/homepage/_layouts/default.html | 44 +- apps/homepage/_layouts/post.html | 32 +- ...07-05-announcing-first-official-version.md | 24 +- .../2014-09-09-first-service-integration.md | 2 +- ...ly-theme-competition-sponsored-by-hired.md | 1 - apps/homepage/blog.html | 8 +- apps/homepage/css/style.css | 55 ++- apps/homepage/documentation.html | 8 +- apps/homepage/getting-started.html | 135 ++++-- apps/homepage/index.html | 17 +- apps/homepage/integrations.html | 44 +- apps/homepage/js/main.js | 10 +- apps/homepage/schema.html | 19 +- apps/homepage/team.html | 49 ++- apps/homepage/themes.html | 4 +- apps/registry/README.md | 2 +- apps/registry/lib/prisma.js | 4 +- apps/registry/next.config.js | 1 - .../registry/pages/api/formatters/template.js | 144 +++---- apps/registry/pages/api/formatters/tex.js | 2 +- apps/registry/pages/api/formatters/text.js | 18 +- apps/registry/pages/api/formatters/yaml.js | 2 +- apps/registry/pages/api/samples/resume.js | 294 ++++++------- apps/registry/pages/api/schema.js | 404 +++++++++--------- apps/registry/pages/debug.js | 6 +- apps/registry/pages/jobs.js | 30 +- apps/registry/pages/letter.js | 34 +- apps/registry/pages/resumes.js | 2 +- apps/registry/pages/suggestions.js | 34 +- package.json | 3 +- packages/README.md | 2 +- packages/jsonresume-theme-standard/README.md | 2 +- .../jsonresume-theme-standard/package.json | 19 +- .../jsonresume-theme-standard/src/index.js | 8 +- .../src/ui/Basics.js | 4 +- .../jsonresume-theme-standard/src/ui/Date.js | 4 +- .../src/ui/DateRange.js | 4 +- .../jsonresume-theme-standard/src/ui/List.js | 2 +- .../src/ui/Projects.js | 8 +- .../src/ui/Resume.js | 8 +- .../src/ui/SubTitle.js | 2 +- .../jsonresume-theme-standard/src/ui/Work.js | 8 +- pnpm-lock.yaml | 43 +- turbo.json | 13 +- 50 files changed, 913 insertions(+), 781 deletions(-) create mode 100644 .prettierignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f083b9bf..65ce8bda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,4 +30,4 @@ jobs: run: pnpm install - name: Lint - run: pnpm lint + run: pnpm turbo lint prettier diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..cf79898a --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +**/.next/**/* +pnpm-lock.yaml +apps/homepage/_layouts/compress.html diff --git a/README.md b/README.md index 2270de69..0ebd4816 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ PINECONE_ENVIRONMENT= OPENAI_API_KEY= ``` - ## App - Registry ``` @@ -68,7 +67,6 @@ pnpm dev --filter=registry This will start a local server at [http://localhost:3002/thomasdavis](http://localhost:3002/thomasdavis) - ### Formats - Markdown @@ -78,6 +76,7 @@ This will start a local server at [http://localhost:3002/thomasdavis](http://loc - Lex ### Notes + - Gonna drop Typescript, prefer less barriers to entry - Templates cannot read from the file system when using the registry - Base templates using react/svelte/etc @@ -91,7 +90,7 @@ pnpm dev --filter=homepage Kind of a mess, but it works. -It uses Jekyll, to install it +It uses Jekyll, to install it ``` gem install bundler jekyll @@ -102,35 +101,33 @@ Then to run it ``` jekyll serve ``` + ## AI This repo contains some fun examples of AI/LLM usage. Each feature can be reached by simply appending your normal hosted url with the following; ### Jobs -This project creates embeddings out of Hacker News Who Is Hiring post, it then generates an embedding of your resume. Then uses vector similarity matching to recommend what jobs would be most applicable to you. +This project creates embeddings out of Hacker News Who Is Hiring post, it then generates an embedding of your resume. Then uses vector similarity matching to recommend what jobs would be most applicable to you. It is not setup to be automated at the moment, and the formatting is garbage. Each post should be sent to GPT to reformat it into a templated job description before generating embeddings. - [http://localhost:3002/thomasdavis/jobs](http://localhost:3002/thomasdavis/jobs) ### Letter This is a very simple service that prompts GPT with your resume and asks to generate a cover letter. -It could be easily improved to also contain the context of the job you are applying for. +It could be easily improved to also contain the context of the job you are applying for. [http://localhost:3002/thomasdavis/letter](http://localhost:3002/thomasdavis/letter) - ### Suggestions This is a very simple service that prompts GPT with your resume and asks to generate a list of suggestions for you to improve your resume. [http://localhost:3002/thomasdavis/suggestions](http://localhost:3002/thomasdavis/suggestions) - ### Interview This is an implementation of a chat bot, your resume is injected, and the conversation is included in the prompt. So you can interview your self or talk as if you were being interviewed. diff --git a/apps/homepage/_data/broken.yml b/apps/homepage/_data/broken.yml index a7fb2815..867017db 100644 --- a/apps/homepage/_data/broken.yml +++ b/apps/homepage/_data/broken.yml @@ -3,7 +3,7 @@ github: phoinixi author: Francesco Esposito link: https://github.com/phoinixi - + - name: Actual slug: actual github: davcd @@ -28,15 +28,12 @@ author: Lorenzo Dal'Aqua link: https://github.com/lorenzodalaqua - - - name: Modern slug: modern github: thomasdavis author: Thomas Davis link: https://registry.jsonresume.org/thomasdavis - - name: Slick slug: slick github: dfmcphee @@ -54,7 +51,6 @@ github: phoinixi author: Francesco Esposito link: https://github.com/phoinixi - # https://registry.jsonresume.org/thomasdavis?theme=macchiato # https://registry.jsonresume.org/thomasdavis?theme=papirus # https://registry.jsonresume.org/thomasdavis?theme=tan-responsive diff --git a/apps/homepage/_data/themes.yaml b/apps/homepage/_data/themes.yaml index a7d88ab3..ffab1128 100644 --- a/apps/homepage/_data/themes.yaml +++ b/apps/homepage/_data/themes.yaml @@ -54,112 +54,105 @@ - name: Compact slug: compact - github: - author: - link: + github: + author: + link: - name: Contempo slug: contempo - github: - author: - link: - + github: + author: + link: - name: Direct slug: direct - github: - author: - link: + github: + author: + link: - name: Dinesh slug: dinesh - github: - author: - link: + github: + author: + link: - name: Fresh slug: fresh - github: - author: - link: + github: + author: + link: - name: Full slug: full - github: - author: - link: + github: + author: + link: - name: Joeytall slug: joeytall - github: - author: - link: + github: + author: + link: - name: One Page Plus slug: onepage-plus - github: - author: - link: - + github: + author: + link: - name: Kwan slug: kwan-linkedin - github: - author: - link: + github: + author: + link: - name: Resu slug: resu - github: - author: - link: + github: + author: + link: - name: Rickosborne slug: rickosborne - github: - author: - link: - + github: + author: + link: - name: Riga slug: riga - github: - author: - link: - + github: + author: + link: - name: Spartacus slug: spartacus - github: - author: - link: - + github: + author: + link: - name: Timeline Fixed slug: timeline-fixed - github: - author: - link: - + github: + author: + link: - name: Tachyons Clean slug: tachyons-clean - github: - author: - link: - + github: + author: + link: - name: Simple slug: simple - github: - author: - link: + github: + author: + link: - name: Sceptile slug: sceptile - github: - author: - link: + github: + author: + link: - name: Classy slug: classy diff --git a/apps/homepage/_layouts/compress.html b/apps/homepage/_layouts/compress.html index faf1251d..6014af52 100644 --- a/apps/homepage/_layouts/compress.html +++ b/apps/homepage/_layouts/compress.html @@ -2,7 +2,7 @@ # Jekyll layout that compresses HTML # v3.0.2 # https://jch.penibelst.de/ -# © 2014–2015 Anatol Broder +# © 2014-2015 Anatol Broder # MIT License --- diff --git a/apps/homepage/_layouts/default.html b/apps/homepage/_layouts/default.html index 1a203b3f..657843ac 100644 --- a/apps/homepage/_layouts/default.html +++ b/apps/homepage/_layouts/default.html @@ -5,28 +5,40 @@ - - - + + + + + + - + gtag("config", "G-P4B6R43X2F"); + - - - - + + + + {% if page.title %} {{page.title}} — {% endif %} {{site.title}} diff --git a/apps/homepage/_layouts/post.html b/apps/homepage/_layouts/post.html index 84b49932..b022a17c 100644 --- a/apps/homepage/_layouts/post.html +++ b/apps/homepage/_layouts/post.html @@ -15,12 +15,8 @@ <h1>News, features and releases</h1> <article class="row"> <div class="col-sm-8 col-sm-offset-2"> <header> - <h2> - {{ page.title }} - </h2> - <div class="date"> - posted {{ page.date | date: "%B %d, %Y" }} - </div> + <h2>{{ page.title }}</h2> + <div class="date">posted {{ page.date | date: "%B %d, %Y" }}</div> </header> <div class="content"> <p>{{ content }}</p> @@ -28,18 +24,26 @@ <h2> <hr /> <div id="disqus_thread"></div> <script> - var disqus_shortname = 'jsonresume'; - var disqus_url = 'http://jsonresume.org{{page.url}}'; - var disqus_identifier = '{{page.url}}'; - var disqus_title = '{{page.title}}'; + var disqus_shortname = "jsonresume"; + var disqus_url = "http://jsonresume.org{{page.url}}"; + var disqus_identifier = "{{page.url}}"; + var disqus_title = "{{page.title}}"; (function () { - var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + var dsq = document.createElement("script"); + dsq.type = "text/javascript"; + dsq.async = true; + dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js"; + ( + document.getElementsByTagName("head")[0] || + document.getElementsByTagName("body")[0] + ).appendChild(dsq); })(); </script> <noscript> - Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a> + Please enable JavaScript to view the + <a href="https://disqus.com/?ref_noscript" + >comments powered by Disqus.</a + > </noscript> </div> </article> diff --git a/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md b/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md index 90c3bc95..1a9dd66b 100644 --- a/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md +++ b/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md @@ -22,15 +22,15 @@ When JSON resume first went public, it was actually unexpected and the project w Some accomplishments so far -* Over 1400 stars on the [resume CLI](https://github.com/jsonresume/resume-cli) -* 97 issues created for the specification, [52 closed](https://github.com/jsonresume/resume-schema/issues?q=is%3Aissue+is%3Aclosed) -* Built a [modular theme system](https://github.com/jsonresume/theme-manager) leveraging NPM for version management -* Active [theme development](http://node-modules.com/search?q=jsonresume-theme-*) underway -* Progress made on [LinkedIn export](https://jmperezperez.com/linkedin-to-json-resume/) -* Build your `resume.json` with a GUI, coming in the next few days([screenshot](https://i.imgur.com/RYqIdUp.png)) -* Organized a [standards committee](/team) -* Multiple HR related services are looking at supporting and potentially sponsoring the JSON resume project -* Officially listed JSON schema on [JSON Schema Store](https://schemastore.org/) +- Over 1400 stars on the [resume CLI](https://github.com/jsonresume/resume-cli) +- 97 issues created for the specification, [52 closed](https://github.com/jsonresume/resume-schema/issues?q=is%3Aissue+is%3Aclosed) +- Built a [modular theme system](https://github.com/jsonresume/theme-manager) leveraging NPM for version management +- Active [theme development](http://node-modules.com/search?q=jsonresume-theme-*) underway +- Progress made on [LinkedIn export](https://jmperezperez.com/linkedin-to-json-resume/) +- Build your `resume.json` with a GUI, coming in the next few days([screenshot](https://i.imgur.com/RYqIdUp.png)) +- Organized a [standards committee](/team) +- Multiple HR related services are looking at supporting and potentially sponsoring the JSON resume project +- Officially listed JSON schema on [JSON Schema Store](https://schemastore.org/) An obligatory thank you to everybody who has participated up to this point. And a very special thanks to [Mattias Erming](https://github.com/erming) who has put a lot of hard work into developing and brainstorming the future of JSON resume. @@ -38,9 +38,9 @@ An obligatory thank you to everybody who has participated up to this point. And After long discussions about the specification in the GitHub issues, we have come to settle on a few points. -* JSON resume exist to empower individuals to manage their job seeking profiles and this is our highest priority. -* Because there is no easily accessible alternative, we are going to maintain a casual approach to the project. -* The specification is not to be the perfect description of a person but instead a description of a resume where only things relevant in the context of hiring will be allowed in. +- JSON resume exist to empower individuals to manage their job seeking profiles and this is our highest priority. +- Because there is no easily accessible alternative, we are going to maintain a casual approach to the project. +- The specification is not to be the perfect description of a person but instead a description of a resume where only things relevant in the context of hiring will be allowed in. To guarantee the **success** of JSON resume, we will be aiming to integrate as an import/export option where ever possible. We want a thriving theme ecosystem and as many tools as possible. diff --git a/apps/homepage/_posts/2014-09-09-first-service-integration.md b/apps/homepage/_posts/2014-09-09-first-service-integration.md index 933463f0..11245cc6 100644 --- a/apps/homepage/_posts/2014-09-09-first-service-integration.md +++ b/apps/homepage/_posts/2014-09-09-first-service-integration.md @@ -8,7 +8,7 @@ author: Thomas Davis Since the inception of JSON Resume in July we have had a vast number of services reach out expressing their interest in supporting JSON Resume. -One of those companies was called [Represent](https://represent.io), whose lead developer [Jordan Singer](https://twitter.com/jsngr) emailed me earlier this week announcing their integration. +One of those companies was called [Represent](https://represent.io), whose lead developer [Jordan Singer](https://twitter.com/jsngr) emailed me earlier this week announcing their integration. So far they have only added support for exporting to JSON Resume, but we hope that in the future users can simply upload their `resume.json` to the service instead of filling out their profile manually. diff --git a/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md b/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md index 5e6f7bc6..8e0ad2a3 100644 --- a/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md +++ b/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md @@ -10,7 +10,6 @@ JSON Resume helps people create a stylish resume without worrying about design a Changing the style of your resume can be done easily in a few seconds because all our themes obey the JSON Resume standard. - <div class="row"> <div class="col-sm-4 col-md-4"> <div class="theme"> diff --git a/apps/homepage/blog.html b/apps/homepage/blog.html index 3c58974c..6dd1f194 100644 --- a/apps/homepage/blog.html +++ b/apps/homepage/blog.html @@ -18,13 +18,9 @@ <h1>News, features and releases</h1> <div class="col-sm-8 col-sm-offset-2"> <header> <h2> - <a href="{{ post.url }}"> - {{ post.title }} - </a> + <a href="{{ post.url }}"> {{ post.title }} </a> </h2> - <div class="date"> - posted {{ post.date | date: "%B %d, %Y" }} - </div> + <div class="date">posted {{ post.date | date: "%B %d, %Y" }}</div> </header> <div class="content"> <p>{{ post.excerpt }}</p> diff --git a/apps/homepage/css/style.css b/apps/homepage/css/style.css index 09df8d2c..adc071aa 100644 --- a/apps/homepage/css/style.css +++ b/apps/homepage/css/style.css @@ -13,8 +13,8 @@ body { } a:hover { text-decoration: none; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } h1 { font: 300 40px "Open Sans"; @@ -53,15 +53,15 @@ pre { letter-spacing: 1px; padding: 8px 16px; text-transform: uppercase; - -webkit-transition: background .1s, color .1s; - transition: background .1s, color .1s; + -webkit-transition: background 0.1s, color 0.1s; + transition: background 0.1s, color 0.1s; word-spacing: 3px; } .btn:hover { border-color: #aaa; color: #666; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } .btn-red { background: #df4848; @@ -72,8 +72,8 @@ pre { background: #ce2424; border: 2px solid #ce2424; color: #fff; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } .btn-big { font-size: 12px; @@ -100,8 +100,8 @@ pre { border-color: #ccc; color: inherit; text-decoration: none; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } .post-list { margin: 0; @@ -130,10 +130,10 @@ pre { #viewport { min-height: 100%; width: 100%; - -webkit-transition: all .4s; - transition: all .4s; + -webkit-transition: all 0.4s; + transition: all 0.4s; -webkit-transform: translateZ(0); - transform: translateZ(0); + transform: translateZ(0); } #sidebar { background: #f2f2f2; @@ -169,8 +169,8 @@ pre { #nav a:hover { color: #ce2424; text-decoration: none; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } #nav .lt { display: none; @@ -232,7 +232,7 @@ pre { } #start .feature img { margin-bottom: 20px; - opacity: .3; + opacity: 0.3; } #start .feature .btn { margin-top: 10px; @@ -284,8 +284,8 @@ pre { #docs .item:hover { color: #000; text-decoration: none; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } #getting-started { margin-top: 20px; @@ -354,7 +354,7 @@ pre { } #schema .integration p { margin-top: 0; - margin-bottom: .5em; + margin-bottom: 0.5em; } #schema .row div[class^="col-sm-"] { margin-bottom: 30px; @@ -377,8 +377,8 @@ pre { } #themes .theme img:hover { border-color: #ccc; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } #themes .theme .name { margin-top: 10px; @@ -388,8 +388,7 @@ pre { margin-top: 20px; text-align: center; } -#themes -#themes .meta { +#themes #themes .meta { margin-top: 10px; line-height: 1.4; } @@ -455,8 +454,8 @@ pre { #team .person a:hover, #team .person a:hover:before { color: #d14; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } #team .person .github:before { color: #ccc; @@ -485,8 +484,8 @@ pre { } #footer a:hover { color: #000; - -webkit-transition: all .25s; - transition: all .25s; + -webkit-transition: all 0.25s; + transition: all 0.25s; } @media (max-width: 991px) { @@ -500,7 +499,7 @@ pre { } #viewport.open { -webkit-transform: translate3d(225px, 0, 0); - transform: translate3d(225px, 0, 0); + transform: translate3d(225px, 0, 0); } #nav { text-align: center; diff --git a/apps/homepage/documentation.html b/apps/homepage/documentation.html index fef053f6..95a61376 100644 --- a/apps/homepage/documentation.html +++ b/apps/homepage/documentation.html @@ -7,10 +7,10 @@ <div class="container"> <div class="row"> <div class="col-sm-12"> - <h1>Documentation</h1> - <div id="search"> - <input placeholder="Search documentation…"> - </div> + <h1>Documentation</h1> + <div id="search"> + <input placeholder="Search documentation…" /> + </div> </div> </div> </div> diff --git a/apps/homepage/getting-started.html b/apps/homepage/getting-started.html index bf3257ba..52a9dbd9 100644 --- a/apps/homepage/getting-started.html +++ b/apps/homepage/getting-started.html @@ -17,42 +17,79 @@ <h1>Getting Started</h1> <div class="col-sm-6"> <section> <h2>Command Line Tool</h2> - <p>We've built a CLI (Command Line Interface) which is supported by OSX, Linux and Windows. To create your own resume, install <code>resume-cli</code> from <b>npm</b>:</p> + <p> + We've built a CLI (Command Line Interface) which is supported by OSX, + Linux and Windows. To create your own resume, install + <code>resume-cli</code> from <b>npm</b>: + </p> <p><code>npm install -g resume-cli</code></p> - <p><strong>Note:</strong> The official CLI tool isn't that actively maintained. There is an alternative that you might have more success with <a href="https://github.com/rbardini/resumed">@rbardini/resumed</a></p> + <p> + <strong>Note:</strong> The official CLI tool isn't that actively + maintained. There is an alternative that you might have more success + with + <a href="https://github.com/rbardini/resumed">@rbardini/resumed</a> + </p> <h3>Exporting</h3> - <p>The command line tool uses an ecosystem of modules that we've open sourced to convert your resume to different formats:</p> + <p> + The command line tool uses an ecosystem of modules that we've open + sourced to convert your resume to different formats: + </p> <p><code>resume export resume.pdf</code></p> <p><code>resume export resume.html</code></p> <h3>Import from LinkedIn</h3> - <p>One of our community members wrote a great Chrome extension to import your LinkedIn Profile. + <p> + One of our community members wrote a great Chrome extension to import + your LinkedIn Profile. <br /> <br /> - <a target="_blank" href="https://chrome.google.com/webstore/detail/json-resume-exporter/caobgmmcpklomkcckaenhjlokpmfbdec">Download here</a> + <a + target="_blank" + href="https://chrome.google.com/webstore/detail/json-resume-exporter/caobgmmcpklomkcckaenhjlokpmfbdec" + >Download here</a + > </p> </section> </div> <div class="col-sm-6"> <section> <h2>Hosting</h2> - <p>JSON Resume offers a hosting service that renders your <code>resume.json</code> to any theme you would like. <br /><br /> - e.g. <a href="https://registry.jsonresume.org/thomasdavis">https://registry.jsonresume.org/thomasdavis</a></p> - <p>All you have to do is create a Gist on GitHub named <code>resume.json</code>. <br /> <br /> - e.g. <a href="https://gist.github.com/thomasdavis/c9dcfa1b37dec07fb2ee7f36d7278105">https://gist.github.com/thomasdavis/c9dcfa1b37dec07fb2ee7f36d7278105</a> + <p> + JSON Resume offers a hosting service that renders your + <code>resume.json</code> to any theme you would like. <br /><br /> + e.g. + <a href="https://registry.jsonresume.org/thomasdavis" + >https://registry.jsonresume.org/thomasdavis</a + > </p> - <p>Our hosting service will automatically detect this when you access <code>https://registry.jsonresume.org/{your_github_username}</code> + <p> + All you have to do is create a Gist on GitHub named + <code>resume.json</code>. <br /> + <br /> + e.g. + <a + href="https://gist.github.com/thomasdavis/c9dcfa1b37dec07fb2ee7f36d7278105" + >https://gist.github.com/thomasdavis/c9dcfa1b37dec07fb2ee7f36d7278105</a + > + </p> + <p> + Our hosting service will automatically detect this when you access + <code>https://registry.jsonresume.org/{your_github_username}</code> </p> - <p>To set a theme, just add to your <code>resume.json</code>;<br /> + <p> + To set a theme, just add to your <code>resume.json</code>;<br /> <code>{ "meta": { "theme": "elegant" } }</code> </p> <hr /> <p> <strong>Use your own repository (instead of a gist)</strong> <br /><br /> - Basically, you can just make a Github Action, that publishes your gist when you push to your own repo. Example below; + Basically, you can just make a Github Action, that publishes your gist + when you push to your own repo. Example below; <br /><br /> - <strong>EXAMPLE</strong> - <a href="https://github.com/thomasdavis/resume">https://github.com/thomasdavis/resume</a> - + <strong>EXAMPLE</strong> - + <a href="https://github.com/thomasdavis/resume" + >https://github.com/thomasdavis/resume</a + > </p> <hr /> <p> @@ -61,47 +98,87 @@ <h2>Hosting</h2> You can access more raw formats of your resume too! <br /> <br /> - <strong>JSON</strong> - <a href="https://registry.jsonresume.org/thomasdavis.json">https://registry.jsonresume.org/thomasdavis.json</a> + <strong>JSON</strong> - + <a href="https://registry.jsonresume.org/thomasdavis.json" + >https://registry.jsonresume.org/thomasdavis.json</a + > <br /> - <strong>YAML</strong> - <a href="https://registry.jsonresume.org/thomasdavis.yaml">https://registry.jsonresume.org/thomasdavis.yaml</a> + <strong>YAML</strong> - + <a href="https://registry.jsonresume.org/thomasdavis.yaml" + >https://registry.jsonresume.org/thomasdavis.yaml</a + > <br /> - <strong>TEXT</strong> - <a href="https://registry.jsonresume.org/thomasdavis.txt">https://registry.jsonresume.org/thomasdavis.txt</a> - + <strong>TEXT</strong> - + <a href="https://registry.jsonresume.org/thomasdavis.txt" + >https://registry.jsonresume.org/thomasdavis.txt</a + > </p> <hr /> <p> <strong>AI (completely experimental)</strong> <br /><br /> - These urls are integrated with OpenAI ChatGPT, and will pass your resume to them with a predefined prompt to get a new response generated each time. (they take over 10 seconds to run so be paitience) + These urls are integrated with OpenAI ChatGPT, and will pass your + resume to them with a predefined prompt to get a new response + generated each time. (they take over 10 seconds to run so be + paitience) <br /> <br /> - <strong>Interview Yourself or Be Interviewed </strong>(using OpenAI GPT-3 your resume.json gets inserted in the prompt and you can talk to or at yourself) - <a href="https://registry.jsonresume.org/thomasdavis/interview">https://registry.jsonresume.org/thomasdavis/interview</a> - + <strong>Interview Yourself or Be Interviewed </strong>(using OpenAI + GPT-3 your resume.json gets inserted in the prompt and you can talk to + or at yourself) - + <a href="https://registry.jsonresume.org/thomasdavis/interview" + >https://registry.jsonresume.org/thomasdavis/interview</a + > + <br /> <br /> - <strong>Recommended Jobs </strong>(tries to match your resume to recent Who is Hiring? hn posts) - <a href="https://registry.jsonresume.org/thomasdavis/jobs">https://registry.jsonresume.org/thomasdavis/jobs</a> + <strong>Recommended Jobs </strong>(tries to match your resume to + recent Who is Hiring? hn posts) - + <a href="https://registry.jsonresume.org/thomasdavis/jobs" + >https://registry.jsonresume.org/thomasdavis/jobs</a + > <br /> <br /> - <strong>Cover Letter </strong>(attempts to write a cover letter that matches your resume) - <a href="https://registry.jsonresume.org/thomasdavis/letter">https://registry.jsonresume.org/thomasdavis/letter</a> + <strong>Cover Letter </strong>(attempts to write a cover letter that + matches your resume) - + <a href="https://registry.jsonresume.org/thomasdavis/letter" + >https://registry.jsonresume.org/thomasdavis/letter</a + > <br /> <br /> - <strong>Resume Suggestions</strong> (it asks ChatGPT to give precide feedback for improvements you could make to your resume) - <a href="https://registry.jsonresume.org/thomasdavis/suggestions">https://registry.jsonresume.org/thomasdavis/suggestions</a> + <strong>Resume Suggestions</strong> (it asks ChatGPT to give precide + feedback for improvements you could make to your resume) - + <a href="https://registry.jsonresume.org/thomasdavis/suggestions" + >https://registry.jsonresume.org/thomasdavis/suggestions</a + > </p> <hr /> <p> <strong>QR Service</strong> <br /><br /> - If you want to generate a QR code that links to your hosted resume, use <a href="https://registry.jsonresume.org/thomasdavis.qr">https://registry.jsonresume.org/thomasdavis.qr</a> + If you want to generate a QR code that links to your hosted resume, + use + <a href="https://registry.jsonresume.org/thomasdavis.qr" + >https://registry.jsonresume.org/thomasdavis.qr</a + > e.g. <br /> - <img src="https://registry.jsonresume.org/thomasdavis.qr" style="width: 120px;" /> - - + <img + src="https://registry.jsonresume.org/thomasdavis.qr" + style="width: 120px" + /> </p> <br /> - <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/BxpHgNM0clE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + <iframe + width="560" + height="315" + src="https://www.youtube-nocookie.com/embed/BxpHgNM0clE" + frameborder="0" + allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" + allowfullscreen + ></iframe> </section> </div> </div> diff --git a/apps/homepage/index.html b/apps/homepage/index.html index f1ef1774..bcee55d4 100644 --- a/apps/homepage/index.html +++ b/apps/homepage/index.html @@ -7,7 +7,10 @@ <div class="row"> <div class="col-sm-12"> <h1>JSON Resume</h1> - <p>The open source initiative to create a JSON-based standard for resumes. For developers, by developers.</p> + <p> + The open source initiative to create a JSON-based standard for + resumes. For developers, by developers. + </p> <a href="/schema/" class="btn btn-red btn-big">Read more</a> </div> </div> @@ -29,7 +32,9 @@ <h2>Themes</h2> <div class="feature col-sm-4"> <h2>Open Source</h2> <p>Every part of JSON Resume is open source on GitHub.</p> - <a href="https://github.com/jsonresume" target="_blank" class="btn">View on GitHub</a> + <a href="https://github.com/jsonresume" target="_blank" class="btn" + >View on GitHub</a + > </div> </div> </div> @@ -45,12 +50,8 @@ <h3>Twitter</h3> <div class="col-sm-12"> <h3>What are people saying?</h3> </div> - <div class="col-sm-6"> - Tweet #1 - </div> - <div class="col-sm-6"> - Tweet #2 - </div> + <div class="col-sm-6">Tweet #1</div> + <div class="col-sm-6">Tweet #2</div> </div> </div> </div> diff --git a/apps/homepage/integrations.html b/apps/homepage/integrations.html index 68116725..5a8bda98 100644 --- a/apps/homepage/integrations.html +++ b/apps/homepage/integrations.html @@ -13,25 +13,39 @@ <h1>Integrations</h1> </div> </header> <div id="getting-started" class="container"> -<div class="row"> - <div class="col-sm-6"> - <section> - <h2>Import</h2> - <p>We are still waiting for services to release their import support. There are a few in the works but still waiting to be released.</p> - </div> - <div class="col-sm-6"> - <section> - <h2>Export</h2> - <p>Export your profile into the JSON Resume format from the services below.</p> - <hr /> + <div class="row"> + <div class="col-sm-6"> + <section> + <h2>Import</h2> + <p> + We are still waiting for services to release their import support. + There are a few in the works but still waiting to be released. + </p> + </section> + </div> + <div class="col-sm-6"> + <section> + <h2>Export</h2> + <p> + Export your profile into the JSON Resume format from the services + below. + </p> + <hr /> <div class="row"> - <img class="col-md-2" src="https://represent.io/assets/logos/logo-yellow.png" /> + <img + class="col-md-2" + src="https://represent.io/assets/logos/logo-yellow.png" + /> <div class="col-md-10"> - <h3 style="margin-top: 0; padding-top: 0;">Represent</h3> + <h3 style="margin-top: 0; padding-top: 0">Represent</h3> <a href="https://represent.io/">https://represent.io</a> - <p>Represent is the best way to create a beautiful and professional resume in minutes.</p> + <p> + Represent is the best way to create a beautiful and professional + resume in minutes. + </p> </div> </div> - </section> + </section> + </div> </div> </div> diff --git a/apps/homepage/js/main.js b/apps/homepage/js/main.js index 75fcee8f..e7784910 100644 --- a/apps/homepage/js/main.js +++ b/apps/homepage/js/main.js @@ -8,7 +8,7 @@ jQuery(() => { * Apply the class "active" to the current page in the navigation bar. */ function highlight() { - $("#nav a").each(function() { + $("#nav a").each(function () { const self = $(this); const href = self.attr("href"); const path = window.location.pathname; @@ -23,18 +23,16 @@ function highlight() { function equalizeFeatureHeight() { const start = $("#start"); - if (!start.length) - return; + if (!start.length) return; setInterval(() => { let max = 0; const items = start.find(".feature p"); - items.css("height", "auto").each(function() { + items.css("height", "auto").each(function () { const h = $(this).height(); - if (h > max) - max = h; + if (h > max) max = h; }); items.height(max); diff --git a/apps/homepage/schema.html b/apps/homepage/schema.html index 06a4eb9a..d847672a 100644 --- a/apps/homepage/schema.html +++ b/apps/homepage/schema.html @@ -23,9 +23,9 @@ <h4>What is it?</h4> </p> <h4>Why JSON?</h4> <p> - We believe that the strengths of the JSON format makes it a good fit - for resumes. It's lightweight, easy to use and it's perfect to build - tools for! + We believe that the strengths of the JSON format makes it a good fit for + resumes. It's lightweight, easy to use and it's perfect to build tools + for! </p> <p> We also feel that the <a href="https://json-schema.org/">JSON Schema</a> @@ -33,7 +33,8 @@ <h4>Why JSON?</h4> </p> <h4>Open Source</h4> <p> - The schema is <a href="https://github.com/jsonresume/resume-schema">open source</a> + The schema is + <a href="https://github.com/jsonresume/resume-schema">open source</a> and community-driven. We release everything we do under the MIT license. </p> </div> @@ -158,13 +159,17 @@ <h4>Open Source</h4> <div class="col-sm-4 hidden-sm"> <h4>Integrations</h4> <p> - Export your profile into the JSON Resume format from the services - below: + Export your profile into the JSON Resume format from the services below: </p> {% for integration in site.data.integrations %} <div class="row integration"> <div class="col-xs-2"> - <img src="{{integration.image}}" alt="{{integration.name}} Logo" width="35" height="35"> + <img + src="{{integration.image}}" + alt="{{integration.name}} Logo" + width="35" + height="35" + /> </div> <div class="col-xs-10"> <p><strong>{{integration.name}}</strong></p> diff --git a/apps/homepage/team.html b/apps/homepage/team.html index f70e3869..894c98a0 100644 --- a/apps/homepage/team.html +++ b/apps/homepage/team.html @@ -16,30 +16,51 @@ <h1>Meet the Team</h1> <div class="row"> <div class="col-sm-6 contributing"> <h2>Contributing</h2> - <p>The entire project is open sourced and split up amongst a number of modules which are hosted on GitHub. There are many areas of the project that need work:</p> + <p> + The entire project is open sourced and split up amongst a number of + modules which are hosted on GitHub. There are many areas of the project + that need work: + </p> <ul> <li>We need everyone to start making themes</li> <li>People who can offer advice on the standard</li> - <li>The standard should be able to export to any format under the sun</li> + <li> + The standard should be able to export to any format under the sun + </li> </ul> <p> - All the code for the project can be found here:<br> - <a href="https://github.com/jsonresume">https://github.com/jsonresume</a> + All the code for the project can be found here:<br /> + <a href="https://github.com/jsonresume" + >https://github.com/jsonresume</a + > </p> </div> <div class="col-sm-6 team"> <h2>The Team</h2> - <p>There are many contributors to JSON Resume, but these are our regular members who keep the show running:</p> + <p> + There are many contributors to JSON Resume, but these are our regular + members who keep the show running: + </p> <section> <h3>Core Team</h3> <div class="row"> {% for member in site.data.team.core-team %} <div class="col-lg-6 person"> - <img class="avatar" src="{{member.avatar}}" alt="Avatar of {{member.name}}." width="50" height="50"> + <img + class="avatar" + src="{{member.avatar}}" + alt="Avatar of {{member.name}}." + width="50" + height="50" + /> <div class="name">{{member.name}}</div> - <a class="github" href="https://github.com/{{member.github}}">GitHub</a> + <a class="github" href="https://github.com/{{member.github}}" + >GitHub</a + > {% if member.twitter %} - <a class="twitter" href="https://twitter.com/{{member.twitter}}">Twitter</a> + <a class="twitter" href="https://twitter.com/{{member.twitter}}" + >Twitter</a + > {% endif %} </div> {% endfor %} @@ -50,9 +71,17 @@ <h3>Standards Committee</h3> <div class="row"> {% for member in site.data.team.standards-committee %} <div class="col-lg-6 person"> - <img class="avatar" src="{{member.avatar}}" alt="Avatar of {{member.name}}." width="50" height="50"> + <img + class="avatar" + src="{{member.avatar}}" + alt="Avatar of {{member.name}}." + width="50" + height="50" + /> <div class="name">{{member.name}}</div> - <a class="github" href="https://github.com/{{member.github}}">GitHub</a> + <a class="github" href="https://github.com/{{member.github}}" + >GitHub</a + > </div> {% endfor %} </div> diff --git a/apps/homepage/themes.html b/apps/homepage/themes.html index 9a31074c..f44e2f1a 100644 --- a/apps/homepage/themes.html +++ b/apps/homepage/themes.html @@ -45,7 +45,7 @@ <h1>Themes</h1> href="https://registry.jsonresume.org/thomasdavis?theme={{ theme.slug }}" > <img - style="height: 129px;" + style="height: 129px" src="https://screenshot-peach-beta.vercel.app/api?v=1&url=https://registry.jsonresume.org/thomasdavis?theme={{ theme.slug }}&height=720&width=1280" /> </a> @@ -81,7 +81,7 @@ <h2>Broken - Being repaired</h2> href="https://registry.jsonresume.org/thomasdavis?theme={{ theme.slug }}" > <img - style="height: 129px;" + style="height: 129px" src="https://screenshot-peach-beta.vercel.app/api?v=1&url=https://registry.jsonresume.org/thomasdavis?theme={{ theme.slug }}&height=720&width=1280" /> </a> diff --git a/apps/registry/README.md b/apps/registry/README.md index 7777eeaf..574cf0df 100644 --- a/apps/registry/README.md +++ b/apps/registry/README.md @@ -1 +1 @@ -This is where all the apps that live on the registry.jsonresume.org domain live \ No newline at end of file +This is where all the apps that live on the registry.jsonresume.org domain live diff --git a/apps/registry/lib/prisma.js b/apps/registry/lib/prisma.js index f918d98f..720cc3cc 100644 --- a/apps/registry/lib/prisma.js +++ b/apps/registry/lib/prisma.js @@ -1,4 +1,4 @@ -import { PrismaClient } from '@prisma/client/edge'; +import { PrismaClient } from "@prisma/client/edge"; // PrismaClient is attached to the `global` object in development to prevent // exhausting your database connection limit. @@ -8,7 +8,7 @@ import { PrismaClient } from '@prisma/client/edge'; let prisma; -if (process.env.NODE_ENV === 'production') { +if (process.env.NODE_ENV === "production") { prisma = new PrismaClient(); } else { if (!global.prisma) { diff --git a/apps/registry/next.config.js b/apps/registry/next.config.js index a44f2619..f96f7d51 100644 --- a/apps/registry/next.config.js +++ b/apps/registry/next.config.js @@ -29,4 +29,3 @@ module.exports = { styledComponents: true, }, }; - diff --git a/apps/registry/pages/api/formatters/template.js b/apps/registry/pages/api/formatters/template.js index be2f0ae9..420c2ec4 100644 --- a/apps/registry/pages/api/formatters/template.js +++ b/apps/registry/pages/api/formatters/template.js @@ -1,71 +1,71 @@ export const THEMES = { - ace: require('jsonresume-theme-ace'), - actual: require('jsonresume-theme-actual'), - apage: require('jsonresume-theme-apage'), - autumn: require('jsonresume-theme-autumn'), - caffeine: require('jsonresume-theme-caffeine'), - class: require('jsonresume-theme-class'), - classy: require('jsonresume-theme-classy'), - cora: require('jsonresume-theme-cora'), - compact: require('jsonresume-theme-compact'), - contempo: require('jsonresume-theme-contempo'), - dave: require('jsonresume-theme-dave'), - direct: require('jsonresume-theme-direct'), - dinesh: require('jsonresume-theme-dinesh'), - elegant: require('jsonresume-theme-elegant'), - elite: require('jsonresume-theme-elite'), + ace: require("jsonresume-theme-ace"), + actual: require("jsonresume-theme-actual"), + apage: require("jsonresume-theme-apage"), + autumn: require("jsonresume-theme-autumn"), + caffeine: require("jsonresume-theme-caffeine"), + class: require("jsonresume-theme-class"), + classy: require("jsonresume-theme-classy"), + cora: require("jsonresume-theme-cora"), + compact: require("jsonresume-theme-compact"), + contempo: require("jsonresume-theme-contempo"), + dave: require("jsonresume-theme-dave"), + direct: require("jsonresume-theme-direct"), + dinesh: require("jsonresume-theme-dinesh"), + elegant: require("jsonresume-theme-elegant"), + elite: require("jsonresume-theme-elite"), // eloquent: require("jsonresume-theme-eloquent"), - 'el-santo': require('jsonresume-theme-el-santo'), - even: require('jsonresume-theme-even'), - flat: require('jsonresume-theme-flat'), - 'flat-fr': require('jsonresume-theme-flat-fr'), - fresh: require('jsonresume-theme-fresh'), - full: require('jsonresume-theme-full'), - joeytall: require('jsonresume-theme-joeytall'), - github: require('jsonresume-theme-github'), - github2: require('jsonresume-theme-github2'), - jacrys: require('jsonresume-theme-jacrys'), - kards: require('jsonresume-theme-kards'), - keloran: require('jsonresume-theme-keloran'), - kendall: require('jsonresume-theme-kendall'), - macchiato: require('jsonresume-theme-macchiato'), - mantra: require('jsonresume-theme-mantra'), - 'mocha-responsive': require('jsonresume-theme-mocha-responsive'), - minyma: require('jsonresume-theme-minyma'), - modern: require('jsonresume-theme-modern'), - msresume: require('jsonresume-theme-msresume'), - one: require('jsonresume-theme-one'), - onepage: require('jsonresume-theme-onepage'), - 'onepage-plus': require('jsonresume-theme-onepage-plus'), - 'onepage-efficient': require('jsonresume-theme-onepage-efficient'), - onepageresume: require('jsonresume-theme-onepageresume'), - orbit: require('jsonresume-theme-orbit'), - riga: require('jsonresume-theme-riga'), - paper: require('jsonresume-theme-paper'), - 'paper-plus-plus': require('jsonresume-theme-paper-plus-plus'), - papirus: require('jsonresume-theme-papirus'), - pumpkin: require('jsonresume-theme-pumpkin'), - rocketspacer: require('jsonresume-theme-rocketspacer'), - short: require('jsonresume-theme-short'), - 'simple-red': require('jsonresume-theme-simple-red'), - resu: require('jsonresume-theme-resu'), - rickosborne: require('jsonresume-theme-rickosborne'), - slick: require('jsonresume-theme-slick'), - sceptile: require('jsonresume-theme-sceptile'), - simple: require('jsonresume-theme-simple'), - spartacus: require('jsonresume-theme-spartacus'), - 'timeline-fixed': require('jsonresume-theme-timeline-fixed'), - spartan: require('jsonresume-theme-spartan'), - srt: require('jsonresume-theme-srt'), - stackoverflowed: require('jsonresume-theme-stackoverflowed'), - stackoverflow: require('jsonresume-theme-stackoverflow'), - standard: require('jsonresume-theme-standard'), - 'standard-resume': require('jsonresume-theme-standard-resume'), - 'tachyons-clean': require('jsonresume-theme-tachyons-clean'), - 'tan-responsive': require('jsonresume-theme-tan-responsive'), - techlead: require('jsonresume-theme-techlead'), - verbum: require('jsonresume-theme-verbum'), - wraypro: require('jsonresume-theme-wraypro'), + "el-santo": require("jsonresume-theme-el-santo"), + even: require("jsonresume-theme-even"), + flat: require("jsonresume-theme-flat"), + "flat-fr": require("jsonresume-theme-flat-fr"), + fresh: require("jsonresume-theme-fresh"), + full: require("jsonresume-theme-full"), + joeytall: require("jsonresume-theme-joeytall"), + github: require("jsonresume-theme-github"), + github2: require("jsonresume-theme-github2"), + jacrys: require("jsonresume-theme-jacrys"), + kards: require("jsonresume-theme-kards"), + keloran: require("jsonresume-theme-keloran"), + kendall: require("jsonresume-theme-kendall"), + macchiato: require("jsonresume-theme-macchiato"), + mantra: require("jsonresume-theme-mantra"), + "mocha-responsive": require("jsonresume-theme-mocha-responsive"), + minyma: require("jsonresume-theme-minyma"), + modern: require("jsonresume-theme-modern"), + msresume: require("jsonresume-theme-msresume"), + one: require("jsonresume-theme-one"), + onepage: require("jsonresume-theme-onepage"), + "onepage-plus": require("jsonresume-theme-onepage-plus"), + "onepage-efficient": require("jsonresume-theme-onepage-efficient"), + onepageresume: require("jsonresume-theme-onepageresume"), + orbit: require("jsonresume-theme-orbit"), + riga: require("jsonresume-theme-riga"), + paper: require("jsonresume-theme-paper"), + "paper-plus-plus": require("jsonresume-theme-paper-plus-plus"), + papirus: require("jsonresume-theme-papirus"), + pumpkin: require("jsonresume-theme-pumpkin"), + rocketspacer: require("jsonresume-theme-rocketspacer"), + short: require("jsonresume-theme-short"), + "simple-red": require("jsonresume-theme-simple-red"), + resu: require("jsonresume-theme-resu"), + rickosborne: require("jsonresume-theme-rickosborne"), + slick: require("jsonresume-theme-slick"), + sceptile: require("jsonresume-theme-sceptile"), + simple: require("jsonresume-theme-simple"), + spartacus: require("jsonresume-theme-spartacus"), + "timeline-fixed": require("jsonresume-theme-timeline-fixed"), + spartan: require("jsonresume-theme-spartan"), + srt: require("jsonresume-theme-srt"), + stackoverflowed: require("jsonresume-theme-stackoverflowed"), + stackoverflow: require("jsonresume-theme-stackoverflow"), + standard: require("jsonresume-theme-standard"), + "standard-resume": require("jsonresume-theme-standard-resume"), + "tachyons-clean": require("jsonresume-theme-tachyons-clean"), + "tan-responsive": require("jsonresume-theme-tan-responsive"), + techlead: require("jsonresume-theme-techlead"), + verbum: require("jsonresume-theme-verbum"), + wraypro: require("jsonresume-theme-wraypro"), }; const getTheme = (theme) => { @@ -74,13 +74,13 @@ const getTheme = (theme) => { } catch (e) { return { e: e.toString(), - error: 'Theme is not supported.', + error: "Theme is not supported.", }; } }; const format = async function (resume, options) { - const theme = options.theme ?? 'elegant'; + const theme = options.theme ?? "elegant"; const themeRenderer = getTheme(theme); const resumeHTML = themeRenderer.render(resume); @@ -88,12 +88,12 @@ const format = async function (resume, options) { content: resumeHTML, headers: [ { - key: 'Cache-control', - value: 'public, max-age=90', + key: "Cache-control", + value: "public, max-age=90", }, { - key: 'Content-Type', - value: 'text/html', + key: "Content-Type", + value: "text/html", }, ], }; diff --git a/apps/registry/pages/api/formatters/tex.js b/apps/registry/pages/api/formatters/tex.js index 6e6348f2..a23de8d0 100644 --- a/apps/registry/pages/api/formatters/tex.js +++ b/apps/registry/pages/api/formatters/tex.js @@ -1,5 +1,5 @@ const format = async function format(resume) { - return { content: 'Unsupported Latex', headers: [] }; + return { content: "Unsupported Latex", headers: [] }; }; const exports = { format }; diff --git a/apps/registry/pages/api/formatters/text.js b/apps/registry/pages/api/formatters/text.js index bf614afc..9e73046f 100644 --- a/apps/registry/pages/api/formatters/text.js +++ b/apps/registry/pages/api/formatters/text.js @@ -25,7 +25,7 @@ ${work.position} ${work.summary} -${(work.highlights ?? []).map((highlight) => `+ ${highlight}`).join('\n')} +${(work.highlights ?? []).map((highlight) => `+ ${highlight}`).join("\n")} ` )} @@ -44,7 +44,7 @@ ${volunteer.position} ${volunteer.summary} -${(volunteer.highlights ?? []).map((highlight) => `+ ${highlight}`).join('\n')} +${(volunteer.highlights ?? []).map((highlight) => `+ ${highlight}`).join("\n")} ` @@ -56,11 +56,11 @@ ${(volunteer.highlights ?? []).map((highlight) => `+ ${highlight}`).join('\n')} ============================ ${(resume.education ?? []).map( (education) => ` -${education.startDate} – ${education.endDate || ''} +${education.startDate} – ${education.endDate || ""} ${education.institution} ${education.area} - ${education.studyType} -${(education.courses ?? []).map((course) => `+ ${course}`).join('\n')} +${(education.courses ?? []).map((course) => `+ ${course}`).join("\n")} ` @@ -72,7 +72,7 @@ ${(education.courses ?? []).map((course) => `+ ${course}`).join('\n')} ============================ ${(resume.awards ?? []).map( (award) => ` -${award.title} – ${award.date || ''} +${award.title} – ${award.date || ""} ${award.awarder} ` @@ -85,7 +85,7 @@ ${award.awarder} ============================ ${(resume.certificates ?? []).map( (certificate) => ` -${certificate.name} – ${certificate.date || ''} +${certificate.name} – ${certificate.date || ""} ${certificate.issuer} @@ -100,7 +100,7 @@ PUBLICATIONS ============================ ${(resume.publications ?? []).map( (publication) => ` -${publication.name} – ${publication.date || ''} +${publication.name} – ${publication.date || ""} ${publication.issuer} ${publication.summary} @@ -120,10 +120,10 @@ ${(resume.skills ?? []) (skill) => ` ${skill.name} ------------- -${(skill.keywords ?? []).map((keyword) => `+ ${keyword}`).join('\n')} +${(skill.keywords ?? []).map((keyword) => `+ ${keyword}`).join("\n")} ` ) - .join('\n')} + .join("\n")} `; } return { content, headers: [] }; diff --git a/apps/registry/pages/api/formatters/yaml.js b/apps/registry/pages/api/formatters/yaml.js index 6273d834..ebcc5bbb 100644 --- a/apps/registry/pages/api/formatters/yaml.js +++ b/apps/registry/pages/api/formatters/yaml.js @@ -1,5 +1,5 @@ const format = async function format(resume) { - const YAML = require('json-to-pretty-yaml'); + const YAML = require("json-to-pretty-yaml"); const content = YAML.stringify(resume); return { content, headers: [] }; }; diff --git a/apps/registry/pages/api/samples/resume.js b/apps/registry/pages/api/samples/resume.js index ee747692..ee56f450 100644 --- a/apps/registry/pages/api/samples/resume.js +++ b/apps/registry/pages/api/samples/resume.js @@ -1,275 +1,275 @@ const resume = { meta: { - theme: 'elegant', + theme: "elegant", }, basics: { - name: 'Thomas Davis', - label: 'Web Developer', + name: "Thomas Davis", + label: "Web Developer", image: - 'https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4', + "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4", summary: "I'm a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am used to wearing many hats. I am a very product focussed developer who priotizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ", - website: 'https://lordajax.com', - email: 'thomasalwyndavis@gmail.com', + website: "https://lordajax.com", + email: "thomasalwyndavis@gmail.com", location: { - city: 'Melbourne', - countryCode: 'AU', + city: "Melbourne", + countryCode: "AU", }, profiles: [ { - username: 'ajaxdavis', - url: 'https://twitter.com/ajaxdavis', - network: 'twitter', + username: "ajaxdavis", + url: "https://twitter.com/ajaxdavis", + network: "twitter", }, { - url: 'https://github.com/thomasdavis', - username: 'thomasdavis', - network: 'github', + url: "https://github.com/thomasdavis", + username: "thomasdavis", + network: "github", }, ], }, education: [ { - endDate: '2009-12-12', - startDate: '2008-02-12', - area: 'Software Engineering (incomplete)', - studyType: 'Bachelors', - institution: 'The University of Queensland', + endDate: "2009-12-12", + startDate: "2008-02-12", + area: "Software Engineering (incomplete)", + studyType: "Bachelors", + institution: "The University of Queensland", }, ], references: [ { reference: - 'Thomas was hired as a lead developer and, upon the leaving of our co-founder took over as CTO of Earbits. Thomas is, hands down, one of those A Players you hear of companies dying to hire. He is incredibly smart, not just at code but about everything from classical music to Chinese language and culture. Thomas is great to work with and, as a well established contributor to open source projects and several successful ventures, commands the respect of engineers at all levels. I would suggest doing anything you can to have him on your team.', - name: 'Joey Flores, Co-founder and CEO of Earbits, Inc.', + "Thomas was hired as a lead developer and, upon the leaving of our co-founder took over as CTO of Earbits. Thomas is, hands down, one of those A Players you hear of companies dying to hire. He is incredibly smart, not just at code but about everything from classical music to Chinese language and culture. Thomas is great to work with and, as a well established contributor to open source projects and several successful ventures, commands the respect of engineers at all levels. I would suggest doing anything you can to have him on your team.", + name: "Joey Flores, Co-founder and CEO of Earbits, Inc.", }, { reference: "I've had the great pleasure of working with Thomas for the past three years at Earbits, and on a few side projects. Two years ago our CTO left on a moment's notice, Thomas saved our company by quickly stepping up to fill this role. He has been with our company through thick and thin and made serious personal sacrifices in order to help the company during tough times. He is a phenomenal hacker and a true team player. Highly recommended!", - name: 'Yotam Rosenbaum, SVP of Operations, Earbits, Inc.', + name: "Yotam Rosenbaum, SVP of Operations, Earbits, Inc.", }, { reference: - 'Thomas is an extremely talented engineer with a very broad range of skills and experience. From being a thought leader in the front-end community via backbonetutorials.com and cdnjs.com, to designing and implementing the API for cdnjs.com, working with Thomas has been fantastic learning experience. Thomas is truly a full stack develop, and his work output is incredible. If there is any opportunity to work with Thomas, I take it. He is the definition of an A player.', - name: 'Ryan Kirkman, Senior Software Engineer at Nerdwallet', + "Thomas is an extremely talented engineer with a very broad range of skills and experience. From being a thought leader in the front-end community via backbonetutorials.com and cdnjs.com, to designing and implementing the API for cdnjs.com, working with Thomas has been fantastic learning experience. Thomas is truly a full stack develop, and his work output is incredible. If there is any opportunity to work with Thomas, I take it. He is the definition of an A player.", + name: "Ryan Kirkman, Senior Software Engineer at Nerdwallet", }, { reference: - 'On Thomas Davis... Hire this guy. Do not be fooled. Incredibly capable and fast. Plays well with others. Unbelievable at front-end work end programming but that is just the start. Visionary. Hire him before I do.', - name: 'Greg Davis', + "On Thomas Davis... Hire this guy. Do not be fooled. Incredibly capable and fast. Plays well with others. Unbelievable at front-end work end programming but that is just the start. Visionary. Hire him before I do.", + name: "Greg Davis", }, ], skills: [ { keywords: [ - 'HTML / JSX', - 'SCSS / CSS / BEM / Styled Components', - 'Javascript / Typescript', - 'React / Next', - 'Redux / Apollo', + "HTML / JSX", + "SCSS / CSS / BEM / Styled Components", + "Javascript / Typescript", + "React / Next", + "Redux / Apollo", ], - level: 'Senior', - name: 'Frontend', + level: "Senior", + name: "Frontend", }, { - keywords: ['Node', 'Ruby', 'Python', 'Postgres', 'Redis', 'Serverless'], - level: 'Senior', - name: 'Backend', + keywords: ["Node", "Ruby", "Python", "Postgres", "Redis", "Serverless"], + level: "Senior", + name: "Backend", }, { - keywords: ['AWS', 'G Cloud', 'Heroku', 'Caching'], - level: 'Senior', - name: 'Devops', + keywords: ["AWS", "G Cloud", "Heroku", "Caching"], + level: "Senior", + name: "Devops", }, ], awards: [ { - title: 'Defender of the Internet', - awarder: 'Fight For The Future', + title: "Defender of the Internet", + awarder: "Fight For The Future", }, ], work: [ { summary: - 'Tokenized is a Bitcoin wallet for issuing, managing and trading digital tokens. I built out the front end which was packaged as an electron app. It was a difficult frontend to build because we store the users keys locally and used them to sign transactions and contracts.', - website: 'https://tokenized.com/', - name: 'Tokenized', - location: 'Melbourne', - position: 'Senior Javascript Developer', - startDate: '2020-05-05', - highlights: ['React', 'Redux', 'SCSS', 'Product'], + "Tokenized is a Bitcoin wallet for issuing, managing and trading digital tokens. I built out the front end which was packaged as an electron app. It was a difficult frontend to build because we store the users keys locally and used them to sign transactions and contracts.", + website: "https://tokenized.com/", + name: "Tokenized", + location: "Melbourne", + position: "Senior Javascript Developer", + startDate: "2020-05-05", + highlights: ["React", "Redux", "SCSS", "Product"], }, { summary: - 'Blockbid is an Australian crypto currency exchange. I started off on the frontend but eventually became lead tech and worked on every moving piece of the exchange. I really enjoyed working with liquidity providers and connecting their platforms to help us achieve liquid markets.', - website: 'https://platform.blockbid.io', - name: 'Blockbid', - location: 'Melbourne', - position: 'Senior Javascript Developer', - startDate: '2018-03-01', - endDate: '2020-01-01', + "Blockbid is an Australian crypto currency exchange. I started off on the frontend but eventually became lead tech and worked on every moving piece of the exchange. I really enjoyed working with liquidity providers and connecting their platforms to help us achieve liquid markets.", + website: "https://platform.blockbid.io", + name: "Blockbid", + location: "Melbourne", + position: "Senior Javascript Developer", + startDate: "2018-03-01", + endDate: "2020-01-01", highlights: [ - 'React, Apollo, Styled Components', - 'Node.js / Rails', - 'Docker / Heroku / GCP', - 'Used Figma for design and UX work', - 'Optimizing markets with tens of millions of rows using SQL.', + "React, Apollo, Styled Components", + "Node.js / Rails", + "Docker / Heroku / GCP", + "Used Figma for design and UX work", + "Optimizing markets with tens of millions of rows using SQL.", ], }, { highlights: [ - 'Worked with Postgres, Redis and Dynamodb for storage.', - 'Hosted on a mixture of Heroku Apps and EC2 servers.', - 'Caching by Fastly and Cloudflare', - 'Hybrid app supported on all platforms', + "Worked with Postgres, Redis and Dynamodb for storage.", + "Hosted on a mixture of Heroku Apps and EC2 servers.", + "Caching by Fastly and Cloudflare", + "Hybrid app supported on all platforms", ], summary: - 'Built a very large and complex React / Redux application. It works on all platforms and has IOS/Android builds due to it being a PWA. (wrapped it in React Native though only implementing a WebView)', - website: 'https://listium.com', + "Built a very large and complex React / Redux application. It works on all platforms and has IOS/Android builds due to it being a PWA. (wrapped it in React Native though only implementing a WebView)", + website: "https://listium.com", pinned: true, - name: 'Listium', - position: 'Developer', - startDate: '2016-01-01', - endDate: '2018-01-01', + name: "Listium", + position: "Developer", + startDate: "2016-01-01", + endDate: "2018-01-01", }, { highlights: [ - 'Millions of sites use the CDN in production', + "Millions of sites use the CDN in production", "Larger market share than Yahoo's, Microsoft's and Google's javascript content distribution networks", - 'We serve hundreds of billions request a month', - 'Contains over 3000 popular Javascript libraries', - 'Millions of developers visit the site per year', + "We serve hundreds of billions request a month", + "Contains over 3000 popular Javascript libraries", + "Millions of developers visit the site per year", ], pinned: true, summary: - 'Following Google’s CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.', - website: 'http://www.cdnjs.com', - name: 'Cdnjs', - position: 'Co-Founder', - startDate: '2011-01-08', + "Following Google’s CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.", + website: "http://www.cdnjs.com", + name: "Cdnjs", + position: "Co-Founder", + startDate: "2011-01-08", }, { highlights: [ - 'Developed new tools for contacting congress', - 'Brainstormed campaign ideas to raise maximum awareness about issues', - 'Lots of social networking integration', + "Developed new tools for contacting congress", + "Brainstormed campaign ideas to raise maximum awareness about issues", + "Lots of social networking integration", ], summary: "Hired to take EFF's campaigning to the next level by building an action centre in Ruby on Rails. The action centre is built around some large open source tools that lower the barrier to entry when contacting congress.", - website: 'http://www.eff.org', - name: 'Electronic Frontier Foundation', - position: 'Developer', - startDate: '2014-04-01', - endDate: '2016-01-01', + website: "http://www.eff.org", + name: "Electronic Frontier Foundation", + position: "Developer", + startDate: "2014-04-01", + endDate: "2016-01-01", }, { highlights: [ - 'Managed a small team of developers and designers', - 'Built the entire frontend application with Backbone.js', - 'Transferred all of the infrastructure from Heroku to AWS', + "Managed a small team of developers and designers", + "Built the entire frontend application with Backbone.js", + "Transferred all of the infrastructure from Heroku to AWS", ], summary: - 'Started off as a front end developer but took on the role of CTO in early 2013. The application frontend is built with Javascript and organized as a single page application that talks to a collection of Rails web servers which are connected to MongoDB.', - website: 'http://www.earbits.com', - name: 'Earbits', - position: 'CTO', - endDate: '2015-01-09', - startDate: '2013-03-08', + "Started off as a front end developer but took on the role of CTO in early 2013. The application frontend is built with Javascript and organized as a single page application that talks to a collection of Rails web servers which are connected to MongoDB.", + website: "http://www.earbits.com", + name: "Earbits", + position: "CTO", + endDate: "2015-01-09", + startDate: "2013-03-08", }, { highlights: [ - 'This resume is built with JSON Resume', - 'Over 3000 stars on Github', - 'Community developed themes', - 'Tens of thousands of users', + "This resume is built with JSON Resume", + "Over 3000 stars on Github", + "Community developed themes", + "Tens of thousands of users", ], summary: "JSON Resume is a community driven open source initiative to create a JSON based standard for resumes. There is no reason why there can't be a common standard for writing a resume that can be extended with an ecosystem of open source tools.", - website: 'http://jsonresume.org', + website: "http://jsonresume.org", pinned: true, - name: 'JSON Resume', - position: 'Founder', - startDate: '2014-04-01', + name: "JSON Resume", + position: "Founder", + startDate: "2014-04-01", }, { highlights: [ - 'Generated 37,000,000 banner views', - '100, 000 phone calls to congress', - '500, 000 emails', - '250, 000 signatures', + "Generated 37,000,000 banner views", + "100, 000 phone calls to congress", + "500, 000 emails", + "250, 000 signatures", ], summary: 'Worked on many politically charged campaigns against mass surveillance. Not only technically challenging work but also a lot of networking and getting my hands dirty with politics. Our biggest project was "TheDayWeFightBack"..', - website: 'http://www.taskforce.is', - name: 'Taskforce.is', - position: 'Developer', - startDate: '2013-06-01', - endDate: '2016-01-01', + website: "http://www.taskforce.is", + name: "Taskforce.is", + position: "Developer", + startDate: "2013-06-01", + endDate: "2016-01-01", }, { highlights: [ - 'The site and blog combined have managed to receive over 200,000 visitors in 2014.', + "The site and blog combined have managed to receive over 200,000 visitors in 2014.", ], summary: - 'An international directory of civilian drone / UAV operators for hire. Services include aerial photography, aerial video, mapping, surveying, precision agriculture, real estate photography, remote inspections and infrared imaging. Our plan is to be the place to go when looking for UAV/Drone services. The website is built in Backbone.js and API is built with Node.js and Postgres. ', - website: 'http://www.dronehire.org', - name: 'Drone Hire', - position: 'Co-Founder', - startDate: '2013-01-01', + "An international directory of civilian drone / UAV operators for hire. Services include aerial photography, aerial video, mapping, surveying, precision agriculture, real estate photography, remote inspections and infrared imaging. Our plan is to be the place to go when looking for UAV/Drone services. The website is built in Backbone.js and API is built with Node.js and Postgres. ", + website: "http://www.dronehire.org", + name: "Drone Hire", + position: "Co-Founder", + startDate: "2013-01-01", }, { highlights: [ - 'Over two million unique visitors a year', - '25,000+ ebook downloads', - '300,000+ Youtube views', + "Over two million unique visitors a year", + "25,000+ ebook downloads", + "300,000+ Youtube views", ], summary: - 'I write tutorials and blog post regarding the popular Javascript framework Backbone.js. The tutorials cover a range of topics regarding front end development aimed at beginners, experts and anyone in between.', - website: 'http://backbonetutorials.com', - name: 'BackboneTutorials.com', - position: 'Founder', - startDate: '2011-01-01', - endDate: '2014-01-01', + "I write tutorials and blog post regarding the popular Javascript framework Backbone.js. The tutorials cover a range of topics regarding front end development aimed at beginners, experts and anyone in between.", + website: "http://backbonetutorials.com", + name: "BackboneTutorials.com", + position: "Founder", + startDate: "2011-01-01", + endDate: "2014-01-01", }, { summary: - 'Ephox is a worldwide company who is heavily involved with the development of TinyMce and enterprise editors. My primary role included building front-end widgets and applications. Worked on a major product using Backbone.js as a base. Heavily involved in UI/UX design and wire-framing. Also spend a lot of time designing API specifications and documentation.', - website: 'http://ephox.com', - name: 'Ephox', - position: 'Front-end Developer', - endDate: '2012-06-01', - startDate: '2011-01-01', + "Ephox is a worldwide company who is heavily involved with the development of TinyMce and enterprise editors. My primary role included building front-end widgets and applications. Worked on a major product using Backbone.js as a base. Heavily involved in UI/UX design and wire-framing. Also spend a lot of time designing API specifications and documentation.", + website: "http://ephox.com", + name: "Ephox", + position: "Front-end Developer", + endDate: "2012-06-01", + startDate: "2011-01-01", }, ], interests: [ { - name: 'Gardening', + name: "Gardening", }, { - name: 'Music / Jamming', + name: "Music / Jamming", }, { - name: 'Reading / Writing', + name: "Reading / Writing", }, { - name: 'Open Source', + name: "Open Source", }, ], projects: [ { highlights: [ - 'Millions of sites use the CDN in production', + "Millions of sites use the CDN in production", "Larger market share than Yahoo's, Microsoft's and Google's javascript content distribution networks", - 'We serve hundreds of billions request a month', - 'Contains over 3000 popular Javascript libraries', - 'Millions of developers visit the site per year', + "We serve hundreds of billions request a month", + "Contains over 3000 popular Javascript libraries", + "Millions of developers visit the site per year", ], summary: - 'Following Googles CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.', - website: 'http://www.cdnjs.com', - name: 'Cdnjs', - position: 'Co-Founder', - startDate: '2011-01-08', + "Following Googles CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.", + website: "http://www.cdnjs.com", + name: "Cdnjs", + position: "Co-Founder", + startDate: "2011-01-08", }, ], }; diff --git a/apps/registry/pages/api/schema.js b/apps/registry/pages/api/schema.js index 7c1ffbc0..2c540bed 100644 --- a/apps/registry/pages/api/schema.js +++ b/apps/registry/pages/api/schema.js @@ -1,104 +1,104 @@ const schema = { - $schema: 'http://json-schema.org/draft-04/schema#', + $schema: "http://json-schema.org/draft-04/schema#", additionalProperties: false, definitions: { iso8601: { - type: 'string', + type: "string", description: - 'Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04', + "Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04", pattern: - '^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$', + "^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$", }, }, properties: { $schema: { - type: 'string', + type: "string", description: - 'link to the version of the schema that can validate the resume', - format: 'uri', + "link to the version of the schema that can validate the resume", + format: "uri", }, basics: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', + type: "string", }, label: { - type: 'string', - description: 'e.g. Web Developer', + type: "string", + description: "e.g. Web Developer", }, image: { - type: 'string', - description: 'URL (as per RFC 3986) to a image in JPEG or PNG format', + type: "string", + description: "URL (as per RFC 3986) to a image in JPEG or PNG format", }, email: { - type: 'string', - description: 'e.g. thomas@gmail.com', - format: 'email', + type: "string", + description: "e.g. thomas@gmail.com", + format: "email", }, phone: { - type: 'string', + type: "string", description: - 'Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923', + "Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923", }, url: { - type: 'string', + type: "string", description: - 'URL (as per RFC 3986) to your website, e.g. personal homepage', - format: 'uri', + "URL (as per RFC 3986) to your website, e.g. personal homepage", + format: "uri", }, summary: { - type: 'string', - description: 'Write a short 2-3 sentence biography about yourself', + type: "string", + description: "Write a short 2-3 sentence biography about yourself", }, location: { - type: 'object', + type: "object", additionalProperties: true, properties: { address: { - type: 'string', + type: "string", description: - 'To add multiple address lines, use \n. For example, 1234 Glücklichkeit Straße\nHinterhaus 5. Etage li.', + "To add multiple address lines, use \n. For example, 1234 Glücklichkeit Straße\nHinterhaus 5. Etage li.", }, postalCode: { - type: 'string', + type: "string", }, city: { - type: 'string', + type: "string", }, countryCode: { - type: 'string', - description: 'code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN', + type: "string", + description: "code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN", }, region: { - type: 'string', + type: "string", description: - 'The general region where you live. Can be a US state, or a province, for instance.', + "The general region where you live. Can be a US state, or a province, for instance.", }, }, }, profiles: { - type: 'array', + type: "array", description: - 'Specify any number of social networks that you participate in', + "Specify any number of social networks that you participate in", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { network: { - type: 'string', - description: 'e.g. Facebook or Twitter', + type: "string", + description: "e.g. Facebook or Twitter", }, username: { - type: 'string', - description: 'e.g. neutralthoughts', + type: "string", + description: "e.g. neutralthoughts", }, url: { - type: 'string', - description: 'e.g. http://twitter.example.com/neutralthoughts', - format: 'uri', + type: "string", + description: "e.g. http://twitter.example.com/neutralthoughts", + format: "uri", }, }, }, @@ -106,387 +106,387 @@ const schema = { }, }, work: { - type: 'array', + type: "array", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. Facebook', + type: "string", + description: "e.g. Facebook", }, location: { - type: 'string', - description: 'e.g. Menlo Park, CA', + type: "string", + description: "e.g. Menlo Park, CA", }, description: { - type: 'string', - description: 'e.g. Social Media Company', + type: "string", + description: "e.g. Social Media Company", }, position: { - type: 'string', - description: 'e.g. Software Engineer', + type: "string", + description: "e.g. Software Engineer", }, url: { - type: 'string', - description: 'e.g. http://facebook.example.com', - format: 'uri', + type: "string", + description: "e.g. http://facebook.example.com", + format: "uri", }, startDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, endDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, summary: { - type: 'string', + type: "string", description: - 'Give an overview of your responsibilities at the company', + "Give an overview of your responsibilities at the company", }, highlights: { - type: 'array', - description: 'Specify multiple accomplishments', + type: "array", + description: "Specify multiple accomplishments", additionalItems: false, items: { - type: 'string', + type: "string", description: - 'e.g. Increased profits by 20% from 2011-2012 through viral advertising', + "e.g. Increased profits by 20% from 2011-2012 through viral advertising", }, }, }, }, }, volunteer: { - type: 'array', + type: "array", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { organization: { - type: 'string', - description: 'e.g. Facebook', + type: "string", + description: "e.g. Facebook", }, position: { - type: 'string', - description: 'e.g. Software Engineer', + type: "string", + description: "e.g. Software Engineer", }, url: { - type: 'string', - description: 'e.g. http://facebook.example.com', - format: 'uri', + type: "string", + description: "e.g. http://facebook.example.com", + format: "uri", }, startDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, endDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, summary: { - type: 'string', + type: "string", description: - 'Give an overview of your responsibilities at the company', + "Give an overview of your responsibilities at the company", }, highlights: { - type: 'array', - description: 'Specify accomplishments and achievements', + type: "array", + description: "Specify accomplishments and achievements", additionalItems: false, items: { - type: 'string', + type: "string", description: - 'e.g. Increased profits by 20% from 2011-2012 through viral advertising', + "e.g. Increased profits by 20% from 2011-2012 through viral advertising", }, }, }, }, }, education: { - type: 'array', + type: "array", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { institution: { - type: 'string', - description: 'e.g. Massachusetts Institute of Technology', + type: "string", + description: "e.g. Massachusetts Institute of Technology", }, url: { - type: 'string', - description: 'e.g. http://facebook.example.com', - format: 'uri', + type: "string", + description: "e.g. http://facebook.example.com", + format: "uri", }, area: { - type: 'string', - description: 'e.g. Arts', + type: "string", + description: "e.g. Arts", }, studyType: { - type: 'string', - description: 'e.g. Bachelor', + type: "string", + description: "e.g. Bachelor", }, startDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, endDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, score: { - type: 'string', - description: 'grade point average, e.g. 3.67/4.0', + type: "string", + description: "grade point average, e.g. 3.67/4.0", }, courses: { - type: 'array', - description: 'List notable courses/subjects', + type: "array", + description: "List notable courses/subjects", additionalItems: false, items: { - type: 'string', - description: 'e.g. H1302 - Introduction to American history', + type: "string", + description: "e.g. H1302 - Introduction to American history", }, }, }, }, }, awards: { - type: 'array', + type: "array", description: - 'Specify any awards you have received throughout your professional career', + "Specify any awards you have received throughout your professional career", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { title: { - type: 'string', - description: 'e.g. One of the 100 greatest minds of the century', + type: "string", + description: "e.g. One of the 100 greatest minds of the century", }, date: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, awarder: { - type: 'string', - description: 'e.g. Time Magazine', + type: "string", + description: "e.g. Time Magazine", }, summary: { - type: 'string', - description: 'e.g. Received for my work with Quantum Physics', + type: "string", + description: "e.g. Received for my work with Quantum Physics", }, }, }, }, certificates: { - type: 'array', + type: "array", description: - 'Specify any certificates you have received throughout your professional career', + "Specify any certificates you have received throughout your professional career", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. Certified Kubernetes Administrator', + type: "string", + description: "e.g. Certified Kubernetes Administrator", }, date: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, url: { - type: 'string', - description: 'e.g. http://example.com', - format: 'uri', + type: "string", + description: "e.g. http://example.com", + format: "uri", }, issuer: { - type: 'string', - description: 'e.g. CNCF', + type: "string", + description: "e.g. CNCF", }, }, }, }, publications: { - type: 'array', - description: 'Specify your publications through your career', + type: "array", + description: "Specify your publications through your career", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. The World Wide Web', + type: "string", + description: "e.g. The World Wide Web", }, publisher: { - type: 'string', - description: 'e.g. IEEE, Computer Magazine', + type: "string", + description: "e.g. IEEE, Computer Magazine", }, releaseDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, url: { - type: 'string', + type: "string", description: - 'e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html', - format: 'uri', + "e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html", + format: "uri", }, summary: { - type: 'string', + type: "string", description: - 'Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML.', + "Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML.", }, }, }, }, skills: { - type: 'array', - description: 'List out your professional skill-set', + type: "array", + description: "List out your professional skill-set", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. Web Development', + type: "string", + description: "e.g. Web Development", }, level: { - type: 'string', - description: 'e.g. Master', + type: "string", + description: "e.g. Master", }, keywords: { - type: 'array', - description: 'List some keywords pertaining to this skill', + type: "array", + description: "List some keywords pertaining to this skill", additionalItems: false, items: { - type: 'string', - description: 'e.g. HTML', + type: "string", + description: "e.g. HTML", }, }, }, }, }, languages: { - type: 'array', - description: 'List any other languages you speak', + type: "array", + description: "List any other languages you speak", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { language: { - type: 'string', - description: 'e.g. English, Spanish', + type: "string", + description: "e.g. English, Spanish", }, fluency: { - type: 'string', - description: 'e.g. Fluent, Beginner', + type: "string", + description: "e.g. Fluent, Beginner", }, }, }, }, interests: { - type: 'array', + type: "array", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. Philosophy', + type: "string", + description: "e.g. Philosophy", }, keywords: { - type: 'array', + type: "array", additionalItems: false, items: { - type: 'string', - description: 'e.g. Friedrich Nietzsche', + type: "string", + description: "e.g. Friedrich Nietzsche", }, }, }, }, }, references: { - type: 'array', - description: 'List references you have received', + type: "array", + description: "List references you have received", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. Timothy Cook', + type: "string", + description: "e.g. Timothy Cook", }, reference: { - type: 'string', + type: "string", description: - 'e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing.', + "e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing.", }, }, }, }, projects: { - type: 'array', - description: 'Specify career projects', + type: "array", + description: "Specify career projects", additionalItems: false, items: { - type: 'object', + type: "object", additionalProperties: true, properties: { name: { - type: 'string', - description: 'e.g. The World Wide Web', + type: "string", + description: "e.g. The World Wide Web", }, description: { - type: 'string', + type: "string", description: - 'Short summary of project. e.g. Collated works of 2017.', + "Short summary of project. e.g. Collated works of 2017.", }, highlights: { - type: 'array', - description: 'Specify multiple features', + type: "array", + description: "Specify multiple features", additionalItems: false, items: { - type: 'string', - description: 'e.g. Directs you close but not quite there', + type: "string", + description: "e.g. Directs you close but not quite there", }, }, keywords: { - type: 'array', - description: 'Specify special elements involved', + type: "array", + description: "Specify special elements involved", additionalItems: false, items: { - type: 'string', - description: 'e.g. AngularJS', + type: "string", + description: "e.g. AngularJS", }, }, startDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, endDate: { - $ref: '#/definitions/iso8601', + $ref: "#/definitions/iso8601", }, url: { - type: 'string', - format: 'uri', + type: "string", + format: "uri", description: - 'e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html', + "e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html", }, roles: { - type: 'array', - description: 'Specify your role on this project or in company', + type: "array", + description: "Specify your role on this project or in company", additionalItems: false, items: { - type: 'string', - description: 'e.g. Team Lead, Speaker, Writer', + type: "string", + description: "e.g. Team Lead, Speaker, Writer", }, }, entity: { - type: 'string', + type: "string", description: "Specify the relevant company/entity affiliations e.g. 'greenpeace', 'corporationXYZ'", }, type: { - type: 'string', + type: "string", description: " e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'", }, @@ -494,30 +494,30 @@ const schema = { }, }, meta: { - type: 'object', + type: "object", description: - 'The schema version and any other tooling configuration lives here', + "The schema version and any other tooling configuration lives here", additionalProperties: true, properties: { canonical: { - type: 'string', + type: "string", description: - 'URL (as per RFC 3986) to latest version of this document', - format: 'uri', + "URL (as per RFC 3986) to latest version of this document", + format: "uri", }, version: { - type: 'string', - description: 'A version field which follows semver - e.g. v1.0.0', + type: "string", + description: "A version field which follows semver - e.g. v1.0.0", }, lastModified: { - type: 'string', - description: 'Using ISO 8601 with YYYY-MM-DDThh:mm:ss', + type: "string", + description: "Using ISO 8601 with YYYY-MM-DDThh:mm:ss", }, }, }, }, - title: 'Resume Schema', - type: 'object', + title: "Resume Schema", + type: "object", }; export default schema; diff --git a/apps/registry/pages/debug.js b/apps/registry/pages/debug.js index 33c27fbe..89cf5b8b 100644 --- a/apps/registry/pages/debug.js +++ b/apps/registry/pages/debug.js @@ -1,6 +1,6 @@ -import { Button } from 'ui'; -import { Resume } from 'jsonresume-theme-standard'; -import resume from './api/samples/resume'; +import { Button } from "ui"; +import { Resume } from "jsonresume-theme-standard"; +import resume from "./api/samples/resume"; export default function Talk() { // @todo - used to render react templates (purely debug stuff at the moment) return ( diff --git a/apps/registry/pages/jobs.js b/apps/registry/pages/jobs.js index df4c35b1..dd862457 100644 --- a/apps/registry/pages/jobs.js +++ b/apps/registry/pages/jobs.js @@ -1,10 +1,10 @@ -import styled from 'styled-components'; -import { useRouter } from 'next/router'; -import { useEffect, useRef, useState } from 'react'; -import axios from 'axios'; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; -import ReactMarkdown from 'react-markdown'; -import Layout from '../ui/Layout'; +import styled from "styled-components"; +import { useRouter } from "next/router"; +import { useEffect, useRef, useState } from "react"; +import axios from "axios"; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; +import ReactMarkdown from "react-markdown"; +import Layout from "../ui/Layout"; function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); @@ -56,7 +56,7 @@ const Helper = styled.div` export default function Talk() { const router = useRouter(); - const parts = router.asPath.split('/'); + const parts = router.asPath.split("/"); const username = parts[1]; const [jobs, setJobs] = useState(null); @@ -64,12 +64,12 @@ export default function Talk() { useEffect(() => { const fetchData = async () => { try { - const response = await axios.post('/api/jobs', { + const response = await axios.post("/api/jobs", { username, }); setJobs(response.data); } catch (error) { - console.error('Error fetching data: ', error); + console.error("Error fetching data: ", error); } }; @@ -82,15 +82,15 @@ export default function Talk() { <Messages> {jobs && jobs.map((job) => { - let content = job.content.replace('<code>', ''); - content = job.content.replace('</code>', ''); - content = job.content.replace('<pre>', ''); - content = job.content.replace('</pre>', ''); + let content = job.content.replace("<code>", ""); + content = job.content.replace("</code>", ""); + content = job.content.replace("<pre>", ""); + content = job.content.replace("</pre>", ""); return ( <Message key={job.uuid}> <Name>{capitalizeFirstLetter(job.type)}</Name> <ReactMarkdown> - {NodeHtmlMarkdown.translate(content).replace('```', '')} + {NodeHtmlMarkdown.translate(content).replace("```", "")} </ReactMarkdown> </Message> ); diff --git a/apps/registry/pages/letter.js b/apps/registry/pages/letter.js index b3b9c31f..7e7cff86 100644 --- a/apps/registry/pages/letter.js +++ b/apps/registry/pages/letter.js @@ -1,17 +1,17 @@ -import { Button } from 'ui'; -import styled from 'styled-components'; -import { useRouter } from 'next/router'; -import { useEffect, useRef, useState } from 'react'; -import { faker } from '@faker-js/faker'; -import { v4 as uuidv4 } from 'uuid'; -import axios from 'axios'; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; -import ReactMarkdown from 'react-markdown'; -import Layout from '../ui/Layout'; +import { Button } from "ui"; +import styled from "styled-components"; +import { useRouter } from "next/router"; +import { useEffect, useRef, useState } from "react"; +import { faker } from "@faker-js/faker"; +import { v4 as uuidv4 } from "uuid"; +import axios from "axios"; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; +import ReactMarkdown from "react-markdown"; +import Layout from "../ui/Layout"; export default function Letter() { const router = useRouter(); - const parts = router.asPath.split('/'); + const parts = router.asPath.split("/"); const username = parts[1]; const [letter, setLetter] = useState(null); @@ -19,12 +19,12 @@ export default function Letter() { useEffect(() => { const fetchData = async () => { try { - const response = await axios.post('/api/letter', { + const response = await axios.post("/api/letter", { username, }); setLetter(response.data); } catch (error) { - console.error('Error fetching data: ', error); + console.error("Error fetching data: ", error); } }; @@ -37,10 +37,10 @@ export default function Letter() { {letter && ( <pre style={{ - 'white-space': 'pre-wrap', - width: '60%', - margin: 'auto', - 'margin-top': '100px', + "white-space": "pre-wrap", + width: "60%", + margin: "auto", + "margin-top": "100px", }} > {letter} diff --git a/apps/registry/pages/resumes.js b/apps/registry/pages/resumes.js index 32dcbb97..c4f73d3d 100644 --- a/apps/registry/pages/resumes.js +++ b/apps/registry/pages/resumes.js @@ -43,7 +43,7 @@ const Resumes = () => { return ( <div key={resume.updated_at}> <a href={`https://registry.jsonresume.org/${resume.username}`}> - <Image alt="The user"src={resume.image} /> + <Image alt="The user" src={resume.image} /> </a> <div>{resume.label?.substr(0, 30)}</div> </div> diff --git a/apps/registry/pages/suggestions.js b/apps/registry/pages/suggestions.js index a812a369..a9aae1bb 100644 --- a/apps/registry/pages/suggestions.js +++ b/apps/registry/pages/suggestions.js @@ -1,17 +1,17 @@ -import { Button } from 'ui'; -import styled from 'styled-components'; -import { useRouter } from 'next/router'; -import { useEffect, useRef, useState } from 'react'; -import { faker } from '@faker-js/faker'; -import { v4 as uuidv4 } from 'uuid'; -import axios from 'axios'; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; -import ReactMarkdown from 'react-markdown'; -import Layout from '../ui/Layout'; +import { Button } from "ui"; +import styled from "styled-components"; +import { useRouter } from "next/router"; +import { useEffect, useRef, useState } from "react"; +import { faker } from "@faker-js/faker"; +import { v4 as uuidv4 } from "uuid"; +import axios from "axios"; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; +import ReactMarkdown from "react-markdown"; +import Layout from "../ui/Layout"; export default function Talk() { const router = useRouter(); - const parts = router.asPath.split('/'); + const parts = router.asPath.split("/"); const username = parts[1]; const [suggestions, setSuggestions] = useState(null); @@ -19,12 +19,12 @@ export default function Talk() { useEffect(() => { const fetchData = async () => { try { - const response = await axios.post('/api/suggestions', { + const response = await axios.post("/api/suggestions", { username, }); setSuggestions(response.data); } catch (error) { - console.error('Error fetching data: ', error); + console.error("Error fetching data: ", error); } }; @@ -37,10 +37,10 @@ export default function Talk() { {suggestions && ( <pre style={{ - 'white-space': 'pre-wrap', - width: '60%', - margin: 'auto', - 'margin-top': '100px', + "white-space": "pre-wrap", + width: "60%", + margin: "auto", + "margin-top": "100px", }} > {suggestions} diff --git a/package.json b/package.json index a41d84bd..1b7a2d3f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "build": "turbo run build", "dev": "turbo run dev", "lint": "turbo run lint", - "format": "prettier --write \"**/*.{ts,tsx,md}\"" + "format": "prettier -w .", + "prettier": "prettier -c ." }, "devDependencies": { "eslint": "^7.32.0", diff --git a/packages/README.md b/packages/README.md index 629930b1..2be0290b 100644 --- a/packages/README.md +++ b/packages/README.md @@ -1 +1 @@ -All components across the project should live here \ No newline at end of file +All components across the project should live here diff --git a/packages/jsonresume-theme-standard/README.md b/packages/jsonresume-theme-standard/README.md index d2d0e9ab..7169d2d7 100644 --- a/packages/jsonresume-theme-standard/README.md +++ b/packages/jsonresume-theme-standard/README.md @@ -1 +1 @@ -# wip - how to build a template using react \ No newline at end of file +# wip - how to build a template using react diff --git a/packages/jsonresume-theme-standard/package.json b/packages/jsonresume-theme-standard/package.json index edeb9fb0..eec27954 100644 --- a/packages/jsonresume-theme-standard/package.json +++ b/packages/jsonresume-theme-standard/package.json @@ -1,12 +1,11 @@ { - "name": "jsonresume-theme-standard", - "version": "0.0.0", - "main": "./src/index.js", - "license": "MIT", - "devDependencies": { - "eslint": "^7.32.0", - "eslint-config-custom": "workspace:*", - "react": "^17.0.2" - } + "name": "jsonresume-theme-standard", + "version": "0.0.0", + "main": "./src/index.js", + "license": "MIT", + "devDependencies": { + "eslint": "^7.32.0", + "eslint-config-custom": "workspace:*", + "react": "^17.0.2" } - \ No newline at end of file +} diff --git a/packages/jsonresume-theme-standard/src/index.js b/packages/jsonresume-theme-standard/src/index.js index 3bf4dbd6..eb3edf8d 100644 --- a/packages/jsonresume-theme-standard/src/index.js +++ b/packages/jsonresume-theme-standard/src/index.js @@ -1,7 +1,7 @@ -import { renderToString } from 'react-dom/server'; -import { ServerStyleSheet } from 'styled-components'; -import Document from './ui/Document'; -import Resume from './ui/Resume'; +import { renderToString } from "react-dom/server"; +import { ServerStyleSheet } from "styled-components"; +import Document from "./ui/Document"; +import Resume from "./ui/Resume"; export const render = (resume) => { const sheet = new ServerStyleSheet(); diff --git a/packages/jsonresume-theme-standard/src/ui/Basics.js b/packages/jsonresume-theme-standard/src/ui/Basics.js index a3480290..9f7908b9 100644 --- a/packages/jsonresume-theme-standard/src/ui/Basics.js +++ b/packages/jsonresume-theme-standard/src/ui/Basics.js @@ -1,5 +1,5 @@ -import styled from 'styled-components'; -import SubTitle from './SubTitle'; +import styled from "styled-components"; +import SubTitle from "./SubTitle"; const Title = styled.div` font-size: 34px; diff --git a/packages/jsonresume-theme-standard/src/ui/Date.js b/packages/jsonresume-theme-standard/src/ui/Date.js index 5cf8e430..7ef4e1e1 100644 --- a/packages/jsonresume-theme-standard/src/ui/Date.js +++ b/packages/jsonresume-theme-standard/src/ui/Date.js @@ -1,4 +1,4 @@ -import styled from 'styled-components'; +import styled from "styled-components"; const Text = styled.div` font-size: 16px; @@ -7,7 +7,7 @@ const Text = styled.div` const Date = ({ date }) => { // @todo - format date here - return <Text>{date ?? 'Present'}</Text>; + return <Text>{date ?? "Present"}</Text>; }; export default Date; diff --git a/packages/jsonresume-theme-standard/src/ui/DateRange.js b/packages/jsonresume-theme-standard/src/ui/DateRange.js index 3b4d5b1e..756cbc55 100644 --- a/packages/jsonresume-theme-standard/src/ui/DateRange.js +++ b/packages/jsonresume-theme-standard/src/ui/DateRange.js @@ -1,5 +1,5 @@ -import styled from 'styled-components'; -import Date from './Date'; +import styled from "styled-components"; +import Date from "./Date"; const Text = styled.div` font-size: 16px; diff --git a/packages/jsonresume-theme-standard/src/ui/List.js b/packages/jsonresume-theme-standard/src/ui/List.js index e596e48c..67f7f193 100644 --- a/packages/jsonresume-theme-standard/src/ui/List.js +++ b/packages/jsonresume-theme-standard/src/ui/List.js @@ -1,4 +1,4 @@ -import styled from 'styled-components'; +import styled from "styled-components"; const Text = styled.div` font-size: 20px; diff --git a/packages/jsonresume-theme-standard/src/ui/Projects.js b/packages/jsonresume-theme-standard/src/ui/Projects.js index 68ee4360..621ab4cd 100644 --- a/packages/jsonresume-theme-standard/src/ui/Projects.js +++ b/packages/jsonresume-theme-standard/src/ui/Projects.js @@ -1,7 +1,7 @@ -import styled from 'styled-components'; -import SubTitle from './SubTitle'; -import List from './List'; -import DateRange from './DateRange'; +import styled from "styled-components"; +import SubTitle from "./SubTitle"; +import List from "./List"; +import DateRange from "./DateRange"; const Project = styled.div` font-size: 16px; diff --git a/packages/jsonresume-theme-standard/src/ui/Resume.js b/packages/jsonresume-theme-standard/src/ui/Resume.js index 45da01e7..cfdbc231 100644 --- a/packages/jsonresume-theme-standard/src/ui/Resume.js +++ b/packages/jsonresume-theme-standard/src/ui/Resume.js @@ -1,7 +1,7 @@ -import styled from 'styled-components'; -import Basics from './Basics'; -import Work from './Work'; -import Projects from './Projects'; +import styled from "styled-components"; +import Basics from "./Basics"; +import Work from "./Work"; +import Projects from "./Projects"; const Layout = styled.div` max-width: 660px; diff --git a/packages/jsonresume-theme-standard/src/ui/SubTitle.js b/packages/jsonresume-theme-standard/src/ui/SubTitle.js index 7ac9adb4..b8718486 100644 --- a/packages/jsonresume-theme-standard/src/ui/SubTitle.js +++ b/packages/jsonresume-theme-standard/src/ui/SubTitle.js @@ -1,4 +1,4 @@ -import styled from 'styled-components'; +import styled from "styled-components"; const Text = styled.div` font-size: 22px; diff --git a/packages/jsonresume-theme-standard/src/ui/Work.js b/packages/jsonresume-theme-standard/src/ui/Work.js index 7a486cb0..a134c680 100644 --- a/packages/jsonresume-theme-standard/src/ui/Work.js +++ b/packages/jsonresume-theme-standard/src/ui/Work.js @@ -1,7 +1,7 @@ -import styled from 'styled-components'; -import SubTitle from './SubTitle'; -import List from './List'; -import DateRange from './DateRange'; +import styled from "styled-components"; +import SubTitle from "./SubTitle"; +import List from "./List"; +import DateRange from "./DateRange"; const Company = styled.div` font-size: 16px; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 735e904c..3e0a08af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,7 +23,7 @@ importers: version: 2.8.0 turbo: specifier: ^1.9.6 - version: 1.9.6 + version: 1.10.16 apps/registry: dependencies: @@ -10647,65 +10647,64 @@ packages: engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} dev: false - /turbo-darwin-64@1.9.6: - resolution: {integrity: sha512-9jmxyCAcPrJiPD/EmtK2tObrPGblmyORCgNgtcw1iozcfC7kqungWTfbnHrvTNUfUmVhH0sA3BGzshpuslbQHg==} + /turbo-darwin-64@1.10.16: + resolution: {integrity: sha512-+Jk91FNcp9e9NCLYlvDDlp2HwEDp14F9N42IoW3dmHI5ZkGSXzalbhVcrx3DOox3QfiNUHxzWg4d7CnVNCuuMg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.9.6: - resolution: {integrity: sha512-5f8ajEi8mOdAZ0AXavu/TzkHGEUi7tw+paefff7KK+XTUrdeyTlf8ULiTI+r97uH1jsYeTeL4JPu9IsEx+bL6g==} + /turbo-darwin-arm64@1.10.16: + resolution: {integrity: sha512-jqGpFZipIivkRp/i+jnL8npX0VssE6IAVNKtu573LXtssZdV/S+fRGYA16tI46xJGxSAivrZ/IcgZrV6Jk80bw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.9.6: - resolution: {integrity: sha512-UrCDMl2Nqd/kxNEJonqvDg8nmZU4UggVQTmqcdYyuOiCA3H98jxggQqZh1VGeF23XDbCWHSQjnbkLeoUvQJWKw==} + /turbo-linux-64@1.10.16: + resolution: {integrity: sha512-PpqEZHwLoizQ6sTUvmImcRmACyRk9EWLXGlqceogPZsJ1jTRK3sfcF9fC2W56zkSIzuLEP07k5kl+ZxJd8JMcg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.9.6: - resolution: {integrity: sha512-oOxAT6lNiMpYVZPWzFNsUvC2LQgKYyH4aBnkeoBnjuAUk8BK5AhUWSWl4QlfTcBWW4LnjDPeZQKrbnxvHhPVsw==} + /turbo-linux-arm64@1.10.16: + resolution: {integrity: sha512-TMjFYz8to1QE0fKVXCIvG/4giyfnmqcQIwjdNfJvKjBxn22PpbjeuFuQ5kNXshUTRaTJihFbuuCcb5OYFNx4uw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.9.6: - resolution: {integrity: sha512-65UxLL1vb5RItzJYNerO5c+yPMzSnD+GvJxfBZIvAwSnb+4ulhPRHzQOYinVq4PZ2DosBZOorWPRf97POmhvog==} + /turbo-windows-64@1.10.16: + resolution: {integrity: sha512-+jsf68krs0N66FfC4/zZvioUap/Tq3sPFumnMV+EBo8jFdqs4yehd6+MxIwYTjSQLIcpH8KoNMB0gQYhJRLZzw==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.9.6: - resolution: {integrity: sha512-aF9VzYT+vaKNbZGDccN7AYrNhph4gr6yOFN7GtTr777IwS5FGW7evku7RScsua5r2HwVKvBO2WjyadpbXuoOOQ==} + /turbo-windows-arm64@1.10.16: + resolution: {integrity: sha512-sKm3hcMM1bl0B3PLG4ifidicOGfoJmOEacM5JtgBkYM48ncMHjkHfFY7HrJHZHUnXM4l05RQTpLFoOl/uIo2HQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.9.6: - resolution: {integrity: sha512-mLbCIAYNbSm60kVhBiAr+YA1BYpPObS/y7rqw1hjh36ZdJDp35lUSeqdBs6oGt0Y4hnmN4ZeIXu8zMVRR03/vw==} + /turbo@1.10.16: + resolution: {integrity: sha512-2CEaK4FIuSZiP83iFa9GqMTQhroW2QryckVqUydmg4tx78baftTOS0O+oDAhvo9r9Nit4xUEtC1RAHoqs6ZEtg==} hasBin: true - requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.9.6 - turbo-darwin-arm64: 1.9.6 - turbo-linux-64: 1.9.6 - turbo-linux-arm64: 1.9.6 - turbo-windows-64: 1.9.6 - turbo-windows-arm64: 1.9.6 + turbo-darwin-64: 1.10.16 + turbo-darwin-arm64: 1.10.16 + turbo-linux-64: 1.10.16 + turbo-linux-arm64: 1.10.16 + turbo-windows-64: 1.10.16 + turbo-windows-arm64: 1.10.16 dev: true /tweetnacl@0.14.5: diff --git a/turbo.json b/turbo.json index c93c4d8a..b9dd32f9 100644 --- a/turbo.json +++ b/turbo.json @@ -9,10 +9,21 @@ "outputs": [".next/**", "!.next/cache/**"] }, "lint": {}, + "//#format": {}, + "//#prettier": {}, "dev": { "cache": false, "persistent": true } }, - "globalEnv": ["NODE_ENV", "TOT", "DATABASE_URL", "DATABASE_URL_RAW", "GITHUB_TOKEN", "OPENAI_API_KEY", "PINECONE_API_KEY", "PINECONE_ENVIRONMENT"] + "globalEnv": [ + "NODE_ENV", + "TOT", + "DATABASE_URL", + "DATABASE_URL_RAW", + "GITHUB_TOKEN", + "OPENAI_API_KEY", + "PINECONE_API_KEY", + "PINECONE_ENVIRONMENT" + ] } From ab5e0e77e02da42e32c161732a35329856294ad5 Mon Sep 17 00:00:00 2001 From: Levin Keller <post@levinkeller.de> Date: Fri, 24 Nov 2023 09:31:25 +0100 Subject: [PATCH 2/2] chore: use single quotes --- .eslintrc.js | 4 +- .github/workflows/ci.yml | 4 +- .prettierrc | 1 + apps/homepage/_config.yml | 2 +- apps/homepage/_layouts/default.html | 46 +- apps/homepage/_layouts/post.html | 18 +- ...07-05-announcing-first-official-version.md | 2 +- .../2014-09-09-first-service-integration.md | 2 +- ...ly-theme-competition-sponsored-by-hired.md | 2 +- .../2019-06-27-5th-birthday-new-features.md | 2 +- apps/homepage/css/style.css | 16 +- apps/homepage/js/main.js | 26 +- apps/registry/.eslintrc.js | 2 +- apps/registry/lib/prisma.js | 4 +- apps/registry/next.config.js | 22 +- apps/registry/pages/_document.js | 4 +- apps/registry/pages/api/[payload].js | 78 ++-- apps/registry/pages/api/formatters/qr.js | 12 +- .../registry/pages/api/formatters/template.js | 144 +++---- apps/registry/pages/api/formatters/tex.js | 2 +- apps/registry/pages/api/formatters/text.js | 18 +- apps/registry/pages/api/formatters/yaml.js | 2 +- apps/registry/pages/api/interview.js | 22 +- apps/registry/pages/api/jobs.js | 14 +- apps/registry/pages/api/letter.js | 4 +- apps/registry/pages/api/openAIStream.js | 16 +- apps/registry/pages/api/resumes.js | 6 +- apps/registry/pages/api/samples/resume.js | 294 ++++++------- apps/registry/pages/api/schema.js | 404 +++++++++--------- apps/registry/pages/api/suggestions.js | 4 +- apps/registry/pages/api/themes.js | 2 +- apps/registry/pages/debug.js | 6 +- apps/registry/pages/interview.js | 68 +-- apps/registry/pages/jobs.js | 30 +- apps/registry/pages/letter.js | 34 +- apps/registry/pages/resumes.js | 10 +- apps/registry/pages/suggestions.js | 34 +- apps/registry/pages/themes.js | 10 +- apps/registry/ui/Layout.js | 24 +- packages/eslint-config-custom/index.js | 6 +- .../jsonresume-theme-standard/src/index.js | 8 +- .../src/ui/Basics.js | 4 +- .../jsonresume-theme-standard/src/ui/Date.js | 4 +- .../src/ui/DateRange.js | 4 +- .../jsonresume-theme-standard/src/ui/List.js | 2 +- .../src/ui/Projects.js | 8 +- .../src/ui/Resume.js | 8 +- .../src/ui/SubTitle.js | 2 +- .../jsonresume-theme-standard/src/ui/Work.js | 8 +- packages/ui/Button.tsx | 2 +- packages/ui/index.tsx | 4 +- pnpm-workspace.yaml | 4 +- 52 files changed, 730 insertions(+), 729 deletions(-) create mode 100644 .prettierrc diff --git a/.eslintrc.js b/.eslintrc.js index 5b999efa..a2845bfa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,10 @@ module.exports = { root: true, // This tells ESLint to load the config from the package `eslint-config-custom` - extends: ["custom"], + extends: ['custom'], settings: { next: { - rootDir: ["apps/*/"], + rootDir: ['apps/*/'], }, }, }; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65ce8bda..7ca22001 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: ["master"] + branches: ['master'] pull_request: types: [opened, synchronize] @@ -24,7 +24,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - cache: "pnpm" + cache: 'pnpm' - name: Install dependencies run: pnpm install diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..01769692 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +singleQuote: true diff --git a/apps/homepage/_config.yml b/apps/homepage/_config.yml index b9e75dfb..7ca798e4 100644 --- a/apps/homepage/_config.yml +++ b/apps/homepage/_config.yml @@ -1,5 +1,5 @@ title: JSON Resume -description: "JSON Resume is a community driven open source initiative to create a JSON based standard for resumes." +description: 'JSON Resume is a community driven open source initiative to create a JSON based standard for resumes.' permalink: pretty markdown: kramdown include: diff --git a/apps/homepage/_layouts/default.html b/apps/homepage/_layouts/default.html index 657843ac..3fe5f41c 100644 --- a/apps/homepage/_layouts/default.html +++ b/apps/homepage/_layouts/default.html @@ -27,9 +27,9 @@ function gtag() { dataLayer.push(arguments); } - gtag("js", new Date()); + gtag('js', new Date()); - gtag("config", "G-P4B6R43X2F"); + gtag('config', 'G-P4B6R43X2F'); </script> <link rel="dns-prefetch" href="//fonts.googleapis.com" /> <link rel="dns-prefetch" href="//cdnjs.cloudflare.com" /> @@ -100,15 +100,15 @@ <script defer> function countUp(a, b, c, d, e, f) { for ( - var g = 0, h = ["webkit", "moz", "ms"], i = 0; + var g = 0, h = ['webkit', 'moz', 'ms'], i = 0; i < h.length && !window.requestAnimationFrame; ++i ) (window.requestAnimationFrame = - window[h[i] + "RequestAnimationFrame"]), + window[h[i] + 'RequestAnimationFrame']), (window.cancelAnimationFrame = - window[h[i] + "CancelAnimationFrame"] || - window[h[i] + "CancelRequestAnimationFrame"]); + window[h[i] + 'CancelAnimationFrame'] || + window[h[i] + 'CancelRequestAnimationFrame']); window.requestAnimationFrame || (window.requestAnimationFrame = function (a) { var c = new Date().getTime(), @@ -125,12 +125,12 @@ (this.options = f || { useEasing: !0, useGrouping: !0, - separator: ",", - decimal: ".", + separator: ',', + decimal: '.', }), - "" == this.options.separator && (this.options.useGrouping = !1); + '' == this.options.separator && (this.options.useGrouping = !1); var j = this; - (this.d = "string" == typeof a ? document.getElementById(a) : a), + (this.d = 'string' == typeof a ? document.getElementById(a) : a), (this.startVal = Number(b)), (this.endVal = Number(c)), (this.countDown = this.startVal > this.endVal ? !0 : !1), @@ -143,7 +143,7 @@ (this.dec = Math.pow(10, this.decimals)), (this.duration = 1e3 * e || 2e3), (this.version = function () { - return "1.1.2"; + return '1.1.2'; }), (this.easeOutExpo = function (a, b, c, d) { return (1024 * c * (-Math.pow(2, (-10 * a) / d) + 1)) / 1023 + b; @@ -186,9 +186,9 @@ (j.callback = a), isNaN(j.endVal) || isNaN(j.startVal) ? (console.log( - "countUp error: startVal or endVal is not a number" + 'countUp error: startVal or endVal is not a number' ), - (j.d.innerHTML = "--")) + (j.d.innerHTML = '--')) : (j.rAF = requestAnimationFrame(j.count)), !1 ); @@ -209,17 +209,17 @@ requestAnimationFrame(j.count); }), (this.formatNumber = function (a) { - a += ""; + a += ''; var b, c, d, e; if ( - ((b = a.split(".")), + ((b = a.split('.')), (c = b[0]), - (d = b.length > 1 ? j.options.decimal + b[1] : ""), + (d = b.length > 1 ? j.options.decimal + b[1] : ''), (e = /(\d+)(\d{3})/), j.options.useGrouping) ) for (; e.test(c); ) - c = c.replace(e, "$1" + j.options.separator + "$2"); + c = c.replace(e, '$1' + j.options.separator + '$2'); return c + d; }), (j.d.innerHTML = j.formatNumber(j.startVal.toFixed(j.decimals))); @@ -292,7 +292,7 @@ ></script> <script defer> (function (i, s, o, g, r, a, m) { - i["GoogleAnalyticsObject"] = r; + i['GoogleAnalyticsObject'] = r; (i[r] = i[r] || function () { @@ -306,13 +306,13 @@ })( window, document, - "script", - "//www.google-analytics.com/analytics.js", - "ga" + 'script', + '//www.google-analytics.com/analytics.js', + 'ga' ); - ga("create", "UA-74754546-1", "auto"); - ga("send", "pageview"); + ga('create', 'UA-74754546-1', 'auto'); + ga('send', 'pageview'); </script> <script src="/js/main.js" defer></script> </body> diff --git a/apps/homepage/_layouts/post.html b/apps/homepage/_layouts/post.html index b022a17c..820693cd 100644 --- a/apps/homepage/_layouts/post.html +++ b/apps/homepage/_layouts/post.html @@ -24,18 +24,18 @@ <h2>{{ page.title }}</h2> <hr /> <div id="disqus_thread"></div> <script> - var disqus_shortname = "jsonresume"; - var disqus_url = "http://jsonresume.org{{page.url}}"; - var disqus_identifier = "{{page.url}}"; - var disqus_title = "{{page.title}}"; + var disqus_shortname = 'jsonresume'; + var disqus_url = 'http://jsonresume.org{{page.url}}'; + var disqus_identifier = '{{page.url}}'; + var disqus_title = '{{page.title}}'; (function () { - var dsq = document.createElement("script"); - dsq.type = "text/javascript"; + var dsq = document.createElement('script'); + dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js"; + dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; ( - document.getElementsByTagName("head")[0] || - document.getElementsByTagName("body")[0] + document.getElementsByTagName('head')[0] || + document.getElementsByTagName('body')[0] ).appendChild(dsq); })(); </script> diff --git a/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md b/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md index 1a9dd66b..20ae561d 100644 --- a/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md +++ b/apps/homepage/_posts/2014-07-05-announcing-first-official-version.md @@ -1,6 +1,6 @@ --- layout: post -title: "First Official Release" +title: 'First Official Release' date: 2014-07-31 14:18:05 permalink: /blog/first-official-release/ author: Thomas Davis diff --git a/apps/homepage/_posts/2014-09-09-first-service-integration.md b/apps/homepage/_posts/2014-09-09-first-service-integration.md index 11245cc6..67a4b6ba 100644 --- a/apps/homepage/_posts/2014-09-09-first-service-integration.md +++ b/apps/homepage/_posts/2014-09-09-first-service-integration.md @@ -1,6 +1,6 @@ --- layout: post -title: "Announcing our first service integration" +title: 'Announcing our first service integration' date: 2014-09-09 14:18:05 permalink: /blog/first-service-integration/ author: Thomas Davis diff --git a/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md b/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md index 8e0ad2a3..418bf479 100644 --- a/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md +++ b/apps/homepage/_posts/2014-11-09-monthly-theme-competition-sponsored-by-hired.md @@ -1,6 +1,6 @@ --- layout: post -title: "Theme Competition - Sponsored by Hired.com" +title: 'Theme Competition - Sponsored by Hired.com' date: 2014-11-09 14:18:05 permalink: /blog/monthly-theme-competition-sponsored-by-hired/ author: Thomas Davis diff --git a/apps/homepage/_posts/2019-06-27-5th-birthday-new-features.md b/apps/homepage/_posts/2019-06-27-5th-birthday-new-features.md index 9abbf5e9..ddf462e1 100644 --- a/apps/homepage/_posts/2019-06-27-5th-birthday-new-features.md +++ b/apps/homepage/_posts/2019-06-27-5th-birthday-new-features.md @@ -1,6 +1,6 @@ --- layout: post -title: "5th Birthday and New Features" +title: '5th Birthday and New Features' date: 2019-06-27 14:18:05 permalink: /blog/5th-birthday-new-features/ --- diff --git a/apps/homepage/css/style.css b/apps/homepage/css/style.css index adc071aa..f58e143f 100644 --- a/apps/homepage/css/style.css +++ b/apps/homepage/css/style.css @@ -7,7 +7,7 @@ body { body { color: #222; background: #fff; - font: 14px "Open Sans"; + font: 14px 'Open Sans'; margin: 0; overflow-x: hidden; } @@ -17,7 +17,7 @@ a:hover { transition: all 0.25s; } h1 { - font: 300 40px "Open Sans"; + font: 300 40px 'Open Sans'; margin: 0; } h1, @@ -147,7 +147,7 @@ pre { #sidebar a { display: block; color: #000; - font: 600 15px "Open Sans"; + font: 600 15px 'Open Sans'; padding: 15px 30px; } #sidebar a + a { @@ -155,7 +155,7 @@ pre { } #nav { background: #fff18f; - font: 600 15px "Open Sans"; + font: 600 15px 'Open Sans'; overflow: hidden; } #nav button { @@ -242,7 +242,7 @@ pre { } #search:before { color: #ccc; - content: "\f002"; + content: '\f002'; cursor: text; font: 24px FontAwesome; position: absolute; @@ -356,7 +356,7 @@ pre { margin-top: 0; margin-bottom: 0.5em; } -#schema .row div[class^="col-sm-"] { +#schema .row div[class^='col-sm-'] { margin-bottom: 30px; } #themes { @@ -460,13 +460,13 @@ pre { #team .person .github:before { color: #ccc; font: 14px FontAwesome; - content: "\f09b"; + content: '\f09b'; margin-right: 6px; } #team .person .twitter:before { color: #ddd; font: 14px FontAwesome; - content: "\f099"; + content: '\f099'; margin-right: 6px; } #footer { diff --git a/apps/homepage/js/main.js b/apps/homepage/js/main.js index e7784910..d31d827d 100644 --- a/apps/homepage/js/main.js +++ b/apps/homepage/js/main.js @@ -8,28 +8,28 @@ jQuery(() => { * Apply the class "active" to the current page in the navigation bar. */ function highlight() { - $("#nav a").each(function () { + $('#nav a').each(function () { const self = $(this); - const href = self.attr("href"); + const href = self.attr('href'); const path = window.location.pathname; if (path === href) { - self.addClass("active"); - self.siblings().removeClass("active"); + self.addClass('active'); + self.siblings().removeClass('active'); } }); } function equalizeFeatureHeight() { - const start = $("#start"); + const start = $('#start'); if (!start.length) return; setInterval(() => { let max = 0; - const items = start.find(".feature p"); + const items = start.find('.feature p'); - items.css("height", "auto").each(function () { + items.css('height', 'auto').each(function () { const h = $(this).height(); if (h > max) max = h; @@ -40,18 +40,18 @@ function equalizeFeatureHeight() { } function enableSidebar() { - const viewport = $("#viewport"); + const viewport = $('#viewport'); - $(".lt").on("touchstart click", (e) => { + $('.lt').on('touchstart click', (e) => { e.stopPropagation(); e.preventDefault(); - viewport.toggleClass("open"); + viewport.toggleClass('open'); }); - $(".inner").on("touchstart click", (e) => { - if (viewport.hasClass("open")) { + $('.inner').on('touchstart click', (e) => { + if (viewport.hasClass('open')) { e.stopPropagation(); - viewport.removeClass("open"); + viewport.removeClass('open'); } }); } diff --git a/apps/registry/.eslintrc.js b/apps/registry/.eslintrc.js index c8df6075..03ee7431 100644 --- a/apps/registry/.eslintrc.js +++ b/apps/registry/.eslintrc.js @@ -1,4 +1,4 @@ module.exports = { root: true, - extends: ["custom"], + extends: ['custom'], }; diff --git a/apps/registry/lib/prisma.js b/apps/registry/lib/prisma.js index 720cc3cc..f918d98f 100644 --- a/apps/registry/lib/prisma.js +++ b/apps/registry/lib/prisma.js @@ -1,4 +1,4 @@ -import { PrismaClient } from "@prisma/client/edge"; +import { PrismaClient } from '@prisma/client/edge'; // PrismaClient is attached to the `global` object in development to prevent // exhausting your database connection limit. @@ -8,7 +8,7 @@ import { PrismaClient } from "@prisma/client/edge"; let prisma; -if (process.env.NODE_ENV === "production") { +if (process.env.NODE_ENV === 'production') { prisma = new PrismaClient(); } else { if (!global.prisma) { diff --git a/apps/registry/next.config.js b/apps/registry/next.config.js index f96f7d51..153c3577 100644 --- a/apps/registry/next.config.js +++ b/apps/registry/next.config.js @@ -1,27 +1,27 @@ module.exports = { reactStrictMode: true, - transpilePackages: ["ui"], + transpilePackages: ['ui'], async rewrites() { return [ { - source: "/:payload", - destination: "/api/:payload", + source: '/:payload', + destination: '/api/:payload', }, { - source: "/:payload/interview", - destination: "/interview", + source: '/:payload/interview', + destination: '/interview', }, { - source: "/:payload/jobs", - destination: "/jobs", + source: '/:payload/jobs', + destination: '/jobs', }, { - source: "/:payload/letter", - destination: "/letter", + source: '/:payload/letter', + destination: '/letter', }, { - source: "/:payload/suggestions", - destination: "/suggestions", + source: '/:payload/suggestions', + destination: '/suggestions', }, ]; }, diff --git a/apps/registry/pages/_document.js b/apps/registry/pages/_document.js index fc884584..07ab5684 100644 --- a/apps/registry/pages/_document.js +++ b/apps/registry/pages/_document.js @@ -1,6 +1,6 @@ // pages/_document.tsx file -import Document, { DocumentContext } from "next/document"; -import { ServerStyleSheet } from "styled-components"; +import Document, { DocumentContext } from 'next/document'; +import { ServerStyleSheet } from 'styled-components'; export default class MyDocument extends Document { static async getInitialProps(ctx) { const sheet = new ServerStyleSheet(); diff --git a/apps/registry/pages/api/[payload].js b/apps/registry/pages/api/[payload].js index 7a5a4ebd..ed18bc8a 100644 --- a/apps/registry/pages/api/[payload].js +++ b/apps/registry/pages/api/[payload].js @@ -1,41 +1,41 @@ -const sampleResume = require("./samples/resume"); -const find = require("lodash/find"); -const axios = require("axios"); -const Validator = require("jsonschema").Validator; -import schema from "./schema"; -import qr from "./formatters/qr"; -import template from "./formatters/template"; -import txt from "./formatters/text"; -import tex from "./formatters/tex"; -import json from "./formatters/json"; -import yaml from "./formatters/yaml"; - -const { Client } = require("pg"); +const sampleResume = require('./samples/resume'); +const find = require('lodash/find'); +const axios = require('axios'); +const Validator = require('jsonschema').Validator; +import schema from './schema'; +import qr from './formatters/qr'; +import template from './formatters/template'; +import txt from './formatters/text'; +import tex from './formatters/tex'; +import json from './formatters/json'; +import yaml from './formatters/yaml'; + +const { Client } = require('pg'); const GITHUB_TOKEN = process.env.GITHUB_TOKEN; -const FILE_TYPES = new Set(["qr", "json", "tex", "txt", "template", "yaml"]); +const FILE_TYPES = new Set(['qr', 'json', 'tex', 'txt', 'template', 'yaml']); const failMessage = (message) => { return ( message + - ", message @ajaxdavis on twitter if you need help (or tag me in your gist comments @thomasdavis" + ', message @ajaxdavis on twitter if you need help (or tag me in your gist comments @thomasdavis' ); }; export default async function handler(req, res) { const { theme, payload } = req.query; const v = new Validator(); - const payloadSplit = payload.split("."); + const payloadSplit = payload.split('.'); const username = payloadSplit[0]; - let fileType = "template"; + let fileType = 'template'; if (payloadSplit.length === 2) { fileType = payloadSplit[1]; } if (!FILE_TYPES.has(fileType)) { - return res.status(200).send(failMessage("not supported file type")); + return res.status(200).send(failMessage('not supported file type')); } const FORMATTERS = { @@ -50,24 +50,24 @@ export default async function handler(req, res) { const formatter = FORMATTERS[fileType]; if (!formatter) { - return res.status(200).send(failMessage("not supported formatted")); + return res.status(200).send(failMessage('not supported formatted')); } if ( [ - "favicon.ico", - "competition", - "stats", - "apple-touch-icon.png", - "apple-touch-icon-precomposed.png", - "robots.txt", + 'favicon.ico', + 'competition', + 'stats', + 'apple-touch-icon.png', + 'apple-touch-icon-precomposed.png', + 'robots.txt', ].indexOf(username) !== -1 ) { return res.send(null); } let gistId; - console.log("Fetching gistId"); + console.log('Fetching gistId'); console.log(`https://api.github.com/users/${username}/gists`); let gistData = {}; @@ -77,26 +77,26 @@ export default async function handler(req, res) { `https://api.github.com/users/${username}/gists?per_page=100`, { headers: { - Authorization: "Bearer " + GITHUB_TOKEN, + Authorization: 'Bearer ' + GITHUB_TOKEN, }, } ); } catch (e) { console.log(e); - return res.send(failMessage("This is not a valid Github username")); + return res.send(failMessage('This is not a valid Github username')); } if (!gistData.data) { - return res.send(failMessage("This is not a valid Github username")); + return res.send(failMessage('This is not a valid Github username')); } const resumeUrl = find(gistData.data, (f) => { - return f.files["resume.json"]; + return f.files['resume.json']; }); if (!resumeUrl) { return res.send( - failMessage("You have no gists named resume.json or your gist is private") + failMessage('You have no gists named resume.json or your gist is private') ); } @@ -110,17 +110,17 @@ export default async function handler(req, res) { new Date().getTime(); resumeRes = await axios({ - method: "GET", - headers: { "content-type": "application/json" }, + method: 'GET', + headers: { 'content-type': 'application/json' }, url: fullResumeGistUrl, }); } catch (e) { // If gist url is invalid, flush the gistid in cache - return res.status(200).send(failMessage("Cannot fetch gist, no idea why")); + return res.status(200).send(failMessage('Cannot fetch gist, no idea why')); } let realTheme = - theme || (resumeRes.data.meta && resumeRes.data.meta.theme) || "flat"; + theme || (resumeRes.data.meta && resumeRes.data.meta.theme) || 'flat'; realTheme = realTheme.toLowerCase(); @@ -129,7 +129,7 @@ export default async function handler(req, res) { if (!validation.valid) { return res.status(200).send( - failMessage("Validation failed") + + failMessage('Validation failed') + ` Your resume does not conform to the schema, visit https://jsonresume.org/schema/ to double check why. But the error message below should contain all the information you need. @@ -157,14 +157,14 @@ ${JSON.stringify(validation.errors, null, 2)} [username, JSON.stringify(selectedResume)] ); } catch (err) { - console.error("error executing query:", err); + console.error('error executing query:', err); } finally { client.end(); } })(); const options = { ...req.query, theme: realTheme, username }; - let formatted = ""; + let formatted = ''; try { formatted = await formatter.format(selectedResume, options); } catch (e) { @@ -173,7 +173,7 @@ ${JSON.stringify(validation.errors, null, 2)} .status(200) .send( failMessage( - "Cannot format resume, no idea why #likely-a-validation-error" + 'Cannot format resume, no idea why #likely-a-validation-error' ) ); } diff --git a/apps/registry/pages/api/formatters/qr.js b/apps/registry/pages/api/formatters/qr.js index f6b0c807..713befb8 100644 --- a/apps/registry/pages/api/formatters/qr.js +++ b/apps/registry/pages/api/formatters/qr.js @@ -1,9 +1,9 @@ -import qr from "qr-image"; +import qr from 'qr-image'; export const format = async function format(resume, { username }) { - const code = qr.image("https://registry.jsonresume.org/" + username, { - type: "png", - ec_level: "S", + const code = qr.image('https://registry.jsonresume.org/' + username, { + type: 'png', + ec_level: 'S', size: 60, margin: 1, }); @@ -12,8 +12,8 @@ export const format = async function format(resume, { username }) { content: code, headers: [ { - key: "Content-Type", - value: "image/png", + key: 'Content-Type', + value: 'image/png', }, ], }; diff --git a/apps/registry/pages/api/formatters/template.js b/apps/registry/pages/api/formatters/template.js index 420c2ec4..be2f0ae9 100644 --- a/apps/registry/pages/api/formatters/template.js +++ b/apps/registry/pages/api/formatters/template.js @@ -1,71 +1,71 @@ export const THEMES = { - ace: require("jsonresume-theme-ace"), - actual: require("jsonresume-theme-actual"), - apage: require("jsonresume-theme-apage"), - autumn: require("jsonresume-theme-autumn"), - caffeine: require("jsonresume-theme-caffeine"), - class: require("jsonresume-theme-class"), - classy: require("jsonresume-theme-classy"), - cora: require("jsonresume-theme-cora"), - compact: require("jsonresume-theme-compact"), - contempo: require("jsonresume-theme-contempo"), - dave: require("jsonresume-theme-dave"), - direct: require("jsonresume-theme-direct"), - dinesh: require("jsonresume-theme-dinesh"), - elegant: require("jsonresume-theme-elegant"), - elite: require("jsonresume-theme-elite"), + ace: require('jsonresume-theme-ace'), + actual: require('jsonresume-theme-actual'), + apage: require('jsonresume-theme-apage'), + autumn: require('jsonresume-theme-autumn'), + caffeine: require('jsonresume-theme-caffeine'), + class: require('jsonresume-theme-class'), + classy: require('jsonresume-theme-classy'), + cora: require('jsonresume-theme-cora'), + compact: require('jsonresume-theme-compact'), + contempo: require('jsonresume-theme-contempo'), + dave: require('jsonresume-theme-dave'), + direct: require('jsonresume-theme-direct'), + dinesh: require('jsonresume-theme-dinesh'), + elegant: require('jsonresume-theme-elegant'), + elite: require('jsonresume-theme-elite'), // eloquent: require("jsonresume-theme-eloquent"), - "el-santo": require("jsonresume-theme-el-santo"), - even: require("jsonresume-theme-even"), - flat: require("jsonresume-theme-flat"), - "flat-fr": require("jsonresume-theme-flat-fr"), - fresh: require("jsonresume-theme-fresh"), - full: require("jsonresume-theme-full"), - joeytall: require("jsonresume-theme-joeytall"), - github: require("jsonresume-theme-github"), - github2: require("jsonresume-theme-github2"), - jacrys: require("jsonresume-theme-jacrys"), - kards: require("jsonresume-theme-kards"), - keloran: require("jsonresume-theme-keloran"), - kendall: require("jsonresume-theme-kendall"), - macchiato: require("jsonresume-theme-macchiato"), - mantra: require("jsonresume-theme-mantra"), - "mocha-responsive": require("jsonresume-theme-mocha-responsive"), - minyma: require("jsonresume-theme-minyma"), - modern: require("jsonresume-theme-modern"), - msresume: require("jsonresume-theme-msresume"), - one: require("jsonresume-theme-one"), - onepage: require("jsonresume-theme-onepage"), - "onepage-plus": require("jsonresume-theme-onepage-plus"), - "onepage-efficient": require("jsonresume-theme-onepage-efficient"), - onepageresume: require("jsonresume-theme-onepageresume"), - orbit: require("jsonresume-theme-orbit"), - riga: require("jsonresume-theme-riga"), - paper: require("jsonresume-theme-paper"), - "paper-plus-plus": require("jsonresume-theme-paper-plus-plus"), - papirus: require("jsonresume-theme-papirus"), - pumpkin: require("jsonresume-theme-pumpkin"), - rocketspacer: require("jsonresume-theme-rocketspacer"), - short: require("jsonresume-theme-short"), - "simple-red": require("jsonresume-theme-simple-red"), - resu: require("jsonresume-theme-resu"), - rickosborne: require("jsonresume-theme-rickosborne"), - slick: require("jsonresume-theme-slick"), - sceptile: require("jsonresume-theme-sceptile"), - simple: require("jsonresume-theme-simple"), - spartacus: require("jsonresume-theme-spartacus"), - "timeline-fixed": require("jsonresume-theme-timeline-fixed"), - spartan: require("jsonresume-theme-spartan"), - srt: require("jsonresume-theme-srt"), - stackoverflowed: require("jsonresume-theme-stackoverflowed"), - stackoverflow: require("jsonresume-theme-stackoverflow"), - standard: require("jsonresume-theme-standard"), - "standard-resume": require("jsonresume-theme-standard-resume"), - "tachyons-clean": require("jsonresume-theme-tachyons-clean"), - "tan-responsive": require("jsonresume-theme-tan-responsive"), - techlead: require("jsonresume-theme-techlead"), - verbum: require("jsonresume-theme-verbum"), - wraypro: require("jsonresume-theme-wraypro"), + 'el-santo': require('jsonresume-theme-el-santo'), + even: require('jsonresume-theme-even'), + flat: require('jsonresume-theme-flat'), + 'flat-fr': require('jsonresume-theme-flat-fr'), + fresh: require('jsonresume-theme-fresh'), + full: require('jsonresume-theme-full'), + joeytall: require('jsonresume-theme-joeytall'), + github: require('jsonresume-theme-github'), + github2: require('jsonresume-theme-github2'), + jacrys: require('jsonresume-theme-jacrys'), + kards: require('jsonresume-theme-kards'), + keloran: require('jsonresume-theme-keloran'), + kendall: require('jsonresume-theme-kendall'), + macchiato: require('jsonresume-theme-macchiato'), + mantra: require('jsonresume-theme-mantra'), + 'mocha-responsive': require('jsonresume-theme-mocha-responsive'), + minyma: require('jsonresume-theme-minyma'), + modern: require('jsonresume-theme-modern'), + msresume: require('jsonresume-theme-msresume'), + one: require('jsonresume-theme-one'), + onepage: require('jsonresume-theme-onepage'), + 'onepage-plus': require('jsonresume-theme-onepage-plus'), + 'onepage-efficient': require('jsonresume-theme-onepage-efficient'), + onepageresume: require('jsonresume-theme-onepageresume'), + orbit: require('jsonresume-theme-orbit'), + riga: require('jsonresume-theme-riga'), + paper: require('jsonresume-theme-paper'), + 'paper-plus-plus': require('jsonresume-theme-paper-plus-plus'), + papirus: require('jsonresume-theme-papirus'), + pumpkin: require('jsonresume-theme-pumpkin'), + rocketspacer: require('jsonresume-theme-rocketspacer'), + short: require('jsonresume-theme-short'), + 'simple-red': require('jsonresume-theme-simple-red'), + resu: require('jsonresume-theme-resu'), + rickosborne: require('jsonresume-theme-rickosborne'), + slick: require('jsonresume-theme-slick'), + sceptile: require('jsonresume-theme-sceptile'), + simple: require('jsonresume-theme-simple'), + spartacus: require('jsonresume-theme-spartacus'), + 'timeline-fixed': require('jsonresume-theme-timeline-fixed'), + spartan: require('jsonresume-theme-spartan'), + srt: require('jsonresume-theme-srt'), + stackoverflowed: require('jsonresume-theme-stackoverflowed'), + stackoverflow: require('jsonresume-theme-stackoverflow'), + standard: require('jsonresume-theme-standard'), + 'standard-resume': require('jsonresume-theme-standard-resume'), + 'tachyons-clean': require('jsonresume-theme-tachyons-clean'), + 'tan-responsive': require('jsonresume-theme-tan-responsive'), + techlead: require('jsonresume-theme-techlead'), + verbum: require('jsonresume-theme-verbum'), + wraypro: require('jsonresume-theme-wraypro'), }; const getTheme = (theme) => { @@ -74,13 +74,13 @@ const getTheme = (theme) => { } catch (e) { return { e: e.toString(), - error: "Theme is not supported.", + error: 'Theme is not supported.', }; } }; const format = async function (resume, options) { - const theme = options.theme ?? "elegant"; + const theme = options.theme ?? 'elegant'; const themeRenderer = getTheme(theme); const resumeHTML = themeRenderer.render(resume); @@ -88,12 +88,12 @@ const format = async function (resume, options) { content: resumeHTML, headers: [ { - key: "Cache-control", - value: "public, max-age=90", + key: 'Cache-control', + value: 'public, max-age=90', }, { - key: "Content-Type", - value: "text/html", + key: 'Content-Type', + value: 'text/html', }, ], }; diff --git a/apps/registry/pages/api/formatters/tex.js b/apps/registry/pages/api/formatters/tex.js index a23de8d0..6e6348f2 100644 --- a/apps/registry/pages/api/formatters/tex.js +++ b/apps/registry/pages/api/formatters/tex.js @@ -1,5 +1,5 @@ const format = async function format(resume) { - return { content: "Unsupported Latex", headers: [] }; + return { content: 'Unsupported Latex', headers: [] }; }; const exports = { format }; diff --git a/apps/registry/pages/api/formatters/text.js b/apps/registry/pages/api/formatters/text.js index 9e73046f..bf614afc 100644 --- a/apps/registry/pages/api/formatters/text.js +++ b/apps/registry/pages/api/formatters/text.js @@ -25,7 +25,7 @@ ${work.position} ${work.summary} -${(work.highlights ?? []).map((highlight) => `+ ${highlight}`).join("\n")} +${(work.highlights ?? []).map((highlight) => `+ ${highlight}`).join('\n')} ` )} @@ -44,7 +44,7 @@ ${volunteer.position} ${volunteer.summary} -${(volunteer.highlights ?? []).map((highlight) => `+ ${highlight}`).join("\n")} +${(volunteer.highlights ?? []).map((highlight) => `+ ${highlight}`).join('\n')} ` @@ -56,11 +56,11 @@ ${(volunteer.highlights ?? []).map((highlight) => `+ ${highlight}`).join("\n")} ============================ ${(resume.education ?? []).map( (education) => ` -${education.startDate} – ${education.endDate || ""} +${education.startDate} – ${education.endDate || ''} ${education.institution} ${education.area} - ${education.studyType} -${(education.courses ?? []).map((course) => `+ ${course}`).join("\n")} +${(education.courses ?? []).map((course) => `+ ${course}`).join('\n')} ` @@ -72,7 +72,7 @@ ${(education.courses ?? []).map((course) => `+ ${course}`).join("\n")} ============================ ${(resume.awards ?? []).map( (award) => ` -${award.title} – ${award.date || ""} +${award.title} – ${award.date || ''} ${award.awarder} ` @@ -85,7 +85,7 @@ ${award.awarder} ============================ ${(resume.certificates ?? []).map( (certificate) => ` -${certificate.name} – ${certificate.date || ""} +${certificate.name} – ${certificate.date || ''} ${certificate.issuer} @@ -100,7 +100,7 @@ PUBLICATIONS ============================ ${(resume.publications ?? []).map( (publication) => ` -${publication.name} – ${publication.date || ""} +${publication.name} – ${publication.date || ''} ${publication.issuer} ${publication.summary} @@ -120,10 +120,10 @@ ${(resume.skills ?? []) (skill) => ` ${skill.name} ------------- -${(skill.keywords ?? []).map((keyword) => `+ ${keyword}`).join("\n")} +${(skill.keywords ?? []).map((keyword) => `+ ${keyword}`).join('\n')} ` ) - .join("\n")} + .join('\n')} `; } return { content, headers: [] }; diff --git a/apps/registry/pages/api/formatters/yaml.js b/apps/registry/pages/api/formatters/yaml.js index ebcc5bbb..6273d834 100644 --- a/apps/registry/pages/api/formatters/yaml.js +++ b/apps/registry/pages/api/formatters/yaml.js @@ -1,5 +1,5 @@ const format = async function format(resume) { - const YAML = require("json-to-pretty-yaml"); + const YAML = require('json-to-pretty-yaml'); const content = YAML.stringify(resume); return { content, headers: [] }; }; diff --git a/apps/registry/pages/api/interview.js b/apps/registry/pages/api/interview.js index feaaef92..98691c35 100644 --- a/apps/registry/pages/api/interview.js +++ b/apps/registry/pages/api/interview.js @@ -1,12 +1,12 @@ -import { OpenAIStream } from "./openAIStream"; -import prisma from "../../lib/prisma"; +import { OpenAIStream } from './openAIStream'; +import prisma from '../../lib/prisma'; if (!process.env.OPENAI_API_KEY) { - throw new Error("Missing env var from OpenAI"); + throw new Error('Missing env var from OpenAI'); } export const config = { - runtime: "edge", + runtime: 'edge', }; const SYSTEM_PROMPT = { @@ -34,28 +34,28 @@ export default async function handler(req, res) { }); if (!prompt) { - return new Response("No prompt in the request", { status: 400 }); + return new Response('No prompt in the request', { status: 400 }); } // get resume from database const lastMessages = messages; - console.log("STUFF", { username, prompt, position, lastMessages }); + console.log('STUFF', { username, prompt, position, lastMessages }); let lastMessagesString = lastMessages .map((m) => { return `${m.position}: ${m.content}\n`; }) - .join("\n"); + .join('\n'); lastMessagesString += `${ - position === "candidate" ? "candidate" : "interviewer" + position === 'candidate' ? 'candidate' : 'interviewer' }:${prompt}\n`; lastMessagesString += `${ - position === "candidate" ? "interviewer" : "candidate" + position === 'candidate' ? 'interviewer' : 'candidate' }:`; const payload = { - model: "text-davinci-003", + model: 'text-davinci-003', prompt: [ SYSTEM_PROMPT[position], `For context, here is the resume in question: ${JSON.stringify(resume)}`, @@ -67,7 +67,7 @@ export default async function handler(req, res) { `, // position, - ].join("\n\n"), + ].join('\n\n'), prompt: ` ${SYSTEM_PROMPT[position]} For context, here is the resume in question: ${JSON.stringify(resume)} diff --git a/apps/registry/pages/api/jobs.js b/apps/registry/pages/api/jobs.js index 7ad3ebf1..e478f18e 100644 --- a/apps/registry/pages/api/jobs.js +++ b/apps/registry/pages/api/jobs.js @@ -1,9 +1,9 @@ -import { PineconeClient } from "@pinecone-database/pinecone"; -const { Configuration, OpenAIApi } = require("openai"); -const { Client } = require("pg"); +import { PineconeClient } from '@pinecone-database/pinecone'; +const { Configuration, OpenAIApi } = require('openai'); +const { Client } = require('pg'); if (!process.env.OPENAI_API_KEY) { - throw new Error("Missing env var from OpenAI"); + throw new Error('Missing env var from OpenAI'); } const configuration = new Configuration({ @@ -13,7 +13,7 @@ const configuration = new Configuration({ export default async function handler(req, res) { const openai = new OpenAIApi(configuration); - const indexName = "jsonresume-jobs"; + const indexName = 'jsonresume-jobs'; const pinecone = new PineconeClient(); const { username } = req.body; @@ -35,12 +35,12 @@ export default async function handler(req, res) { const index = await pinecone.Index(indexName); const completion1 = await openai.createEmbedding({ - model: "text-embedding-ada-002", + model: 'text-embedding-ada-002', input: JSON.stringify(resume), }); const desiredLength = 2048; - const namespace = "jsonresume_jobs"; + const namespace = 'jsonresume_jobs'; let embedding = completion1.data.data[0].embedding; diff --git a/apps/registry/pages/api/letter.js b/apps/registry/pages/api/letter.js index b66e0a2a..16e6f557 100644 --- a/apps/registry/pages/api/letter.js +++ b/apps/registry/pages/api/letter.js @@ -1,5 +1,5 @@ -const { Client } = require("pg"); -import { ChatGPTAPI } from "chatgpt"; +const { Client } = require('pg'); +import { ChatGPTAPI } from 'chatgpt'; export default async function handler(req, res) { const { username } = req.body; diff --git a/apps/registry/pages/api/openAIStream.js b/apps/registry/pages/api/openAIStream.js index af1f1989..0abe0e4c 100644 --- a/apps/registry/pages/api/openAIStream.js +++ b/apps/registry/pages/api/openAIStream.js @@ -2,7 +2,7 @@ import { createParser, ParsedEvent, ReconnectInterval, -} from "eventsource-parser"; +} from 'eventsource-parser'; export async function OpenAIStream(payload) { const encoder = new TextEncoder(); @@ -10,29 +10,29 @@ export async function OpenAIStream(payload) { let counter = 0; - const res = await fetch("https://api.openai.com/v1/completions", { + const res = await fetch('https://api.openai.com/v1/completions', { headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? ""}`, + 'Content-Type': 'application/json', + Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? ''}`, }, - method: "POST", + method: 'POST', body: JSON.stringify(payload), }); const stream = new ReadableStream({ async start(controller) { function onParse(event) { - if (event.type === "event") { + if (event.type === 'event') { const data = event.data; - if (data === "[DONE]") { + if (data === '[DONE]') { controller.close(); return; } try { const json = JSON.parse(data); - const text = json.choices[0].text || ""; + const text = json.choices[0].text || ''; if (counter < 2 && (text.match(/\n/) || []).length) { return; diff --git a/apps/registry/pages/api/resumes.js b/apps/registry/pages/api/resumes.js index ee548a5c..cd4a21bd 100644 --- a/apps/registry/pages/api/resumes.js +++ b/apps/registry/pages/api/resumes.js @@ -1,7 +1,7 @@ // @todo - shows a list of all cached github gists -const { Client } = require("pg"); -const gravatar = require("gravatar"); +const { Client } = require('pg'); +const gravatar = require('gravatar'); export default async function handler(req, res) { const client = new Client(process.env.DATABASE_URL_RAW); @@ -21,7 +21,7 @@ export default async function handler(req, res) { resume?.basics?.image || gravatar.url( resume?.basics?.email, - { s: "200", r: "x", d: "retro" }, + { s: '200', r: 'x', d: 'retro' }, true ), updated_at: row.updated_at, diff --git a/apps/registry/pages/api/samples/resume.js b/apps/registry/pages/api/samples/resume.js index ee56f450..ee747692 100644 --- a/apps/registry/pages/api/samples/resume.js +++ b/apps/registry/pages/api/samples/resume.js @@ -1,275 +1,275 @@ const resume = { meta: { - theme: "elegant", + theme: 'elegant', }, basics: { - name: "Thomas Davis", - label: "Web Developer", + name: 'Thomas Davis', + label: 'Web Developer', image: - "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4", + 'https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4', summary: "I'm a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am used to wearing many hats. I am a very product focussed developer who priotizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ", - website: "https://lordajax.com", - email: "thomasalwyndavis@gmail.com", + website: 'https://lordajax.com', + email: 'thomasalwyndavis@gmail.com', location: { - city: "Melbourne", - countryCode: "AU", + city: 'Melbourne', + countryCode: 'AU', }, profiles: [ { - username: "ajaxdavis", - url: "https://twitter.com/ajaxdavis", - network: "twitter", + username: 'ajaxdavis', + url: 'https://twitter.com/ajaxdavis', + network: 'twitter', }, { - url: "https://github.com/thomasdavis", - username: "thomasdavis", - network: "github", + url: 'https://github.com/thomasdavis', + username: 'thomasdavis', + network: 'github', }, ], }, education: [ { - endDate: "2009-12-12", - startDate: "2008-02-12", - area: "Software Engineering (incomplete)", - studyType: "Bachelors", - institution: "The University of Queensland", + endDate: '2009-12-12', + startDate: '2008-02-12', + area: 'Software Engineering (incomplete)', + studyType: 'Bachelors', + institution: 'The University of Queensland', }, ], references: [ { reference: - "Thomas was hired as a lead developer and, upon the leaving of our co-founder took over as CTO of Earbits. Thomas is, hands down, one of those A Players you hear of companies dying to hire. He is incredibly smart, not just at code but about everything from classical music to Chinese language and culture. Thomas is great to work with and, as a well established contributor to open source projects and several successful ventures, commands the respect of engineers at all levels. I would suggest doing anything you can to have him on your team.", - name: "Joey Flores, Co-founder and CEO of Earbits, Inc.", + 'Thomas was hired as a lead developer and, upon the leaving of our co-founder took over as CTO of Earbits. Thomas is, hands down, one of those A Players you hear of companies dying to hire. He is incredibly smart, not just at code but about everything from classical music to Chinese language and culture. Thomas is great to work with and, as a well established contributor to open source projects and several successful ventures, commands the respect of engineers at all levels. I would suggest doing anything you can to have him on your team.', + name: 'Joey Flores, Co-founder and CEO of Earbits, Inc.', }, { reference: "I've had the great pleasure of working with Thomas for the past three years at Earbits, and on a few side projects. Two years ago our CTO left on a moment's notice, Thomas saved our company by quickly stepping up to fill this role. He has been with our company through thick and thin and made serious personal sacrifices in order to help the company during tough times. He is a phenomenal hacker and a true team player. Highly recommended!", - name: "Yotam Rosenbaum, SVP of Operations, Earbits, Inc.", + name: 'Yotam Rosenbaum, SVP of Operations, Earbits, Inc.', }, { reference: - "Thomas is an extremely talented engineer with a very broad range of skills and experience. From being a thought leader in the front-end community via backbonetutorials.com and cdnjs.com, to designing and implementing the API for cdnjs.com, working with Thomas has been fantastic learning experience. Thomas is truly a full stack develop, and his work output is incredible. If there is any opportunity to work with Thomas, I take it. He is the definition of an A player.", - name: "Ryan Kirkman, Senior Software Engineer at Nerdwallet", + 'Thomas is an extremely talented engineer with a very broad range of skills and experience. From being a thought leader in the front-end community via backbonetutorials.com and cdnjs.com, to designing and implementing the API for cdnjs.com, working with Thomas has been fantastic learning experience. Thomas is truly a full stack develop, and his work output is incredible. If there is any opportunity to work with Thomas, I take it. He is the definition of an A player.', + name: 'Ryan Kirkman, Senior Software Engineer at Nerdwallet', }, { reference: - "On Thomas Davis... Hire this guy. Do not be fooled. Incredibly capable and fast. Plays well with others. Unbelievable at front-end work end programming but that is just the start. Visionary. Hire him before I do.", - name: "Greg Davis", + 'On Thomas Davis... Hire this guy. Do not be fooled. Incredibly capable and fast. Plays well with others. Unbelievable at front-end work end programming but that is just the start. Visionary. Hire him before I do.', + name: 'Greg Davis', }, ], skills: [ { keywords: [ - "HTML / JSX", - "SCSS / CSS / BEM / Styled Components", - "Javascript / Typescript", - "React / Next", - "Redux / Apollo", + 'HTML / JSX', + 'SCSS / CSS / BEM / Styled Components', + 'Javascript / Typescript', + 'React / Next', + 'Redux / Apollo', ], - level: "Senior", - name: "Frontend", + level: 'Senior', + name: 'Frontend', }, { - keywords: ["Node", "Ruby", "Python", "Postgres", "Redis", "Serverless"], - level: "Senior", - name: "Backend", + keywords: ['Node', 'Ruby', 'Python', 'Postgres', 'Redis', 'Serverless'], + level: 'Senior', + name: 'Backend', }, { - keywords: ["AWS", "G Cloud", "Heroku", "Caching"], - level: "Senior", - name: "Devops", + keywords: ['AWS', 'G Cloud', 'Heroku', 'Caching'], + level: 'Senior', + name: 'Devops', }, ], awards: [ { - title: "Defender of the Internet", - awarder: "Fight For The Future", + title: 'Defender of the Internet', + awarder: 'Fight For The Future', }, ], work: [ { summary: - "Tokenized is a Bitcoin wallet for issuing, managing and trading digital tokens. I built out the front end which was packaged as an electron app. It was a difficult frontend to build because we store the users keys locally and used them to sign transactions and contracts.", - website: "https://tokenized.com/", - name: "Tokenized", - location: "Melbourne", - position: "Senior Javascript Developer", - startDate: "2020-05-05", - highlights: ["React", "Redux", "SCSS", "Product"], + 'Tokenized is a Bitcoin wallet for issuing, managing and trading digital tokens. I built out the front end which was packaged as an electron app. It was a difficult frontend to build because we store the users keys locally and used them to sign transactions and contracts.', + website: 'https://tokenized.com/', + name: 'Tokenized', + location: 'Melbourne', + position: 'Senior Javascript Developer', + startDate: '2020-05-05', + highlights: ['React', 'Redux', 'SCSS', 'Product'], }, { summary: - "Blockbid is an Australian crypto currency exchange. I started off on the frontend but eventually became lead tech and worked on every moving piece of the exchange. I really enjoyed working with liquidity providers and connecting their platforms to help us achieve liquid markets.", - website: "https://platform.blockbid.io", - name: "Blockbid", - location: "Melbourne", - position: "Senior Javascript Developer", - startDate: "2018-03-01", - endDate: "2020-01-01", + 'Blockbid is an Australian crypto currency exchange. I started off on the frontend but eventually became lead tech and worked on every moving piece of the exchange. I really enjoyed working with liquidity providers and connecting their platforms to help us achieve liquid markets.', + website: 'https://platform.blockbid.io', + name: 'Blockbid', + location: 'Melbourne', + position: 'Senior Javascript Developer', + startDate: '2018-03-01', + endDate: '2020-01-01', highlights: [ - "React, Apollo, Styled Components", - "Node.js / Rails", - "Docker / Heroku / GCP", - "Used Figma for design and UX work", - "Optimizing markets with tens of millions of rows using SQL.", + 'React, Apollo, Styled Components', + 'Node.js / Rails', + 'Docker / Heroku / GCP', + 'Used Figma for design and UX work', + 'Optimizing markets with tens of millions of rows using SQL.', ], }, { highlights: [ - "Worked with Postgres, Redis and Dynamodb for storage.", - "Hosted on a mixture of Heroku Apps and EC2 servers.", - "Caching by Fastly and Cloudflare", - "Hybrid app supported on all platforms", + 'Worked with Postgres, Redis and Dynamodb for storage.', + 'Hosted on a mixture of Heroku Apps and EC2 servers.', + 'Caching by Fastly and Cloudflare', + 'Hybrid app supported on all platforms', ], summary: - "Built a very large and complex React / Redux application. It works on all platforms and has IOS/Android builds due to it being a PWA. (wrapped it in React Native though only implementing a WebView)", - website: "https://listium.com", + 'Built a very large and complex React / Redux application. It works on all platforms and has IOS/Android builds due to it being a PWA. (wrapped it in React Native though only implementing a WebView)', + website: 'https://listium.com', pinned: true, - name: "Listium", - position: "Developer", - startDate: "2016-01-01", - endDate: "2018-01-01", + name: 'Listium', + position: 'Developer', + startDate: '2016-01-01', + endDate: '2018-01-01', }, { highlights: [ - "Millions of sites use the CDN in production", + 'Millions of sites use the CDN in production', "Larger market share than Yahoo's, Microsoft's and Google's javascript content distribution networks", - "We serve hundreds of billions request a month", - "Contains over 3000 popular Javascript libraries", - "Millions of developers visit the site per year", + 'We serve hundreds of billions request a month', + 'Contains over 3000 popular Javascript libraries', + 'Millions of developers visit the site per year', ], pinned: true, summary: - "Following Google’s CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.", - website: "http://www.cdnjs.com", - name: "Cdnjs", - position: "Co-Founder", - startDate: "2011-01-08", + 'Following Google’s CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.', + website: 'http://www.cdnjs.com', + name: 'Cdnjs', + position: 'Co-Founder', + startDate: '2011-01-08', }, { highlights: [ - "Developed new tools for contacting congress", - "Brainstormed campaign ideas to raise maximum awareness about issues", - "Lots of social networking integration", + 'Developed new tools for contacting congress', + 'Brainstormed campaign ideas to raise maximum awareness about issues', + 'Lots of social networking integration', ], summary: "Hired to take EFF's campaigning to the next level by building an action centre in Ruby on Rails. The action centre is built around some large open source tools that lower the barrier to entry when contacting congress.", - website: "http://www.eff.org", - name: "Electronic Frontier Foundation", - position: "Developer", - startDate: "2014-04-01", - endDate: "2016-01-01", + website: 'http://www.eff.org', + name: 'Electronic Frontier Foundation', + position: 'Developer', + startDate: '2014-04-01', + endDate: '2016-01-01', }, { highlights: [ - "Managed a small team of developers and designers", - "Built the entire frontend application with Backbone.js", - "Transferred all of the infrastructure from Heroku to AWS", + 'Managed a small team of developers and designers', + 'Built the entire frontend application with Backbone.js', + 'Transferred all of the infrastructure from Heroku to AWS', ], summary: - "Started off as a front end developer but took on the role of CTO in early 2013. The application frontend is built with Javascript and organized as a single page application that talks to a collection of Rails web servers which are connected to MongoDB.", - website: "http://www.earbits.com", - name: "Earbits", - position: "CTO", - endDate: "2015-01-09", - startDate: "2013-03-08", + 'Started off as a front end developer but took on the role of CTO in early 2013. The application frontend is built with Javascript and organized as a single page application that talks to a collection of Rails web servers which are connected to MongoDB.', + website: 'http://www.earbits.com', + name: 'Earbits', + position: 'CTO', + endDate: '2015-01-09', + startDate: '2013-03-08', }, { highlights: [ - "This resume is built with JSON Resume", - "Over 3000 stars on Github", - "Community developed themes", - "Tens of thousands of users", + 'This resume is built with JSON Resume', + 'Over 3000 stars on Github', + 'Community developed themes', + 'Tens of thousands of users', ], summary: "JSON Resume is a community driven open source initiative to create a JSON based standard for resumes. There is no reason why there can't be a common standard for writing a resume that can be extended with an ecosystem of open source tools.", - website: "http://jsonresume.org", + website: 'http://jsonresume.org', pinned: true, - name: "JSON Resume", - position: "Founder", - startDate: "2014-04-01", + name: 'JSON Resume', + position: 'Founder', + startDate: '2014-04-01', }, { highlights: [ - "Generated 37,000,000 banner views", - "100, 000 phone calls to congress", - "500, 000 emails", - "250, 000 signatures", + 'Generated 37,000,000 banner views', + '100, 000 phone calls to congress', + '500, 000 emails', + '250, 000 signatures', ], summary: 'Worked on many politically charged campaigns against mass surveillance. Not only technically challenging work but also a lot of networking and getting my hands dirty with politics. Our biggest project was "TheDayWeFightBack"..', - website: "http://www.taskforce.is", - name: "Taskforce.is", - position: "Developer", - startDate: "2013-06-01", - endDate: "2016-01-01", + website: 'http://www.taskforce.is', + name: 'Taskforce.is', + position: 'Developer', + startDate: '2013-06-01', + endDate: '2016-01-01', }, { highlights: [ - "The site and blog combined have managed to receive over 200,000 visitors in 2014.", + 'The site and blog combined have managed to receive over 200,000 visitors in 2014.', ], summary: - "An international directory of civilian drone / UAV operators for hire. Services include aerial photography, aerial video, mapping, surveying, precision agriculture, real estate photography, remote inspections and infrared imaging. Our plan is to be the place to go when looking for UAV/Drone services. The website is built in Backbone.js and API is built with Node.js and Postgres. ", - website: "http://www.dronehire.org", - name: "Drone Hire", - position: "Co-Founder", - startDate: "2013-01-01", + 'An international directory of civilian drone / UAV operators for hire. Services include aerial photography, aerial video, mapping, surveying, precision agriculture, real estate photography, remote inspections and infrared imaging. Our plan is to be the place to go when looking for UAV/Drone services. The website is built in Backbone.js and API is built with Node.js and Postgres. ', + website: 'http://www.dronehire.org', + name: 'Drone Hire', + position: 'Co-Founder', + startDate: '2013-01-01', }, { highlights: [ - "Over two million unique visitors a year", - "25,000+ ebook downloads", - "300,000+ Youtube views", + 'Over two million unique visitors a year', + '25,000+ ebook downloads', + '300,000+ Youtube views', ], summary: - "I write tutorials and blog post regarding the popular Javascript framework Backbone.js. The tutorials cover a range of topics regarding front end development aimed at beginners, experts and anyone in between.", - website: "http://backbonetutorials.com", - name: "BackboneTutorials.com", - position: "Founder", - startDate: "2011-01-01", - endDate: "2014-01-01", + 'I write tutorials and blog post regarding the popular Javascript framework Backbone.js. The tutorials cover a range of topics regarding front end development aimed at beginners, experts and anyone in between.', + website: 'http://backbonetutorials.com', + name: 'BackboneTutorials.com', + position: 'Founder', + startDate: '2011-01-01', + endDate: '2014-01-01', }, { summary: - "Ephox is a worldwide company who is heavily involved with the development of TinyMce and enterprise editors. My primary role included building front-end widgets and applications. Worked on a major product using Backbone.js as a base. Heavily involved in UI/UX design and wire-framing. Also spend a lot of time designing API specifications and documentation.", - website: "http://ephox.com", - name: "Ephox", - position: "Front-end Developer", - endDate: "2012-06-01", - startDate: "2011-01-01", + 'Ephox is a worldwide company who is heavily involved with the development of TinyMce and enterprise editors. My primary role included building front-end widgets and applications. Worked on a major product using Backbone.js as a base. Heavily involved in UI/UX design and wire-framing. Also spend a lot of time designing API specifications and documentation.', + website: 'http://ephox.com', + name: 'Ephox', + position: 'Front-end Developer', + endDate: '2012-06-01', + startDate: '2011-01-01', }, ], interests: [ { - name: "Gardening", + name: 'Gardening', }, { - name: "Music / Jamming", + name: 'Music / Jamming', }, { - name: "Reading / Writing", + name: 'Reading / Writing', }, { - name: "Open Source", + name: 'Open Source', }, ], projects: [ { highlights: [ - "Millions of sites use the CDN in production", + 'Millions of sites use the CDN in production', "Larger market share than Yahoo's, Microsoft's and Google's javascript content distribution networks", - "We serve hundreds of billions request a month", - "Contains over 3000 popular Javascript libraries", - "Millions of developers visit the site per year", + 'We serve hundreds of billions request a month', + 'Contains over 3000 popular Javascript libraries', + 'Millions of developers visit the site per year', ], summary: - "Following Googles CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.", - website: "http://www.cdnjs.com", - name: "Cdnjs", - position: "Co-Founder", - startDate: "2011-01-08", + 'Following Googles CDN for jQuery, we decided to start a CDN for the less popular Javascript frameworks. The CDN is community moderated and open source on GitHub. We secured a partnership with Cloudflare who now supports the infrastructure.', + website: 'http://www.cdnjs.com', + name: 'Cdnjs', + position: 'Co-Founder', + startDate: '2011-01-08', }, ], }; diff --git a/apps/registry/pages/api/schema.js b/apps/registry/pages/api/schema.js index 2c540bed..7c1ffbc0 100644 --- a/apps/registry/pages/api/schema.js +++ b/apps/registry/pages/api/schema.js @@ -1,104 +1,104 @@ const schema = { - $schema: "http://json-schema.org/draft-04/schema#", + $schema: 'http://json-schema.org/draft-04/schema#', additionalProperties: false, definitions: { iso8601: { - type: "string", + type: 'string', description: - "Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04", + 'Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04', pattern: - "^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$", + '^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$', }, }, properties: { $schema: { - type: "string", + type: 'string', description: - "link to the version of the schema that can validate the resume", - format: "uri", + 'link to the version of the schema that can validate the resume', + format: 'uri', }, basics: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", + type: 'string', }, label: { - type: "string", - description: "e.g. Web Developer", + type: 'string', + description: 'e.g. Web Developer', }, image: { - type: "string", - description: "URL (as per RFC 3986) to a image in JPEG or PNG format", + type: 'string', + description: 'URL (as per RFC 3986) to a image in JPEG or PNG format', }, email: { - type: "string", - description: "e.g. thomas@gmail.com", - format: "email", + type: 'string', + description: 'e.g. thomas@gmail.com', + format: 'email', }, phone: { - type: "string", + type: 'string', description: - "Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923", + 'Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923', }, url: { - type: "string", + type: 'string', description: - "URL (as per RFC 3986) to your website, e.g. personal homepage", - format: "uri", + 'URL (as per RFC 3986) to your website, e.g. personal homepage', + format: 'uri', }, summary: { - type: "string", - description: "Write a short 2-3 sentence biography about yourself", + type: 'string', + description: 'Write a short 2-3 sentence biography about yourself', }, location: { - type: "object", + type: 'object', additionalProperties: true, properties: { address: { - type: "string", + type: 'string', description: - "To add multiple address lines, use \n. For example, 1234 Glücklichkeit Straße\nHinterhaus 5. Etage li.", + 'To add multiple address lines, use \n. For example, 1234 Glücklichkeit Straße\nHinterhaus 5. Etage li.', }, postalCode: { - type: "string", + type: 'string', }, city: { - type: "string", + type: 'string', }, countryCode: { - type: "string", - description: "code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN", + type: 'string', + description: 'code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN', }, region: { - type: "string", + type: 'string', description: - "The general region where you live. Can be a US state, or a province, for instance.", + 'The general region where you live. Can be a US state, or a province, for instance.', }, }, }, profiles: { - type: "array", + type: 'array', description: - "Specify any number of social networks that you participate in", + 'Specify any number of social networks that you participate in', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { network: { - type: "string", - description: "e.g. Facebook or Twitter", + type: 'string', + description: 'e.g. Facebook or Twitter', }, username: { - type: "string", - description: "e.g. neutralthoughts", + type: 'string', + description: 'e.g. neutralthoughts', }, url: { - type: "string", - description: "e.g. http://twitter.example.com/neutralthoughts", - format: "uri", + type: 'string', + description: 'e.g. http://twitter.example.com/neutralthoughts', + format: 'uri', }, }, }, @@ -106,387 +106,387 @@ const schema = { }, }, work: { - type: "array", + type: 'array', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. Facebook", + type: 'string', + description: 'e.g. Facebook', }, location: { - type: "string", - description: "e.g. Menlo Park, CA", + type: 'string', + description: 'e.g. Menlo Park, CA', }, description: { - type: "string", - description: "e.g. Social Media Company", + type: 'string', + description: 'e.g. Social Media Company', }, position: { - type: "string", - description: "e.g. Software Engineer", + type: 'string', + description: 'e.g. Software Engineer', }, url: { - type: "string", - description: "e.g. http://facebook.example.com", - format: "uri", + type: 'string', + description: 'e.g. http://facebook.example.com', + format: 'uri', }, startDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, endDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, summary: { - type: "string", + type: 'string', description: - "Give an overview of your responsibilities at the company", + 'Give an overview of your responsibilities at the company', }, highlights: { - type: "array", - description: "Specify multiple accomplishments", + type: 'array', + description: 'Specify multiple accomplishments', additionalItems: false, items: { - type: "string", + type: 'string', description: - "e.g. Increased profits by 20% from 2011-2012 through viral advertising", + 'e.g. Increased profits by 20% from 2011-2012 through viral advertising', }, }, }, }, }, volunteer: { - type: "array", + type: 'array', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { organization: { - type: "string", - description: "e.g. Facebook", + type: 'string', + description: 'e.g. Facebook', }, position: { - type: "string", - description: "e.g. Software Engineer", + type: 'string', + description: 'e.g. Software Engineer', }, url: { - type: "string", - description: "e.g. http://facebook.example.com", - format: "uri", + type: 'string', + description: 'e.g. http://facebook.example.com', + format: 'uri', }, startDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, endDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, summary: { - type: "string", + type: 'string', description: - "Give an overview of your responsibilities at the company", + 'Give an overview of your responsibilities at the company', }, highlights: { - type: "array", - description: "Specify accomplishments and achievements", + type: 'array', + description: 'Specify accomplishments and achievements', additionalItems: false, items: { - type: "string", + type: 'string', description: - "e.g. Increased profits by 20% from 2011-2012 through viral advertising", + 'e.g. Increased profits by 20% from 2011-2012 through viral advertising', }, }, }, }, }, education: { - type: "array", + type: 'array', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { institution: { - type: "string", - description: "e.g. Massachusetts Institute of Technology", + type: 'string', + description: 'e.g. Massachusetts Institute of Technology', }, url: { - type: "string", - description: "e.g. http://facebook.example.com", - format: "uri", + type: 'string', + description: 'e.g. http://facebook.example.com', + format: 'uri', }, area: { - type: "string", - description: "e.g. Arts", + type: 'string', + description: 'e.g. Arts', }, studyType: { - type: "string", - description: "e.g. Bachelor", + type: 'string', + description: 'e.g. Bachelor', }, startDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, endDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, score: { - type: "string", - description: "grade point average, e.g. 3.67/4.0", + type: 'string', + description: 'grade point average, e.g. 3.67/4.0', }, courses: { - type: "array", - description: "List notable courses/subjects", + type: 'array', + description: 'List notable courses/subjects', additionalItems: false, items: { - type: "string", - description: "e.g. H1302 - Introduction to American history", + type: 'string', + description: 'e.g. H1302 - Introduction to American history', }, }, }, }, }, awards: { - type: "array", + type: 'array', description: - "Specify any awards you have received throughout your professional career", + 'Specify any awards you have received throughout your professional career', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { title: { - type: "string", - description: "e.g. One of the 100 greatest minds of the century", + type: 'string', + description: 'e.g. One of the 100 greatest minds of the century', }, date: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, awarder: { - type: "string", - description: "e.g. Time Magazine", + type: 'string', + description: 'e.g. Time Magazine', }, summary: { - type: "string", - description: "e.g. Received for my work with Quantum Physics", + type: 'string', + description: 'e.g. Received for my work with Quantum Physics', }, }, }, }, certificates: { - type: "array", + type: 'array', description: - "Specify any certificates you have received throughout your professional career", + 'Specify any certificates you have received throughout your professional career', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. Certified Kubernetes Administrator", + type: 'string', + description: 'e.g. Certified Kubernetes Administrator', }, date: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, url: { - type: "string", - description: "e.g. http://example.com", - format: "uri", + type: 'string', + description: 'e.g. http://example.com', + format: 'uri', }, issuer: { - type: "string", - description: "e.g. CNCF", + type: 'string', + description: 'e.g. CNCF', }, }, }, }, publications: { - type: "array", - description: "Specify your publications through your career", + type: 'array', + description: 'Specify your publications through your career', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. The World Wide Web", + type: 'string', + description: 'e.g. The World Wide Web', }, publisher: { - type: "string", - description: "e.g. IEEE, Computer Magazine", + type: 'string', + description: 'e.g. IEEE, Computer Magazine', }, releaseDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, url: { - type: "string", + type: 'string', description: - "e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html", - format: "uri", + 'e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html', + format: 'uri', }, summary: { - type: "string", + type: 'string', description: - "Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML.", + 'Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML.', }, }, }, }, skills: { - type: "array", - description: "List out your professional skill-set", + type: 'array', + description: 'List out your professional skill-set', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. Web Development", + type: 'string', + description: 'e.g. Web Development', }, level: { - type: "string", - description: "e.g. Master", + type: 'string', + description: 'e.g. Master', }, keywords: { - type: "array", - description: "List some keywords pertaining to this skill", + type: 'array', + description: 'List some keywords pertaining to this skill', additionalItems: false, items: { - type: "string", - description: "e.g. HTML", + type: 'string', + description: 'e.g. HTML', }, }, }, }, }, languages: { - type: "array", - description: "List any other languages you speak", + type: 'array', + description: 'List any other languages you speak', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { language: { - type: "string", - description: "e.g. English, Spanish", + type: 'string', + description: 'e.g. English, Spanish', }, fluency: { - type: "string", - description: "e.g. Fluent, Beginner", + type: 'string', + description: 'e.g. Fluent, Beginner', }, }, }, }, interests: { - type: "array", + type: 'array', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. Philosophy", + type: 'string', + description: 'e.g. Philosophy', }, keywords: { - type: "array", + type: 'array', additionalItems: false, items: { - type: "string", - description: "e.g. Friedrich Nietzsche", + type: 'string', + description: 'e.g. Friedrich Nietzsche', }, }, }, }, }, references: { - type: "array", - description: "List references you have received", + type: 'array', + description: 'List references you have received', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. Timothy Cook", + type: 'string', + description: 'e.g. Timothy Cook', }, reference: { - type: "string", + type: 'string', description: - "e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing.", + 'e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing.', }, }, }, }, projects: { - type: "array", - description: "Specify career projects", + type: 'array', + description: 'Specify career projects', additionalItems: false, items: { - type: "object", + type: 'object', additionalProperties: true, properties: { name: { - type: "string", - description: "e.g. The World Wide Web", + type: 'string', + description: 'e.g. The World Wide Web', }, description: { - type: "string", + type: 'string', description: - "Short summary of project. e.g. Collated works of 2017.", + 'Short summary of project. e.g. Collated works of 2017.', }, highlights: { - type: "array", - description: "Specify multiple features", + type: 'array', + description: 'Specify multiple features', additionalItems: false, items: { - type: "string", - description: "e.g. Directs you close but not quite there", + type: 'string', + description: 'e.g. Directs you close but not quite there', }, }, keywords: { - type: "array", - description: "Specify special elements involved", + type: 'array', + description: 'Specify special elements involved', additionalItems: false, items: { - type: "string", - description: "e.g. AngularJS", + type: 'string', + description: 'e.g. AngularJS', }, }, startDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, endDate: { - $ref: "#/definitions/iso8601", + $ref: '#/definitions/iso8601', }, url: { - type: "string", - format: "uri", + type: 'string', + format: 'uri', description: - "e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html", + 'e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html', }, roles: { - type: "array", - description: "Specify your role on this project or in company", + type: 'array', + description: 'Specify your role on this project or in company', additionalItems: false, items: { - type: "string", - description: "e.g. Team Lead, Speaker, Writer", + type: 'string', + description: 'e.g. Team Lead, Speaker, Writer', }, }, entity: { - type: "string", + type: 'string', description: "Specify the relevant company/entity affiliations e.g. 'greenpeace', 'corporationXYZ'", }, type: { - type: "string", + type: 'string', description: " e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'", }, @@ -494,30 +494,30 @@ const schema = { }, }, meta: { - type: "object", + type: 'object', description: - "The schema version and any other tooling configuration lives here", + 'The schema version and any other tooling configuration lives here', additionalProperties: true, properties: { canonical: { - type: "string", + type: 'string', description: - "URL (as per RFC 3986) to latest version of this document", - format: "uri", + 'URL (as per RFC 3986) to latest version of this document', + format: 'uri', }, version: { - type: "string", - description: "A version field which follows semver - e.g. v1.0.0", + type: 'string', + description: 'A version field which follows semver - e.g. v1.0.0', }, lastModified: { - type: "string", - description: "Using ISO 8601 with YYYY-MM-DDThh:mm:ss", + type: 'string', + description: 'Using ISO 8601 with YYYY-MM-DDThh:mm:ss', }, }, }, }, - title: "Resume Schema", - type: "object", + title: 'Resume Schema', + type: 'object', }; export default schema; diff --git a/apps/registry/pages/api/suggestions.js b/apps/registry/pages/api/suggestions.js index b0e9374c..f7974448 100644 --- a/apps/registry/pages/api/suggestions.js +++ b/apps/registry/pages/api/suggestions.js @@ -1,5 +1,5 @@ -const { Client } = require("pg"); -import { ChatGPTAPI } from "chatgpt"; +const { Client } = require('pg'); +import { ChatGPTAPI } from 'chatgpt'; export default async function handler(req, res) { const { username } = req.body; diff --git a/apps/registry/pages/api/themes.js b/apps/registry/pages/api/themes.js index 6f1223b0..73b4cb13 100644 --- a/apps/registry/pages/api/themes.js +++ b/apps/registry/pages/api/themes.js @@ -1,4 +1,4 @@ -const { THEMES } = require("./formatters/template"); +const { THEMES } = require('./formatters/template'); export default async function handler(req, res) { const themes = {}; diff --git a/apps/registry/pages/debug.js b/apps/registry/pages/debug.js index 89cf5b8b..33c27fbe 100644 --- a/apps/registry/pages/debug.js +++ b/apps/registry/pages/debug.js @@ -1,6 +1,6 @@ -import { Button } from "ui"; -import { Resume } from "jsonresume-theme-standard"; -import resume from "./api/samples/resume"; +import { Button } from 'ui'; +import { Resume } from 'jsonresume-theme-standard'; +import resume from './api/samples/resume'; export default function Talk() { // @todo - used to render react templates (purely debug stuff at the moment) return ( diff --git a/apps/registry/pages/interview.js b/apps/registry/pages/interview.js index 3c623d56..7a7237d6 100644 --- a/apps/registry/pages/interview.js +++ b/apps/registry/pages/interview.js @@ -1,10 +1,10 @@ -import { Button } from "ui"; -import styled from "styled-components"; -import { useRouter } from "next/router"; -import { useEffect, useRef, useState } from "react"; -import { faker } from "@faker-js/faker"; -import { v4 as uuidv4 } from "uuid"; -import Layout from "../ui/Layout"; +import { Button } from 'ui'; +import styled from 'styled-components'; +import { useRouter } from 'next/router'; +import { useEffect, useRef, useState } from 'react'; +import { faker } from '@faker-js/faker'; +import { v4 as uuidv4 } from 'uuid'; +import Layout from '../ui/Layout'; function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); @@ -55,7 +55,7 @@ const Switch = styled.div` `; const Option = styled.div` - background-color: ${(props) => (props.active ? "#df4848" : "#999")}; + background-color: ${(props) => (props.active ? '#df4848' : '#999')}; width: 140px; cursor: pointer; height: 30px; @@ -63,7 +63,7 @@ const Option = styled.div` display: flex; justify-content: center; align-items: center; - color: ${(props) => (props.active ? "#fbfbfb" : "#222")}; + color: ${(props) => (props.active ? '#fbfbfb' : '#222')}; &:hover { background-color: #ea8989; } @@ -121,18 +121,18 @@ const Helper = styled.div` } `; -const INTERVIEWER = "interviewer"; -const CANDIDATE = "candidate"; +const INTERVIEWER = 'interviewer'; +const CANDIDATE = 'candidate'; -const interviewId = "axyz"; +const interviewId = 'axyz'; export default function Talk() { const router = useRouter(); - const parts = router.asPath.split("/"); + const parts = router.asPath.split('/'); const username = parts[1]; console.log({ username }); - const [text, setText] = useState(""); - const [reply, setReply] = useState(""); + const [text, setText] = useState(''); + const [reply, setReply] = useState(''); const [replying, setReplying] = useState(null); const [loading, setLoading] = useState(false); const [showAbout, setShowAbout] = useState(false); @@ -142,9 +142,9 @@ export default function Talk() { position === CANDIDATE ? { position: INTERVIEWER, - content: "Hello, I am here to interview you", + content: 'Hello, I am here to interview you', } - : { position: CANDIDATE, content: "Hi, I am ready to be interviewed" }; + : { position: CANDIDATE, content: 'Hi, I am ready to be interviewed' }; const [messages, setMessages] = useState([initialMessage]); const bottomRef = useRef(null); @@ -157,7 +157,7 @@ export default function Talk() { const postMessage = async () => { setReplying(true); - console.log("what is the value of text", text); + console.log('what is the value of text', text); // const message = { // id: uuidv4(), // content: faker.lorem.lines({ min: 1, max: 10 }), @@ -165,10 +165,10 @@ export default function Talk() { // setMessages([...messages, message]); const prompt = text; - const response = await fetch("/api/interview", { - method: "POST", + const response = await fetch('/api/interview', { + method: 'POST', headers: { - "Content-Type": "application/json", + 'Content-Type': 'application/json', }, body: JSON.stringify({ username, @@ -192,7 +192,7 @@ export default function Talk() { const decoder = new TextDecoder(); let done = false; - let reply = ""; + let reply = ''; while (!done) { const { value, done: doneReading } = await reader.read(); done = doneReading; @@ -200,15 +200,15 @@ export default function Talk() { reply = reply + chunkValue; setReply(reply); } - console.log("set reply"); + console.log('set reply'); console.log({ reply }); - console.log("sdasdasda", { messages }); + console.log('sdasdasda', { messages }); setReplying(false); }; useEffect(() => { - if (replying !== null && reply !== "") { + if (replying !== null && reply !== '') { setMessages([ ...messages, { @@ -217,7 +217,7 @@ export default function Talk() { position: position === INTERVIEWER ? CANDIDATE : INTERVIEWER, }, ]); - setReply(""); + setReply(''); textInput?.current?.focus(); } }, [messages, position, reply, replying]); @@ -229,8 +229,8 @@ export default function Talk() { }; const handleInputKeyPress = (ev) => { - if (ev.key === "Enter") { - console.log("do validate"); + if (ev.key === 'Enter') { + console.log('do validate'); setMessages([ ...messages, { @@ -240,12 +240,12 @@ export default function Talk() { }, ]); postMessage(); - setText(""); + setText(''); } }; const onShowAbout = () => { - console.log("show about"); + console.log('show about'); // toggle showAbout setShowAbout(!showAbout); }; @@ -254,7 +254,7 @@ export default function Talk() { useEffect(() => { // 👇️ scroll to bottom every time messages change - bottomRef.current?.scrollIntoView({ behavior: "smooth" }); + bottomRef.current?.scrollIntoView({ behavior: 'smooth' }); }, [messages]); return ( @@ -274,7 +274,7 @@ export default function Talk() { {messages.map((message) => { return ( <Message key={message.id}> - <Name>{capitalizeFirstLetter(message.position)}:</Name>{" "} + <Name>{capitalizeFirstLetter(message.position)}:</Name>{' '} {message.content} </Message> ); @@ -286,7 +286,7 @@ export default function Talk() { position === INTERVIEWER ? CANDIDATE : INTERVIEWER )} : - </Name>{" "} + </Name>{' '} {reply} </Message> )} @@ -319,7 +319,7 @@ export default function Talk() { onChange={handleInputChange} onKeyPress={handleInputKeyPress} disabled={replying} - value={replying ? "Thinking..." : text} + value={replying ? 'Thinking...' : text} ref={textInput} /> </InputContainer> diff --git a/apps/registry/pages/jobs.js b/apps/registry/pages/jobs.js index dd862457..df4c35b1 100644 --- a/apps/registry/pages/jobs.js +++ b/apps/registry/pages/jobs.js @@ -1,10 +1,10 @@ -import styled from "styled-components"; -import { useRouter } from "next/router"; -import { useEffect, useRef, useState } from "react"; -import axios from "axios"; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; -import ReactMarkdown from "react-markdown"; -import Layout from "../ui/Layout"; +import styled from 'styled-components'; +import { useRouter } from 'next/router'; +import { useEffect, useRef, useState } from 'react'; +import axios from 'axios'; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; +import ReactMarkdown from 'react-markdown'; +import Layout from '../ui/Layout'; function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); @@ -56,7 +56,7 @@ const Helper = styled.div` export default function Talk() { const router = useRouter(); - const parts = router.asPath.split("/"); + const parts = router.asPath.split('/'); const username = parts[1]; const [jobs, setJobs] = useState(null); @@ -64,12 +64,12 @@ export default function Talk() { useEffect(() => { const fetchData = async () => { try { - const response = await axios.post("/api/jobs", { + const response = await axios.post('/api/jobs', { username, }); setJobs(response.data); } catch (error) { - console.error("Error fetching data: ", error); + console.error('Error fetching data: ', error); } }; @@ -82,15 +82,15 @@ export default function Talk() { <Messages> {jobs && jobs.map((job) => { - let content = job.content.replace("<code>", ""); - content = job.content.replace("</code>", ""); - content = job.content.replace("<pre>", ""); - content = job.content.replace("</pre>", ""); + let content = job.content.replace('<code>', ''); + content = job.content.replace('</code>', ''); + content = job.content.replace('<pre>', ''); + content = job.content.replace('</pre>', ''); return ( <Message key={job.uuid}> <Name>{capitalizeFirstLetter(job.type)}</Name> <ReactMarkdown> - {NodeHtmlMarkdown.translate(content).replace("```", "")} + {NodeHtmlMarkdown.translate(content).replace('```', '')} </ReactMarkdown> </Message> ); diff --git a/apps/registry/pages/letter.js b/apps/registry/pages/letter.js index 7e7cff86..b3b9c31f 100644 --- a/apps/registry/pages/letter.js +++ b/apps/registry/pages/letter.js @@ -1,17 +1,17 @@ -import { Button } from "ui"; -import styled from "styled-components"; -import { useRouter } from "next/router"; -import { useEffect, useRef, useState } from "react"; -import { faker } from "@faker-js/faker"; -import { v4 as uuidv4 } from "uuid"; -import axios from "axios"; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; -import ReactMarkdown from "react-markdown"; -import Layout from "../ui/Layout"; +import { Button } from 'ui'; +import styled from 'styled-components'; +import { useRouter } from 'next/router'; +import { useEffect, useRef, useState } from 'react'; +import { faker } from '@faker-js/faker'; +import { v4 as uuidv4 } from 'uuid'; +import axios from 'axios'; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; +import ReactMarkdown from 'react-markdown'; +import Layout from '../ui/Layout'; export default function Letter() { const router = useRouter(); - const parts = router.asPath.split("/"); + const parts = router.asPath.split('/'); const username = parts[1]; const [letter, setLetter] = useState(null); @@ -19,12 +19,12 @@ export default function Letter() { useEffect(() => { const fetchData = async () => { try { - const response = await axios.post("/api/letter", { + const response = await axios.post('/api/letter', { username, }); setLetter(response.data); } catch (error) { - console.error("Error fetching data: ", error); + console.error('Error fetching data: ', error); } }; @@ -37,10 +37,10 @@ export default function Letter() { {letter && ( <pre style={{ - "white-space": "pre-wrap", - width: "60%", - margin: "auto", - "margin-top": "100px", + 'white-space': 'pre-wrap', + width: '60%', + margin: 'auto', + 'margin-top': '100px', }} > {letter} diff --git a/apps/registry/pages/resumes.js b/apps/registry/pages/resumes.js index c4f73d3d..66cee329 100644 --- a/apps/registry/pages/resumes.js +++ b/apps/registry/pages/resumes.js @@ -1,6 +1,6 @@ -import axios from "axios"; -import React, { useEffect, useState } from "react"; -import styled from "styled-components"; +import axios from 'axios'; +import React, { useEffect, useState } from 'react'; +import styled from 'styled-components'; const Image = styled.img` width: 200px; @@ -20,11 +20,11 @@ const Resumes = () => { useEffect(() => { const fetchData = async () => { try { - const response = await axios.get("/api/resumes"); + const response = await axios.get('/api/resumes'); console.log({ response }); setData(response.data); } catch (error) { - console.error("Error fetching data: ", error); + console.error('Error fetching data: ', error); } }; diff --git a/apps/registry/pages/suggestions.js b/apps/registry/pages/suggestions.js index a9aae1bb..a812a369 100644 --- a/apps/registry/pages/suggestions.js +++ b/apps/registry/pages/suggestions.js @@ -1,17 +1,17 @@ -import { Button } from "ui"; -import styled from "styled-components"; -import { useRouter } from "next/router"; -import { useEffect, useRef, useState } from "react"; -import { faker } from "@faker-js/faker"; -import { v4 as uuidv4 } from "uuid"; -import axios from "axios"; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; -import ReactMarkdown from "react-markdown"; -import Layout from "../ui/Layout"; +import { Button } from 'ui'; +import styled from 'styled-components'; +import { useRouter } from 'next/router'; +import { useEffect, useRef, useState } from 'react'; +import { faker } from '@faker-js/faker'; +import { v4 as uuidv4 } from 'uuid'; +import axios from 'axios'; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; +import ReactMarkdown from 'react-markdown'; +import Layout from '../ui/Layout'; export default function Talk() { const router = useRouter(); - const parts = router.asPath.split("/"); + const parts = router.asPath.split('/'); const username = parts[1]; const [suggestions, setSuggestions] = useState(null); @@ -19,12 +19,12 @@ export default function Talk() { useEffect(() => { const fetchData = async () => { try { - const response = await axios.post("/api/suggestions", { + const response = await axios.post('/api/suggestions', { username, }); setSuggestions(response.data); } catch (error) { - console.error("Error fetching data: ", error); + console.error('Error fetching data: ', error); } }; @@ -37,10 +37,10 @@ export default function Talk() { {suggestions && ( <pre style={{ - "white-space": "pre-wrap", - width: "60%", - margin: "auto", - "margin-top": "100px", + 'white-space': 'pre-wrap', + width: '60%', + margin: 'auto', + 'margin-top': '100px', }} > {suggestions} diff --git a/apps/registry/pages/themes.js b/apps/registry/pages/themes.js index e51fbf68..4da78fa7 100644 --- a/apps/registry/pages/themes.js +++ b/apps/registry/pages/themes.js @@ -1,6 +1,6 @@ -import axios from "axios"; -import React, { useEffect, useState } from "react"; -import styled from "styled-components"; +import axios from 'axios'; +import React, { useEffect, useState } from 'react'; +import styled from 'styled-components'; const Image = styled.img` width: 200px; @@ -20,10 +20,10 @@ const Resumes = () => { useEffect(() => { const fetchData = async () => { try { - const response = await axios.get("/api/themes"); + const response = await axios.get('/api/themes'); setData(response.data); } catch (error) { - console.error("Error fetching data: ", error); + console.error('Error fetching data: ', error); } }; diff --git a/apps/registry/ui/Layout.js b/apps/registry/ui/Layout.js index 7122fc9a..f1bbc1cd 100644 --- a/apps/registry/ui/Layout.js +++ b/apps/registry/ui/Layout.js @@ -1,13 +1,13 @@ -import { Button } from "ui"; -import styled from "styled-components"; -import { useRouter } from "next/router"; -import { useEffect, useRef, useState } from "react"; -import { faker } from "@faker-js/faker"; -import { v4 as uuidv4 } from "uuid"; -import axios from "axios"; -import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from "node-html-markdown"; -import ReactMarkdown from "react-markdown"; -import Link from "next/link"; +import { Button } from 'ui'; +import styled from 'styled-components'; +import { useRouter } from 'next/router'; +import { useEffect, useRef, useState } from 'react'; +import { faker } from '@faker-js/faker'; +import { v4 as uuidv4 } from 'uuid'; +import axios from 'axios'; +import { NodeHtmlMarkdown, NodeHtmlMarkdownOptions } from 'node-html-markdown'; +import ReactMarkdown from 'react-markdown'; +import Link from 'next/link'; const Container = styled.div` height: 100vh; @@ -68,7 +68,7 @@ const Links = styled.div` `; export default function Layout({ children }) { const router = useRouter(); - const parts = router.asPath.split("/"); + const parts = router.asPath.split('/'); const username = parts[1]; const onShowAbout = () => {}; @@ -116,7 +116,7 @@ export default function Layout({ children }) { margin: 0px; padding: 0px; background-color: #f5f5f5; - font-family: "Open Sans", sans-serif; + font-family: 'Open Sans', sans-serif; } `}</style> </> diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js index c9523f13..be29b482 100644 --- a/packages/eslint-config-custom/index.js +++ b/packages/eslint-config-custom/index.js @@ -1,11 +1,11 @@ module.exports = { - extends: ["next", "turbo", "prettier"], + extends: ['next', 'turbo', 'prettier'], rules: { - "@next/next/no-html-link-for-pages": "off", + '@next/next/no-html-link-for-pages': 'off', }, parserOptions: { babelOptions: { - presets: [require.resolve("next/babel")], + presets: [require.resolve('next/babel')], }, }, }; diff --git a/packages/jsonresume-theme-standard/src/index.js b/packages/jsonresume-theme-standard/src/index.js index eb3edf8d..3bf4dbd6 100644 --- a/packages/jsonresume-theme-standard/src/index.js +++ b/packages/jsonresume-theme-standard/src/index.js @@ -1,7 +1,7 @@ -import { renderToString } from "react-dom/server"; -import { ServerStyleSheet } from "styled-components"; -import Document from "./ui/Document"; -import Resume from "./ui/Resume"; +import { renderToString } from 'react-dom/server'; +import { ServerStyleSheet } from 'styled-components'; +import Document from './ui/Document'; +import Resume from './ui/Resume'; export const render = (resume) => { const sheet = new ServerStyleSheet(); diff --git a/packages/jsonresume-theme-standard/src/ui/Basics.js b/packages/jsonresume-theme-standard/src/ui/Basics.js index 9f7908b9..a3480290 100644 --- a/packages/jsonresume-theme-standard/src/ui/Basics.js +++ b/packages/jsonresume-theme-standard/src/ui/Basics.js @@ -1,5 +1,5 @@ -import styled from "styled-components"; -import SubTitle from "./SubTitle"; +import styled from 'styled-components'; +import SubTitle from './SubTitle'; const Title = styled.div` font-size: 34px; diff --git a/packages/jsonresume-theme-standard/src/ui/Date.js b/packages/jsonresume-theme-standard/src/ui/Date.js index 7ef4e1e1..5cf8e430 100644 --- a/packages/jsonresume-theme-standard/src/ui/Date.js +++ b/packages/jsonresume-theme-standard/src/ui/Date.js @@ -1,4 +1,4 @@ -import styled from "styled-components"; +import styled from 'styled-components'; const Text = styled.div` font-size: 16px; @@ -7,7 +7,7 @@ const Text = styled.div` const Date = ({ date }) => { // @todo - format date here - return <Text>{date ?? "Present"}</Text>; + return <Text>{date ?? 'Present'}</Text>; }; export default Date; diff --git a/packages/jsonresume-theme-standard/src/ui/DateRange.js b/packages/jsonresume-theme-standard/src/ui/DateRange.js index 756cbc55..3b4d5b1e 100644 --- a/packages/jsonresume-theme-standard/src/ui/DateRange.js +++ b/packages/jsonresume-theme-standard/src/ui/DateRange.js @@ -1,5 +1,5 @@ -import styled from "styled-components"; -import Date from "./Date"; +import styled from 'styled-components'; +import Date from './Date'; const Text = styled.div` font-size: 16px; diff --git a/packages/jsonresume-theme-standard/src/ui/List.js b/packages/jsonresume-theme-standard/src/ui/List.js index 67f7f193..e596e48c 100644 --- a/packages/jsonresume-theme-standard/src/ui/List.js +++ b/packages/jsonresume-theme-standard/src/ui/List.js @@ -1,4 +1,4 @@ -import styled from "styled-components"; +import styled from 'styled-components'; const Text = styled.div` font-size: 20px; diff --git a/packages/jsonresume-theme-standard/src/ui/Projects.js b/packages/jsonresume-theme-standard/src/ui/Projects.js index 621ab4cd..68ee4360 100644 --- a/packages/jsonresume-theme-standard/src/ui/Projects.js +++ b/packages/jsonresume-theme-standard/src/ui/Projects.js @@ -1,7 +1,7 @@ -import styled from "styled-components"; -import SubTitle from "./SubTitle"; -import List from "./List"; -import DateRange from "./DateRange"; +import styled from 'styled-components'; +import SubTitle from './SubTitle'; +import List from './List'; +import DateRange from './DateRange'; const Project = styled.div` font-size: 16px; diff --git a/packages/jsonresume-theme-standard/src/ui/Resume.js b/packages/jsonresume-theme-standard/src/ui/Resume.js index cfdbc231..45da01e7 100644 --- a/packages/jsonresume-theme-standard/src/ui/Resume.js +++ b/packages/jsonresume-theme-standard/src/ui/Resume.js @@ -1,7 +1,7 @@ -import styled from "styled-components"; -import Basics from "./Basics"; -import Work from "./Work"; -import Projects from "./Projects"; +import styled from 'styled-components'; +import Basics from './Basics'; +import Work from './Work'; +import Projects from './Projects'; const Layout = styled.div` max-width: 660px; diff --git a/packages/jsonresume-theme-standard/src/ui/SubTitle.js b/packages/jsonresume-theme-standard/src/ui/SubTitle.js index b8718486..7ac9adb4 100644 --- a/packages/jsonresume-theme-standard/src/ui/SubTitle.js +++ b/packages/jsonresume-theme-standard/src/ui/SubTitle.js @@ -1,4 +1,4 @@ -import styled from "styled-components"; +import styled from 'styled-components'; const Text = styled.div` font-size: 22px; diff --git a/packages/jsonresume-theme-standard/src/ui/Work.js b/packages/jsonresume-theme-standard/src/ui/Work.js index a134c680..7a486cb0 100644 --- a/packages/jsonresume-theme-standard/src/ui/Work.js +++ b/packages/jsonresume-theme-standard/src/ui/Work.js @@ -1,7 +1,7 @@ -import styled from "styled-components"; -import SubTitle from "./SubTitle"; -import List from "./List"; -import DateRange from "./DateRange"; +import styled from 'styled-components'; +import SubTitle from './SubTitle'; +import List from './List'; +import DateRange from './DateRange'; const Company = styled.div` font-size: 16px; diff --git a/packages/ui/Button.tsx b/packages/ui/Button.tsx index 3e5afc73..32bf2949 100644 --- a/packages/ui/Button.tsx +++ b/packages/ui/Button.tsx @@ -1,4 +1,4 @@ -import * as React from "react"; +import * as React from 'react'; export const Button = () => { return <button>Boop</button>; diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx index 916730e8..dcffc55f 100644 --- a/packages/ui/index.tsx +++ b/packages/ui/index.tsx @@ -1,2 +1,2 @@ -import * as React from "react"; -export * from "./Button"; +import * as React from 'react'; +export * from './Button'; diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3ff5faaa..e9b0dad6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: - - "apps/*" - - "packages/*" + - 'apps/*' + - 'packages/*'