Skip to content

Commit

Permalink
fix: open resource type doc do not scroll to selected type
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjenek committed Aug 1, 2024
1 parent 5a940a3 commit 539d1b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/download-humctl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

const CLI_VERSION = '0.25.1';
const CLI_VERSION = '0.28.0';

const fs = require('node:fs/promises');
const extractZip = require('extract-zip');
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/humctl/HumctlAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class HumctlAdapter implements IHumctlAdapter {
throw new UnsupportedOperatingSystemError(os, arch);
}

let humctlEmbeddedBinaryFilename = `cli_0.25.1_${os}_${arch}`;
let humctlEmbeddedBinaryFilename = `cli_0.28.0_${os}_${arch}`;
if (os === 'win32') {
humctlEmbeddedBinaryFilename += '.exe';
}
Expand Down
10 changes: 6 additions & 4 deletions src/controllers/HumanitecSidebarController.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as vscode from 'vscode';
import { AvailableResourceTypesProvider } from '../providers/AvailableResourceTypesProvider';
import {
AvailableResourceTypesProvider,
ResourceTypeTreeItem,
} from '../providers/AvailableResourceTypesProvider';
import { IResourceTypeRepository } from '../repos/ResourceTypeRepository';
import { ResourceType } from '../domain/ResourceType';
import { ILoggerService } from '../services/LoggerService';
import { isHumanitecExtensionError } from '../errors/IHumanitecExtensionError';
import {
Expand Down Expand Up @@ -106,15 +108,15 @@ export class HumanitecSidebarController {

disposable = vscode.commands.registerCommand(
'humanitec.sidebar.availableResources.open_resource_type_doc',
async (resourceType: ResourceType) => {
async (resourceType: ResourceTypeTreeItem) => {
try {
let url = vscode.Uri.parse(
'https://developer.humanitec.com/platform-orchestrator/reference/resource-types/'
);
if (resourceType !== undefined) {
url = vscode.Uri.parse(
'https://developer.humanitec.com/platform-orchestrator/reference/resource-types/#' +
resourceType.type
resourceType.resourceType
);
}
vscode.env.openExternal(url);
Expand Down
2 changes: 1 addition & 1 deletion src/providers/AvailableResourceTypesProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export type AvailableResourceTypesTreeItem =
| ResourceTypePropertyTreeItem
| ResourceTypePropertyValueTreeItem;

class ResourceTypeTreeItem extends vscode.TreeItem {
export class ResourceTypeTreeItem extends vscode.TreeItem {
constructor(
public readonly resourceType: string,
public readonly name: string
Expand Down

0 comments on commit 539d1b1

Please sign in to comment.