Merge branch 'main' into atif/vscode-core-extenions
This commit is contained in:
commit
349774eb33
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -48,7 +48,7 @@ jobs:
|
|||||||
- name: Validate formatting
|
- name: Validate formatting
|
||||||
run: bun fmt:ci
|
run: bun fmt:ci
|
||||||
- name: Check for typos
|
- name: Check for typos
|
||||||
uses: crate-ci/typos@v1.36.2
|
uses: crate-ci/typos@v1.37.2
|
||||||
with:
|
with:
|
||||||
config: .github/typos.toml
|
config: .github/typos.toml
|
||||||
validate-readme-files:
|
validate-readme-files:
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
|
|||||||
```tf
|
```tf
|
||||||
module "claude-code" {
|
module "claude-code" {
|
||||||
source = "registry.coder.com/coder/claude-code/coder"
|
source = "registry.coder.com/coder/claude-code/coder"
|
||||||
version = "3.0.0"
|
version = "3.0.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/project"
|
workdir = "/home/coder/project"
|
||||||
claude_api_key = "xxxx-xxxxx-xxxx"
|
claude_api_key = "xxxx-xxxxx-xxxx"
|
||||||
@ -49,7 +49,7 @@ data "coder_parameter" "ai_prompt" {
|
|||||||
|
|
||||||
module "claude-code" {
|
module "claude-code" {
|
||||||
source = "registry.coder.com/coder/claude-code/coder"
|
source = "registry.coder.com/coder/claude-code/coder"
|
||||||
version = "3.0.0"
|
version = "3.0.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/project"
|
workdir = "/home/coder/project"
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ Run and configure Claude Code as a standalone CLI in your workspace.
|
|||||||
```tf
|
```tf
|
||||||
module "claude-code" {
|
module "claude-code" {
|
||||||
source = "registry.coder.com/coder/claude-code/coder"
|
source = "registry.coder.com/coder/claude-code/coder"
|
||||||
version = "3.0.0"
|
version = "3.0.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder"
|
workdir = "/home/coder"
|
||||||
install_claude_code = true
|
install_claude_code = true
|
||||||
@ -108,7 +108,7 @@ variable "claude_code_oauth_token" {
|
|||||||
|
|
||||||
module "claude-code" {
|
module "claude-code" {
|
||||||
source = "registry.coder.com/coder/claude-code/coder"
|
source = "registry.coder.com/coder/claude-code/coder"
|
||||||
version = "3.0.0"
|
version = "3.0.1"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
workdir = "/home/coder/project"
|
workdir = "/home/coder/project"
|
||||||
claude_code_oauth_token = var.claude_code_oauth_token
|
claude_code_oauth_token = var.claude_code_oauth_token
|
||||||
|
|||||||
@ -244,6 +244,7 @@ module "agentapi" {
|
|||||||
web_app_group = var.group
|
web_app_group = var.group
|
||||||
web_app_icon = var.icon
|
web_app_icon = var.icon
|
||||||
web_app_display_name = var.web_app_display_name
|
web_app_display_name = var.web_app_display_name
|
||||||
|
folder = local.workdir
|
||||||
cli_app = var.cli_app
|
cli_app = var.cli_app
|
||||||
cli_app_slug = var.cli_app ? "${local.app_slug}-cli" : null
|
cli_app_slug = var.cli_app ? "${local.app_slug}-cli" : null
|
||||||
cli_app_display_name = var.cli_app ? var.cli_app_display_name : null
|
cli_app_display_name = var.cli_app ? var.cli_app_display_name : null
|
||||||
|
|||||||
@ -42,7 +42,7 @@ run "test_claude_code_with_api_key" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert {
|
assert {
|
||||||
condition = coder_env.claude_api_key.value == "test-api-key-123"
|
condition = coder_env.claude_api_key[0].value == "test-api-key-123"
|
||||||
error_message = "Claude API key value should match the input"
|
error_message = "Claude API key value should match the input"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,8 @@ tags: [ide, jetbrains, parameter, gateway]
|
|||||||
|
|
||||||
This module adds a JetBrains Gateway Button to open any workspace with a single click.
|
This module adds a JetBrains Gateway Button to open any workspace with a single click.
|
||||||
|
|
||||||
|
> We recommend using the [Coder Toolbox module](https://registry.coder.com/modules/coder/jetbrains), which offers significant stability and connectivity benefits over Gateway. Reference our [documentation](https://coder.com/docs/user-guides/workspace-access/jetbrains/toolbox) for more information.
|
||||||
|
|
||||||
JetBrains recommends a minimum of 4 CPU cores and 8GB of RAM.
|
JetBrains recommends a minimum of 4 CPU cores and 8GB of RAM.
|
||||||
Consult the [JetBrains documentation](https://www.jetbrains.com/help/idea/prerequisites.html#min_requirements) to confirm other system requirements.
|
Consult the [JetBrains documentation](https://www.jetbrains.com/help/idea/prerequisites.html#min_requirements) to confirm other system requirements.
|
||||||
|
|
||||||
@ -17,7 +19,7 @@ Consult the [JetBrains documentation](https://www.jetbrains.com/help/idea/prereq
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.2.2"
|
version = "1.2.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
|
jetbrains_ides = ["CL", "GO", "IU", "PY", "WS"]
|
||||||
@ -35,7 +37,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.2.2"
|
version = "1.2.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
@ -49,7 +51,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.2.2"
|
version = "1.2.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["IU", "PY"]
|
jetbrains_ides = ["IU", "PY"]
|
||||||
@ -64,7 +66,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.2.2"
|
version = "1.2.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["IU", "PY"]
|
jetbrains_ides = ["IU", "PY"]
|
||||||
@ -89,7 +91,7 @@ module "jetbrains_gateway" {
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.2.2"
|
version = "1.2.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
@ -107,7 +109,7 @@ Due to the highest priority of the `ide_download_link` parameter in the `(jetbra
|
|||||||
module "jetbrains_gateway" {
|
module "jetbrains_gateway" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
source = "registry.coder.com/coder/jetbrains-gateway/coder"
|
||||||
version = "1.2.2"
|
version = "1.2.4"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
folder = "/home/coder/example"
|
folder = "/home/coder/example"
|
||||||
jetbrains_ides = ["GO", "WS"]
|
jetbrains_ides = ["GO", "WS"]
|
||||||
|
|||||||
@ -20,7 +20,7 @@ describe("jetbrains-gateway", async () => {
|
|||||||
folder: "/home/coder",
|
folder: "/home/coder",
|
||||||
});
|
});
|
||||||
expect(state.outputs.url.value).toBe(
|
expect(state.outputs.url.value).toBe(
|
||||||
"jetbrains-gateway://connect#type=coder&workspace=default&owner=default&folder=/home/coder&url=https://mydeployment.coder.com&token=$SESSION_TOKEN&ide_product_code=IU&ide_build_number=243.21565.193&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2024.3.tar.gz&agent_id=foo",
|
"jetbrains-gateway://connect#type=coder&workspace=default&owner=default&folder=/home/coder&url=https://mydeployment.coder.com&token=$SESSION_TOKEN&ide_product_code=IU&ide_build_number=243.21565.193&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2024.3.tar.gz&agent=",
|
||||||
);
|
);
|
||||||
|
|
||||||
const coder_app = state.resources.find(
|
const coder_app = state.resources.find(
|
||||||
@ -40,4 +40,28 @@ describe("jetbrains-gateway", async () => {
|
|||||||
});
|
});
|
||||||
expect(state.outputs.identifier.value).toBe("IU");
|
expect(state.outputs.identifier.value).toBe("IU");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("optionally includes agent when an agent name is provided", async () => {
|
||||||
|
const state = await runTerraformApply(import.meta.dir, {
|
||||||
|
agent_id: "foo",
|
||||||
|
agent_name: "main",
|
||||||
|
folder: "/home/coder",
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(state.outputs.url.value).toBe(
|
||||||
|
"jetbrains-gateway://connect#type=coder&workspace=default&owner=default&folder=/home/coder&url=https://mydeployment.coder.com&token=$SESSION_TOKEN&ide_product_code=IU&ide_build_number=243.21565.193&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2024.3.tar.gz&agent=main",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("includes the agent parameter even when the provided value is blank", async () => {
|
||||||
|
const state = await runTerraformApply(import.meta.dir, {
|
||||||
|
agent_id: "foo",
|
||||||
|
agent_name: " ",
|
||||||
|
folder: "/home/coder",
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(state.outputs.url.value).toBe(
|
||||||
|
"jetbrains-gateway://connect#type=coder&workspace=default&owner=default&folder=/home/coder&url=https://mydeployment.coder.com&token=$SESSION_TOKEN&ide_product_code=IU&ide_build_number=243.21565.193&ide_download_link=https://download.jetbrains.com/idea/ideaIU-2024.3.tar.gz&agent= ",
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -30,15 +30,14 @@ variable "agent_id" {
|
|||||||
|
|
||||||
variable "slug" {
|
variable "slug" {
|
||||||
type = string
|
type = string
|
||||||
description = "The slug for the coder_app. Allows resuing the module with the same template."
|
description = "The slug for the coder_app. Allows reusing the module with the same template."
|
||||||
default = "gateway"
|
default = "gateway"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "agent_name" {
|
variable "agent_name" {
|
||||||
type = string
|
type = string
|
||||||
description = "Agent name. (unused). Will be removed in a future version"
|
description = "Agent name."
|
||||||
|
default = ""
|
||||||
default = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "folder" {
|
variable "folder" {
|
||||||
@ -348,8 +347,8 @@ resource "coder_app" "gateway" {
|
|||||||
local.build_number,
|
local.build_number,
|
||||||
"&ide_download_link=",
|
"&ide_download_link=",
|
||||||
local.download_link,
|
local.download_link,
|
||||||
"&agent_id=",
|
"&agent=",
|
||||||
var.agent_id,
|
var.agent_name,
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,12 +24,10 @@ describe("jfrog-oauth", async () => {
|
|||||||
const fakeFrogUrl = "http://localhost:8081";
|
const fakeFrogUrl = "http://localhost:8081";
|
||||||
const user = "default";
|
const user = "default";
|
||||||
|
|
||||||
it("can run apply with required variables", async () => {
|
testRequiredVariables<TestVariables>(import.meta.dir, {
|
||||||
testRequiredVariables<TestVariables>(import.meta.dir, {
|
agent_id: "some-agent-id",
|
||||||
agent_id: "some-agent-id",
|
jfrog_url: fakeFrogUrl,
|
||||||
jfrog_url: fakeFrogUrl,
|
package_managers: "{}",
|
||||||
package_managers: "{}",
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("generates an npmrc with scoped repos", async () => {
|
it("generates an npmrc with scoped repos", async () => {
|
||||||
|
|||||||
@ -55,13 +55,11 @@ describe("jfrog-token", async () => {
|
|||||||
const user = "default";
|
const user = "default";
|
||||||
const token = "xxx";
|
const token = "xxx";
|
||||||
|
|
||||||
it("can run apply with required variables", async () => {
|
testRequiredVariables<TestVariables>(import.meta.dir, {
|
||||||
testRequiredVariables<TestVariables>(import.meta.dir, {
|
agent_id: "some-agent-id",
|
||||||
agent_id: "some-agent-id",
|
jfrog_url: fakeFrogUrl,
|
||||||
jfrog_url: fakeFrogUrl,
|
artifactory_access_token: "XXXX",
|
||||||
artifactory_access_token: "XXXX",
|
package_managers: "{}",
|
||||||
package_managers: "{}",
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("generates an npmrc with scoped repos", async () => {
|
it("generates an npmrc with scoped repos", async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user