@auto-engineer/server-generator-apollo-emmett 1.43.0 → 1.45.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.
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +4 -4
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +30 -0
- package/dist/src/commands/generate-server.d.ts.map +1 -1
- package/dist/src/commands/generate-server.js +7 -1
- package/dist/src/commands/generate-server.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/commands/generate-server.ts +8 -1
package/package.json
CHANGED
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"uuid": "^11.0.0",
|
|
33
33
|
"web-streams-polyfill": "^4.1.0",
|
|
34
34
|
"zod": "^3.22.4",
|
|
35
|
-
"@auto-engineer/
|
|
36
|
-
"@auto-engineer/
|
|
35
|
+
"@auto-engineer/narrative": "1.45.0",
|
|
36
|
+
"@auto-engineer/message-bus": "1.45.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"typescript": "^5.8.3",
|
|
45
45
|
"vitest": "^3.2.4",
|
|
46
46
|
"tsx": "^4.19.2",
|
|
47
|
-
"@auto-engineer/cli": "1.
|
|
47
|
+
"@auto-engineer/cli": "1.45.0"
|
|
48
48
|
},
|
|
49
|
-
"version": "1.
|
|
49
|
+
"version": "1.45.0",
|
|
50
50
|
"scripts": {
|
|
51
51
|
"generate:server": "tsx src/cli/index.ts",
|
|
52
52
|
"build": "tsc && tsx ../../scripts/fix-esm-imports.ts && rm -rf dist/src/codegen/templates && mkdir -p dist/src/codegen && cp -r src/codegen/templates dist/src/codegen/templates && cp src/server.ts dist/src && cp -r src/utils dist/src && cp -r src/domain dist/src",
|
|
@@ -272,14 +272,20 @@ function createServerSuccessEvent(
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
function stripAnsiCodes(text: string): string {
|
|
276
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: intentionally matching ANSI escape sequences
|
|
277
|
+
return text.replace(/\x1B\[[0-9;]*m/g, '');
|
|
278
|
+
}
|
|
279
|
+
|
|
275
280
|
function createServerFailureEvent(command: GenerateServerCommand, error: unknown): ServerGenerationFailedEvent {
|
|
276
281
|
debug('Server generation failed with error: %O', error);
|
|
282
|
+
const errorMessage = error instanceof Error ? stripAnsiCodes(error.message) : 'Unknown error occurred';
|
|
277
283
|
return {
|
|
278
284
|
type: 'ServerGenerationFailed',
|
|
279
285
|
data: {
|
|
280
286
|
modelPath: deriveModelPath(command.data.destination),
|
|
281
287
|
destination: command.data.destination,
|
|
282
|
-
error:
|
|
288
|
+
error: errorMessage,
|
|
283
289
|
},
|
|
284
290
|
timestamp: new Date(),
|
|
285
291
|
requestId: command.requestId,
|
|
@@ -307,6 +313,7 @@ export function createSliceGeneratedEvent(
|
|
|
307
313
|
};
|
|
308
314
|
}
|
|
309
315
|
|
|
316
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: nested iteration over model structure is inherent to the task
|
|
310
317
|
export function emitSliceGeneratedForAll(
|
|
311
318
|
spec: Model,
|
|
312
319
|
command: GenerateServerCommand,
|