@vite-hub/runtime 0.5.0 → 0.6.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 (60) hide show
  1. package/dist/{core-DpLK9dQt.js → core-Crv8CV_r.js} +5 -7
  2. package/dist/{core-BfUEli_0.d.ts → core-auTkK4iZ.d.ts} +0 -6
  3. package/dist/detect-host-Du9saPsM.js +57 -0
  4. package/dist/detect-host-uTgoQ9i4.d.ts +17 -0
  5. package/dist/durability.d.ts +1 -3
  6. package/dist/durability.js +1 -2
  7. package/dist/{error-diagnostics-BM9W4pBg.js → error-diagnostics-Dj98U7ch.js} +1 -2
  8. package/dist/{error-diagnostics-0sYgKTT8.d.ts → error-diagnostics-DuusexaK.d.ts} +0 -2
  9. package/dist/{errors-BQ0ofIL4.js → errors-D2ixvqv3.js} +2 -3
  10. package/dist/{execution-budget-BPXbISEt.d.ts → execution-budget-Bv7h0-5V.d.ts} +0 -2
  11. package/dist/{hosted-console-ZfMo5MW4.d.ts → hosted-console-DInG3Xl9.d.ts} +3 -6
  12. package/dist/hosted-console-nLc1pL9J.js +71 -0
  13. package/dist/{index-DsisbCNa.d.ts → index-fSQ1ELEy.d.ts} +3 -38
  14. package/dist/index.d.ts +7 -6
  15. package/dist/index.js +7 -5
  16. package/dist/internal/console.d.ts +10 -5
  17. package/dist/internal/console.js +3 -2
  18. package/dist/internal/context.d.ts +1 -1
  19. package/dist/internal/context.js +1 -2
  20. package/dist/internal/detect-host.d.ts +2 -0
  21. package/dist/internal/detect-host.js +1 -0
  22. package/dist/internal/drain.d.ts +1 -3
  23. package/dist/internal/drain.js +3 -5
  24. package/dist/internal/error-diagnostics.d.ts +1 -1
  25. package/dist/internal/error-diagnostics.js +1 -2
  26. package/dist/internal/execution-budget.d.ts +1 -3
  27. package/dist/internal/execution-budget.js +3 -5
  28. package/dist/internal/grant.d.ts +1 -2
  29. package/dist/internal/grant.js +3 -4
  30. package/dist/internal/h3.d.ts +2 -4
  31. package/dist/internal/h3.js +4 -6
  32. package/dist/internal/node.d.ts +2 -3
  33. package/dist/internal/node.js +2 -3
  34. package/dist/internal/public-url.d.ts +1 -1
  35. package/dist/internal/public-url.js +1 -2
  36. package/dist/internal/response.d.ts +1 -1
  37. package/dist/internal/response.js +1 -2
  38. package/dist/internal/run-failed.d.ts +1 -3
  39. package/dist/internal/run-failed.js +1 -2
  40. package/dist/internal/run-scope.d.ts +1 -3
  41. package/dist/internal/run-scope.js +1 -2
  42. package/dist/internal/runtime-type.d.ts +1 -3
  43. package/dist/internal/runtime-type.js +2 -2
  44. package/dist/internal/shutdown.d.ts +1 -3
  45. package/dist/internal/shutdown.js +1 -2
  46. package/dist/internal/test-mode-setup.d.ts +1 -3
  47. package/dist/internal/test-mode-setup.js +1 -2
  48. package/dist/internal/test-mode.d.ts +1 -3
  49. package/dist/internal/test-mode.js +1 -2
  50. package/dist/internal/trace.d.ts +2 -4
  51. package/dist/internal/trace.js +1 -2
  52. package/dist/operations.d.ts +0 -3
  53. package/dist/operations.js +9 -10
  54. package/dist/{public-url-BCFhTiTM.d.ts → public-url-CaVJ4vFF.d.ts} +1 -2
  55. package/dist/{public-url-DizC8CFs.js → public-url-TlEVxNNh.js} +10 -72
  56. package/dist/{request-context-Dmsliqan.js → request-context-Dcf59Qh4.js} +11 -73
  57. package/dist/{response-iONbTI0E.d.ts → response-ClQ9ZSS_.d.ts} +0 -2
  58. package/dist/{response-Be5M4WIn.js → response-DEyMvEBF.js} +5 -7
  59. package/dist/{runtime-type-CHYQYwDx.js → runtime-type-EgaBGoVU.js} +2 -4
  60. package/package.json +9 -4
@@ -1,8 +1,8 @@
1
- import { t as runtimeErrorDiagnostics } from "./error-diagnostics-BM9W4pBg.js";
2
- import { r as isRuntimeObject } from "./runtime-type-CHYQYwDx.js";
3
- import { n as getViteHubErrorShape } from "./errors-BQ0ofIL4.js";
1
+ import { r as isRuntimeObject } from "./runtime-type-EgaBGoVU.js";
2
+ import { n as getViteHubErrorShape } from "./errors-D2ixvqv3.js";
3
+ import { t as runtimeErrorDiagnostics } from "./error-diagnostics-Dj98U7ch.js";
4
4
  import { Diagnostic, formatDiagnostic } from "nostics";
5
- //#region src/diagnostics.ts
5
+ // src/diagnostics.ts
6
6
  /** Recognizes an `Error` from any realm, without reading its properties. */
7
7
  function isNativeError(value) {
8
8
  if (!isRuntimeObject(value)) return false;
@@ -186,8 +186,7 @@ function normalizeRuntimeDiagnosticError(error, options = {}) {
186
186
  remainingStringLength: maxStringLength * (maxErrors + 1)
187
187
  }, 0);
188
188
  }
189
- //#endregion
190
- //#region src/response.ts
189
+ // src/response.ts
191
190
  function prototypeGetter(constructor, key) {
192
191
  return Object.getOwnPropertyDescriptor(constructor.prototype, key)?.get;
193
192
  }
@@ -428,5 +427,4 @@ function createStatusZeroResponse(type, url = "") {
428
427
  });
429
428
  return response;
430
429
  }
431
- //#endregion
432
430
  export { toResponse as a, normalizeRuntimeDiagnosticError as c, serializeResponse as i, isResponse as n, formatRuntimeDiagnosticError as o, isSerializedResponse as r, isRuntimeDiagnostic as s, deserializeResponse as t };
@@ -1,5 +1,5 @@
1
1
  import { defineDiagnostics } from "nostics";
2
- //#region ../internal/dist/invariant.js
2
+ // ../internal/dist/invariant.js
3
3
  const invariantDiagnostics = /*#__PURE__*/ defineDiagnostics({
4
4
  docsBase: "https://vitehub.dev/docs/development/diagnostics",
5
5
  codes: { INTERNAL_INVARIANT_FAILED: {
@@ -14,8 +14,7 @@ const invariantDiagnostics = /*#__PURE__*/ defineDiagnostics({
14
14
  function invariantError(what) {
15
15
  return invariantDiagnostics.INTERNAL_INVARIANT_FAILED({ what });
16
16
  }
17
- //#endregion
18
- //#region src/internal/runtime-type.ts
17
+ // src/internal/runtime-type.ts
19
18
  /** Narrows opaque inputs without reading their properties. Kept for `@vite-hub/presets`; other packages use `typeof`. */
20
19
  function hasRuntimeType(value, expected) {
21
20
  switch (expected) {
@@ -77,5 +76,4 @@ function isRuntimeResponse(value) {
77
76
  }
78
77
  return false;
79
78
  }
80
- //#endregion
81
79
  export { isRuntimeResponse as i, hasRuntimeType as n, isRuntimeObject as r, asUnknownBoundary as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-hub/runtime",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Shared runtime context, capability, policy, approval, and tracing primitives for ViteHub.",
5
5
  "keywords": [
6
6
  "approvals",
@@ -47,6 +47,11 @@
47
47
  "import": "./dist/internal/context.js",
48
48
  "default": "./dist/internal/context.js"
49
49
  },
50
+ "./internal/detect-host": {
51
+ "types": "./dist/internal/detect-host.d.ts",
52
+ "import": "./dist/internal/detect-host.js",
53
+ "default": "./dist/internal/detect-host.js"
54
+ },
50
55
  "./internal/drain": {
51
56
  "types": "./dist/internal/drain.d.ts",
52
57
  "import": "./dist/internal/drain.js",
@@ -139,13 +144,13 @@
139
144
  },
140
145
  "devDependencies": {
141
146
  "@libsql/client": "^0.18.0",
142
- "@types/node": "^24.19.1",
147
+ "@types/node": "^24.19.2",
143
148
  "@vite-hub/internal": "0.0.1",
144
149
  "postgres": "^3.4.9",
145
150
  "publint": "^0.3.25",
146
151
  "typescript": "^6.0.3",
147
- "vite-plus": "^0.3.3",
148
- "vitest": "^4.1.11"
152
+ "vite-plus": "^1.7.0",
153
+ "vitest": "5.1.0"
149
154
  },
150
155
  "engines": {
151
156
  "node": ">=24.15.0"