pinokiod 5.0.6 → 5.0.8

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/kernel/git.js CHANGED
@@ -40,6 +40,16 @@ class Git {
40
40
  const dest = path.resolve(this.kernel.homedir, `scripts/git/${name}.json`)
41
41
  return fs.promises.copyFile(src, dest)
42
42
  }))
43
+
44
+ // best-effort: clear any stale index.lock files across all known repos at startup
45
+ try {
46
+ const repos = await this.repos(this.kernel.path("api"))
47
+ for (const repo of repos) {
48
+ if (repo && repo.dir) {
49
+ await this.clearStaleLock(repo.dir)
50
+ }
51
+ }
52
+ } catch (_) {}
43
53
  }
44
54
  async ensureDefaults(homeOverride) {
45
55
  const home = homeOverride || this.kernel.homedir
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "5.0.6",
3
+ "version": "5.0.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7405,27 +7405,27 @@ const rerenderMenuSection = (container, html) => {
7405
7405
  const hasPaths = Boolean(trackedArg || untrackedArg)
7406
7406
  const hasTarget = Boolean(viewerCwd && hasPaths && selectionCount > 0)
7407
7407
  let bulkUrl = null
7408
- if (hasTarget) {
7409
- const urlParts = [`/run/scripts/git/reset_files.json?cwd=${encodeURIComponent(viewerCwd)}`]
7410
- if (trackedArg) urlParts.push(`tracked_paths=${encodeURIComponent(trackedArg)}`)
7411
- if (untrackedArg) urlParts.push(`untracked_paths=${encodeURIComponent(untrackedArg)}`)
7412
- urlParts.push('callback_target=parent')
7413
- urlParts.push('callback=$location.href')
7414
- bulkUrl = urlParts.join('&')
7415
- }
7416
- bulkResetButton.textContent = `Reset selected (${selectionCount})`
7417
- bulkResetButton.disabled = selectionCount === 0
7408
+ if (hasTarget) {
7409
+ const urlParts = [`/run/scripts/git/reset_files.json?cwd=${encodeURIComponent(viewerCwd)}`]
7410
+ if (trackedArg) urlParts.push(`tracked_paths=${encodeURIComponent(trackedArg)}`)
7411
+ if (untrackedArg) urlParts.push(`untracked_paths=${encodeURIComponent(untrackedArg)}`)
7412
+ urlParts.push('callback_target=parent')
7413
+ urlParts.push('callback=$location.href')
7414
+ bulkUrl = urlParts.join('&')
7415
+ }
7416
+ bulkResetButton.textContent = `Reset selected (${selectionCount})`
7417
+ bulkResetButton.disabled = selectionCount === 0
7418
7418
  bulkResetButton.onclick = null
7419
7419
  bulkResetButton.onclick = () => {
7420
7420
  if (selectionCount === 0) return
7421
7421
  if (!viewerCwd || !hasPaths || !bulkUrl) {
7422
7422
  Swal.showValidationMessage('Cannot reset: missing repository context or paths')
7423
7423
  return
7424
- }
7425
- const confirmed = confirm(`Reset ${selectionCount} selected file${selectionCount === 1 ? '' : 's'}?`)
7426
- if (!confirmed) return
7427
- reopenDiffOnCallback = true
7428
- showIframeView(bulkUrl)
7424
+ }
7425
+ const confirmed = confirm(`Reset ${selectionCount} selected file${selectionCount === 1 ? '' : 's'}?`)
7426
+ if (!confirmed) return
7427
+ reopenDiffOnCallback = true
7428
+ showIframeView(bulkUrl)
7429
7429
  }
7430
7430
  }
7431
7431