Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions registry/coder/modules/mux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Automatically install and run mux in a Coder workspace. By default, the module i
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
version = "1.0.1"
agent_id = coder_agent.example.id
}
```
Expand All @@ -35,7 +35,7 @@ module "mux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
version = "1.0.1"
agent_id = coder_agent.example.id
}
```
Expand All @@ -46,7 +46,7 @@ module "mux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
version = "1.0.1"
agent_id = coder_agent.example.id
# Default is "latest"; set to a specific version to pin
install_version = "0.4.0"
Expand All @@ -59,7 +59,7 @@ module "mux" {
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
version = "1.0.1"
agent_id = coder_agent.example.id
port = 8080
}
Expand All @@ -73,7 +73,7 @@ Run an existing copy of mux if found, otherwise install from npm:
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
version = "1.0.1"
agent_id = coder_agent.example.id
use_cached = true
}
Expand All @@ -87,7 +87,7 @@ Run without installing from the network (requires mux to be pre-installed):
module "mux" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/mux/coder"
version = "1.0.0"
version = "1.0.1"
agent_id = coder_agent.example.id
install = false
}
Expand Down
3 changes: 2 additions & 1 deletion registry/coder/modules/mux/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ describe("mux", async () => {
expect(output.exitCode).toBe(0);
const expectedLines = [
"📦 Installing mux via npm into /tmp/mux...",
"⏭️ Skipping npm lifecycle scripts with --ignore-scripts",
"🥳 mux has been installed in /tmp/mux",
"🚀 Starting mux server on port 4000...",
"Check logs at /tmp/mux.log!",
];
for (const line of expectedLines) {
expect(output.stdout).toContain(line);
}
}, 60000);
}, 180000);
});
3 changes: 2 additions & 1 deletion registry/coder/modules/mux/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ if [ ! -f "$MUX_BINARY" ] || [ "${USE_CACHED}" != true ]; then
if [ ! -f package.json ]; then
echo '{}' > package.json
fi
echo "⏭️ Skipping npm lifecycle scripts with --ignore-scripts"
PKG="mux"
if [ -z "${VERSION}" ] || [ "${VERSION}" = "latest" ]; then
PKG_SPEC="$PKG@latest"
else
PKG_SPEC="$PKG@${VERSION}"
fi
if ! npm install --no-audit --no-fund --omit=dev "$PKG_SPEC"; then
if ! npm install --no-audit --no-fund --omit=dev --ignore-scripts "$PKG_SPEC"; then
echo "❌ Failed to install mux via npm"
exit 1
fi
Expand Down