@karmaniverous/get-dotenv 4.6.0-0 → 5.0.0-1

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 (48) hide show
  1. package/README.md +130 -23
  2. package/dist/cliHost.cjs +1089 -0
  3. package/dist/cliHost.d.cts +191 -0
  4. package/dist/cliHost.d.mts +191 -0
  5. package/dist/cliHost.d.ts +191 -0
  6. package/dist/cliHost.mjs +1085 -0
  7. package/dist/config.cjs +247 -0
  8. package/dist/config.d.cts +53 -0
  9. package/dist/config.d.mts +53 -0
  10. package/dist/config.d.ts +53 -0
  11. package/dist/config.mjs +242 -0
  12. package/dist/env-overlay.cjs +163 -0
  13. package/dist/env-overlay.d.cts +48 -0
  14. package/dist/env-overlay.d.mts +48 -0
  15. package/dist/env-overlay.d.ts +48 -0
  16. package/dist/env-overlay.mjs +161 -0
  17. package/dist/getdotenv.cli.mjs +2788 -734
  18. package/dist/index.cjs +902 -280
  19. package/dist/index.d.cts +122 -64
  20. package/dist/index.d.mts +122 -64
  21. package/dist/index.d.ts +122 -64
  22. package/dist/index.mjs +904 -283
  23. package/dist/plugins-aws.cjs +618 -0
  24. package/dist/plugins-aws.d.cts +176 -0
  25. package/dist/plugins-aws.d.mts +176 -0
  26. package/dist/plugins-aws.d.ts +176 -0
  27. package/dist/plugins-aws.mjs +616 -0
  28. package/dist/plugins-batch.cjs +569 -0
  29. package/dist/plugins-batch.d.cts +198 -0
  30. package/dist/plugins-batch.d.mts +198 -0
  31. package/dist/plugins-batch.d.ts +198 -0
  32. package/dist/plugins-batch.mjs +567 -0
  33. package/dist/plugins-init.cjs +282 -0
  34. package/dist/plugins-init.d.cts +180 -0
  35. package/dist/plugins-init.d.mts +180 -0
  36. package/dist/plugins-init.d.ts +180 -0
  37. package/dist/plugins-init.mjs +280 -0
  38. package/getdotenv.config.json +19 -0
  39. package/package.json +88 -17
  40. package/templates/cli/ts/index.ts +9 -0
  41. package/templates/cli/ts/plugins/hello.ts +17 -0
  42. package/templates/config/js/getdotenv.config.js +15 -0
  43. package/templates/config/json/local/getdotenv.config.local.json +7 -0
  44. package/templates/config/json/public/getdotenv.config.json +12 -0
  45. package/templates/config/public/getdotenv.config.json +13 -0
  46. package/templates/config/ts/getdotenv.config.ts +16 -0
  47. package/templates/config/yaml/local/getdotenv.config.local.yaml +7 -0
  48. package/templates/config/yaml/public/getdotenv.config.yaml +10 -0
@@ -0,0 +1,15 @@
1
+ export default {
2
+ dotenvToken: '.env',
3
+ privateToken: 'local',
4
+ paths: './',
5
+ vars: { APP_SETTING: 'app_value' },
6
+ envVars: { dev: { ENV_SETTING: 'dev_value' } },
7
+ dynamic: {
8
+ GREETING: ({ APP_SETTING = '' }) => `Hello ${APP_SETTING}`,
9
+ // Example: env-aware dynamic value. The second argument receives the
10
+ // selected environment (if any); tailor behavior per environment.
11
+ // For example, with env='dev' this yields "for-dev"; when env is not
12
+ // provided, this returns an empty string.
13
+ ENV_TAG: (_vars, env) => (env ? `for-${env}` : ''),
14
+ },
15
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "vars": { "APP_SECRET": "secret_value" },
3
+ "envVars": {
4
+ "dev": { "ENV_SECRET": "dev_secret" },
5
+ "test": { "ENV_SECRET": "test_secret" }
6
+ }
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "dotenvToken": ".env",
3
+ "privateToken": "local",
4
+ "paths": "./",
5
+ "vars": {
6
+ "APP_SETTING": "app_value"
7
+ },
8
+ "envVars": {
9
+ "dev": { "ENV_SETTING": "dev_value" },
10
+ "test": { "ENV_SETTING": "test_value" }
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "dotenvToken": ".env",
3
+ "privateToken": "local",
4
+ "paths": "./",
5
+ "loadProcess": true,
6
+ "log": false,
7
+ "vars": {
8
+ "APP_NAME": "my-app"
9
+ },
10
+ "envVars": {
11
+ "dev": { "DEV_ONLY": "1" }
12
+ }
13
+ }
@@ -0,0 +1,16 @@
1
+ export default {
2
+ dotenvToken: '.env',
3
+ privateToken: 'local',
4
+ paths: './',
5
+ vars: { APP_SETTING: 'app_value' },
6
+ envVars: { dev: { ENV_SETTING: 'dev_value' } },
7
+ dynamic: {
8
+ GREETING: ({ APP_SETTING = '' }) => `${APP_SETTING}-ts`,
9
+ // Example: env-aware dynamic value. The second argument receives the
10
+ // selected environment (if any); tailor behavior per environment.
11
+ // For example, with env='dev' this yields "for-dev"; when env is not
12
+ // provided, this returns an empty string.
13
+ ENV_TAG: (_vars: Record<string, string | undefined>, env?: string) =>
14
+ env ? `for-${env}` : '',
15
+ },
16
+ };
@@ -0,0 +1,7 @@
1
+ vars:
2
+ APP_SECRET: "secret_value"
3
+ envVars:
4
+ dev:
5
+ ENV_SECRET: "dev_secret"
6
+ test:
7
+ ENV_SECRET: "test_secret"
@@ -0,0 +1,10 @@
1
+ dotenvToken: ".env"
2
+ privateToken: "local"
3
+ paths: "./"
4
+ vars:
5
+ APP_SETTING: "app_value"
6
+ envVars:
7
+ dev:
8
+ ENV_SETTING: "dev_value"
9
+ test:
10
+ ENV_SETTING: "test_value"