@emeryld/manager 0.7.1 → 0.7.2

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.
@@ -58,10 +58,7 @@ function formatInteractiveLines(state, selectedIndex, title, searchState) {
58
58
  const lines = [heading];
59
59
  if (searchState?.active) {
60
60
  const queryLabel = searchState.query || '(type to filter)';
61
- const statusLabel = searchState.hasResults
62
- ? '(enter to run top match)'
63
- : '(no matches yet)';
64
- lines.push(colors.dim(`Search: ${queryLabel} ${statusLabel}`));
61
+ lines.push(colors.dim(`Search: ${queryLabel}`));
65
62
  }
66
63
  state.options.forEach((option, index) => {
67
64
  const isSelected = index === selectedIndex;
@@ -78,7 +75,7 @@ function formatInteractiveLines(state, selectedIndex, title, searchState) {
78
75
  : option.entry.displayName;
79
76
  const runHint = searchState?.active &&
80
77
  searchState.hasResults &&
81
- index === 0
78
+ index === selectedIndex
82
79
  ? colors.dim(' (enter to run)')
83
80
  : '';
84
81
  lines.push(`${pointer}${numberLabel}. ${option.entry.emoji} ${label} ${colors.dim(option.entry.metaLabel)}${runHint}`);
@@ -1,14 +1,15 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { existsSync } from 'node:fs';
3
3
  import path from 'node:path';
4
- import { colors } from './colors.js';
5
4
  import { managerRoot, rootDir } from './env.js';
6
5
  import { buildTsNodeRegisterImport } from './ts-node.js';
7
6
  export function runEntry(entry, forwardedArgs) {
8
7
  const detail = entry.script
9
8
  ? path.relative(rootDir, entry.absoluteScript ?? entry.script)
10
9
  : (entry.metaLabel ?? '[callback]');
11
- console.log(`${entry.emoji} ${colors.green(`Running "${entry.displayName}"`)} ${colors.dim(detail)}`);
10
+ // console.log(
11
+ // `${entry.emoji} ${colors.green(`Running "${entry.displayName}"`)} ${colors.dim(detail)}`,
12
+ // )
12
13
  if (entry.handler) {
13
14
  return Promise.resolve(entry.handler({ args: forwardedArgs, entry, rootDir }));
14
15
  }
package/dist/menu.js CHANGED
@@ -145,7 +145,7 @@ export function buildPackageSelectionMenu(packages, onStepComplete) {
145
145
  const ordered = getOrderedPackages(packages);
146
146
  const entries = ordered.map((pkg) => {
147
147
  const marker = getPackageMarker(pkg);
148
- const primaryName = pkg.name ?? pkg.substitute ?? pkg.dirName;
148
+ const primaryName = pkg.name ?? pkg.dirName;
149
149
  const packageColorizer = colors[pkg.color ?? 'cyan'] ?? colors.cyan;
150
150
  const highlightedName = packageColorizer(primaryName);
151
151
  const tagParts = [];
@@ -161,10 +161,6 @@ export function buildPackageSelectionMenu(packages, onStepComplete) {
161
161
  if (pkg.version) {
162
162
  addTag(`v${pkg.version}`, colors.yellow);
163
163
  }
164
- if (pkg.substitute && pkg.substitute !== primaryName) {
165
- const aliasTag = pkg.name ? `alias:${pkg.substitute}` : pkg.substitute;
166
- addTag(aliasTag, colors.magenta);
167
- }
168
164
  if (pkg.dockerfilePath) {
169
165
  addTag('docker', colors.green);
170
166
  }
@@ -125,17 +125,6 @@ export function colorFromSeed(seed) {
125
125
  }
126
126
  return DEFAULT_COLOR_PALETTE[hash % DEFAULT_COLOR_PALETTE.length];
127
127
  }
128
- export function deriveSubstitute(name) {
129
- const trimmed = (name || '').trim();
130
- if (!trimmed)
131
- return '';
132
- const segments = trimmed.split(/[@\/\-]/).filter(Boolean);
133
- const transformed = segments
134
- .map((segment) => segment)
135
- .filter(Boolean)
136
- .join(' ');
137
- return transformed || trimmed;
138
- }
139
128
  function isManifestMissing(error) {
140
129
  if (typeof error !== 'object' || error === null)
141
130
  return false;
package/dist/packages.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/packages.js
2
2
  import path from 'node:path';
3
3
  import { readFile, stat } from 'node:fs/promises';
4
- import { colorFromSeed, deriveSubstitute, inferManifestFromWorkspace, loadWorkspaceManifest, mergeManifestEntries, normalizeManifestPath, } from './packages/manifest-utils.js';
4
+ import { colorFromSeed, inferManifestFromWorkspace, loadWorkspaceManifest, mergeManifestEntries, normalizeManifestPath, } from './packages/manifest-utils.js';
5
5
  const rootDir = process.cwd();
6
6
  let manifestState;
7
7
  async function ensureManifestState(forceReload = false) {
@@ -35,7 +35,6 @@ export async function loadPackages() {
35
35
  const relativePath = normalizeManifestPath(path.relative(rootDir, pkgDir));
36
36
  const meta = byPath.get(relativePath.toLowerCase()) ??
37
37
  byName.get((pkgName ?? '').toLowerCase());
38
- const substitute = meta?.substitute ?? deriveSubstitute(pkgName) ?? path.basename(pkgDir);
39
38
  const color = (meta?.color ?? colorFromSeed(pkgName));
40
39
  let dockerfilePath;
41
40
  try {
@@ -55,7 +54,6 @@ export async function loadPackages() {
55
54
  json,
56
55
  version: json.version,
57
56
  name: pkgName ?? path.basename(pkgDir),
58
- substitute,
59
57
  color,
60
58
  dockerfilePath,
61
59
  });
@@ -74,10 +72,9 @@ export function resolvePackage(packages, key) {
74
72
  const dirMatch = pkg.dirName.toLowerCase() === normalized;
75
73
  const pathMatch = pkg.relativeDir.toLowerCase() === normalized;
76
74
  const nameMatch = (pkg.name ?? '').toLowerCase() === normalized;
77
- const aliasMatch = (pkg.substitute ?? '').toLowerCase() === normalized;
78
75
  const fuzzyMatch = (pkg.name ?? '').toLowerCase().includes(normalized) ||
79
76
  pkg.relativeDir.toLowerCase().includes(normalized);
80
- return dirMatch || pathMatch || nameMatch || aliasMatch || fuzzyMatch;
77
+ return dirMatch || pathMatch || nameMatch || fuzzyMatch;
81
78
  });
82
79
  }
83
80
  /**
package/dist/utils/log.js CHANGED
@@ -3,14 +3,13 @@ import { colors } from './colors.js';
3
3
  export const defaultPackageColor = 'cyan';
4
4
  export const globalEmoji = '🚀';
5
5
  export const formatPkgName = (pkg) => {
6
- const primary = pkg.substitute;
7
6
  const displayName = pkg.name ?? pkg.dirName;
8
7
  const fileLabel = pkg.relativeDir || pkg.dirName;
9
8
  const colorizer = colors[pkg.color ?? defaultPackageColor];
10
- return `${colorizer(colors.bold(primary))} ${colors.dim(`(${displayName}) [${fileLabel}]`)}`;
9
+ return `${colorizer(colors.bold(displayName))} ${colors.dim(`[${fileLabel}]`)}`;
11
10
  };
12
11
  export const logPkg = (pkg, message, colorizer = colors.cyan) => {
13
- const label = colors[pkg.color ?? defaultPackageColor](pkg.substitute);
12
+ const label = colors[pkg.color ?? defaultPackageColor](pkg.name ?? pkg.dirName);
14
13
  console.log(`${label} ${colorizer(message)}`);
15
14
  };
16
15
  export const logGlobal = (message, colorizer = colors.magenta) => {
package/dist/workspace.js CHANGED
@@ -42,7 +42,7 @@ function findPackageForPath(p, targets) {
42
42
  });
43
43
  }
44
44
  function formatPkgLabel(pkg) {
45
- return pkg.substitute ?? pkg.name ?? pkg.dirName;
45
+ return pkg.name ?? pkg.dirName;
46
46
  }
47
47
  function logDependencyChanges(paths, targets) {
48
48
  if (paths.length === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeryld/manager",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Interactive manager for pnpm monorepos (update/test/build/publish).",
5
5
  "license": "MIT",
6
6
  "type": "module",