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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to `@red-hat-developer-hub/cli` are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). The major and minor version are synchronized with the corresponding RHDH release (see [Versioning Strategy](README.md#versioning-strategy)).

## [Unreleased]

### Changed

- **`plugin dev` and `plugin package`:** Generated dynamic-plugin entries now use `enabled: true` instead of the deprecated `disabled: false`. Documentation examples use `enabled` as well ([RHIDP-17293](https://redhat.atlassian.net/browse/RHIDP-17293)).

## 2.2.0 - 2026-09-28

### Removed
Expand Down
6 changes: 3 additions & 3 deletions docs/Intent-Based-CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Install it as a dynamic plugin from `rhdh-plugin-export-overlays`:
# dynamic-plugins.yaml
plugins:
- package: 'oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-auth:bs_1.54.6__0.1.11'
disabled: false
enabled: true
pluginConfig:
dynamicPlugins:
frontend:
Expand Down Expand Up @@ -93,7 +93,7 @@ To use TechDocs actions (`docs list`, `docs get`, `docs coverage`), install the
# dynamic-plugins.yaml
plugins:
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-techdocs-mcp-extras:bs_1.54.6__0.2.6
disabled: false
enabled: true
```

**Note:** Only `docs list`, `docs get`, and `docs coverage` require this plugin. The `docs build` command uses the standard TechDocs sync endpoint and does not require this plugin.
Expand All @@ -106,7 +106,7 @@ To use TechDocs search functionality (`search --types techdocs` and `docs search
# dynamic-plugins.yaml
plugins:
- package: 'oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-search-backend-module-techdocs:bs_1.54.6__0.4.17'
disabled: false
enabled: true
```

**Note:** This is a standard Backstage plugin for indexing TechDocs content in the search backend.
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
let url = fallback;
for (const name of ['default.env', '.env']) {
const file = path.join(runtimeDir, name);
if (!(await fs.pathExists(file))) continue;

Check warning on line 44 in src/commands/dev/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-Uz7bVN8EcI4fIXX&open=AaDt-Uz7bVN8EcI4fIXX&pullRequest=224
const content = await fs.readFile(file, 'utf8');

Check warning on line 45 in src/commands/dev/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-Uz7bVN8EcI4fIXY&open=AaDt-Uz7bVN8EcI4fIXY&pullRequest=224
for (const line of content.split('\n')) {
const eq = line.indexOf('=');
if (eq === -1 || line.slice(0, eq).trim() !== 'BASE_URL') continue;
Expand Down Expand Up @@ -80,7 +80,7 @@
// Connection refused, timeout, etc. — keep polling.
}
process.stdout.write('.');
await new Promise<void>(resolve => setTimeout(resolve, pollIntervalMs));

Check warning on line 83 in src/commands/dev/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-Uz7bVN8EcI4fIXZ&open=AaDt-Uz7bVN8EcI4fIXZ&pullRequest=224
}
process.stdout.write('\n');
throw new Error(
Expand Down Expand Up @@ -288,7 +288,7 @@
await exportCommand({ build: true, install: true });
await stagePlugin(runtimeDir);
for (const action of ['install-dynamic-plugins', 'stop-rhdh', 'start-rhdh']) {
await compose(containerTool, runtimeDir, composeArgs(action));

Check warning on line 291 in src/commands/dev/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-Uz7bVN8EcI4fIXa&open=AaDt-Uz7bVN8EcI4fIXa&pullRequest=224
}
const url = await resolveRhdhUrl(runtimeDir);
await waitForRhdhReady(url);
Expand Down Expand Up @@ -592,7 +592,7 @@
: undefined;
try {
Task.log(`\n[watch] Change detected — starting update cycle...`);
await runUpdateCycle(containerTool, runtimeDir, '[watch] ');

Check warning on line 595 in src/commands/dev/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-Uz7bVN8EcI4fIXb&open=AaDt-Uz7bVN8EcI4fIXb&pullRequest=224
Task.log(`[watch] Update complete in ${Date.now() - cycleStart}ms.`);
} catch (err: unknown) {
const message = describeWatchError(err);
Expand All @@ -606,7 +606,7 @@
Task.log(
`[watch] Change received during cycle — waiting for runtime to settle...`,
);
if (settlePromise !== undefined) await settlePromise;

Check warning on line 609 in src/commands/dev/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-Uz7bVN8EcI4fIXc&open=AaDt-Uz7bVN8EcI4fIXc&pullRequest=224
}
// Cleared only now, after any settle-wait completes — not in a
// `finally` right after the cycle itself. Clearing it earlier let a
Expand Down Expand Up @@ -799,7 +799,7 @@
plugins: [
{
package: pluginPackage,
disabled: false,
enabled: true,
pullPolicy: 'Always',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/commands/package-dynamic-plugins/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@
Task.log(
`Running existing export-dynamic script on plugin package ${packageFilePath}`,
);
await Task.forCommand(`yarn export-dynamic`, {
cwd: packageDirectory,
});

Check warning on line 119 in src/commands/package-dynamic-plugins/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-UvMbVN8EcI4fIXT&open=AaDt-UvMbVN8EcI4fIXT&pullRequest=224

// Verify export created dist-dynamic directory
if (!fs.existsSync(distDynamicPath)) {
Expand All @@ -131,10 +131,10 @@
Task.log(
`Using generated command to export plugin package ${packageFilePath}`,
);
await Task.forCommand(
`${process.execPath} ${process.argv[1]} plugin export`,
{ cwd: packageDirectory },
);

Check warning on line 137 in src/commands/package-dynamic-plugins/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-UvMbVN8EcI4fIXU&open=AaDt-UvMbVN8EcI4fIXU&pullRequest=224

// Verify export created dist-dynamic directory
if (!fs.existsSync(distDynamicPath)) {
Expand Down Expand Up @@ -164,9 +164,9 @@
for (const pluginPkg of packages) {
const { packageDirectory, packageFilePath } = pluginPkg;
const distDynamicDirectory = path.join(packageDirectory, 'dist-dynamic');
const pluginPackageJson = (await fs.readJson(
path.join(distDynamicDirectory, 'package.json'),
)) as PackageJson;

Check warning on line 169 in src/commands/package-dynamic-plugins/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-UvMbVN8EcI4fIXV&open=AaDt-UvMbVN8EcI4fIXV&pullRequest=224
const packageName = pluginPackageJson
.name!.replace(/-dynamic$/, '')
.replace(/^@/, '')
Expand All @@ -176,11 +176,11 @@
`Packing '${distDynamicDirectory}' into staging directory '${targetDirectory}' (npm pack + tar)`,
);
try {
await stageDistDynamicViaNpmPack({
distDynamicDirectory,
targetDirectory,
packScratchParent: tmpDir,
});

Check warning on line 183 in src/commands/package-dynamic-plugins/command.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Unexpected `await` inside a loop.

See more on https://sonarcloud.io/project/issues?id=redhat-developer_rhdh-cli&issues=AaDt-UvMbVN8EcI4fIXW&open=AaDt-UvMbVN8EcI4fIXW&pullRequest=224
const {
name,
version,
Expand Down Expand Up @@ -302,7 +302,7 @@
: `oci://${tag}!${packageName}`;
return {
package: packageString,
disabled: false,
enabled: true,
...(pluginConfig ? { pluginConfig } : {}),
};
}),
Expand Down
Loading