@ultimat3/core 31.42.0 → 31.43.0

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 (2) hide show
  1. package/README.md +8 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -396,15 +396,21 @@ request-scoped and never logged — `actorLabel()` stays id-only.
396
396
  ## Env fails once, completely
397
397
 
398
398
  ```ts
399
- export const env = defineEnv({
399
+ import { defineEnv, type EnvSchema } from '@ultimat3/core';
400
+
401
+ export const envSchema = {
400
402
  DATABASE_URL: { type: 'url', secret: true },
401
403
  PORT: { type: 'port', default: 3000 },
402
404
  REGION: { type: 'enum', values: ['us', 'eu'] },
403
405
  SENTRY_DSN: { type: 'url', required: false },
404
406
  NATS_URL: { type: 'url', role: 'sync' }, // only required for ROLE=sync
405
- });
407
+ } satisfies EnvSchema;
408
+ export const env = defineEnv(envSchema);
406
409
  ```
407
410
 
411
+ The `envSchema` export is the one declaration form: `x env`, `x secrets` and `x deploy` read it,
412
+ and an app's `undeclared-env` guard refuses a `defineEnv` handed anything else.
413
+
408
414
  Every missing or malformed key is listed in one `X_ENV_MISSING`. `secret: true` keys are
409
415
  redacted in logs and masked in `checkEnv()` output; the env summary (`describeEnv()`, internal) emits declarations only,
410
416
  safe for `x.manifest.json`. Omit `required` for required — `required: false` is the only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/core",
3
- "version": "31.42.0",
3
+ "version": "31.43.0",
4
4
  "description": "Ultimate's foundation: errors, context, env, config, clock, ids, logging, telemetry, lifecycle",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -54,6 +54,6 @@
54
54
  "test": "bun test"
55
55
  },
56
56
  "dependencies": {
57
- "@ultimat3/schema": "31.42.0"
57
+ "@ultimat3/schema": "31.43.0"
58
58
  }
59
59
  }