feat(nodejs): add pre and post install scripts with coder exp sync support#802
feat(nodejs): add pre and post install scripts with coder exp sync support#802blinkagent[bot] wants to merge 8 commits intomainfrom
Conversation
…pport Add pre_install_script and post_install_script variables to the nodejs module following the pattern used by other registry modules (agent-helper, claude-code, aider, etc.). Scripts use coder exp sync for reliable execution ordering, enabling dependency coordination between modules. Changes: - Add pre_install_script and post_install_script optional variables - Wrap install script with coder exp sync want/start/complete - Add conditional pre/post install coder_script resources - Export sync script names as outputs for cross-module coordination - Add nodejs.tftest.hcl with 5 test cases - Update README with pre/post install documentation and examples - Bump version references to 1.0.14
Remove all the coder exp sync machinery, separate script resources, locals, and outputs. Simply pass the scripts as template variables into run.sh and eval them before/after the nvm install.
… install scripts - Base64 encode pre/post install scripts to safely handle special characters - Use separate coder_script resources for pre_install, install, and post_install - Add coder exp sync want/start/complete for execution ordering - Base64 encode the main install script (run.sh) via templatefile + base64encode - Revert run.sh to original (no pre/post install handling) - Add sync name outputs for cross-module dependency coordination - Update README with cross-module coordination documentation - Add output assertions to tests
|
I have tested this and it works well Using these The pre and post install scripts are just for flexibility if someone wants to just use the node module, and post install commands to install whatever they would need. |
|
@DevelopmentCats @matifali should we use https://registry.coder.com/modules/coder/agent-helper here ? |
I am ok if we had a more generic name for that module. may be |
|
We totally could use that module here instead, I assumed that it was for agents only based on the name but if we are cool making it more generalized I'll go ahead and do that |
This was the idea I had in mind, but we later discussed that we want it to be usable for general purpose too. |
If we want to change it, this is the right time to do it. Since none of the modules reference it rn. |
Since we haven't nested this into any other modules quite yet, do you think we are good to just completely remove old tags and rename the agent-helper module then? If so I will go ahead and start up a PR for this @matifali @35C4n0r |
Yes |
Description
Add
pre_install_scriptandpost_install_scriptvariables to thethezoker/nodejsmodule, following the pattern established by other registry modules (agent-helper, claude-code, aider, goose, amazon-q, etc.). Scripts usecoder exp syncfor reliable execution ordering, enabling dependency coordination between modules.Changes:
pre_install_scriptandpost_install_scriptoptional variables (defaultnull)coder exp syncwant/start/complete flowcoder_scriptresources for pre/post installnodejs.tftest.hclwith 5 test casesType of Change
Module Information
Path:
registry/thezoker/modules/nodejsNew version: N/A (enhancement to existing module)
Breaking change: [ ] Yes [x] No
Testing & Validation
bun test)bun fmt)terraform validatesuccessterraform test— 5 passed, 0 failednull)Related Issues
None