-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor pd runner and rename (#8764)
* chore(test): refactor pdRunner and create runnerOptions Signed-off-by: Vladimir Lazar <[email protected]>
- Loading branch information
Showing
19 changed files
with
169 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/********************************************************************** | ||
* Copyright (C) 2023-2024 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
***********************************************************************/ | ||
|
||
export class RunnerOptions { | ||
public readonly _profile: string; | ||
public readonly _customFolder: string; | ||
public readonly _openDevTools: string; | ||
public readonly _autoUpdate: boolean; | ||
public readonly _autoCheckUpdates: boolean; | ||
public readonly _extesionsDisabled: string[]; | ||
public readonly _binaryPath: string | undefined; | ||
|
||
constructor({ | ||
profile = '', | ||
customFolder = 'podman-desktop', | ||
openDevTools = 'none', | ||
autoUpdate = true, | ||
autoCheckUpdates = true, | ||
extesionsDisabled = [], | ||
binaryPath = undefined, | ||
}: { | ||
profile?: string; | ||
customFolder?: string; | ||
openDevTools?: string; | ||
autoUpdate?: boolean; | ||
autoCheckUpdates?: boolean; | ||
extesionsDisabled?: string[]; | ||
binaryPath?: string; | ||
} = {}) { | ||
this._profile = profile; | ||
this._customFolder = customFolder; | ||
this._openDevTools = openDevTools; | ||
this._autoUpdate = autoUpdate; | ||
this._autoCheckUpdates = autoCheckUpdates; | ||
this._extesionsDisabled = extesionsDisabled; | ||
this._binaryPath = binaryPath; | ||
} | ||
|
||
public createSettingsJson(): string { | ||
console.log(`Binary path: ${this._binaryPath}`); | ||
|
||
if (this._binaryPath) { | ||
return JSON.stringify({ | ||
'preferences.OpenDevTools': this._openDevTools, | ||
'extensions.autoUpdate': this._autoUpdate, | ||
'extensions.autoCheckUpdates': this._autoCheckUpdates, | ||
'extensions.disabled': this._extesionsDisabled, | ||
'podman.binary.path': this._binaryPath, | ||
}); | ||
} | ||
|
||
return JSON.stringify({ | ||
'preferences.OpenDevTools': this._openDevTools, | ||
'extensions.autoUpdate': this._autoUpdate, | ||
'extensions.autoCheckUpdates': this._autoCheckUpdates, | ||
'extensions.disabled': this._extesionsDisabled, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.