@muhammedaksam/easiarr 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muhammedaksam/easiarr",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "TUI tool for generating docker-compose files for the *arr media ecosystem with 41 apps, TRaSH Guides best practices, VPN routing, and Traefik reverse proxy support",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -478,9 +478,10 @@ export class ApiKeyViewer extends BoxRenderable {
478
478
  portainerEntry.status = "generated"
479
479
  }
480
480
  } else {
481
- // Already initialized, try login
482
- await client.login(globalUsername, globalPassword)
483
- const apiKey = await client.generateApiKey(globalPassword, "easiarr-api-key")
481
+ // Already initialized, try login with saved password if available
482
+ const portainerPassword = env["PORTAINER_PASSWORD"] || globalPassword
483
+ await client.login(globalUsername, portainerPassword)
484
+ const apiKey = await client.generateApiKey(portainerPassword, "easiarr-api-key")
484
485
  this.portainerCredentials = { apiKey }
485
486
 
486
487
  const portainerEntry = this.keys.find((k) => k.appId === "portainer")
@@ -386,8 +386,10 @@ export class FullAutoSetup extends BoxRenderable {
386
386
  // Already initialized, try to login and get API key if we don't have one
387
387
  if (!this.env["API_KEY_PORTAINER"]) {
388
388
  try {
389
- await client.login(this.globalUsername, this.globalPassword)
390
- const apiKey = await client.generateApiKey(this.globalPassword, "easiarr-api-key")
389
+ // Use saved Portainer password if available (may have been padded)
390
+ const portainerPassword = this.env["PORTAINER_PASSWORD"] || this.globalPassword
391
+ await client.login(this.globalUsername, portainerPassword)
392
+ const apiKey = await client.generateApiKey(portainerPassword, "easiarr-api-key")
391
393
  await updateEnv({ API_KEY_PORTAINER: apiKey })
392
394
  this.updateStep("Portainer", "success", "API key generated")
393
395
  } catch {