Skip to content

Commit 8dad93a

Browse files
authored
chore(workflow): bundless shared and add references (#1044)
1 parent 76ac188 commit 8dad93a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+324
-298
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,5 @@ CLAUDE.md
119119
**/CLAUDE.md
120120
.cursor/rules/nx-rules.mdc
121121
.github/instructions/nx.instructions.md
122-
.gemini-clipboard
122+
.gemini-clipboard
123+
tsconfig.build.tsbuildinfo

apps/android-playground/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@rsbuild/plugin-node-polyfill": "1.3.0",
3030
"@rsbuild/plugin-react": "^1.3.1",
3131
"@rsbuild/plugin-svgr": "^1.1.1",
32+
"@rsbuild/plugin-type-check": "1.2.3",
3233
"@types/react": "^18.3.1",
3334
"@types/react-dom": "^18.3.1",
3435
"archiver": "^6.0.0",

apps/android-playground/rsbuild.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export default defineConfig({
6767
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
6868
},
6969
},
70+
output: {
71+
externals: ['sharp'],
72+
},
7073
plugins: [
7174
pluginReact(),
7275
pluginNodePolyfill(),

apps/android-playground/tsconfig.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
/* type checking */
1818
"strict": true,
1919
"noUnusedLocals": true,
20-
"noUnusedParameters": true
20+
"noUnusedParameters": true,
21+
"composite": true
2122
},
22-
"include": ["src"]
23+
"include": ["src"],
24+
"references": [
25+
{
26+
"path": "../../packages/android"
27+
},
28+
{
29+
"path": "../../packages/core"
30+
},
31+
{
32+
"path": "../../packages/shared"
33+
},
34+
{
35+
"path": "../../packages/visualizer"
36+
},
37+
{
38+
"path": "../../packages/web-integration"
39+
}
40+
]
2341
}

apps/chrome-extension/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"archiver": "^6.0.0",
4444
"less": "^4.2.0",
4545
"tailwindcss": "4.1.11",
46-
"typescript": "^5.8.3"
46+
"typescript": "^5.8.3",
47+
"openai": "4.81.0"
4748
}
4849
}

apps/chrome-extension/src/extension/recorder/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { ChromeRecordedEvent } from '@midscene/recorder';
88
import { message } from 'antd';
99
import { saveAs } from 'file-saver';
1010
import JSZip from 'jszip';
11+
import type { ChatCompletionContentPart } from 'openai/resources/index';
1112
import type { RecordingSession } from '../../store';
1213
import { recordLogger } from './logger';
1314
import { isChromeExtension, safeChromeAPI } from './types';
@@ -278,7 +279,7 @@ export const generateRecordTitle = async (
278279
const screenshots = getScreenshotsForLLM(events);
279280

280281
// Create the message content
281-
const messageContent: Array<string | Record<string, any>> = [
282+
const messageContent: ChatCompletionContentPart[] = [
282283
{
283284
type: 'text',
284285
text: `Generate a concise title (5-7 words) and brief description (1-2 sentences) for a browser recording session with the following events:\n\n${JSON.stringify(summary, null, 2)}\n\nRespond with a JSON object containing "title" and "description" fields. The title should be action-oriented and highlight the main task accomplished. The description should provide slightly more detail about what was done.`,
@@ -313,7 +314,7 @@ export const generateRecordTitle = async (
313314
role: 'user',
314315
content: messageContent,
315316
},
316-
];
317+
] as const;
317318

318319
const response = await callAiFn(
319320
[prompt[0], prompt[1]],

apps/chrome-extension/tsconfig.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
/* type checking */
1818
"strict": true,
1919
"noUnusedLocals": false,
20-
"noUnusedParameters": false
20+
"noUnusedParameters": false,
21+
"composite": true
2122
},
22-
"include": ["src"]
23+
"include": ["src"],
24+
"references": [
25+
{
26+
"path": "../../packages/core"
27+
},
28+
{
29+
"path": "../../packages/recorder"
30+
},
31+
{
32+
"path": "../../packages/shared"
33+
},
34+
{
35+
"path": "../../packages/visualizer"
36+
},
37+
{
38+
"path": "../../packages/web-integration"
39+
}
40+
]
2341
}

apps/recorder-form/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@rsbuild/plugin-node-polyfill": "1.3.0",
20+
"@rsbuild/plugin-type-check": "1.2.3",
2021
"@rsbuild/core": "^1.3.22",
2122
"@rsbuild/plugin-react": "^1.3.1",
2223
"@types/react": "^18.3.1",

apps/report/rsbuild.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ const copyReportTemplate = () => ({
5959
const jsFiles = fs.readdirSync(corePkgDistDir, { recursive: true });
6060
let replacedCount = 0;
6161
for (const file of jsFiles) {
62-
if (typeof file === 'string' && file.endsWith('.js')) {
62+
if (
63+
typeof file === 'string' &&
64+
(file.endsWith('.js') || file.endsWith('.mjs'))
65+
) {
6366
const filePath = path.join(corePkgDistDir, file.toString());
6467
const fileContent = fs.readFileSync(filePath, 'utf-8');
6568
if (fileContent.includes(replacedMark)) {

apps/report/tsconfig.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,23 @@
2121

2222
"paths": {
2323
"@/*": ["./src/*"]
24-
}
24+
},
25+
"composite": true,
26+
"declarationDir": "dist/types"
2527
},
26-
"include": ["src"]
28+
"include": ["src"],
29+
"references": [
30+
{
31+
"path": "../../packages/core"
32+
},
33+
{
34+
"path": "../../packages/shared"
35+
},
36+
{
37+
"path": "../../packages/visualizer"
38+
},
39+
{
40+
"path": "../../packages/web-integration"
41+
}
42+
]
2743
}

0 commit comments

Comments
 (0)