@emeryld/manager 1.4.15 → 1.5.0
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.
|
@@ -110,12 +110,28 @@ function formatInteractiveLines(state, selectedIndex, title, searchState) {
|
|
|
110
110
|
return lines;
|
|
111
111
|
}
|
|
112
112
|
function renderInteractiveList(lines, previousLineCount) {
|
|
113
|
+
const columns = process.stdout.columns ?? 80;
|
|
114
|
+
const ansiRegex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
|
|
115
|
+
const visibleLength = (text) => {
|
|
116
|
+
const clean = text.replace(ansiRegex, '');
|
|
117
|
+
let length = 0;
|
|
118
|
+
for (const ch of clean) {
|
|
119
|
+
const code = ch.codePointAt(0) ?? 0;
|
|
120
|
+
length += code > 0xffff ? 2 : 1;
|
|
121
|
+
}
|
|
122
|
+
return length;
|
|
123
|
+
};
|
|
124
|
+
const nextLineCount = lines.reduce((total, line) => {
|
|
125
|
+
const len = visibleLength(line);
|
|
126
|
+
const wrapped = Math.max(1, Math.ceil(len / columns));
|
|
127
|
+
return total + wrapped;
|
|
128
|
+
}, 0);
|
|
113
129
|
if (previousLineCount > 0) {
|
|
114
130
|
process.stdout.write(`\x1b[${previousLineCount}A`);
|
|
115
131
|
process.stdout.write('\x1b[0J');
|
|
116
132
|
}
|
|
117
133
|
lines.forEach((line) => console.log(line));
|
|
118
|
-
return
|
|
134
|
+
return nextLineCount;
|
|
119
135
|
}
|
|
120
136
|
export async function promptForScript(entries, title) {
|
|
121
137
|
const supportsRawMode = typeof input.setRawMode === 'function' && input.isTTY;
|
|
@@ -122,11 +122,6 @@ export function mergeManifestEntries(rootDir, inferred, overrides) {
|
|
|
122
122
|
merged.push({ ...baseEntry, path: normalized });
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
normalizedOverrides.forEach((entry) => {
|
|
126
|
-
const name = entry.name || path.basename(entry.path) || 'package';
|
|
127
|
-
const color = entry.color ?? colorFromSeed(name);
|
|
128
|
-
merged.push({ name, path: entry.path, color });
|
|
129
|
-
});
|
|
130
125
|
return merged;
|
|
131
126
|
}
|
|
132
127
|
export function colorFromSeed(seed) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emeryld/manager",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Interactive manager for pnpm monorepos (update/test/build/publish).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"semver": "^7.7.
|
|
26
|
+
"semver": "^7.7.4",
|
|
27
27
|
"ts-morph": "^27.0.2",
|
|
28
|
-
"ts-node": "^10.9.
|
|
29
|
-
"typescript": "^5.3
|
|
28
|
+
"ts-node": "^10.9.2",
|
|
29
|
+
"typescript": "^5.9.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^20.
|
|
32
|
+
"@types/node": "^20.19.33",
|
|
33
33
|
"@types/semver": "^7.7.1",
|
|
34
34
|
"cross-env": "^7.0.3"
|
|
35
35
|
},
|