vibora 2.1.0 → 2.2.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.
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <link rel="icon" type="image/png" sizes="512x512" href="/vibora-icon.png" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>Vibora</title>
9
- <script type="module" crossorigin src="/assets/index-B5Ujeicd.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-C5n5kVkQ.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-DGzCy3yX.css">
11
11
  </head>
12
12
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibora",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "description": "The Vibe Engineer's Cockpit",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "repository": {
package/server/index.js CHANGED
@@ -3609,7 +3609,7 @@ var log2 = {
3609
3609
  };
3610
3610
 
3611
3611
  // server/lib/settings.ts
3612
- var CURRENT_SCHEMA_VERSION = 2;
3612
+ var CURRENT_SCHEMA_VERSION = 3;
3613
3613
  var DEFAULT_SETTINGS = {
3614
3614
  _schemaVersion: CURRENT_SCHEMA_VERSION,
3615
3615
  server: {
@@ -3623,8 +3623,7 @@ var DEFAULT_SETTINGS = {
3623
3623
  password: null
3624
3624
  },
3625
3625
  remoteVibora: {
3626
- host: "",
3627
- port: 7777
3626
+ url: ""
3628
3627
  },
3629
3628
  editor: {
3630
3629
  app: "vscode",
@@ -3645,8 +3644,6 @@ var MIGRATION_MAP = {
3645
3644
  defaultGitReposDir: "paths.defaultGitReposDir",
3646
3645
  basicAuthUsername: "authentication.username",
3647
3646
  basicAuthPassword: "authentication.password",
3648
- remoteHost: "remoteVibora.host",
3649
- hostname: "remoteVibora.host",
3650
3647
  sshPort: "editor.sshPort",
3651
3648
  linearApiKey: "integrations.linearApiKey",
3652
3649
  githubPat: "integrations.githubPat",
@@ -3672,28 +3669,57 @@ function setNestedValue(obj, path2, value) {
3672
3669
  }
3673
3670
  current[lastKey] = value;
3674
3671
  }
3672
+ function constructRemoteUrl(host, port) {
3673
+ if (!host)
3674
+ return "";
3675
+ const effectivePort = port || 7777;
3676
+ const portSuffix = effectivePort === 80 || effectivePort === 443 ? "" : `:${effectivePort}`;
3677
+ return `http://${host}${portSuffix}`;
3678
+ }
3675
3679
  function migrateSettings(parsed) {
3676
3680
  const result = { migrated: false, migratedKeys: [], warnings: [] };
3677
3681
  const version = parsed._schemaVersion ?? 1;
3678
3682
  if (version >= CURRENT_SCHEMA_VERSION) {
3679
3683
  return result;
3680
3684
  }
3681
- for (const [oldKey, newPath] of Object.entries(MIGRATION_MAP)) {
3682
- if (oldKey in parsed && parsed[oldKey] !== undefined) {
3683
- const oldValue = parsed[oldKey];
3684
- if (oldKey === "port" && oldValue === OLD_DEFAULT_PORT) {
3685
+ if (version < 2) {
3686
+ for (const [oldKey, newPath] of Object.entries(MIGRATION_MAP)) {
3687
+ if (oldKey in parsed && parsed[oldKey] !== undefined) {
3688
+ const oldValue = parsed[oldKey];
3689
+ if (oldKey === "port" && oldValue === OLD_DEFAULT_PORT) {
3690
+ delete parsed[oldKey];
3691
+ result.migrated = true;
3692
+ continue;
3693
+ }
3694
+ const existingValue = getNestedValue(parsed, newPath);
3695
+ if (existingValue !== undefined) {
3696
+ result.warnings.push(`Key "${oldKey}" exists but "${newPath}" already set. Removing old key.`);
3697
+ } else {
3698
+ setNestedValue(parsed, newPath, oldValue);
3699
+ result.migratedKeys.push(oldKey);
3700
+ }
3685
3701
  delete parsed[oldKey];
3686
3702
  result.migrated = true;
3687
- continue;
3688
- }
3689
- const existingValue = getNestedValue(parsed, newPath);
3690
- if (existingValue !== undefined) {
3691
- result.warnings.push(`Key "${oldKey}" exists but "${newPath}" already set. Removing old key.`);
3692
- } else {
3693
- setNestedValue(parsed, newPath, oldValue);
3694
- result.migratedKeys.push(oldKey);
3695
3703
  }
3696
- delete parsed[oldKey];
3704
+ }
3705
+ const flatHost = parsed.remoteHost || parsed.hostname || "";
3706
+ if (flatHost) {
3707
+ const url = constructRemoteUrl(flatHost, 7777);
3708
+ setNestedValue(parsed, "remoteVibora.url", url);
3709
+ result.migratedKeys.push("remoteHost");
3710
+ delete parsed.remoteHost;
3711
+ delete parsed.hostname;
3712
+ result.migrated = true;
3713
+ }
3714
+ }
3715
+ if (version < 3) {
3716
+ const remoteVibora = parsed.remoteVibora;
3717
+ if (remoteVibora && "host" in remoteVibora) {
3718
+ const host = remoteVibora.host || "";
3719
+ const port = remoteVibora.port || 7777;
3720
+ const url = constructRemoteUrl(host, port);
3721
+ parsed.remoteVibora = { url };
3722
+ result.migratedKeys.push("remoteVibora.host");
3697
3723
  result.migrated = true;
3698
3724
  }
3699
3725
  }
@@ -3789,8 +3815,7 @@ function getSettings() {
3789
3815
  password: parsed.authentication?.password ?? null
3790
3816
  },
3791
3817
  remoteVibora: {
3792
- host: parsed.remoteVibora?.host ?? DEFAULT_SETTINGS.remoteVibora.host,
3793
- port: parsed.remoteVibora?.port ?? DEFAULT_SETTINGS.remoteVibora.port
3818
+ url: parsed.remoteVibora?.url ?? DEFAULT_SETTINGS.remoteVibora.url
3794
3819
  },
3795
3820
  editor: {
3796
3821
  app: parsed.editor?.app ?? DEFAULT_SETTINGS.editor.app,
@@ -3820,8 +3845,7 @@ function getSettings() {
3820
3845
  password: process.env.VIBORA_BASIC_AUTH_PASSWORD ?? fileSettings.authentication.password
3821
3846
  },
3822
3847
  remoteVibora: {
3823
- host: process.env.VIBORA_REMOTE_HOST ?? process.env.VIBORA_HOSTNAME ?? fileSettings.remoteVibora.host,
3824
- port: fileSettings.remoteVibora.port
3848
+ url: process.env.VIBORA_REMOTE_URL ?? fileSettings.remoteVibora.url
3825
3849
  },
3826
3850
  editor: {
3827
3851
  app: fileSettings.editor.app,
@@ -3848,7 +3872,7 @@ function toLegacySettings(settings) {
3848
3872
  return {
3849
3873
  port: settings.server.port,
3850
3874
  defaultGitReposDir: settings.paths.defaultGitReposDir,
3851
- remoteHost: settings.remoteVibora.host,
3875
+ remoteUrl: settings.remoteVibora.url,
3852
3876
  sshPort: settings.editor.sshPort,
3853
3877
  basicAuthUsername: settings.authentication.username,
3854
3878
  basicAuthPassword: settings.authentication.password,