@voltro/env 0.86.0 → 0.88.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.
package/dist/define.js CHANGED
@@ -1,7 +1,6 @@
1
- //#region src/define.ts
1
+ // src/define.ts
2
2
  var e = "VOLTRO_PUBLIC_", t = (e, t) => Object.freeze({
3
3
  vars: Object.freeze({ ...e }),
4
4
  publicPrefix: t?.publicPrefix ?? "VOLTRO_PUBLIC_"
5
5
  }), n = (e) => typeof e == "object" && !!e && "vars" in e && typeof e.vars == "object" && e.vars !== null;
6
- //#endregion
7
6
  export { e as DEFAULT_PUBLIC_PREFIX, t as defineEnv, n as isEnvContract };
package/dist/field.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Effect as e, Result as t, Schema as n, SchemaGetter as r, SchemaIssue as i } from "effect";
2
- //#region src/field.ts
2
+ // src/field.ts
3
3
  var a = (e, r, i, a) => ({
4
4
  kind: e,
5
5
  access: a.access,
@@ -46,5 +46,4 @@ var a = (e, r, i, a) => ({
46
46
  url: (e) => a("url", n.String.pipe(n.check(n.makeFilter((e) => s(e) || `expected a valid URL, got "${e}"`))), "string", e),
47
47
  enum: (e, t) => a("enum", n.Literals(e), e.map((e) => `'${e}'`).join(" | "), t)
48
48
  };
49
- //#endregion
50
49
  export { c as envVar };
package/dist/manifest.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/manifest.ts
1
+ // src/manifest.ts
2
2
  var e = (e) => e ? Object.entries(e.vars).map(([e, t]) => ({
3
3
  key: e,
4
4
  owner: "app",
@@ -76,5 +76,4 @@ var e = (e) => e ? Object.entries(e.vars).map(([e, t]) => ({
76
76
  }
77
77
  return n.join("\n").replace(/\n{3,}/g, "\n\n").trimEnd() + "\n";
78
78
  };
79
- //#endregion
80
79
  export { r as FRAMEWORK_ENV_CATALOG, e as appEnvEntries, i as frameworkEnvNames, t as pluginEnvEntries, o as renderDotEnvExample };
package/dist/pluginEnv.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/pluginEnv.ts
1
+ // src/pluginEnv.ts
2
2
  var e = (e) => {
3
3
  let t = new Set(e.map((e) => e.name));
4
4
  return {
@@ -9,5 +9,4 @@ var e = (e) => {
9
9
  }
10
10
  };
11
11
  };
12
- //#endregion
13
12
  export { e as pluginEnv };
package/dist/public.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/public.ts
1
+ // src/public.ts
2
2
  var e = () => globalThis.__voltro_env__ ?? {}, t = new Proxy({}, {
3
3
  get: (t, n) => typeof n == "string" ? e()[n] : void 0,
4
4
  has: (t, n) => typeof n == "string" && n in e(),
@@ -11,5 +11,4 @@ var e = () => globalThis.__voltro_env__ ?? {}, t = new Proxy({}, {
11
11
  }), n = () => e(), r = (e) => {
12
12
  globalThis.__voltro_env__ = Object.freeze({ ...e });
13
13
  };
14
- //#endregion
15
14
  export { r as __installPublicEnv, t as publicEnv, n as publicEnvSnapshot };
package/dist/server.d.ts CHANGED
@@ -45,8 +45,11 @@ export declare const resolveSecretLive: (key: string) => Promise<string | undefi
45
45
  * accept both during cutover reads `getSecretWithOverlap`.
46
46
  *
47
47
  * IMPORTANT — scope of "without a restart". This updates what CODE that reads a
48
- * secret PER USE sees (an outbound API key, a webhook-signing secret, a
49
- * field-encryption key). It does NOT re-establish a connection that captured the
48
+ * secret PER USE through `getSecret` sees (an outbound API key, an app's own
49
+ * verifier). It does not reach the framework's own secrets: the field keyring is
50
+ * built once at boot, and the session/storage/OG/token secrets are read from the
51
+ * environment — they rotate with `voltro secret rotate`. Nor does it
52
+ * re-establish a connection that captured the
50
53
  * old value at construction — a live DB pool built with the old `DB_URL`
51
54
  * password keeps that connection until it is rebuilt (still a restart, or a
52
55
  * pool-level reconnect). Rotate connection credentials with that in mind.
package/dist/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { readEnvValue as e, readEnvValuePrevious as t, refreshEnvValue as n, requireEnvValue as r } from "./snapshot.js";
2
2
  import { resolveSecret as i } from "@voltro/runtime";
3
- //#region src/server.ts
3
+ // src/server.ts
4
4
  var a = new Proxy({}, {
5
5
  get: (e, t) => typeof t == "string" ? r(t) : void 0,
6
6
  has: (t, n) => typeof n == "string" && e(n) !== void 0
@@ -25,5 +25,4 @@ var a = new Proxy({}, {
25
25
  previous: n === void 0 ? void 0 : String(n)
26
26
  };
27
27
  };
28
- //#endregion
29
28
  export { o as getSecret, l as getSecretWithOverlap, s as resolveSecretLive, c as rotateSecretLive, a as serverEnv };
package/dist/snapshot.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/snapshot.ts
1
+ // src/snapshot.ts
2
2
  var e = Symbol.for("@voltro/env/state"), t = globalThis[e] ??= {
3
3
  snapshot: null,
4
4
  live: null,
@@ -35,5 +35,4 @@ var e = Symbol.for("@voltro/env/state"), t = globalThis[e] ??= {
35
35
  }, u = () => {
36
36
  t.snapshot = null, t.live = null, t.clock = () => Date.now();
37
37
  };
38
- //#endregion
39
38
  export { r as hasEnvSnapshot, c as hasLiveOverlap, n as installEnvSnapshot, i as readEnvValue, s as readEnvValuePrevious, o as refreshEnvValue, a as requireEnvValue, u as resetEnvSnapshot, l as setEnvClock };
package/dist/validate.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Result as e } from "effect";
2
- //#region src/validate.ts
2
+ // src/validate.ts
3
3
  var t = (e, n = /* @__PURE__ */ new Set()) => {
4
4
  if (e === null || typeof e == "string" || typeof e == "boolean") return !0;
5
5
  if (typeof e == "number") return Number.isFinite(e);
@@ -62,5 +62,4 @@ var t = (e, n = /* @__PURE__ */ new Set()) => {
62
62
  let t = e.map((e) => ` • ${e.key} (${e.access}, ${e.reason}): ${e.message}`);
63
63
  return `environment validation failed (${e.length} ${e.length === 1 ? "error" : "errors"}):\n${t.join("\n")}`;
64
64
  };
65
- //#endregion
66
65
  export { i as checkEnvNaming, a as formatEnvErrors, r as resolveEnv };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/env",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "description": "Typed, schema-validated environment variables with a structural public/secret boundary. Declare once in app.config.ts; read public vars in the browser, secrets only on the server.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -43,10 +43,10 @@
43
43
  "node": ">=24.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@voltro/runtime": "0.86.0"
46
+ "@voltro/runtime": "0.88.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "effect": "4.0.1"
49
+ "effect": "4.1.0"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"