Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1724bd2
#1685: Add NestJs to tool in cli
AdemZarrouki Apr 24, 2026
5368a8e
#1685: Add NestJs Urlupdater to url-updater
AdemZarrouki Apr 24, 2026
a32847b
#1685: Add tests for NestJs commandlet functionality in cli
AdemZarrouki Apr 24, 2026
bbeffe2
#1685: Add tests for NestJs in url-updater
AdemZarrouki Apr 24, 2026
2da4e9c
#1685: Add install script for NestJs integration tests
AdemZarrouki Apr 24, 2026
6245f1f
#1685: Add nestjs-version.json for NestJs CLI version management
AdemZarrouki Apr 24, 2026
4290a24
#1685: Add NestJs commandlet to CommandletManager
AdemZarrouki Apr 24, 2026
82acb79
#1685: Add help documentation for Nest CLI commandlet
AdemZarrouki Apr 24, 2026
7f6f24c
#1685: Add NestJS CLI license information to LICENSE.adoc
AdemZarrouki Apr 24, 2026
04169df
#1685: Add configuration files and scripts for NestJS CLI integration…
AdemZarrouki Apr 24, 2026
8f9476a
#1685: Update CHANGELOG.adoc to include Nest CLI integration in IDEas…
AdemZarrouki Apr 24, 2026
cbcdaa1
#1685: Rename NestJs to Nest and update related references in command…
AdemZarrouki Apr 27, 2026
142ca0f
#1685: clean up NestTest documentation
AdemZarrouki Apr 27, 2026
3ebee83
#1685: Fix nest test resources: make node scripts executable
AdemZarrouki Apr 27, 2026
99f63f6
#1685: Update shell script of nest and enhance NestTest documentation
AdemZarrouki Apr 27, 2026
7e43816
#1685: Add NEST tag to Nest class and define NEST constant in Tag class
AdemZarrouki Apr 27, 2026
e6bd075
#1685: Add NestUrlUpdater to UpdateManager
AdemZarrouki Apr 28, 2026
b12c912
#1685: Remove TYPE_SCRIPT tag from Nest constructor
AdemZarrouki May 4, 2026
ee32a9d
#1685: Update NestJS CLI license reference
AdemZarrouki May 4, 2026
c3d6d2e
#1685: Remove NestUrlUpdater
AdemZarrouki May 4, 2026
c964929
#1685: Add dependencies.json
AdemZarrouki May 4, 2026
b93e3f4
#1685: Implement skip installation logic in Npm and PackageManagerBas…
AdemZarrouki May 5, 2026
2c7bfe1
#1685: remove dependencies.json
AdemZarrouki May 5, 2026
27bc4e8
Merge branch 'main' into feature/1685-add-nest-cLI-to-commandlets
AdemZarrouki May 5, 2026
e45acb4
constructive review: improved JavaDoc
hohwille May 5, 2026
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
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Release with new features and bugfixes:
* https://github.com/devonfw/IDEasy/issues/1853[#1853]: Add ARM releases for VSCode on Mac
* https://github.com/devonfw/IDEasy/issues/797[#797]: Use system unzip on macOS to preserve symlinks in ZIP extraction
* https://github.com/devonfw/IDEasy/issues/1723[#1723]: Add commandlet for GitHub Copilot CLI
* https://github.com/devonfw/IDEasy/issues/1685[#1685]: Add Nest CLI to IDEasy commandlets

The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/44?closed=1[milestone 2026.05.001].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.devonfw.tools.ide.tool.kubectl.KubeCtl;
import com.devonfw.tools.ide.tool.lazydocker.LazyDocker;
import com.devonfw.tools.ide.tool.mvn.Mvn;
import com.devonfw.tools.ide.tool.nest.Nest;
import com.devonfw.tools.ide.tool.ng.Ng;
import com.devonfw.tools.ide.tool.node.Node;
import com.devonfw.tools.ide.tool.npm.Npm;
Expand Down Expand Up @@ -154,6 +155,7 @@ public CommandletManagerImpl(IdeContext context) {
add(new Go(context));
add(new Gui(context));
add(new SquirrelSql(context));
add(new Nest(context));
}

/**
Expand Down
3 changes: 3 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/common/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ public final class Tag {
/** {@link #Tag} for encryption. */
public static final Tag ENCRYPTION = create("encryption", CRYPTO);

/** {@link Tag} for Nest. */
public static final Tag NEST = create("nest", FRAMEWORK, false, new String[] { "nestjs", "nestcli" }, TYPE_SCRIPT);

private final String id;

private final Tag parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,18 @@ protected final void performToolInstallation(ToolInstallRequest request, Path in

PackageManagerRequest packageManagerRequest = new PackageManagerRequest(PackageManagerRequest.TYPE_INSTALL, getPackageName())
.setProcessContext(request.getProcessContext()).setVersion(request.getRequested().getResolvedVersion());
runPackageManager(packageManagerRequest, true).failOnError();
runPackageManager(packageManagerRequest, isSkipInstallation()).failOnError();
this.installedVersion.invalidate();
}

/**
* @return {@code false} if the underlying {@link #getPackageManagerClass() package manager} should also be installed, {@code false} to skip that additional installation (e.g. to prevent infinite loop in case of cyclic
* dependencies between package manager based tools such as node and npm).
*/
protected boolean isSkipInstallation() {
return false;
}

/**
* @return {@code true} if the tool can be uninstalled, {@code false} if not.
*/
Expand Down
30 changes: 30 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/tool/nest/Nest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.devonfw.tools.ide.tool.nest;

import java.util.Set;

import com.devonfw.tools.ide.common.Tag;
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.tool.ToolCommandlet;
import com.devonfw.tools.ide.tool.npm.NpmBasedCommandlet;

/**
* {@link ToolCommandlet} for <a href="https://docs.nestjs.com/cli/overview">Nest CLI</a>.
*/
public class Nest extends NpmBasedCommandlet {

/**
* The constructor.
*
* @param context the {@link IdeContext}.
*/
public Nest(IdeContext context) {

super(context, "nest", Set.of(Tag.NEST, Tag.BUILD));
}

@Override
public String getPackageName() {

return "@nestjs/cli";
}
}
5 changes: 5 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/tool/npm/Npm.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public String getToolHelpArguments() {
return "help";
}

@Override
protected boolean isSkipInstallation() {
return true;
}

/**
* @return the {@link Path} to the npm user configuration file, creates the folder and configuration file if it was not existing.
*/
Expand Down
2 changes: 2 additions & 0 deletions cli/src/main/resources/nls/Help.properties
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ cmd.list-versions=List the available versions of the selected tool.
cmd.list-versions.detail=To list all available versions of e.g. 'intellij' simply type: 'ide list-versions intellij'.
cmd.mvn=Tool commandlet for Maven (Build-Tool).
cmd.mvn.detail=Apache Maven is a build automation and dependency management tool for Java projects. Detailed documentation can be found at https://maven.apache.org/guides/index.html
cmd.nest=Tool commandlet for Nest CLI.
cmd.nest.detail=The Nest CLI is a command-line interface tool that helps you to initialize, develop, and maintain your Nest applications. Detailed documentation can be found at https://docs.nestjs.com/cli/overview
cmd.ng=Tool commandlet for Angular CLI.
cmd.ng.detail=Angular is a web framework that empowers developers to build fast, reliable applications. Detailed documentation can be found at https://angular.dev/overview/.
cmd.node=Tool commandlet for Node.js (JavaScript runtime).
Expand Down
2 changes: 2 additions & 0 deletions cli/src/main/resources/nls/Help_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ cmd.list-versions=Listet die verfügbaren Versionen des selektierten Werkzeugs a
cmd.list-versions.detail=Um alle verfügbaren Versionen von z.B. 'intellij' aufzulisten, geben Sie einfach 'ide list-versions intellij' in die Konsole ein.
cmd.mvn=Werkzeug Kommando für Maven (Build-Werkzeug).
cmd.mvn.detail=Apache Maven ist ein Build-Automatisierungs- und Abhängigkeitsverwaltungstool für Java-Projekte. Detaillierte Dokumentation ist zu finden unter https://maven.apache.org/guides/index.html
cmd.nest=Werkzeug Kommando für Nest CLI.
cmd.nest.detail=Die Nest CLI ist ein Command‑Line‑Interface‑Tool zur Initialisierung, Entwicklung und Wartung von Nest‑Anwendungen. Detaillierte Dokumentation ist zu finden unter https://docs.nestjs.com/cli/overview
cmd.ng=Werkzeug Kommando für Angular CLI.
cmd.ng.detail=Angular ist ein web framework dass Entwicklern die Möglichkeit bietet, schnelle und zuverlässige Anwendungen zu entwickeln. Detaillierte Dokumentation ist zu finden unter https://angular.dev/overview/.
cmd.node=Werkzeug Kommando für Node.js (JavaScript Laufzeitumgebung).
Expand Down
13 changes: 13 additions & 0 deletions cli/src/test/integration-tests/install-nest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo "Running install nest integration test"
ide -d install nest

nest_location=""

if doIsWindows
then
nest_location=""
else
nest_location="bin/"
fi

assertThat "${IDE_ROOT}/${TEST_PROJECT_NAME}/software/node/${nest_location}nest" exists
91 changes: 91 additions & 0 deletions cli/src/test/java/com/devonfw/tools/ide/tool/nest/NestTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package com.devonfw.tools.ide.tool.nest;

import org.junit.jupiter.api.Test;

import com.devonfw.tools.ide.context.AbstractIdeContextTest;
import com.devonfw.tools.ide.context.IdeTestContext;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;

/**
* Test of {@link Nest}.
*/
@WireMockTest
class NestTest extends AbstractIdeContextTest {

private static final String PROJECT_NEST = "nest";

/**
* Tests if the {@link Nest} install works correctly.
*
* @param wireMockRuntimeInfo wireMock server on a random port
*/
@Test
void testNestInstall(WireMockRuntimeInfo wireMockRuntimeInfo) {

// arrange
IdeTestContext context = newContext(PROJECT_NEST, wireMockRuntimeInfo);
Nest commandlet = new Nest(context);

// act
commandlet.install();

// assert
checkInstallation(context);

}

/**
* Tests if the {@link Nest} install works correctly.
*
* @param wireMockRuntimeInfo wireMock server on a random port
*/
@Test
void testNestUninstall(WireMockRuntimeInfo wireMockRuntimeInfo) {

// arrange
IdeTestContext context = newContext(PROJECT_NEST, wireMockRuntimeInfo);
Nest commandlet = new Nest(context);

// act I
commandlet.install();

// assert I
checkInstallation(context);

// act II
commandlet.uninstall();

// assert II
assertThat(context).logAtInfo().hasMessageContaining("npm uninstall -g @nestjs/cli");

assertThat(context).logAtSuccess().hasMessage("Successfully uninstalled nest");
}

/**
* Tests if {@link Nest} run works correctly.
*
* @param wireMockRuntimeInfo wireMock server on a random port
*/
@Test
void testNestRun(WireMockRuntimeInfo wireMockRuntimeInfo) {

// arrange
IdeTestContext context = newContext(PROJECT_NEST, wireMockRuntimeInfo);
Nest commandlet = new Nest(context);
commandlet.arguments.setValue("--version");

// act
commandlet.run();

// assert
assertThat(context).logAtInfo().hasMessageContaining("nest --version");
}

private void checkInstallation(IdeTestContext context) {

assertThat(context).logAtInfo().hasMessageContaining("npm install -gf @nestjs/cli@11.0.21");

assertThat(context).logAtSuccess().hasMessageContaining("Successfully installed nest in version 11.0.21");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
${testbaseurl}/download/node/node/v18.19.1/node-v18.19.1.tgz
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"[9.0, 10.0)": [
{
"tool": "node",
"versionRange": "[18.0.0,)"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_VERSION=v18.19.1
NPM_VERSION=9.9.2
NEST_VERSION=11.0.21
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "nest $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
if [ "$1" == "--version" ]; then
echo "9.9.2"
exit
fi
echo "npm $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "npx $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"versions": {
"11.0.21": {
"version": "11.0.21",
"dist": {
"tarball": "${testbaseurl}/@nestjs/-/cli-11.0.21.tgz"
}
}
}
}
1 change: 1 addition & 0 deletions documentation/LICENSE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ The column `inclusion` indicates the way the component is included:
|https://docs.astral.sh/uv/[uv] |Optional|https://docs.astral.sh/uv/reference/policies/license/[Apache 2.0]
|https://github.com/openjdk/jfx[OpenJFX] |Optional|https://github.com/openjdk/jfx/blob/master/LICENSE[GPLv2] (with the “Classpath” Exception)
|https://squirrel-sql.sourceforge.io/[SQuirreL SQL Client]|Optional|https://github.com/squirrel-sql-client/squirrel-sql-stable-releases/blob/main/LICENSE[LGPL 2.1]
|https://docs.nestjs.com/cli/overview[NestJS CLI] |Optional|https://github.com/nestjs/nest-cli/blob/master/LICENSE[MIT License]
|===

== Apache Software License - Version 2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import java.time.Instant;
import java.util.List;

import com.devonfw.tools.ide.url.tool.java.JavaAzulUrlUpdater;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -32,6 +30,7 @@
import com.devonfw.tools.ide.url.tool.helm.HelmUrlUpdater;
import com.devonfw.tools.ide.url.tool.intellij.IntellijUrlUpdater;
import com.devonfw.tools.ide.url.tool.jasypt.JasyptUrlUpdater;
import com.devonfw.tools.ide.url.tool.java.JavaAzulUrlUpdater;
import com.devonfw.tools.ide.url.tool.java.JavaUrlUpdater;
import com.devonfw.tools.ide.url.tool.jenkins.JenkinsUrlUpdater;
import com.devonfw.tools.ide.url.tool.jmc.JmcUrlUpdater;
Expand Down Expand Up @@ -69,15 +68,17 @@ public class UpdateManager extends AbstractProcessorWithTimeout {
private final UrlFinalReport urlFinalReport;

private final List<AbstractUrlUpdater> updaters = List.of(
new AndroidStudioUrlUpdater(), new AwsUrlUpdater(), new AzureUrlUpdater(), new CopilotUrlUpdater(), new CorepackUrlUpdater(), new DockerDesktopUrlUpdater(),
new AndroidStudioUrlUpdater(), new AwsUrlUpdater(), new AzureUrlUpdater(), new CopilotUrlUpdater(), new CorepackUrlUpdater(),
new DockerDesktopUrlUpdater(),
new DotNetUrlUpdater(),
new EclipseCppUrlUpdater(), new EclipseJeeUrlUpdater(), new EclipseJavaUrlUpdater(), new GCloudUrlUpdater(),
new GcViewerUrlUpdater(), new GhUrlUpdater(), new GoUrlUpdater(), new GraalVmCommunityUpdater(), new GraalVmOracleUrlUpdater(),
new GradleUrlUpdater(), new HelmUrlUpdater(), new IntellijUrlUpdater(), new JasyptUrlUpdater(),
new JavaUrlUpdater(), new JavaAzulUrlUpdater(), new JenkinsUrlUpdater(), new JmcUrlUpdater(), new KotlincUrlUpdater(),
new KotlincNativeUrlUpdater(), new LazyDockerUrlUpdater(), new MvnUrlUpdater(),
new NgUrlUpdater(), new NodeUrlUpdater(), new NpmUrlUpdater(), new OcUrlUpdater(), new PgAdminUrlUpdater(), new PipUrlUpdater(), new PycharmUrlUpdater(),
new PythonUrlUpdater(), new QuarkusUrlUpdater(), new RustUrlUpdater(), new DockerRancherDesktopUrlUpdater(), new SonarUrlUpdater(), new SquirrelSqlUrlUpdater(),
new PythonUrlUpdater(), new QuarkusUrlUpdater(), new RustUrlUpdater(), new DockerRancherDesktopUrlUpdater(), new SonarUrlUpdater(),
new SquirrelSqlUrlUpdater(),
new TerraformUrlUpdater(), new TomcatUrlUpdater(), new UvUrlUpdater(), new VsCodeUrlUpdater());

/**
Expand Down
Loading