Commit graph

71 commits

Author SHA1 Message Date
Florent Benoit
35589e0a6e chore: apply biome formatter on files
changes occured in the rules between v2.3.5 and v2.3.6
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-11-19 17:47:07 +01:00
Florent Benoit
f0401e8c74 refactor(extension-compose): reuse global mock for @podman-desktop/api
related to https://github.com/podman-desktop/podman-desktop/issues/14493
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-11-18 15:06:05 +01:00
axel7083
56c433018e
refactor(extension: compose): use vitest v4 compatible syntax (#14900)
* refactor(extension: compose): use vitest v4 compatible syntax

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: apply suggestion from @coderabbitai[bot]

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

---------

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2025-11-17 10:24:03 +01:00
Simon Rey
5aec161ecd
refactor: use mockResolvedValue / mockReturn in some tests (#14241)
* chore: use mockResolvedValue / mockReturn in some tests

Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>

* refactor: apply @benoitf suggestion

Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>

---------

Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>
2025-10-06 10:22:07 +02:00
Simon Rey
0ae6c2ebaa
revert: use mockResolvedValue / mockReturn in some tests (#14240)
revert: use mockResolvedValue / mockReturn in some tests (#14236)

This reverts commit d21f8d82e0.

Signed-off-by: Simon Rey <51708585+simonrey1@users.noreply.github.com>
2025-10-03 09:46:43 +00:00
Simon Rey
d21f8d82e0
chore: use mockResolvedValue / mockReturn in some tests (#14236)
Signed-off-by: Simon Rey <sfbrey+eqqe@gmail.com>
2025-10-03 10:30:48 +02:00
Florent BENOIT
6a34dbcf45
feat: detect podman-compose installation before trying to install docker-compose (#14108)
* feat: detect podman-compose installation for the installation of compose

if we detect podman-compose we don't force people to download/install
docker compose

fixes https://github.com/podman-desktop/podman-desktop/issues/13134
Signed-off-by: Florent Benoit <fbenoit@redhat.com>

* chore: rename id to add view suffix
Signed-off-by: Florent Benoit <fbenoit@redhat.com>

---------

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-09-29 13:45:36 -04:00
Florent Benoit
c4a9b187e1 chore: simplify mocking
will allow to introduce tests more easily
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2025-09-29 13:26:33 +02:00
Denis Golovin
7bb8a6f74f feat(cli-tools): install latest verison without asking to select one
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-08-19 19:17:51 -07:00
Denis Golovin
c8545f73a8 fix: fix compose installation after restart
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-07-29 08:53:07 -07:00
Denis Golovin
0c9b29186b fix: remove not needed timeout around registerCLITool call
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-07-24 10:56:09 -07:00
Philippe Martin
0e820d7a60
fix: do not search full path executable (#13060)
Signed-off-by: Philippe Martin <phmartin@redhat.com>
2025-07-04 09:11:38 +02:00
dependabot[bot]
6eeb07a4d1 chore(deps-dev): bump the vitest group across 1 directory with 3 updates
Bumps the vitest group with 3 updates in the / directory: [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8), [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).

Updates `@vitest/coverage-v8` from 3.1.4 to 3.2.3
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.2.3/packages/coverage-v8)

Updates `@vitest/eslint-plugin` from 1.2.1 to 1.2.2
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.2.1...v1.2.2)

Updates `vitest` from 3.1.4 to 3.2.3
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.2.3/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 3.2.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 3.2.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>

fix: migrate to vitest v3.2.x

Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-06-26 10:03:34 +02:00
Denis Golovin
00f4422c6b
fix: docker-compose warning messages mention kubectl (#12945)
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-06-24 17:54:04 -07:00
Evzen Gasta
08f1e32c5a refactor: changed nullish ifs for nullish coalescing operator assignment
Signed-off-by: Evzen Gasta <evzen.ml@seznam.cz>
2025-03-26 10:29:53 +01:00
Brian M
9bbff86da2
fix: removed compose /usr/local/bin in PATH check to align with kubectl (#11651)
fix: removed compose PATH check for mac and flatpack

Signed-off-by: Brian <bmahabir@bu.edu>
2025-03-14 17:08:43 +00:00
Denis Golovin
4205fbda72
fix: copying docker-compose to fails on windows (#11235)
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-02-26 07:51:10 -08:00
Sonia Sandler
c9475bea28
chore: update delete Kind, kubectl, and Compose executables to use process.exec (#11199)
* chore: update delete Kind, kubectl, and Compose executables to use process.exec
Signed-off-by: Sonia Sandler <ssandler@redhat.com>
2025-02-26 10:30:32 -05:00
Jeff MAURY
eb2f33ec2e
fix: handle compose releases with many assets (#11191) 2025-02-18 15:25:57 +01:00
dependabot[bot]
9a99e0c945
chore(deps-dev): bump vitest from 2.1.9 to 3.0.5 (#11023)
* chore(deps-dev): bump vitest from 2.1.9 to 3.0.5

Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 2.1.9 to 3.0.5.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v3.0.5/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
Co-authored-by: Florent Benoit <fbenoit@redhat.com>
2025-02-10 13:39:59 +00:00
Denis Golovin
dcc1105e90 fix: show error message dialog in case compose download error
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-02-05 11:59:12 -08:00
Denis Golovin
6d91a0a4ed
fix: remove disablement of no explicit any rule in compose extension (#10613)
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2025-01-20 21:05:43 -08:00
Denis Golovin
5c963904af fix: copy docker-compose over exiting file
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2024-12-16 11:08:26 -08:00
Jeff MAURY
aa312feb14
fix: ensure system path is created and show notification if not in PATH (#10176)
* fix: ensure system path is created and show notification if not in PATH

Fixes #5776

Signed-off-by: Jeff MAURY <jmaury@redhat.com>

* fix: apply suggestion from @feloy

Co-authored-by: Philippe Martin <feloy1@gmail.com>
Signed-off-by: Jeff MAURY <jmaury@redhat.com>

---------

Signed-off-by: Jeff MAURY <jmaury@redhat.com>
Co-authored-by: Philippe Martin <feloy1@gmail.com>
2024-12-12 09:38:39 +01:00
Denis Golovin
411304639a fix: sync onboarding status after in/uninstalling on cli page
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2024-12-04 11:45:43 +01:00
Denis Golovin
4c0fd4a681 fix: compose installation via onboarding and cli tools
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2024-12-04 11:45:43 +01:00
Florent Benoit
cdee0b7ab1 chore: add command in compose to display the onboarding
for docker compatibility mode
https://github.com/containers/podman-desktop/issues/9242

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-11-06 09:57:56 +01:00
Denis Golovin
5851a39eac fix: add implementation for compose update
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
2024-10-16 12:08:35 -07:00
axel7083
5f2d96c055
feat(eslint): enable vitest/no-import-node-test (#9068)
* feat(eslint): enable `vitest/no-import-node-test`

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: pnpm-lock conflict

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

---------

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-09-25 13:06:32 +00:00
Luca Stocchi
f61c3a532d
fix: update binaryPath after install/uninstall on compose cli (#8679)
Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-08-30 16:39:28 +02:00
Luca Stocchi
81c9fc099e
feat: allow to uninstall cli tool (#8547)
* feat: allow to uninstall cli tool

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: update extensions

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: add uninstall emitter and handle it from core

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: execute delete as admin if unlink fails and ask confirmation to uninstall

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: add cli path to compose error message

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: add tests for admin uninstall

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: fix lint

Signed-off-by: lstocchi <lstocchi@redhat.com>

---------

Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-08-27 13:19:51 +00:00
Florent Benoit
fba9eead70 chore: fix some linting rules
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-08-27 11:27:40 +02:00
Luca Stocchi
9025a81588
feat: support cli tool installer (#8534)
* feat: support cli tool installer

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: update extensions

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: clean

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: show error message if fails at selecting version

Signed-off-by: lstocchi <lstocchi@redhat.com>

---------

Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-08-22 10:35:24 +02:00
Florent Benoit
69c3736ea7 chore: migrate the types for vitest
SpyInstance is now MockInstance
MockInstance generic is different

see https://vitest.dev/guide/migration

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-08-21 22:30:24 +02:00
Luca Stocchi
b7f8ac235d
feat: allow to upgrade/downgrade cli tool (#8513)
* feat: allow to upgrade/downgrade cli tool

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: update extensions

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: fix typecheck

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: rename installationSource options

Signed-off-by: lstocchi <lstocchi@redhat.com>

---------

Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-08-21 10:46:36 +02:00
axel7083
154ff70d45
fix(compose-extension): pre-existing system-wide installation (#7942)
* fix: compose detection

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: improve compose detection

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: error message

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: getSystemBinaryPath

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* test: ensuring compose extension behavior

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix(compose): cli tool should be registered on download

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* Apply suggestions from @deboer-tim

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

---------

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-12 15:43:55 +02:00
axel7083
654e31474a
fix: removing unused code compose extension (#7877)
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
2024-07-01 16:06:49 +02:00
Luca Stocchi
61eefc784b
fix: enable prefer-nullish-coalescing eslint rule (#7442)
Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-06-05 10:24:14 +02:00
Luca Stocchi
6b69ae4d54
chore: add strict to Compose, Lima, Kubectl, KubeContext and Registries extensions (#7385)
* chore: add strictNullChecks to Compose, Lima, Kubectl and KubeContext extensions

Signed-off-by: lstocchi <lstocchi@redhat.com>

* chore: convert strictNullChecks to strict

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: update tsconfig in registries

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: ignore mustache error

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: typecheck

Signed-off-by: lstocchi <lstocchi@redhat.com>

---------

Signed-off-by: lstocchi <lstocchi@redhat.com>
2024-05-31 15:10:33 +02:00
Florent Benoit
7d997640c3 chore: add rule to use node: prefix for node imports
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-03-15 15:32:58 +01:00
Florent Benoit
0698e4d2fd chore: sort imports
pre-req for https://github.com/containers/podman-desktop/issues/6373
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-03-15 13:52:16 +01:00
Florent Benoit
e4fcfe5ac1 chore: fix return type
except in renderer for now where the rule is disabled
but it's enabled everywhere else

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2024-02-28 15:56:27 +00:00
Florent Benoit
5daa21ed2b fix: do not fetch pre-releases of compose
fixes https://github.com/containers/podman-desktop/issues/5291
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
2023-12-19 13:21:59 +01:00
Máirín Duffy
9969c82d59
chore: Compose UI Minor Fixes (1.5 cherrypicks to main) (#5115)
* fix: adjust text for compose extension in settings
* fix: centering download screen for compose onboard

Signed-off-by: Máirín Duffy <duffy@redhat.com>
2023-12-06 15:51:51 +00:00
Luca Stocchi
4d3440e43e
feat: register compose cli updater and update compose cli version (#5111)
* feat: register compose cli updater and update cli version

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: dispose updater after usage

Signed-off-by: lstocchi <lstocchi@redhat.com>

* fix: dispose updater if newest version is installed during onboarding

Signed-off-by: lstocchi <lstocchi@redhat.com>

---------

Signed-off-by: lstocchi <lstocchi@redhat.com>
2023-12-05 18:20:22 +01:00
Philippe Martin
ea10dcabd0
chore: send bundled onboarding telemetry (#4736)
* feat: bundled telemetry for onboarding
Signed-off-by: Philippe Martin <phmartin@redhat.com>

* fix: update packages/renderer/src/lib/onboarding/telemetry.ts

Co-authored-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Philippe Martin <feloy1@gmail.com>

* fix: view steps in double
Signed-off-by: Philippe Martin <phmartin@redhat.com>

* fix: prefix interfaces with Onboarding
Signed-off-by: Philippe Martin <phmartin@redhat.com>

---------

Signed-off-by: Philippe Martin <feloy1@gmail.com>
Co-authored-by: Florent BENOIT <fbenoit@redhat.com>
2023-11-28 07:20:42 +01:00
Philippe Martin
4c62769150
refactor: human readable compose onboarding ids (#4948)
Signed-off-by: Philippe Martin <phmartin@redhat.com>
2023-11-22 20:02:44 -05:00
Charlie Drage
ae6bca307c
feat: show registered CLI versions (#4541)
### What does this PR do?

* Shows the CLI version within the CLI Tools section of preferences
* The extension handles the updating / checking of the version and
  updates the CLI page accordingly.

### Screenshot/screencast of this PR

<!-- Please include a screenshot or a screencast
explaining what is doing this PR -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes #3707

### How to test this PR?

1. Install Compose through onboarding
2. Open the CLI Tools section and you should now see the version number
   of the tool.

<!-- Please explain steps to reproduce -->

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2023-11-02 23:37:51 +00:00
Charlie Drage
1ab75769c3
feat: register docker-compose cli for compose extension (#4437)
### What does this PR do?

Update to containers#4388

Adds the docker-compose CLI to the list of CLI's available in the CLI
page

### Screenshot/screencast of this PR

<!-- Please include a screenshot or a screencast
explaining what is doing this PR -->

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Related to containers#3781
Depends on containers#4197

### How to test this PR?

Check the CLI section within settings and you'll see Compose

<!-- Please explain steps to reproduce -->
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2023-11-02 16:49:24 +00:00
Charlie Drage
74cd326a56
chore: add telemetry to compose onboarding (#4572)
chore: add telemetry to compose onboardin

### What does this PR do?

Adds telemetry to the functions of the compose onboarding.

### Screenshot/screencast of this PR

<!-- Please include a screenshot or a screencast
explaining what is doing this PR -->

N/A

### What issues does this PR fix or reference?

<!-- Include any related issues from Podman Desktop
repository (or from another issue tracker). -->

Closes https://github.com/containers/podman-desktop/issues/4571

### How to test this PR?

<!-- Please explain steps to reproduce -->

Should run as normal

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2023-11-01 08:38:52 -04:00