@stacksjs/env 0.70.37 → 0.70.43

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.
@@ -0,0 +1,27 @@
1
+ import type { EnvKey } from '../../../env';
2
+ import type { StacksEnv } from './types';
3
+ export declare function process(): StacksEnv;
4
+ // eslint-disable-next-line pickier/no-unused-vars
5
+ export declare function writeEnv(key: EnvKey, value: string, options?: { path: string }): void;
6
+ /**
7
+ * Validate environment variables against the envEnum constraints.
8
+ * Returns an array of validation error messages (empty if all valid).
9
+ */
10
+ export declare function validateEnv(envProxy?: StacksEnv): string[];
11
+ /**
12
+ * Assert that every key in `keys` is set on `process.env` (non-empty).
13
+ *
14
+ * Use this at boot to fail fast on misconfigured environments —
15
+ * `requireEnv(['APP_KEY', 'STRIPE_SECRET'])` throws a single error
16
+ * listing every missing key, which is much friendlier than "your
17
+ * Stripe API key is empty" mid-checkout. Returns the env proxy so it
18
+ * can be chained: `const envOk = requireEnv([...])`.
19
+ */
20
+ export declare function requireEnv(keys: ReadonlyArray<string>, envProxy?: StacksEnv): StacksEnv;
21
+ export declare const env: StacksEnv;
22
+ export * from './types';
23
+ export * from './crypto';
24
+ export * from './parser';
25
+ export * from './plugin';
26
+ export * from './cli';
27
+ export * from './utils';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/env",
3
3
  "type": "module",
4
- "version": "0.70.37",
4
+ "version": "0.70.43",
5
5
  "description": "Stacks env helper methods.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "better-dx": "^0.2.12",
49
- "@stacksjs/path": "0.70.30",
50
- "@stacksjs/validation": "0.70.30"
49
+ "@stacksjs/path": "^0.70.43",
50
+ "@stacksjs/validation": "^0.70.43"
51
51
  }
52
52
  }
@@ -1,6 +0,0 @@
1
- import type { EnvKey } from '../../../env';
2
- import type { StacksEnv } from './types';
3
- export declare function process(): StacksEnv;
4
- // eslint-disable-next-line pickier/no-unused-vars
5
- export declare function writeEnv(key: EnvKey, value: string, options?: { path: string }): void;
6
- export declare const env: StacksEnv;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes