Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
| const { Bash } = await import(/* @vite-ignore */ PKG); | ||
| // No network config → curl is not registered → "command not found" | ||
| const bash = new Bash(); | ||
| const result = await bash.exec(script); |
There was a problem hiding this comment.
sidenote: could also make bash serializable so bash.exec works in workflow context? 🤔
| const bash = new Bash(); | ||
| const result = await bash.exec(script); | ||
| return { | ||
| serialized: bash.toJSON(), |
There was a problem hiding this comment.
if bash is serializable then you can just return it here without .toJSON()
src/serde-integration/steps.ts
Outdated
| : undefined, | ||
| processInfo: options.processInfo, | ||
| }); | ||
| return bash.toJSON(); |
There was a problem hiding this comment.
you shouldn't have to explicitly do this if bash is serializable
| * in the workflow sandbox. | ||
| * | ||
| * All imports are dynamic to avoid pulling Node.js modules into the workflow bundle. | ||
| */ |
There was a problem hiding this comment.
this is completely avoiding workflow serde and just doing explicit fromJSON and toJSON everywhere
src/serde-integration/steps.ts
Outdated
| // Helpers to load Bash/InMemoryFs without static import analysis. | ||
| // The @vite-ignore comment prevents esbuild/vite from resolving these | ||
| // dynamic imports during the workflow bundle build, which would pull | ||
| // Node.js-dependent code into the workflow sandbox. | ||
| // --------------------------------------------------------------------------- | ||
| // Import just-bash by package name (self-reference via package.json exports). | ||
| // The @vite-ignore comment prevents esbuild from statically resolving this | ||
| // during the workflow bundle build (which would pull Node.js code into the sandbox). | ||
| // At runtime, Node.js resolves "just-bash" via the package.json exports field, | ||
| // which points to the built bundle in dist/. | ||
| const PKG = "just-bash"; |
There was a problem hiding this comment.
hmmm this also seems like a really weird pattern - node shuoldn't be getting bundled into workflow at all - but it means you do have to implement "use step" on the bash and fs instance methods
No description provided.