@pi-unipi/updater 2.0.6 → 2.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/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/updater",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Auto-updater, changelog browser, and readme browser for Unipi — checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"author": "Neuron Mr White",
|
|
8
9
|
"repository": {
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"@pi-unipi/core": "*"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
47
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
48
|
+
"@earendil-works/pi-tui": "^0.75.5"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@types/node": "^25.6.0",
|
package/src/commands.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Registers /unipi:readme [package], /unipi:changelog, /unipi:updater-settings
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ExtensionAPI, ExtensionCommandContext } from "@
|
|
7
|
+
import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
|
8
8
|
import { UNIPI_PREFIX, UPDATER_COMMANDS } from "@pi-unipi/core";
|
|
9
9
|
import { renderReadmeOverlay } from "./tui/readme-overlay.js";
|
|
10
10
|
import { renderChangelogOverlay } from "./tui/changelog-overlay.js";
|
package/src/index.ts
CHANGED
package/src/markdown.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* with theme-aware styling. Falls back to simple ANSI rendering otherwise.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Markdown } from "@
|
|
10
|
-
import type { MarkdownTheme } from "@
|
|
11
|
-
import { getMarkdownTheme } from "@
|
|
12
|
-
import type { Theme } from "@
|
|
9
|
+
import { Markdown } from "@earendil-works/pi-tui";
|
|
10
|
+
import type { MarkdownTheme } from "@earendil-works/pi-tui";
|
|
11
|
+
import { getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
12
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Render markdown text to terminal-formatted lines.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { existsSync } from "fs";
|
|
9
9
|
import { join } from "path";
|
|
10
|
-
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
10
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { parseChangelog } from "../changelog.js";
|
|
13
13
|
import { renderMarkdown } from "../markdown.js";
|
|
14
14
|
import { getInstalledPackageVersion } from "@pi-unipi/core";
|
|
@@ -39,9 +39,9 @@ function padVisible(content: string, targetWidth: number): string {
|
|
|
39
39
|
*/
|
|
40
40
|
export function renderChangelogOverlay() {
|
|
41
41
|
return (
|
|
42
|
-
tui: import("@
|
|
42
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
43
43
|
theme: Theme,
|
|
44
|
-
_kb: import("@
|
|
44
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
45
45
|
done: (result: { viewed: boolean } | null) => void,
|
|
46
46
|
) => {
|
|
47
47
|
const installedVersion = getInstalledPackageVersion(
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { readFileSync } from "fs";
|
|
10
|
-
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
10
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { discoverReadmes, resolveReadmePath } from "../readme.js";
|
|
13
13
|
import { renderMarkdown } from "../markdown.js";
|
|
14
14
|
import type { ReadmeEntry } from "../../types.js";
|
|
@@ -38,9 +38,9 @@ function padVisible(content: string, targetWidth: number): string {
|
|
|
38
38
|
*/
|
|
39
39
|
export function renderReadmeOverlay(params?: { openDirect?: string }) {
|
|
40
40
|
return (
|
|
41
|
-
tui: import("@
|
|
41
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
42
42
|
theme: Theme,
|
|
43
|
-
_kb: import("@
|
|
43
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
44
44
|
done: (result: { viewed: boolean } | null) => void,
|
|
45
45
|
) => {
|
|
46
46
|
const state: ReadmeState = {
|
|
@@ -42,9 +42,9 @@ function trunc(text: string, width: number): string {
|
|
|
42
42
|
*/
|
|
43
43
|
export function renderSettingsOverlay() {
|
|
44
44
|
return (
|
|
45
|
-
tui: import("@
|
|
46
|
-
_theme: import("@
|
|
47
|
-
_kb: import("@
|
|
45
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
46
|
+
_theme: import("@earendil-works/pi-coding-agent").Theme,
|
|
47
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
48
48
|
done: (result: { saved: boolean } | null) => void,
|
|
49
49
|
) => {
|
|
50
50
|
const state = {
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { join } from "path";
|
|
10
|
-
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@
|
|
11
|
-
import type { Theme } from "@
|
|
10
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
11
|
+
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
12
12
|
import { parseChangelog, getNewerVersions } from "../changelog.js";
|
|
13
13
|
import { renderMarkdown } from "../markdown.js";
|
|
14
14
|
import { installUpdate } from "../installer.js";
|
|
@@ -41,9 +41,9 @@ interface UpdateState {
|
|
|
41
41
|
*/
|
|
42
42
|
export function renderUpdateOverlay(checkResult: UpdateCheckResult) {
|
|
43
43
|
return (
|
|
44
|
-
tui: import("@
|
|
44
|
+
tui: import("@earendil-works/pi-tui").TUI,
|
|
45
45
|
theme: Theme,
|
|
46
|
-
_kb: import("@
|
|
46
|
+
_kb: import("@earendil-works/pi-coding-agent").KeybindingsManager,
|
|
47
47
|
done: (result: { updated: boolean } | null) => void,
|
|
48
48
|
) => {
|
|
49
49
|
const config = loadConfig();
|