veryfront 0.1.857 → 0.1.859

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 (53) hide show
  1. package/esm/cli/commands/lint/handler.d.ts.map +1 -1
  2. package/esm/cli/commands/lint/handler.js +9 -12
  3. package/esm/cli/commands/mcp/handler.d.ts +3 -0
  4. package/esm/cli/commands/mcp/handler.d.ts.map +1 -1
  5. package/esm/cli/commands/mcp/handler.js +4 -4
  6. package/esm/cli/commands/serve/split-mode.d.ts +1 -0
  7. package/esm/cli/commands/serve/split-mode.d.ts.map +1 -1
  8. package/esm/cli/commands/serve/split-mode.js +45 -13
  9. package/esm/cli/commands/test/command.d.ts.map +1 -1
  10. package/esm/cli/commands/test/command.js +5 -2
  11. package/esm/cli/commands/test/handler.d.ts.map +1 -1
  12. package/esm/cli/commands/test/handler.js +19 -13
  13. package/esm/cli/mcp/standalone.d.ts +7 -0
  14. package/esm/cli/mcp/standalone.d.ts.map +1 -1
  15. package/esm/cli/mcp/standalone.js +9 -10
  16. package/esm/cli/mcp/tools/context7-tools.d.ts.map +1 -1
  17. package/esm/cli/mcp/tools/context7-tools.js +3 -3
  18. package/esm/cli/mcp/tools/helpers.d.ts +8 -0
  19. package/esm/cli/mcp/tools/helpers.d.ts.map +1 -1
  20. package/esm/cli/mcp/tools/project-tools.d.ts.map +1 -1
  21. package/esm/cli/mcp/tools/project-tools.js +33 -3
  22. package/esm/cli/mcp/tools/run-lint-tool.d.ts +6 -0
  23. package/esm/cli/mcp/tools/run-lint-tool.d.ts.map +1 -1
  24. package/esm/cli/mcp/tools/run-lint-tool.js +10 -58
  25. package/esm/cli/mcp/tools/run-tests-tool.d.ts +6 -0
  26. package/esm/cli/mcp/tools/run-tests-tool.d.ts.map +1 -1
  27. package/esm/cli/mcp/tools/run-tests-tool.js +8 -32
  28. package/esm/cli/scaffold/engine.js +1 -1
  29. package/esm/cli/shared/animation.d.ts +8 -0
  30. package/esm/cli/shared/animation.d.ts.map +1 -1
  31. package/esm/cli/shared/animation.js +2 -7
  32. package/esm/cli/templates/manifest.js +7 -7
  33. package/esm/cli/utils/write-run-result.js +4 -4
  34. package/esm/deno.js +1 -1
  35. package/esm/src/agent/runtime/constants.js +1 -1
  36. package/esm/src/chat/provider-errors.d.ts.map +1 -1
  37. package/esm/src/chat/provider-errors.js +20 -0
  38. package/esm/src/platform/compat/process/command.d.ts.map +1 -1
  39. package/esm/src/platform/compat/process/command.js +4 -3
  40. package/esm/src/platform/compat/process/env.d.ts.map +1 -1
  41. package/esm/src/platform/compat/process/env.js +13 -9
  42. package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
  43. package/esm/src/platform/compat/process/lifecycle.js +55 -37
  44. package/esm/src/platform/compat/process/runtime-process.d.ts.map +1 -1
  45. package/esm/src/platform/compat/process/runtime-process.js +4 -3
  46. package/esm/src/platform/compat/runtime.d.ts +2 -0
  47. package/esm/src/platform/compat/runtime.d.ts.map +1 -1
  48. package/esm/src/platform/compat/runtime.js +14 -6
  49. package/esm/src/platform/compat/stdin.d.ts.map +1 -1
  50. package/esm/src/platform/compat/stdin.js +17 -13
  51. package/esm/src/utils/version-constant.d.ts +1 -1
  52. package/esm/src/utils/version-constant.js +1 -1
  53. package/package.json +1 -1
@@ -1,33 +1,37 @@
1
1
  import * as dntShim from "../../../../_dnt.shims.js";
2
- import { isBun as IS_BUN, isDeno as IS_DENO } from "../runtime.js";
2
+ import { getDenoRuntime, isBun as IS_BUN, isDeno as IS_DENO } from "../runtime.js";
3
3
  import { runtimeProcess } from "./runtime-process.js";
4
4
  /** Get command-line arguments (cross-runtime: Deno.args or process.argv). */
5
5
  export function getArgs() {
6
- if (IS_DENO)
7
- return dntShim.Deno.args;
6
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
7
+ if (deno)
8
+ return deno.args;
8
9
  if (runtimeProcess)
9
10
  return runtimeProcess.argv.slice(2);
10
11
  return [];
11
12
  }
12
13
  /** Exit the process with an optional code (cross-runtime: Deno.exit or process.exit). */
13
14
  export function exit(code) {
14
- if (IS_DENO)
15
- dntShim.Deno.exit(code);
15
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
16
+ if (deno)
17
+ deno.exit(code);
16
18
  if (runtimeProcess)
17
19
  runtimeProcess.exit(code);
18
20
  throw new Error("exit() is not supported in this runtime");
19
21
  }
20
22
  /** Return the current working directory. */
21
23
  export function cwd() {
22
- if (IS_DENO)
23
- return dntShim.Deno.cwd();
24
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
25
+ if (deno)
26
+ return deno.cwd();
24
27
  if (runtimeProcess)
25
28
  return runtimeProcess.cwd();
26
29
  throw new Error("cwd() is not supported in this runtime");
27
30
  }
28
31
  export function chdir(directory) {
29
- if (IS_DENO) {
30
- dntShim.Deno.chdir(directory);
32
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
33
+ if (deno) {
34
+ deno.chdir(directory);
31
35
  return;
32
36
  }
33
37
  if (runtimeProcess) {
@@ -37,15 +41,17 @@ export function chdir(directory) {
37
41
  throw new Error("chdir() is not supported in this runtime");
38
42
  }
39
43
  export function pid() {
40
- if (IS_DENO)
41
- return dntShim.Deno.pid;
44
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
45
+ if (deno)
46
+ return deno.pid;
42
47
  if (runtimeProcess)
43
48
  return runtimeProcess.pid;
44
49
  return 0;
45
50
  }
46
51
  export function memoryUsage() {
47
- if (IS_DENO) {
48
- const { rss, heapTotal, heapUsed, external } = dntShim.Deno.memoryUsage();
52
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
53
+ if (deno) {
54
+ const { rss, heapTotal, heapUsed, external } = deno.memoryUsage();
49
55
  return { rss, heapTotal, heapUsed, external };
50
56
  }
51
57
  if (!runtimeProcess) {
@@ -58,8 +64,9 @@ export function memoryUsage() {
58
64
  * Check if stdin is a TTY (terminal)
59
65
  */
60
66
  export function isInteractive() {
61
- if (IS_DENO)
62
- return dntShim.Deno.stdin.isTerminal();
67
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
68
+ if (deno)
69
+ return deno.stdin.isTerminal();
63
70
  if (runtimeProcess)
64
71
  return runtimeProcess.stdin.isTTY ?? false;
65
72
  return false;
@@ -68,8 +75,9 @@ export function isInteractive() {
68
75
  * Check if stdout is a TTY (terminal)
69
76
  */
70
77
  export function isStdoutTTY() {
71
- if (IS_DENO)
72
- return dntShim.Deno.stdout.isTerminal();
78
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
79
+ if (deno)
80
+ return deno.stdout.isTerminal();
73
81
  if (runtimeProcess)
74
82
  return runtimeProcess.stdout.isTTY ?? false;
75
83
  return false;
@@ -80,9 +88,10 @@ export function isStdoutTTY() {
80
88
  */
81
89
  export function getTerminalSize() {
82
90
  const defaultSize = { columns: 80, rows: 24 };
83
- if (IS_DENO) {
91
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
92
+ if (deno) {
84
93
  try {
85
- const { columns, rows } = dntShim.Deno.consoleSize();
94
+ const { columns, rows } = deno.consoleSize();
86
95
  return { columns, rows };
87
96
  }
88
97
  catch (_) {
@@ -102,8 +111,9 @@ export function getTerminalSize() {
102
111
  * Get runtime version string
103
112
  */
104
113
  export function getRuntimeVersion() {
105
- if (IS_DENO)
106
- return `Deno ${dntShim.Deno.version.deno}`;
114
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
115
+ if (deno)
116
+ return `Deno ${deno.version.deno}`;
107
117
  if ("Bun" in dntShim.dntGlobalThis) {
108
118
  return `Bun ${dntShim.dntGlobalThis.Bun.version}`;
109
119
  }
@@ -116,8 +126,9 @@ export function getRuntimeVersion() {
116
126
  * Returns: "darwin" (macOS), "linux", "windows", or the raw platform string
117
127
  */
118
128
  export function getOsType() {
119
- if (IS_DENO)
120
- return dntShim.Deno.build.os;
129
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
130
+ if (deno)
131
+ return deno.build.os;
121
132
  if (runtimeProcess) {
122
133
  // Node/Bun uses process.platform which returns "win32" for Windows
123
134
  const platform = runtimeProcess.platform;
@@ -129,8 +140,9 @@ export function getOsType() {
129
140
  * Register a signal handler (SIGINT, SIGTERM) for graceful shutdown
130
141
  */
131
142
  export function onSignal(signal, handler) {
132
- if (IS_DENO) {
133
- dntShim.Deno.addSignalListener(signal, handler);
143
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
144
+ if (deno) {
145
+ deno.addSignalListener(signal, handler);
134
146
  return;
135
147
  }
136
148
  if (runtimeProcess)
@@ -193,8 +205,9 @@ export function onGlobalError(onError) {
193
205
  * Unreference a timer to prevent it from keeping the process alive
194
206
  */
195
207
  export function unrefTimer(timerId) {
196
- if (IS_DENO && typeof dntShim.Deno.unrefTimer === "function" && typeof timerId === "number") {
197
- dntShim.Deno.unrefTimer(timerId);
208
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
209
+ if (deno && typeof deno.unrefTimer === "function" && typeof timerId === "number") {
210
+ deno.unrefTimer(timerId);
198
211
  return;
199
212
  }
200
213
  if (timerId && typeof timerId === "object") {
@@ -208,8 +221,9 @@ export function unrefTimer(timerId) {
208
221
  * Get the executable path of the current runtime
209
222
  */
210
223
  export function execPath() {
211
- if (IS_DENO)
212
- return dntShim.Deno.execPath();
224
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
225
+ if (deno)
226
+ return deno.execPath();
213
227
  if (runtimeProcess)
214
228
  return runtimeProcess.execPath;
215
229
  return "";
@@ -219,9 +233,10 @@ export function execPath() {
219
233
  * Returns OS uptime on Deno, process uptime on Node.js
220
234
  */
221
235
  export function uptime() {
222
- if (IS_DENO) {
236
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
237
+ if (deno) {
223
238
  // Deno.osUptime() returns system uptime in seconds
224
- return dntShim.Deno.osUptime?.() ?? 0;
239
+ return deno.osUptime?.() ?? 0;
225
240
  }
226
241
  if (runtimeProcess) {
227
242
  // process.uptime() returns process uptime in seconds
@@ -234,9 +249,10 @@ export function uptime() {
234
249
  * Returns null if not available (e.g., in browser/workers)
235
250
  */
236
251
  export function getStdout() {
237
- if (IS_DENO) {
252
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
253
+ if (deno) {
238
254
  const encoder = new TextEncoder();
239
- return { write: (data) => dntShim.Deno.stdout.writeSync(encoder.encode(data)) };
255
+ return { write: (data) => deno.stdout.writeSync(encoder.encode(data)) };
240
256
  }
241
257
  const stdout = runtimeProcess?.stdout;
242
258
  if (stdout) {
@@ -256,8 +272,9 @@ export function writeStdout(text) {
256
272
  * Returns a promise that resolves when the write is complete
257
273
  */
258
274
  export async function writeStdoutAsync(data) {
259
- if (IS_DENO)
260
- return await dntShim.Deno.stdout.write(data);
275
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
276
+ if (deno)
277
+ return await deno.stdout.write(data);
261
278
  const stdout = runtimeProcess?.stdout;
262
279
  if (stdout) {
263
280
  return await new Promise((resolve, reject) => {
@@ -290,8 +307,9 @@ export function promptSync(message) {
290
307
  */
291
308
  export function readStdinByteSync() {
292
309
  const buf = new Uint8Array(1);
293
- if (IS_DENO) {
294
- const n = dntShim.Deno.stdin.readSync(buf);
310
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
311
+ if (deno) {
312
+ const n = deno.stdin.readSync(buf);
295
313
  return n ? buf[0] ?? null : null;
296
314
  }
297
315
  if (IS_BUN) {
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-process.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/runtime-process.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,cAAc,cAAc,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,OAAO,GAAG,WAAW,IAAI,cAAc,CAIzF;AAED,eAAO,MAAM,cAAc,EAAE,cAAc,GAAG,IAEtC,CAAC;AAET,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C"}
1
+ {"version":3,"file":"runtime-process.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/process/runtime-process.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,cAAc,cAAc,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,OAAO,GAAG,WAAW,IAAI,cAAc,CAIzF;AAED,eAAO,MAAM,cAAc,EAAE,cAAc,GAAG,IAEtC,CAAC;AAET,wBAAgB,iBAAiB,IAAI,OAAO,CAM3C"}
@@ -1,5 +1,5 @@
1
1
  import * as dntShim from "../../../../_dnt.shims.js";
2
- import { isDeno as IS_DENO } from "../runtime.js";
2
+ import { getDenoRuntime, isDeno as IS_DENO } from "../runtime.js";
3
3
  const nodeProcess = dntShim.dntGlobalThis.process;
4
4
  /**
5
5
  * Detect a real Node/Bun process object.
@@ -16,8 +16,9 @@ export const runtimeProcess = testHasRuntimeProcess(nodeProcess)
16
16
  ? nodeProcess
17
17
  : null;
18
18
  export function isWindowsPlatform() {
19
- if (IS_DENO)
20
- return dntShim.Deno.build.os === "windows";
19
+ const deno = IS_DENO ? getDenoRuntime() : undefined;
20
+ if (deno)
21
+ return deno.build.os === "windows";
21
22
  const platform = runtimeProcess?.platform ??
22
23
  dntShim.dntGlobalThis.process?.platform;
23
24
  return platform === "win32";
@@ -1,3 +1,5 @@
1
+ import * as dntShim from "../../../_dnt.shims.js";
2
+ export declare function getDenoRuntime(): typeof dntShim.Deno | undefined;
1
3
  /**
2
4
  * Check if an executable path is a compiled Deno binary.
3
5
  * Detects by binary name: "deno" or "deno.exe" = standard runtime, anything else = compiled.
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/runtime.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOnE;AAkBD,uFAAuF;AACvF,eAAO,MAAM,KAAK,EAAE,OAAwB,CAAC;AAE7C,gGAAgG;AAChG,eAAO,MAAM,MAAM,EAAE,OAAoC,CAAC;AAE1D,0DAA0D;AAC1D,eAAO,MAAM,MAAM,EAAE,OAA4C,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,OAA0C,CAAC;AAExE,oDAAoD;AACpD,eAAO,MAAM,YAAY,EAAE,OAAgC,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAK7C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAelD,wBAAgB,cAAc,IAAI,OAAO,OAAO,CAAC,IAAI,GAAG,SAAS,CAWhE;AAMD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOnE;AAmBD,uFAAuF;AACvF,eAAO,MAAM,KAAK,EAAE,OAAwB,CAAC;AAE7C,gGAAgG;AAChG,eAAO,MAAM,MAAM,EAAE,OAAoC,CAAC;AAE1D,0DAA0D;AAC1D,eAAO,MAAM,MAAM,EAAE,OAA4C,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,OAA0C,CAAC;AAExE,oDAAoD;AACpD,eAAO,MAAM,YAAY,EAAE,OAAgC,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAK7C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
@@ -5,11 +5,18 @@ function hasNodeProcess() {
5
5
  function hasBunGlobal() {
6
6
  return globalThis.Bun != null;
7
7
  }
8
+ export function getDenoRuntime() {
9
+ const deno = Reflect.get(globalThis, "Deno");
10
+ if (deno &&
11
+ typeof deno.version === "object" &&
12
+ typeof deno.build === "object" &&
13
+ typeof deno.build.os === "string") {
14
+ return deno;
15
+ }
16
+ return undefined;
17
+ }
8
18
  function hasRealDeno() {
9
- return (typeof globalThis.Deno !== "undefined" &&
10
- typeof globalThis.Deno.version === "object" &&
11
- typeof globalThis.Deno.build === "object" &&
12
- typeof globalThis.Deno.build.os === "string");
19
+ return getDenoRuntime() != null;
13
20
  }
14
21
  /**
15
22
  * Check if an executable path is a compiled Deno binary.
@@ -26,10 +33,11 @@ export function testDenoCompiledDetection(execPath) {
26
33
  }
27
34
  /** Compiled Deno binaries cannot dynamically import HTTP URLs at runtime. */
28
35
  function isDenoCompiledBinary() {
29
- if (!hasRealDeno())
36
+ const deno = getDenoRuntime();
37
+ if (!deno)
30
38
  return false;
31
39
  try {
32
- return testDenoCompiledDetection(globalThis.Deno.execPath());
40
+ return testDenoCompiledDetection(deno.execPath());
33
41
  }
34
42
  catch (_) {
35
43
  /* expected: Deno.execPath() may not be available in all environments */
@@ -1 +1 @@
1
- {"version":3,"file":"stdin.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/stdin.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAWjD;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAClE,WAAW,IAAI,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,WAAW,CA2D5C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CA6B/C;AAOD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC,KAAK,IAAI,IAAI,CAAC;CACf;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,YAAY,CAgCjF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CA8DrD"}
1
+ {"version":3,"file":"stdin.d.ts","sourceRoot":"","sources":["../../../../src/src/platform/compat/stdin.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAYjD;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAClE,WAAW,IAAI,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,WAAW,CA4D5C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CA8B/C;AAOD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC,KAAK,IAAI,IAAI,CAAC;CACf;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,YAAY,CAgCjF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CA+DrD"}
@@ -4,13 +4,14 @@
4
4
  * @module platform/compat/stdin
5
5
  */
6
6
  import * as dntShim from "../../../_dnt.shims.js";
7
- import { isDeno } from "./runtime.js";
7
+ import { getDenoRuntime, isDeno } from "./runtime.js";
8
8
  /**
9
9
  * Set raw mode on stdin (enables character-by-character input)
10
10
  */
11
11
  export function setRawMode(enabled) {
12
- if (isDeno) {
13
- dntShim.Deno.stdin.setRaw(enabled);
12
+ const deno = isDeno ? getDenoRuntime() : undefined;
13
+ if (deno) {
14
+ deno.stdin.setRaw(enabled);
14
15
  return;
15
16
  }
16
17
  const stdin = process?.stdin;
@@ -25,8 +26,9 @@ export function setRawMode(enabled) {
25
26
  * Returns an object with read() and releaseLock() methods
26
27
  */
27
28
  export function getStdinReader() {
28
- if (isDeno) {
29
- const reader = dntShim.Deno.stdin.readable.getReader();
29
+ const deno = isDeno ? getDenoRuntime() : undefined;
30
+ if (deno) {
31
+ const reader = deno.stdin.readable.getReader();
30
32
  return {
31
33
  read: async () => {
32
34
  const result = await reader.read();
@@ -83,15 +85,16 @@ export function getStdinReader() {
83
85
  * Works in both Deno and Node.js.
84
86
  */
85
87
  export function waitForKeypress() {
86
- if (isDeno) {
88
+ const deno = isDeno ? getDenoRuntime() : undefined;
89
+ if (deno) {
87
90
  return (async () => {
88
- dntShim.Deno.stdin.setRaw(true);
89
- const reader = dntShim.Deno.stdin.readable.getReader();
91
+ deno.stdin.setRaw(true);
92
+ const reader = deno.stdin.readable.getReader();
90
93
  try {
91
94
  await reader.read();
92
95
  }
93
96
  finally {
94
- dntShim.Deno.stdin.setRaw(false);
97
+ deno.stdin.setRaw(false);
95
98
  reader.releaseLock();
96
99
  }
97
100
  })();
@@ -157,11 +160,12 @@ export function createEscapeBuffer(onTimeout) {
157
160
  */
158
161
  export function waitForEnterOrExit() {
159
162
  return new Promise((resolve) => {
160
- if (isDeno) {
161
- dntShim.Deno.stdin.setRaw(true);
162
- const reader = dntShim.Deno.stdin.readable.getReader();
163
+ const deno = isDeno ? getDenoRuntime() : undefined;
164
+ if (deno) {
165
+ deno.stdin.setRaw(true);
166
+ const reader = deno.stdin.readable.getReader();
163
167
  const cleanup = (result) => {
164
- dntShim.Deno.stdin.setRaw(false);
168
+ deno.stdin.setRaw(false);
165
169
  reader.releaseLock();
166
170
  resolve(result);
167
171
  };
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.857";
2
+ export declare const VERSION = "0.1.859";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.857";
4
+ export const VERSION = "0.1.859";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.857",
3
+ "version": "0.1.859",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",