executor 1.1.7 → 1.1.9

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.
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import { existsSync } from "node:fs";
4
+ import { join } from "node:path";
5
+
6
+ const denoInstallUrl = "https://docs.deno.com/runtime/getting_started/installation/";
7
+
8
+ const resolveDenoExecutable = () => {
9
+ const configured = process.env.DENO_BIN?.trim();
10
+ if (configured) {
11
+ return configured;
12
+ }
13
+
14
+ const home = process.env.HOME?.trim();
15
+ if (home) {
16
+ const installedPath = join(home, ".deno", "bin", "deno");
17
+ if (existsSync(installedPath)) {
18
+ return installedPath;
19
+ }
20
+ }
21
+
22
+ return "deno";
23
+ };
24
+
25
+ const isDenoAvailable = (executable) => {
26
+ const result = spawnSync(executable, ["--version"], {
27
+ stdio: "ignore",
28
+ timeout: 5000,
29
+ });
30
+
31
+ return result.error === undefined && result.status === 0;
32
+ };
33
+
34
+ const denoExecutable = resolveDenoExecutable();
35
+
36
+ if (!isDenoAvailable(denoExecutable)) {
37
+ console.warn(`Deno not found, if you want to use deno for sandboxing install it from ${denoInstallUrl} otherwise JS will execute in SES`);
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "executor",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Local AI executor with a CLI, local API server, and web UI.",
5
5
  "keywords": [
6
6
  "executor",
@@ -24,6 +24,9 @@
24
24
  "bin": {
25
25
  "executor": "bin/executor.js"
26
26
  },
27
+ "scripts": {
28
+ "postinstall": "node ./bin/postinstall.js"
29
+ },
27
30
  "files": [
28
31
  "bin",
29
32
  "resources",
@@ -1 +1 @@
1
- import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-vieFHMDb.js";import{j as d}from"./index-CRuElBS1.js";var R=({code:i,language:e,raw:t,className:g,startLine:u,...m})=>{let{shikiTheme:o}=r.useContext(c),a=p(),[n,s]=r.useState(t);return r.useEffect(()=>{if(!a){s(t);return}let l=a.highlight({code:i,language:e,themes:o},h=>{s(h)});l&&s(l)},[i,e,o,a,t]),d.jsx(x,{className:g,language:e,result:n,startLine:u,...m})};export{R as HighlightedCodeBlockBody};
1
+ import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-37jaM6li.js";import{j as d}from"./index-CRuElBS1.js";var R=({code:i,language:e,raw:t,className:g,startLine:u,...m})=>{let{shikiTheme:o}=r.useContext(c),a=p(),[n,s]=r.useState(t);return r.useEffect(()=>{if(!a){s(t);return}let l=a.highlight({code:i,language:e,themes:o},h=>{s(h)});l&&s(l)},[i,e,o,a,t]),d.jsx(x,{className:g,language:e,result:n,startLine:u,...m})};export{R as HighlightedCodeBlockBody};