github-issue-tower-defence-management 1.184.1 → 1.185.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bin/adapter/entry-points/cli/index.js +31 -29
  3. package/bin/adapter/entry-points/cli/index.js.map +1 -1
  4. package/bin/adapter/entry-points/console/consoleOperationApi.js +26 -2
  5. package/bin/adapter/entry-points/console/consoleOperationApi.js.map +1 -1
  6. package/bin/adapter/entry-points/console/consoleProjectResolver.js +5 -1
  7. package/bin/adapter/entry-points/console/consoleProjectResolver.js.map +1 -1
  8. package/bin/adapter/entry-points/console/ui-dist/assets/index-DQT4HL0G.js +86 -0
  9. package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
  10. package/bin/adapter/entry-points/console/webServer.js +4 -0
  11. package/bin/adapter/entry-points/console/webServer.js.map +1 -1
  12. package/bin/domain/entities/Project.js +17 -0
  13. package/bin/domain/entities/Project.js.map +1 -1
  14. package/bin/domain/usecases/CreateNewStoryByLabelUseCase.js +5 -16
  15. package/bin/domain/usecases/CreateNewStoryByLabelUseCase.js.map +1 -1
  16. package/package.json +1 -1
  17. package/src/adapter/entry-points/cli/index.ts +57 -52
  18. package/src/adapter/entry-points/console/consoleOperationApi.test.ts +242 -12
  19. package/src/adapter/entry-points/console/consoleOperationApi.ts +43 -7
  20. package/src/adapter/entry-points/console/consoleProjectResolver.test.ts +30 -10
  21. package/src/adapter/entry-points/console/consoleProjectResolver.ts +13 -2
  22. package/src/adapter/entry-points/console/ui/e2e/consoleScenario.spec.ts +37 -2
  23. package/src/adapter/entry-points/console/ui/e2e/consoleTestHarness.ts +20 -0
  24. package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleStoryList.stories.tsx +4 -1
  25. package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleStoryList.test.tsx +127 -8
  26. package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleStoryList.tsx +119 -71
  27. package/src/adapter/entry-points/console/ui/src/features/console/lib/consoleApi.test.ts +26 -0
  28. package/src/adapter/entry-points/console/ui/src/features/console/lib/consoleApi.ts +20 -0
  29. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsolePage.tsx +12 -0
  30. package/src/adapter/entry-points/console/ui-dist/assets/index-DQT4HL0G.js +86 -0
  31. package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
  32. package/src/adapter/entry-points/console/webServer.test.ts +74 -0
  33. package/src/adapter/entry-points/console/webServer.ts +8 -0
  34. package/src/domain/entities/Project.ts +23 -0
  35. package/src/domain/usecases/CreateNewStoryByLabelUseCase.ts +16 -34
  36. package/types/adapter/entry-points/cli/index.d.ts +1 -1
  37. package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
  38. package/types/adapter/entry-points/console/consoleOperationApi.d.ts +8 -3
  39. package/types/adapter/entry-points/console/consoleOperationApi.d.ts.map +1 -1
  40. package/types/adapter/entry-points/console/consoleProjectResolver.d.ts +5 -1
  41. package/types/adapter/entry-points/console/consoleProjectResolver.d.ts.map +1 -1
  42. package/types/adapter/entry-points/console/webServer.d.ts +3 -1
  43. package/types/adapter/entry-points/console/webServer.d.ts.map +1 -1
  44. package/types/domain/entities/Project.d.ts +4 -0
  45. package/types/domain/entities/Project.d.ts.map +1 -1
  46. package/types/domain/usecases/CreateNewStoryByLabelUseCase.d.ts +6 -8
  47. package/types/domain/usecases/CreateNewStoryByLabelUseCase.d.ts.map +1 -1
  48. package/bin/adapter/entry-points/console/ui-dist/assets/index-CMrnEYO1.js +0 -86
  49. package/src/adapter/entry-points/console/ui-dist/assets/index-CMrnEYO1.js +0 -86
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>TDPM Console</title>
7
- <script type="module" crossorigin src="/assets/index-CMrnEYO1.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-DQT4HL0G.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-8Ni5iu-C.css">
9
9
  </head>
10
10
  <body>
@@ -1107,6 +1107,80 @@ describe('webServer new routes integration', () => {
1107
1107
  fs.rmSync(tmpDir, { recursive: true, force: true });
1108
1108
  }
1109
1109
  });
1110
+
1111
+ it('routes POST /api/addstory to handleStoryAdd and calls updateStoryList', async () => {
1112
+ const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'console-server-'));
1113
+ const updateStoryList = jest.fn().mockResolvedValue([]);
1114
+ const projectWithStory: Project = {
1115
+ ...mock<Project>(),
1116
+ id: 'PVT_1',
1117
+ url: 'https://github.com/orgs/acme-labs/projects/1',
1118
+ status: {
1119
+ name: 'Status',
1120
+ fieldId: 'statusField',
1121
+ statuses: [
1122
+ {
1123
+ id: 'status_aw',
1124
+ name: 'Awaiting workspace',
1125
+ color: 'GRAY',
1126
+ description: '',
1127
+ },
1128
+ ],
1129
+ },
1130
+ story: {
1131
+ name: 'Story',
1132
+ fieldId: 'storyField',
1133
+ databaseId: 1,
1134
+ stories: [
1135
+ {
1136
+ id: 'opt_blue',
1137
+ name: 'Existing story',
1138
+ color: 'BLUE',
1139
+ description: '',
1140
+ },
1141
+ ],
1142
+ workflowManagementStory: { id: 'wms', name: 'workflow' },
1143
+ },
1144
+ };
1145
+ const issueRepository = mock<IssueRepository>();
1146
+ const server = await startWebServer({
1147
+ accessToken: testToken,
1148
+ uiDistDir: path.join(tmpDir, 'ui-dist'),
1149
+ consoleDataOutputDir: null,
1150
+ inTmuxDataDir: null,
1151
+ dashboardDir: null,
1152
+ dashboardDataDir: null,
1153
+ dashboardProjectNames: [],
1154
+ issueRepository,
1155
+ resolveProject: async (pjcode) =>
1156
+ pjcode === 'acme' ? { pjcode, project: projectWithStory } : null,
1157
+ isPjcodeConfigured: (pjcode) => pjcode === 'acme',
1158
+ resolveProjectRepository: () => ({ updateStoryList }),
1159
+ port: 0,
1160
+ });
1161
+ try {
1162
+ const response = await request(
1163
+ server,
1164
+ 'POST',
1165
+ `/api/addstory?k=${testToken}`,
1166
+ { pjcode: 'acme', storyName: 'My new story' },
1167
+ );
1168
+ expect(response.statusCode).toBe(200);
1169
+ expect(JSON.parse(response.body)).toEqual({ ok: true });
1170
+ expect(updateStoryList).toHaveBeenCalledWith(projectWithStory, [
1171
+ {
1172
+ id: 'opt_blue',
1173
+ name: 'Existing story',
1174
+ color: 'BLUE',
1175
+ description: '',
1176
+ },
1177
+ { id: null, name: 'My new story', color: 'RED', description: '' },
1178
+ ]);
1179
+ } finally {
1180
+ await closeServer(server);
1181
+ fs.rmSync(tmpDir, { recursive: true, force: true });
1182
+ }
1183
+ });
1110
1184
  });
1111
1185
 
1112
1186
  describe('resolveFlatInTmuxFilePath', () => {
@@ -24,7 +24,9 @@ import {
24
24
  ConsoleIssueRepositoryResolver,
25
25
  ConsoleOperationContext,
26
26
  ConsolePjcodeValidator,
27
+ ConsoleProjectRepositoryResolver,
27
28
  ConsoleProjectResolver,
29
+ handleStoryAdd,
28
30
  handleAttachmentUpload,
29
31
  handleComment,
30
32
  handleCreateIssue,
@@ -233,6 +235,8 @@ export type WebServerOptions = {
233
235
  resolveIssueRepository?: ConsoleIssueRepositoryResolver | null;
234
236
  resolveProject?: ConsoleProjectResolver | null;
235
237
  isPjcodeConfigured?: ConsolePjcodeValidator | null;
238
+ resolveProjectRepository?: ConsoleProjectRepositoryResolver | null;
239
+ invalidateProject?: ((pjcode: string) => void) | null;
236
240
  issueAttachmentRepository?: IssueAttachmentRepository | null;
237
241
  projectRepository?: Pick<ProjectRepository, 'updateStoryList'> | null;
238
242
  issueTitleStateCache?: IssueTitleStateCache | null;
@@ -540,6 +544,8 @@ const dispatchOperation = (
540
544
  return handleCreateIssue(context, body);
541
545
  case '/api/reorderstory':
542
546
  return handleReorderStory(context, body);
547
+ case '/api/addstory':
548
+ return handleStoryAdd(context, body);
543
549
  default:
544
550
  return null;
545
551
  }
@@ -574,6 +580,8 @@ const handleOperationApi = async (
574
580
  ? (project, stories) =>
575
581
  projectRepository.updateStoryList(project, stories)
576
582
  : null,
583
+ resolveProjectRepository: options.resolveProjectRepository ?? null,
584
+ invalidateProject: options.invalidateProject ?? null,
577
585
  };
578
586
  const dispatched = dispatchOperation(context, requestPath, body);
579
587
  if (dispatched === null) {
@@ -6,6 +6,29 @@ export type FieldOption = {
6
6
  'GRAY' | 'BLUE' | 'GREEN' | 'YELLOW' | 'ORANGE' | 'RED' | 'PINK' | 'PURPLE';
7
7
  description: string;
8
8
  };
9
+
10
+ export type StoryListEntry = Omit<FieldOption, 'id'> & {
11
+ id: FieldOption['id'] | null;
12
+ };
13
+
14
+ export const buildStoryListWithNew = (
15
+ existingStories: StoryListEntry[],
16
+ newName: string,
17
+ ): StoryListEntry[] => {
18
+ if (existingStories.some((s) => s.name === newName)) {
19
+ return [...existingStories];
20
+ }
21
+ const newEntry: StoryListEntry = {
22
+ id: null,
23
+ name: newName,
24
+ color: 'RED',
25
+ description: '',
26
+ };
27
+ if (existingStories.length === 0) {
28
+ return [newEntry];
29
+ }
30
+ return [existingStories[0], newEntry, ...existingStories.slice(1)];
31
+ };
9
32
  export type Project = {
10
33
  id: string;
11
34
  url: string;
@@ -1,8 +1,12 @@
1
- import { IssueRepository } from './adapter-interfaces/IssueRepository';
2
- import { FieldOption, Project } from '../entities/Project';
3
- import { StoryObjectMap } from '../entities/StoryObjectMap';
4
- import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
5
- import { Issue } from '../entities/Issue';
1
+ import type { Issue } from '../entities/Issue';
2
+ import {
3
+ buildStoryListWithNew,
4
+ type Project,
5
+ type StoryListEntry,
6
+ } from '../entities/Project';
7
+ import type { StoryObjectMap } from '../entities/StoryObjectMap';
8
+ import type { IssueRepository } from './adapter-interfaces/IssueRepository';
9
+ import type { ProjectRepository } from './adapter-interfaces/ProjectRepository';
6
10
 
7
11
  const LOG_PREFIX = '[CreateNewStoryByLabel]';
8
12
 
@@ -130,35 +134,13 @@ export class CreateNewStoryByLabelUseCase {
130
134
  projectStory: NonNullable<Project['story']>,
131
135
  storyObjectMap: StoryObjectMap,
132
136
  issues: Issue[],
133
- ): (Omit<FieldOption, 'id'> & { id: FieldOption['id'] | null })[] => {
134
- const existingStoryNames = new Set(
135
- projectStory.stories.map((story) => story.name),
136
- );
137
- const newStoryIssues = this.findNewStoryIssues(
138
- storyObjectMap,
139
- issues,
140
- ).filter((issue) => !existingStoryNames.has(issue.title));
141
- const newStoryList: (Omit<FieldOption, 'id'> & {
142
- id: FieldOption['id'] | null;
143
- })[] = [];
144
- if (projectStory.stories.length > 0) {
145
- newStoryList.push(projectStory.stories[0]);
146
- }
147
- newStoryList.push(
148
- ...newStoryIssues.map(
149
- (i): Omit<FieldOption, 'id'> & { id: FieldOption['id'] | null } => ({
150
- id: null,
151
- name: i.title,
152
- color: 'RED',
153
- description: '',
154
- }),
155
- ),
156
- );
157
- if (projectStory.stories.length > 1) {
158
- newStoryList.push(
159
- ...projectStory.stories.slice(1, projectStory.stories.length),
137
+ ): StoryListEntry[] => {
138
+ const newStoryIssues = this.findNewStoryIssues(storyObjectMap, issues);
139
+ return [...newStoryIssues]
140
+ .reverse()
141
+ .reduce<StoryListEntry[]>(
142
+ (acc, issue) => buildStoryListWithNew(acc, issue.title),
143
+ [...projectStory.stories],
160
144
  );
161
- }
162
- return newStoryList;
163
145
  };
164
146
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
- export { ConfigFile, loadConfigFile, parseProjectReadmeConfig, mergeConfigs, fetchProjectReadme, } from './projectConfig';
3
+ export { ConfigFile, fetchProjectReadme, loadConfigFile, mergeConfigs, parseProjectReadmeConfig, } from './projectConfig';
4
4
  export declare const program: Command;
5
5
  export declare const reportFatalErrorAndExit: (error: unknown) => void;
6
6
  export declare const runCliProgram: (argv: string[], handleFatalError: (error: unknown) => void) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAkMzB,eAAO,MAAM,OAAO,SAAgB,CAAC;AAoiCrC,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,IAGxD,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EAAE,EACd,kBAAkB,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KACzC,OAAO,CAAC,IAAI,CAMd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAmMzB,eAAO,MAAM,OAAO,SAAgB,CAAC;AAuiCrC,eAAO,MAAM,uBAAuB,GAAI,OAAO,OAAO,KAAG,IAGxD,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EAAE,EACd,kBAAkB,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KACzC,OAAO,CAAC,IAAI,CAMd,CAAC"}
@@ -1,6 +1,7 @@
1
- import { IssueRepository } from '../../../domain/usecases/adapter-interfaces/IssueRepository';
2
- import { IssueAttachmentRepository } from '../../../domain/usecases/adapter-interfaces/IssueAttachmentRepository';
3
- import { FieldOption, Project } from '../../../domain/entities/Project';
1
+ import { type FieldOption, type Project } from '../../../domain/entities/Project';
2
+ import type { IssueAttachmentRepository } from '../../../domain/usecases/adapter-interfaces/IssueAttachmentRepository';
3
+ import type { IssueRepository } from '../../../domain/usecases/adapter-interfaces/IssueRepository';
4
+ import type { ProjectRepository } from '../../../domain/usecases/adapter-interfaces/ProjectRepository';
4
5
  export declare const AWAITING_WORKSPACE_STATUS_NAME = "awaiting workspace";
5
6
  export declare const IN_TMUX_BY_HUMAN_STATUS_NAME = "in tmux by human";
6
7
  export declare const CHORE_LABEL_NAME = "chore";
@@ -11,6 +12,7 @@ export type ConsoleProjectBinding = {
11
12
  export type ConsoleProjectResolver = (pjcode: string) => Promise<ConsoleProjectBinding | null>;
12
13
  export type ConsolePjcodeValidator = (pjcode: string) => boolean;
13
14
  export type ConsoleIssueRepositoryResolver = (issueOrPullRequestUrl: string) => IssueRepository;
15
+ export type ConsoleProjectRepositoryResolver = (projectUrl: string) => Pick<ProjectRepository, 'updateStoryList'>;
14
16
  export type ConsoleOperationContext = {
15
17
  resolveIssueRepository: ConsoleIssueRepositoryResolver;
16
18
  resolveProject: ConsoleProjectResolver;
@@ -18,6 +20,8 @@ export type ConsoleOperationContext = {
18
20
  consoleDataOutputDir: string | null;
19
21
  issueAttachmentRepository: IssueAttachmentRepository | null;
20
22
  updateStoryList: ((project: Project, stories: FieldOption[]) => Promise<FieldOption[]>) | null;
23
+ resolveProjectRepository: ConsoleProjectRepositoryResolver | null;
24
+ invalidateProject: ((pjcode: string) => void) | null;
21
25
  };
22
26
  export type ConsoleOperationResponse = {
23
27
  statusCode: number;
@@ -31,4 +35,5 @@ export declare const handleCreateIssue: (context: ConsoleOperationContext, body:
31
35
  export declare const handleReviewComment: (context: ConsoleOperationContext, body: Record<string, unknown>) => Promise<ConsoleOperationResponse>;
32
36
  export declare const handleIntmux: (context: ConsoleOperationContext, body: Record<string, unknown>) => Promise<ConsoleOperationResponse>;
33
37
  export declare const handleReorderStory: (context: ConsoleOperationContext, body: Record<string, unknown>) => Promise<ConsoleOperationResponse>;
38
+ export declare const handleStoryAdd: (context: ConsoleOperationContext, body: Record<string, unknown>) => Promise<ConsoleOperationResponse>;
34
39
  //# sourceMappingURL=consoleOperationApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conso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,YAAY,GACvB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CAyJlC,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA6FlC,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA8BlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA2ClC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA0DlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CA6BlC,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CAiClC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CAuClC,CAAC"}
1
+ {"version":3,"file":"consoleOperationApi.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleOperationApi.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,OAAO,EACb,MAAM,k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AAC,wBAAwB,CAuClC,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,SAAS,uBAAuB,EAChC,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,wBAAwB,CAqBlC,CAAC"}
@@ -8,5 +8,9 @@ export type ConsoleProjectIdAndProjectReader = {
8
8
  export declare const createConsoleProjectLoader: (resolveProjectRepository: (projectUrl: string) => ConsoleProjectIdAndProjectReader, getCachedProject: (projectId: string) => Promise<Project | null>, reportLoadFailure: (message: string) => void) => ConsoleProjectLoader;
9
9
  export declare const buildPjcodeToProjectUrl: (defaultPjcode: string, defaultProjectUrl: string, consoleProjects: Record<string, string> | null) => Record<string, string>;
10
10
  export declare const createPjcodeConfigChecker: (pjcodeToProjectUrl: Record<string, string>) => ConsolePjcodeValidator;
11
- export declare const createConsoleProjectResolver: (pjcodeToProjectUrl: Record<string, string>, loadProject: ConsoleProjectLoader) => ConsoleProjectResolver;
11
+ export type ConsoleProjectResolverBundle = {
12
+ resolve: ConsoleProjectResolver;
13
+ invalidate: (pjcode: string) => void;
14
+ };
15
+ export declare const createConsoleProjectResolver: (pjcodeToProjectUrl: Record<string, string>, loadProject: ConsoleProjectLoader) => ConsoleProjectResolverBundle;
12
16
  //# sourceMappingURL=consoleProjectResolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consoleProjectResolver.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleProjectResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EACL,sBAAsB,EAEtB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,oBAAoB,GAAG,CACjC,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAE7B,MAAM,MAAM,gCAAgC,GAAG;IAC7C,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CAC5D,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,0BAA0B,CACxB,UAAU,EAAE,MAAM,KACf,gCAAgC,EACrC,kBAAkB,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EAChE,mBAAmB,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAC3C,oBAmBF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,MAAM,EACrB,mBAAmB,MAAM,EACzB,iBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAC7C,MAAM,CAAC,MAAM,EAAE,MAAM,CAWvB,CAAC;AAKF,eAAO,MAAM,yBAAyB,GACpC,oBAAoB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACzC,sBAGF,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,oBAAoB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1C,aAAa,oBAAoB,KAChC,sBAmBF,CAAC"}
1
+ {"version":3,"file":"consoleProjectResolver.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleProjectResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EACL,sBAAsB,EAEtB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,oBAAoB,GAAG,CACjC,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;AAE7B,MAAM,MAAM,gCAAgC,GAAG;IAC7C,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CAC5D,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,0BAA0B,CACxB,UAAU,EAAE,MAAM,KACf,gCAAgC,EACrC,kBAAkB,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EAChE,mBAAmB,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAC3C,oBAmBF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,eAAe,MAAM,EACrB,mBAAmB,MAAM,EACzB,iBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAC7C,MAAM,CAAC,MAAM,EAAE,MAAM,CAWvB,CAAC;AAKF,eAAO,MAAM,yBAAyB,GACpC,oBAAoB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACzC,sBAGF,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,sBAAsB,CAAC;IAChC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,oBAAoB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1C,aAAa,oBAAoB,KAChC,4BAyBF,CAAC"}
@@ -3,7 +3,7 @@ import { IssueAttachmentRepository } from '../../../domain/usecases/adapter-inte
3
3
  import { IssueRepository } from '../../../domain/usecases/adapter-interfaces/IssueRepository';
4
4
  import { ProjectRepository } from '../../../domain/usecases/adapter-interfaces/ProjectRepository';
5
5
  import { IssueTitleStateCache, PullRequestStatusCache } from './consoleReadApi';
6
- import { ConsoleIssueRepositoryResolver, ConsolePjcodeValidator, ConsoleProjectResolver } from './consoleOperationApi';
6
+ import { ConsoleIssueRepositoryResolver, ConsolePjcodeValidator, ConsoleProjectRepositoryResolver, ConsoleProjectResolver } from './consoleOperationApi';
7
7
  import { ImageFetcher } from './consoleImageProxy';
8
8
  import { ConsoleGithubTokenResolver } from './consoleGithubTokenResolver';
9
9
  export declare const DEFAULT_WEB_PORT = 9980;
@@ -32,6 +32,8 @@ export type WebServerOptions = {
32
32
  resolveIssueRepository?: ConsoleIssueRepositoryResolver | null;
33
33
  resolveProject?: ConsoleProjectResolver | null;
34
34
  isPjcodeConfigured?: ConsolePjcodeValidator | null;
35
+ resolveProjectRepository?: ConsoleProjectRepositoryResolver | null;
36
+ invalidateProject?: ((pjcode: string) => void) | null;
35
37
  issueAttachmentRepository?: IssueAttachmentRepository | null;
36
38
  projectRepository?: Pick<ProjectRepository, 'updateStoryList'> | null;
37
39
  issueTitleStateCache?: IssueTitleStateCache | null;
@@ -1 +1 @@
1
- {"version":3,"file":"webServer.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/webServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAC;AAClH,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAC;AAMlG,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EAQvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,8BAA8B,EAE9B,sBAAsB,EACtB,sBAAsB,EASvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AACtE,OAAO,EACL,0BAA0B,EAE3B,MAAM,8BAA8B,CAAC;AAUtC,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAoC/C,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,OAGiB,CAAC;AAEtE,eAAO,MAAM,aAAa,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AAG,IAWX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,aAAa,MAAM,KAAG,OAEI,CAAC;AAEtE,eAAO,MAAM,yBAAyB,GACpC,eAAe,MAAM,EACrB,aAAa,MAAM,KAClB,MAAM,GAAG,IAoBX,CAAC;AA2bF,eAAO,MAAM,uBAAuB,GAClC,SAAS,gBAAgB,EACzB,aAAa,MAAM,KAClB,MAAM,GAAG,IAeX,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,SAAS,gBAAgB,EACzB,SAAS,IAAI,CAAC,eAAe,EAC7B,UAAU,IAAI,CAAC,cAAc,KAC5B,OAAO,CAAC,IAAI,CA8Ed,CAAC;AAcF,eAAO,MAAM,eAAe,GAAI,SAAS,gBAAgB,KAAG,IAAI,CAAC,MAM7D,CAAC;AAEL,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,SAAS,qBAAqB,KAC7B,OAAO,CAAC,IAAI,CAAC,MAAM,CAQlB,CAAC"}
@@ -5,6 +5,10 @@ export type FieldOption = {
5
5
  color: 'GRAY' | 'BLUE' | 'GREEN' | 'YELLOW' | 'ORANGE' | 'RED' | 'PINK' | 'PURPLE';
6
6
  description: string;
7
7
  };
8
+ export type StoryListEntry = Omit<FieldOption, 'id'> & {
9
+ id: FieldOption['id'] | null;
10
+ };
11
+ export declare const buildStoryListWithNew: (existingStories: StoryListEntry[], newName: string) => StoryListEntry[];
8
12
  export type Project = {
9
13
  id: string;
10
14
  url: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Project.d.ts","sourceRoot":"","sources":["../../../src/domain/entities/Project.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AACtC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EACH,MAAM,GAA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;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,WAAW,EAAE,CAAC;QACvB,uBAAuB,EAAE;YACvB,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;KACH,GAAG,IAAI,CAAC;IACT,0BAA0B,EAAE;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,IAAI,CAAC;IACT,gCAAgC,EAAE;QAChC,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,IAAI,CAAC;IACT,iCAAiC,EAAE;QACjC,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,IAAI,CAAC;IACT,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,WAAW,EAAE,CAAC;KACxB,GAAG,IAAI,CAAC;CACV,CAAC"}
@@ -1,8 +1,8 @@
1
- import { IssueRepository } from './adapter-interfaces/IssueRepository';
2
- import { FieldOption, Project } from '../entities/Project';
3
- import { StoryObjectMap } from '../entities/StoryObjectMap';
4
- import { ProjectRepository } from './adapter-interfaces/ProjectRepository';
5
- import { Issue } from '../entities/Issue';
1
+ import type { Issue } from '../entities/Issue';
2
+ import { type Project, type StoryListEntry } from '../entities/Project';
3
+ import type { StoryObjectMap } from '../entities/StoryObjectMap';
4
+ import type { IssueRepository } from './adapter-interfaces/IssueRepository';
5
+ import type { ProjectRepository } from './adapter-interfaces/ProjectRepository';
6
6
  export declare class CreateNewStoryByLabelUseCase {
7
7
  readonly projectRepository: Pick<ProjectRepository, 'updateStoryList'>;
8
8
  readonly issueRepository: Pick<IssueRepository, 'updateLabels' | 'updateStory'>;
@@ -17,8 +17,6 @@ export declare class CreateNewStoryByLabelUseCase {
17
17
  }) => Promise<void>;
18
18
  hasNewStoryLabel: (issue: Issue) => boolean;
19
19
  findNewStoryIssues: (storyObjectMap: StoryObjectMap, issues: Issue[]) => Issue[];
20
- createNewStoryList: (projectStory: NonNullable<Project["story"]>, storyObjectMap: StoryObjectMap, issues: Issue[]) => (Omit<FieldOption, "id"> & {
21
- id: FieldOption["id"] | null;
22
- })[];
20
+ createNewStoryList: (projectStory: NonNullable<Project["story"]>, storyObjectMap: StoryObjectMap, issues: Issue[]) => StoryListEntry[];
23
21
  }
24
22
  //# sourceMappingURL=CreateNewStoryByLabelUseCase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateNewStoryByLabelUseCase.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/CreateNewStoryByLabelUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,qBAAa,4BAA4B;IAErC,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACtE,QAAQ,CAAC,eAAe,EAAE,IAAI,CAC5B,eAAe,EACf,cAAc,GAAG,aAAa,CAC/B;gBAJQ,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EAC7D,eAAe,EAAE,IAAI,CAC5B,eAAe,EACf,cAAc,GAAG,aAAa,CAC/B;IAGH,GAAG,GAAU,OAAO;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,cAAc,CAAC;QAC/B,MAAM,EAAE,KAAK,EAA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