From 316c696b6360d60a0235f1e195b0398d8cf7db8e Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Wed, 9 Nov 2022 13:17:39 +0800 Subject: [PATCH] [portal][misc] add US companies --- apps/portal/package.json | 2 + apps/portal/prisma/companies.csv | 265 +++++++++++++++++++++++++++ apps/portal/prisma/companySeed.ts | 19 -- apps/portal/prisma/seed-companies.ts | 37 ++++ apps/portal/prisma/seed.ts | 13 -- yarn.lock | 30 +++ 6 files changed, 334 insertions(+), 32 deletions(-) create mode 100644 apps/portal/prisma/companies.csv delete mode 100644 apps/portal/prisma/companySeed.ts create mode 100644 apps/portal/prisma/seed-companies.ts diff --git a/apps/portal/package.json b/apps/portal/package.json index bb6d52dc..0c6f66b9 100644 --- a/apps/portal/package.json +++ b/apps/portal/package.json @@ -13,6 +13,7 @@ "seed-salaries": "ts-node prisma/seed-salaries.ts", "seed-analysis": "ts-node prisma/seed-analysis.ts", "seed-questions": "ts-node prisma/seed-questions.ts", + "seed-companies": "ts-node prisma/seed-companies.ts", "map-internship-cycle": "ts-node prisma/map-internship-cycle.ts" }, "dependencies": { @@ -58,6 +59,7 @@ "@types/react-dom": "^18.0.6", "@types/react-pdf": "^5.7.2", "autoprefixer": "^10.4.12", + "csv": "^6.2.2", "postcss": "^8.4.16", "prettier-plugin-tailwindcss": "^0.1.13", "prisma": "^4.4.0", diff --git a/apps/portal/prisma/companies.csv b/apps/portal/prisma/companies.csv new file mode 100644 index 00000000..0e6aa030 --- /dev/null +++ b/apps/portal/prisma/companies.csv @@ -0,0 +1,265 @@ +name,slug,website,logoUrl,description,finalized +3forge,3forge,3forge.com,https://logo.clearbit.com/3forge.com,,TRUE +99.co,99.co,99.co,https://logo.clearbit.com/99.co,,TRUE +"Agency for Science, Technology and Research (A*Star) Singapore",a-star-sg,a-star.edu.sg,https://logo.clearbit.com/a-star.edu.sg,,TRUE +Accenture,accenture,accenture.com,https://logo.clearbit.com/accenture.com,,TRUE +Accuracy,accuracy,accuracy.com,https://logo.clearbit.com/accuracy.com,,TRUE +Acronis,acronis,acronis.com,https://logo.clearbit.com/acronis.com,,TRUE +Agoda,agoda,agoda.com,https://logo.clearbit.com/agoda.com,,TRUE +AlphaLab Capital,alphalab-capital,alphalab.capital,https://logo.clearbit.com/alphalab.capital,,TRUE +Alstom,alstom,alstom.com,https://logo.clearbit.com/alstom.com,,TRUE +Amaris AI Pte Ltd,amaris-ai-pte-ltd,amaris.ai,https://logo.clearbit.com/amaris.ai,,TRUE +Amazon,amazon,amazon.com,https://logo.clearbit.com/amazon.com,"Amazon.com, Inc. is an American multinational technology company that focuses on e-commerce, cloud computing, digital streaming, and artificial intelligence.",TRUE +Amazon Web Services,amazon-web-services,aws.amazon.com,https://logo.clearbit.com/aws.amazon.com,,TRUE +AMD,amd,amd.com,https://logo.clearbit.com/amd.com,,TRUE +Ant Group,ant-group,antgroup.com,https://logo.clearbit.com/antgroup.com,,TRUE +Apple,apple,apple.com,https://logo.clearbit.com/apple.com,"Apple Inc. is an American multinational technology company that specializes in consumer electronics, software and online services headquartered in Cupertino, California, United States.",TRUE +Ascenda,ascenda,ascendaloyalty.com,https://logo.clearbit.com/ascendaloyalty.com,,TRUE +Atome,atome,atome.sg,https://logo.clearbit.com/atome.sg,,TRUE +Autodesk,autodesk,autodesk.com,https://logo.clearbit.com/autodesk.com,,TRUE +Avanade,avanade,avanade.com,https://logo.clearbit.com/avanade.com,,TRUE +Bank of America,bank-of-america,bankofamerica.com,https://logo.clearbit.com/bankofamerica.com,,TRUE +Bank of Singapore,bank-of-singapore,bankofsingapore.com,https://logo.clearbit.com/bankofsingapore.com,,TRUE +betterdata,betterdata,betterdata.ai,https://logo.clearbit.com/betterdata.ai,,TRUE +Binance,binance,binance.com,https://logo.clearbit.com/binance.com,,TRUE +Bosch,bosch,bosch.com,https://logo.clearbit.com/bosch.com,,TRUE +ByteDance,bytedance,bytedance.com,https://logo.clearbit.com/bytedance.com,,TRUE +Carousell,carousell,carousell.com,https://logo.clearbit.com/carousell.com,,TRUE +Carro,carro,carro.sg,https://logo.clearbit.com/carro.sg,,TRUE +Circles.Life,circles.life,circles.life,https://logo.clearbit.com/circles.life,,TRUE +Cisco,cisco,cisco.com,https://logo.clearbit.com/cisco.com,,TRUE +Citadel,citadel,citadel.com,https://logo.clearbit.com/citadel.com,,TRUE +CitiBank,citibank,citibank.com,https://logo.clearbit.com/citibank.com,,TRUE +Cloudflare,cloudflare,cloudflare.com,https://logo.clearbit.com/cloudflare.com,,TRUE +Coinhako,coinhako,coinhako.com,https://logo.clearbit.com/coinhako.com,,TRUE +ComfortDelGro,comfortdelgro,comfortdelgro.com,https://logo.clearbit.com/comfortdelgro.com,,TRUE +Constructor,constructor,constructor.io,https://logo.clearbit.com/constructor.io,,TRUE +Continental,continental,continental.com,https://logo.clearbit.com/continental.com,,TRUE +Creative,creative,creative.com,https://logo.clearbit.com/creative.com,,TRUE +Credit Agricole,credit-agricole,ca-cib.com,https://logo.clearbit.com/ca-cib.com,,TRUE +Credit Suisse,credit-suisse,credit-suisse.com,https://logo.clearbit.com/credit-suisse.com,,TRUE +Crypto.com,crypto-com,crypto.com,https://logo.clearbit.com/crypto.com,,TRUE +CSIT,csit,csit.gov.sg,https://logo.clearbit.com/csit.gov.sg,,TRUE +Daiwa Capital Markets,daiwacm,daiwacm.com,https://logo.clearbit.com/daiwacm.com,,TRUE +DBS,dbs,dbs.com,https://logo.clearbit.com/dbs.com,,TRUE +Defence Science and Technology Agency (DSTA),dsta,dsta.gov.sg,https://logo.clearbit.com/dsta.gov.sg,,TRUE +Dell,dell,dell.com,https://logo.clearbit.com/dell.com,,TRUE +Deloitte,deloitte,deloitte.com,https://logo.clearbit.com/deloitte.com,,TRUE +DHL,dhl,dhl.com,https://logo.clearbit.com/dhl.com,,TRUE +DRW,drw,drw.com,https://logo.clearbit.com/drw.com,,TRUE +DSO National Laboratories,dso-national-laboratories,www.dso.org.sg,https://logo.clearbit.com/www.dso.org.sg,,TRUE +Dyson,dyson,dyson.com,https://logo.clearbit.com/dyson.com,,TRUE +Energy Market Authority (EMA),energy-market-authority-(ema),ema.gov.sg,https://logo.clearbit.com/ema.gov.sg,,TRUE +Ensign InfoSecurity,ensign-infosecurity,ensigninfosecurity.com,https://logo.clearbit.com/ensigninfosecurity.com,,TRUE +Envision Digital,envision-digital,envision-digital.com,https://logo.clearbit.com/envision-digital.com,,TRUE +Equinix,equinix,equinix.com,https://logo.clearbit.com/equinix.com,,TRUE +Ernst and Young,ey,ey.com,https://logo.clearbit.com/ey.com,,TRUE +ExpressVPN,expressvpn,expressvpn.com,https://logo.clearbit.com/expressvpn.com,,TRUE +F5 Networks,f5,f5networks.com,https://logo.clearbit.com/f5networks.com,,TRUE +Foodpanda,foodpanda,foodpanda.com,https://logo.clearbit.com/foodpanda.com,,TRUE +Garena,garena,garena.com,https://logo.clearbit.com/garena.com,,TRUE +GIC Singapore,gic-singapore,gic.com.sg,https://logo.clearbit.com/gic.com.sg,,TRUE +GlobalFoundries,globalfoundries,globalfoundries.com,https://logo.clearbit.com/globalfoundries.com,,TRUE +Goldman Sachs,goldman-sachs,goldmansachs.com,https://logo.clearbit.com/goldmansachs.com,,TRUE +Google,google,google.com,https://logo.clearbit.com/google.com,"Google LLC is an American multinational technology company that focuses on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics.",TRUE +GovTech Singapore,govtech-singapore,tech.gov.sg,https://logo.clearbit.com/tech.gov.sg,,TRUE +Grab,grab,grab.com,https://logo.clearbit.com/grab.com,,TRUE +Grasshopper,grasshopper,grasshopper.com,https://logo.clearbit.com/grasshopper.com,,TRUE +Hewlett Packard (HP),hp,hp.com,https://logo.clearbit.com/hp.com,,TRUE +Hitachi Vantara,hitachi-vantara,hitachivantara.com,https://logo.clearbit.com/hitachivantara.com,,TRUE +Hodlnaut,hodlnaut,hodlnaut.com,https://logo.clearbit.com/hodlnaut.com,,TRUE +Home Team Science and Technology Agency Singapore,htx-sg,htx.gov.sg,https://logo.clearbit.com/htx.gov.sg,,TRUE +HOPE Technik,hope-technik,hopetechnik.com,https://logo.clearbit.com/hopetechnik.com,,TRUE +Housing Development Board (HDB) Singapore,hdb-sg,hdb.gov.sg,https://logo.clearbit.com/hdb.gov.sg,,TRUE +Huawei,huawei,huawei.com,https://logo.clearbit.com/huawei.com,,TRUE +Hypotenuse AI,hypotenuse-ai,hypotenuse.ai,https://logo.clearbit.com/hypotenuse.ai,,TRUE +IBM,ibm,ibm.com,https://logo.clearbit.com/ibm.com,,TRUE +IDEMIA,idemia,idemia.com,https://logo.clearbit.com/idemia.com,,TRUE +Illumina,illumina,illumina.com,https://logo.clearbit.com/illumina.com,,TRUE +Income (NTUC) Singapore,ntuc-income-sg,income.com.sg,https://logo.clearbit.com/income.com.sg,,TRUE +Indeed,indeed,indeed.com,https://logo.clearbit.com/indeed.com,,TRUE +Infineon,infineon,infineon.com,https://logo.clearbit.com/infineon.com,,TRUE +Infocomm Media Development Authority (IMDA) Singapore,imda-sg,imda.gov.sg,https://logo.clearbit.com/imda.gov.sg,,TRUE +Integrated Health Information Systems (IHIS) Singapore,ihis-sg,ihis.com.sg,https://logo.clearbit.com/ihis.com.sg,,TRUE +J.P. Morgan (JP Morgan),jp-morgan,jpmorgan.com,https://logo.clearbit.com/jpmorgan.com,,TRUE +Jane Street,jane-street,janestreet.com,https://logo.clearbit.com/janestreet.com,,TRUE +Johnson & Johnson,jnj,jnj.com,https://logo.clearbit.com/jnj.com,,TRUE +Jump Trading,jump-trading,jumptrading.com,https://logo.clearbit.com/jumptrading.com,,TRUE +KPMG,kpmg,kpmg.com,https://logo.clearbit.com/kpmg.com,,TRUE +Lazada,lazada,lazada.com,https://logo.clearbit.com/lazada.com,,TRUE +Mandiant,mandiant,mandiant.com,https://logo.clearbit.com/mandiant.com,,TRUE +Meta,meta,meta.com,https://logo.clearbit.com/meta.com,"Meta Platforms, Inc., doing business as Meta and formerly named Facebook, Inc., and TheFacebook, Inc., is an American multinational technology conglomerate based in Menlo Park, California. The company owns Facebook, Instagram, and WhatsApp, among other products and services.",TRUE +Micron,micron,micron.com,https://logo.clearbit.com/micron.com,,TRUE +Microsoft,microsoft,microsoft.com,https://logo.clearbit.com/microsoft.com,"Microsoft Corporation is an American multinational technology corporation which produces computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washington, United States.",TRUE +Millennium Management,mlp,mlp.com,https://logo.clearbit.com/mlp.com,,TRUE +Monetary Authority of Singapore,mas-sg,mas.gov.sg,https://logo.clearbit.com/mas.gov.sg,,TRUE +Morgan Stanley,morgan-stanley,morganstanley.com,https://logo.clearbit.com/morganstanley.com,,TRUE +Motional,motional,motional.com,https://logo.clearbit.com/motional.com,,TRUE +NCS,ncs,ncs.co,https://logo.clearbit.com/ncs.co,,TRUE +NE Digital (NTUC) Singapore,ne-digital-sg,nedigital.sg,https://logo.clearbit.com/nedigital.sg,,TRUE +Netflix,netflix,netflix.com,https://logo.clearbit.com/netflix.com,,TRUE +Ninja Van,ninja-van,ninjavan.co,https://logo.clearbit.com/ninjavan.co,,TRUE +OCBC,ocbc,ocbc.com,https://logo.clearbit.com/ocbc.com,,TRUE +Open Government Products (OGP),open-government-products-(ogp),ogp.gov.sg,https://logo.clearbit.com/ogp.gov.sg,,TRUE +Optiver,optiver,optiver.com,https://logo.clearbit.com/optiver.com,,TRUE +Pactera Edge,pactera-edge,pacteraedge.com,https://logo.clearbit.com/pacteraedge.com,,TRUE +Panasonic,panasonic,panasonic.com,https://logo.clearbit.com/panasonic.com,,TRUE +PayPal,paypal,paypal.com,https://logo.clearbit.com/paypal.com,,TRUE +PricewaterhouseCoopers (PwC),pwc,pwc.com,https://logo.clearbit.com/pwc.com,,TRUE +Procter & Gamble (P&G),pg,pg.com,https://logo.clearbit.com/pg.com,,TRUE +PSA Singapore,psa-singapore,singaporepsa.com,https://logo.clearbit.com/singaporepsa.com,,TRUE +QuantEdge,quantedge,quantedge.com,https://logo.clearbit.com/quantedge.com,,TRUE +Rakuten,rakuten,rakuten.com,https://logo.clearbit.com/rakuten.com,,TRUE +Ramco,ramco,ramco.com,https://logo.clearbit.com/ramco.com,,TRUE +Razer,razer,razer.com,https://logo.clearbit.com/razer.com,,TRUE +Riot Games,riot-games,riotgames.com,https://logo.clearbit.com/riotgames.com,,TRUE +SAP,sap,sap.com,https://logo.clearbit.com/sap.com,,TRUE +Schneider Electric Pte Ltd,se,se.com,https://logo.clearbit.com/se.com,,TRUE +Schroders,schroders,schroders.com,https://logo.clearbit.com/schroders.com,,TRUE +Sea Group,sea-group,sea.com,https://logo.clearbit.com/sea.com,,TRUE +Seagate,seagate,seagate.com,https://logo.clearbit.com/seagate.com,,TRUE +SenseTime,sensetime,sensetime.com,https://logo.clearbit.com/sensetime.com,,TRUE +Sentient.io,sentient-io,sentient.io.com,https://logo.clearbit.com/sentient.io.com,,TRUE +SGInnovate,sginnovate,sginnovate.com,https://logo.clearbit.com/sginnovate.com,,TRUE +Shop,shop,shop.com,https://logo.clearbit.com/shop.com,,TRUE +ShopBack,shopback,shopback.com,https://logo.clearbit.com/shopback.com,,TRUE +Shopee,shopee,shopee.com,https://logo.clearbit.com/shopee.com,,TRUE +Siemens,siemens,siemens.com,https://logo.clearbit.com/siemens.com,,TRUE +Singapore Airlines (SIA),singaporeair,singaporeair.com.sg,,,TRUE +Singapore Armed Forces (MINDEF SAF),singapore-armed-forces-(mindef-saf),mindef.gov.sg,https://logo.clearbit.com/mindef.gov.sg,,TRUE +Singapore Institute of Technology (SIT),sit-sg,singaporetech.edu.sg,https://logo.clearbit.com/singaporetech.edu.sg,,TRUE +SingTel,singtel,singtel.com,https://logo.clearbit.com/singtel.com,,TRUE +Skyline Communications,skyline-communications,skyline.be,https://logo.clearbit.com/skyline.be,,TRUE +Sprinklr,sprinklr,sprinklr.com,https://logo.clearbit.com/sprinklr.com,,TRUE +Squarepoint Capital,squarepoint-capital,squarepoint-capital.com,https://logo.clearbit.com/squarepoint-capital.com,,TRUE +ST Engineering (Singapore),stengg,stengg.com,https://logo.clearbit.com/stengg.com,,TRUE +Standard Chartered,standard-chartered,standardchartered.com,https://logo.clearbit.com/standardchartered.com,,TRUE +StashAway,stashaway,stashaway.sg,https://logo.clearbit.com/stashaway.sg,,TRUE +Stripe,stripe,stripe.com,https://logo.clearbit.com/stripe.com,,TRUE +Syngenta,syngenta,syngenta.com,https://logo.clearbit.com/syngenta.com,,TRUE +Tesla,tesla,tesla.com,https://logo.clearbit.com/tesla.com,,TRUE +Thales,thales,thales.com,https://logo.clearbit.com/thales.com,,TRUE +Thermo Fisher,thermo-fisher,thermofisher.com,https://logo.clearbit.com/thermofisher.com,,TRUE +Thoughtworks,thoughtworks,thoughtworks.com,https://logo.clearbit.com/thoughtworks.com,,TRUE +TikTok,tiktok,tiktok.com,https://logo.clearbit.com/tiktok.com,,TRUE +Titansoft,titansoft,titansoft.com,https://logo.clearbit.com/titansoft.com,,TRUE +Trail of Bits,trail-of-bits,trailofbits.com,https://logo.clearbit.com/trailofbits.com,,TRUE +Trust (Bank),trust-bank,trustbank.sg,https://logo.clearbit.com/trustbank.sg,,TRUE +Trustana,trustana,trustana.com,https://logo.clearbit.com/trustana.com,,TRUE +Ubisoft,ubisoft,ubisoft.com,https://logo.clearbit.com/ubisoft.com,,TRUE +Ubisoft Singapore,ubisoft-singapore,ubisoftsingapore.com,https://logo.clearbit.com/ubisoftsingapore.com,,TRUE +UCARS,ucars,ucars.com,https://logo.clearbit.com/ucars.com,,TRUE +UOB,uob,uob.com,https://logo.clearbit.com/uob.com,,TRUE +Viki,viki,viki.com,https://logo.clearbit.com/viki.com,,TRUE +Virtu Financial,virtu-financial,virtu.com,https://logo.clearbit.com/virtu.com,,TRUE +Visa,visa,visa.com,https://logo.clearbit.com/visa.com,,TRUE +Wintermute,wintermute,wintermute.com,https://logo.clearbit.com/wintermute.com,,TRUE +Wise,wise,wise.com,https://logo.clearbit.com/wise.com,,TRUE +Workato,workato,workato.com,https://logo.clearbit.com/workato.com,,TRUE +WorkClass,WorkClass,workclass.co,https://logo.clearbit.com/workclass.co,,TRUE +Zendesk,zendesk,zendesk.com,https://logo.clearbit.com/zendesk.com,,TRUE +D.E. Shaw,deshaw,deshaw.com,https://logo.clearbit.com/deshaw.com,,TRUE +Five Rings,five-rings,fiverings.com,https://logo.clearbit.com/fiverings.com,,TRUE +Databricks,databricks,databricks.com,https://logo.clearbit.com/databricks.com,,TRUE +Scale AI,scale-ai,scale.com,https://logo.clearbit.com/scale.com,,TRUE +Snap,snap,snap.com,https://logo.clearbit.com/snap.com,,TRUE +Two Sigma,two-sigma,twosigma.com,https://logo.clearbit.com/twosigma.com,,TRUE +Roblox,roblox,roblox.com,https://logo.clearbit.com/roblox.com,,TRUE +Airbnb,airbnb,airbnb.com,https://logo.clearbit.com/airbnb.com,,TRUE +Lyft,lyft,lyft.com,https://logo.clearbit.com/lyft.com,,TRUE +IMC Trading,imc-trading,imc.com,https://logo.clearbit.com/imc.com,,TRUE +Asana,asana,asana.com,https://logo.clearbit.com/asana.com,,TRUE +Robinhood,robinhood,robinhood.com,https://logo.clearbit.com/robinhood.com,,TRUE +Figma,figma,figma.com,https://logo.clearbit.com/figma.com,,TRUE +Coinbase,coinbase,coinbase.com,https://logo.clearbit.com/coinbase.com,,TRUE +Palantir,palantir,palantir.com,https://logo.clearbit.com/palantir.com,,TRUE +Confluent,confluent,confluent.io,https://logo.clearbit.com/confluent.io,,TRUE +Hudson River Trading,hudson-river-trading,hudsonrivertrading.com,https://logo.clearbit.com/hudsonrivertrading.com,,TRUE +Akuna Capital,akuna-capital,akunacapital.com,https://logo.clearbit.com/akunacapital.com,,TRUE +Uber,uber,uber.com,https://logo.clearbit.com/uber.com,,TRUE +Pinterest,pinterest,pinterest.com,https://logo.clearbit.com/pinterest.com,,TRUE +Github,github,github.com,https://logo.clearbit.com/github.com,,TRUE +Slack,slack,slack.com,https://logo.clearbit.com/slack.com,,TRUE +Square,square,square.com,https://logo.clearbit.com/square.com,,TRUE +Doordash,doordash,doordash.com,https://logo.clearbit.com/doordash.com,,TRUE +Linkedin,linkedin,linkedin.com,https://logo.clearbit.com/linkedin.com,,TRUE +Instacart,instacart,instacart.com,https://logo.clearbit.com/instacart.com,,TRUE +Datadog,datadog,datadog.com,https://logo.clearbit.com/datadog.com,,TRUE +Twitter,twitter,twitter.com,https://logo.clearbit.com/twitter.com,,TRUE +Chime,chime,chime.com,https://logo.clearbit.com/chime.com,,TRUE +Nvidia,nvidia,nvidia.com,https://logo.clearbit.com/nvidia.com,,TRUE +Aurora,aurora,aurora.tech,https://logo.clearbit.com/aurora.tech,,TRUE +Twitch,twitch,twitch.com,https://logo.clearbit.com/twitch.com,,TRUE +MongoDB,mongodb,mongodb.com,https://logo.clearbit.com/mongodb.com,,TRUE +Salesforce,salesforce,salesforce.com,https://logo.clearbit.com/salesforce.com,,TRUE +Tableau,tableau,tableau.com,https://logo.clearbit.com/tableau.com,,TRUE +Bloomberg,bloomberg,bloomberg.com,https://logo.clearbit.com/bloomberg.com,,TRUE +Reddit,reddit,reddit.com,https://logo.clearbit.com/reddit.com,,TRUE +Nextdoor,nextdoor,nextdoor.com,https://logo.clearbit.com/nextdoor.com,,TRUE +Argo Ai,argo-ai,argo.ai,https://logo.clearbit.com/argo.ai,,TRUE +Wish,wish,wish.com,https://logo.clearbit.com/wish.com,,TRUE +Zoom,zoom,zoom.com,https://logo.clearbit.com/zoom.com,,TRUE +Atlasssian,atlasssian,atlasssian.com,https://logo.clearbit.com/atlasssian.com,,TRUE +Twilio,twilio,twilio.com,https://logo.clearbit.com/twilio.com,,TRUE +Snowflake,snowflake,snowflake.com,https://logo.clearbit.com/snowflake.com,,TRUE +Dropbox,dropbox,dropbox.com,https://logo.clearbit.com/dropbox.com,,TRUE +Qualtrics,qualtrics,qualtrics.com,https://logo.clearbit.com/qualtrics.com,,TRUE +HubSpot,hubspot,hubspot.com,https://logo.clearbit.com/hubspot.com,,TRUE +Peleton,peleton,onepeleton.com,https://logo.clearbit.com/onepeleton.com,,TRUE +Adobe,adobe,adobe.com,https://logo.clearbit.com/adobe.com,,TRUE +Splunk,splunk,splunk.com,https://logo.clearbit.com/splunk.com,,TRUE +Postmates,postmates,postmates.com,https://logo.clearbit.com/postmates.com,,TRUE +Coursera,coursera,coursera.com,https://logo.clearbit.com/coursera.com,,TRUE +Niantic Labs,niantic-labs,nianticlabs.com,https://logo.clearbit.com/nianticlabs.com,,TRUE +Audible,audible,audible.com,https://logo.clearbit.com/audible.com,,TRUE +Samsung,samsung,samsung.com,https://logo.clearbit.com/samsung.com,,TRUE +Shopify,shopify,shopify.com,https://logo.clearbit.com/shopify.com,,TRUE +VMware,vmware,vmware.com,https://logo.clearbit.com/vmware.com,,TRUE +Zillow,zillow,zillow.com,https://logo.clearbit.com/zillow.com,,TRUE +Spotify,spotify,spotify.com,https://logo.clearbit.com/spotify.com,,TRUE +Cisco Merkari,cisco-merkari,meraki.cisco.com,https://logo.clearbit.com/meraki.cisco.com,,TRUE +Instabase,instabase,instabase.com,https://logo.clearbit.com/instabase.com,,TRUE +Yext,yext,yext.com,https://logo.clearbit.com/yext.com,,TRUE +Disney,disney,disney.com,https://logo.clearbit.com/disney.com,,TRUE +Hulu,hulu,hulu.com,https://logo.clearbit.com/hulu.com,,TRUE +GrubHub,grubhub,grubhub.com,https://logo.clearbit.com/grubhub.com,,TRUE +Duolingo,duolingo,duolingo.com,https://logo.clearbit.com/duolingo.com,,TRUE +Roku,roku,roku.com,https://logo.clearbit.com/roku.com,,TRUE +Okta,okta,okta.com,https://logo.clearbit.com/okta.com,,TRUE +Palo Alto Software,palo-alto-software,paloaltosoftware.com,https://logo.clearbit.com/paloaltosoftware.com,,TRUE +Palo Alto Networks,palo-alto-networks,paloaltonetworks.com,https://logo.clearbit.com/paloaltonetworks.com,,FALSE +Oracle,oracle,oracle.com,https://logo.clearbit.com/oracle.com,,TRUE +Red Hat,red-hat,redhat.com,https://logo.clearbit.com/redhat.com,,TRUE +Intuit,intuit,intuit.com,https://logo.clearbit.com/intuit.com,,TRUE +Box,box,box.com,https://logo.clearbit.com/box.com,,TRUE +Yelp,yelp,yelp.com,https://logo.clearbit.com/yelp.com,,TRUE +Docusign,docusign,docusign.com,https://logo.clearbit.com/docusign.com,,TRUE +Etsy,etsy,etsy.com,https://logo.clearbit.com/etsy.com,,TRUE +Quora,quora,quora.com,https://logo.clearbit.com/quora.com,,TRUE +SquareSpace,squarespace,squarespace.com,https://logo.clearbit.com/squarespace.com,,TRUE +Expedia,expedia,expedia.com,https://logo.clearbit.com/expedia.com,,TRUE +Chewy,chewy,chewy.com,https://logo.clearbit.com/chewy.com,,TRUE +Intel,intel,intel.com,https://logo.clearbit.com/intel.com,,TRUE +Capital One,capital-one,capitalone.com,https://logo.clearbit.com/capitalone.com,,TRUE +American Express,american-express,americanexpress.com,https://logo.clearbit.com/americanexpress.com,,TRUE +Blackrock,blackrock,blackrock.com,https://logo.clearbit.com/blackrock.com,,TRUE +Walmart Labs,walmart-labs,walmartlabs.com,https://logo.clearbit.com/walmartlabs.com,,TRUE +Workday,workday,workday.com,https://logo.clearbit.com/workday.com,,TRUE +SAP,sap,sap.com,https://logo.clearbit.com/sap.com,,TRUE +Pure Storage,pure-storage,purestorage.com,https://logo.clearbit.com/purestorage.com,,TRUE +Nordstrom,nordstrom,nordstrom.com,https://logo.clearbit.com/nordstrom.com,,TRUE +Groupon,groupon,groupon.com,https://logo.clearbit.com/groupon.com,,TRUE +Norton Lifelock,norton-lifelock,nortonlifelock.com,https://logo.clearbit.com/nortonlifelock.com,,TRUE +Yahoo,yahoo,yahoo.com,https://logo.clearbit.com/yahoo.com,,TRUE +PNC Financial Services,pnc-financial-services,pnc.com,https://logo.clearbit.com/pnc.com,,TRUE +NetApp,netapp,netapp.com,https://logo.clearbit.com/netapp.com,,TRUE +GoDaddy,godaddy,godaddy.com,https://logo.clearbit.com/godaddy.com,,TRUE +Wipro,wipro,wipro.com,https://logo.clearbit.com/wipro.com,,TRUE +Infosys,infosys,infosys.com,https://logo.clearbit.com/infosys.com,,TRUE +TCS,tcs,tcs.com,https://logo.clearbit.com/tcs.com,,TRUE +Cognizant,cognizant,cognizant.com,https://logo.clearbit.com/cognizant.com,,TRUE +HCL,hcl,hcl.com,https://logo.clearbit.com/hcl.com,,TRUE +Tech Mahindra,tech-mahindra,techmahindra.com,https://logo.clearbit.com/techmahindra.com,,TRUE +Fujitsu,fujitsu,fujitsu.com,https://logo.clearbit.com/fujitsu.com,,TRUE +NIIT,niit,niit.com,https://logo.clearbit.com/niit.com,,TRUE +Larson & Toubro (L&T),larson-toubro,larsentoubro.com,https://logo.clearbit.com/larsentoubro.com,,TRUE \ No newline at end of file diff --git a/apps/portal/prisma/companySeed.ts b/apps/portal/prisma/companySeed.ts deleted file mode 100644 index e11780e5..00000000 --- a/apps/portal/prisma/companySeed.ts +++ /dev/null @@ -1,19 +0,0 @@ -import reader from 'xlsx'; - -const file = reader.readFile('prisma/salaries.xlsx'); - -export const COMPANIES: Array = [] - -type CompanyData = { - Finalized: string; - description: string; - logoUrl: string; - name: string; - slug: string; - website: string; -}; - -const temp = reader.utils.sheet_to_json(file.Sheets[file.SheetNames[1]]); -temp.forEach((res: CompanyData) => { - COMPANIES.push(res); -}); \ No newline at end of file diff --git a/apps/portal/prisma/seed-companies.ts b/apps/portal/prisma/seed-companies.ts new file mode 100644 index 00000000..cbdf7d06 --- /dev/null +++ b/apps/portal/prisma/seed-companies.ts @@ -0,0 +1,37 @@ +import * as fs from 'fs'; +const { PrismaClient } = require('@prisma/client'); +const { parse } = require('csv-parse/sync'); + +const prisma = new PrismaClient(); + +async function main() { + console.log('Seeding started...'); + + const file = fs.readFileSync('prisma/companies.csv'); + const companies = parse(file, { + columns: true, + skip_empty_lines: true, + }); + + console.info('Seeding companies'); + await prisma.company.createMany({ + data: companies.map((company) => ({ + name: company.name, + slug: company.slug, + description: !!company.description ? company.description : undefined, + website: company.website, + logoUrl: company.logoUrl, + })), + skipDuplicates: true, + }); +} + +main() + .then(async () => { + await prisma.$disconnect(); + }) + .catch(async (e) => { + console.error(e); + await prisma.$disconnect(); + process.exit(1); + }); diff --git a/apps/portal/prisma/seed.ts b/apps/portal/prisma/seed.ts index c981356f..44d051b7 100644 --- a/apps/portal/prisma/seed.ts +++ b/apps/portal/prisma/seed.ts @@ -1,4 +1,3 @@ -import { COMPANIES } from './companySeed'; const { PrismaClient } = require('@prisma/client'); const cities = require('./data/cities.json'); @@ -10,18 +9,6 @@ const prisma = new PrismaClient(); async function main() { console.log('Seeding started...'); - console.info('Seeding companies'); - await prisma.company.createMany({ - data: COMPANIES.map((company) => ({ - name: company.name, - slug: company.slug, - description: company.description, - website: company.website, - logoUrl: company.logoUrl, - })), - skipDuplicates: true, - }); - console.info('Seeding countries'); await prisma.country.createMany({ data: countries.data.map((country) => ({ diff --git a/yarn.lock b/yarn.lock index 88bab714..a51f59f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6182,6 +6182,31 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== +csv-generate@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-4.2.1.tgz#2a0c5f0d9a5b6f7a0c1fee40f028707af048b31b" + integrity sha512-w6GFHjvApv6bcJ2xdi9JGsH6ZvUBfC+vUdfefnEzurXG6hMRwzkBLnhztU2H7v7+zfCk1I/knnQ+tGbgpxWrBw== + +csv-parse@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.3.2.tgz#a8ce2f8dec1b9c1013c9e73c6102fe0d2d436dbb" + integrity sha512-3jQ/JMs+voKxr4vwpmElS1d37J0o6rQdQyEKoPyA9HG8fYczpLaBJnmp5ykvkXL8ZeEGVP0qwLU645BZVykXKw== + +csv-stringify@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-6.2.1.tgz#de4f9940abd8c9780eda41130c737a18d24e5986" + integrity sha512-+DT/YEgqRy82aMPMA7yUUpFJPx9X8iZy7UhfyTE2bHmFJcjDiz1j29wzTFkYTtuNVceNgz8efsjICch+O1WcLQ== + +csv@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/csv/-/csv-6.2.2.tgz#375020fb5b396fc2919a20f0d4b1b831aa721c4c" + integrity sha512-flTUz/J1VZ6n5+PJmxO7EImbt+tmk2aVgYxeo5UkC/f/beo9OQ7uFMVm53xOsS+/8+5gFN+MQwCdYtYzRXhrRg== + dependencies: + csv-generate "^4.2.1" + csv-parse "^5.3.2" + csv-stringify "^6.2.1" + stream-transform "^3.2.1" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz" @@ -13682,6 +13707,11 @@ stream-shift@^1.0.0: resolved "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +stream-transform@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/stream-transform/-/stream-transform-3.2.1.tgz#4c8cbdd3e4fa7254c770ef34a962cec68349fcb0" + integrity sha512-ApK+WTJ5bCOf0A2tlec1qhvr8bGEBM/sgXXB7mysdCYgZJO5DZeaV3h3G+g0HnAQ372P5IhiGqnW29zoLOfTzQ== + "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"