@stryke/env 0.20.26 → 0.20.33

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +1340 -0
  2. package/README.md +19 -9
  3. package/dist/ci-checks-5v7fZL3R.mjs +2 -0
  4. package/dist/ci-checks-5v7fZL3R.mjs.map +1 -0
  5. package/dist/{ci-checks.d.ts → ci-checks-BFAxtIMg.d.mts} +7 -3
  6. package/dist/ci-checks-BFAxtIMg.d.mts.map +1 -0
  7. package/dist/ci-checks-ByUPPNOk.d.cts +19 -0
  8. package/dist/ci-checks-ByUPPNOk.d.cts.map +1 -0
  9. package/dist/ci-checks-DRWFr2UM.cjs +1 -0
  10. package/dist/ci-checks.cjs +1 -10
  11. package/dist/ci-checks.d.cts +2 -0
  12. package/dist/ci-checks.d.mts +2 -0
  13. package/dist/ci-checks.mjs +1 -1
  14. package/dist/{environment-checks.d.ts → environment-checks-BvXEMk0w.d.mts} +22 -18
  15. package/dist/environment-checks-BvXEMk0w.d.mts.map +1 -0
  16. package/dist/environment-checks-CNP6SBWs.mjs +2 -0
  17. package/dist/environment-checks-CNP6SBWs.mjs.map +1 -0
  18. package/dist/environment-checks-TkDPh8QD.d.cts +59 -0
  19. package/dist/environment-checks-TkDPh8QD.d.cts.map +1 -0
  20. package/dist/environment-checks-ghgIrof1.cjs +1 -0
  21. package/dist/environment-checks.cjs +1 -84
  22. package/dist/environment-checks.d.cts +2 -0
  23. package/dist/environment-checks.d.mts +2 -0
  24. package/dist/environment-checks.mjs +1 -1
  25. package/dist/get-env-paths-CRQWNX3i.cjs +1 -0
  26. package/dist/get-env-paths-DReLbhw5.d.cts +64 -0
  27. package/dist/get-env-paths-DReLbhw5.d.cts.map +1 -0
  28. package/dist/get-env-paths-DUHBXxwb.mjs +2 -0
  29. package/dist/get-env-paths-DUHBXxwb.mjs.map +1 -0
  30. package/dist/get-env-paths-KTCEsWqe.d.mts +64 -0
  31. package/dist/get-env-paths-KTCEsWqe.d.mts.map +1 -0
  32. package/dist/get-env-paths.cjs +1 -58
  33. package/dist/get-env-paths.d.cts +2 -0
  34. package/dist/get-env-paths.d.mts +2 -0
  35. package/dist/get-env-paths.mjs +1 -1
  36. package/dist/index.cjs +1 -82
  37. package/dist/index.d.cts +8 -0
  38. package/dist/index.d.mts +8 -0
  39. package/dist/index.mjs +1 -1
  40. package/dist/join-paths-BMFGURJb.cjs +1 -0
  41. package/dist/join-paths-DoUrclq3.mjs +2 -0
  42. package/dist/join-paths-DoUrclq3.mjs.map +1 -0
  43. package/dist/{load-env.d.ts → load-env-B_Q4iLSZ.d.mts} +11 -6
  44. package/dist/load-env-B_Q4iLSZ.d.mts.map +1 -0
  45. package/dist/load-env-COR_EMlB.cjs +1 -0
  46. package/dist/load-env-DPtGxfd9.d.cts +61 -0
  47. package/dist/load-env-DPtGxfd9.d.cts.map +1 -0
  48. package/dist/load-env-DUjj4KN6.mjs +2 -0
  49. package/dist/load-env-DUjj4KN6.mjs.map +1 -0
  50. package/dist/load-env.cjs +1 -56
  51. package/dist/load-env.d.cts +2 -0
  52. package/dist/load-env.d.mts +2 -0
  53. package/dist/load-env.mjs +1 -1
  54. package/dist/providers-B2d_hJW2.d.mts +13 -0
  55. package/dist/providers-B2d_hJW2.d.mts.map +1 -0
  56. package/dist/providers-B9xVKxf9.cjs +1 -0
  57. package/dist/providers-BUdbSP8f.mjs +2 -0
  58. package/dist/providers-BUdbSP8f.mjs.map +1 -0
  59. package/dist/providers-YKl7K1Ek.d.cts +13 -0
  60. package/dist/providers-YKl7K1Ek.d.cts.map +1 -0
  61. package/dist/providers.cjs +1 -41
  62. package/dist/providers.d.cts +2 -0
  63. package/dist/providers.d.mts +2 -0
  64. package/dist/providers.mjs +1 -1
  65. package/dist/runtime-checks-Bka6c_Kr.d.mts +51 -0
  66. package/dist/runtime-checks-Bka6c_Kr.d.mts.map +1 -0
  67. package/dist/runtime-checks-DGhXcN9g.mjs +2 -0
  68. package/dist/runtime-checks-DGhXcN9g.mjs.map +1 -0
  69. package/dist/runtime-checks-Dc2IKXYE.d.cts +51 -0
  70. package/dist/runtime-checks-Dc2IKXYE.d.cts.map +1 -0
  71. package/dist/runtime-checks-NIf4Bpj9.cjs +1 -0
  72. package/dist/runtime-checks.cjs +1 -24
  73. package/dist/runtime-checks.d.cts +2 -0
  74. package/dist/runtime-checks.d.mts +2 -0
  75. package/dist/runtime-checks.mjs +1 -1
  76. package/dist/types-2O6mBvGZ.cjs +1 -0
  77. package/dist/types-D7S9q0_s.d.mts +8 -0
  78. package/dist/types-D7S9q0_s.d.mts.map +1 -0
  79. package/dist/types-DJpwQAko.d.cts +8 -0
  80. package/dist/types-DJpwQAko.d.cts.map +1 -0
  81. package/dist/types-ULysAnV9.mjs +2 -0
  82. package/dist/types-ULysAnV9.mjs.map +1 -0
  83. package/dist/types.cjs +1 -7
  84. package/dist/types.d.cts +2 -0
  85. package/dist/types.d.mts +2 -0
  86. package/dist/types.mjs +1 -1
  87. package/package.json +35 -159
  88. package/dist/get-env-paths.d.ts +0 -60
  89. package/dist/index.d.ts +0 -15
  90. package/dist/providers.d.ts +0 -9
  91. package/dist/runtime-checks.d.ts +0 -47
  92. package/dist/types.d.ts +0 -4
package/README.md CHANGED
@@ -3,7 +3,13 @@
3
3
  <!-- markdownlint-disable -->
4
4
 
5
5
 
6
- <div align="center"><img src="https://public.storm-cdn.com/storm-banner.gif" width="100%" alt="Storm Software" /></div>
6
+ <div align="center">
7
+ <picture>
8
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-dark-optimized.gif">
9
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x640-light-optimized.gif">
10
+ <img src="https://public.storm-cdn.com/storm-software/banner-1280x640-dark-optimized.gif" width="100%" alt="Storm Software" />
11
+ </picture>
12
+ </div>
7
13
  <br />
8
14
 
9
15
  <div align="center">
@@ -16,13 +22,13 @@
16
22
  </div>
17
23
 
18
24
  <br />
19
- This package is part of Storm Software's **🌩️ Stryke** monorepo. Stryke packages TypeScript utility packages with shared functionality common to many Storm Software applications.
25
+ This package is part of Storm Software's **💥 Stryke** monorepo. Stryke packages TypeScript utility packages with shared functionality common to many Storm Software applications.
20
26
 
21
27
  <br />
22
28
 
23
29
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
24
30
 
25
- [![Version](https://img.shields.io/badge/version-0.15.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
+ [![Version](https://img.shields.io/badge/version-0.20.30-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
26
32
 
27
33
  > [!IMPORTANT] Important
28
34
  > This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be available through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.
@@ -45,6 +51,7 @@ A package containing utility functions to handle environment specific processes
45
51
 
46
52
  <!-- START doctoc -->
47
53
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
54
+
48
55
  ## Table of Contents
49
56
 
50
57
  - [Installing](#installing)
@@ -91,10 +98,10 @@ yarn add -D stryke/env
91
98
 
92
99
  ## Reduced Package Size
93
100
 
94
- This project uses [tsup](https://tsup.egoist.dev/) to package the source code
95
- due to its ability to remove unused code and ship smaller javascript files
96
- thanks to code splitting. This helps to greatly reduce the size of the package
97
- and to make it easier to use in other projects.
101
+ This project uses [tsdown](https://tsdown.dev) to package the source code due to
102
+ its ability to remove unused code and ship smaller javascript files thanks to
103
+ code splitting. This helps to greatly reduce the size of the package and to make
104
+ it easier to use in other projects.
98
105
 
99
106
  ## Development
100
107
 
@@ -235,10 +242,13 @@ specification. Contributions of any kind welcome!
235
242
  <br />
236
243
 
237
244
  <hr />
238
- <br />
239
245
 
240
246
  <div align="center">
241
- <img src="https://public.storm-cdn.com/logo-banner.png" width="100%" alt="Storm Software" />
247
+ <picture>
248
+ <source media="(prefers-color-scheme: dark)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-dark-optimized.webp">
249
+ <source media="(prefers-color-scheme: light)" srcset="https://public.storm-cdn.com/storm-software/banner-1280x320-light-optimized.webp">
250
+ <img src="https://public.storm-cdn.com/storm-software/banner-1280x320-dark-optimized.webp" width="100%" alt="Storm Software" />
251
+ </picture>
242
252
  </div>
243
253
  <br />
244
254
 
@@ -0,0 +1,2 @@
1
+ const e=(e=process.env)=>!!(e.STORM_CI||e.CI||e.CONTINUOUS_INTEGRATION||e.BUILD_NUMBER||e.RUN_ID||e.AGOLA_GIT_REF||e.AC_APPCIRCLE||e.APPVEYOR||e.CODEBUILD||e.TF_BUILD||e.bamboo_planKey||e.BITBUCKET_COMMIT||e.BITRISE_IO||e.BUDDY_WORKSPACE_ID||e.BUILDKITE||e.CIRCLECI||e.CIRRUS_CI||e.CF_BUILD_ID||e.CM_BUILD_ID||e.CI_NAME||e.DRONE||e.DSARI||e.EARTHLY_CI||e.EAS_BUILD||e.GERRIT_PROJECT||e.GITEA_ACTIONS||e.GITHUB_ACTIONS||e.GITLAB_CI||e.GOCD||e.BUILDER_OUTPUT||e.HARNESS_BUILD_ID||e.JENKINS_URL||e.BUILD_ID||e.LAYERCI||e.MAGNUM||e.NETLIFY||e.NEVERCODE||e.PROW_JOB_ID||e.RELEASE_BUILD_ID||e.RENDER||e.SAILCI||e.HUDSON||e.JENKINS_URL||e.BUILD_ID||e.SCREWDRIVER||e.SEMAPHORE||e.SOURCEHUT||e.STRIDER||e.TASK_ID||e.RUN_ID||e.TEAMCITY_VERSION||e.TRAVIS||e.VELA||e.NOW_BUILDER||e.APPCENTER_BUILD_ID||e.CI_XCODE_PROJECT||e.XCS),t=(e=process.stdin)=>!!(e?.isTTY&&process.env.TERM!==`dumb`);export{t as n,e as t};
2
+ //# sourceMappingURL=ci-checks-5v7fZL3R.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-checks-5v7fZL3R.mjs","names":[],"sources":["../src/ci-checks.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 * Returns true if the current environment is a CI environment.\n *\n * @returns True if the current environment is a CI environment.\n */\nexport const isCI = (\n env: Record<string, string | undefined> = process.env\n): boolean => {\n // From https://github.com/watson/ci-info/blob/44e98cebcdf4403f162195fbcf90b1f69fc6e047/index.js#L54-L61\n // Evaluating at runtime makes it possible to change the values in our tests\n // This list is probably not exhaustive though `process.env.CI` should be enough\n // but since we were using this utility in the past, we want to keep the same behavior\n return Boolean(\n env.STORM_CI || // Custom CI\n env.CI || // Travis CI, CircleCI, Cirrus CI, GitLab CI, Appveyor, CodeShip, dsari\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.RUN_ID || // TaskCluster, dsari\n // From `env` from v4.0.0 https://github.com/watson/ci-info/blob/3e1488e98680f1f776785fe8708a157b7f00e568/vendors.json\n env.AGOLA_GIT_REF ||\n env.AC_APPCIRCLE ||\n env.APPVEYOR ||\n env.CODEBUILD ||\n env.TF_BUILD ||\n env.bamboo_planKey ||\n env.BITBUCKET_COMMIT ||\n env.BITRISE_IO ||\n env.BUDDY_WORKSPACE_ID ||\n env.BUILDKITE ||\n env.CIRCLECI ||\n env.CIRRUS_CI ||\n env.CF_BUILD_ID ||\n env.CM_BUILD_ID ||\n env.CI_NAME ||\n env.DRONE ||\n env.DSARI ||\n env.EARTHLY_CI ||\n env.EAS_BUILD ||\n env.GERRIT_PROJECT ||\n env.GITEA_ACTIONS ||\n env.GITHUB_ACTIONS ||\n env.GITLAB_CI ||\n env.GOCD ||\n env.BUILDER_OUTPUT ||\n env.HARNESS_BUILD_ID ||\n env.JENKINS_URL ||\n env.BUILD_ID ||\n env.LAYERCI ||\n env.MAGNUM ||\n env.NETLIFY ||\n env.NEVERCODE ||\n env.PROW_JOB_ID ||\n env.RELEASE_BUILD_ID ||\n env.RENDER ||\n env.SAILCI ||\n env.HUDSON ||\n env.JENKINS_URL ||\n env.BUILD_ID ||\n env.SCREWDRIVER ||\n env.SEMAPHORE ||\n env.SOURCEHUT ||\n env.STRIDER ||\n env.TASK_ID ||\n env.RUN_ID ||\n env.TEAMCITY_VERSION ||\n env.TRAVIS ||\n env.VELA ||\n env.NOW_BUILDER ||\n // See https://github.com/prisma/prisma/issues/22380 for why we commented it out\n // Users deploying on Vercel might have this env var set in the local dev env\n // env.VERCEL ||\n env.APPCENTER_BUILD_ID ||\n env.CI_XCODE_PROJECT ||\n env.XCS ||\n false\n );\n};\n\n// Same logic as https://github.com/sindresorhus/is-interactive/blob/dc8037ae1a61d828cfb42761c345404055b1e036/index.js\n// But defaults to check `stdin` for our prompts\n// It checks that the stream is TTY, not a dumb terminal\n\n/**\n * Check if the current process is interactive\n *\n * @param stream - The stream to check\n * @returns True if the current process is interactive\n */\nexport const isInteractive = (stream = process.stdin): boolean => {\n return Boolean(stream?.isTTY && process.env.TERM !== \"dumb\");\n};\n"],"mappings":"AAuBA,MAAa,GACX,EAA0C,QAAQ,MAM3C,GACL,EAAI,UACJ,EAAI,IACJ,EAAI,wBACJ,EAAI,cACJ,EAAI,QAEJ,EAAI,eACJ,EAAI,cACJ,EAAI,UACJ,EAAI,WACJ,EAAI,UACJ,EAAI,gBACJ,EAAI,kBACJ,EAAI,YACJ,EAAI,oBACJ,EAAI,WACJ,EAAI,UACJ,EAAI,WACJ,EAAI,aACJ,EAAI,aACJ,EAAI,SACJ,EAAI,OACJ,EAAI,OACJ,EAAI,YACJ,EAAI,WACJ,EAAI,gBACJ,EAAI,eACJ,EAAI,gBACJ,EAAI,WACJ,EAAI,MACJ,EAAI,gBACJ,EAAI,kBACJ,EAAI,aACJ,EAAI,UACJ,EAAI,SACJ,EAAI,QACJ,EAAI,SACJ,EAAI,WACJ,EAAI,aACJ,EAAI,kBACJ,EAAI,QACJ,EAAI,QACJ,EAAI,QACJ,EAAI,aACJ,EAAI,UACJ,EAAI,aACJ,EAAI,WACJ,EAAI,WACJ,EAAI,SACJ,EAAI,SACJ,EAAI,QACJ,EAAI,kBACJ,EAAI,QACJ,EAAI,MACJ,EAAI,aAIJ,EAAI,oBACJ,EAAI,kBACJ,EAAI,KAeK,GAAiB,EAAS,QAAQ,QACtC,GAAQ,GAAQ,OAAS,QAAQ,IAAI,OAAS"}
@@ -1,15 +1,19 @@
1
+ //#region src/ci-checks.d.ts
1
2
  /**
2
3
  * Returns true if the current environment is a CI environment.
3
4
  *
4
5
  * @returns True if the current environment is a CI environment.
5
6
  */
6
- export declare const isCI: (env?: Record<string, string | undefined>) => boolean;
7
+ declare const isCI: (env?: Record<string, string | undefined>) => boolean;
7
8
  /**
8
9
  * Check if the current process is interactive
9
10
  *
10
11
  * @param stream - The stream to check
11
12
  * @returns True if the current process is interactive
12
13
  */
13
- export declare const isInteractive: (stream?: NodeJS.ReadStream & {
14
- fd: 0;
14
+ declare const isInteractive: (stream?: NodeJS.ReadStream & {
15
+ fd: 0;
15
16
  }) => boolean;
17
+ //#endregion
18
+ export { isInteractive as n, isCI as t };
19
+ //# sourceMappingURL=ci-checks-BFAxtIMg.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-checks-BFAxtIMg.d.mts","names":[],"sources":["../src/ci-checks.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAmFA;;;cAnFa,aACN;;;;;;;cAkFM,yBAAiB,MAAA,CAAA"}
@@ -0,0 +1,19 @@
1
+ //#region src/ci-checks.d.ts
2
+ /**
3
+ * Returns true if the current environment is a CI environment.
4
+ *
5
+ * @returns True if the current environment is a CI environment.
6
+ */
7
+ declare const isCI: (env?: Record<string, string | undefined>) => boolean;
8
+ /**
9
+ * Check if the current process is interactive
10
+ *
11
+ * @param stream - The stream to check
12
+ * @returns True if the current process is interactive
13
+ */
14
+ declare const isInteractive: (stream?: NodeJS.ReadStream & {
15
+ fd: 0;
16
+ }) => boolean;
17
+ //#endregion
18
+ export { isInteractive as n, isCI as t };
19
+ //# sourceMappingURL=ci-checks-ByUPPNOk.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-checks-ByUPPNOk.d.cts","names":[],"sources":["../src/ci-checks.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAmFA;;;cAnFa,aACN;;;;;;;cAkFM,yBAAiB,MAAA,CAAA"}
@@ -0,0 +1 @@
1
+ const e=(e=process.env)=>!!(e.STORM_CI||e.CI||e.CONTINUOUS_INTEGRATION||e.BUILD_NUMBER||e.RUN_ID||e.AGOLA_GIT_REF||e.AC_APPCIRCLE||e.APPVEYOR||e.CODEBUILD||e.TF_BUILD||e.bamboo_planKey||e.BITBUCKET_COMMIT||e.BITRISE_IO||e.BUDDY_WORKSPACE_ID||e.BUILDKITE||e.CIRCLECI||e.CIRRUS_CI||e.CF_BUILD_ID||e.CM_BUILD_ID||e.CI_NAME||e.DRONE||e.DSARI||e.EARTHLY_CI||e.EAS_BUILD||e.GERRIT_PROJECT||e.GITEA_ACTIONS||e.GITHUB_ACTIONS||e.GITLAB_CI||e.GOCD||e.BUILDER_OUTPUT||e.HARNESS_BUILD_ID||e.JENKINS_URL||e.BUILD_ID||e.LAYERCI||e.MAGNUM||e.NETLIFY||e.NEVERCODE||e.PROW_JOB_ID||e.RELEASE_BUILD_ID||e.RENDER||e.SAILCI||e.HUDSON||e.JENKINS_URL||e.BUILD_ID||e.SCREWDRIVER||e.SEMAPHORE||e.SOURCEHUT||e.STRIDER||e.TASK_ID||e.RUN_ID||e.TEAMCITY_VERSION||e.TRAVIS||e.VELA||e.NOW_BUILDER||e.APPCENTER_BUILD_ID||e.CI_XCODE_PROJECT||e.XCS),t=(e=process.stdin)=>!!(e?.isTTY&&process.env.TERM!==`dumb`);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
@@ -1,10 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isInteractive = exports.isCI = void 0;
7
- const isCI = (I = process.env) => !!(I.STORM_CI || I.CI || I.CONTINUOUS_INTEGRATION || I.BUILD_NUMBER || I.RUN_ID || I.AGOLA_GIT_REF || I.AC_APPCIRCLE || I.APPVEYOR || I.CODEBUILD || I.TF_BUILD || I.bamboo_planKey || I.BITBUCKET_COMMIT || I.BITRISE_IO || I.BUDDY_WORKSPACE_ID || I.BUILDKITE || I.CIRCLECI || I.CIRRUS_CI || I.CF_BUILD_ID || I.CM_BUILD_ID || I.CI_NAME || I.DRONE || I.DSARI || I.EARTHLY_CI || I.EAS_BUILD || I.GERRIT_PROJECT || I.GITEA_ACTIONS || I.GITHUB_ACTIONS || I.GITLAB_CI || I.GOCD || I.BUILDER_OUTPUT || I.HARNESS_BUILD_ID || I.JENKINS_URL || I.BUILD_ID || I.LAYERCI || I.MAGNUM || I.NETLIFY || I.NEVERCODE || I.PROW_JOB_ID || I.RELEASE_BUILD_ID || I.RENDER || I.SAILCI || I.HUDSON || I.JENKINS_URL || I.BUILD_ID || I.SCREWDRIVER || I.SEMAPHORE || I.SOURCEHUT || I.STRIDER || I.TASK_ID || I.RUN_ID || I.TEAMCITY_VERSION || I.TRAVIS || I.VELA || I.NOW_BUILDER || I.APPCENTER_BUILD_ID || I.CI_XCODE_PROJECT || I.XCS),
8
- isInteractive = (I = process.stdin) => !!(I?.isTTY && process.env.TERM !== "dumb");
9
- exports.isInteractive = isInteractive;
10
- exports.isCI = isCI;
1
+ const e=require(`./ci-checks-DRWFr2UM.cjs`);exports.isCI=e.t,exports.isInteractive=e.n;
@@ -0,0 +1,2 @@
1
+ import { n as isInteractive, t as isCI } from "./ci-checks-ByUPPNOk.cjs";
2
+ export { isCI, isInteractive };
@@ -0,0 +1,2 @@
1
+ import { n as isInteractive, t as isCI } from "./ci-checks-BFAxtIMg.mjs";
2
+ export { isCI, isInteractive };
@@ -1 +1 @@
1
- export const isCI=(I=process.env)=>!!(I.STORM_CI||I.CI||I.CONTINUOUS_INTEGRATION||I.BUILD_NUMBER||I.RUN_ID||I.AGOLA_GIT_REF||I.AC_APPCIRCLE||I.APPVEYOR||I.CODEBUILD||I.TF_BUILD||I.bamboo_planKey||I.BITBUCKET_COMMIT||I.BITRISE_IO||I.BUDDY_WORKSPACE_ID||I.BUILDKITE||I.CIRCLECI||I.CIRRUS_CI||I.CF_BUILD_ID||I.CM_BUILD_ID||I.CI_NAME||I.DRONE||I.DSARI||I.EARTHLY_CI||I.EAS_BUILD||I.GERRIT_PROJECT||I.GITEA_ACTIONS||I.GITHUB_ACTIONS||I.GITLAB_CI||I.GOCD||I.BUILDER_OUTPUT||I.HARNESS_BUILD_ID||I.JENKINS_URL||I.BUILD_ID||I.LAYERCI||I.MAGNUM||I.NETLIFY||I.NEVERCODE||I.PROW_JOB_ID||I.RELEASE_BUILD_ID||I.RENDER||I.SAILCI||I.HUDSON||I.JENKINS_URL||I.BUILD_ID||I.SCREWDRIVER||I.SEMAPHORE||I.SOURCEHUT||I.STRIDER||I.TASK_ID||I.RUN_ID||I.TEAMCITY_VERSION||I.TRAVIS||I.VELA||I.NOW_BUILDER||I.APPCENTER_BUILD_ID||I.CI_XCODE_PROJECT||I.XCS),isInteractive=(I=process.stdin)=>!!(I?.isTTY&&process.env.TERM!=="dumb");
1
+ import{n as e,t}from"./ci-checks-5v7fZL3R.mjs";export{t as isCI,e as isInteractive};
@@ -1,55 +1,59 @@
1
+ //#region src/environment-checks.d.ts
1
2
  /** Value of process.platform */
2
- export declare const platform: NodeJS.Platform;
3
+ declare const platform: NodeJS.Platform;
3
4
  /** Detect if stdout.TTY is available */
4
- export declare const hasTTY: boolean;
5
+ declare const hasTTY: boolean;
5
6
  /** Detect if `DEBUG` environment variable is set */
6
- export declare const isDebug: boolean;
7
+ declare const isDebug: boolean;
7
8
  /** Detect if the application is running in a staging environment */
8
- export declare const isStaging: boolean;
9
+ declare const isStaging: boolean;
9
10
  /**
10
11
  * Check if the current environment is production.
11
12
  *
12
13
  * @param mode - The mode string to check.
13
14
  * @returns Whether the environment is production
14
15
  */
15
- export declare function isProductionMode(mode: string): boolean;
16
+ declare function isProductionMode(mode: string): boolean;
16
17
  /** Detect if `NODE_ENV` environment variable is `production` */
17
- export declare const isProduction: boolean;
18
+ declare const isProduction: boolean;
18
19
  /**
19
20
  * Check if the current environment is test.
20
21
  *
21
22
  * @param mode - The mode string to check.
22
23
  * @returns Whether the environment is test
23
24
  */
24
- export declare function isTestMode(mode: string): boolean;
25
+ declare function isTestMode(mode: string): boolean;
25
26
  /** Detect if `NODE_ENV` environment variable is `test` */
26
- export declare const isTest: boolean;
27
+ declare const isTest: boolean;
27
28
  /**
28
29
  * Check if the current environment is development.
29
30
  *
30
31
  * @param mode - The mode string to check.
31
32
  * @returns Whether the environment is development
32
33
  */
33
- export declare function isDevelopmentMode(mode: string): boolean;
34
+ declare function isDevelopmentMode(mode: string): boolean;
34
35
  /** Detect if `NODE_ENV` environment variable is `dev` or `development` */
35
- export declare const isDevelopment: boolean;
36
+ declare const isDevelopment: boolean;
36
37
  /** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */
37
- export declare const isMinimal: boolean;
38
+ declare const isMinimal: boolean;
38
39
  /** Detect if process.platform is Windows */
39
- export declare const isWindows: boolean;
40
+ declare const isWindows: boolean;
40
41
  /** Detect if process.platform is Linux */
41
- export declare const isLinux: boolean;
42
+ declare const isLinux: boolean;
42
43
  /** Detect if process.platform is macOS (darwin kernel) */
43
- export declare const isMacOS: boolean;
44
+ declare const isMacOS: boolean;
44
45
  /** Color Support */
45
- export declare const isColorSupported: boolean;
46
+ declare const isColorSupported: boolean;
46
47
  /**
47
48
  * Check if the current environment supports hyperlinks in the terminal.
48
49
  *
49
50
  * @param stream - The stream to check for TTY support (default: process.stdout)
50
51
  * @returns Whether hyperlinks are supported
51
52
  */
52
- export declare function isHyperlinkSupported(stream?: NodeJS.WriteStream): boolean;
53
+ declare function isHyperlinkSupported(stream?: NodeJS.WriteStream): boolean;
53
54
  /** Node.js versions */
54
- export declare const nodeVersion: string | null;
55
- export declare const nodeMajorVersion: number | null;
55
+ declare const nodeVersion: string | null;
56
+ declare const nodeMajorVersion: number | null;
57
+ //#endregion
58
+ export { nodeVersion as _, isDevelopmentMode as a, isMacOS as c, isProductionMode as d, isStaging as f, nodeMajorVersion as g, isWindows as h, isDevelopment as i, isMinimal as l, isTestMode as m, isColorSupported as n, isHyperlinkSupported as o, isTest as p, isDebug as r, isLinux as s, hasTTY as t, isProduction as u, platform as v };
59
+ //# sourceMappingURL=environment-checks-BvXEMk0w.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-checks-BvXEMk0w.d.mts","names":[],"sources":["../src/environment-checks.ts"],"sourcesContent":[],"mappings":";;AAqBa,cAAA,QAAQ,EAAA,MAAA,CAAA,QAA0B;AAG/C;AAGa,cAHA,MAGoC,EAAA,OAAA;AAUjD;AAUgB,cApBH,OAoBmB,EAAA,OAAA;AAchC;AAQgB,cAhCH,SAgCa,EAAA,OAAA;AAe1B;AASA;AAOA;AAGA;AAIA;AAGA;AAGa,iBAlEG,gBAAA,CAkEgC,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;AAGhD;AAkCgB,cAzFH,YAyFuB,EAAA,OAC1B;AA8EV;AAGA;;;;;iBAnKgB,UAAA;;cAeH;;;;;;;iBASG,iBAAA;;cAOH;;cAGA;;cAIA;;cAGA;;cAGA;;cAGA;;;;;;;iBAkCG,oBAAA,UACN,MAAA,CAAO;;cA8EJ;cAGA"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./ci-checks-5v7fZL3R.mjs";const t=process?.platform||``,n=!!(process?.stdout&&process?.stdout.isTTY),r=!!process.env.DEBUG,i=process.env.STORM_MODE||process.env.NEXT_PUBLIC_VERCEL_ENV||process.env.NODE_ENV||`production`,a=[`stg`,`stage`,`staging`].includes(i?.toLowerCase());function o(e){return[`prd`,`prod`,`production`,`preprod`,`preproduction`,`uat`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const s=o(i);function c(e){return[`tst`,`test`,`testing`,`stg`,`stage`,`staging`,`qa`,`qualityassurance`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const l=c(i)||a||!!process.env.TEST;function u(e){return[`dev`,`development`,`int`,`integration`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const d=u(i)||r,f=!!process.env.MINIMAL||e()||l||!n,p=/^win/i.test(t),m=/^linux/i.test(t),h=/^darwin/i.test(t),g=!process.env.NO_COLOR&&(!!process.env.FORCE_COLOR||(n||p)&&process.env.TERM!==`dumb`||e());function _(e=``){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)??[];return{major:0,minor:Number.parseInt(t[1],10),patch:Number.parseInt(t[2],10)}}let t=(e??``).split(`.`).map(e=>Number.parseInt(e,10));return{major:t[0],minor:t[1],patch:t[2]}}function v(t=process.stdout){if(process.env.FORCE_HYPERLINK)return!(process.env.FORCE_HYPERLINK.length>0&&Number.parseInt(process.env.FORCE_HYPERLINK,10)===0);if(process.env.NETLIFY)return!0;if(g){if(t&&!t.isTTY)return!1;if(`WT_SESSION`in process.env)return!0;if(process.platform===`win32`||e()||process.env.TEAMCITY_VERSION)return!1;if(process.env.TERM_PROGRAM){let e=_(process.env.TERM_PROGRAM_VERSION);switch(process.env.TERM_PROGRAM){case`iTerm.app`:return e.major===3?e.minor!==void 0&&e.minor>=1:e.major!==void 0&&e.major>3;case`WezTerm`:return e.major!==void 0&&e.major>=20200620;case`vscode`:return process.env.CURSOR_TRACE_ID?!0:e.minor!==void 0&&e.major!==void 0&&(e.major>1||e.major===1&&e.minor>=72);case`ghostty`:return!0}}}else return!1;if(process.env.VTE_VERSION){if(process.env.VTE_VERSION===`0.50.0`)return!1;let e=_(process.env.VTE_VERSION);return e.major!==void 0&&e.major>0||e.minor!==void 0&&e.minor>=50}return process.env.TERM===`alacritty`}const y=(process?.versions?.node||``).replace(/^v/,``)||null,b=Number(y?.split(`.`)[0])||null;export{y as _,u as a,h as c,o as d,a as f,b as g,p as h,d as i,f as l,c as m,g as n,v as o,l as p,r,m as s,n as t,s as u,t as v};
2
+ //# sourceMappingURL=environment-checks-CNP6SBWs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-checks-CNP6SBWs.mjs","names":["mode"],"sources":["../src/environment-checks.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 { isCI } from \"./ci-checks\";\n\n/** Value of process.platform */\nexport const platform = process?.platform || \"\";\n\n/** Detect if stdout.TTY is available */\nexport const hasTTY = Boolean(process?.stdout && process?.stdout.isTTY);\n\n/** Detect if `DEBUG` environment variable is set */\nexport const isDebug = Boolean(process.env.DEBUG);\n\n/** Detect the `NODE_ENV` environment variable */\nconst mode =\n process.env.STORM_MODE ||\n process.env.NEXT_PUBLIC_VERCEL_ENV ||\n process.env.NODE_ENV ||\n \"production\";\n\n/** Detect if the application is running in a staging environment */\nexport const isStaging = [\"stg\", \"stage\", \"staging\"].includes(\n mode?.toLowerCase()\n);\n\n/**\n * Check if the current environment is production.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is production\n */\nexport function isProductionMode(mode: string) {\n return [\n \"prd\",\n \"prod\",\n \"production\",\n // eslint-disable-next-line @cspell/spellchecker\n \"preprod\",\n // eslint-disable-next-line @cspell/spellchecker\n \"preproduction\",\n \"uat\"\n ].includes(mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\"));\n}\n\n/** Detect if `NODE_ENV` environment variable is `production` */\nexport const isProduction = isProductionMode(mode);\n\n/**\n * Check if the current environment is test.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is test\n */\nexport function isTestMode(mode: string) {\n return [\n \"tst\",\n \"test\",\n \"testing\",\n \"stg\",\n \"stage\",\n \"staging\",\n \"qa\",\n // eslint-disable-next-line @cspell/spellchecker\n \"qualityassurance\"\n ].includes(mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\"));\n}\n\n/** Detect if `NODE_ENV` environment variable is `test` */\nexport const isTest =\n isTestMode(mode) || isStaging || Boolean(process.env.TEST);\n\n/**\n * Check if the current environment is development.\n *\n * @param mode - The mode string to check.\n * @returns Whether the environment is development\n */\nexport function isDevelopmentMode(mode: string) {\n return [\"dev\", \"development\", \"int\", \"integration\"].includes(\n mode?.toLowerCase()?.replace(/[\\s\\-_]/g, \"\")\n );\n}\n\n/** Detect if `NODE_ENV` environment variable is `dev` or `development` */\nexport const isDevelopment = isDevelopmentMode(mode) || isDebug;\n\n/** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */\nexport const isMinimal =\n Boolean(process.env.MINIMAL) || isCI() || isTest || !hasTTY;\n\n/** Detect if process.platform is Windows */\nexport const isWindows = /^win/i.test(platform);\n\n/** Detect if process.platform is Linux */\nexport const isLinux = /^linux/i.test(platform);\n\n/** Detect if process.platform is macOS (darwin kernel) */\nexport const isMacOS = /^darwin/i.test(platform);\n\n/** Color Support */\nexport const isColorSupported =\n !process.env.NO_COLOR &&\n (Boolean(process.env.FORCE_COLOR) ||\n ((hasTTY || isWindows) && process.env.TERM !== \"dumb\") ||\n isCI());\n\nfunction parseVersion(versionString = \"\") {\n if (/^\\d{3,4}$/.test(versionString)) {\n const match = /(\\d{1,2})(\\d{2})/.exec(versionString) ?? [];\n\n return {\n major: 0,\n minor: Number.parseInt(match[1]!, 10),\n patch: Number.parseInt(match[2]!, 10)\n };\n }\n\n const versions = (versionString ?? \"\")\n .split(\".\")\n .map(n => Number.parseInt(n, 10));\n\n return {\n major: versions[0],\n minor: versions[1],\n patch: versions[2]\n };\n}\n\n/**\n * Check if the current environment supports hyperlinks in the terminal.\n *\n * @param stream - The stream to check for TTY support (default: process.stdout)\n * @returns Whether hyperlinks are supported\n */\nexport function isHyperlinkSupported(\n stream: NodeJS.WriteStream = process.stdout\n): boolean {\n if (process.env.FORCE_HYPERLINK) {\n return !(\n process.env.FORCE_HYPERLINK.length > 0 &&\n Number.parseInt(process.env.FORCE_HYPERLINK, 10) === 0\n );\n }\n\n // Netlify does not run a TTY, it does not need `supportsColor` check\n if (process.env.NETLIFY) {\n return true;\n } else if (!isColorSupported) {\n return false;\n } else if (stream && !stream.isTTY) {\n return false;\n } else if (\"WT_SESSION\" in process.env) {\n return true;\n } else if (process.platform === \"win32\") {\n return false;\n } else if (isCI()) {\n return false;\n } else if (process.env.TEAMCITY_VERSION) {\n return false;\n } else if (process.env.TERM_PROGRAM) {\n const version = parseVersion(process.env.TERM_PROGRAM_VERSION);\n\n switch (process.env.TERM_PROGRAM) {\n case \"iTerm.app\": {\n if (version.major === 3) {\n return version.minor !== undefined && version.minor >= 1;\n }\n\n return version.major !== undefined && version.major > 3;\n }\n case \"WezTerm\": {\n return version.major !== undefined && version.major >= 20_200_620;\n }\n case \"vscode\": {\n // Cursor forked VS Code and supports hyperlinks in 0.x.x\n if (process.env.CURSOR_TRACE_ID) {\n return true;\n }\n\n return (\n version.minor !== undefined &&\n version.major !== undefined &&\n (version.major > 1 || (version.major === 1 && version.minor >= 72))\n );\n }\n case \"ghostty\": {\n return true;\n }\n }\n }\n\n if (process.env.VTE_VERSION) {\n // 0.50.0 was supposed to support hyperlinks, but throws a segfault\n if (process.env.VTE_VERSION === \"0.50.0\") {\n return false;\n }\n\n const version = parseVersion(process.env.VTE_VERSION);\n\n return (\n (version.major !== undefined && version.major > 0) ||\n (version.minor !== undefined && version.minor >= 50)\n );\n }\n\n if (process.env.TERM === \"alacritty\") {\n return true;\n }\n\n return false;\n}\n\n/** Node.js versions */\nexport const nodeVersion =\n (process?.versions?.node || \"\").replace(/^v/, \"\") || null;\n\nexport const nodeMajorVersion = Number(nodeVersion?.split(\".\")[0]) || null;\n"],"mappings":"6CAqBA,MAAa,EAAW,SAAS,UAAY,GAGhC,EAAS,GAAQ,SAAS,QAAU,SAAS,OAAO,OAGpD,EAAU,EAAQ,QAAQ,IAAI,MAGrC,EACJ,QAAQ,IAAI,YACZ,QAAQ,IAAI,wBACZ,QAAQ,IAAI,UACZ,aAGW,EAAY,CAAC,MAAO,QAAS,UAAU,CAAC,SACnD,GAAM,aAAa,CACpB,CAQD,SAAgB,EAAiB,EAAc,CAC7C,MAAO,CACL,MACA,OACA,aAEA,UAEA,gBACA,MACD,CAAC,SAASA,GAAM,aAAa,EAAE,QAAQ,WAAY,GAAG,CAAC,CAI1D,MAAa,EAAe,EAAiB,EAAK,CAQlD,SAAgB,EAAW,EAAc,CACvC,MAAO,CACL,MACA,OACA,UACA,MACA,QACA,UACA,KAEA,mBACD,CAAC,SAASA,GAAM,aAAa,EAAE,QAAQ,WAAY,GAAG,CAAC,CAI1D,MAAa,EACX,EAAW,EAAK,EAAI,GAAa,EAAQ,QAAQ,IAAI,KAQvD,SAAgB,EAAkB,EAAc,CAC9C,MAAO,CAAC,MAAO,cAAe,MAAO,cAAc,CAAC,SAClDA,GAAM,aAAa,EAAE,QAAQ,WAAY,GAAG,CAC7C,CAIH,MAAa,EAAgB,EAAkB,EAAK,EAAI,EAG3C,EACX,EAAQ,QAAQ,IAAI,SAAY,GAAM,EAAI,GAAU,CAAC,EAG1C,EAAY,QAAQ,KAAK,EAAS,CAGlC,EAAU,UAAU,KAAK,EAAS,CAGlC,EAAU,WAAW,KAAK,EAAS,CAGnC,EACX,CAAC,QAAQ,IAAI,WACZ,EAAQ,QAAQ,IAAI,cACjB,GAAU,IAAc,QAAQ,IAAI,OAAS,QAC/C,GAAM,EAEV,SAAS,EAAa,EAAgB,GAAI,CACxC,GAAI,YAAY,KAAK,EAAc,CAAE,CACnC,IAAM,EAAQ,mBAAmB,KAAK,EAAc,EAAI,EAAE,CAE1D,MAAO,CACL,MAAO,EACP,MAAO,OAAO,SAAS,EAAM,GAAK,GAAG,CACrC,MAAO,OAAO,SAAS,EAAM,GAAK,GAAG,CACtC,CAGH,IAAM,GAAY,GAAiB,IAChC,MAAM,IAAI,CACV,IAAI,GAAK,OAAO,SAAS,EAAG,GAAG,CAAC,CAEnC,MAAO,CACL,MAAO,EAAS,GAChB,MAAO,EAAS,GAChB,MAAO,EAAS,GACjB,CASH,SAAgB,EACd,EAA6B,QAAQ,OAC5B,CACT,GAAI,QAAQ,IAAI,gBACd,MAAO,EACL,QAAQ,IAAI,gBAAgB,OAAS,GACrC,OAAO,SAAS,QAAQ,IAAI,gBAAiB,GAAG,GAAK,GAKzD,GAAI,QAAQ,IAAI,QACd,MAAO,MACG,MAED,GAAU,CAAC,EAAO,MAC3B,MAAO,MACE,eAAgB,QAAQ,IACjC,MAAO,MACE,QAAQ,WAAa,SAErB,GAAM,EAEN,QAAQ,IAAI,iBACrB,MAAO,MACE,QAAQ,IAAI,aAAc,CACnC,IAAM,EAAU,EAAa,QAAQ,IAAI,qBAAqB,CAE9D,OAAQ,QAAQ,IAAI,aAApB,CACE,IAAK,YAKH,OAJI,EAAQ,QAAU,EACb,EAAQ,QAAU,IAAA,IAAa,EAAQ,OAAS,EAGlD,EAAQ,QAAU,IAAA,IAAa,EAAQ,MAAQ,EAExD,IAAK,UACH,OAAO,EAAQ,QAAU,IAAA,IAAa,EAAQ,OAAS,SAEzD,IAAK,SAMH,OAJI,QAAQ,IAAI,gBACP,GAIP,EAAQ,QAAU,IAAA,IAClB,EAAQ,QAAU,IAAA,KACjB,EAAQ,MAAQ,GAAM,EAAQ,QAAU,GAAK,EAAQ,OAAS,IAGnE,IAAK,UACH,MAAO,UAtCX,MAAO,GA2CT,GAAI,QAAQ,IAAI,YAAa,CAE3B,GAAI,QAAQ,IAAI,cAAgB,SAC9B,MAAO,GAGT,IAAM,EAAU,EAAa,QAAQ,IAAI,YAAY,CAErD,OACG,EAAQ,QAAU,IAAA,IAAa,EAAQ,MAAQ,GAC/C,EAAQ,QAAU,IAAA,IAAa,EAAQ,OAAS,GAQrD,OAJI,QAAQ,IAAI,OAAS,YAQ3B,MAAa,GACV,SAAS,UAAU,MAAQ,IAAI,QAAQ,KAAM,GAAG,EAAI,KAE1C,EAAmB,OAAO,GAAa,MAAM,IAAI,CAAC,GAAG,EAAI"}
@@ -0,0 +1,59 @@
1
+ //#region src/environment-checks.d.ts
2
+ /** Value of process.platform */
3
+ declare const platform: NodeJS.Platform;
4
+ /** Detect if stdout.TTY is available */
5
+ declare const hasTTY: boolean;
6
+ /** Detect if `DEBUG` environment variable is set */
7
+ declare const isDebug: boolean;
8
+ /** Detect if the application is running in a staging environment */
9
+ declare const isStaging: boolean;
10
+ /**
11
+ * Check if the current environment is production.
12
+ *
13
+ * @param mode - The mode string to check.
14
+ * @returns Whether the environment is production
15
+ */
16
+ declare function isProductionMode(mode: string): boolean;
17
+ /** Detect if `NODE_ENV` environment variable is `production` */
18
+ declare const isProduction: boolean;
19
+ /**
20
+ * Check if the current environment is test.
21
+ *
22
+ * @param mode - The mode string to check.
23
+ * @returns Whether the environment is test
24
+ */
25
+ declare function isTestMode(mode: string): boolean;
26
+ /** Detect if `NODE_ENV` environment variable is `test` */
27
+ declare const isTest: boolean;
28
+ /**
29
+ * Check if the current environment is development.
30
+ *
31
+ * @param mode - The mode string to check.
32
+ * @returns Whether the environment is development
33
+ */
34
+ declare function isDevelopmentMode(mode: string): boolean;
35
+ /** Detect if `NODE_ENV` environment variable is `dev` or `development` */
36
+ declare const isDevelopment: boolean;
37
+ /** Detect if MINIMAL environment variable is set, running in CI or test or TTY is unavailable */
38
+ declare const isMinimal: boolean;
39
+ /** Detect if process.platform is Windows */
40
+ declare const isWindows: boolean;
41
+ /** Detect if process.platform is Linux */
42
+ declare const isLinux: boolean;
43
+ /** Detect if process.platform is macOS (darwin kernel) */
44
+ declare const isMacOS: boolean;
45
+ /** Color Support */
46
+ declare const isColorSupported: boolean;
47
+ /**
48
+ * Check if the current environment supports hyperlinks in the terminal.
49
+ *
50
+ * @param stream - The stream to check for TTY support (default: process.stdout)
51
+ * @returns Whether hyperlinks are supported
52
+ */
53
+ declare function isHyperlinkSupported(stream?: NodeJS.WriteStream): boolean;
54
+ /** Node.js versions */
55
+ declare const nodeVersion: string | null;
56
+ declare const nodeMajorVersion: number | null;
57
+ //#endregion
58
+ export { nodeVersion as _, isDevelopmentMode as a, isMacOS as c, isProductionMode as d, isStaging as f, nodeMajorVersion as g, isWindows as h, isDevelopment as i, isMinimal as l, isTestMode as m, isColorSupported as n, isHyperlinkSupported as o, isTest as p, isDebug as r, isLinux as s, hasTTY as t, isProduction as u, platform as v };
59
+ //# sourceMappingURL=environment-checks-TkDPh8QD.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-checks-TkDPh8QD.d.cts","names":[],"sources":["../src/environment-checks.ts"],"sourcesContent":[],"mappings":";;AAqBa,cAAA,QAAQ,EAAA,MAAA,CAAA,QAA0B;AAG/C;AAGa,cAHA,MAGoC,EAAA,OAAA;AAUjD;AAUgB,cApBH,OAoBmB,EAAA,OAAA;AAchC;AAQgB,cAhCH,SAgCa,EAAA,OAAA;AAe1B;AASA;AAOA;AAGA;AAIA;AAGA;AAGa,iBAlEG,gBAAA,CAkEgC,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;AAGhD;AAkCgB,cAzFH,YAyFuB,EAAA,OAC1B;AA8EV;AAGA;;;;;iBAnKgB,UAAA;;cAeH;;;;;;;iBASG,iBAAA;;cAOH;;cAGA;;cAIA;;cAGA;;cAGA;;cAGA;;;;;;;iBAkCG,oBAAA,UACN,MAAA,CAAO;;cA8EJ;cAGA"}
@@ -0,0 +1 @@
1
+ const e=require(`./ci-checks-DRWFr2UM.cjs`),t=process?.platform||``,n=!!(process?.stdout&&process?.stdout.isTTY),r=!!process.env.DEBUG,i=process.env.STORM_MODE||process.env.NEXT_PUBLIC_VERCEL_ENV||process.env.NODE_ENV||`production`,a=[`stg`,`stage`,`staging`].includes(i?.toLowerCase());function o(e){return[`prd`,`prod`,`production`,`preprod`,`preproduction`,`uat`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const s=o(i);function c(e){return[`tst`,`test`,`testing`,`stg`,`stage`,`staging`,`qa`,`qualityassurance`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const l=c(i)||a||!!process.env.TEST;function u(e){return[`dev`,`development`,`int`,`integration`].includes(e?.toLowerCase()?.replace(/[\s\-_]/g,``))}const d=u(i)||r,f=!!process.env.MINIMAL||e.t()||l||!n,p=/^win/i.test(t),m=/^linux/i.test(t),h=/^darwin/i.test(t),g=!process.env.NO_COLOR&&(!!process.env.FORCE_COLOR||(n||p)&&process.env.TERM!==`dumb`||e.t());function _(e=``){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e)??[];return{major:0,minor:Number.parseInt(t[1],10),patch:Number.parseInt(t[2],10)}}let t=(e??``).split(`.`).map(e=>Number.parseInt(e,10));return{major:t[0],minor:t[1],patch:t[2]}}function v(t=process.stdout){if(process.env.FORCE_HYPERLINK)return!(process.env.FORCE_HYPERLINK.length>0&&Number.parseInt(process.env.FORCE_HYPERLINK,10)===0);if(process.env.NETLIFY)return!0;if(g){if(t&&!t.isTTY)return!1;if(`WT_SESSION`in process.env)return!0;if(process.platform===`win32`||e.t()||process.env.TEAMCITY_VERSION)return!1;if(process.env.TERM_PROGRAM){let e=_(process.env.TERM_PROGRAM_VERSION);switch(process.env.TERM_PROGRAM){case`iTerm.app`:return e.major===3?e.minor!==void 0&&e.minor>=1:e.major!==void 0&&e.major>3;case`WezTerm`:return e.major!==void 0&&e.major>=20200620;case`vscode`:return process.env.CURSOR_TRACE_ID?!0:e.minor!==void 0&&e.major!==void 0&&(e.major>1||e.major===1&&e.minor>=72);case`ghostty`:return!0}}}else return!1;if(process.env.VTE_VERSION){if(process.env.VTE_VERSION===`0.50.0`)return!1;let e=_(process.env.VTE_VERSION);return e.major!==void 0&&e.major>0||e.minor!==void 0&&e.minor>=50}return process.env.TERM===`alacritty`}const y=(process?.versions?.node||``).replace(/^v/,``)||null,b=Number(y?.split(`.`)[0])||null;Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return t}});
@@ -1,84 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isDevelopment = exports.isDebug = exports.isColorSupported = exports.hasTTY = void 0;
7
- exports.isDevelopmentMode = isDevelopmentMode;
8
- exports.isHyperlinkSupported = isHyperlinkSupported;
9
- exports.isProduction = exports.isMinimal = exports.isMacOS = exports.isLinux = void 0;
10
- exports.isProductionMode = isProductionMode;
11
- exports.isTest = exports.isStaging = void 0;
12
- exports.isTestMode = isTestMode;
13
- exports.platform = exports.nodeVersion = exports.nodeMajorVersion = exports.isWindows = void 0;
14
- var _ciChecks = require("./ci-checks.cjs");
15
- const platform = exports.platform = process?.platform || "",
16
- hasTTY = exports.hasTTY = !!(process?.stdout && process?.stdout.isTTY),
17
- isDebug = exports.isDebug = !!process.env.DEBUG;
18
- const o = process.env.STORM_MODE || process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.NODE_ENV || "production";
19
- const isStaging = exports.isStaging = ["stg", "stage", "staging"].includes(o?.toLowerCase());
20
- function isProductionMode(r) {
21
- return ["prd", "prod", "production", "preprod", "preproduction", "uat"].includes(r?.toLowerCase()?.replace(/[\s\-_]/g, ""));
22
- }
23
- const isProduction = exports.isProduction = isProductionMode(o);
24
- function isTestMode(r) {
25
- return ["tst", "test", "testing", "stg", "stage", "staging", "qa", "qualityassurance"].includes(r?.toLowerCase()?.replace(/[\s\-_]/g, ""));
26
- }
27
- const isTest = exports.isTest = isTestMode(o) || isStaging || !!process.env.TEST;
28
- function isDevelopmentMode(r) {
29
- return ["dev", "development", "int", "integration"].includes(r?.toLowerCase()?.replace(/[\s\-_]/g, ""));
30
- }
31
- const isDevelopment = exports.isDevelopment = isDevelopmentMode(o) || isDebug,
32
- isMinimal = exports.isMinimal = !!process.env.MINIMAL || (0, _ciChecks.isCI)() || isTest || !hasTTY,
33
- isWindows = exports.isWindows = /^win/i.test(platform),
34
- isLinux = exports.isLinux = /^linux/i.test(platform),
35
- isMacOS = exports.isMacOS = /^darwin/i.test(platform),
36
- isColorSupported = exports.isColorSupported = !process.env.NO_COLOR && (!!process.env.FORCE_COLOR || (hasTTY || isWindows) && process.env.TERM !== "dumb" || (0, _ciChecks.isCI)());
37
- function t(r = "") {
38
- if (/^\d{3,4}$/.test(r)) {
39
- const s = /(\d{1,2})(\d{2})/.exec(r) ?? [];
40
- return {
41
- major: 0,
42
- minor: Number.parseInt(s[1], 10),
43
- patch: Number.parseInt(s[2], 10)
44
- };
45
- }
46
- const e = (r ?? "").split(".").map(s => Number.parseInt(s, 10));
47
- return {
48
- major: e[0],
49
- minor: e[1],
50
- patch: e[2]
51
- };
52
- }
53
- function isHyperlinkSupported(r = process.stdout) {
54
- if (process.env.FORCE_HYPERLINK) return !(process.env.FORCE_HYPERLINK.length > 0 && Number.parseInt(process.env.FORCE_HYPERLINK, 10) === 0);
55
- if (process.env.NETLIFY) return !0;
56
- if (isColorSupported) {
57
- if (r && !r.isTTY) return !1;
58
- if ("WT_SESSION" in process.env) return !0;
59
- if (process.platform === "win32") return !1;
60
- if ((0, _ciChecks.isCI)()) return !1;
61
- if (process.env.TEAMCITY_VERSION) return !1;
62
- if (process.env.TERM_PROGRAM) {
63
- const e = t(process.env.TERM_PROGRAM_VERSION);
64
- switch (process.env.TERM_PROGRAM) {
65
- case "iTerm.app":
66
- return e.major === 3 ? e.minor !== void 0 && e.minor >= 1 : e.major !== void 0 && e.major > 3;
67
- case "WezTerm":
68
- return e.major !== void 0 && e.major >= 20200620;
69
- case "vscode":
70
- return process.env.CURSOR_TRACE_ID ? !0 : e.minor !== void 0 && e.major !== void 0 && (e.major > 1 || e.major === 1 && e.minor >= 72);
71
- case "ghostty":
72
- return !0;
73
- }
74
- }
75
- } else return !1;
76
- if (process.env.VTE_VERSION) {
77
- if (process.env.VTE_VERSION === "0.50.0") return !1;
78
- const e = t(process.env.VTE_VERSION);
79
- return e.major !== void 0 && e.major > 0 || e.minor !== void 0 && e.minor >= 50;
80
- }
81
- return process.env.TERM === "alacritty";
82
- }
83
- const nodeVersion = exports.nodeVersion = (process?.versions?.node || "").replace(/^v/, "") || null,
84
- nodeMajorVersion = exports.nodeMajorVersion = Number(nodeVersion?.split(".")[0]) || null;
1
+ const e=require(`./environment-checks-ghgIrof1.cjs`);exports.hasTTY=e.t,exports.isColorSupported=e.n,exports.isDebug=e.r,exports.isDevelopment=e.i,exports.isDevelopmentMode=e.a,exports.isHyperlinkSupported=e.o,exports.isLinux=e.s,exports.isMacOS=e.c,exports.isMinimal=e.l,exports.isProduction=e.u,exports.isProductionMode=e.d,exports.isStaging=e.f,exports.isTest=e.p,exports.isTestMode=e.m,exports.isWindows=e.h,exports.nodeMajorVersion=e.g,exports.nodeVersion=e._,exports.platform=e.v;
@@ -0,0 +1,2 @@
1
+ import { _ as nodeVersion, a as isDevelopmentMode, c as isMacOS, d as isProductionMode, f as isStaging, g as nodeMajorVersion, h as isWindows, i as isDevelopment, l as isMinimal, m as isTestMode, n as isColorSupported, o as isHyperlinkSupported, p as isTest, r as isDebug, s as isLinux, t as hasTTY, u as isProduction, v as platform } from "./environment-checks-TkDPh8QD.cjs";
2
+ export { hasTTY, isColorSupported, isDebug, isDevelopment, isDevelopmentMode, isHyperlinkSupported, isLinux, isMacOS, isMinimal, isProduction, isProductionMode, isStaging, isTest, isTestMode, isWindows, nodeMajorVersion, nodeVersion, platform };
@@ -0,0 +1,2 @@
1
+ import { _ as nodeVersion, a as isDevelopmentMode, c as isMacOS, d as isProductionMode, f as isStaging, g as nodeMajorVersion, h as isWindows, i as isDevelopment, l as isMinimal, m as isTestMode, n as isColorSupported, o as isHyperlinkSupported, p as isTest, r as isDebug, s as isLinux, t as hasTTY, u as isProduction, v as platform } from "./environment-checks-BvXEMk0w.mjs";
2
+ export { hasTTY, isColorSupported, isDebug, isDevelopment, isDevelopmentMode, isHyperlinkSupported, isLinux, isMacOS, isMinimal, isProduction, isProductionMode, isStaging, isTest, isTestMode, isWindows, nodeMajorVersion, nodeVersion, platform };
@@ -1 +1 @@
1
- import{isCI as n}from"./ci-checks";export const platform=process?.platform||"",hasTTY=!!(process?.stdout&&process?.stdout.isTTY),isDebug=!!process.env.DEBUG;const o=process.env.STORM_MODE||process.env.NEXT_PUBLIC_VERCEL_ENV||process.env.NODE_ENV||"production";export const isStaging=["stg","stage","staging"].includes(o?.toLowerCase());export function isProductionMode(r){return["prd","prod","production","preprod","preproduction","uat"].includes(r?.toLowerCase()?.replace(/[\s\-_]/g,""))}export const isProduction=isProductionMode(o);export function isTestMode(r){return["tst","test","testing","stg","stage","staging","qa","qualityassurance"].includes(r?.toLowerCase()?.replace(/[\s\-_]/g,""))}export const isTest=isTestMode(o)||isStaging||!!process.env.TEST;export function isDevelopmentMode(r){return["dev","development","int","integration"].includes(r?.toLowerCase()?.replace(/[\s\-_]/g,""))}export const isDevelopment=isDevelopmentMode(o)||isDebug,isMinimal=!!process.env.MINIMAL||n()||isTest||!hasTTY,isWindows=/^win/i.test(platform),isLinux=/^linux/i.test(platform),isMacOS=/^darwin/i.test(platform),isColorSupported=!process.env.NO_COLOR&&(!!process.env.FORCE_COLOR||(hasTTY||isWindows)&&process.env.TERM!=="dumb"||n());function t(r=""){if(/^\d{3,4}$/.test(r)){const s=/(\d{1,2})(\d{2})/.exec(r)??[];return{major:0,minor:Number.parseInt(s[1],10),patch:Number.parseInt(s[2],10)}}const e=(r??"").split(".").map(s=>Number.parseInt(s,10));return{major:e[0],minor:e[1],patch:e[2]}}export function isHyperlinkSupported(r=process.stdout){if(process.env.FORCE_HYPERLINK)return!(process.env.FORCE_HYPERLINK.length>0&&Number.parseInt(process.env.FORCE_HYPERLINK,10)===0);if(process.env.NETLIFY)return!0;if(isColorSupported){if(r&&!r.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if(process.platform==="win32")return!1;if(n())return!1;if(process.env.TEAMCITY_VERSION)return!1;if(process.env.TERM_PROGRAM){const e=t(process.env.TERM_PROGRAM_VERSION);switch(process.env.TERM_PROGRAM){case"iTerm.app":return e.major===3?e.minor!==void 0&&e.minor>=1:e.major!==void 0&&e.major>3;case"WezTerm":return e.major!==void 0&&e.major>=20200620;case"vscode":return process.env.CURSOR_TRACE_ID?!0:e.minor!==void 0&&e.major!==void 0&&(e.major>1||e.major===1&&e.minor>=72);case"ghostty":return!0}}}else return!1;if(process.env.VTE_VERSION){if(process.env.VTE_VERSION==="0.50.0")return!1;const e=t(process.env.VTE_VERSION);return e.major!==void 0&&e.major>0||e.minor!==void 0&&e.minor>=50}return process.env.TERM==="alacritty"}export const nodeVersion=(process?.versions?.node||"").replace(/^v/,"")||null,nodeMajorVersion=Number(nodeVersion?.split(".")[0])||null;
1
+ import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g,v as _}from"./environment-checks-CNP6SBWs.mjs";export{h as hasTTY,u as isColorSupported,p as isDebug,s as isDevelopment,t as isDevelopmentMode,d as isHyperlinkSupported,m as isLinux,n as isMacOS,c as isMinimal,g as isProduction,r as isProductionMode,i as isStaging,f as isTest,l as isTestMode,o as isWindows,a as nodeMajorVersion,e as nodeVersion,_ as platform};
@@ -0,0 +1 @@
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}});
@@ -0,0 +1,64 @@
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
@@ -0,0 +1 @@
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"}