github-issue-tower-defence-management 1.94.3 → 1.95.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 (37) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bin/adapter/entry-points/cli/index.js +1 -0
  3. package/bin/adapter/entry-points/cli/index.js.map +1 -1
  4. package/bin/adapter/entry-points/console/consoleImageProxy.js +79 -0
  5. package/bin/adapter/entry-points/console/consoleImageProxy.js.map +1 -0
  6. package/bin/adapter/entry-points/console/consoleServer.js +29 -1
  7. package/bin/adapter/entry-points/console/consoleServer.js.map +1 -1
  8. package/bin/adapter/entry-points/console/ui-dist/assets/index-BeJzGnfH.js +101 -0
  9. package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
  10. package/package.json +1 -1
  11. package/src/adapter/entry-points/cli/index.ts +1 -0
  12. package/src/adapter/entry-points/console/consoleImageProxy.test.ts +140 -0
  13. package/src/adapter/entry-points/console/consoleImageProxy.ts +111 -0
  14. package/src/adapter/entry-points/console/consoleServer.test.ts +182 -0
  15. package/src/adapter/entry-points/console/consoleServer.ts +45 -0
  16. package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMarkdownContent.stories.tsx +10 -0
  17. package/src/adapter/entry-points/console/ui/src/features/console/components/content/ConsoleMarkdownContent.tsx +23 -3
  18. package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleCommentList.tsx +7 -1
  19. package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.tsx +9 -1
  20. package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsolePullRequestDetail.tsx +7 -1
  21. package/src/adapter/entry-points/console/ui/src/features/console/components/layout/ConsoleTabList.stories.tsx +14 -0
  22. package/src/adapter/entry-points/console/ui/src/features/console/lib/imageProxy.test.ts +78 -0
  23. package/src/adapter/entry-points/console/ui/src/features/console/lib/imageProxy.ts +41 -0
  24. package/src/adapter/entry-points/console/ui/src/features/console/logic/tabAdvance.test.ts +48 -0
  25. package/src/adapter/entry-points/console/ui/src/features/console/logic/tabAdvance.ts +19 -0
  26. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsoleItemDetailContainer.tsx +9 -0
  27. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsolePage.test.tsx +39 -4
  28. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsolePage.tsx +29 -1
  29. package/src/adapter/entry-points/console/ui/src/features/console/testing/fixtures.ts +11 -0
  30. package/src/adapter/entry-points/console/ui-dist/assets/index-BeJzGnfH.js +101 -0
  31. package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
  32. package/types/adapter/entry-points/console/consoleImageProxy.d.ts +19 -0
  33. package/types/adapter/entry-points/console/consoleImageProxy.d.ts.map +1 -0
  34. package/types/adapter/entry-points/console/consoleServer.d.ts +4 -0
  35. package/types/adapter/entry-points/console/consoleServer.d.ts.map +1 -1
  36. package/bin/adapter/entry-points/console/ui-dist/assets/index-eSyo3r3C.js +0 -101
  37. package/src/adapter/entry-points/console/ui-dist/assets/index-eSyo3r3C.js +0 -101
@@ -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-eSyo3r3C.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-BeJzGnfH.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-CO3Vvzqr.css">
9
9
  </head>
10
10
  <body>
@@ -0,0 +1,19 @@
1
+ export declare const isAllowedImageUrl: (url: string) => boolean;
2
+ export type ProxiedImageSuccess = {
3
+ ok: true;
4
+ contentType: string;
5
+ body: Buffer;
6
+ };
7
+ export type ProxiedImageFailure = {
8
+ ok: false;
9
+ statusCode: number;
10
+ error: string;
11
+ };
12
+ export type ProxiedImageResult = ProxiedImageSuccess | ProxiedImageFailure;
13
+ export type ImageFetcher = (url: string, headers: Record<string, string>) => Promise<{
14
+ status: number;
15
+ contentType: string | null;
16
+ body: Buffer;
17
+ }>;
18
+ export declare const fetchProxiedImage: (url: string, githubToken: string, fetcher?: ImageFetcher) => Promise<ProxiedImageResult>;
19
+ //# sourceMappingURL=consoleImageProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consoleImageProxy.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleImageProxy.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,OACZ,CAAC;AAErC,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,IAAI,CAAC;IACT,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,KAAK,CAAC;IACV,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAE3E,MAAM,MAAM,YAAY,GAAG,CACzB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC5B,OAAO,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAiBH,eAAO,MAAM,iBAAiB,GAC5B,KAAK,MAAM,EACX,aAAa,MAAM,EACnB,UAAS,YAAkC,KAC1C,OAAO,CAAC,kBAAkB,CAiC5B,CAAC"}
@@ -2,6 +2,7 @@ import * as http from 'http';
2
2
  import { IssueRepository } from '../../../domain/usecases/adapter-interfaces/IssueRepository';
3
3
  import { IssueTitleStateCache } from './consoleReadApi';
4
4
  import { ConsoleProjectResolver } from './consoleOperationApi';
5
+ import { ImageFetcher } from './consoleImageProxy';
5
6
  export declare const DEFAULT_CONSOLE_PORT = 9981;
6
7
  export declare const CONSOLE_TOKEN_HEADER = "x-pv-token";
7
8
  export declare const hasDotSegment: (requestPath: string) => boolean;
@@ -15,11 +16,14 @@ export type ConsoleServerOptions = {
15
16
  consoleDataOutputDir: string | null;
16
17
  inTmuxDataDir: string | null;
17
18
  dashboardDir: string | null;
19
+ githubToken?: string | null;
20
+ imageFetcher?: ImageFetcher | null;
18
21
  issueRepository?: IssueRepository | null;
19
22
  resolveProject?: ConsoleProjectResolver | null;
20
23
  issueTitleStateCache?: IssueTitleStateCache | null;
21
24
  };
22
25
  export declare const DASHBOARD_REQUEST_PATH = "/tdpm.txt";
26
+ export declare const IMAGE_PROXY_REQUEST_PATH = "/api/img";
23
27
  export declare const resolveDashboardFilePath: (dashboardDir: string, requestPath: string) => string | null;
24
28
  export declare const resolveFlatInTmuxFilePath: (inTmuxDataDir: string, requestPath: string) => string | null;
25
29
  export declare const handleConsoleRequest: (options: ConsoleServerOptions, request: http.IncomingMessage, response: http.ServerResponse) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"consoleServer.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/console/consoleServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,6DAA6D,CAAC;AAM9F,OAAO,EACL,oBAAoB,EAOrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,sBAAsB,EAKvB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAmCjD,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,OAGiB,CAAC;AAEtE,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,KAAG,OAGrB,CAAC;AAIhC,eAAO,MAAM,iBAAiB,GAAI,aAAa,MAAM,KAAG,OAmBvD,CA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