Skip to content

Commit 90d817e

Browse files
authored
chore: add product.json file to kind extension (podman-desktop#17885)
* chore: add product.json file to kind extension Signed-off-by: Sonia Sandler <ssandler@redhat.com> * chore: update property name Signed-off-by: Sonia Sandler <ssandler@redhat.com> * chore: allow allowSyntheticDefaultImports in Kind tsconfig file Signed-off-by: Sonia Sandler <ssandler@redhat.com> * chore: remove unused '@ts-expect-error' Signed-off-by: Sonia Sandler <ssandler@redhat.com>
1 parent 2e1aa57 commit 90d817e

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

extensions/kind/product.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"kindMarkdown": "Podman Desktop can help you run Kind-powered local Kubernetes clusters on a container engine, such as Podman.\n\nMore information: [Podman Desktop Documentation](https://podman-desktop.io/docs/kind)"
3+
}

extensions/kind/src/create-cluster.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import * as path from 'node:path';
2222
import { KubeConfig, loadAllYaml } from '@kubernetes/client-node';
2323
import type { AuditRecord, AuditRequestItems, AuditResult, CancellationToken } from '@podman-desktop/api';
2424
import * as extensionApi from '@podman-desktop/api';
25-
// @ts-expect-error ignore type error https://github.com/janl/mustache.js/issues/797
2625
import mustache from 'mustache';
2726
import type { Tags } from 'yaml';
2827
import { parseAllDocuments, stringify } from 'yaml';

extensions/kind/src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import type { AuditRequestItems, CancellationToken, CliTool, Logger } from '@pod
2424
import * as extensionApi from '@podman-desktop/api';
2525
import { window } from '@podman-desktop/api';
2626

27+
import product from '../product.json' with { type: 'json' };
2728
import { connectionAuditor, createCluster } from './create-cluster';
2829
import type { ImageInfo } from './image-handler';
2930
import { ImageHandler } from './image-handler';
@@ -39,7 +40,7 @@ import {
3940

4041
const KIND_CLI_NAME = 'kind';
4142
const KIND_DISPLAY_NAME = 'Kind';
42-
const KIND_MARKDOWN = `Podman Desktop can help you run Kind-powered local Kubernetes clusters on a container engine, such as Podman.\n\nMore information: [Podman Desktop Documentation](https://podman-desktop.io/docs/kind)`;
43+
const KIND_MARKDOWN = product.kindMarkdown ?? '';
4344

4445
const API_KIND_INTERNAL_API_PORT = 6443;
4546

extensions/kind/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"rootDirs": ["src", "scripts"],
1111
"outDir": "dist",
1212
"skipLibCheck": true,
13-
"types": ["node"]
13+
"types": ["node"],
14+
"allowSyntheticDefaultImports": true
1415
},
1516
"include": ["src", "types/*.d.ts", "../../types/**/*.d.ts", "scripts"]
1617
}

0 commit comments

Comments
 (0)