Skip to content

Commit 488a292

Browse files
committed
fix: node download correct release version
1 parent 4b6be5d commit 488a292

File tree

1 file changed

+12
-7
lines changed
  • spawnctl/lib/spawnctl/commands/new

1 file changed

+12
-7
lines changed

spawnctl/lib/spawnctl/commands/new/node.ex

+12-7
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,35 @@ defmodule SpawnCtl.Commands.New.Node do
1515
name: "node",
1616
description: "Generate a Spawn NodeJS project."
1717

18-
@default_opts %{
19-
actor_system: "spawn-system"
20-
}
21-
2218
@vsn "1.4.3"
23-
@main_sdk_version "1.4.2"
19+
@main_sdk_version "1.4.3"
2420
@template "nodejs"
2521

22+
@default_opts %{
23+
actor_system: "spawn-system",
24+
allowed_template_versions: [
25+
"v#{@vsn}",
26+
"v1.4.2"
27+
]
28+
}
29+
2630
option(:actor_system, :string, "Spawn actor system.",
2731
alias: :s,
2832
default: @default_opts.actor_system
2933
)
3034

3135
option(:template_version, :string, "Spawn CLI Language templates version.",
3236
alias: :t,
33-
default: "v#{@vsn}"
37+
default: "v#{@vsn}",
38+
allowed_values: @default_opts.allowed_template_versions
3439
)
3540

3641
option(:sdk_version, :string, "Spawn Node SDK version.",
3742
alias: :v,
3843
default: @main_sdk_version,
3944
allowed_values: [
4045
@main_sdk_version,
41-
"1.4.3"
46+
"1.4.2"
4247
]
4348
)
4449

0 commit comments

Comments
 (0)