@vite-hub/env 0.4.1 → 0.5.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 (33) hide show
  1. package/README.md +2 -2
  2. package/dist/{access-B8lSDip4.js → access-C5sPO6C2.js} +1 -1
  3. package/dist/{bridge-error-BhJ77age.js → bridge-error-t9bc6xvE.js} +0 -1
  4. package/dist/bridge.js +5 -3
  5. package/dist/cli-BctSFldY.js +1363 -0
  6. package/dist/{cli-BPp7rdcA.d.ts → cli-DJtQF4Wi.d.ts} +1 -0
  7. package/dist/cli.d.ts +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/database.js +1 -3
  10. package/dist/{declarations-C5XR3aKw.d.ts → declarations-BEL0yvEY.d.ts} +0 -18
  11. package/dist/{error-diagnostics-DsDPsST_.js → error-diagnostics-CwQGNVnK.js} +1 -2
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +3 -3
  14. package/dist/internal/agent.js +2 -2
  15. package/dist/internal/connections.js +2 -2
  16. package/dist/internal/server.d.ts +1 -1
  17. package/dist/internal/server.js +1 -1
  18. package/dist/{object-C7Jt4ez2.js → object-DICxAEoH.js} +5 -1
  19. package/dist/{operation-definition-nmRu_O3V.d.ts → operation-definition-CI2PJGqu.d.ts} +8 -2
  20. package/dist/{operations-B1PFpKzy.js → operations-LVaCzpR0.js} +1 -1
  21. package/dist/operations.d.ts +1 -1
  22. package/dist/operations.js +3 -3
  23. package/dist/runtime/public-env.js +1 -1
  24. package/dist/runtime/server-env.js +1 -1
  25. package/dist/{schema-C_a0WZyd.js → schema-CnCp0Muw.js} +39 -36
  26. package/dist/{server-B9-8r6MZ.js → server-Ct3uvhf9.js} +6 -18
  27. package/dist/{server-CgKAEAE6.d.ts → server-OvARy_y9.d.ts} +0 -1
  28. package/dist/server.d.ts +1 -1
  29. package/dist/server.js +1 -1
  30. package/dist/vite.d.ts +4 -4
  31. package/dist/vite.js +4 -20
  32. package/package.json +3 -3
  33. package/dist/cli-C51D6V-M.js +0 -669
package/README.md CHANGED
@@ -417,7 +417,7 @@ Read the complete [Env guide](https://vitehub.dev/docs/env), the [host support m
417
417
  `hubEnv()` contributes two CLI commands:
418
418
 
419
419
  ```bash
420
- vitehub env inspect [--stage <name>] [--json]
420
+ vitehub env list [--stage <name>] [--json]
421
421
  vitehub env check [--stage <name>] [--json]
422
422
  ```
423
423
 
@@ -426,7 +426,7 @@ Both commands load the Vite config in the selected stage mode, including `.env.<
426
426
  `hubEnv()` also contributes the `env.inspect` operation. It asks the running app, not a local stage, so the CLI and the Console can check that a deployed app has its env. It answers on the signed `POST /_vitehub/rpc` endpoint like every other operation, and needs the `env` Console section (`env:read` is enough).
427
427
 
428
428
  ```bash
429
- vitehub env status --url https://my-app.example.com
429
+ vitehub env list --url https://my-app.example.com
430
430
  ```
431
431
 
432
432
  The result has `ok`, the `host` that the app runs on when it is known, and one entry per declaration: `path`, `names`, `name` (the host variable that supplied the value), `source`, `provider`, `required`, `secret`, `status`, and `blocking`. The status is `available`, `defaulted`, `missing`, `invalid`, or `error`, as in `inspectServerEnv()`. The result never holds a value, a preview, or a length.
@@ -1,4 +1,4 @@
1
- import { t as envBridgeError } from "./bridge-error-BhJ77age.js";
1
+ import { t as envBridgeError } from "./bridge-error-t9bc6xvE.js";
2
2
  import { defineGrant } from "@vite-hub/runtime/internal/grant";
3
3
  //#region src/internal/access.ts
4
4
  /** Marks the type of contexts that Env creates. The bridge trusts only the `envAccess` grant registry, not this marker. */
@@ -17,7 +17,6 @@ const guidance = (fix) => ({
17
17
  why: ({ message }) => message,
18
18
  fix
19
19
  });
20
- /** Repair guidance that the management route adds to each bridge error body. */
21
20
  const envBridgeDiagnostics = /*#__PURE__*/ defineDiagnostics({
22
21
  docsBase: "https://vitehub.dev/docs/env/diagnostics",
23
22
  codes: {
package/dist/bridge.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as SecretEnv } from "./secret-DJd-fy5T.js";
2
- import { n as envBridgeErrorBody, r as sanitizeEnvBridgeError, t as envBridgeError } from "./bridge-error-BhJ77age.js";
3
- import { i as validateEnvActor, n as envIdentifier, r as grantEnvAccess, t as envAccessAuthority } from "./access-B8lSDip4.js";
2
+ import { n as envBridgeErrorBody, r as sanitizeEnvBridgeError, t as envBridgeError } from "./bridge-error-t9bc6xvE.js";
3
+ import { i as validateEnvActor, n as envIdentifier, r as grantEnvAccess, t as envAccessAuthority } from "./access-C5sPO6C2.js";
4
4
  //#region src/auth.ts
5
5
  const permissions$1 = [
6
6
  "inspect",
@@ -180,7 +180,9 @@ function createEnvBridge(options) {
180
180
  }
181
181
  try {
182
182
  await options.emit?.(structuredClone(event));
183
- } catch {}
183
+ } catch {
184
+ console.warn(`[vitehub] Env activity export failed for event ${event.id}. The activity store keeps the event.`);
185
+ }
184
186
  }
185
187
  async function allowed(context, key, permission) {
186
188
  const authority = envAccessAuthority(context);