@emeryld/manager 0.4.4 → 0.4.5
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.
|
@@ -201,7 +201,7 @@ function formatVariantLines(variants, selected) {
|
|
|
201
201
|
lines.push(`${pointer}${numberLabel}. ${label} ${meta}`);
|
|
202
202
|
});
|
|
203
203
|
lines.push('');
|
|
204
|
-
lines.push(colors.dim('Use ↑/↓ (or j/k) to move, digits (1-9,0 for 10) to
|
|
204
|
+
lines.push(colors.dim('Use ↑/↓ (or j/k) to move, digits (1-9,0 for 10) to run instantly, Enter to confirm, Esc/Ctrl+C to exit.'));
|
|
205
205
|
return lines;
|
|
206
206
|
}
|
|
207
207
|
function renderInteractiveList(lines, previousLineCount) {
|
|
@@ -281,7 +281,7 @@ async function promptForVariant() {
|
|
|
281
281
|
render();
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
if (
|
|
284
|
+
if (buffer.length === 1 && (buffer[0] === 0x0d || buffer[0] === 0x0a)) {
|
|
285
285
|
commitSelection(VARIANTS[selectedIndex]);
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
@@ -307,8 +307,8 @@ async function promptForTargetDir(fallback) {
|
|
|
307
307
|
return path.resolve(workspaceRoot, normalized);
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
310
|
+
* Solution #1: always build the workspace dependency graph after install.
|
|
311
|
+
* This prevents workspace-unbuilt dist/types issues for workspace:* deps.
|
|
312
312
|
*/
|
|
313
313
|
async function postCreateTasks(targetDir, options) {
|
|
314
314
|
if (options?.skipInstall) {
|
|
@@ -327,8 +327,7 @@ async function postCreateTasks(targetDir, options) {
|
|
|
327
327
|
logGlobal('Skipping build (flag).', colors.dim);
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
// Prefer
|
|
331
|
-
// fall back to building the whole workspace, then fall back to old behavior.
|
|
330
|
+
// Prefer: build deps of the new package (pkg + its workspace deps)
|
|
332
331
|
try {
|
|
333
332
|
if (options?.pkgName) {
|
|
334
333
|
logGlobal(`Building workspace deps for ${options.pkgName}…`, colors.cyan);
|
|
@@ -339,6 +338,7 @@ async function postCreateTasks(targetDir, options) {
|
|
|
339
338
|
catch (error) {
|
|
340
339
|
logGlobal(`Filtered workspace build failed; will try full workspace build: ${error instanceof Error ? error.message : String(error)}`, colors.yellow);
|
|
341
340
|
}
|
|
341
|
+
// Fallback: build everything
|
|
342
342
|
try {
|
|
343
343
|
logGlobal('Building full workspace…', colors.cyan);
|
|
344
344
|
await runCommand('pnpm', ['-r', 'build'], workspaceRoot);
|
|
@@ -347,7 +347,7 @@ async function postCreateTasks(targetDir, options) {
|
|
|
347
347
|
catch (error) {
|
|
348
348
|
logGlobal(`Full workspace build failed; falling back to building only the new package: ${error instanceof Error ? error.message : String(error)}`, colors.yellow);
|
|
349
349
|
}
|
|
350
|
-
//
|
|
350
|
+
// Final fallback (old behavior): build only the new package if it has a build script
|
|
351
351
|
try {
|
|
352
352
|
const pkgJsonPath = path.join(targetDir, 'package.json');
|
|
353
353
|
const pkgRaw = await readFile(pkgJsonPath, 'utf8');
|
|
@@ -10,9 +10,22 @@ const CONTRACT_SCRIPTS = [
|
|
|
10
10
|
'clean',
|
|
11
11
|
'test',
|
|
12
12
|
];
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* IMPORTANT:
|
|
15
|
+
* @emeryld/rrroutes-contract appears to ship types that may not expose these as named exports
|
|
16
|
+
* in some module shapes (CJS export= or default export). To make scaffolds compile reliably,
|
|
17
|
+
* we import as a namespace and then grab from either `default` or the namespace object.
|
|
18
|
+
*/
|
|
19
|
+
export const CONTRACT_TS = `import * as rrroutesContract from '@emeryld/rrroutes-contract'
|
|
14
20
|
import { z } from 'zod'
|
|
15
21
|
|
|
22
|
+
const api = (rrroutesContract as any).default ?? rrroutesContract
|
|
23
|
+
const { defineSocketEvents, finalize, resource } = api as {
|
|
24
|
+
defineSocketEvents: (...args: any[]) => any
|
|
25
|
+
finalize: (...args: any[]) => any
|
|
26
|
+
resource: (...args: any[]) => any
|
|
27
|
+
}
|
|
28
|
+
|
|
16
29
|
const routes = resource('/api')
|
|
17
30
|
.sub(
|
|
18
31
|
resource('health')
|
|
@@ -90,8 +103,10 @@ function contractPackageJson(name) {
|
|
|
90
103
|
import: './dist/index.js',
|
|
91
104
|
},
|
|
92
105
|
},
|
|
93
|
-
// ✅
|
|
106
|
+
// ✅ Solution #2: dev continuously emits dist/*.js + dist/*.d.ts
|
|
94
107
|
scripts: baseScripts('tsc -p tsconfig.json --watch --preserveWatchOutput'),
|
|
108
|
+
// You can keep this pinned if you want, but the import strategy above prevents breakage
|
|
109
|
+
// across different module export shapes.
|
|
95
110
|
dependencies: {
|
|
96
111
|
'@emeryld/rrroutes-contract': '^2.5.2',
|
|
97
112
|
zod: '^4.2.1',
|