create-auto-app 1.15.0 → 1.17.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-auto-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Create Auto Engineer apps with no configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"fs-extra": "^11.2.0",
|
|
34
34
|
"inquirer": "^9.2.15",
|
|
35
35
|
"ora": "^8.0.1",
|
|
36
|
-
"@auto-engineer/id": "1.
|
|
36
|
+
"@auto-engineer/id": "1.17.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -822,6 +822,18 @@ export const plugins = [
|
|
|
822
822
|
];
|
|
823
823
|
|
|
824
824
|
export const pipeline = define('kanban-todo')
|
|
825
|
+
.on('PipelineStarted')
|
|
826
|
+
.emit('StartServer', () => ({
|
|
827
|
+
serverDirectory: resolvePath('./server'),
|
|
828
|
+
}))
|
|
829
|
+
.emit('StartClient', () => ({
|
|
830
|
+
clientDirectory: resolvePath('./client'),
|
|
831
|
+
command: 'pnpm dev',
|
|
832
|
+
}))
|
|
833
|
+
.emit('StartStorybook', () => ({
|
|
834
|
+
storybookDirectory: resolvePath('./client'),
|
|
835
|
+
}))
|
|
836
|
+
|
|
825
837
|
.on('SchemaExported')
|
|
826
838
|
.emit('DetectChanges', (e: { data: SchemaExportedData }) => {
|
|
827
839
|
projectRoot = e.data.directory;
|
|
@@ -903,21 +915,6 @@ export const pipeline = define('kanban-todo')
|
|
|
903
915
|
outputDir: resolvePath('./.context'),
|
|
904
916
|
};
|
|
905
917
|
})
|
|
906
|
-
.emit('StartServer', () => ({
|
|
907
|
-
serverDirectory: resolvePath('./server'),
|
|
908
|
-
}))
|
|
909
|
-
|
|
910
|
-
.on('ReactClientGenerated')
|
|
911
|
-
.emit('StartClient', (e: { data: { targetDir: string } }) => ({
|
|
912
|
-
clientDirectory: e.data.targetDir,
|
|
913
|
-
command: 'pnpm dev',
|
|
914
|
-
}))
|
|
915
|
-
.emit('StartStorybook', (e: { data: { targetDir: string } }) => ({
|
|
916
|
-
storybookDirectory: e.data.targetDir,
|
|
917
|
-
}))
|
|
918
|
-
|
|
919
|
-
.on('StorybookStarted')
|
|
920
|
-
.emit('TriggerJobGraph', () => ({}))
|
|
921
918
|
|
|
922
919
|
.on('IAValidationFailed')
|
|
923
920
|
.emit('GenerateIA', (e: { data: IAValidationFailedData }) => {
|
|
@@ -1022,4 +1019,7 @@ export default {
|
|
|
1022
1019
|
plugins,
|
|
1023
1020
|
pipeline,
|
|
1024
1021
|
COMMANDS,
|
|
1022
|
+
tunnel: {
|
|
1023
|
+
enabled: false,
|
|
1024
|
+
},
|
|
1025
1025
|
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { Event } from '@auto-engineer/message-bus';
|
|
2
|
-
import type { SettledHandlerDescriptor } from '@auto-engineer/pipeline/src/core/descriptors';
|
|
3
|
-
import { describe, expect, it, beforeEach } from 'vitest';
|
|
4
|
-
import { pipeline, resetState } from './auto.config';
|
|
5
|
-
|
|
6
|
-
function getSettledHandler(): SettledHandlerDescriptor {
|
|
7
|
-
const handler = pipeline.descriptor.handlers.find((h) => h.type === 'settled');
|
|
8
|
-
return handler as SettledHandlerDescriptor;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function makeFailingCheckEvents(slicePath: string): Record<string, Event[]> {
|
|
12
|
-
return {
|
|
13
|
-
CheckTests: [{ type: 'TestsCheckFailed', data: { targetDirectory: slicePath, errors: 'test failed' } }],
|
|
14
|
-
CheckTypes: [{ type: 'TypeCheckFailed', data: { targetDirectory: slicePath, errors: 'type error' } }],
|
|
15
|
-
CheckLint: [{ type: 'LintCheckPassed', data: { targetDirectory: slicePath } }],
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
describe('settled handler retry logic', () => {
|
|
20
|
-
beforeEach(() => {
|
|
21
|
-
resetState();
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('should not retry after max retries even when handler is called again for same slice', () => {
|
|
25
|
-
const settled = getSettledHandler();
|
|
26
|
-
const slicePath = '/some/slice/path';
|
|
27
|
-
const events = makeFailingCheckEvents(slicePath);
|
|
28
|
-
const dispatched: Array<{ type: string; data: unknown }> = [];
|
|
29
|
-
const send = (type: string, data: unknown) => dispatched.push({ type, data });
|
|
30
|
-
|
|
31
|
-
for (let i = 0; i < 4; i++) {
|
|
32
|
-
settled.handler(events, send);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
expect(dispatched).toHaveLength(4);
|
|
36
|
-
|
|
37
|
-
dispatched.length = 0;
|
|
38
|
-
settled.handler(events, send);
|
|
39
|
-
|
|
40
|
-
expect(dispatched).toHaveLength(0);
|
|
41
|
-
|
|
42
|
-
dispatched.length = 0;
|
|
43
|
-
settled.handler(events, send);
|
|
44
|
-
|
|
45
|
-
expect(dispatched).toHaveLength(0);
|
|
46
|
-
});
|
|
47
|
-
});
|