@hurshb50/setup-ubuntu 1.1.0 → 1.1.1

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.
@@ -29,10 +29,6 @@ function path() {
29
29
  export PATH="$HOME/.local/bin:$PATH"
30
30
  }
31
31
 
32
- function package_manager() {
33
- export VP_PACKAGE_MANAGER="npm@12"
34
- }
35
-
36
32
  function setup_history() {
37
33
  shopt -s histappend
38
34
  shopt -s checkwinsize
@@ -135,7 +131,6 @@ function run() {
135
131
  fi
136
132
 
137
133
  path
138
- package_manager
139
134
  load_auto_suggestion
140
135
  setup_history
141
136
  completion
@@ -10,7 +10,7 @@ import fs from "fs/promises";
10
10
  import { execa } from "execa";
11
11
  //#region package.json
12
12
  var name = "@hurshb50/setup-ubuntu";
13
- var version = "1.0.3";
13
+ var version = "1.1.0";
14
14
  //#endregion
15
15
  //#region source/modules/logger/logger.ts
16
16
  var Logger = class Logger {
@@ -499,7 +499,7 @@ var PasswordManager = class {
499
499
  const task = new Task("Password Manager");
500
500
  context.logger.add(task);
501
501
  task.start();
502
- const dependencies = ["libasound2t64", "1password"];
502
+ const dependencies = [alsaPackageName(await fs.readFile(path.join("/", "etc", "os-release"), "utf8")), "1password"];
503
503
  if (await context.dependencyManager.isInstalled(dependencies)) {
504
504
  task.finish();
505
505
  return;
@@ -529,6 +529,10 @@ var PasswordManager = class {
529
529
  task.finish();
530
530
  }
531
531
  };
532
+ function alsaPackageName(osRelease) {
533
+ const versionId = osRelease.match(/^VERSION_ID="?([\d.]+)"?$/m)?.[1];
534
+ return Number.parseInt(versionId ?? "", 10) >= 24 ? "libasound2t64" : "libasound2";
535
+ }
532
536
  //#endregion
533
537
  //#region source/modules/shell-configuration/shell-configuration.ts
534
538
  var ShellConfiguration = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hurshb50/setup-ubuntu",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "distribution"