@stryke/env 0.20.37 → 0.20.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/ci-checks.cjs +1 -1
- package/dist/ci-checks.d.cts +19 -2
- package/dist/ci-checks.d.cts.map +1 -0
- package/dist/ci-checks.d.mts +19 -2
- package/dist/ci-checks.d.mts.map +1 -0
- package/dist/ci-checks.mjs +2 -1
- package/dist/ci-checks.mjs.map +1 -0
- package/dist/convert/src/to-array.cjs +1 -0
- package/dist/convert/src/to-array.mjs +2 -0
- package/dist/convert/src/to-array.mjs.map +1 -0
- package/dist/environment-checks.cjs +1 -1
- package/dist/environment-checks.d.cts +59 -2
- package/dist/environment-checks.d.cts.map +1 -0
- package/dist/environment-checks.d.mts +59 -2
- package/dist/environment-checks.d.mts.map +1 -0
- package/dist/environment-checks.mjs +2 -1
- package/dist/environment-checks.mjs.map +1 -0
- package/dist/fs/src/exists.cjs +1 -0
- package/dist/fs/src/exists.mjs +2 -0
- package/dist/fs/src/exists.mjs.map +1 -0
- package/dist/fs/src/read-file.cjs +1 -0
- package/dist/fs/src/read-file.mjs +2 -0
- package/dist/fs/src/read-file.mjs.map +1 -0
- package/dist/get-env-paths.cjs +1 -1
- package/dist/get-env-paths.d.cts +64 -2
- package/dist/get-env-paths.d.cts.map +1 -0
- package/dist/get-env-paths.d.mts +64 -2
- package/dist/get-env-paths.d.mts.map +1 -0
- package/dist/get-env-paths.mjs +2 -1
- package/dist/get-env-paths.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +1 -1
- package/dist/load-env.cjs +1 -1
- package/dist/load-env.d.cts +61 -2
- package/dist/load-env.d.cts.map +1 -0
- package/dist/load-env.d.mts +61 -2
- package/dist/load-env.d.mts.map +1 -0
- package/dist/load-env.mjs +2 -1
- package/dist/load-env.mjs.map +1 -0
- package/dist/path/src/is-type.cjs +1 -0
- package/dist/path/src/is-type.mjs +2 -0
- package/dist/path/src/is-type.mjs.map +1 -0
- package/dist/path/src/join-paths.cjs +1 -0
- package/dist/path/src/join-paths.mjs +2 -0
- package/dist/path/src/join-paths.mjs.map +1 -0
- package/dist/path/src/regex.cjs +1 -0
- package/dist/path/src/regex.mjs +2 -0
- package/dist/path/src/regex.mjs.map +1 -0
- package/dist/path/src/slash.cjs +1 -0
- package/dist/path/src/slash.mjs +2 -0
- package/dist/path/src/slash.mjs.map +1 -0
- package/dist/providers.cjs +1 -1
- package/dist/providers.d.cts +13 -2
- package/dist/providers.d.cts.map +1 -0
- package/dist/providers.d.mts +13 -2
- package/dist/providers.d.mts.map +1 -0
- package/dist/providers.mjs +2 -1
- package/dist/providers.mjs.map +1 -0
- package/dist/runtime-checks.cjs +1 -1
- package/dist/runtime-checks.d.cts +51 -2
- package/dist/runtime-checks.d.cts.map +1 -0
- package/dist/runtime-checks.d.mts +51 -2
- package/dist/runtime-checks.d.mts.map +1 -0
- package/dist/runtime-checks.mjs +2 -1
- package/dist/runtime-checks.mjs.map +1 -0
- package/dist/string-format/src/acronyms.cjs +1 -0
- package/dist/string-format/src/acronyms.mjs +2 -0
- package/dist/string-format/src/acronyms.mjs.map +1 -0
- package/dist/string-format/src/articles.cjs +1 -0
- package/dist/string-format/src/articles.mjs +2 -0
- package/dist/string-format/src/articles.mjs.map +1 -0
- package/dist/string-format/src/combine.cjs +1 -0
- package/dist/string-format/src/combine.mjs +2 -0
- package/dist/string-format/src/combine.mjs.map +1 -0
- package/dist/string-format/src/conjunctions.cjs +1 -0
- package/dist/string-format/src/conjunctions.mjs +2 -0
- package/dist/string-format/src/conjunctions.mjs.map +1 -0
- package/dist/string-format/src/decamelize.cjs +1 -0
- package/dist/string-format/src/decamelize.mjs +2 -0
- package/dist/string-format/src/decamelize.mjs.map +1 -0
- package/dist/string-format/src/format-special-cases.cjs +1 -0
- package/dist/string-format/src/format-special-cases.mjs +2 -0
- package/dist/string-format/src/format-special-cases.mjs.map +1 -0
- package/dist/string-format/src/prepositions.cjs +1 -0
- package/dist/string-format/src/prepositions.mjs +2 -0
- package/dist/string-format/src/prepositions.mjs.map +1 -0
- package/dist/string-format/src/special-cases.cjs +1 -0
- package/dist/string-format/src/special-cases.mjs +2 -0
- package/dist/string-format/src/special-cases.mjs.map +1 -0
- package/dist/string-format/src/title-case.cjs +1 -0
- package/dist/string-format/src/title-case.mjs +2 -0
- package/dist/string-format/src/title-case.mjs.map +1 -0
- package/dist/string-format/src/upper-case-first.cjs +1 -0
- package/dist/string-format/src/upper-case-first.mjs +2 -0
- package/dist/string-format/src/upper-case-first.mjs.map +1 -0
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +8 -2
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +8 -2
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +2 -1
- package/dist/types.mjs.map +1 -0
- package/package.json +7 -7
- package/dist/ci-checks-5v7fZL3R.mjs +0 -2
- package/dist/ci-checks-5v7fZL3R.mjs.map +0 -1
- package/dist/ci-checks-BFAxtIMg.d.mts +0 -19
- package/dist/ci-checks-BFAxtIMg.d.mts.map +0 -1
- package/dist/ci-checks-ByUPPNOk.d.cts +0 -19
- package/dist/ci-checks-ByUPPNOk.d.cts.map +0 -1
- package/dist/ci-checks-DRWFr2UM.cjs +0 -1
- package/dist/environment-checks-BvXEMk0w.d.mts +0 -59
- package/dist/environment-checks-BvXEMk0w.d.mts.map +0 -1
- package/dist/environment-checks-CNP6SBWs.mjs +0 -2
- package/dist/environment-checks-CNP6SBWs.mjs.map +0 -1
- package/dist/environment-checks-TkDPh8QD.d.cts +0 -59
- package/dist/environment-checks-TkDPh8QD.d.cts.map +0 -1
- package/dist/environment-checks-ghgIrof1.cjs +0 -1
- package/dist/get-env-paths-CRQWNX3i.cjs +0 -1
- package/dist/get-env-paths-DReLbhw5.d.cts +0 -64
- package/dist/get-env-paths-DReLbhw5.d.cts.map +0 -1
- package/dist/get-env-paths-DUHBXxwb.mjs +0 -2
- package/dist/get-env-paths-DUHBXxwb.mjs.map +0 -1
- package/dist/get-env-paths-KTCEsWqe.d.mts +0 -64
- package/dist/get-env-paths-KTCEsWqe.d.mts.map +0 -1
- package/dist/join-paths-BMFGURJb.cjs +0 -1
- package/dist/join-paths-DoUrclq3.mjs +0 -2
- package/dist/join-paths-DoUrclq3.mjs.map +0 -1
- package/dist/load-env-B_Q4iLSZ.d.mts +0 -61
- package/dist/load-env-B_Q4iLSZ.d.mts.map +0 -1
- package/dist/load-env-COR_EMlB.cjs +0 -1
- package/dist/load-env-DPtGxfd9.d.cts +0 -61
- package/dist/load-env-DPtGxfd9.d.cts.map +0 -1
- package/dist/load-env-DUjj4KN6.mjs +0 -2
- package/dist/load-env-DUjj4KN6.mjs.map +0 -1
- package/dist/providers-B2d_hJW2.d.mts +0 -13
- package/dist/providers-B2d_hJW2.d.mts.map +0 -1
- package/dist/providers-B9xVKxf9.cjs +0 -1
- package/dist/providers-BUdbSP8f.mjs +0 -2
- package/dist/providers-BUdbSP8f.mjs.map +0 -1
- package/dist/providers-YKl7K1Ek.d.cts +0 -13
- package/dist/providers-YKl7K1Ek.d.cts.map +0 -1
- package/dist/runtime-checks-Bka6c_Kr.d.mts +0 -51
- package/dist/runtime-checks-Bka6c_Kr.d.mts.map +0 -1
- package/dist/runtime-checks-DGhXcN9g.mjs +0 -2
- package/dist/runtime-checks-DGhXcN9g.mjs.map +0 -1
- package/dist/runtime-checks-Dc2IKXYE.d.cts +0 -51
- package/dist/runtime-checks-Dc2IKXYE.d.cts.map +0 -1
- package/dist/runtime-checks-NIf4Bpj9.cjs +0 -1
- package/dist/types-2O6mBvGZ.cjs +0 -1
- package/dist/types-D7S9q0_s.d.mts +0 -8
- package/dist/types-D7S9q0_s.d.mts.map +0 -1
- package/dist/types-DJpwQAko.d.cts +0 -8
- package/dist/types-DJpwQAko.d.cts.map +0 -1
- package/dist/types-ULysAnV9.mjs +0 -2
- package/dist/types-ULysAnV9.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./join-paths-BMFGURJb.cjs`);let t=require(`node:os`);t=e.n(t);let n=require(`node:path`);n=e.n(n);function r(e,t){return`${e} ${t}`}function i(e){return e.replace(/([a-z\d])([A-Z])/g,`$1_$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1_$2`).toLowerCase()}const a={"2D":{description:`Two-Dimensional`,display:`2d`},"3D":{description:`Three-Dimensional`,display:`3d`},"4D":{description:`Four-Dimensional`,display:`4d`},"5G":{description:`Fifth Generation (mobile networks)`},"6G":{description:`Sixth Generation (mobile networks)`},"7G":{description:`Seventh Generation (mobile networks)`},"8G":{description:`Eighth Generation (mobile networks)`},ACID:{description:`Atomicity, Consistency, Isolation, Durability`},AITA:{description:`Am I The Asshole`},AES:{description:`Advanced Encryption Standard`},AI:{description:`Artificial Intelligence`},AJAX:{description:`Asynchronous JavaScript and XML`},API:{description:`Application Programming Interface`},AR:{description:`Augmented Reality`},ASCII:{description:`American Standard Code for Information Interchange`},ATF:{description:`Bureau of Alcohol, Tobacco, Firearms and Explosives`},ATM:{description:`Automated Teller Machine`},B2B:{description:`Business to Business`},B2C:{description:`Business to Consumer`},BATFE:{description:`Bureau of Alcohol, Tobacco, Firearms and Explosives`},BFF:{description:`Best Friends Forever`},BFFS:{description:`Best Friends Forever (plural)`},BI:{description:`Business Intelligence`},BIOS:{description:`Basic Input/Output System`},BGP:{description:`Border Gateway Protocol`},BOM:{description:`Bill of Materials / Byte Order Mark`},BSON:{description:`Binary JSON`},BYOD:{description:`Bring Your Own Device`},C2C:{description:`Consumer to Consumer`},CAGR:{description:`Compound Annual Growth Rate`},CAPTCHA:{description:`Completely Automated Public Turing test to tell Computers and Humans Apart`},CCTV:{description:`Closed-Circuit Television`},CD:{description:`Continuous Delivery / Compact Disc`},CDN:{description:`Content Delivery Network`},CDP:{description:`Customer Data Platform`},CDT:{description:`Central Daylight Time`},CIA:{description:`Central Intelligence Agency`},CI:{description:`Continuous Integration`},"CI/CD":{description:`Continuous Integration/Continuous Delivery`},CIAM:{description:`Customer Identity and Access Management`},CICD:{description:`Continuous Integration Continuous Delivery`,display:`CI/CD`},CLI:{description:`Command Line Interface`},CMDB:{description:`Configuration Management Database`},CORS:{description:`Cross-Origin Resource Sharing`},CPA:{description:`Certified Public Accountant`},CPU:{description:`Central Processing Unit`},CRUD:{description:`Create, Read, Update, Delete`},CSR:{description:`Certificate Signing Request / Corporate Social Responsibility`},CSS:{description:`Cascading Style Sheets`},CST:{description:`Central Standard Time`},CTA:{description:`Call To Action`},CWD:{description:`Current Working Directory`},CX:{description:`Customer Experience`},DAG:{description:`Directed Acyclic Graph`},DBMS:{description:`Database Management System`},DDOS:{description:`Distributed Denial of Service`,display:`DDoS`},DEA:{description:`Drug Enforcement Administration`},DEVENV:{description:`Devenv`,display:`Devenv`},DEVOPS:{description:`Development Operations`,display:`DevOps`},DHS:{description:`Department of Homeland Security`},DIRENV:{description:`DirEnv`,display:`DirEnv`},DNC:{description:`Democratic National Committee / Do Not Call`},DNS:{description:`Domain Name System`},DNSSEC:{description:`Domain Name System Security Extensions`},DOD:{description:`Department of Defense`,display:`DoD`},DOJ:{description:`Department of Justice`,display:`DoJ`},DOM:{description:`Document Object Model`},DOT:{description:`Department of Transportation`,display:`DoT`},DOTENV:{description:`Dotenv (.env)`,display:`Dotenv`},DR:{description:`Disaster Recovery`},DRM:{description:`Digital Rights Management`},DSN:{description:`Data Source Name`},DWH:{description:`Data Warehouse`},E2E:{description:`End to End`},EAI:{description:`Enterprise Application Integration`},EDT:{description:`Eastern Daylight Time`},EEA:{description:`European Economic Area`},EKS:{description:`Elastic Kubernetes Service`},EOF:{description:`End Of File`},EOD:{description:`End Of Day / Explosive Ordnance Disposal`},EPA:{description:`Environmental Protection Agency`},ER:{description:`Emergency Room / Entity Relationship`},EST:{description:`Eastern Standard Time`},ETC:{description:`Et Cetera`},ETL:{description:`Extract, Transform, Load`},EULA:{description:`End User License Agreement`},FAAS:{description:`Function as a Service`,display:`FaaS`},FAQ:{description:`Frequently Asked Questions`,display:`FAQs`},FAQS:{description:`Frequently Asked Questions`},FBI:{description:`Federal Bureau of Investigation`},FCC:{description:`Federal Communications Commission`},FDA:{description:`Food and Drug Administration`},FIDO:{description:`Fast IDentity Online`},FLOTUS:{description:`First Lady of the United States`},FQDN:{description:`Fully Qualified Domain Name`},FTC:{description:`Federal Trade Commission`},FTP:{description:`File Transfer Protocol`},GC:{description:`Garbage Collection`},GCP:{description:`Google Cloud Platform`},GDPR:{description:`General Data Protection Regulation`},GMT:{description:`Greenwich Mean Time`},GOP:{description:`Grand Old Party`},GPU:{description:`Graphics Processing Unit`},GUID:{description:`Globally Unique Identifier`},GUI:{description:`Graphical User Interface`},GZIP:{description:`GNU Zip`},HCI:{description:`Human Computer Interaction / Hyper-Converged Infrastructure`},HDD:{description:`Hard Disk Drive`},HDFS:{description:`Hadoop Distributed File System`},HHS:{description:`Health and Human Services`},HIPAA:{description:`Health Insurance Portability and Accountability Act`},HMAC:{description:`Hash-based Message Authentication Code`},HOTP:{description:`HMAC-based One-Time Password`},HSM:{description:`Hardware Security Module`},HTML:{description:`HyperText Markup Language`},HTTP:{description:`HyperText Transfer Protocol (HTTP)`},"HTTP/2":{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`},"HTTP/2.0":{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`,display:`HTTP2`},"HTTP/3":{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`},"HTTP/3.0":{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`,display:`HTTP3`},HTTP2:{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`,display:`HTTP2`},"HTTP2.0":{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`,display:`HTTP2`},HTTP3:{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`,display:`HTTP3`},"HTTP3.0":{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`,display:`HTTP3`},HTTPS:{description:`HyperText Transfer Protocol Secure (HTTPS)`},"HTTPS/2":{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`},"HTTPS/2.0":{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`,display:`HTTPS2`},"HTTPS/3":{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`},"HTTPS/3.0":{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`,display:`HTTPS3`},HTTPS2:{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`,display:`HTTPS2`},"HTTPS2.0":{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`,display:`HTTPS2`},HTTPS3:{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`,display:`HTTPS3`},"HTTPS3.0":{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`,display:`HTTPS3`},IAAS:{description:`Infrastructure as a Service`,display:`IaaS`},IAM:{description:`Identity and Access Management`},IAMM:{description:`Identity and Access Management and Monitoring`},IAMT:{description:`Identity and Access Management Tool`},ID:{description:`Identifier`,display:`Id`},IFTTT:{description:`If This Then That`},IMAP:{description:`Internet Message Access Protocol`},IO:{description:`Input/Output`},IP:{description:`Internet Protocol`},IPFS:{description:`InterPlanetary File System`},IPS:{description:`Intrusion Prevention System`},ISO:{description:`International Organization for Standardization`},IQ:{description:`Intelligence Quotient`,display:`IQ`},IOT:{description:`Internet of Things`,display:`IoT`},JSON:{description:`JavaScript Object Notation`},JSONP:{description:`JSON with Padding`},JWT:{description:`JSON Web Token`},K8S:{description:`Kubernetes`,display:`K8s`},KMS:{description:`Key Management Service`},KPI:{description:`Key Performance Indicator`},KV:{description:`Key Value`},LAN:{description:`Local Area Network`},LHS:{description:`Left Hand Side`},LPGA:{description:`Ladies Professional Golf Association`},LXC:{description:`Linux Containers`},MDT:{description:`Mountain Daylight Time`},MFA:{description:`Multi-Factor Authentication`},ML:{description:`Machine Learning`},MLB:{description:`Major League Baseball`},MLOps:{description:`Machine Learning Operations`},MPA:{description:`Multi-Page Application`},MST:{description:`Mountain Standard Time`},MVC:{description:`Model View Controller`},MVP:{description:`Minimum Viable Product / Most Valuable Player`},NAIA:{description:`National Association of Intercollegiate Athletics`},NAS:{description:`Network Attached Storage`},NASA:{description:`National Aeronautics and Space Administration`},NASCAR:{description:`National Association for Stock Car Auto Racing`},NAT:{description:`Network Address Translation`},NBA:{description:`National Basketball Association`},NCAA:{description:`National Collegiate Athletic Association`},NDA:{description:`Non-Disclosure Agreement`},NFS:{description:`Network File System`},NHL:{description:`National Hockey League`},NIST:{description:`National Institute of Standards and Technology`},NLP:{description:`Natural Language Processing`},NPS:{description:`Net Promoter Score`},NRA:{description:`National Rifle Association`},NSFW:{description:`Not Safe For Work`},NX:{description:`Nx`,display:`Nx`},OCR:{description:`Optical Character Recognition`},OEM:{description:`Original Equipment Manufacturer`},OKR:{description:`Objectives and Key Results`},OLAP:{description:`Online Analytical Processing`},OLTP:{description:`Online Transaction Processing`},OOP:{description:`Object Oriented Programming`},ORM:{description:`Object Relational Mapping`},OS:{description:`Operating System`},OSINT:{description:`Open Source Intelligence`},OSS:{description:`Open Source Software`},OTP:{description:`One-Time Password`},P2P:{description:`Peer to Peer`},PAAS:{description:`Platform as a Service`,display:`PaaS`},PCI:{description:`Payment Card Industry`},PDP:{description:`Policy Decision Point / Product Detail Page`},PDT:{description:`Pacific Daylight Time`},PGA:{description:`Professional Golfers' Association`},POTUS:{description:`President of the United States`},PP:{description:`Pages / PayPal / Percentage Points`},PST:{description:`Pacific Standard Time`},PTO:{description:`Paid Time Off / Power Take-Off`},PKI:{description:`Public Key Infrastructure`},PWA:{description:`Progressive Web App`},PX:{description:`Pixel`},QA:{description:`Quality Assurance`},R2:{description:`R2`},RAID:{description:`Redundant Array of Independent Disks`},RAM:{description:`Random Access Memory`},RDS:{description:`Relational Database Service`},REST:{description:`Representational State Transfer`},RHS:{description:`Right Hand Side`},ROI:{description:`Return on Investment`},RPC:{description:`Remote Procedure Call`},RPA:{description:`Robotic Process Automation`},RSC:{description:`React Server Components`},RSS:{description:`Really Simple Syndication`},RUM:{description:`Real User Monitoring`},S3:{description:`Simple Storage Service (S3)`},SAN:{description:`Storage Area Network`},SASE:{description:`Secure Access Service Edge`},SCOTUS:{description:`Supreme Court of the United States`},SDLC:{description:`Software Development Life Cycle`},SDK:{description:`Software Development Kit`},SEC:{description:`Securities and Exchange Commission`},SEO:{description:`Search Engine Optimization`},SFTP:{description:`SSH File Transfer Protocol / Secure File Transfer Protocol`},SIEM:{description:`Security Information and Event Management`},SLA:{description:`Service Level Agreement`},SMB:{description:`Server Message Block / Small and Medium Business`},SMTP:{description:`Simple Mail Transfer Protocol`},SOAP:{description:`Simple Object Access Protocol`},SOA:{description:`Service Oriented Architecture`},SOC:{description:`Security Operations Center / System on Chip`},SPA:{description:`Single Page Application`},SPDY:{description:`Speedy (pronounced "SPeeDY")`},SPF:{description:`Sender Policy Framework`},SQL:{description:`Structured Query Language`},SRV:{description:`Service`},SRE:{description:`Site Reliability Engineering`},SSH:{description:`Secure Shell`},SSDL:{description:`Secure Software Development Lifecycle`},SSG:{description:`Static Site Generation`},SSR:{description:`Server Side Rendering`},SSO:{description:`Single Sign-On`},SSL:{description:`Secure Sockets Layer`},TDD:{description:`Test Driven Development`},TLD:{description:`Top Level Domain`},TLS:{description:`Transport Layer Security`},"TLS1.3":{description:`Transport Layer Security 1.3`},TOR:{description:`The Onion Router`},TOTP:{description:`Time-based One-Time Password`},TRPC:{description:`TypeScript Remote Procedure Call`},TSA:{description:`Transportation Security Administration`},TTL:{description:`Time To Live`},UDP:{description:`User Datagram Protocol`},UI:{description:`User Interface`},UID:{description:`Unique Identifier`},URI:{description:`Uniform Resource Identifier`},URL:{description:`Uniform Resource Locator`},USOPC:{description:`United States Olympic & Paralympic Committee`},USPS:{description:`United States Postal Service`},USTA:{description:`United States Tennis Association`},UTF:{description:`Unicode Transformation Format`},UTC:{description:`Coordinated Universal Time`},UUID:{description:`Universally Unique Identifier`},UX:{description:`User Experience`},VM:{description:`Virtual Machine`},VLAN:{description:`Virtual Local Area Network`},VPN:{description:`Virtual Private Network`},VPPA:{description:`Video Privacy Protection Act`},VR:{description:`Virtual Reality`},WAF:{description:`Web Application Firewall`},WAN:{description:`Wide Area Network`},WNBA:{description:`Women's National Basketball Association`},WLAN:{description:`Wireless Local Area Network`},WPA:{description:`Wi-Fi Protected Access`},WPA2:{description:`Wi-Fi Protected Access II`},WPA3:{description:`Wi-Fi Protected Access III`},WWW:{description:`World Wide Web`},WYSIWYG:{description:`What You See Is What You Get`},XACML:{description:`eXtensible Access Control Markup Language`},XDG:{description:`Cross-Desktop Group`},XML:{description:`eXtensible Markup Language`},XSRF:{description:`Cross-Site Request Forgery`},XSS:{description:`Cross-Site Scripting`},XR:{description:`Extended Reality`},YAML:{description:`YAML Ain't Markup Language`},YMCA:{description:`Young Men's Christian Association`},YWCA:{description:`Young Women's Christian Association`},ZTA:{description:`Zero Trust Architecture`}},o=Object.fromEntries(Object.entries(a).map(([e,t])=>[e,t.display??e])),s=Object.fromEntries(Object.entries(a).map(([e,t])=>[e,t.description])),c=Object.keys(a),l=[`a`,`an`,`the`],u=[`and`,`that`,`but`,`or`,`as`,`if`,`when`,`than`,`because`,`while`,`where`,`after`,`so`,`though`,`since`,`until`,`whether`,`before`,`although`,`nor`,`like`,`once`,`unless`,`now`,`except`],d=`about.above.across.after.against.along.among.around.at.because of.before.behind.below.beneath.beside.besides.between.beyond.but.by.concerning.despite.down.during.except.excepting.for.from.in.in front of.inside.in spite of.instead of.into.like.near.of.off.on.onto.out.outside.over.past.regarding.since.through.throughout.to.toward.under.underneath.until.up.upon.up to.with.within.without.with regard to.with respect to`.split(`.`),f=`2FA.4K.5K.8K.AGI.BI.ChatGPT.CTA.DateTime.FMS.GitHub.GPT.HD.IBMid.IDs.iMac.IMAX.iOS.iPad.iPhone.iPod.LDAP.LinkedIn.LLM.macOS.McDonalds.MCP.ML.MySQL.NLG.NLP.NLU.OpenAI.PDFs.PIM.PEFT.pH.PostgreSQL.SEO.TTS.UHD.UUID.XSS.YouTube.CSpell.ESLint`.split(`.`);function p(e,t,n,r){let i=e.toLowerCase(),o=e.toUpperCase();for(let e of f)if(e.toLowerCase()===i)return e;return a[o]?r?.useDescriptions===!1?a[o].display||o:a[o].description:t===0||t===n.length-1||e.length>=4?e:d.includes(i)||u.includes(i)||l.includes(i)?i:e}function m(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function h(e,t){return e?.split(/\s+-\s+/).map(e=>i(e).split(/[\s\-_]/).map(m).map((e,n,r)=>p(e,n,r,t)).reduce(r)).join(` - `)}const g=t.default.homedir(),_=t.default.tmpdir(),v=t=>{let n=e.t(g,`Library`);return{data:e.t(n,`Application Support`,t),config:e.t(n,`Preferences`,t),cache:e.t(n,`Caches`,t),log:e.t(n,`Logs`,t),temp:e.t(_,t)}},y=t=>{let n=process.env.APPDATA||e.t(g,`AppData`,`Roaming`),r=process.env.LOCALAPPDATA||e.t(g,`AppData`,`Local`),i=h(t).trim().replace(/\s+/g,``);return{data:e.t(r,i,`Data`),config:e.t(n,i,`Config`),cache:e.t(r,`Cache`,t),log:e.t(r,i,`Log`),temp:e.t(_,t)}},b=t=>{let r=n.default.basename(g);return{data:e.t(process.env.XDG_DATA_HOME||e.t(g,`.local`,`share`),t),config:e.t(process.env.XDG_CONFIG_HOME||e.t(g,`.config`),t),cache:e.t(process.env.XDG_CACHE_HOME||e.t(g,`.cache`),t),log:e.t(process.env.XDG_STATE_HOME||e.t(g,`.local`,`state`),t),temp:process.env.DEVENV_RUNTIME||process.env.XDG_RUNTIME_DIR?e.t(process.env.DEVENV_RUNTIME||process.env.XDG_RUNTIME_DIR,t):e.t(_,r,t)}};function x(t={}){let n=t.orgId||`storm-software`;if(!n)throw Error("You need to provide an orgId to the `getEnvPaths` function");t.suffix&&(n+=`-${typeof t.suffix==`string`?t.suffix:`nodejs`}`);let r={};return r=process.platform===`darwin`?v(n):process.platform===`win32`?y(n):b(n),process.env.STORM_DATA_DIR?r.data=process.env.STORM_DATA_DIR:process.env.STORM_CONFIG_DIR?r.config=process.env.STORM_CONFIG_DIR:process.env.STORM_CACHE_DIR?r.cache=process.env.STORM_CACHE_DIR:process.env.STORM_LOG_DIR?r.log=process.env.STORM_LOG_DIR:process.env.STORM_TEMP_DIR&&(r.temp=process.env.STORM_TEMP_DIR),t.workspaceRoot&&(r.cache??=e.t(t.workspaceRoot,`node_modules`,`.cache`,n),r.temp??=e.t(t.workspaceRoot,`tmp`,n),r.log??=e.t(r.temp,`logs`),r.config??=e.t(t.workspaceRoot,`.config`,n)),Object.keys(r).reduce((n,i)=>{if(r[i]){let a=r[i];n[i]=t.appId&&t.appId!==t.orgId&&t.appId!==t.nestedDir?e.t(a,t.appId):a,t.nestedDir&&t.nestedDir!==t.orgId&&t.nestedDir!==t.appId&&(n[i]=e.t(n[i],t.nestedDir))}return n},{})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
//#region src/get-env-paths.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Options for the `getEnvPaths` function.
|
|
4
|
-
*/
|
|
5
|
-
interface GetEnvPathsOptions {
|
|
6
|
-
/**
|
|
7
|
-
* The name of the organization
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue "storm-software"
|
|
10
|
-
*/
|
|
11
|
-
orgId?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The name of the specific application to use as a nested folder inside the organization's folder
|
|
14
|
-
*
|
|
15
|
-
* For example: `~/ ... /storm-software/Log/<appId>`
|
|
16
|
-
*/
|
|
17
|
-
appId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* The name of the specific application to use as a nested folder inside the organization's folder
|
|
20
|
-
*
|
|
21
|
-
* When a value is provided, it will use `~/ ... /storm-software/Log/<appId>/<nestedDir>`
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* If no child is provided, it will use `~/ ... /storm-software/Log/<appId>`
|
|
25
|
-
*/
|
|
26
|
-
nestedDir?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The suffix to append to the project name.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* If `suffix` is `true`, the project name will be suffixed with `"nodejs"`.
|
|
32
|
-
*
|
|
33
|
-
* @defaultValue false
|
|
34
|
-
*/
|
|
35
|
-
suffix?: string | boolean | null;
|
|
36
|
-
/**
|
|
37
|
-
* The root directory of the workspace that is used for determining the `cache` and `tmp` paths if they were not already set by other means.
|
|
38
|
-
*/
|
|
39
|
-
workspaceRoot?: string;
|
|
40
|
-
}
|
|
41
|
-
interface EnvPaths {
|
|
42
|
-
data: string;
|
|
43
|
-
config: string;
|
|
44
|
-
cache: string;
|
|
45
|
-
log: string;
|
|
46
|
-
temp: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Get paths for storing things like data, config, logs, and cache in the current runtime environment.
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* On macOS, directories are generally created in `~/Library/Application Support/<name>`.
|
|
53
|
-
* On Windows, directories are generally created in `%AppData%/<name>`.
|
|
54
|
-
* On Linux, directories are generally created in `~/.config/<name>` - this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/).
|
|
55
|
-
*
|
|
56
|
-
* If the `STORM_DATA_DIR`, `STORM_CONFIG_DIR`, `STORM_CACHE_DIR`, `STORM_LOG_DIR`, or `STORM_TEMP_DIR` environment variables are set, they will be used instead of the default paths.
|
|
57
|
-
*
|
|
58
|
-
* @param options - Parameters used to determine the specific paths for the current project/runtime environment
|
|
59
|
-
* @returns An object containing the various paths for the runtime environment
|
|
60
|
-
*/
|
|
61
|
-
declare function getEnvPaths(options?: GetEnvPathsOptions): EnvPaths;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { GetEnvPathsOptions as n, getEnvPaths as r, EnvPaths as t };
|
|
64
|
-
//# sourceMappingURL=get-env-paths-DReLbhw5.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-env-paths-DReLbhw5.d.cts","names":[],"sources":["../src/get-env-paths.ts"],"sourcesContent":[],"mappings":";;AA+BA;AAyCA;AAoFgB,UA7HC,kBAAA,CA6HoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UApFpB,QAAA;;;;;;;;;;;;;;;;;;;;iBAoFD,WAAA,WAAqB,qBAA0B"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./join-paths-DoUrclq3.mjs";import t from"node:os";import n from"node:path";function r(e,t){return`${e} ${t}`}function i(e){return e.replace(/([a-z\d])([A-Z])/g,`$1_$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1_$2`).toLowerCase()}const a={"2D":{description:`Two-Dimensional`,display:`2d`},"3D":{description:`Three-Dimensional`,display:`3d`},"4D":{description:`Four-Dimensional`,display:`4d`},"5G":{description:`Fifth Generation (mobile networks)`},"6G":{description:`Sixth Generation (mobile networks)`},"7G":{description:`Seventh Generation (mobile networks)`},"8G":{description:`Eighth Generation (mobile networks)`},ACID:{description:`Atomicity, Consistency, Isolation, Durability`},AITA:{description:`Am I The Asshole`},AES:{description:`Advanced Encryption Standard`},AI:{description:`Artificial Intelligence`},AJAX:{description:`Asynchronous JavaScript and XML`},API:{description:`Application Programming Interface`},AR:{description:`Augmented Reality`},ASCII:{description:`American Standard Code for Information Interchange`},ATF:{description:`Bureau of Alcohol, Tobacco, Firearms and Explosives`},ATM:{description:`Automated Teller Machine`},B2B:{description:`Business to Business`},B2C:{description:`Business to Consumer`},BATFE:{description:`Bureau of Alcohol, Tobacco, Firearms and Explosives`},BFF:{description:`Best Friends Forever`},BFFS:{description:`Best Friends Forever (plural)`},BI:{description:`Business Intelligence`},BIOS:{description:`Basic Input/Output System`},BGP:{description:`Border Gateway Protocol`},BOM:{description:`Bill of Materials / Byte Order Mark`},BSON:{description:`Binary JSON`},BYOD:{description:`Bring Your Own Device`},C2C:{description:`Consumer to Consumer`},CAGR:{description:`Compound Annual Growth Rate`},CAPTCHA:{description:`Completely Automated Public Turing test to tell Computers and Humans Apart`},CCTV:{description:`Closed-Circuit Television`},CD:{description:`Continuous Delivery / Compact Disc`},CDN:{description:`Content Delivery Network`},CDP:{description:`Customer Data Platform`},CDT:{description:`Central Daylight Time`},CIA:{description:`Central Intelligence Agency`},CI:{description:`Continuous Integration`},"CI/CD":{description:`Continuous Integration/Continuous Delivery`},CIAM:{description:`Customer Identity and Access Management`},CICD:{description:`Continuous Integration Continuous Delivery`,display:`CI/CD`},CLI:{description:`Command Line Interface`},CMDB:{description:`Configuration Management Database`},CORS:{description:`Cross-Origin Resource Sharing`},CPA:{description:`Certified Public Accountant`},CPU:{description:`Central Processing Unit`},CRUD:{description:`Create, Read, Update, Delete`},CSR:{description:`Certificate Signing Request / Corporate Social Responsibility`},CSS:{description:`Cascading Style Sheets`},CST:{description:`Central Standard Time`},CTA:{description:`Call To Action`},CWD:{description:`Current Working Directory`},CX:{description:`Customer Experience`},DAG:{description:`Directed Acyclic Graph`},DBMS:{description:`Database Management System`},DDOS:{description:`Distributed Denial of Service`,display:`DDoS`},DEA:{description:`Drug Enforcement Administration`},DEVENV:{description:`Devenv`,display:`Devenv`},DEVOPS:{description:`Development Operations`,display:`DevOps`},DHS:{description:`Department of Homeland Security`},DIRENV:{description:`DirEnv`,display:`DirEnv`},DNC:{description:`Democratic National Committee / Do Not Call`},DNS:{description:`Domain Name System`},DNSSEC:{description:`Domain Name System Security Extensions`},DOD:{description:`Department of Defense`,display:`DoD`},DOJ:{description:`Department of Justice`,display:`DoJ`},DOM:{description:`Document Object Model`},DOT:{description:`Department of Transportation`,display:`DoT`},DOTENV:{description:`Dotenv (.env)`,display:`Dotenv`},DR:{description:`Disaster Recovery`},DRM:{description:`Digital Rights Management`},DSN:{description:`Data Source Name`},DWH:{description:`Data Warehouse`},E2E:{description:`End to End`},EAI:{description:`Enterprise Application Integration`},EDT:{description:`Eastern Daylight Time`},EEA:{description:`European Economic Area`},EKS:{description:`Elastic Kubernetes Service`},EOF:{description:`End Of File`},EOD:{description:`End Of Day / Explosive Ordnance Disposal`},EPA:{description:`Environmental Protection Agency`},ER:{description:`Emergency Room / Entity Relationship`},EST:{description:`Eastern Standard Time`},ETC:{description:`Et Cetera`},ETL:{description:`Extract, Transform, Load`},EULA:{description:`End User License Agreement`},FAAS:{description:`Function as a Service`,display:`FaaS`},FAQ:{description:`Frequently Asked Questions`,display:`FAQs`},FAQS:{description:`Frequently Asked Questions`},FBI:{description:`Federal Bureau of Investigation`},FCC:{description:`Federal Communications Commission`},FDA:{description:`Food and Drug Administration`},FIDO:{description:`Fast IDentity Online`},FLOTUS:{description:`First Lady of the United States`},FQDN:{description:`Fully Qualified Domain Name`},FTC:{description:`Federal Trade Commission`},FTP:{description:`File Transfer Protocol`},GC:{description:`Garbage Collection`},GCP:{description:`Google Cloud Platform`},GDPR:{description:`General Data Protection Regulation`},GMT:{description:`Greenwich Mean Time`},GOP:{description:`Grand Old Party`},GPU:{description:`Graphics Processing Unit`},GUID:{description:`Globally Unique Identifier`},GUI:{description:`Graphical User Interface`},GZIP:{description:`GNU Zip`},HCI:{description:`Human Computer Interaction / Hyper-Converged Infrastructure`},HDD:{description:`Hard Disk Drive`},HDFS:{description:`Hadoop Distributed File System`},HHS:{description:`Health and Human Services`},HIPAA:{description:`Health Insurance Portability and Accountability Act`},HMAC:{description:`Hash-based Message Authentication Code`},HOTP:{description:`HMAC-based One-Time Password`},HSM:{description:`Hardware Security Module`},HTML:{description:`HyperText Markup Language`},HTTP:{description:`HyperText Transfer Protocol (HTTP)`},"HTTP/2":{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`},"HTTP/2.0":{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`,display:`HTTP2`},"HTTP/3":{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`},"HTTP/3.0":{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`,display:`HTTP3`},HTTP2:{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`,display:`HTTP2`},"HTTP2.0":{description:`HyperText Transfer Protocol Version 2 (HTTP/2)`,display:`HTTP2`},HTTP3:{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`,display:`HTTP3`},"HTTP3.0":{description:`HyperText Transfer Protocol Version 3 (HTTP/3)`,display:`HTTP3`},HTTPS:{description:`HyperText Transfer Protocol Secure (HTTPS)`},"HTTPS/2":{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`},"HTTPS/2.0":{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`,display:`HTTPS2`},"HTTPS/3":{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`},"HTTPS/3.0":{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`,display:`HTTPS3`},HTTPS2:{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`,display:`HTTPS2`},"HTTPS2.0":{description:`HyperText Transfer Protocol Secure Version 2 (HTTPS/2)`,display:`HTTPS2`},HTTPS3:{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`,display:`HTTPS3`},"HTTPS3.0":{description:`HyperText Transfer Protocol Secure Version 3 (HTTPS/3)`,display:`HTTPS3`},IAAS:{description:`Infrastructure as a Service`,display:`IaaS`},IAM:{description:`Identity and Access Management`},IAMM:{description:`Identity and Access Management and Monitoring`},IAMT:{description:`Identity and Access Management Tool`},ID:{description:`Identifier`,display:`Id`},IFTTT:{description:`If This Then That`},IMAP:{description:`Internet Message Access Protocol`},IO:{description:`Input/Output`},IP:{description:`Internet Protocol`},IPFS:{description:`InterPlanetary File System`},IPS:{description:`Intrusion Prevention System`},ISO:{description:`International Organization for Standardization`},IQ:{description:`Intelligence Quotient`,display:`IQ`},IOT:{description:`Internet of Things`,display:`IoT`},JSON:{description:`JavaScript Object Notation`},JSONP:{description:`JSON with Padding`},JWT:{description:`JSON Web Token`},K8S:{description:`Kubernetes`,display:`K8s`},KMS:{description:`Key Management Service`},KPI:{description:`Key Performance Indicator`},KV:{description:`Key Value`},LAN:{description:`Local Area Network`},LHS:{description:`Left Hand Side`},LPGA:{description:`Ladies Professional Golf Association`},LXC:{description:`Linux Containers`},MDT:{description:`Mountain Daylight Time`},MFA:{description:`Multi-Factor Authentication`},ML:{description:`Machine Learning`},MLB:{description:`Major League Baseball`},MLOps:{description:`Machine Learning Operations`},MPA:{description:`Multi-Page Application`},MST:{description:`Mountain Standard Time`},MVC:{description:`Model View Controller`},MVP:{description:`Minimum Viable Product / Most Valuable Player`},NAIA:{description:`National Association of Intercollegiate Athletics`},NAS:{description:`Network Attached Storage`},NASA:{description:`National Aeronautics and Space Administration`},NASCAR:{description:`National Association for Stock Car Auto Racing`},NAT:{description:`Network Address Translation`},NBA:{description:`National Basketball Association`},NCAA:{description:`National Collegiate Athletic Association`},NDA:{description:`Non-Disclosure Agreement`},NFS:{description:`Network File System`},NHL:{description:`National Hockey League`},NIST:{description:`National Institute of Standards and Technology`},NLP:{description:`Natural Language Processing`},NPS:{description:`Net Promoter Score`},NRA:{description:`National Rifle Association`},NSFW:{description:`Not Safe For Work`},NX:{description:`Nx`,display:`Nx`},OCR:{description:`Optical Character Recognition`},OEM:{description:`Original Equipment Manufacturer`},OKR:{description:`Objectives and Key Results`},OLAP:{description:`Online Analytical Processing`},OLTP:{description:`Online Transaction Processing`},OOP:{description:`Object Oriented Programming`},ORM:{description:`Object Relational Mapping`},OS:{description:`Operating System`},OSINT:{description:`Open Source Intelligence`},OSS:{description:`Open Source Software`},OTP:{description:`One-Time Password`},P2P:{description:`Peer to Peer`},PAAS:{description:`Platform as a Service`,display:`PaaS`},PCI:{description:`Payment Card Industry`},PDP:{description:`Policy Decision Point / Product Detail Page`},PDT:{description:`Pacific Daylight Time`},PGA:{description:`Professional Golfers' Association`},POTUS:{description:`President of the United States`},PP:{description:`Pages / PayPal / Percentage Points`},PST:{description:`Pacific Standard Time`},PTO:{description:`Paid Time Off / Power Take-Off`},PKI:{description:`Public Key Infrastructure`},PWA:{description:`Progressive Web App`},PX:{description:`Pixel`},QA:{description:`Quality Assurance`},R2:{description:`R2`},RAID:{description:`Redundant Array of Independent Disks`},RAM:{description:`Random Access Memory`},RDS:{description:`Relational Database Service`},REST:{description:`Representational State Transfer`},RHS:{description:`Right Hand Side`},ROI:{description:`Return on Investment`},RPC:{description:`Remote Procedure Call`},RPA:{description:`Robotic Process Automation`},RSC:{description:`React Server Components`},RSS:{description:`Really Simple Syndication`},RUM:{description:`Real User Monitoring`},S3:{description:`Simple Storage Service (S3)`},SAN:{description:`Storage Area Network`},SASE:{description:`Secure Access Service Edge`},SCOTUS:{description:`Supreme Court of the United States`},SDLC:{description:`Software Development Life Cycle`},SDK:{description:`Software Development Kit`},SEC:{description:`Securities and Exchange Commission`},SEO:{description:`Search Engine Optimization`},SFTP:{description:`SSH File Transfer Protocol / Secure File Transfer Protocol`},SIEM:{description:`Security Information and Event Management`},SLA:{description:`Service Level Agreement`},SMB:{description:`Server Message Block / Small and Medium Business`},SMTP:{description:`Simple Mail Transfer Protocol`},SOAP:{description:`Simple Object Access Protocol`},SOA:{description:`Service Oriented Architecture`},SOC:{description:`Security Operations Center / System on Chip`},SPA:{description:`Single Page Application`},SPDY:{description:`Speedy (pronounced "SPeeDY")`},SPF:{description:`Sender Policy Framework`},SQL:{description:`Structured Query Language`},SRV:{description:`Service`},SRE:{description:`Site Reliability Engineering`},SSH:{description:`Secure Shell`},SSDL:{description:`Secure Software Development Lifecycle`},SSG:{description:`Static Site Generation`},SSR:{description:`Server Side Rendering`},SSO:{description:`Single Sign-On`},SSL:{description:`Secure Sockets Layer`},TDD:{description:`Test Driven Development`},TLD:{description:`Top Level Domain`},TLS:{description:`Transport Layer Security`},"TLS1.3":{description:`Transport Layer Security 1.3`},TOR:{description:`The Onion Router`},TOTP:{description:`Time-based One-Time Password`},TRPC:{description:`TypeScript Remote Procedure Call`},TSA:{description:`Transportation Security Administration`},TTL:{description:`Time To Live`},UDP:{description:`User Datagram Protocol`},UI:{description:`User Interface`},UID:{description:`Unique Identifier`},URI:{description:`Uniform Resource Identifier`},URL:{description:`Uniform Resource Locator`},USOPC:{description:`United States Olympic & Paralympic Committee`},USPS:{description:`United States Postal Service`},USTA:{description:`United States Tennis Association`},UTF:{description:`Unicode Transformation Format`},UTC:{description:`Coordinated Universal Time`},UUID:{description:`Universally Unique Identifier`},UX:{description:`User Experience`},VM:{description:`Virtual Machine`},VLAN:{description:`Virtual Local Area Network`},VPN:{description:`Virtual Private Network`},VPPA:{description:`Video Privacy Protection Act`},VR:{description:`Virtual Reality`},WAF:{description:`Web Application Firewall`},WAN:{description:`Wide Area Network`},WNBA:{description:`Women's National Basketball Association`},WLAN:{description:`Wireless Local Area Network`},WPA:{description:`Wi-Fi Protected Access`},WPA2:{description:`Wi-Fi Protected Access II`},WPA3:{description:`Wi-Fi Protected Access III`},WWW:{description:`World Wide Web`},WYSIWYG:{description:`What You See Is What You Get`},XACML:{description:`eXtensible Access Control Markup Language`},XDG:{description:`Cross-Desktop Group`},XML:{description:`eXtensible Markup Language`},XSRF:{description:`Cross-Site Request Forgery`},XSS:{description:`Cross-Site Scripting`},XR:{description:`Extended Reality`},YAML:{description:`YAML Ain't Markup Language`},YMCA:{description:`Young Men's Christian Association`},YWCA:{description:`Young Women's Christian Association`},ZTA:{description:`Zero Trust Architecture`}};Object.fromEntries(Object.entries(a).map(([e,t])=>[e,t.display??e])),Object.fromEntries(Object.entries(a).map(([e,t])=>[e,t.description]));const o=[`a`,`an`,`the`],s=[`and`,`that`,`but`,`or`,`as`,`if`,`when`,`than`,`because`,`while`,`where`,`after`,`so`,`though`,`since`,`until`,`whether`,`before`,`although`,`nor`,`like`,`once`,`unless`,`now`,`except`],c=`about.above.across.after.against.along.among.around.at.because of.before.behind.below.beneath.beside.besides.between.beyond.but.by.concerning.despite.down.during.except.excepting.for.from.in.in front of.inside.in spite of.instead of.into.like.near.of.off.on.onto.out.outside.over.past.regarding.since.through.throughout.to.toward.under.underneath.until.up.upon.up to.with.within.without.with regard to.with respect to`.split(`.`),l=`2FA.4K.5K.8K.AGI.BI.ChatGPT.CTA.DateTime.FMS.GitHub.GPT.HD.IBMid.IDs.iMac.IMAX.iOS.iPad.iPhone.iPod.LDAP.LinkedIn.LLM.macOS.McDonalds.MCP.ML.MySQL.NLG.NLP.NLU.OpenAI.PDFs.PIM.PEFT.pH.PostgreSQL.SEO.TTS.UHD.UUID.XSS.YouTube.CSpell.ESLint`.split(`.`);function u(e,t,n,r){let i=e.toLowerCase(),u=e.toUpperCase();for(let e of l)if(e.toLowerCase()===i)return e;return a[u]?r?.useDescriptions===!1?a[u].display||u:a[u].description:t===0||t===n.length-1||e.length>=4?e:c.includes(i)||s.includes(i)||o.includes(i)?i:e}function d(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t){return e?.split(/\s+-\s+/).map(e=>i(e).split(/[\s\-_]/).map(d).map((e,n,r)=>u(e,n,r,t)).reduce(r)).join(` - `)}const p=t.homedir(),m=t.tmpdir(),h=t=>{let n=e(p,`Library`);return{data:e(n,`Application Support`,t),config:e(n,`Preferences`,t),cache:e(n,`Caches`,t),log:e(n,`Logs`,t),temp:e(m,t)}},g=t=>{let n=process.env.APPDATA||e(p,`AppData`,`Roaming`),r=process.env.LOCALAPPDATA||e(p,`AppData`,`Local`),i=f(t).trim().replace(/\s+/g,``);return{data:e(r,i,`Data`),config:e(n,i,`Config`),cache:e(r,`Cache`,t),log:e(r,i,`Log`),temp:e(m,t)}},_=t=>{let r=n.basename(p);return{data:e(process.env.XDG_DATA_HOME||e(p,`.local`,`share`),t),config:e(process.env.XDG_CONFIG_HOME||e(p,`.config`),t),cache:e(process.env.XDG_CACHE_HOME||e(p,`.cache`),t),log:e(process.env.XDG_STATE_HOME||e(p,`.local`,`state`),t),temp:process.env.DEVENV_RUNTIME||process.env.XDG_RUNTIME_DIR?e(process.env.DEVENV_RUNTIME||process.env.XDG_RUNTIME_DIR,t):e(m,r,t)}};function v(t={}){let n=t.orgId||`storm-software`;if(!n)throw Error("You need to provide an orgId to the `getEnvPaths` function");t.suffix&&(n+=`-${typeof t.suffix==`string`?t.suffix:`nodejs`}`);let r={};return r=process.platform===`darwin`?h(n):process.platform===`win32`?g(n):_(n),process.env.STORM_DATA_DIR?r.data=process.env.STORM_DATA_DIR:process.env.STORM_CONFIG_DIR?r.config=process.env.STORM_CONFIG_DIR:process.env.STORM_CACHE_DIR?r.cache=process.env.STORM_CACHE_DIR:process.env.STORM_LOG_DIR?r.log=process.env.STORM_LOG_DIR:process.env.STORM_TEMP_DIR&&(r.temp=process.env.STORM_TEMP_DIR),t.workspaceRoot&&(r.cache??=e(t.workspaceRoot,`node_modules`,`.cache`,n),r.temp??=e(t.workspaceRoot,`tmp`,n),r.log??=e(r.temp,`logs`),r.config??=e(t.workspaceRoot,`.config`,n)),Object.keys(r).reduce((n,i)=>{if(r[i]){let a=r[i];n[i]=t.appId&&t.appId!==t.orgId&&t.appId!==t.nestedDir?e(a,t.appId):a,t.nestedDir&&t.nestedDir!==t.orgId&&t.nestedDir!==t.appId&&(n[i]=e(n[i],t.nestedDir))}return n},{})}export{v as t};
|
|
2
|
-
//# sourceMappingURL=get-env-paths-DUHBXxwb.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-env-paths-DUHBXxwb.mjs","names":["ACRONYMS: Record<\n string,\n { description: string; display?: string }\n>","ACRONYM_DISPLAY: Record<string, string>","ACRONYM_DESCRIPTION: Record<string, string>","ACRONYM_LIST: string[]"],"sources":["../../string-format/src/combine.ts","../../string-format/src/decamelize.ts","../../string-format/src/acronyms.ts","../../string-format/src/articles.ts","../../string-format/src/conjunctions.ts","../../string-format/src/prepositions.ts","../../string-format/src/special-cases.ts","../../string-format/src/format-special-cases.ts","../../string-format/src/upper-case-first.ts","../../string-format/src/title-case.ts","../src/get-env-paths.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Combine two strings with a space in between.\n *\n * @param acc - The accumulated string.\n * @param str - The string to add.\n * @returns The combined string.\n */\nexport function combine(acc: string, str: string): string {\n return `${acc} ${str}`;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert a camelCase or PascalCase string to a snake_case string.\n *\n * @param value - The camelCase or PascalCase string to convert.\n * @returns The converted snake_case string.\n */\nexport function decamelize(value: string): string {\n return value\n .replace(/([a-z\\d])([A-Z])/g, \"$1_$2\")\n .replace(/([A-Z]+)([A-Z][a-z\\d]+)/g, \"$1_$2\")\n .toLowerCase();\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * A running list of common acronyms and their meanings.\n *\n * @remarks\n * This list is not exhaustive and may be updated over time.\n */\nexport const ACRONYMS: Record<\n string,\n { description: string; display?: string }\n> = {\n \"2D\": { description: \"Two-Dimensional\", display: \"2d\" },\n \"3D\": { description: \"Three-Dimensional\", display: \"3d\" },\n \"4D\": { description: \"Four-Dimensional\", display: \"4d\" },\n \"5G\": { description: \"Fifth Generation (mobile networks)\" },\n \"6G\": { description: \"Sixth Generation (mobile networks)\" },\n \"7G\": { description: \"Seventh Generation (mobile networks)\" },\n \"8G\": { description: \"Eighth Generation (mobile networks)\" },\n \"ACID\": { description: \"Atomicity, Consistency, Isolation, Durability\" },\n \"AITA\": { description: \"Am I The Asshole\" },\n \"AES\": { description: \"Advanced Encryption Standard\" },\n \"AI\": { description: \"Artificial Intelligence\" },\n \"AJAX\": { description: \"Asynchronous JavaScript and XML\" },\n \"API\": { description: \"Application Programming Interface\" },\n \"AR\": { description: \"Augmented Reality\" },\n \"ASCII\": {\n description: \"American Standard Code for Information Interchange\"\n },\n \"ATF\": { description: \"Bureau of Alcohol, Tobacco, Firearms and Explosives\" },\n \"ATM\": { description: \"Automated Teller Machine\" },\n \"B2B\": { description: \"Business to Business\" },\n \"B2C\": { description: \"Business to Consumer\" },\n \"BATFE\": {\n description: \"Bureau of Alcohol, Tobacco, Firearms and Explosives\"\n },\n \"BFF\": { description: \"Best Friends Forever\" },\n \"BFFS\": { description: \"Best Friends Forever (plural)\" },\n \"BI\": { description: \"Business Intelligence\" },\n \"BIOS\": { description: \"Basic Input/Output System\" },\n \"BGP\": { description: \"Border Gateway Protocol\" },\n \"BOM\": { description: \"Bill of Materials / Byte Order Mark\" },\n \"BSON\": { description: \"Binary JSON\" },\n \"BYOD\": { description: \"Bring Your Own Device\" },\n \"C2C\": { description: \"Consumer to Consumer\" },\n \"CAGR\": { description: \"Compound Annual Growth Rate\" },\n \"CAPTCHA\": {\n description:\n \"Completely Automated Public Turing test to tell Computers and Humans Apart\"\n },\n \"CCTV\": { description: \"Closed-Circuit Television\" },\n \"CD\": { description: \"Continuous Delivery / Compact Disc\" },\n \"CDN\": { description: \"Content Delivery Network\" },\n \"CDP\": { description: \"Customer Data Platform\" },\n \"CDT\": { description: \"Central Daylight Time\" },\n \"CIA\": { description: \"Central Intelligence Agency\" },\n \"CI\": { description: \"Continuous Integration\" },\n \"CI/CD\": { description: \"Continuous Integration/Continuous Delivery\" },\n \"CIAM\": { description: \"Customer Identity and Access Management\" },\n \"CICD\": {\n description: \"Continuous Integration Continuous Delivery\",\n display: \"CI/CD\"\n },\n \"CLI\": { description: \"Command Line Interface\" },\n \"CMDB\": { description: \"Configuration Management Database\" },\n \"CORS\": { description: \"Cross-Origin Resource Sharing\" },\n \"CPA\": { description: \"Certified Public Accountant\" },\n \"CPU\": { description: \"Central Processing Unit\" },\n \"CRUD\": { description: \"Create, Read, Update, Delete\" },\n \"CSR\": {\n description: \"Certificate Signing Request / Corporate Social Responsibility\"\n },\n \"CSS\": { description: \"Cascading Style Sheets\" },\n \"CST\": { description: \"Central Standard Time\" },\n \"CTA\": { description: \"Call To Action\" },\n \"CWD\": { description: \"Current Working Directory\" },\n \"CX\": { description: \"Customer Experience\" },\n \"DAG\": { description: \"Directed Acyclic Graph\" },\n \"DBMS\": { description: \"Database Management System\" },\n \"DDOS\": { description: \"Distributed Denial of Service\", display: \"DDoS\" },\n \"DEA\": { description: \"Drug Enforcement Administration\" },\n \"DEVENV\": { description: \"Devenv\", display: \"Devenv\" },\n \"DEVOPS\": { description: \"Development Operations\", display: \"DevOps\" },\n \"DHS\": { description: \"Department of Homeland Security\" },\n \"DIRENV\": { description: \"DirEnv\", display: \"DirEnv\" },\n \"DNC\": { description: \"Democratic National Committee / Do Not Call\" },\n \"DNS\": { description: \"Domain Name System\" },\n \"DNSSEC\": { description: \"Domain Name System Security Extensions\" },\n \"DOD\": { description: \"Department of Defense\", display: \"DoD\" },\n \"DOJ\": { description: \"Department of Justice\", display: \"DoJ\" },\n \"DOM\": { description: \"Document Object Model\" },\n \"DOT\": { description: \"Department of Transportation\", display: \"DoT\" },\n \"DOTENV\": { description: \"Dotenv (.env)\", display: \"Dotenv\" },\n \"DR\": { description: \"Disaster Recovery\" },\n \"DRM\": { description: \"Digital Rights Management\" },\n \"DSN\": { description: \"Data Source Name\" },\n \"DWH\": { description: \"Data Warehouse\" },\n \"E2E\": { description: \"End to End\" },\n \"EAI\": { description: \"Enterprise Application Integration\" },\n \"EDT\": { description: \"Eastern Daylight Time\" },\n \"EEA\": { description: \"European Economic Area\" },\n \"EKS\": { description: \"Elastic Kubernetes Service\" },\n \"EOF\": { description: \"End Of File\" },\n \"EOD\": { description: \"End Of Day / Explosive Ordnance Disposal\" },\n \"EPA\": { description: \"Environmental Protection Agency\" },\n \"ER\": { description: \"Emergency Room / Entity Relationship\" },\n \"EST\": { description: \"Eastern Standard Time\" },\n \"ETC\": { description: \"Et Cetera\" },\n \"ETL\": { description: \"Extract, Transform, Load\" },\n \"EULA\": { description: \"End User License Agreement\" },\n \"FAAS\": { description: \"Function as a Service\", display: \"FaaS\" },\n \"FAQ\": { description: \"Frequently Asked Questions\", display: \"FAQs\" },\n \"FAQS\": { description: \"Frequently Asked Questions\" },\n \"FBI\": { description: \"Federal Bureau of Investigation\" },\n \"FCC\": { description: \"Federal Communications Commission\" },\n \"FDA\": { description: \"Food and Drug Administration\" },\n \"FIDO\": { description: \"Fast IDentity Online\" },\n \"FLOTUS\": { description: \"First Lady of the United States\" },\n \"FQDN\": { description: \"Fully Qualified Domain Name\" },\n \"FTC\": { description: \"Federal Trade Commission\" },\n \"FTP\": { description: \"File Transfer Protocol\" },\n \"GC\": { description: \"Garbage Collection\" },\n \"GCP\": { description: \"Google Cloud Platform\" },\n \"GDPR\": { description: \"General Data Protection Regulation\" },\n \"GMT\": { description: \"Greenwich Mean Time\" },\n \"GOP\": { description: \"Grand Old Party\" },\n \"GPU\": { description: \"Graphics Processing Unit\" },\n \"GUID\": { description: \"Globally Unique Identifier\" },\n \"GUI\": { description: \"Graphical User Interface\" },\n \"GZIP\": { description: \"GNU Zip\" },\n \"HCI\": {\n description: \"Human Computer Interaction / Hyper-Converged Infrastructure\"\n },\n \"HDD\": { description: \"Hard Disk Drive\" },\n \"HDFS\": { description: \"Hadoop Distributed File System\" },\n \"HHS\": { description: \"Health and Human Services\" },\n \"HIPAA\": {\n description: \"Health Insurance Portability and Accountability Act\"\n },\n \"HMAC\": { description: \"Hash-based Message Authentication Code\" },\n \"HOTP\": { description: \"HMAC-based One-Time Password\" },\n \"HSM\": { description: \"Hardware Security Module\" },\n \"HTML\": { description: \"HyperText Markup Language\" },\n \"HTTP\": { description: \"HyperText Transfer Protocol (HTTP)\" },\n \"HTTP/2\": { description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\" },\n \"HTTP/2.0\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP/3\": { description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\" },\n \"HTTP/3.0\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n \"HTTP2\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP2.0\": {\n description: \"HyperText Transfer Protocol Version 2 (HTTP/2)\",\n display: \"HTTP2\"\n },\n \"HTTP3\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n \"HTTP3.0\": {\n description: \"HyperText Transfer Protocol Version 3 (HTTP/3)\",\n display: \"HTTP3\"\n },\n \"HTTPS\": { description: \"HyperText Transfer Protocol Secure (HTTPS)\" },\n \"HTTPS/2\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\"\n },\n \"HTTPS/2.0\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS/3\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\"\n },\n \"HTTPS/3.0\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n \"HTTPS2\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS2.0\": {\n description: \"HyperText Transfer Protocol Secure Version 2 (HTTPS/2)\",\n display: \"HTTPS2\"\n },\n \"HTTPS3\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n \"HTTPS3.0\": {\n description: \"HyperText Transfer Protocol Secure Version 3 (HTTPS/3)\",\n display: \"HTTPS3\"\n },\n \"IAAS\": { description: \"Infrastructure as a Service\", display: \"IaaS\" },\n \"IAM\": { description: \"Identity and Access Management\" },\n \"IAMM\": { description: \"Identity and Access Management and Monitoring\" },\n \"IAMT\": { description: \"Identity and Access Management Tool\" },\n \"ID\": { description: \"Identifier\", display: \"Id\" },\n \"IFTTT\": { description: \"If This Then That\" },\n \"IMAP\": { description: \"Internet Message Access Protocol\" },\n \"IO\": { description: \"Input/Output\" },\n \"IP\": { description: \"Internet Protocol\" },\n \"IPFS\": { description: \"InterPlanetary File System\" },\n \"IPS\": { description: \"Intrusion Prevention System\" },\n \"ISO\": { description: \"International Organization for Standardization\" },\n \"IQ\": { description: \"Intelligence Quotient\", display: \"IQ\" },\n \"IOT\": { description: \"Internet of Things\", display: \"IoT\" },\n \"JSON\": { description: \"JavaScript Object Notation\" },\n \"JSONP\": { description: \"JSON with Padding\" },\n \"JWT\": { description: \"JSON Web Token\" },\n \"K8S\": { description: \"Kubernetes\", display: \"K8s\" },\n \"KMS\": { description: \"Key Management Service\" },\n \"KPI\": { description: \"Key Performance Indicator\" },\n \"KV\": { description: \"Key Value\" },\n \"LAN\": { description: \"Local Area Network\" },\n \"LHS\": { description: \"Left Hand Side\" },\n \"LPGA\": { description: \"Ladies Professional Golf Association\" },\n \"LXC\": { description: \"Linux Containers\" },\n \"MDT\": { description: \"Mountain Daylight Time\" },\n \"MFA\": { description: \"Multi-Factor Authentication\" },\n \"ML\": { description: \"Machine Learning\" },\n \"MLB\": { description: \"Major League Baseball\" },\n \"MLOps\": { description: \"Machine Learning Operations\" },\n \"MPA\": { description: \"Multi-Page Application\" },\n \"MST\": { description: \"Mountain Standard Time\" },\n \"MVC\": { description: \"Model View Controller\" },\n \"MVP\": { description: \"Minimum Viable Product / Most Valuable Player\" },\n \"NAIA\": { description: \"National Association of Intercollegiate Athletics\" },\n \"NAS\": { description: \"Network Attached Storage\" },\n \"NASA\": { description: \"National Aeronautics and Space Administration\" },\n \"NASCAR\": { description: \"National Association for Stock Car Auto Racing\" },\n \"NAT\": { description: \"Network Address Translation\" },\n \"NBA\": { description: \"National Basketball Association\" },\n \"NCAA\": { description: \"National Collegiate Athletic Association\" },\n \"NDA\": { description: \"Non-Disclosure Agreement\" },\n \"NFS\": { description: \"Network File System\" },\n \"NHL\": { description: \"National Hockey League\" },\n \"NIST\": { description: \"National Institute of Standards and Technology\" },\n \"NLP\": { description: \"Natural Language Processing\" },\n \"NPS\": { description: \"Net Promoter Score\" },\n \"NRA\": { description: \"National Rifle Association\" },\n \"NSFW\": { description: \"Not Safe For Work\" },\n \"NX\": { description: \"Nx\", display: \"Nx\" },\n \"OCR\": { description: \"Optical Character Recognition\" },\n \"OEM\": { description: \"Original Equipment Manufacturer\" },\n \"OKR\": { description: \"Objectives and Key Results\" },\n \"OLAP\": { description: \"Online Analytical Processing\" },\n \"OLTP\": { description: \"Online Transaction Processing\" },\n \"OOP\": { description: \"Object Oriented Programming\" },\n \"ORM\": { description: \"Object Relational Mapping\" },\n \"OS\": { description: \"Operating System\" },\n \"OSINT\": { description: \"Open Source Intelligence\" },\n \"OSS\": { description: \"Open Source Software\" },\n \"OTP\": { description: \"One-Time Password\" },\n \"P2P\": { description: \"Peer to Peer\" },\n \"PAAS\": { description: \"Platform as a Service\", display: \"PaaS\" },\n \"PCI\": { description: \"Payment Card Industry\" },\n \"PDP\": { description: \"Policy Decision Point / Product Detail Page\" },\n \"PDT\": { description: \"Pacific Daylight Time\" },\n \"PGA\": { description: \"Professional Golfers' Association\" },\n \"POTUS\": { description: \"President of the United States\" },\n \"PP\": { description: \"Pages / PayPal / Percentage Points\" },\n \"PST\": { description: \"Pacific Standard Time\" },\n \"PTO\": { description: \"Paid Time Off / Power Take-Off\" },\n \"PKI\": { description: \"Public Key Infrastructure\" },\n \"PWA\": { description: \"Progressive Web App\" },\n \"PX\": { description: \"Pixel\" },\n \"QA\": { description: \"Quality Assurance\" },\n \"R2\": { description: \"R2\" },\n \"RAID\": { description: \"Redundant Array of Independent Disks\" },\n \"RAM\": { description: \"Random Access Memory\" },\n \"RDS\": { description: \"Relational Database Service\" },\n \"REST\": { description: \"Representational State Transfer\" },\n \"RHS\": { description: \"Right Hand Side\" },\n \"ROI\": { description: \"Return on Investment\" },\n \"RPC\": { description: \"Remote Procedure Call\" },\n \"RPA\": { description: \"Robotic Process Automation\" },\n \"RSC\": { description: \"React Server Components\" },\n \"RSS\": { description: \"Really Simple Syndication\" },\n \"RUM\": { description: \"Real User Monitoring\" },\n \"S3\": { description: \"Simple Storage Service (S3)\" },\n \"SAN\": { description: \"Storage Area Network\" },\n \"SASE\": { description: \"Secure Access Service Edge\" },\n \"SCOTUS\": { description: \"Supreme Court of the United States\" },\n \"SDLC\": { description: \"Software Development Life Cycle\" },\n \"SDK\": { description: \"Software Development Kit\" },\n \"SEC\": { description: \"Securities and Exchange Commission\" },\n \"SEO\": { description: \"Search Engine Optimization\" },\n \"SFTP\": {\n description: \"SSH File Transfer Protocol / Secure File Transfer Protocol\"\n },\n \"SIEM\": { description: \"Security Information and Event Management\" },\n \"SLA\": { description: \"Service Level Agreement\" },\n \"SMB\": { description: \"Server Message Block / Small and Medium Business\" },\n \"SMTP\": { description: \"Simple Mail Transfer Protocol\" },\n \"SOAP\": { description: \"Simple Object Access Protocol\" },\n \"SOA\": { description: \"Service Oriented Architecture\" },\n \"SOC\": { description: \"Security Operations Center / System on Chip\" },\n \"SPA\": { description: \"Single Page Application\" },\n \"SPDY\": { description: 'Speedy (pronounced \"SPeeDY\")' },\n \"SPF\": { description: \"Sender Policy Framework\" },\n \"SQL\": { description: \"Structured Query Language\" },\n \"SRV\": { description: \"Service\" },\n \"SRE\": { description: \"Site Reliability Engineering\" },\n \"SSH\": { description: \"Secure Shell\" },\n \"SSDL\": { description: \"Secure Software Development Lifecycle\" },\n \"SSG\": { description: \"Static Site Generation\" },\n \"SSR\": { description: \"Server Side Rendering\" },\n \"SSO\": { description: \"Single Sign-On\" },\n \"SSL\": { description: \"Secure Sockets Layer\" },\n \"TDD\": { description: \"Test Driven Development\" },\n \"TLD\": { description: \"Top Level Domain\" },\n \"TLS\": { description: \"Transport Layer Security\" },\n \"TLS1.3\": { description: \"Transport Layer Security 1.3\" },\n \"TOR\": { description: \"The Onion Router\" },\n \"TOTP\": { description: \"Time-based One-Time Password\" },\n \"TRPC\": { description: \"TypeScript Remote Procedure Call\" },\n \"TSA\": { description: \"Transportation Security Administration\" },\n \"TTL\": { description: \"Time To Live\" },\n \"UDP\": { description: \"User Datagram Protocol\" },\n \"UI\": { description: \"User Interface\" },\n \"UID\": { description: \"Unique Identifier\" },\n \"URI\": { description: \"Uniform Resource Identifier\" },\n \"URL\": { description: \"Uniform Resource Locator\" },\n \"USOPC\": { description: \"United States Olympic & Paralympic Committee\" },\n \"USPS\": { description: \"United States Postal Service\" },\n \"USTA\": { description: \"United States Tennis Association\" },\n \"UTF\": { description: \"Unicode Transformation Format\" },\n \"UTC\": { description: \"Coordinated Universal Time\" },\n \"UUID\": { description: \"Universally Unique Identifier\" },\n \"UX\": { description: \"User Experience\" },\n \"VM\": { description: \"Virtual Machine\" },\n \"VLAN\": { description: \"Virtual Local Area Network\" },\n \"VPN\": { description: \"Virtual Private Network\" },\n \"VPPA\": { description: \"Video Privacy Protection Act\" },\n \"VR\": { description: \"Virtual Reality\" },\n \"WAF\": { description: \"Web Application Firewall\" },\n \"WAN\": { description: \"Wide Area Network\" },\n \"WNBA\": { description: \"Women's National Basketball Association\" },\n \"WLAN\": { description: \"Wireless Local Area Network\" },\n \"WPA\": { description: \"Wi-Fi Protected Access\" },\n \"WPA2\": { description: \"Wi-Fi Protected Access II\" },\n \"WPA3\": { description: \"Wi-Fi Protected Access III\" },\n \"WWW\": { description: \"World Wide Web\" },\n \"WYSIWYG\": { description: \"What You See Is What You Get\" },\n \"XACML\": { description: \"eXtensible Access Control Markup Language\" },\n \"XDG\": { description: \"Cross-Desktop Group\" },\n \"XML\": { description: \"eXtensible Markup Language\" },\n \"XSRF\": { description: \"Cross-Site Request Forgery\" },\n \"XSS\": { description: \"Cross-Site Scripting\" },\n \"XR\": { description: \"Extended Reality\" },\n \"YAML\": { description: \"YAML Ain't Markup Language\" },\n \"YMCA\": { description: \"Young Men's Christian Association\" },\n \"YWCA\": { description: \"Young Women's Christian Association\" },\n \"ZTA\": { description: \"Zero Trust Architecture\" }\n} as const;\n\nexport const ACRONYM_DISPLAY: Record<string, string> = Object.fromEntries(\n Object.entries(ACRONYMS).map(([key, value]) => [key, value.display ?? key])\n);\n\nexport const ACRONYM_DESCRIPTION: Record<string, string> = Object.fromEntries(\n Object.entries(ACRONYMS).map(([key, value]) => [key, value.description])\n);\n\nexport const ACRONYM_LIST: string[] = Object.keys(ACRONYMS);\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const ARTICLES = [\"a\", \"an\", \"the\"];\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const CONJUNCTIONS = [\n \"and\",\n \"that\",\n \"but\",\n \"or\",\n \"as\",\n \"if\",\n \"when\",\n \"than\",\n \"because\",\n \"while\",\n \"where\",\n \"after\",\n \"so\",\n \"though\",\n \"since\",\n \"until\",\n \"whether\",\n \"before\",\n \"although\",\n \"nor\",\n \"like\",\n \"once\",\n \"unless\",\n \"now\",\n \"except\"\n];\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const PREPOSITIONS = [\n \"about\",\n \"above\",\n \"across\",\n \"after\",\n \"against\",\n \"along\",\n \"among\",\n \"around\",\n \"at\",\n \"because of\",\n \"before\",\n \"behind\",\n \"below\",\n \"beneath\",\n \"beside\",\n \"besides\",\n \"between\",\n \"beyond\",\n \"but\",\n \"by\",\n \"concerning\",\n \"despite\",\n \"down\",\n \"during\",\n \"except\",\n \"excepting\",\n \"for\",\n \"from\",\n \"in\",\n \"in front of\",\n \"inside\",\n \"in spite of\",\n \"instead of\",\n \"into\",\n \"like\",\n \"near\",\n \"of\",\n \"off\",\n \"on\",\n \"onto\",\n \"out\",\n \"outside\",\n \"over\",\n \"past\",\n \"regarding\",\n \"since\",\n \"through\",\n \"throughout\",\n \"to\",\n \"toward\",\n \"under\",\n \"underneath\",\n \"until\",\n \"up\",\n \"upon\",\n \"up to\",\n \"with\",\n \"within\",\n \"without\",\n \"with regard to\",\n \"with respect to\"\n];\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const SPECIAL_CASES = [\n \"2FA\",\n \"4K\",\n \"5K\",\n \"8K\",\n \"AGI\",\n \"BI\",\n \"ChatGPT\",\n \"CTA\",\n \"DateTime\",\n \"FMS\",\n \"GitHub\",\n \"GPT\",\n \"HD\",\n \"IBMid\",\n \"IDs\",\n \"iMac\",\n \"IMAX\",\n \"iOS\",\n \"iPad\",\n \"iPhone\",\n \"iPod\",\n \"LDAP\",\n \"LinkedIn\",\n \"LLM\",\n \"macOS\",\n \"McDonalds\",\n \"MCP\",\n \"ML\",\n \"MySQL\",\n \"NLG\",\n \"NLP\",\n \"NLU\",\n \"OpenAI\",\n \"PDFs\",\n \"PIM\",\n \"PEFT\",\n \"pH\",\n \"PostgreSQL\",\n \"SEO\",\n \"TTS\",\n \"UHD\",\n \"UUID\",\n \"XSS\",\n \"YouTube\",\n \"CSpell\",\n \"ESLint\"\n];\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ACRONYMS } from \"./acronyms\";\nimport { ARTICLES } from \"./articles\";\nimport { CONJUNCTIONS } from \"./conjunctions\";\nimport { PREPOSITIONS } from \"./prepositions\";\nimport { SPECIAL_CASES } from \"./special-cases\";\n\nexport interface FormatSpecialCasesOptions {\n /**\n * If true, use the descriptions from the acronym list instead of the display names.\n *\n * @defaultValue true\n */\n useDescriptions?: boolean;\n}\n\n/**\n * Handle special words in a title.\n *\n * @see https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case\n *\n * @param value - The word to handle\n * @param index - The index of the word in the title\n * @param words - The full title as an array of words\n * @returns The formatted word\n */\nexport function formatSpecialCases(\n value: string,\n index: number,\n words: string[],\n options?: FormatSpecialCasesOptions\n): string {\n const lowercaseStr = value.toLowerCase();\n const uppercaseStr = value.toUpperCase();\n\n for (const special of SPECIAL_CASES) {\n if (special.toLowerCase() === lowercaseStr) {\n return special;\n }\n }\n\n if (ACRONYMS[uppercaseStr]) {\n return options?.useDescriptions !== false\n ? ACRONYMS[uppercaseStr].description\n : ACRONYMS[uppercaseStr].display || uppercaseStr;\n }\n\n // If the word is the first word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === 0) {\n return value;\n }\n\n // If the word is the last word in the sentence, but it's not a specially\n // cased word or an acronym, return the capitalized string\n if (index === words.length - 1) {\n return value;\n }\n\n // Return the word capitalized if it's 4 characters or more\n if (value.length >= 4) {\n return value;\n }\n\n if (PREPOSITIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (CONJUNCTIONS.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n if (ARTICLES.includes(lowercaseStr)) {\n return lowercaseStr;\n }\n\n return value;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Upper case the first character of an input string.\n *\n * @remarks\n * \"Thisisanexample\"\n *\n * @param input - The input string.\n * @returns The capitalized string.\n */\nexport function upperCaseFirst<T extends string | undefined>(input?: T): T {\n return (input ? input.charAt(0).toUpperCase() + input.slice(1) : input) as T;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { combine } from \"./combine\";\nimport { decamelize } from \"./decamelize\";\nimport type { FormatSpecialCasesOptions } from \"./format-special-cases\";\nimport { formatSpecialCases } from \"./format-special-cases\";\nimport { upperCaseFirst } from \"./upper-case-first\";\n\n/**\n * Convert a string to title case.\n *\n * @param input - The input string to convert.\n * @param options - Options for formatting special cases.\n * @returns The title cased string.\n */\nexport function titleCase<T extends string | undefined>(\n input: T,\n options?: FormatSpecialCasesOptions\n): T {\n return input\n ?.split(/\\s+-\\s+/)\n .map(segment =>\n decamelize(segment)\n .split(/[\\s\\-_]/)\n .map(upperCaseFirst)\n .map((value: string, index: number, array: string[]) =>\n formatSpecialCases(value, index, array, options)\n )\n .reduce(combine)\n )\n .join(\" - \") as T;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n// Forked from https://www.npmjs.com/package/env-paths\n\nconst homedir = os.homedir();\nconst tmpdir = os.tmpdir();\n\n/**\n * Options for the `getEnvPaths` function.\n */\nexport interface GetEnvPathsOptions {\n /**\n * The name of the organization\n *\n * @defaultValue \"storm-software\"\n */\n orgId?: string;\n\n /**\n * The name of the specific application to use as a nested folder inside the organization's folder\n *\n * For example: `~/ ... /storm-software/Log/<appId>`\n */\n appId?: string;\n\n /**\n * The name of the specific application to use as a nested folder inside the organization's folder\n *\n * When a value is provided, it will use `~/ ... /storm-software/Log/<appId>/<nestedDir>`\n *\n * @remarks\n * If no child is provided, it will use `~/ ... /storm-software/Log/<appId>`\n */\n nestedDir?: string;\n\n /**\n * The suffix to append to the project name.\n *\n * @remarks\n * If `suffix` is `true`, the project name will be suffixed with `\"nodejs\"`.\n *\n * @defaultValue false\n */\n suffix?: string | boolean | null;\n\n /**\n * The root directory of the workspace that is used for determining the `cache` and `tmp` paths if they were not already set by other means.\n */\n workspaceRoot?: string;\n}\n\nexport interface EnvPaths {\n data: string;\n config: string;\n cache: string;\n log: string;\n temp: string;\n}\n\nconst macos = (orgId: string): EnvPaths => {\n const library = joinPaths(homedir, \"Library\");\n\n return {\n data: joinPaths(library, \"Application Support\", orgId),\n config: joinPaths(library, \"Preferences\", orgId),\n cache: joinPaths(library, \"Caches\", orgId),\n log: joinPaths(library, \"Logs\", orgId),\n temp: joinPaths(tmpdir, orgId)\n };\n};\n\nconst windows = (orgId: string): EnvPaths => {\n const appData =\n process.env.APPDATA || joinPaths(homedir, \"AppData\", \"Roaming\");\n const localAppData =\n process.env.LOCALAPPDATA || joinPaths(homedir, \"AppData\", \"Local\");\n\n const windowsFormattedOrgId = titleCase(orgId).trim().replace(/\\s+/g, \"\");\n\n return {\n // Data/config/cache/log are invented by me as Windows isn't opinionated about this\n data: joinPaths(localAppData, windowsFormattedOrgId, \"Data\"),\n config: joinPaths(appData, windowsFormattedOrgId, \"Config\"),\n cache: joinPaths(localAppData, \"Cache\", orgId),\n log: joinPaths(localAppData, windowsFormattedOrgId, \"Log\"),\n temp: joinPaths(tmpdir, orgId)\n };\n};\n\n// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html\nconst linux = (orgId: string): EnvPaths => {\n const username = path.basename(homedir);\n\n return {\n data: joinPaths(\n process.env.XDG_DATA_HOME || joinPaths(homedir, \".local\", \"share\"),\n orgId\n ),\n config: joinPaths(\n process.env.XDG_CONFIG_HOME || joinPaths(homedir, \".config\"),\n orgId\n ),\n cache: joinPaths(\n process.env.XDG_CACHE_HOME || joinPaths(homedir, \".cache\"),\n orgId\n ),\n // https://wiki.debian.org/XDGBaseDirectorySpecification#state\n log: joinPaths(\n process.env.XDG_STATE_HOME || joinPaths(homedir, \".local\", \"state\"),\n orgId\n ),\n // https://devenv.sh/files-and-variables/#devenv_root\n temp:\n process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR\n ? joinPaths(\n (process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR)!,\n orgId\n )\n : joinPaths(tmpdir, username, orgId)\n };\n};\n\n/**\n * Get paths for storing things like data, config, logs, and cache in the current runtime environment.\n *\n * @remarks\n * On macOS, directories are generally created in `~/Library/Application Support/<name>`.\n * On Windows, directories are generally created in `%AppData%/<name>`.\n * On Linux, directories are generally created in `~/.config/<name>` - this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/).\n *\n * If the `STORM_DATA_DIR`, `STORM_CONFIG_DIR`, `STORM_CACHE_DIR`, `STORM_LOG_DIR`, or `STORM_TEMP_DIR` environment variables are set, they will be used instead of the default paths.\n *\n * @param options - Parameters used to determine the specific paths for the current project/runtime environment\n * @returns An object containing the various paths for the runtime environment\n */\nexport function getEnvPaths(options: GetEnvPathsOptions = {}): EnvPaths {\n let orgId = options.orgId || \"storm-software\";\n if (!orgId) {\n throw new Error(\n \"You need to provide an orgId to the `getEnvPaths` function\"\n );\n }\n\n if (options.suffix) {\n // Add suffix to prevent possible conflict with native apps\n orgId += `-${typeof options.suffix === \"string\" ? options.suffix : \"nodejs\"}`;\n }\n\n let result = {} as EnvPaths;\n\n if (process.platform === \"darwin\") {\n result = macos(orgId);\n } else if (process.platform === \"win32\") {\n result = windows(orgId);\n } else {\n result = linux(orgId);\n }\n\n if (process.env.STORM_DATA_DIR) {\n result.data = process.env.STORM_DATA_DIR;\n } else if (process.env.STORM_CONFIG_DIR) {\n result.config = process.env.STORM_CONFIG_DIR;\n } else if (process.env.STORM_CACHE_DIR) {\n result.cache = process.env.STORM_CACHE_DIR;\n } else if (process.env.STORM_LOG_DIR) {\n result.log = process.env.STORM_LOG_DIR;\n } else if (process.env.STORM_TEMP_DIR) {\n result.temp = process.env.STORM_TEMP_DIR;\n }\n\n if (options.workspaceRoot) {\n result.cache ??= joinPaths(\n options.workspaceRoot,\n \"node_modules\",\n \".cache\",\n orgId\n );\n result.temp ??= joinPaths(options.workspaceRoot, \"tmp\", orgId);\n result.log ??= joinPaths(result.temp, \"logs\");\n result.config ??= joinPaths(options.workspaceRoot, \".config\", orgId);\n }\n\n return Object.keys(result).reduce((ret, key) => {\n if (result[key as keyof EnvPaths]) {\n const filePath = result[key as keyof EnvPaths];\n\n ret[key as keyof EnvPaths] =\n options.appId &&\n options.appId !== options.orgId &&\n options.appId !== options.nestedDir\n ? joinPaths(filePath, options.appId)\n : filePath;\n\n if (\n options.nestedDir &&\n options.nestedDir !== options.orgId &&\n options.nestedDir !== options.appId\n ) {\n ret[key as keyof EnvPaths] = joinPaths(\n ret[key as keyof EnvPaths],\n options.nestedDir\n );\n }\n }\n\n return ret;\n }, {} as EnvPaths);\n}\n"],"mappings":"8FAyBA,SAAgB,EAAQ,EAAa,EAAqB,CACxD,MAAO,GAAG,EAAI,GAAG,ICFnB,SAAgB,EAAW,EAAuB,CAChD,OAAO,EACJ,QAAQ,oBAAqB,QAAQ,CACrC,QAAQ,2BAA4B,QAAQ,CAC5C,aAAa,CCJlB,MAAaA,EAGT,CACF,KAAM,CAAE,YAAa,kBAAmB,QAAS,KAAM,CACvD,KAAM,CAAE,YAAa,oBAAqB,QAAS,KAAM,CACzD,KAAM,CAAE,YAAa,mBAAoB,QAAS,KAAM,CACxD,KAAM,CAAE,YAAa,qCAAsC,CAC3D,KAAM,CAAE,YAAa,qCAAsC,CAC3D,KAAM,CAAE,YAAa,uCAAwC,CAC7D,KAAM,CAAE,YAAa,sCAAuC,CAC5D,KAAQ,CAAE,YAAa,gDAAiD,CACxE,KAAQ,CAAE,YAAa,mBAAoB,CAC3C,IAAO,CAAE,YAAa,+BAAgC,CACtD,GAAM,CAAE,YAAa,0BAA2B,CAChD,KAAQ,CAAE,YAAa,kCAAmC,CAC1D,IAAO,CAAE,YAAa,oCAAqC,CAC3D,GAAM,CAAE,YAAa,oBAAqB,CAC1C,MAAS,CACP,YAAa,qDACd,CACD,IAAO,CAAE,YAAa,sDAAuD,CAC7E,IAAO,CAAE,YAAa,2BAA4B,CAClD,IAAO,CAAE,YAAa,uBAAwB,CAC9C,IAAO,CAAE,YAAa,uBAAwB,CAC9C,MAAS,CACP,YAAa,sDACd,CACD,IAAO,CAAE,YAAa,uBAAwB,CAC9C,KAAQ,CAAE,YAAa,gCAAiC,CACxD,GAAM,CAAE,YAAa,wBAAyB,CAC9C,KAAQ,CAAE,YAAa,4BAA6B,CACpD,IAAO,CAAE,YAAa,0BAA2B,CAC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AAQ,EAAK,IAAQ,CAC9C,GAAI,EAAO,GAAwB,CACjC,IAAM,EAAW,EAAO,GAExB,EAAI,GACF,EAAQ,OACR,EAAQ,QAAU,EAAQ,OAC1B,EAAQ,QAAU,EAAQ,UACtB,EAAU,EAAU,EAAQ,MAAM,CAClC,EAGJ,EAAQ,WACR,EAAQ,YAAc,EAAQ,OAC9B,EAAQ,YAAc,EAAQ,QAE9B,EAAI,GAAyB,EAC3B,EAAI,GACJ,EAAQ,UACT,EAIL,OAAO,GACN,EAAE,CAAa"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
//#region src/get-env-paths.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Options for the `getEnvPaths` function.
|
|
4
|
-
*/
|
|
5
|
-
interface GetEnvPathsOptions {
|
|
6
|
-
/**
|
|
7
|
-
* The name of the organization
|
|
8
|
-
*
|
|
9
|
-
* @defaultValue "storm-software"
|
|
10
|
-
*/
|
|
11
|
-
orgId?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The name of the specific application to use as a nested folder inside the organization's folder
|
|
14
|
-
*
|
|
15
|
-
* For example: `~/ ... /storm-software/Log/<appId>`
|
|
16
|
-
*/
|
|
17
|
-
appId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* The name of the specific application to use as a nested folder inside the organization's folder
|
|
20
|
-
*
|
|
21
|
-
* When a value is provided, it will use `~/ ... /storm-software/Log/<appId>/<nestedDir>`
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* If no child is provided, it will use `~/ ... /storm-software/Log/<appId>`
|
|
25
|
-
*/
|
|
26
|
-
nestedDir?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The suffix to append to the project name.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* If `suffix` is `true`, the project name will be suffixed with `"nodejs"`.
|
|
32
|
-
*
|
|
33
|
-
* @defaultValue false
|
|
34
|
-
*/
|
|
35
|
-
suffix?: string | boolean | null;
|
|
36
|
-
/**
|
|
37
|
-
* The root directory of the workspace that is used for determining the `cache` and `tmp` paths if they were not already set by other means.
|
|
38
|
-
*/
|
|
39
|
-
workspaceRoot?: string;
|
|
40
|
-
}
|
|
41
|
-
interface EnvPaths {
|
|
42
|
-
data: string;
|
|
43
|
-
config: string;
|
|
44
|
-
cache: string;
|
|
45
|
-
log: string;
|
|
46
|
-
temp: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Get paths for storing things like data, config, logs, and cache in the current runtime environment.
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* On macOS, directories are generally created in `~/Library/Application Support/<name>`.
|
|
53
|
-
* On Windows, directories are generally created in `%AppData%/<name>`.
|
|
54
|
-
* On Linux, directories are generally created in `~/.config/<name>` - this is determined via the [XDG Base Directory spec](https://specifications.freedesktop.org/basedir-spec/latest/).
|
|
55
|
-
*
|
|
56
|
-
* If the `STORM_DATA_DIR`, `STORM_CONFIG_DIR`, `STORM_CACHE_DIR`, `STORM_LOG_DIR`, or `STORM_TEMP_DIR` environment variables are set, they will be used instead of the default paths.
|
|
57
|
-
*
|
|
58
|
-
* @param options - Parameters used to determine the specific paths for the current project/runtime environment
|
|
59
|
-
* @returns An object containing the various paths for the runtime environment
|
|
60
|
-
*/
|
|
61
|
-
declare function getEnvPaths(options?: GetEnvPathsOptions): EnvPaths;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { GetEnvPathsOptions as n, getEnvPaths as r, EnvPaths as t };
|
|
64
|
-
//# sourceMappingURL=get-env-paths-KTCEsWqe.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-env-paths-KTCEsWqe.d.mts","names":[],"sources":["../src/get-env-paths.ts"],"sourcesContent":[],"mappings":";;AA+BA;AAyCA;AAoFgB,UA7HC,kBAAA,CA6HoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UApFpB,QAAA;;;;;;;;;;;;;;;;;;;;iBAoFD,WAAA,WAAqB,qBAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=/^[A-Z]:\//i,l=/^[A-Z]:$/i,u=/^[/\\]{2}/,d=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;function f(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function p(e){return d.test(f(e))}function m(e){return p(e)}function h(e=``){return e&&e.replace(/\\/g,`/`).replace(c,e=>e.toUpperCase())}function g(e){if(!e||e.length===0)return`.`;e=h(e);let t=e.match(u),n=m(e),r=e[e.length-1]===`/`;return e=v(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),l.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!m(e)?`/${e}`:e)}function _(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;e&&r?t+=n.slice(1):t+=e||r?n:`/${n}`}else t+=n;return g(t)}function v(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=/^[A-Z]:\//i,t=/^[A-Z]:$/i,n=/^[/\\]{2}/,r=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;function i(e){return e.startsWith(`\\\\?\\`)?e:e.replace(/\\/g,`/`)}function a(e){return r.test(i(e))}function o(e){return a(e)}function s(t=``){return t&&t.replace(/\\/g,`/`).replace(e,e=>e.toUpperCase())}function c(e){if(!e||e.length===0)return`.`;e=s(e);let r=e.match(n),i=o(e),a=e[e.length-1]===`/`;return e=u(e,!i),e.length===0?i?`/`:a?`./`:`.`:(a&&(e+=`/`),t.test(e)&&(e+=`/`),r?i?`//${e}`:`//./${e}`:i&&!o(e)?`/${e}`:e)}function l(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;e&&r?t+=n.slice(1):t+=e||r?n:`/${n}`}else t+=n;return c(t)}function u(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}export{l as t};
|
|
2
|
-
//# sourceMappingURL=join-paths-DoUrclq3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"join-paths-DoUrclq3.mjs","names":["char: string | null"],"sources":["../../path/src/regex.ts","../../path/src/slash.ts","../../path/src/is-type.ts","../../path/src/join-paths.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nexport const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\n\nexport const UNC_REGEX = /^[/\\\\]{2}/;\n\nexport const ABSOLUTE_PATH_REGEX =\n /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\n\nexport const ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\n\nexport const FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\n\nexport const PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nexport const NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isAbsolutePath } from \"./is-type\";\n\n/**\n * Replace backslash to slash\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function slash(path: string) {\n if (path.startsWith(\"\\\\\\\\?\\\\\")) {\n return path;\n }\n\n return path.replace(/\\\\/g, \"/\");\n}\n\n/**\n * Replace backslash to slash and remove unneeded leading and trailing slashes\n *\n * @param path - The string to replace\n * @returns The string with replaced backslashes\n */\nexport function formatSlash(path: string) {\n const formatted = slash(path);\n\n return isAbsolutePath(formatted)\n ? formatted.replace(/\\/+$/g, \"\")\n : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ABSOLUTE_PATH_REGEX, NPM_SCOPED_PACKAGE_REGEX } from \"./regex\";\nimport { slash } from \"./slash\";\n\n/**\n * Check if the path is an absolute path.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is an absolute path\n */\nexport function isAbsolutePath(path: string): boolean {\n return ABSOLUTE_PATH_REGEX.test(slash(path));\n}\n\n/**\n * Check if the path is an absolute path.\n *\n * @remarks\n * This is an alias for {@link isAbsolutePath}.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is an absolute path\n */\nexport function isAbsolute(path: string): boolean {\n return isAbsolutePath(path);\n}\n\n/**\n * Check if the path is a relative path.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a relative path\n */\nexport function isRelativePath(path: string): boolean {\n return !isAbsolutePath(path);\n}\n\n/**\n * Check if the path is a relative path.\n *\n * @remarks\n * This is an alias for {@link isRelativePath}.\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a relative path\n */\nexport function isRelative(path: string): boolean {\n return isRelativePath(path);\n}\n\n/**\n * Check if the path is a npm package path.\n *\n * @remarks\n * This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackage}.\n *\n * @example\n * ```ts\n * isNpmScopedPackage(\"@stryke/path\"); // returns true\n * isNpmScopedPackage(\"lodash\"); // returns false\n * isNpmNamespacePackage(\"./src/index.ts\"); // returns false\n * ```\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a npm package path\n */\nexport function isNpmScopedPackagePath(path: string): boolean {\n return NPM_SCOPED_PACKAGE_REGEX.test(slash(path));\n}\n\n/**\n * Check if the path is a npm package path.\n *\n * @remarks\n * This only checks if the path matches the npm namespace scoped package naming convention such as `@scope/package-name`. This is an alias for {@link isNpmScopedPackagePath}.\n *\n * @example\n * ```ts\n * isNpmScopedPackagePath(\"@stryke/path\"); // returns true\n * isNpmScopedPackagePath(\"lodash\"); // returns false\n * isNpmScopedPackagePath(\"./src/index.ts\"); // returns false\n * ```\n *\n * @param path - The path to check\n * @returns An indicator specifying if the path is a npm package path\n */\nexport function isNpmScopedPackage(path: string): boolean {\n return isNpmScopedPackagePath(path);\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isAbsolute } from \"./is-type\";\nimport {\n DRIVE_LETTER_REGEX,\n DRIVE_LETTER_START_REGEX,\n UNC_REGEX\n} from \"./regex\";\n\n// Util to normalize windows paths to posix\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input\n .replace(/\\\\/g, \"/\")\n .replace(DRIVE_LETTER_START_REGEX, r => r.toUpperCase());\n}\n\nfunction correctPaths(path?: string) {\n if (!path || path.length === 0) {\n return \".\";\n }\n\n // Normalize windows argument\n path = normalizeWindowsPath(path);\n\n const isUNCPath = path.match(UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n\n // Normalize the path\n path = normalizeString(path, !isPathAbsolute);\n\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (DRIVE_LETTER_REGEX.test(path)) {\n path += \"/\";\n }\n\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n}\n\n/**\n * Joins all given path segments together using the platform-specific separator as a delimiter.\n * The resulting path is normalized to remove any redundant or unnecessary segments.\n *\n * @param segments - The path segments to join.\n * @returns The joined and normalized path string.\n */\nexport function joinPaths(...segments: string[]): string {\n let path = \"\";\n\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n\n return correctPaths(path);\n}\n\nexport const join = joinPaths;\n\n/**\n * Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n *\n * @param path - The path to normalize.\n * @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n * @returns the normalized path string.\n */\nfunction normalizeString(path: string, allowAboveRoot: boolean) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char: string | null = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n // casted because we know it exists thanks to the length check\n char = path[index] as string;\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res[res.length - 1] !== \".\" ||\n res[res.length - 2] !== \".\"\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n"],"mappings":"AAkBA,MAAa,EAA2B,aAC3B,EAAqB,YAErB,EAAY,YAEZ,EACX,wDCEF,SAAgB,EAAM,EAAc,CAKlC,OAJI,EAAK,WAAW,UAAU,CACrB,EAGF,EAAK,QAAQ,MAAO,IAAI,CCJjC,SAAgB,EAAe,EAAuB,CACpD,OAAO,EAAoB,KAAK,EAAM,EAAK,CAAC,CAY9C,SAAgB,EAAW,EAAuB,CAChD,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,IAAsB,GACtB,EAAI,EAAI,OAAS,KAAO,KACxB,EAAI,EAAI,OAAS,KAAO,QAEpB,EAAI,OAAS,EAAG,CAClB,IAAM,EAAiB,EAAI,YAAY,IAAI,CACvC,IAAmB,IACrB,EAAM,GACN,EAAoB,IAEpB,EAAM,EAAI,MAAM,EAAG,EAAe,CAClC,EAAoB,EAAI,OAAS,EAAI,EAAI,YAAY,IAAI,EAE3D,EAAY,EACZ,EAAO,EACP,iBACS,EAAI,OAAS,EAAG,CACzB,EAAM,GACN,EAAoB,EACpB,EAAY,EACZ,EAAO,EACP,UAGA,IACF,GAAO,EAAI,OAAS,EAAI,MAAQ,KAChC,EAAoB,QAGlB,EAAI,OAAS,EACf,GAAO,IAAI,EAAK,MAAM,EAAY,EAAG,EAAM,GAE3C,EAAM,EAAK,MAAM,EAAY,EAAG,EAAM,CAExC,EAAoB,EAAQ,EAAY,EAE1C,EAAY,EACZ,EAAO,OACE,IAAS,KAAO,IAAS,GAClC,EAAE,EAEF,EAAO,GAGX,OAAO"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { t as DotenvParseOutput } from "./types-D7S9q0_s.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/load-env.d.ts
|
|
4
|
-
declare function getEnvFilesForMode(envDir: string, mode?: string): string[];
|
|
5
|
-
/**
|
|
6
|
-
* Load environment variables from a .env file.
|
|
7
|
-
*
|
|
8
|
-
* @param envFile - The path to the .env file.
|
|
9
|
-
* @returns The environment variables.
|
|
10
|
-
*/
|
|
11
|
-
declare function loadEnvFile(envFile: string, envDir?: string | string[]): Promise<DotenvParseOutput>;
|
|
12
|
-
/**
|
|
13
|
-
* Load environment variables from .env files.
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:
|
|
17
|
-
* - `.env`
|
|
18
|
-
* - `.env.local`
|
|
19
|
-
* - `.env.production`
|
|
20
|
-
* - `.env.production.local`
|
|
21
|
-
*
|
|
22
|
-
* @param envDir - The directory/directories to load the environment variables from.
|
|
23
|
-
* @param mode - The mode to load the environment variables for.
|
|
24
|
-
* @param prefix - The prefix or prefixes to use for the environment variables.
|
|
25
|
-
* @returns The environment variables.
|
|
26
|
-
*/
|
|
27
|
-
declare function loadEnv(envDir: string | string[], mode?: string, prefix?: string | string[]): Promise<DotenvParseOutput>;
|
|
28
|
-
/**
|
|
29
|
-
* Load environment variables from .env files for a client-side environment.
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
* This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:
|
|
33
|
-
* - `.env`
|
|
34
|
-
* - `.env.local`
|
|
35
|
-
* - `.env.production`
|
|
36
|
-
* - `.env.production.local`
|
|
37
|
-
*
|
|
38
|
-
* @param envDir - The directory/directories to load the environment variables from.
|
|
39
|
-
* @param mode - The mode to load the environment variables for.
|
|
40
|
-
* @param prefix - The prefix or prefixes to use for the environment variables.
|
|
41
|
-
* @returns The environment variables.
|
|
42
|
-
*/
|
|
43
|
-
declare function loadClientEnv(envDir: string | string[], mode?: string, prefix?: string | string[]): Promise<DotenvParseOutput>;
|
|
44
|
-
/**
|
|
45
|
-
* Load environment variables from .env files for a server-side environment.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:
|
|
49
|
-
* - `.env`
|
|
50
|
-
* - `.env.local`
|
|
51
|
-
* - `.env.production`
|
|
52
|
-
* - `.env.production.local`
|
|
53
|
-
*
|
|
54
|
-
* @param envDir - The directory/directories to load the environment variables from.
|
|
55
|
-
* @param mode - The mode to load the environment variables for.
|
|
56
|
-
* @returns The environment variables.
|
|
57
|
-
*/
|
|
58
|
-
declare function loadServerEnv(envDir: string | string[], mode: string): Promise<DotenvParseOutput>;
|
|
59
|
-
//#endregion
|
|
60
|
-
export { loadServerEnv as a, loadEnvFile as i, loadClientEnv as n, loadEnv as r, getEnvFilesForMode as t };
|
|
61
|
-
//# sourceMappingURL=load-env-B_Q4iLSZ.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-env-B_Q4iLSZ.d.mts","names":[],"sources":["../src/load-env.ts"],"sourcesContent":[],"mappings":";;;iBA4BgB,kBAAA;;AAAhB;AAmBA;AAiDA;AAmGA;AAsBA;iBA1KsB,WAAA,+CAGnB,QAAQ;;;;;;;;;;;;;;;;iBA8CW,OAAA,wEAInB,QAAQ;;;;;;;;;;;;;;;;iBA+FW,aAAA,wEAInB,QAAQ;;;;;;;;;;;;;;;iBAkBW,aAAA,2CAGnB,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./join-paths-BMFGURJb.cjs`),t=require(`./types-2O6mBvGZ.cjs`);let n=require(`@dotenvx/dotenvx`),r=require(`node:fs`),i=require(`node:fs/promises`),a=require(`defu`);a=e.n(a);function o(e){return e??=[],Array.isArray(e)?e:[e]}function s(e){return(0,r.existsSync)(e)}const c=async e=>{if(!e)throw Error(`No file path provided to read data`);return(0,i.readFile)(e,{encoding:`utf8`})};function l(t,n=`production`){return[`.env`,`.env.local`,`.env.${n}`,`.env.${n}.local`,`.env.local.${n}`].map(n=>e.t(t,n))}async function u(t,r=[]){let i=Array.isArray(r)?r:[r];return(await Promise.all((r.length>0?i.map(n=>e.t(n,t)):[t]).map(async e=>{if(s(e))return c(e)}))).reduce((e,t)=>t?(0,a.default)((0,n.parse)(t,{processEnv:{...process.env},privateKey:process.env.DOTENV_PRIVATE_KEY||process.env.STORM_PRIVATE_KEY}),e):e,{})}async function d(e,t,n){if(t===`local`)throw Error(`"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.`);let r=o(n).reduce((e,t)=>t?(e.includes(t.endsWith(`_`)?t:`${t}_`)||e.push(t.endsWith(`_`)?t:`${t}_`),e.includes(`${t.endsWith(`_`)?t:`${t}_`}PUBLIC_`)||e.push(`${t.endsWith(`_`)?t:`${t}_`}PUBLIC_`),e):e,[]),i=Array.isArray(e)?e:[e],s={},c=i.reduce((e,n)=>(e.push(...l(n,t).filter(t=>!e.includes(t))),e),[]),d=(await Promise.all(c.map(async e=>u(e)))).reduce((e,t)=>(0,a.default)(t,e),{});if(d.NODE_ENV&&process.env.VITE_USER_NODE_ENV===void 0&&(process.env.VITE_USER_NODE_ENV=JSON.stringify(d.NODE_ENV)),d.BROWSER&&process.env.BROWSER===void 0&&(process.env.BROWSER=JSON.stringify(d.BROWSER)),d.BROWSER_ARGS&&process.env.BROWSER_ARGS===void 0&&(process.env.BROWSER_ARGS=JSON.stringify(d.BROWSER_ARGS)),d=(0,a.default)({...process.env},d),r.length===0)return d;for(let[e,t]of Object.entries(d))r.some(t=>e.startsWith(t))&&(s[e]=String(t));for(let e in process.env)r.some(t=>e.startsWith(t))&&(s[e]=process.env[e]);return s}async function f(e,n,r=t.t){return d(e,n,r)}async function p(e,t){return d(e,t)}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { t as DotenvParseOutput } from "./types-DJpwQAko.cjs";
|
|
2
|
-
|
|
3
|
-
//#region src/load-env.d.ts
|
|
4
|
-
declare function getEnvFilesForMode(envDir: string, mode?: string): string[];
|
|
5
|
-
/**
|
|
6
|
-
* Load environment variables from a .env file.
|
|
7
|
-
*
|
|
8
|
-
* @param envFile - The path to the .env file.
|
|
9
|
-
* @returns The environment variables.
|
|
10
|
-
*/
|
|
11
|
-
declare function loadEnvFile(envFile: string, envDir?: string | string[]): Promise<DotenvParseOutput>;
|
|
12
|
-
/**
|
|
13
|
-
* Load environment variables from .env files.
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:
|
|
17
|
-
* - `.env`
|
|
18
|
-
* - `.env.local`
|
|
19
|
-
* - `.env.production`
|
|
20
|
-
* - `.env.production.local`
|
|
21
|
-
*
|
|
22
|
-
* @param envDir - The directory/directories to load the environment variables from.
|
|
23
|
-
* @param mode - The mode to load the environment variables for.
|
|
24
|
-
* @param prefix - The prefix or prefixes to use for the environment variables.
|
|
25
|
-
* @returns The environment variables.
|
|
26
|
-
*/
|
|
27
|
-
declare function loadEnv(envDir: string | string[], mode?: string, prefix?: string | string[]): Promise<DotenvParseOutput>;
|
|
28
|
-
/**
|
|
29
|
-
* Load environment variables from .env files for a client-side environment.
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
* This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:
|
|
33
|
-
* - `.env`
|
|
34
|
-
* - `.env.local`
|
|
35
|
-
* - `.env.production`
|
|
36
|
-
* - `.env.production.local`
|
|
37
|
-
*
|
|
38
|
-
* @param envDir - The directory/directories to load the environment variables from.
|
|
39
|
-
* @param mode - The mode to load the environment variables for.
|
|
40
|
-
* @param prefix - The prefix or prefixes to use for the environment variables.
|
|
41
|
-
* @returns The environment variables.
|
|
42
|
-
*/
|
|
43
|
-
declare function loadClientEnv(envDir: string | string[], mode?: string, prefix?: string | string[]): Promise<DotenvParseOutput>;
|
|
44
|
-
/**
|
|
45
|
-
* Load environment variables from .env files for a server-side environment.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:
|
|
49
|
-
* - `.env`
|
|
50
|
-
* - `.env.local`
|
|
51
|
-
* - `.env.production`
|
|
52
|
-
* - `.env.production.local`
|
|
53
|
-
*
|
|
54
|
-
* @param envDir - The directory/directories to load the environment variables from.
|
|
55
|
-
* @param mode - The mode to load the environment variables for.
|
|
56
|
-
* @returns The environment variables.
|
|
57
|
-
*/
|
|
58
|
-
declare function loadServerEnv(envDir: string | string[], mode: string): Promise<DotenvParseOutput>;
|
|
59
|
-
//#endregion
|
|
60
|
-
export { loadServerEnv as a, loadEnvFile as i, loadClientEnv as n, loadEnv as r, getEnvFilesForMode as t };
|
|
61
|
-
//# sourceMappingURL=load-env-DPtGxfd9.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-env-DPtGxfd9.d.cts","names":[],"sources":["../src/load-env.ts"],"sourcesContent":[],"mappings":";;;iBA4BgB,kBAAA;;AAAhB;AAmBA;AAiDA;AAmGA;AAsBA;iBA1KsB,WAAA,+CAGnB,QAAQ;;;;;;;;;;;;;;;;iBA8CW,OAAA,wEAInB,QAAQ;;;;;;;;;;;;;;;;iBA+FW,aAAA,wEAInB,QAAQ;;;;;;;;;;;;;;;iBAkBW,aAAA,2CAGnB,QAAQ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./join-paths-DoUrclq3.mjs";import{t}from"./types-ULysAnV9.mjs";import{parse as n}from"@dotenvx/dotenvx";import{existsSync as r}from"node:fs";import{readFile as i}from"node:fs/promises";import a from"defu";function o(e){return e??=[],Array.isArray(e)?e:[e]}function s(e){return r(e)}const c=async e=>{if(!e)throw Error(`No file path provided to read data`);return i(e,{encoding:`utf8`})};function l(t,n=`production`){return[`.env`,`.env.local`,`.env.${n}`,`.env.${n}.local`,`.env.local.${n}`].map(n=>e(t,n))}async function u(t,r=[]){let i=Array.isArray(r)?r:[r];return(await Promise.all((r.length>0?i.map(n=>e(n,t)):[t]).map(async e=>{if(s(e))return c(e)}))).reduce((e,t)=>t?a(n(t,{processEnv:{...process.env},privateKey:process.env.DOTENV_PRIVATE_KEY||process.env.STORM_PRIVATE_KEY}),e):e,{})}async function d(e,t,n){if(t===`local`)throw Error(`"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.`);let r=o(n).reduce((e,t)=>t?(e.includes(t.endsWith(`_`)?t:`${t}_`)||e.push(t.endsWith(`_`)?t:`${t}_`),e.includes(`${t.endsWith(`_`)?t:`${t}_`}PUBLIC_`)||e.push(`${t.endsWith(`_`)?t:`${t}_`}PUBLIC_`),e):e,[]),i=Array.isArray(e)?e:[e],s={},c=i.reduce((e,n)=>(e.push(...l(n,t).filter(t=>!e.includes(t))),e),[]),d=(await Promise.all(c.map(async e=>u(e)))).reduce((e,t)=>a(t,e),{});if(d.NODE_ENV&&process.env.VITE_USER_NODE_ENV===void 0&&(process.env.VITE_USER_NODE_ENV=JSON.stringify(d.NODE_ENV)),d.BROWSER&&process.env.BROWSER===void 0&&(process.env.BROWSER=JSON.stringify(d.BROWSER)),d.BROWSER_ARGS&&process.env.BROWSER_ARGS===void 0&&(process.env.BROWSER_ARGS=JSON.stringify(d.BROWSER_ARGS)),d=a({...process.env},d),r.length===0)return d;for(let[e,t]of Object.entries(d))r.some(t=>e.startsWith(t))&&(s[e]=String(t));for(let e in process.env)r.some(t=>e.startsWith(t))&&(s[e]=process.env[e]);return s}async function f(e,n,r=t){return d(e,n,r)}async function p(e,t){return d(e,t)}export{p as a,u as i,f as n,d as r,l as t};
|
|
2
|
-
//# sourceMappingURL=load-env-DUjj4KN6.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-env-DUjj4KN6.mjs","names":["existsSync","existsSyncFs","readFile","readFileFs","envDir","existsSync","readFile","env: DotenvParseOutput","prefix"],"sources":["../../convert/src/to-array.ts","../../fs/src/exists.ts","../../fs/src/read-file.ts","../src/load-env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { Arrayable } from \"@stryke/types/array\";\nimport type { Nullable } from \"@stryke/types/utilities\";\n\n/**\n * Convert `Arrayable<T>` to `Array<T>`\n *\n * @param array - The `Arrayable<T>` to convert\n * @returns An `Array<T>` containing the elements of the input\n */\nexport function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T> {\n array = array ?? [];\n return Array.isArray(array) ? array : [array];\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { existsSync as existsSyncFs } from \"node:fs\";\nimport { access, constants } from \"node:fs/promises\";\n\n/**\n * Check if a file exists\n *\n * @param filePath - The file path to check\n * @returns An indicator specifying if the file exists\n */\nexport function existsSync(filePath: string): boolean {\n return existsSyncFs(filePath);\n}\n\n/**\n * Check if a file exists\n *\n * @param filePath - The file path to check\n * @returns An indicator specifying if the file exists\n */\nexport async function exists(filePath: string): Promise<boolean> {\n return access(filePath, constants.F_OK)\n .then(() => true)\n .catch(() => false);\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { existsSync, readFileSync as readFileSyncFs } from \"node:fs\";\nimport { readFile as readFileFs } from \"node:fs/promises\";\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to write to\n */\nexport const readFileSync = (filePath: string): string => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n return readFileSyncFs(filePath, { encoding: \"utf8\" });\n};\n\n/**\n * Read the given content to the given file path\n *\n * @param filePath - The file path to read to\n */\nexport const readFile = async (filePath: string): Promise<string> => {\n if (!filePath) {\n throw new Error(\"No file path provided to read data\");\n }\n\n return readFileFs(filePath, { encoding: \"utf8\" });\n};\n\n/**\n * Reads a file if it exists, otherwise returns an empty string.\n *\n * @param path - The path to the file to read.\n * @returns The content of the file if it exists, otherwise an empty string.\n */\nexport function readFileIfExistingSync(path: string) {\n return existsSync(path) ? readFileSync(path) : \"\";\n}\n\n/**\n * Reads a file if it exists, otherwise returns an empty string.\n *\n * @param path - The path to the file to read.\n * @returns The content of the file if it exists, otherwise an empty string.\n */\nexport async function readFileIfExisting(path: string) {\n return existsSync(path) ? readFile(path) : \"\";\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { DotenvPopulateInput } from \"@dotenvx/dotenvx\";\nimport { parse } from \"@dotenvx/dotenvx\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readFile } from \"@stryke/fs/read-file\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { DotenvParseOutput } from \"./types\";\nimport { ENV_PREFIXES } from \"./types\";\n\nexport function getEnvFilesForMode(\n envDir: string,\n mode = \"production\"\n): string[] {\n return [\n /** default file */ \".env\",\n /** local file */ \".env.local\",\n /** mode file */ `.env.${mode}`,\n /** mode local file */ `.env.${mode}.local`,\n /** local mode file */ `.env.local.${mode}`\n ].map(file => joinPaths(envDir, file));\n}\n\n/**\n * Load environment variables from a .env file.\n *\n * @param envFile - The path to the .env file.\n * @returns The environment variables.\n */\nexport async function loadEnvFile(\n envFile: string,\n envDir: string | string[] = []\n): Promise<DotenvParseOutput> {\n const envDirs = Array.isArray(envDir) ? envDir : [envDir];\n\n return (\n await Promise.all(\n (envDir.length > 0\n ? envDirs.map(envDir => joinPaths(envDir, envFile))\n : [envFile]\n ).map(async envFilePath => {\n if (!existsSync(envFilePath)) {\n return undefined;\n }\n\n return readFile(envFilePath);\n })\n )\n ).reduce((ret, envFileContent) => {\n if (!envFileContent) {\n return ret;\n }\n\n const result = parse(envFileContent, {\n processEnv: { ...process.env } as DotenvPopulateInput,\n privateKey:\n process.env.DOTENV_PRIVATE_KEY || process.env.STORM_PRIVATE_KEY\n });\n\n return defu(result, ret);\n }, {});\n}\n\n/**\n * Load environment variables from .env files.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @param prefix - The prefix or prefixes to use for the environment variables.\n * @returns The environment variables.\n */\nexport async function loadEnv(\n envDir: string | string[],\n mode?: string,\n prefix?: string | string[]\n): Promise<DotenvParseOutput> {\n if (mode === \"local\") {\n throw new Error(\n '\"local\" cannot be used as a mode name because it conflicts with ' +\n \"the .local postfix for .env files.\"\n );\n }\n\n const prefixes = toArray(prefix).reduce((ret, pre) => {\n if (!pre) {\n return ret;\n }\n\n if (!ret.includes(pre.endsWith(\"_\") ? pre : `${pre}_`)) {\n ret.push(pre.endsWith(\"_\") ? pre : `${pre}_`);\n }\n if (!ret.includes(`${pre.endsWith(\"_\") ? pre : `${pre}_`}PUBLIC_`)) {\n ret.push(`${pre.endsWith(\"_\") ? pre : `${pre}_`}PUBLIC_`);\n }\n return ret;\n }, [] as string[]);\n const envDirs = Array.isArray(envDir) ? envDir : [envDir];\n\n const env: DotenvParseOutput = {};\n const envFiles = envDirs.reduce((ret, envFilePath) => {\n ret.push(\n ...getEnvFilesForMode(envFilePath, mode).filter(\n envFile => !ret.includes(envFile)\n )\n );\n\n return ret;\n }, [] as string[]);\n\n let envParsed = (\n await Promise.all(\n envFiles.map(async filePath => {\n return loadEnvFile(filePath);\n })\n )\n ).reduce((ret, result) => {\n return defu(result, ret);\n }, {});\n\n // test NODE_ENV override before expand as otherwise process.env.NODE_ENV would override this\n if (envParsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === undefined) {\n process.env.VITE_USER_NODE_ENV = JSON.stringify(envParsed.NODE_ENV);\n }\n // support BROWSER and BROWSER_ARGS env variables\n if (envParsed.BROWSER && process.env.BROWSER === undefined) {\n process.env.BROWSER = JSON.stringify(envParsed.BROWSER);\n }\n if (envParsed.BROWSER_ARGS && process.env.BROWSER_ARGS === undefined) {\n process.env.BROWSER_ARGS = JSON.stringify(envParsed.BROWSER_ARGS);\n }\n\n // let environment variables use each other. make a copy of `process.env` so that we do not mutate the global `process.env`.\n envParsed = defu({ ...process.env }, envParsed);\n if (prefixes.length === 0) {\n return envParsed;\n }\n\n // only keys that start with prefix are exposed to client\n for (const [key, value] of Object.entries(envParsed)) {\n if (prefixes.some(prefix => key.startsWith(prefix))) {\n env[key] = String(value);\n }\n }\n\n // check if there are actual env variables starting with VITE_*\n // these are typically provided inline and should be prioritized\n for (const key in process.env) {\n if (prefixes.some(prefix => key.startsWith(prefix))) {\n env[key] = process.env[key] as string;\n }\n }\n\n return env;\n}\n\n/**\n * Load environment variables from .env files for a client-side environment.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @param prefix - The prefix or prefixes to use for the environment variables.\n * @returns The environment variables.\n */\nexport async function loadClientEnv(\n envDir: string | string[],\n mode?: string,\n prefix: string | string[] = ENV_PREFIXES\n): Promise<DotenvParseOutput> {\n return loadEnv(envDir, mode, prefix);\n}\n\n/**\n * Load environment variables from .env files for a server-side environment.\n *\n * @remarks\n * This function loads environment variables from .env files based on the mode. For the `production` mode, it will load:\n * - `.env`\n * - `.env.local`\n * - `.env.production`\n * - `.env.production.local`\n *\n * @param envDir - The directory/directories to load the environment variables from.\n * @param mode - The mode to load the environment variables for.\n * @returns The environment variables.\n */\nexport async function loadServerEnv(\n envDir: string | string[],\n mode: string\n): Promise<DotenvParseOutput> {\n return loadEnv(envDir, mode);\n}\n"],"mappings":"gOA2BA,SAAgB,EAAW,EAA0C,CAEnE,MADA,KAAiB,EAAE,CACZ,MAAM,QAAQ,EAAM,CAAG,EAAQ,CAAC,EAAM,CCF/C,SAAgBA,EAAW,EAA2B,CACpD,OAAOC,EAAa,EAAS,CCW/B,MAAaC,EAAW,KAAO,IAAsC,CACnE,GAAI,CAAC,EACH,MAAU,MAAM,qCAAqC,CAGvD,OAAOC,EAAW,EAAU,CAAE,SAAU,OAAQ,CAAC,EChBnD,SAAgB,EACd,EACA,EAAO,aACG,CACV,MAAO,CACe,OACF,aACD,QAAQ,IACF,QAAQ,EAAK,QACb,cAAc,IACtC,CAAC,IAAI,GAAQ,EAAU,EAAQ,EAAK,CAAC,CASxC,eAAsB,EACpB,EACA,EAA4B,EAAE,CACF,CAC5B,IAAM,EAAU,MAAM,QAAQ,EAAO,CAAG,EAAS,CAAC,EAAO,CAEzD,OACE,MAAM,QAAQ,KACX,EAAO,OAAS,EACb,EAAQ,IAAI,GAAU,EAAUC,EAAQ,EAAQ,CAAC,CACjD,CAAC,EAAQ,EACX,IAAI,KAAM,IAAe,CACpBC,KAAW,EAAY,CA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